effect-durable-agent 0.1.0-alpha.9 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/dist/assert-never-CoyUpoRB.js +18 -0
- package/dist/assert-never-CoyUpoRB.js.map +1 -0
- package/dist/{commands-Ce1ec6kH.d.ts → commands-BUquEZVP.d.ts} +31 -12
- package/dist/{compaction-BgDr5VJy.js → compaction-63iEDHHl.js} +63 -13
- package/dist/compaction-63iEDHHl.js.map +1 -0
- package/dist/{context-projection-n6Rdup0N.d.ts → context-projection-Bezx3drD.d.ts} +16 -40
- package/dist/{core-CYT6DBaS.d.ts → core-BcimKMIv.d.ts} +5 -3
- package/dist/delivery-2ZILvoRD.js +507 -0
- package/dist/delivery-2ZILvoRD.js.map +1 -0
- package/dist/delivery-D3MxW4wg.d.ts +3026 -0
- package/dist/domain/command-queues.d.ts +81 -2
- package/dist/domain/command-queues.js +1 -1
- package/dist/domain/command-queues.js.map +1 -1
- package/dist/domain/context-projection.d.ts +1 -1
- package/dist/domain/context-projection.js +1 -1
- package/dist/domain/context-projection.js.map +1 -1
- package/dist/domain/message-transcript.d.ts +36 -2
- package/dist/domain/message-transcript.js +10 -2
- package/dist/domain/message-transcript.js.map +1 -1
- package/dist/domain/model-usage.d.ts +1 -1
- package/dist/domain/model-usage.js +1 -1
- package/dist/domain/reduced-state-schema.d.ts +3 -992
- package/dist/domain/reduced-state-schema.js +126 -7
- package/dist/domain/reduced-state-schema.js.map +1 -1
- package/dist/domain/reduced-state.d.ts +2 -2
- package/dist/domain/reduced-state.js +936 -2
- package/dist/domain/reduced-state.js.map +1 -0
- package/dist/domain/run-scheduling.d.ts +2 -0
- package/dist/domain/run-scheduling.js +127 -0
- package/dist/domain/run-scheduling.js.map +1 -0
- package/dist/{durable-br2C1bWK.d.ts → durable-168Womqp.d.ts} +8535 -2859
- package/dist/{durable-BGFvX7Mh.js → durable-D13w1Qr3.js} +229 -15
- package/dist/durable-D13w1Qr3.js.map +1 -0
- package/dist/{envelope-DxQzo5rN.js → envelope-BCzKUq_z.js} +12 -3
- package/dist/envelope-BCzKUq_z.js.map +1 -0
- package/dist/{envelope-DkZyMIgp.d.ts → envelope-Che6KatU.d.ts} +70 -7
- package/dist/{event-factory-DTFdy0Cb.js → event-factory-_vF1bIJ7.js} +7 -3
- package/dist/event-factory-_vF1bIJ7.js.map +1 -0
- package/dist/{events-LZFNoESe.d.ts → events-DwTARLMv.d.ts} +139 -137
- package/dist/{id-generator-Ckl8_XWW.d.ts → id-generator-BKGoKjt-.d.ts} +3 -3
- package/dist/in-memory-CeODnZhE.js +150 -0
- package/dist/in-memory-CeODnZhE.js.map +1 -0
- package/dist/index.d.ts +8 -8
- package/dist/index.js +6 -6
- package/dist/interpreter-DKGJ1sSx.js +1452 -0
- package/dist/interpreter-DKGJ1sSx.js.map +1 -0
- package/dist/{keep-alive-Chl5SJxy.d.ts → keep-alive-_zFCUvt3.d.ts} +1 -2
- package/dist/{model-resolver-BPPJAsuh.d.ts → model-resolver-DeBDK8XO.d.ts} +11 -5
- package/dist/{model-usage-CdBEkTwU.d.ts → model-usage-0GeHwaaU.d.ts} +2 -3
- package/dist/records--54mZEBx.js +675 -0
- package/dist/records--54mZEBx.js.map +1 -0
- package/dist/reduced-state-B1cvy8N_.d.ts +51110 -0
- package/dist/reduced-state-schema-B98exWxQ.d.ts +2338 -0
- package/dist/{reducer-registry-aFjz_ZLT.d.ts → reducer-registry-DhGVzHBV.d.ts} +12 -6
- package/dist/run-scheduling-wakeup-Mjic4tb_.d.ts +24 -0
- package/dist/services/compaction.d.ts +2 -2
- package/dist/services/compaction.js +2 -2
- package/dist/services/id-generator.d.ts +1 -1
- package/dist/services/id-generator.js +6 -12
- package/dist/services/id-generator.js.map +1 -1
- package/dist/services/keep-alive.d.ts +1 -1
- package/dist/services/keep-alive.js.map +1 -1
- package/dist/services/model-call.d.ts +15 -0
- package/dist/services/model-call.js +15 -0
- package/dist/services/model-call.js.map +1 -0
- package/dist/services/model-resolver.d.ts +1 -1
- package/dist/services/model-resolver.js +1 -1
- package/dist/services/model-resolver.js.map +1 -1
- package/dist/services/prompt-projector.d.ts +2 -2
- package/dist/services/prompt-projector.js +49 -5
- package/dist/services/prompt-projector.js.map +1 -1
- package/dist/services/reducer-registry.d.ts +1 -1
- package/dist/services/reducer-registry.js +19 -6
- package/dist/services/reducer-registry.js.map +1 -1
- package/dist/services/run-scheduler.d.ts +2 -2
- package/dist/services/run-scheduler.js +25 -2
- package/dist/services/run-scheduler.js.map +1 -0
- package/dist/services/run-scheduling-wakeup.d.ts +2 -0
- package/dist/services/run-scheduling-wakeup.js +13 -0
- package/dist/services/run-scheduling-wakeup.js.map +1 -0
- package/dist/services/runtime-layer.d.ts +17 -33
- package/dist/services/runtime-layer.js +19 -14
- package/dist/services/runtime-layer.js.map +1 -1
- package/dist/services/runtime.d.ts +1 -1
- package/dist/services/runtime.js +31 -20
- package/dist/services/runtime.js.map +1 -1
- package/dist/services/session-event-observer.d.ts +1 -1
- package/dist/services/session-event-observer.js.map +1 -1
- package/dist/services/session-query.d.ts +1 -1
- package/dist/services/session-query.js +57 -10
- package/dist/services/session-query.js.map +1 -1
- package/dist/services/session-state.d.ts +1 -1
- package/dist/services/session-state.js +1 -1
- package/dist/services/session-store.d.ts +2 -2
- package/dist/services/session-store.js +127 -37
- package/dist/services/session-store.js.map +1 -1
- package/dist/services/sink-checkpoint-store.d.ts +1 -1
- package/dist/services/sink-checkpoint-store.js +2 -1
- package/dist/services/sink-checkpoint-store.js.map +1 -1
- package/dist/services/sink-registry.d.ts +2 -2
- package/dist/services/sink-registry.js +1 -1
- package/dist/services/span-names.d.ts +1 -1
- package/dist/services/span-names.js +6 -1
- package/dist/services/span-names.js.map +1 -1
- package/dist/services/tool-registry.d.ts +2 -2
- package/dist/services/tool-registry.js +12 -3
- package/dist/services/tool-registry.js.map +1 -1
- package/dist/services/tracing.d.ts +3 -3
- package/dist/services/tracing.js +2 -2
- package/dist/services/tracing.js.map +1 -1
- package/dist/{session-event-observer-DaFMKKNc.d.ts → session-event-observer-DlP9ITB2.d.ts} +3 -3
- package/dist/{session-state-Bkc6u-Wr.js → session-state-BehvUVyq.js} +659 -164
- package/dist/session-state-BehvUVyq.js.map +1 -0
- package/dist/session-store-BL6sfrnn.d.ts +3326 -0
- package/dist/{sink-checkpoint-store-M7qIxoSH.d.ts → sink-checkpoint-store-DvuHwvx_.d.ts} +3 -4
- package/dist/sink-registry-DskRcyOS.js +345 -0
- package/dist/sink-registry-DskRcyOS.js.map +1 -0
- package/dist/subscription-DZNWFDTV.d.ts +966 -0
- package/dist/subscription-DmO3BcdT.js +505 -0
- package/dist/subscription-DmO3BcdT.js.map +1 -0
- package/dist/testkit/layers.d.ts +30 -23
- package/dist/testkit/layers.js +23 -15
- package/dist/testkit/layers.js.map +1 -1
- package/dist/testkit/transcript.d.ts +226 -0
- package/dist/testkit/transcript.js +1475 -0
- package/dist/testkit/transcript.js.map +1 -0
- package/dist/{tool-registry-BJaVNtw4.d.ts → tool-registry-CHHUU9BN.d.ts} +44 -8
- package/dist/{tracing-BXHAkxkx.d.ts → tracing-BwjbF285.d.ts} +1 -2
- package/dist/transcript.d.ts +101 -0
- package/dist/transcript.js +107 -0
- package/dist/transcript.js.map +1 -0
- package/dist/types/commands.d.ts +2 -2
- package/dist/types/commands.js +8 -3
- package/dist/types/commands.js.map +1 -1
- package/dist/types/core.d.ts +2 -2
- package/dist/types/core.js +3 -1
- package/dist/types/core.js.map +1 -1
- package/dist/types/events/durable.d.ts +2 -2
- package/dist/types/events/durable.js +2 -2
- package/dist/types/events.d.ts +5 -5
- package/dist/types/events.js +3 -3
- package/dist/types/tracing.d.ts +1 -1
- package/dist/types/tracing.js.map +1 -1
- package/dist/websocket/events.d.ts +2 -0
- package/dist/websocket/events.js +2 -0
- package/dist/websocket.d.ts +2123 -2552
- package/dist/websocket.js +628 -442
- package/dist/websocket.js.map +1 -1
- package/dist/window-read-Brov9VdQ.d.ts +113 -0
- package/dist/window-read-DPFAA1hM.js +264 -0
- package/dist/window-read-DPFAA1hM.js.map +1 -0
- package/package.json +37 -13
- package/dist/command-queues-DdDB_aYM.d.ts +0 -462
- package/dist/compaction-BgDr5VJy.js.map +0 -1
- package/dist/compaction-ch8z6G9x.d.ts +0 -165
- package/dist/durable-BGFvX7Mh.js.map +0 -1
- package/dist/envelope-DxQzo5rN.js.map +0 -1
- package/dist/event-factory-DTFdy0Cb.js.map +0 -1
- package/dist/event-factory-Di1jwQvm.d.ts +0 -87
- package/dist/index-BVVgDSdq.d.ts +0 -1
- package/dist/message-transcript-DQNlzxle.d.ts +0 -32
- package/dist/prompt-projector-f4ElyXCE.d.ts +0 -39
- package/dist/reduced-state-DF0-6mbR.js +0 -921
- package/dist/reduced-state-DF0-6mbR.js.map +0 -1
- package/dist/run-scheduler-CAt7dF6C.js +0 -21
- package/dist/run-scheduler-CAt7dF6C.js.map +0 -1
- package/dist/run-scheduler-xkhZyto5.d.ts +0 -44
- package/dist/runtime-DDSYP9jS.d.ts +0 -63
- package/dist/session-query-B72HY_0L.d.ts +0 -45
- package/dist/session-state-Bkc6u-Wr.js.map +0 -1
- package/dist/session-state-C9YLSAso.d.ts +0 -862
- package/dist/session-store-Cpi_NwTR.d.ts +0 -206
- package/dist/sink-registry-Bl-vQES6.d.ts +0 -133
- package/dist/sink-registry-NDgeyzO0.js +0 -272
- package/dist/sink-registry-NDgeyzO0.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"records--54mZEBx.js","names":[],"sources":["../src/transcript/hash.ts","../src/transcript/records.ts"],"sourcesContent":["/**\n * Synchronous hashing for transcript identities (versions and bounded record keys).\n */\n\n// SHA-256 (FIPS 180-4). Synchronous so version identity is available inside synchronous storage\n// transactions and at module construction; Web Crypto digests are asynchronous only.\nconst roundConstants = new Uint32Array([\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2,\n]);\n\nconst rotateRight = (value: number, bits: number): number =>\n (value >>> bits) | (value << (32 - bits));\n\n// Typed-array reads are always in bounds here; the fallback only satisfies index typing.\nconst at = (words: Uint32Array, index: number): number => words[index] ?? 0;\n\n/** Lowercase hex SHA-256 of a string's UTF-8 bytes. */\nexport const sha256Hex = (input: string): string => {\n const message = new TextEncoder().encode(input);\n const bitLength = message.length * 8;\n const paddedLength = Math.ceil((message.length + 9) / 64) * 64;\n const padded = new Uint8Array(paddedLength);\n padded.set(message);\n padded[message.length] = 0x80;\n const view = new DataView(padded.buffer);\n view.setUint32(paddedLength - 8, Math.floor(bitLength / 0x1_0000_0000));\n view.setUint32(paddedLength - 4, bitLength >>> 0);\n\n const hash = new Uint32Array([\n 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19,\n ]);\n const schedule = new Uint32Array(64);\n for (let offset = 0; offset < paddedLength; offset += 64) {\n for (let index = 0; index < 16; index += 1) {\n schedule[index] = view.getUint32(offset + index * 4);\n }\n for (let index = 16; index < 64; index += 1) {\n const w15 = at(schedule, index - 15);\n const w2 = at(schedule, index - 2);\n const s0 = rotateRight(w15, 7) ^ rotateRight(w15, 18) ^ (w15 >>> 3);\n const s1 = rotateRight(w2, 17) ^ rotateRight(w2, 19) ^ (w2 >>> 10);\n schedule[index] = at(schedule, index - 16) + s0 + at(schedule, index - 7) + s1;\n }\n const working = Uint32Array.from(hash);\n for (let index = 0; index < 64; index += 1) {\n const [a, b, c, d, e, f, g, h] = Array.from(working);\n const s1 = rotateRight(e ?? 0, 6) ^ rotateRight(e ?? 0, 11) ^ rotateRight(e ?? 0, 25);\n const choice = ((e ?? 0) & (f ?? 0)) ^ (~(e ?? 0) & (g ?? 0));\n const t1 = (h ?? 0) + s1 + choice + at(roundConstants, index) + at(schedule, index);\n const s0 = rotateRight(a ?? 0, 2) ^ rotateRight(a ?? 0, 13) ^ rotateRight(a ?? 0, 22);\n const majority = ((a ?? 0) & (b ?? 0)) ^ ((a ?? 0) & (c ?? 0)) ^ ((b ?? 0) & (c ?? 0));\n // Uint32Array stores modulo 2^32, which is the algorithm's addition.\n working.set([\n t1 + s0 + majority,\n a ?? 0,\n b ?? 0,\n c ?? 0,\n (d ?? 0) + t1,\n e ?? 0,\n f ?? 0,\n g ?? 0,\n ]);\n }\n for (let index = 0; index < 8; index += 1) {\n hash[index] = at(hash, index) + at(working, index);\n }\n }\n return Array.from(hash, (word) => word.toString(16).padStart(8, \"0\")).join(\"\");\n};\n","import * as Order from \"effect/Order\";\nimport * as Schema from \"effect/Schema\";\nimport * as SchemaGetter from \"effect/SchemaGetter\";\nimport * as SchemaTransformation from \"effect/SchemaTransformation\";\n\nimport { TokenConsumptionState } from \"../domain/model-usage\";\nimport { sha256Hex } from \"./hash\";\nimport { JsonUserMessageContent } from \"../domain/reduced-state-schema\";\nimport { CommandIdempotencyKey, SubmitMessageDisposition } from \"../types/commands\";\nimport {\n CommandId,\n CompactionId,\n ContextVersion,\n EventId,\n InferenceId,\n MessageId,\n RunId,\n SequenceNumber,\n SummaryId,\n ToolCallId,\n TurnId,\n} from \"../types/core\";\nimport {\n FailurePayload,\n ModelSelectionPayload,\n NonNegativeInt,\n ProviderPartId,\n ToolName,\n UnixEpochMillis,\n UsagePayload,\n} from \"../types/events/envelope\";\nimport { ToolCallRejectionReason } from \"../types/events/durable\";\n\n// ---------------------------------------------------------------------------------------------\n// Identity\n// ---------------------------------------------------------------------------------------------\n\n/** One logical user submission across every lifecycle state: `user:<commandId>`. */\nexport const UserRecordId = Schema.TemplateLiteral([\"user:\", CommandId]);\nexport type UserRecordId = typeof UserRecordId.Type;\n\n/** One model inference's visible output: `assistant:<inferenceId>`. */\nexport const InferenceAssistantRecordId = Schema.TemplateLiteral([\"assistant:\", InferenceId]);\nexport type InferenceAssistantRecordId = typeof InferenceAssistantRecordId.Type;\n\n/** Assistant context imported from another transport, keyed by its import event: `import:<eventId>`. */\nexport const ImportAssistantRecordId = Schema.TemplateLiteral([\"import:\", EventId]);\nexport type ImportAssistantRecordId = typeof ImportAssistantRecordId.Type;\n\n/** Either assistant identity; both are top-level assistant records. */\nexport const AssistantRecordId = Schema.Union([\n InferenceAssistantRecordId,\n ImportAssistantRecordId,\n]);\nexport type AssistantRecordId = typeof AssistantRecordId.Type;\n\n/** The marker a context rebase leaves in history: `compaction:<compactionId>`. */\nexport const CompactionRecordId = Schema.TemplateLiteral([\"compaction:\", CompactionId]);\nexport type CompactionRecordId = typeof CompactionRecordId.Type;\n\n/** A framework tool call, a dependency of its assistant: `tool:<toolCallId>`. */\nexport const ToolRecordId = Schema.TemplateLiteral([\"tool:\", ToolCallId]);\nexport type ToolRecordId = typeof ToolRecordId.Type;\n\n/**\n * A run plus every startup-recovery continuation of it: `run:<rootRunId>`.\n *\n * The id names the first run of the chain and never changes when a continuation joins.\n */\nexport const RunGroupRecordId = Schema.TemplateLiteral([\"run:\", RunId]);\nexport type RunGroupRecordId = typeof RunGroupRecordId.Type;\n\n/** The session-context singleton. */\nexport const SessionContextRecordId = Schema.Literal(\"session\");\nexport type SessionContextRecordId = typeof SessionContextRecordId.Type;\n\n/**\n * Internal holding record for decorations whose target user record does not exist yet.\n *\n * Hosts append decoration events before the command they describe (Gia submits\n * `[author, attachments…, SubmitMessage]` in one batch), so the interpreter parks them under the\n * association key and merges them when the user record is created. Never served by a window read.\n */\nexport const DecorationBufferRecordId = Schema.TemplateLiteral([\n \"decorations:\",\n Schema.Literals([\"command\", \"idempotencyKey\"]),\n \":\",\n Schema.NonEmptyString.check(Schema.isMaxLength(512)),\n]);\nexport type DecorationBufferRecordId = typeof DecorationBufferRecordId.Type;\n\n/** Every transcript record identity this EDA release writes. */\nexport const TranscriptRecordId = Schema.Union([\n UserRecordId,\n AssistantRecordId,\n CompactionRecordId,\n ToolRecordId,\n RunGroupRecordId,\n SessionContextRecordId,\n DecorationBufferRecordId,\n]);\nexport type TranscriptRecordId = typeof TranscriptRecordId.Type;\n\n/** Constructors for record identities; the only place identities are spelled. */\nexport const transcriptRecordId = {\n user: (commandId: CommandId): UserRecordId => `user:${commandId}`,\n assistant: (inferenceId: InferenceId): InferenceAssistantRecordId => `assistant:${inferenceId}`,\n import: (eventId: EventId): ImportAssistantRecordId => `import:${eventId}`,\n compaction: (compactionId: CompactionId): CompactionRecordId => `compaction:${compactionId}`,\n tool: (toolCallId: ToolCallId): ToolRecordId => `tool:${toolCallId}`,\n runGroup: (rootRunId: RunId): RunGroupRecordId => `run:${rootRunId}`,\n session: \"session\",\n /**\n * Keys longer than 256 characters (caller-owned idempotency keys) are hashed to stay bounded;\n * keys starting with `#` are hashed too, so a literal key never collides with a hashed one.\n */\n decorationBuffer: (\n association: \"command\" | \"idempotencyKey\",\n key: string,\n ): DecorationBufferRecordId =>\n `decorations:${association}:${\n key.length > 0 && key.length <= 256 && !key.startsWith(\"#\")\n ? key\n : `#sha256:${sha256Hex(key)}`\n }`,\n} as const;\n\n// ---------------------------------------------------------------------------------------------\n// Position and cursor\n// ---------------------------------------------------------------------------------------------\n\n/**\n * History position of a top-level record: the event that placed it and an ordinal among records\n * placed by that same event. Assigned once and never moved.\n */\nexport const TranscriptPosition = Schema.Struct({\n anchorSeq: SequenceNumber,\n ordinal: NonNegativeInt,\n});\nexport type TranscriptPosition = typeof TranscriptPosition.Type;\n\n/**\n * Adapter-owned identity of one physical event log. A wiped log gets a new incarnation, which\n * invalidates every cursor, chunk and body reference minted against the old one.\n */\nexport const TranscriptLogIncarnation = Schema.NonEmptyString.pipe(\n Schema.brand(\"TranscriptLogIncarnation\"),\n);\nexport type TranscriptLogIncarnation = typeof TranscriptLogIncarnation.Type;\n\n/**\n * Identity of one transcript interpretation: a hash of the EDA semantic revision and the host's\n * canonical mapping data. Two sessions with equal versions interpret the same log identically.\n */\nexport const TranscriptVersion = Schema.String.check(Schema.isPattern(/^[0-9a-f]{64}$/)).pipe(\n Schema.brand(\"TranscriptVersion\"),\n);\nexport type TranscriptVersion = typeof TranscriptVersion.Type;\n\n/**\n * Paging cursor: a point in the total order `(anchorSeq, ordinal, recordId)`.\n *\n * A cursor is meaningful only for the incarnation and version that minted it; readers reject\n * any other pairing rather than guess an equivalent point.\n */\nexport const TranscriptCursor = Schema.Struct({\n incarnation: TranscriptLogIncarnation,\n version: TranscriptVersion,\n anchorSeq: SequenceNumber,\n ordinal: NonNegativeInt,\n recordId: Schema.NonEmptyString,\n});\nexport type TranscriptCursor = typeof TranscriptCursor.Type;\n\n/** A point in transcript order, without the incarnation and version scope of a cursor. */\nexport interface TranscriptOrderKey {\n readonly anchorSeq: number;\n readonly ordinal: number;\n readonly recordId: string;\n}\n\n/** Total transcript order over top-level records. */\nexport const TranscriptOrder: Order.Order<TranscriptOrderKey> = Order.Struct({\n anchorSeq: Order.Number,\n ordinal: Order.Number,\n recordId: Order.String,\n});\n\n// ---------------------------------------------------------------------------------------------\n// Shared values\n// ---------------------------------------------------------------------------------------------\n\n/** A JSON path into an event payload; the empty path is the payload itself. */\nexport const TranscriptFieldPath = Schema.Array(Schema.Union([Schema.String, NonNegativeInt]));\nexport type TranscriptFieldPath = typeof TranscriptFieldPath.Type;\n\n/** The immutable log location a body was read from. */\nexport const TranscriptBodySource = Schema.Struct({\n seq: SequenceNumber,\n path: TranscriptFieldPath,\n});\nexport type TranscriptBodySource = typeof TranscriptBodySource.Type;\n\n/**\n * Largest body a stored record holds inline, in canonical JSON bytes. Larger bodies are stored\n * as references, which keeps every stored row far below a Durable Object's 2 MB value limit no\n * matter how large an event payload is.\n */\nexport const transcriptStoredInlineBodyLimit = 65_536;\n\n/**\n * A potentially large body (tool parameters and results).\n *\n * Stored records hold a body inline up to `transcriptStoredInlineBodyLimit` and as a reference\n * above it; a window read may also replace a smaller inline body with a reference. A reference\n * points at the body's immutable source in the append-only log, so it stays resolvable after\n * projection rows are rebuilt or deleted. The host authorizes reference resolution.\n */\nexport const TranscriptBody = Schema.TaggedUnion({\n Inline: { value: Schema.Json, source: TranscriptBodySource },\n Ref: { source: TranscriptBodySource, byteLength: NonNegativeInt },\n});\nexport type TranscriptBody = typeof TranscriptBody.Type;\n\n/** Host-defined decoration name, as written by a mapping operation. */\nexport const TranscriptDecorationKey = Schema.String.check(\n Schema.isPattern(/^[A-Za-z][A-Za-z0-9_.-]{0,63}$/),\n);\nexport type TranscriptDecorationKey = typeof TranscriptDecorationKey.Type;\n\n/** Id of a decoration list entry that is keyed by its ordinal. */\nexport const TranscriptDecorationEntryId = Schema.NonEmptyString.check(Schema.isMaxLength(256));\nexport type TranscriptDecorationEntryId = typeof TranscriptDecorationEntryId.Type;\n\n/** Key of one decoration list entry: an entry id or a host-assigned ordinal. */\nexport const TranscriptDecorationEntryKey = Schema.Union([\n Schema.String.check(Schema.isMaxLength(256)),\n NonNegativeInt,\n]);\nexport type TranscriptDecorationEntryKey = typeof TranscriptDecorationEntryKey.Type;\n\n/**\n * A host decoration value: a JSON scalar/object, or a keyed list whose entries are replaced by id\n * or ordinal. EDA treats the JSON as opaque; only the host gives it meaning.\n */\nexport const TranscriptDecoration = Schema.TaggedUnion({\n Value: { value: Schema.Json },\n List: {\n entries: Schema.Array(\n Schema.Struct({\n key: TranscriptDecorationEntryKey,\n value: Schema.Json,\n /** The entry's id when the list is keyed by id or ordinal (the key is then the ordinal). */\n id: Schema.optionalKey(TranscriptDecorationEntryId),\n }),\n ),\n },\n});\nexport type TranscriptDecoration = typeof TranscriptDecoration.Type;\n\n/** Decorations of one record, keyed by host decoration name. */\nexport const TranscriptDecorations = Schema.Record(TranscriptDecorationKey, TranscriptDecoration);\nexport type TranscriptDecorations = typeof TranscriptDecorations.Type;\n\n/** Host classification of a user record, such as an authenticated subagent notice. */\nexport const TranscriptClassification = TranscriptDecorationKey;\nexport type TranscriptClassification = typeof TranscriptClassification.Type;\n\nconst LifecycleTimingFields = {\n startedAtMs: Schema.optionalKey(UnixEpochMillis),\n terminalAtMs: Schema.optionalKey(UnixEpochMillis),\n durationMs: Schema.optionalKey(NonNegativeInt),\n};\n\n// ---------------------------------------------------------------------------------------------\n// Record bodies\n// ---------------------------------------------------------------------------------------------\n\n/**\n * Where a user submission is in its lifecycle.\n *\n * Only `Consumed` records are rendered in history. `Pending`, `Paused`, `Promoted` and `Steering`\n * are waiting to be read by the agent and are served as dependencies. `Cancelled` records stay\n * stored so their aliases resolve but are never rendered.\n */\nexport const TranscriptUserState = Schema.TaggedUnion({\n /** Admitted and queued for a later run. */\n Pending: {},\n /** Queued, but held because the user interrupted the run that would have read it. */\n Paused: { byCommandId: CommandId },\n /** Moved from the queue to steer the active run. */\n Promoted: {},\n /** Waiting to steer the active run. */\n Steering: {},\n /** Read by the agent; the record's position is the consumption point. */\n Consumed: {\n turnId: Schema.optionalKey(TurnId),\n runId: Schema.optionalKey(RunId),\n },\n /** Withdrawn before the agent read it, or withdrawn from the model context. */\n Cancelled: {\n reason: Schema.String,\n byCommandId: Schema.optionalKey(CommandId),\n },\n});\nexport type TranscriptUserState = typeof TranscriptUserState.Type;\n\nconst UserBodyFields = {\n commandId: CommandId,\n /** Every message id that has carried this submission; a replacement id joins as an alias. */\n messageIds: Schema.Array(MessageId),\n idempotencyKey: Schema.optionalKey(CommandIdempotencyKey),\n disposition: Schema.optionalKey(SubmitMessageDisposition),\n /**\n * JSON projection of the content: file bytes become data URLs, URLs become strings. Content is\n * inline; file data belongs in host attachments rather than message content.\n */\n content: JsonUserMessageContent,\n state: TranscriptUserState,\n /** Present when the submission arrived as steering for a specific run. */\n steering: Schema.optionalKey(Schema.Struct({ runId: RunId })),\n classification: Schema.optionalKey(TranscriptClassification),\n decorations: TranscriptDecorations,\n /** The first event that named this submission; pending users are served in this order. */\n submittedSeq: SequenceNumber,\n submittedAtMs: UnixEpochMillis,\n /** Present exactly when `position` is: the record was consumed at some point. */\n consumedAtMs: Schema.optionalKey(UnixEpochMillis),\n};\n\n/** Lifecycle of one assistant record. Imports are `Completed` from the start. */\nexport const TranscriptAssistantLifecycle = Schema.TaggedUnion({\n Streaming: {},\n Completed: {\n finishReason: Schema.optionalKey(Schema.String),\n usage: Schema.optionalKey(UsagePayload),\n },\n Failed: { error: FailurePayload },\n});\nexport type TranscriptAssistantLifecycle = typeof TranscriptAssistantLifecycle.Type;\n\n/**\n * One ordered part of assistant output. Tool calls are references; their bodies live on the tool\n * dependency. Part types this release does not render are kept as `Unknown` so ordering survives.\n */\nconst KnownAssistantPart = Schema.TaggedUnion({\n Text: { text: Schema.String },\n Reasoning: { text: Schema.String },\n ToolCall: {\n providerPartId: ProviderPartId,\n toolName: ToolName,\n providerExecuted: Schema.Boolean,\n /** The framework tool record, once the call has been sealed into one. */\n toolId: Schema.optionalKey(ToolRecordId),\n },\n /** Result of a provider-executed tool, which has no framework tool record. */\n ToolResult: {\n providerPartId: ProviderPartId,\n toolName: ToolName,\n isFailure: Schema.Boolean,\n result: TranscriptBody,\n },\n Unknown: { partType: Schema.String },\n});\n\n/** A part whose tag or shape this reader does not know keeps its place as `Unknown`. */\nconst knownAssistantPartTags: ReadonlySet<string> = new Set([\n \"Text\",\n \"Reasoning\",\n \"ToolCall\",\n \"ToolResult\",\n \"Unknown\",\n]);\n\nconst UnrecognizedAssistantPart = Schema.Struct({\n _tag: Schema.String.check(\n Schema.makeFilter(\n (tag) => !knownAssistantPartTags.has(tag) || \"a known part tag must decode as that part\",\n ),\n ),\n}).pipe(\n Schema.decodeTo(Schema.toType(KnownAssistantPart.cases.Unknown), {\n decode: SchemaGetter.transform((part) => ({ _tag: \"Unknown\" as const, partType: part._tag })),\n encode: SchemaGetter.transform((part) => ({ _tag: part.partType })),\n }),\n);\n\n/**\n * One ordered part of assistant output. A part tag this reader does not know decodes as\n * `Unknown`, keeping its place; a malformed part with a known tag is a decode failure.\n */\nexport const TranscriptAssistantPart = Schema.Union([\n KnownAssistantPart,\n UnrecognizedAssistantPart,\n]);\nexport type TranscriptAssistantPart = typeof TranscriptAssistantPart.Type;\n\nconst AssistantBodyFields = {\n source: Schema.Literals([\"inference\", \"import\"]),\n inferenceId: InferenceId,\n runId: RunId,\n turnId: TurnId,\n /** Run group of the producing run; absent for imports and for runs the log never started. */\n runGroupId: Schema.optionalKey(RunGroupRecordId),\n messageId: Schema.optionalKey(MessageId),\n lifecycle: TranscriptAssistantLifecycle,\n parts: Schema.Array(TranscriptAssistantPart),\n /** Present when the visible parts were preserved from an interrupted or failed inference. */\n partial: Schema.optionalKey(Schema.Struct({ reason: Schema.String })),\n ...LifecycleTimingFields,\n};\n\nconst CompactionBodyFields = {\n compactionId: CompactionId,\n /** Reference to the summary artifact; the transcript never copies summary text. */\n summaryId: SummaryId,\n contextVersion: ContextVersion,\n retainedFromContextSeq: SequenceNumber,\n createdAtMs: UnixEpochMillis,\n /** Set by the first `CompactionCompleted`; later completions add no token usage. */\n completedAtMs: Schema.optionalKey(UnixEpochMillis),\n};\n\n/** Lifecycle of one framework tool call. The last terminal event wins. */\nexport const TranscriptToolLifecycle = Schema.TaggedUnion({\n Created: {},\n Running: {},\n Completed: { result: TranscriptBody },\n Failed: { error: FailurePayload },\n /** The call was not executable; terminal from creation. */\n Rejected: {\n reason: ToolCallRejectionReason,\n message: Schema.String,\n modelFeedback: Schema.String,\n },\n});\nexport type TranscriptToolLifecycle = typeof TranscriptToolLifecycle.Type;\n\nconst ToolBodyFields = {\n toolCallId: ToolCallId,\n assistantId: InferenceAssistantRecordId,\n providerPartId: ProviderPartId,\n toolName: ToolName,\n providerExecuted: Schema.Boolean,\n /** Absent for a rejected call: a rejection records only the model-facing feedback. */\n params: Schema.optionalKey(TranscriptBody),\n lifecycle: TranscriptToolLifecycle,\n createdAtMs: UnixEpochMillis,\n ...LifecycleTimingFields,\n};\n\n/** Outcome of one run inside a run group. */\nexport const TranscriptRunOutcome = Schema.TaggedUnion({\n Running: {},\n Completed: {},\n Failed: { error: FailurePayload },\n /** Stopped by the user or by a runtime restart; a continuation may follow. */\n Interrupted: { reason: Schema.String },\n});\nexport type TranscriptRunOutcome = typeof TranscriptRunOutcome.Type;\n\n/** One run in a run group, in start order. */\nexport const TranscriptRunMember = Schema.Struct({\n runId: RunId,\n commandIds: Schema.Array(CommandId),\n modelSelection: ModelSelectionPayload,\n outcome: TranscriptRunOutcome,\n /** The interrupted run this one continues, as recorded by startup recovery. */\n continuationOf: Schema.optionalKey(RunId),\n ...LifecycleTimingFields,\n});\nexport type TranscriptRunMember = typeof TranscriptRunMember.Type;\n\nconst RunGroupBodyFields = {\n rootRunId: RunId,\n /** Every run of the chain in start order; the last member's outcome is the group's status. */\n runs: Schema.NonEmptyArray(TranscriptRunMember),\n};\n\nconst SessionContextBodyFields = {\n /** The run currently executing, if any. */\n activeRunId: Schema.optionalKey(RunId),\n /** The compaction currently in progress, if any. */\n activeCompactionId: Schema.optionalKey(CompactionId),\n /** Session execution policy: the first configured or started model, as the runtime reads it. */\n modelSelection: Schema.optionalKey(ModelSelectionPayload),\n /** Model of the most recently started run. */\n lastRunModelSelection: Schema.optionalKey(ModelSelectionPayload),\n tokenUsage: TokenConsumptionState,\n decorations: TranscriptDecorations,\n};\n\n/** One decoration operation parked until its target exists, in arrival order. */\nexport const TranscriptBufferedDecoration = Schema.Struct({\n seq: SequenceNumber,\n mapping: TranscriptDecorationKey,\n /** Operation index within the mapping. */\n operation: NonNegativeInt,\n value: Schema.Json,\n entryKey: Schema.optionalKey(TranscriptDecorationEntryKey),\n /** The entry's id, for a list keyed by id or ordinal (`entryKey` then holds the ordinal). */\n entryId: Schema.optionalKey(TranscriptDecorationEntryId),\n});\nexport type TranscriptBufferedDecoration = typeof TranscriptBufferedDecoration.Type;\n\n/**\n * Operations one decoration buffer keeps. Later operations for the same key are dropped, as are\n * operations beyond the mapping bounds' decoration byte budget.\n */\nexport const transcriptDecorationBufferLimit = 32;\n\nconst DecorationBufferBodyFields = {\n operations: Schema.Array(TranscriptBufferedDecoration).check(\n Schema.isMaxLength(transcriptDecorationBufferLimit),\n ),\n};\n\n// ---------------------------------------------------------------------------------------------\n// Records\n// ---------------------------------------------------------------------------------------------\n\nconst commonFields = <Kind extends string, Id extends Schema.Top>(kind: Kind, id: Id) => ({\n kind: Schema.tag(kind),\n id,\n /** The last event that contributed to this record. */\n updatedSeq: SequenceNumber,\n});\n\n/**\n * User submission, top-level once consumed; waiting states are dependencies.\n *\n * A position is assigned once, when the agent first reads the submission, so a consumed record\n * always has one and a waiting record never does. A cancelled record keeps the position it was\n * consumed at, if any, and is never rendered.\n */\nexport const TranscriptUserRecord = Schema.Struct({\n ...commonFields(\"user\", UserRecordId),\n position: Schema.optionalKey(TranscriptPosition),\n ...UserBodyFields,\n}).check(\n Schema.makeFilter(\n (user) =>\n (user.position === undefined) === (user.consumedAtMs === undefined) ||\n \"position and consumedAtMs are assigned together\",\n ),\n Schema.makeFilter(\n (user) => user.id === `user:${user.commandId}` || \"a user record id names its command\",\n ),\n Schema.makeFilter((user) => {\n switch (user.state._tag) {\n case \"Consumed\":\n return user.position !== undefined || \"a consumed user record has a position\";\n case \"Cancelled\":\n return true;\n default:\n return user.position === undefined || \"a waiting user record has no position\";\n }\n }),\n);\nexport type TranscriptUserRecord = typeof TranscriptUserRecord.Type;\n\n/** Assistant output of one inference or one import; top-level. */\nexport const TranscriptAssistantRecord = Schema.Struct({\n ...commonFields(\"assistant\", AssistantRecordId),\n position: TranscriptPosition,\n ...AssistantBodyFields,\n}).check(\n Schema.makeFilter(\n (assistant) =>\n (assistant.source === \"import\"\n ? assistant.id.startsWith(\"import:\")\n : assistant.id === `assistant:${assistant.inferenceId}`) ||\n \"an assistant record id matches its source and inference\",\n ),\n);\nexport type TranscriptAssistantRecord = typeof TranscriptAssistantRecord.Type;\n\n/** Compaction marker; top-level. */\nexport const TranscriptCompactionRecord = Schema.Struct({\n ...commonFields(\"compaction\", CompactionRecordId),\n position: TranscriptPosition,\n ...CompactionBodyFields,\n}).check(\n Schema.makeFilter(\n (compaction) =>\n compaction.id === `compaction:${compaction.compactionId}` ||\n \"a compaction record id names its compaction\",\n ),\n);\nexport type TranscriptCompactionRecord = typeof TranscriptCompactionRecord.Type;\n\n/** Framework tool call; a dependency of its assistant record. */\nexport const TranscriptToolRecord = Schema.Struct({\n ...commonFields(\"tool\", ToolRecordId),\n ...ToolBodyFields,\n}).check(\n Schema.makeFilter(\n (tool) => tool.id === `tool:${tool.toolCallId}` || \"a tool record id names its tool call\",\n ),\n);\nexport type TranscriptToolRecord = typeof TranscriptToolRecord.Type;\n\n/** Run and its recovery continuations; a dependency of the records it produced. */\nexport const TranscriptRunGroupRecord = Schema.Struct({\n ...commonFields(\"runGroup\", RunGroupRecordId),\n ...RunGroupBodyFields,\n}).check(\n Schema.makeFilter(\n (group) =>\n (group.id === `run:${group.rootRunId}` && group.runs[0].runId === group.rootRunId) ||\n \"a run group is named by, and starts with, its root run\",\n ),\n);\nexport type TranscriptRunGroupRecord = typeof TranscriptRunGroupRecord.Type;\n\n/** A run group's status: the outcome of its latest run. */\nexport const runGroupStatus = (group: TranscriptRunGroupRecord): TranscriptRunOutcome =>\n (group.runs[group.runs.length - 1] ?? group.runs[0]).outcome;\n\n/** Session activity, model selection and token totals; a singleton dependency. */\nexport const TranscriptSessionContextRecord = Schema.Struct({\n ...commonFields(\"sessionContext\", SessionContextRecordId),\n ...SessionContextBodyFields,\n});\nexport type TranscriptSessionContextRecord = typeof TranscriptSessionContextRecord.Type;\n\n/** Internal decoration holding record; stored, never served. */\nexport const TranscriptDecorationBufferRecord = Schema.Struct({\n ...commonFields(\"decorationBuffer\", DecorationBufferRecordId),\n ...DecorationBufferBodyFields,\n});\nexport type TranscriptDecorationBufferRecord = typeof TranscriptDecorationBufferRecord.Type;\n\n/** Every record kind this EDA release stores. */\nexport const TranscriptRecord = Schema.Union([\n TranscriptUserRecord,\n TranscriptAssistantRecord,\n TranscriptCompactionRecord,\n TranscriptToolRecord,\n TranscriptRunGroupRecord,\n TranscriptSessionContextRecord,\n TranscriptDecorationBufferRecord,\n]);\nexport type TranscriptRecord = typeof TranscriptRecord.Type;\nexport type TranscriptRecordKind = TranscriptRecord[\"kind\"];\n\n/**\n * A record this reader cannot interpret: a newer kind, or a body written by a newer EDA.\n *\n * It keeps the identity, position and revision so a client can hold its place and render a safe\n * placeholder. Storage readers do not produce it: an undecodable stored row makes a read\n * unavailable instead of wrong.\n */\nexport const TranscriptUnknownRecord = Schema.Struct({\n kind: Schema.tag(\"unknown\"),\n originalKind: Schema.NonEmptyString,\n /** The envelope format it arrived in, kept so it re-encodes exactly as it was read. */\n format: Schema.Int.check(Schema.isGreaterThanOrEqualTo(1)),\n /** The uninterpreted body, kept so a relaying reader forwards it unchanged. */\n body: Schema.Record(Schema.String, Schema.Unknown),\n id: Schema.NonEmptyString,\n updatedSeq: SequenceNumber,\n position: Schema.optionalKey(TranscriptPosition),\n});\nexport type TranscriptUnknownRecord = typeof TranscriptUnknownRecord.Type;\n\n/** What a wire reader sees for one record. */\nexport type TranscriptRecordView = TranscriptRecord | TranscriptUnknownRecord;\n\n/** A user record the agent has read: positioned history. */\nexport type ConsumedTranscriptUserRecord = TranscriptUserRecord & {\n readonly state: Extract<TranscriptUserState, { readonly _tag: \"Consumed\" }>;\n readonly position: TranscriptPosition;\n};\n\n/** A user record still waiting for the agent. */\nexport type PendingTranscriptUserRecord = TranscriptUserRecord & {\n readonly state: Extract<\n TranscriptUserState,\n { readonly _tag: \"Pending\" | \"Paused\" | \"Promoted\" | \"Steering\" }\n >;\n};\n\n/** A positioned record that counts toward a window's record limit. */\nexport type TranscriptTopLevelRecord =\n | ConsumedTranscriptUserRecord\n | TranscriptAssistantRecord\n | TranscriptCompactionRecord;\n\n/** Top-level kinds count toward a window's record limit and carry a position. */\nexport const isTopLevelTranscriptRecord = (\n record: TranscriptRecord,\n): record is TranscriptTopLevelRecord =>\n record.kind === \"assistant\" ||\n record.kind === \"compaction\" ||\n (record.kind === \"user\" && record.state._tag === \"Consumed\" && record.position !== undefined);\n\n/** A user record still waiting for the agent; served as a dependency, never twice. */\nexport const isPendingTranscriptUserRecord = (\n record: TranscriptRecord,\n): record is PendingTranscriptUserRecord =>\n record.kind === \"user\" &&\n (record.state._tag === \"Pending\" ||\n record.state._tag === \"Paused\" ||\n record.state._tag === \"Promoted\" ||\n record.state._tag === \"Steering\");\n\n// ---------------------------------------------------------------------------------------------\n// Stored envelope\n// ---------------------------------------------------------------------------------------------\n\n/**\n * Current stored-row envelope format. Readers accept every format up to this one.\n *\n * Bump it whenever a known kind gains a value an older reader of this format could not decode\n * (a new lifecycle or state tag, a new required field). Older readers then show such rows as\n * `unknown` records; without a bump, a strict older reader would reject the whole window.\n */\nexport const transcriptRecordEnvelopeFormat = 1;\n\n/**\n * Backward-readable row and wire shape for one record.\n *\n * Identity, kind, revision and position sit outside the kind-specific `body` so any reader can\n * place a record it cannot interpret.\n */\nexport const TranscriptRecordEnvelope = Schema.Struct({\n format: Schema.Int.check(Schema.isGreaterThanOrEqualTo(1)),\n kind: Schema.NonEmptyString,\n id: Schema.NonEmptyString,\n updatedSeq: SequenceNumber,\n position: Schema.optionalKey(TranscriptPosition),\n body: Schema.Record(Schema.String, Schema.Unknown),\n});\nexport type TranscriptRecordEnvelope = typeof TranscriptRecordEnvelope.Type;\n\nconst envelopeToFlat = (envelope: TranscriptRecordEnvelope): Record<string, unknown> => {\n const { kind, id, updatedSeq, position, body } = envelope;\n // Identity, revision and position come only from the envelope, never from the body.\n const { kind: _kind, id: _id, updatedSeq: _updatedSeq, position: _position, ...fields } = body;\n return {\n ...fields,\n kind,\n id,\n updatedSeq,\n ...(position === undefined ? {} : { position }),\n };\n};\n\nconst flatToEnvelope = (record: Record<string, unknown>): TranscriptRecordEnvelope => {\n const { kind, id, updatedSeq, position, ...body } = record;\n return Schema.decodeUnknownSync(TranscriptRecordEnvelope)({\n format: transcriptRecordEnvelopeFormat,\n kind,\n id,\n updatedSeq,\n ...(position === undefined ? {} : { position }),\n body,\n });\n};\n\nconst FlatRecordFields = Schema.Record(Schema.String, Schema.Unknown);\n\n/** A known record stored or sent as its envelope. Decoding fails for anything this reader cannot interpret. */\nexport const TranscriptRecordFromEnvelope = TranscriptRecordEnvelope.check(\n Schema.makeFilter(\n (envelope) =>\n envelope.format <= transcriptRecordEnvelopeFormat ||\n `unsupported transcript record envelope format ${envelope.format}`,\n ),\n).pipe(\n Schema.decodeTo(FlatRecordFields, {\n decode: SchemaGetter.transform(envelopeToFlat),\n encode: SchemaGetter.transform(flatToEnvelope),\n }),\n Schema.decodeTo(TranscriptRecord, SchemaTransformation.passthroughSupertype()),\n);\n\nconst knownRecordKinds: ReadonlySet<string> = new Set([\n \"user\",\n \"assistant\",\n \"compaction\",\n \"tool\",\n \"runGroup\",\n \"sessionContext\",\n \"decorationBuffer\",\n]);\n\n/**\n * Only a kind this reader does not know, or a newer envelope format, becomes `unknown`; a\n * malformed record of a known kind in a known format is a decode failure, never a placeholder.\n */\nconst TranscriptUnknownRecordFromEnvelope = TranscriptRecordEnvelope.check(\n Schema.makeFilter(\n (envelope) =>\n !knownRecordKinds.has(envelope.kind) ||\n envelope.format > transcriptRecordEnvelopeFormat ||\n `a ${envelope.kind} record in format ${envelope.format} must decode as that kind`,\n ),\n).pipe(\n Schema.decodeTo(TranscriptUnknownRecord, {\n decode: SchemaGetter.transform((envelope) => ({\n kind: \"unknown\" as const,\n originalKind: envelope.kind,\n format: envelope.format,\n body: envelope.body,\n id: envelope.id,\n updatedSeq: envelope.updatedSeq,\n ...(envelope.position === undefined ? {} : { position: envelope.position }),\n })),\n // Every field was validated on the unknown record itself, so this decode cannot fail.\n encode: SchemaGetter.transform((record) =>\n Schema.decodeUnknownSync(TranscriptRecordEnvelope)({\n format: record.format,\n kind: record.originalKind,\n id: record.id,\n updatedSeq: record.updatedSeq,\n ...(record.position === undefined ? {} : { position: record.position }),\n body: record.body,\n }),\n ),\n }),\n);\n\n/**\n * Wire codec for one record: a known record when this reader can interpret it, otherwise an\n * explicit unknown record that keeps its id and position.\n */\nexport const TranscriptRecordViewFromEnvelope = Schema.Union([\n TranscriptRecordFromEnvelope,\n TranscriptUnknownRecordFromEnvelope,\n]);\n"],"mappings":";;;;;;;;;;;;;;AAMA,MAAM,iBAAiB,IAAI,YAAY;CACrC;CAAY;CAAY;CAAY;CAAY;CAAY;CAAY;CAAY;CACpF;CAAY;CAAY;CAAY;CAAY;CAAY;CAAY;CAAY;CACpF;CAAY;CAAY;CAAY;CAAY;CAAY;CAAY;CAAY;CACpF;CAAY;CAAY;CAAY;CAAY;CAAY;CAAY;CAAY;CACpF;CAAY;CAAY;CAAY;CAAY;CAAY;CAAY;CAAY;CACpF;CAAY;CAAY;CAAY;CAAY;CAAY;CAAY;CAAY;CACpF;CAAY;CAAY;CAAY;CAAY;CAAY;CAAY;CAAY;CACpF;CAAY;CAAY;CAAY;CAAY;CAAY;CAAY;CAAY;AACtF,CAAC;AAED,MAAM,eAAe,OAAe,SACjC,UAAU,OAAS,SAAU,KAAK;AAGrC,MAAM,MAAM,OAAoB,UAA0B,MAAM,UAAU;;AAG1E,MAAa,aAAa,UAA0B;CACl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