stitchkit 0.85.2 → 0.87.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.
Files changed (118) hide show
  1. package/CHANGELOG.md +243 -0
  2. package/README.md +3 -0
  3. package/dist/agent-runtime/agent-tool.d.ts +25 -0
  4. package/dist/agent-runtime/agent-tool.d.ts.map +1 -0
  5. package/dist/agent-runtime/child-tools.d.ts +69 -0
  6. package/dist/agent-runtime/child-tools.d.ts.map +1 -0
  7. package/dist/agent-runtime/children.d.ts +113 -0
  8. package/dist/agent-runtime/children.d.ts.map +1 -0
  9. package/dist/agent-runtime/coding-tool-contract.d.ts +29 -0
  10. package/dist/agent-runtime/coding-tool-contract.d.ts.map +1 -1
  11. package/dist/agent-runtime/coding-tool-refusals.d.ts +2 -0
  12. package/dist/agent-runtime/coding-tool-refusals.d.ts.map +1 -1
  13. package/dist/agent-runtime/coding-tool-shell.d.ts.map +1 -1
  14. package/dist/agent-runtime/coding-tools.d.ts +1 -0
  15. package/dist/agent-runtime/coding-tools.d.ts.map +1 -1
  16. package/dist/agent-runtime/control-schema.d.ts +17 -0
  17. package/dist/agent-runtime/control-schema.d.ts.map +1 -1
  18. package/dist/agent-runtime/conversations.d.ts +11 -0
  19. package/dist/agent-runtime/conversations.d.ts.map +1 -1
  20. package/dist/agent-runtime/event-schema.d.ts +34 -0
  21. package/dist/agent-runtime/event-schema.d.ts.map +1 -1
  22. package/dist/agent-runtime/event-search-tools.d.ts +53 -0
  23. package/dist/agent-runtime/event-search-tools.d.ts.map +1 -0
  24. package/dist/agent-runtime/event-search.d.ts +23 -0
  25. package/dist/agent-runtime/event-search.d.ts.map +1 -0
  26. package/dist/agent-runtime/fault-bench.d.ts +45 -0
  27. package/dist/agent-runtime/fault-bench.d.ts.map +1 -0
  28. package/dist/agent-runtime/observability.d.ts +6 -0
  29. package/dist/agent-runtime/observability.d.ts.map +1 -1
  30. package/dist/agent-runtime/projections.d.ts +69 -0
  31. package/dist/agent-runtime/projections.d.ts.map +1 -0
  32. package/dist/agent-runtime/provider-failure.d.ts +5 -1
  33. package/dist/agent-runtime/provider-failure.d.ts.map +1 -1
  34. package/dist/agent-runtime/provider-origin.d.ts +12 -0
  35. package/dist/agent-runtime/provider-origin.d.ts.map +1 -0
  36. package/dist/agent-runtime/retry-policy.d.ts +27 -0
  37. package/dist/agent-runtime/retry-policy.d.ts.map +1 -0
  38. package/dist/agent-runtime/run-execution.d.ts +0 -9
  39. package/dist/agent-runtime/run-execution.d.ts.map +1 -1
  40. package/dist/agent-runtime/run-operation-lifecycle.d.ts.map +1 -1
  41. package/dist/agent-runtime/runtime.d.ts +15 -0
  42. package/dist/agent-runtime/runtime.d.ts.map +1 -1
  43. package/dist/agent-runtime/sandbox.d.ts +66 -0
  44. package/dist/agent-runtime/sandbox.d.ts.map +1 -0
  45. package/dist/agent-runtime/schedule-tools.d.ts +35 -0
  46. package/dist/agent-runtime/schedule-tools.d.ts.map +1 -0
  47. package/dist/agent-runtime/schedules.d.ts +63 -0
  48. package/dist/agent-runtime/schedules.d.ts.map +1 -0
  49. package/dist/agent-runtime/schemas.d.ts +9 -0
  50. package/dist/agent-runtime/schemas.d.ts.map +1 -1
  51. package/dist/agent-runtime/spill.d.ts +24 -0
  52. package/dist/agent-runtime/spill.d.ts.map +1 -0
  53. package/dist/agent-runtime/sqlite-purge.d.ts.map +1 -1
  54. package/dist/agent-runtime/sqlite.d.ts +26 -0
  55. package/dist/agent-runtime/sqlite.d.ts.map +1 -1
  56. package/dist/agent-runtime/state-slots.d.ts +48 -0
  57. package/dist/agent-runtime/state-slots.d.ts.map +1 -0
  58. package/dist/agent-runtime/state-tools.d.ts +58 -0
  59. package/dist/agent-runtime/state-tools.d.ts.map +1 -0
  60. package/dist/agent-runtime/store-driver.d.ts +13 -0
  61. package/dist/agent-runtime/store-driver.d.ts.map +1 -1
  62. package/dist/agent-runtime/store-events.d.ts +829 -0
  63. package/dist/agent-runtime/store-events.d.ts.map +1 -0
  64. package/dist/agent-runtime/store-migrations/v1-to-v2.d.ts +6 -0
  65. package/dist/agent-runtime/store-migrations/v1-to-v2.d.ts.map +1 -0
  66. package/dist/agent-runtime/store.d.ts +45 -0
  67. package/dist/agent-runtime/store.d.ts.map +1 -1
  68. package/dist/agent-runtime/terminal-commit.d.ts +1 -1
  69. package/dist/agent-runtime-browser.js +5 -3
  70. package/dist/agent-runtime-coding-tools.js +144 -15
  71. package/dist/agent-runtime-harness.js +12 -11
  72. package/dist/agent-runtime-sqlite-bun.d.ts +1 -1
  73. package/dist/agent-runtime-sqlite-bun.d.ts.map +1 -1
  74. package/dist/agent-runtime-sqlite-bun.js +5 -4
  75. package/dist/agent-runtime-sqlite-node.d.ts +1 -1
  76. package/dist/agent-runtime-sqlite-node.d.ts.map +1 -1
  77. package/dist/agent-runtime-sqlite-node.js +5 -4
  78. package/dist/agent-runtime-testing.d.ts +3 -0
  79. package/dist/agent-runtime-testing.d.ts.map +1 -0
  80. package/dist/agent-runtime-testing.js +156 -0
  81. package/dist/agent-runtime.d.ts +16 -2
  82. package/dist/agent-runtime.d.ts.map +1 -1
  83. package/dist/agent-runtime.js +1632 -156
  84. package/dist/application.js +14 -14
  85. package/dist/cli.js +6 -6
  86. package/dist/{index-fwbkp2jn.js → index-0vfdh685.js} +2 -2
  87. package/dist/{index-5z8tezpx.js → index-0ydchz76.js} +3 -3
  88. package/dist/{index-3ds42w1w.js → index-1szetq6f.js} +33 -4
  89. package/dist/{index-2jg7b11j.js → index-35aefxby.js} +879 -424
  90. package/dist/index-3yrqvza8.js +964 -0
  91. package/dist/{index-fq492hg0.js → index-5wezxcxx.js} +238 -161
  92. package/dist/index-9553432s.js +26 -0
  93. package/dist/{index-27487ay5.js → index-9hw9eq48.js} +4 -4
  94. package/dist/index-cnyk6te3.js +77 -0
  95. package/dist/index-gskm1k5a.js +50 -0
  96. package/dist/{index-4hk633vz.js → index-hkm6wysp.js} +9 -2
  97. package/dist/{index-dx9xehwt.js → index-kc6h6hg0.js} +1 -1
  98. package/dist/{index-x15ss2dx.js → index-p1b1y93x.js} +3 -0
  99. package/dist/{index-mgtxfe6b.js → index-r159gjwy.js} +8 -1
  100. package/dist/{index-s4ckmrac.js → index-rcgsnrr6.js} +3 -3
  101. package/dist/{index-dggwnnjv.js → index-wn9cb82y.js} +1 -1
  102. package/dist/index-z1m86vc8.js +334 -0
  103. package/dist/{index-ff0kcqvp.js → index-z2452tsw.js} +3 -3
  104. package/dist/internal/sqlite.d.ts +13 -0
  105. package/dist/internal/sqlite.d.ts.map +1 -1
  106. package/dist/testing/agent-store-conformance.d.ts.map +1 -1
  107. package/dist/testing.js +89 -80
  108. package/dist/tool-invoker.js +4 -4
  109. package/dist/tools/internal/surface-projector.d.ts.map +1 -1
  110. package/dist/tools/manifest.d.ts +16 -0
  111. package/dist/tools/manifest.d.ts.map +1 -1
  112. package/dist/tools.d.ts +1 -1
  113. package/dist/tools.d.ts.map +1 -1
  114. package/dist/tools.js +10 -8
  115. package/llms-full.txt +373 -16
  116. package/package.json +6 -1
  117. package/dist/index-66nxrgy0.js +0 -554
  118. package/dist/index-y2s6h5bf.js +0 -83
@@ -0,0 +1,156 @@
1
+ import {
2
+ createAgentRaceBarrier,
3
+ createAgentRaceDriver,
4
+ createAgentRaceTrace
5
+ } from "./index-cnyk6te3.js";
6
+
7
+ // src/agent-runtime/fault-bench.ts
8
+ import { createServer } from "node:http";
9
+ import { z } from "zod";
10
+ var AgentFaultStepSchema = z.discriminatedUnion("kind", [
11
+ z.object({ kind: z.literal("pass"), text: z.string().default("ok") }).strict(),
12
+ z.object({ kind: z.literal("connection-refused") }).strict(),
13
+ z.object({ kind: z.literal("timeout-before-first-byte"), milliseconds: z.int().positive() }).strict(),
14
+ z.object({ kind: z.literal("stream-cut"), afterBytes: z.int().nonnegative() }).strict(),
15
+ z.object({ kind: z.literal("http-error"), status: z.int().min(400).max(599) }).strict(),
16
+ z.object({ kind: z.literal("bad-json") }).strict(),
17
+ z.object({
18
+ kind: z.literal("slow"),
19
+ text: z.string(),
20
+ tokensPerSecond: z.number().positive()
21
+ }).strict(),
22
+ z.object({ kind: z.literal("usage-missing"), text: z.string().default("ok") }).strict()
23
+ ]);
24
+ function defineAgentFaultPlan(steps) {
25
+ if (steps.length === 0)
26
+ throw new TypeError("Fault plan must contain at least one step");
27
+ return steps.map((step) => AgentFaultStepSchema.parse(step));
28
+ }
29
+ function completionChunk(text, finishReason) {
30
+ return `data: ${JSON.stringify({
31
+ id: "fault-bench",
32
+ object: "chat.completion.chunk",
33
+ choices: [{ index: 0, delta: text ? { content: text } : {}, finish_reason: finishReason }]
34
+ })}
35
+
36
+ `;
37
+ }
38
+ function completeSse(response, text, includeUsage) {
39
+ response.writeHead(200, {
40
+ "content-type": "text/event-stream",
41
+ "cache-control": "no-cache",
42
+ connection: "close"
43
+ });
44
+ response.write(completionChunk(text, null));
45
+ response.write(completionChunk("", "stop"));
46
+ if (includeUsage) {
47
+ response.write(`data: ${JSON.stringify({
48
+ id: "fault-bench",
49
+ object: "chat.completion.chunk",
50
+ choices: [],
51
+ usage: { prompt_tokens: 1, completion_tokens: 1, total_tokens: 2 }
52
+ })}
53
+
54
+ `);
55
+ }
56
+ response.end(`data: [DONE]
57
+
58
+ `);
59
+ }
60
+ async function createFaultProviderServer(input) {
61
+ const scenario = defineAgentFaultPlan(input.scenario);
62
+ let calls = 0;
63
+ const server = createServer((request, response) => {
64
+ request.resume();
65
+ const step = scenario[Math.min(calls, scenario.length - 1)];
66
+ calls += 1;
67
+ if (!step)
68
+ throw new Error("Fault scenario disappeared");
69
+ if (step.kind === "connection-refused") {
70
+ request.socket.destroy();
71
+ return;
72
+ }
73
+ if (step.kind === "timeout-before-first-byte") {
74
+ setTimeout(() => completeSse(response, "late", true), step.milliseconds).unref();
75
+ return;
76
+ }
77
+ if (step.kind === "http-error") {
78
+ response.writeHead(step.status, { "content-type": "application/json" });
79
+ response.end(JSON.stringify({ error: { message: `fault ${step.status}` } }));
80
+ return;
81
+ }
82
+ if (step.kind === "bad-json") {
83
+ response.writeHead(200, { "content-type": "text/event-stream" });
84
+ response.end(`data: {not-json}
85
+
86
+ data: [DONE]
87
+
88
+ `);
89
+ return;
90
+ }
91
+ if (step.kind === "stream-cut") {
92
+ response.writeHead(200, { "content-type": "text/event-stream" });
93
+ const bytes = Buffer.from(completionChunk("partial response", null));
94
+ response.write(bytes.subarray(0, Math.min(step.afterBytes, bytes.byteLength)));
95
+ response.socket?.destroy();
96
+ return;
97
+ }
98
+ if (step.kind === "slow") {
99
+ response.writeHead(200, { "content-type": "text/event-stream" });
100
+ const tokens = step.text.split(/(?<=\s)/u).filter(Boolean);
101
+ const intervalMs = Math.max(1, Math.round(1000 / step.tokensPerSecond));
102
+ let index = 0;
103
+ const timer = setInterval(() => {
104
+ const token = tokens[index];
105
+ index += 1;
106
+ if (token !== undefined)
107
+ response.write(completionChunk(token, null));
108
+ if (index >= tokens.length) {
109
+ clearInterval(timer);
110
+ response.end(`${completionChunk("", "stop")}data: [DONE]
111
+
112
+ `);
113
+ }
114
+ }, intervalMs);
115
+ timer.unref();
116
+ return;
117
+ }
118
+ completeSse(response, step.text, step.kind !== "usage-missing");
119
+ });
120
+ await new Promise((resolve, reject) => {
121
+ server.once("error", reject);
122
+ server.listen(0, "127.0.0.1", () => resolve());
123
+ });
124
+ const address = server.address();
125
+ if (!address || typeof address === "string")
126
+ throw new Error("Fault server has no TCP address");
127
+ return {
128
+ url: `http://127.0.0.1:${address.port}/v1/chat/completions`,
129
+ calls: () => calls,
130
+ close: () => new Promise((resolve, reject) => server.close((error) => error ? reject(error) : resolve()))
131
+ };
132
+ }
133
+ function createReplayAgentProvider(input) {
134
+ const calls = new Map;
135
+ return {
136
+ create(modelId) {
137
+ const index = calls.get(modelId) ?? 0;
138
+ const attempts = input.attempts[modelId];
139
+ const model = attempts?.[index];
140
+ if (!model)
141
+ throw new TypeError(`Replay exhausted for model: ${modelId}`);
142
+ calls.set(modelId, index + 1);
143
+ return model;
144
+ },
145
+ calls: (modelId) => calls.get(modelId) ?? 0
146
+ };
147
+ }
148
+ export {
149
+ defineAgentFaultPlan,
150
+ createReplayAgentProvider,
151
+ createFaultProviderServer,
152
+ createAgentRaceTrace,
153
+ createAgentRaceDriver,
154
+ createAgentRaceBarrier,
155
+ AgentFaultStepSchema
156
+ };
@@ -1,22 +1,36 @@
1
+ export type { AgentToolDefinition } from './agent-runtime/agent-tool.js';
2
+ export { createAgentChildTools } from './agent-runtime/child-tools.js';
3
+ export { type AgentChildBudget, AgentChildBudgetSchema, type AgentChildHandle, type AgentChildManager, type AgentChildRecord, AgentChildRecordSchema, type AgentChildState, AgentChildStateSchema, agentChildBudgetStopPolicy, createSqliteAgentChildManager, } from './agent-runtime/children.js';
1
4
  export { type AgentCompactionContext, type AgentCompactionResult, type CompactableHistory, type SelectCompactableHistoryOptions, type StructuredCompactionConfig, selectCompactableHistory, structuredCompaction, } from './agent-runtime/compaction.js';
2
5
  export { AgentContextOverflowError } from './agent-runtime/context-refusal.js';
3
6
  export { type AgentConversationMessagePage, AgentConversationMessagePageSchema, type AgentConversationPage, AgentConversationPageSchema, type AgentConversationReader, type AgentConversationSummary, AgentConversationSummarySchema, } from './agent-runtime/conversations.js';
4
7
  export { type AgentCoordinatedRun, type AgentInputPolicy, type AgentRunTicket, type AgentSessionCloseOptions, type AgentSessionCloseResult, type AgentSessionCoordinator, type AgentStopReason, createAgentSessionCoordinator, } from './agent-runtime/coordinator.js';
5
8
  export { createDeferredAgentToolSurface, type DeferredAgentRuntimeToolDefinition, type DeferredAgentToolCommonConfig, type DeferredAgentToolController, type DeferredAgentToolEvent, type DeferredAgentToolManifestEntry, DeferredAgentToolMatchSchema, type DeferredAgentToolMountConfig, type DeferredAgentToolReceipt, DeferredAgentToolReceiptSchema, type DeferredAgentToolSearchContext, DeferredAgentToolSearchInputSchema, type DeferredAgentToolSurfaceConfig, type DeferredAgentToolSurfaceDefinition, } from './agent-runtime/deferred-tools.js';
6
- export { AgentAdmissionEventSchema, AgentCheckpointEventSchema, AgentReasoningDeltaEventSchema, AgentReasoningEndEventSchema, AgentReasoningStartEventSchema, AgentRunOperationEventSchema, AgentRunStateEventSchema, type AgentRuntimeCursorAdvance, type AgentRuntimeEvent, type AgentRuntimeEventCursor, AgentRuntimeEventCursorSchema, AgentRuntimeEventSchema, type AgentRuntimeEventSink, type AgentRuntimeEventSinkConfig, type AgentRuntimePublisher, AgentTerminalEventSchema, AgentToolStatusEventSchema, AgentTransientDeltaEventSchema, advanceAgentRuntimeEventCursor, agentDurableEventId, createAgentRuntimeEventSink, } from './agent-runtime/events.js';
9
+ export { type AgentEventSearchResult, AgentEventSearchResultSchema, createSqliteAgentEventSearch, } from './agent-runtime/event-search.js';
10
+ export { createAgentEventSearchTools } from './agent-runtime/event-search-tools.js';
11
+ export { AgentAdmissionEventSchema, AgentAttemptResetEventSchema, AgentCheckpointEventSchema, AgentReasoningDeltaEventSchema, AgentReasoningEndEventSchema, AgentReasoningStartEventSchema, AgentRunOperationEventSchema, AgentRunStateEventSchema, type AgentRuntimeCursorAdvance, type AgentRuntimeEvent, type AgentRuntimeEventCursor, AgentRuntimeEventCursorSchema, AgentRuntimeEventSchema, type AgentRuntimeEventSink, type AgentRuntimeEventSinkConfig, type AgentRuntimePublisher, AgentTerminalEventSchema, AgentToolStatusEventSchema, AgentTransientDeltaEventSchema, advanceAgentRuntimeEventCursor, agentDurableEventId, createAgentRuntimeEventSink, } from './agent-runtime/events.js';
7
12
  export { type AgentHistoryProjectionDecision, type AgentHistoryProjectionOptions, type AgentHistoryProjectionResult, projectAgentHistory, projectAgentHistoryDetailed, } from './agent-runtime/history.js';
8
13
  export { type AgentToolFenceConfig, type AgentToolFenceContext, createAgentToolFenceLifecycle, } from './agent-runtime/managed-tools.js';
9
14
  export { type AgentLanguageModelProvider, type AgentModelCapability, AgentModelCapabilitySchema, type AgentModelCatalog, type AgentModelCatalogEntry, AgentModelCatalogEntrySchema, type AgentModelCatalogProvider, AgentModelCatalogSchema, type AgentModelDescriptor, AgentModelDescriptorSchema, type AgentModelMetric, AgentModelMetricSchema, type AgentModelPopularity, AgentModelPopularitySchema, type AgentModelPrice, AgentModelPriceSchema, type AgentModelRegistry, type AgentModelRegistryConfig, type AgentModelRegistrySnapshot, AgentModelRegistrySnapshotSchema, type AgentModelSearchInput, AgentModelSearchInputSchema, type AgentModelSearchResult, AgentModelSearchResultSchema, type AgentModelSelection, AgentModelSelectionSchema, type AgentModelSelectionStore, type AgentModelSnapshotPolicy, type AgentResolvedModel, createMemoryAgentModelSelectionStore, defineModelRegistry, searchAgentModelCatalog, validateAgentModelSnapshot, } from './agent-runtime/models.js';
10
15
  export { type AgentObservability, type AgentRunEvent, AgentRunEventSchema, type AgentRunSinkConfig, type AgentRunSinkDrop, type AgentRunSinkError, type AgentRunStartedEvent, AgentRunStartedEventSchema, type AgentRunTerminalEvent, AgentRunTerminalEventSchema, type AgentStepFinishedEvent, AgentStepFinishedEventSchema, createAgentObservability, } from './agent-runtime/observability.js';
16
+ export { type AgentProjectionDefinition, type AgentProjectionValue, agentConversationCardProjection, agentOutlineProjection, agentScheduleSummaryProjection, agentStateSlotsProjection, agentSummaryProjection, agentUsageProjection, createAgentProjectionRegistry, createSqliteAgentProjectionStore, defineAgentProjection, } from './agent-runtime/projections.js';
11
17
  export { type AgentHistoryBudgetDecision, type AgentHistoryBudgetResult, type AgentPromptBudget, type AgentPromptSection, type AgentPromptSectionContext, type AgentTokenCount, AgentTokenCountSchema, type ComposeAgentPromptOptions, type ComposedAgentPrompt, composeAgentPrompt, type SelectAgentHistoryOptions, selectAgentHistory, } from './agent-runtime/prompt.js';
12
18
  export { type AgentProtocol, type AgentProtocolConfig, type AgentTerminalAcceptance, type AgentTerminalAcceptanceInput, defineAgentProtocol, hasAgentTerminalOutput, } from './agent-runtime/protocol.js';
13
- export { type AgentProviderFailure, type AgentProviderFailureReason, classifyProviderFailure, isToolResultFailure, } from './agent-runtime/provider-failure.js';
19
+ export { type AgentProviderFailure, type AgentProviderFailureReason, AgentProviderStreamCutError, classifyProviderFailure, isToolResultFailure, } from './agent-runtime/provider-failure.js';
14
20
  export { AgentConversationPurgedError, type AgentConversationPurgeInput, AgentConversationPurgeInputSchema, type AgentConversationPurgeResult, AgentConversationPurgeResultSchema, purgeAgentConversation, } from './agent-runtime/purge.js';
21
+ export { type AgentRetryPolicy, recordAgentRetryDecision } from './agent-runtime/retry-policy.js';
15
22
  export { type AgentContextUsage, type AgentRuntime, type AgentRuntimeAdmission, type AgentRuntimeConfig, type AgentRuntimeInput, type AgentRuntimeInterruptInput, type AgentRuntimePrepareStep, type AgentRuntimeProtocolInput, type AgentRuntimeRecordIds, type AgentRuntimeRecoverOptions, type AgentRuntimeRecoveryDecision, type AgentRuntimeRecoveryInput, type AgentRuntimeRecoveryOutcome, type AgentRuntimeRunContext, type AgentRuntimeStopPolicy, createAgentRuntime, } from './agent-runtime/runtime.js';
16
23
  export type { AgentRuntimeResult } from './agent-runtime/runtime-result.js';
24
+ export { type AgentProcessSandbox, type AgentSandboxGrade, AgentSandboxGradeSchema, type AgentSandboxRestriction, AgentSandboxRestrictionSchema, missingSandboxRestrictions, probeAgentProcessSandbox, recordAgentSandboxProbe, } from './agent-runtime/sandbox.js';
25
+ export { createAgentScheduleTools } from './agent-runtime/schedule-tools.js';
26
+ export { type AgentSchedule, AgentScheduleSchema, type AgentScheduleService, createAgentScheduleService, } from './agent-runtime/schedules.js';
17
27
  export * from './agent-runtime/schemas.js';
28
+ export { createSqliteAgentSpillStore } from './agent-runtime/spill.js';
29
+ export { type AgentStateSlotDefinition, type AgentStateSlotStore, type AgentStateSlotValue, type AnyAgentStateSlot, agentGoalStateSlot, agentTodoStateSlot, createAgentStateSlotStore, defineStateSlot, renderAgentStateSlots, } from './agent-runtime/state-slots.js';
30
+ export { createAgentStateTools } from './agent-runtime/state-tools.js';
18
31
  export { type AcceptInputAndAssignRun, AcceptInputAndAssignRunSchema, type AcquireAgentRun, AcquireAgentRunSchema, type AgentRecoverableDescriptor, AgentRecoverableDescriptorSchema, type AgentRecoverablePage, AgentRecoverablePageSchema, type AgentRuntimeStore, type AgentRunView, AgentRunViewSchema, AgentStoreAppliedSchema, AgentStoreConflictSchema, AgentStoreDuplicateSchema, type AgentStoreMutationResult, AgentStoreMutationResultSchema, AgentStoreNotFoundSchema, type CheckpointRunAssistant, CheckpointRunAssistantSchema, type CommitRunTerminal, CommitRunTerminalSchema, type RecordRunOperation, RecordRunOperationSchema, type RecoverAgentRun, RecoverAgentRunSchema, type ReplaceCompactedRange, ReplaceCompactedRangeSchema, type RequestRunInterrupt, RequestRunInterruptSchema, } from './agent-runtime/store.js';
19
32
  export { ACTIVE_AGENT_RUN_STATES, type AgentAdmissionReceipt, AgentAdmissionReceiptSchema, type AgentHistoryMutation, AgentHistoryMutationSchema, type AgentRuntimeHead, AgentRuntimeHeadSchema, type AgentRuntimeStoreDriver, type AgentStoreCompareAndSwapResult, type AgentStoredRun, AgentStoredRunSchema, createAgentRuntimeStore, createMemoryAgentRuntimeStore, } from './agent-runtime/store-driver.js';
33
+ export { type AgentConversationArchive, AgentConversationArchiveSchema, type AgentStoreEventDecodeAccepted, type AgentStoreEventDecodeIgnored, type AgentStoreEventDecodeResult, type AgentStoreEventDraft, type AgentStoreEventEnvelope, AgentStoreEventEnvelopeSchema, type AgentStoreEventKind, AgentStoreEventKindSchema, type AgentStoreEventPage, AgentStoreEventPageSchema, type AgentStoreTransition, AgentStoreTransitionSchema, type AppendAgentStoreEvent, AppendAgentStoreEventSchema, canonicalAgentJson, decodeAgentConversationArchive, decodeAgentStoreEvent, encodeAgentConversationArchive, type ReadAgentStoreEvents, ReadAgentStoreEventsSchema, } from './agent-runtime/store-events.js';
20
34
  export type { AgentConversationPurgeDriver } from './agent-runtime/store-purge.js';
21
35
  export { AgentRuntimeConflictError } from './agent-runtime/terminal-commit.js';
22
36
  export { type AgentHistoryEvidencePolicy, isAssistantHistoryEvidence, } from './agent-runtime/terminal-status.js';
@@ -1 +1 @@
1
- {"version":3,"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