opencode/packages/schema/src/session-metadata.ts
opencode-agent[bot] 5c53cfc342
feat(session): allow metadata updates (#50025)
Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
2026-09-22 17:27:38 -05:00

11 lines
440 B
TypeScript

import { Schema } from "effect"
/**
* Host-supplied session annotations, durable and opaque to core. Keys are
* arbitrary; values must be JSON-serializable. Children and forks inherit
* the parent's current metadata unless the creator supplies its own.
*/
export const SessionMetadata = Schema.Record(Schema.String, Schema.Json).annotate({
identifier: "Session.Metadata",
})
export type SessionMetadata = typeof SessionMetadata.Type