effect-durable-agent 0.1.0-alpha.21 → 0.1.0-alpha.23

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.
Files changed (64) hide show
  1. package/README.md +2 -2
  2. package/dist/assert-never-CoyUpoRB.js +18 -0
  3. package/dist/assert-never-CoyUpoRB.js.map +1 -0
  4. package/dist/domain/command-queues.d.ts +1 -1
  5. package/dist/domain/message-transcript.d.ts +1 -1
  6. package/dist/domain/reduced-state.d.ts +1 -1
  7. package/dist/domain/reduced-state.js +927 -2
  8. package/dist/domain/reduced-state.js.map +1 -0
  9. package/dist/domain/run-scheduling.d.ts +1 -1
  10. package/dist/index.d.ts +1 -1
  11. package/dist/records-DWKEjuqb.js +675 -0
  12. package/dist/records-DWKEjuqb.js.map +1 -0
  13. package/dist/{reduced-state-BGd_yCBT.d.ts → reduced-state-B5WxKSM5.d.ts} +6 -6
  14. package/dist/{reducer-registry-BIhncOHH.d.ts → reducer-registry-CPObI3cs.d.ts} +2 -2
  15. package/dist/{run-scheduling-wakeup-BH2pHE0U.d.ts → run-scheduling-wakeup-B19JTeyq.d.ts} +2 -2
  16. package/dist/services/compaction.d.ts +1 -1
  17. package/dist/services/model-call.d.ts +1 -1
  18. package/dist/services/prompt-projector.d.ts +1 -1
  19. package/dist/services/reducer-registry.d.ts +1 -1
  20. package/dist/services/reducer-registry.js +1 -1
  21. package/dist/services/run-scheduler.d.ts +1 -1
  22. package/dist/services/run-scheduling-wakeup.d.ts +1 -1
  23. package/dist/services/runtime-layer.d.ts +6 -6
  24. package/dist/services/runtime-layer.js +3 -3
  25. package/dist/services/runtime.d.ts +1 -1
  26. package/dist/services/runtime.js +1 -1
  27. package/dist/services/session-query.d.ts +1 -1
  28. package/dist/services/session-query.js +2 -2
  29. package/dist/services/session-state.d.ts +1 -1
  30. package/dist/services/session-state.js +1 -1
  31. package/dist/services/session-store.d.ts +2 -2
  32. package/dist/services/session-store.js +1 -251
  33. package/dist/services/sink-checkpoint-store.d.ts +1 -1
  34. package/dist/services/sink-registry.d.ts +1 -1
  35. package/dist/services/sink-registry.js +1 -1
  36. package/dist/services/tool-registry.d.ts +1 -1
  37. package/dist/{session-state-C_1XxhvE.js → session-state-C6SyphC0.js} +5 -4
  38. package/dist/{session-state-C_1XxhvE.js.map → session-state-C6SyphC0.js.map} +1 -1
  39. package/dist/session-store-CWYZ29CV.d.ts +3302 -0
  40. package/dist/session-store-DuEhcqIC.js +414 -0
  41. package/dist/session-store-DuEhcqIC.js.map +1 -0
  42. package/dist/{sink-checkpoint-store-C-SY0cG2.d.ts → sink-checkpoint-store-B8Ky5nfW.d.ts} +2 -2
  43. package/dist/{sink-registry-CjK5MC90.js → sink-registry-DtrssBxF.js} +3 -3
  44. package/dist/{sink-registry-CjK5MC90.js.map → sink-registry-DtrssBxF.js.map} +1 -1
  45. package/dist/subscription-DelB8L87.d.ts +958 -0
  46. package/dist/subscription-g5W0Ggqx.js +498 -0
  47. package/dist/subscription-g5W0Ggqx.js.map +1 -0
  48. package/dist/testkit/layers.d.ts +9 -6
  49. package/dist/testkit/layers.js +4 -4
  50. package/dist/testkit/layers.js.map +1 -1
  51. package/dist/{tool-registry-wPsHagF_.d.ts → tool-registry-B_WE2ZwK.d.ts} +2 -2
  52. package/dist/transcript.d.ts +177 -0
  53. package/dist/transcript.js +106 -0
  54. package/dist/transcript.js.map +1 -0
  55. package/dist/websocket.d.ts +2209 -2
  56. package/dist/websocket.js +704 -18
  57. package/dist/websocket.js.map +1 -1
  58. package/dist/window-read-BDayZf7O.js +1564 -0
  59. package/dist/window-read-BDayZf7O.js.map +1 -0
  60. package/package.json +5 -1
  61. package/dist/reduced-state-Vuud6LCM.js +0 -942
  62. package/dist/reduced-state-Vuud6LCM.js.map +0 -1
  63. package/dist/services/session-store.js.map +0 -1
  64. package/dist/session-store-BpitF4Wg.d.ts +0 -191
package/README.md CHANGED
@@ -92,7 +92,7 @@ projection of state, and the LLM context is a separate pure projection of that s
92
92
  The UI can preserve tool progress, approvals, sandbox status, and rich product history while the
93
93
  LLM context selects and compacts only what the model should see. Applications can model each
94
94
  consumer honestly instead of collapsing both into one constrained representation. See the
95
- [UI projection guide](https://github.com/advait/effect-durable-agent/blob/master/docs/ui-projection.md) for the projection contract.
95
+ [transcript history proposal](https://github.com/advait/effect-durable-agent/blob/master/docs/transcript-history.md) for the planned user-visible projection.
96
96
 
97
97
  ### 7. Durable sinks: callbacks that survive failure
98
98
 
@@ -298,7 +298,7 @@ typed boundaries, structured concurrency, and first-class tracing.
298
298
  - [Testing strategy](https://github.com/advait/effect-durable-agent/blob/master/docs/testing.md)
299
299
  - [WebSocket live-event protocol](https://github.com/advait/effect-durable-agent/blob/master/docs/websocket-protocol.md)
300
300
  - [Message steering](https://github.com/advait/effect-durable-agent/blob/master/docs/message-steering.md)
301
- - [UI projection proposal](https://github.com/advait/effect-durable-agent/blob/master/docs/ui-projection.md)
301
+ - [Transcript history proposal](https://github.com/advait/effect-durable-agent/blob/master/docs/transcript-history.md)
302
302
  - [Subagents proposal](https://github.com/advait/effect-durable-agent/blob/master/docs/subagents.md)
303
303
  - [Maintainer release guide](https://github.com/advait/effect-durable-agent/blob/master/docs/releasing.md)
304
304
 
@@ -0,0 +1,18 @@
1
+ //#region src/domain/assert-never.ts
2
+ const formatNeverValue = (value) => {
3
+ try {
4
+ return JSON.stringify(value);
5
+ } catch {
6
+ return String(value);
7
+ }
8
+ };
9
+ /** Build the defect used when an exhaustive switch receives an impossible value. */
10
+ const assertNeverError = (value, context) => /* @__PURE__ */ new Error(`Unhandled ${context}: ${formatNeverValue(value)}`);
11
+ /** Throw for impossible branches in pure code after TypeScript exhaustiveness checking. */
12
+ const assertNever = (value, context) => {
13
+ throw assertNeverError(value, context);
14
+ };
15
+ //#endregion
16
+ export { assertNeverError as n, assertNever as t };
17
+
18
+ //# sourceMappingURL=assert-never-CoyUpoRB.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assert-never-CoyUpoRB.js","names":[],"sources":["../src/domain/assert-never.ts"],"sourcesContent":["const formatNeverValue = (value: never): string => {\n try {\n return JSON.stringify(value);\n } catch {\n return String(value);\n }\n};\n\n/** Build the defect used when an exhaustive switch receives an impossible value. */\nexport const assertNeverError = (value: never, context: string) =>\n new Error(`Unhandled ${context}: ${formatNeverValue(value)}`);\n\n/** Throw for impossible branches in pure code after TypeScript exhaustiveness checking. */\nexport const assertNever = (value: never, context: string): never => {\n throw assertNeverError(value, context);\n};\n"],"mappings":";AAAA,MAAM,oBAAoB,UAAyB;CACjD,IAAI;EACF,OAAO,KAAK,UAAU,KAAK;CAC7B,QAAQ;EACN,OAAO,OAAO,KAAK;CACrB;AACF;;AAGA,MAAa,oBAAoB,OAAc,4BAC7C,IAAI,MAAM,aAAa,QAAQ,IAAI,iBAAiB,KAAK,GAAG;;AAG9D,MAAa,eAAe,OAAc,YAA2B;CACnE,MAAM,iBAAiB,OAAO,OAAO;AACvC"}
@@ -1,6 +1,6 @@
1
1
  import { d as UserMessageContent } from "../commands-3OD-p8dD.js";
2
2
  import { b as TurnId, h as SequenceNumber, p as RunId, u as MessageId } from "../core-BcimKMIv.js";
3
- import { C as RunRecord, f as MessageRecord, p as PendingCommand, r as CommandRecord, t as ActiveCommandEvidence } from "../reduced-state-BGd_yCBT.js";
3
+ import { C as RunRecord, f as MessageRecord, p as PendingCommand, r as CommandRecord, t as ActiveCommandEvidence } from "../reduced-state-B5WxKSM5.js";
4
4
  //#region src/domain/command-queues.d.ts
5
5
  /**
6
6
  * A steering message admitted for an active run but not necessarily consumed
@@ -1,2 +1,2 @@
1
- import { at as contextProjectionPromptWithUserContents, ct as durableTranscriptPromptWithUserContent, it as contextProjectionPromptWithUserContent, lt as projectionStateThrough, nt as DurableTranscriptMessage, ot as durableMessageTranscript, rt as contextProjectionPrompt, st as durableTranscriptPrompt } from "../reduced-state-BGd_yCBT.js";
1
+ import { at as contextProjectionPromptWithUserContents, ct as durableTranscriptPromptWithUserContent, it as contextProjectionPromptWithUserContent, lt as projectionStateThrough, nt as DurableTranscriptMessage, ot as durableMessageTranscript, rt as contextProjectionPrompt, st as durableTranscriptPrompt } from "../reduced-state-B5WxKSM5.js";
2
2
  export { DurableTranscriptMessage, contextProjectionPrompt, contextProjectionPromptWithUserContent, contextProjectionPromptWithUserContents, durableMessageTranscript, durableTranscriptPrompt, durableTranscriptPromptWithUserContent, projectionStateThrough };
@@ -1,3 +1,3 @@
1
- import { A as TurnTerminal, B as pendingCommands, C as RunRecord, D as ToolDecision, E as ToolCallRecord, F as encodeReducedStateCheckpoint, H as reduceCommittedEvents, I as foldReducedState, L as frameworkReducedStateReducerName, M as activeTurnIdentityForCommand, N as classifyRecoverableWork, O as ToolTerminal, P as decodeReducedStateCheckpoint, R as frameworkReducedStateReducerSchemaVersion, S as ReducedStateCheckpointToolTerminal, T as StopRequestRecord, U as reducedStateCheckpointEventSeqs, V as pendingStopCommand, _ as ReducedStateCheckpointCommandRecord, a as CompactionRecord, b as ReducedStateCheckpointToolCallRecord, c as InferenceRecord, d as LifecycleTiming, f as MessageRecord, g as ReducedState, h as RecoveryContinuationRecord, i as CommandTerminal, j as activeCommand, k as TurnRecord, l as InferenceTerminal, m as RecoverableWork, n as ActiveTurnIdentity, o as CompactionTerminal, p as PendingCommand, r as CommandRecord, s as ContextRecord, t as ActiveCommandEvidence, u as LifecycleFailure, v as ReducedStateCheckpointMessageRecord, w as RunTerminal, x as ReducedStateCheckpointToolDecision, y as ReducedStateCheckpointPayload, z as initialReducedState } from "../reduced-state-BGd_yCBT.js";
1
+ import { A as TurnTerminal, B as pendingCommands, C as RunRecord, D as ToolDecision, E as ToolCallRecord, F as encodeReducedStateCheckpoint, H as reduceCommittedEvents, I as foldReducedState, L as frameworkReducedStateReducerName, M as activeTurnIdentityForCommand, N as classifyRecoverableWork, O as ToolTerminal, P as decodeReducedStateCheckpoint, R as frameworkReducedStateReducerSchemaVersion, S as ReducedStateCheckpointToolTerminal, T as StopRequestRecord, U as reducedStateCheckpointEventSeqs, V as pendingStopCommand, _ as ReducedStateCheckpointCommandRecord, a as CompactionRecord, b as ReducedStateCheckpointToolCallRecord, c as InferenceRecord, d as LifecycleTiming, f as MessageRecord, g as ReducedState, h as RecoveryContinuationRecord, i as CommandTerminal, j as activeCommand, k as TurnRecord, l as InferenceTerminal, m as RecoverableWork, n as ActiveTurnIdentity, o as CompactionTerminal, p as PendingCommand, r as CommandRecord, s as ContextRecord, t as ActiveCommandEvidence, u as LifecycleFailure, v as ReducedStateCheckpointMessageRecord, w as RunTerminal, x as ReducedStateCheckpointToolDecision, y as ReducedStateCheckpointPayload, z as initialReducedState } from "../reduced-state-B5WxKSM5.js";
2
2
  import { n as TokenConsumptionState, r as TokenUsageTotals } from "../model-usage-0GeHwaaU.js";
3
3
  export { ActiveCommandEvidence, ActiveTurnIdentity, CommandRecord, CommandTerminal, CompactionRecord, CompactionTerminal, ContextRecord, InferenceRecord, InferenceTerminal, LifecycleFailure, LifecycleTiming, MessageRecord, PendingCommand, RecoverableWork, RecoveryContinuationRecord, ReducedState, ReducedStateCheckpointCommandRecord, ReducedStateCheckpointMessageRecord, ReducedStateCheckpointPayload, ReducedStateCheckpointToolCallRecord, ReducedStateCheckpointToolDecision, ReducedStateCheckpointToolTerminal, RunRecord, RunTerminal, StopRequestRecord, TokenConsumptionState, type TokenUsageTotals, ToolCallRecord, ToolDecision, ToolTerminal, TurnRecord, TurnTerminal, activeCommand, activeTurnIdentityForCommand, classifyRecoverableWork, decodeReducedStateCheckpoint, encodeReducedStateCheckpoint, foldReducedState, frameworkReducedStateReducerName, frameworkReducedStateReducerSchemaVersion, initialReducedState, pendingCommands, pendingStopCommand, reduceCommittedEvents, reducedStateCheckpointEventSeqs };