stitchkit 0.110.1 → 0.110.3
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/CHANGELOG.md +16 -0
- package/dist/agent-runtime/archive-projection.d.ts +10 -0
- package/dist/agent-runtime/archive-projection.d.ts.map +1 -0
- package/dist/agent-runtime/archive-spill.d.ts +61 -0
- package/dist/agent-runtime/archive-spill.d.ts.map +1 -0
- package/dist/agent-runtime/branch-contract.d.ts +102 -0
- package/dist/agent-runtime/branch-contract.d.ts.map +1 -0
- package/dist/agent-runtime/branch-events.d.ts +18 -0
- package/dist/agent-runtime/branch-events.d.ts.map +1 -0
- package/dist/agent-runtime/branch-identities.d.ts +20 -0
- package/dist/agent-runtime/branch-identities.d.ts.map +1 -0
- package/dist/agent-runtime/branch-messages.d.ts +32 -0
- package/dist/agent-runtime/branch-messages.d.ts.map +1 -0
- package/dist/agent-runtime/branch-observations.d.ts +104 -0
- package/dist/agent-runtime/branch-observations.d.ts.map +1 -0
- package/dist/agent-runtime/branch-provider.d.ts +130 -0
- package/dist/agent-runtime/branch-provider.d.ts.map +1 -0
- package/dist/agent-runtime/branch-replay.d.ts +426 -0
- package/dist/agent-runtime/branch-replay.d.ts.map +1 -0
- package/dist/agent-runtime/branch-source.d.ts +16 -0
- package/dist/agent-runtime/branch-source.d.ts.map +1 -0
- package/dist/agent-runtime/branch-transitions.d.ts +6 -0
- package/dist/agent-runtime/branch-transitions.d.ts.map +1 -0
- package/dist/agent-runtime/sqlite-events.d.ts.map +1 -1
- package/dist/agent-runtime/sqlite-history.d.ts.map +1 -1
- package/dist/agent-runtime/sqlite-purge.d.ts.map +1 -1
- package/dist/agent-runtime/store-archive.d.ts +1 -0
- package/dist/agent-runtime/store-archive.d.ts.map +1 -1
- package/dist/agent-runtime/store-branch.d.ts +5 -0
- package/dist/agent-runtime/store-branch.d.ts.map +1 -0
- package/dist/agent-runtime/store-conformance-branch.d.ts +4 -0
- package/dist/agent-runtime/store-conformance-branch.d.ts.map +1 -0
- package/dist/agent-runtime/store-conformance-support.d.ts +5 -5
- package/dist/agent-runtime/store-conformance.d.ts.map +1 -1
- package/dist/agent-runtime/store-create.d.ts +1 -1
- package/dist/agent-runtime/store-create.d.ts.map +1 -1
- package/dist/agent-runtime/store-driver-contract.d.ts +6 -0
- package/dist/agent-runtime/store-driver-contract.d.ts.map +1 -1
- package/dist/agent-runtime/store-events.d.ts +1131 -0
- package/dist/agent-runtime/store-events.d.ts.map +1 -1
- package/dist/agent-runtime/store-memory-archive.d.ts +8 -0
- package/dist/agent-runtime/store-memory-archive.d.ts.map +1 -0
- package/dist/agent-runtime/store-memory-events.d.ts +7 -0
- package/dist/agent-runtime/store-memory-events.d.ts.map +1 -0
- package/dist/agent-runtime/store-memory.d.ts +1 -1
- package/dist/agent-runtime/store-memory.d.ts.map +1 -1
- package/dist/agent-runtime/store-purge.d.ts +2 -0
- package/dist/agent-runtime/store-purge.d.ts.map +1 -1
- package/dist/agent-runtime/store-reduce-run.d.ts +2 -2
- package/dist/agent-runtime/store-reduce-run.d.ts.map +1 -1
- package/dist/agent-runtime/store-reduce-shared.d.ts +1 -0
- package/dist/agent-runtime/store-reduce-shared.d.ts.map +1 -1
- package/dist/agent-runtime/store-reducer.d.ts +2 -2
- package/dist/agent-runtime/store-reducer.d.ts.map +1 -1
- package/dist/agent-runtime/store-replay.d.ts +4 -0
- package/dist/agent-runtime/store-replay.d.ts.map +1 -0
- package/dist/agent-runtime/store.d.ts +3 -0
- package/dist/agent-runtime/store.d.ts.map +1 -1
- package/dist/durability/events.d.ts +4 -0
- package/dist/durability/events.d.ts.map +1 -1
- package/dist/entrypoints/agent-runtime/coding-tools.js +1 -2
- package/dist/entrypoints/agent-runtime/harness.js +4 -3
- package/dist/entrypoints/agent-runtime/sandbox.js +3 -5
- package/dist/entrypoints/agent-runtime/sqlite/bun.js +13 -3
- package/dist/entrypoints/agent-runtime/sqlite/node.js +13 -3
- package/dist/entrypoints/agent-runtime/testing.js +89 -5
- package/dist/entrypoints/agent-runtime.d.ts +2 -1
- package/dist/entrypoints/agent-runtime.d.ts.map +1 -1
- package/dist/entrypoints/agent-runtime.js +27 -15
- package/dist/entrypoints/tools.js +5 -3
- package/dist/{index-0gs4ymfj.js → index-4fgg1507.js} +31 -2
- package/dist/{index-c17xcx4k.js → index-56yx8dxp.js} +19 -96
- package/dist/{index-8rstkvcf.js → index-7c046kxr.js} +1 -1
- package/dist/{index-tjdsyrys.js → index-bm180f2d.js} +203 -83
- package/dist/{index-924500c3.js → index-ddkwkcvn.js} +2 -2
- package/dist/{index-c0hffcmj.js → index-dgfah0g8.js} +21 -9
- package/dist/index-j1cwtyk1.js +2269 -0
- package/dist/index-snef22zr.js +94 -0
- package/dist/{index-5p55xreg.js → index-w619fqvv.js} +67 -29
- package/llms/agent-runtime.3.txt +4 -0
- package/llms/agent-runtime.txt +75 -0
- package/llms-full.txt +79 -0
- package/llms.txt +1 -1
- package/package.json +1 -1
- package/dist/index-8ks9b85e.js +0 -129
- package/dist/index-d2h99n7d.js +0 -1071
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AgentSandboxRestrictionSchema2,
|
|
3
|
+
AgentSandboxGradeSchema2,
|
|
4
|
+
probeAgentProcessSandbox2,
|
|
5
|
+
missingSandboxRestrictions2,
|
|
6
|
+
recordAgentSandboxProbe2,
|
|
7
|
+
refuseUnknownSpillReference
|
|
8
|
+
} from "../index-bm180f2d.js";
|
|
1
9
|
import {
|
|
2
10
|
AgentRecordIdSchema2,
|
|
3
11
|
AgentRecordVersionSchema2,
|
|
@@ -36,6 +44,9 @@ import {
|
|
|
36
44
|
AgentRunMetricsSchema2
|
|
37
45
|
} from "../index-8kzct1d6.js";
|
|
38
46
|
import {
|
|
47
|
+
BranchAgentConversationInputSchema2,
|
|
48
|
+
AgentConversationBranchReceiptSchema2,
|
|
49
|
+
AgentConversationBranchResultSchema2,
|
|
39
50
|
AgentConversationPurgeInputSchema2,
|
|
40
51
|
AgentConversationPurgeResultSchema2,
|
|
41
52
|
AgentConversationPurgedError2,
|
|
@@ -47,7 +58,7 @@ import {
|
|
|
47
58
|
AgentHistoryMutationSchema2,
|
|
48
59
|
ACTIVE_AGENT_RUN_STATES2,
|
|
49
60
|
createAgentRuntimeStore2
|
|
50
|
-
} from "../index-
|
|
61
|
+
} from "../index-j1cwtyk1.js";
|
|
51
62
|
import {
|
|
52
63
|
AgentStoreEventKindSchema2,
|
|
53
64
|
AgentStoreEventEnvelopeSchema2,
|
|
@@ -72,6 +83,7 @@ import {
|
|
|
72
83
|
AgentRecoverableDescriptorSchema2,
|
|
73
84
|
AgentRecoverablePageSchema2,
|
|
74
85
|
AgentStoreTransitionSchema2,
|
|
86
|
+
AgentStoreTransitionRecordSchema2,
|
|
75
87
|
decodeAgentStoreEvent2,
|
|
76
88
|
canonicalAgentJson2,
|
|
77
89
|
AgentConversationArchiveSchema2,
|
|
@@ -79,7 +91,7 @@ import {
|
|
|
79
91
|
decodeAgentConversationArchive2,
|
|
80
92
|
isAssistantHistoryEvidence2,
|
|
81
93
|
isCompleteAgentHistoryTurn
|
|
82
|
-
} from "../index-
|
|
94
|
+
} from "../index-4fgg1507.js";
|
|
83
95
|
import"../index-5w6t91ze.js";
|
|
84
96
|
import {
|
|
85
97
|
AgentRuntimeConflictError2,
|
|
@@ -111,7 +123,7 @@ import {
|
|
|
111
123
|
agentGoalStateSlot2,
|
|
112
124
|
agentTodoStateSlot2,
|
|
113
125
|
createAgentRuntime2
|
|
114
|
-
} from "../index-
|
|
126
|
+
} from "../index-ddkwkcvn.js";
|
|
115
127
|
import {
|
|
116
128
|
AgentConversationSummarySchema2,
|
|
117
129
|
AgentConversationPageSchema2,
|
|
@@ -127,7 +139,7 @@ import"../index-ghwntn9n.js";
|
|
|
127
139
|
import {
|
|
128
140
|
mountAgent2,
|
|
129
141
|
buildToolManifest2
|
|
130
|
-
} from "../index-
|
|
142
|
+
} from "../index-7c046kxr.js";
|
|
131
143
|
import {
|
|
132
144
|
createBoundedSinkManager
|
|
133
145
|
} from "../index-qaet40b2.js";
|
|
@@ -172,21 +184,18 @@ import {
|
|
|
172
184
|
StepAbortedError2,
|
|
173
185
|
ParkRecordDecodeError2,
|
|
174
186
|
ParkAbortedError2
|
|
175
|
-
} from "../index-
|
|
176
|
-
import
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
probeAgentProcessSandbox2,
|
|
180
|
-
missingSandboxRestrictions2,
|
|
181
|
-
recordAgentSandboxProbe2,
|
|
182
|
-
refuseUnknownSpillReference
|
|
183
|
-
} from "../index-8ks9b85e.js";
|
|
187
|
+
} from "../index-snef22zr.js";
|
|
188
|
+
import"../index-56yx8dxp.js";
|
|
189
|
+
import"../index-2kbysk9s.js";
|
|
190
|
+
import"../index-84bf5spd.js";
|
|
184
191
|
import {
|
|
185
192
|
createMemoryAgentRuntimeStore2
|
|
186
|
-
} from "../index-
|
|
193
|
+
} from "../index-w619fqvv.js";
|
|
187
194
|
import {
|
|
188
195
|
createAgentRuntimeEventSink2
|
|
189
196
|
} from "../index-616xh7f2.js";
|
|
197
|
+
import"../index-e1sjcjfy.js";
|
|
198
|
+
import"../index-zrtrjkbf.js";
|
|
190
199
|
import {
|
|
191
200
|
MAX_TIMER_MS
|
|
192
201
|
} from "../index-eemvahkc.js";
|
|
@@ -202,7 +211,6 @@ import {
|
|
|
202
211
|
createTraceContext2,
|
|
203
212
|
childSpan2
|
|
204
213
|
} from "../index-yex7eg1v.js";
|
|
205
|
-
|
|
206
214
|
// src/agent-runtime/child-tools.ts
|
|
207
215
|
import { z as z2 } from "zod";
|
|
208
216
|
|
|
@@ -2614,6 +2622,8 @@ export {
|
|
|
2614
2622
|
AgentContextOverflowError2 as AgentContextOverflowError,
|
|
2615
2623
|
AgentControlPartSchema2 as AgentControlPartSchema,
|
|
2616
2624
|
AgentConversationArchiveSchema2 as AgentConversationArchiveSchema,
|
|
2625
|
+
AgentConversationBranchReceiptSchema2 as AgentConversationBranchReceiptSchema,
|
|
2626
|
+
AgentConversationBranchResultSchema2 as AgentConversationBranchResultSchema,
|
|
2617
2627
|
AgentConversationMessagePageSchema2 as AgentConversationMessagePageSchema,
|
|
2618
2628
|
AgentConversationPageSchema2 as AgentConversationPageSchema,
|
|
2619
2629
|
AgentConversationPurgeInputSchema2 as AgentConversationPurgeInputSchema,
|
|
@@ -2686,6 +2696,7 @@ export {
|
|
|
2686
2696
|
AgentStoreEventPageSchema2 as AgentStoreEventPageSchema,
|
|
2687
2697
|
AgentStoreMutationResultSchema2 as AgentStoreMutationResultSchema,
|
|
2688
2698
|
AgentStoreNotFoundSchema2 as AgentStoreNotFoundSchema,
|
|
2699
|
+
AgentStoreTransitionRecordSchema2 as AgentStoreTransitionRecordSchema,
|
|
2689
2700
|
AgentStoreTransitionSchema2 as AgentStoreTransitionSchema,
|
|
2690
2701
|
AgentStoredRunSchema2 as AgentStoredRunSchema,
|
|
2691
2702
|
AgentTerminalEventSchema2 as AgentTerminalEventSchema,
|
|
@@ -2702,6 +2713,7 @@ export {
|
|
|
2702
2713
|
AgentUsageSchema2 as AgentUsageSchema,
|
|
2703
2714
|
AgentUsageValueSchema2 as AgentUsageValueSchema,
|
|
2704
2715
|
AppendAgentStoreEventSchema2 as AppendAgentStoreEventSchema,
|
|
2716
|
+
BranchAgentConversationInputSchema2 as BranchAgentConversationInputSchema,
|
|
2705
2717
|
CheckpointRunAssistantSchema2 as CheckpointRunAssistantSchema,
|
|
2706
2718
|
CommitRunTerminalSchema2 as CommitRunTerminalSchema,
|
|
2707
2719
|
CompletionInvocationInputSchema2 as CompletionInvocationInputSchema,
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
|
-
EffectUnresolvedError2
|
|
2
|
+
EffectUnresolvedError2
|
|
3
|
+
} from "../index-snef22zr.js";
|
|
4
|
+
import {
|
|
3
5
|
createLocalStepDurability2,
|
|
4
6
|
AgentToolError2,
|
|
5
7
|
isAgentToolError2
|
|
6
|
-
} from "../index-
|
|
8
|
+
} from "../index-56yx8dxp.js";
|
|
7
9
|
import {
|
|
8
10
|
normalizeError2
|
|
9
11
|
} from "../index-fynr93w4.js";
|
|
@@ -31,7 +33,7 @@ import {
|
|
|
31
33
|
mountAgent2,
|
|
32
34
|
describeToolCatalog2,
|
|
33
35
|
buildToolManifest2
|
|
34
|
-
} from "../index-
|
|
36
|
+
} from "../index-7c046kxr.js";
|
|
35
37
|
import"../index-m38ej7e5.js";
|
|
36
38
|
import {
|
|
37
39
|
ALL_TRANSPORTS2,
|
|
@@ -16,6 +16,8 @@ import {
|
|
|
16
16
|
import { z } from "zod";
|
|
17
17
|
var AgentStoreEventKindSchema2 = z.enum([
|
|
18
18
|
"runtime/baseline",
|
|
19
|
+
"runtime/branched",
|
|
20
|
+
"runtime/branch-observation",
|
|
19
21
|
"runtime/transition",
|
|
20
22
|
"invocation/started",
|
|
21
23
|
"invocation/finished",
|
|
@@ -188,11 +190,38 @@ var AgentStoreTransitionSchema2 = z3.discriminatedUnion("type", [
|
|
|
188
190
|
z3.object({ type: z3.literal("checkpoint"), input: CheckpointRunAssistantSchema2 }).strict(),
|
|
189
191
|
z3.object({ type: z3.literal("operation"), input: RecordRunOperationSchema2 }).strict(),
|
|
190
192
|
z3.object({ type: z3.literal("interrupt"), input: RequestRunInterruptSchema2 }).strict(),
|
|
191
|
-
z3.object({
|
|
193
|
+
z3.object({
|
|
194
|
+
type: z3.literal("recover"),
|
|
195
|
+
input: RecoverAgentRunSchema2,
|
|
196
|
+
assistant: AgentMessageSchema2.optional()
|
|
197
|
+
}).strict(),
|
|
192
198
|
z3.object({ type: z3.literal("terminal"), input: CommitRunTerminalSchema2 }).strict(),
|
|
193
199
|
z3.object({ type: z3.literal("compact"), input: ReplaceCompactedRangeSchema2 }).strict(),
|
|
194
200
|
z3.object({ type: z3.literal("seed"), input: SeedConversationInputSchema2 }).strict()
|
|
195
201
|
]);
|
|
202
|
+
var AgentStoreCheckpointRecordSchema = z3.object({
|
|
203
|
+
type: z3.literal("checkpoint"),
|
|
204
|
+
input: z3.object({
|
|
205
|
+
conversationId: z3.string().min(1),
|
|
206
|
+
runId: z3.string().min(1),
|
|
207
|
+
expectedRevision: z3.int().nonnegative(),
|
|
208
|
+
ownerId: z3.string().min(1),
|
|
209
|
+
fencingToken: z3.int().nonnegative().optional(),
|
|
210
|
+
assistant: z3.object({
|
|
211
|
+
id: z3.string().min(1),
|
|
212
|
+
status: z3.literal("streaming"),
|
|
213
|
+
sha256: z3.string().regex(/^[a-f0-9]{64}$/).optional(),
|
|
214
|
+
sourceSha256: z3.string().regex(/^[a-f0-9]{64}$/).optional(),
|
|
215
|
+
parts: z3.int().nonnegative(),
|
|
216
|
+
bytes: z3.int().nonnegative()
|
|
217
|
+
}).strict(),
|
|
218
|
+
usage: AgentUsageSchema2.optional()
|
|
219
|
+
}).strict()
|
|
220
|
+
}).strict().refine((value) => Boolean(value.input.assistant.sha256) !== Boolean(value.input.assistant.sourceSha256));
|
|
221
|
+
var AgentStoreTransitionRecordSchema2 = z3.union([
|
|
222
|
+
AgentStoreTransitionSchema2,
|
|
223
|
+
AgentStoreCheckpointRecordSchema
|
|
224
|
+
]);
|
|
196
225
|
var CURRENT_EVENT_SCHEMA_VERSION = 1;
|
|
197
226
|
function decodeAgentStoreEvent2(value) {
|
|
198
227
|
const envelope = AgentStoreEventEnvelopeSchema2.parse(value);
|
|
@@ -344,4 +373,4 @@ function assistantStatus(reason) {
|
|
|
344
373
|
return "failed";
|
|
345
374
|
}
|
|
346
375
|
|
|
347
|
-
export { AgentStoreEventKindSchema2, AgentStoreEventEnvelopeSchema2, AppendAgentStoreEventSchema2, ReadAgentStoreEventsSchema2, AgentStoreEventPageSchema2, AgentStoreConflictSchema2, AgentStoreNotFoundSchema2, AgentStoreAppliedSchema2, AgentStoreDuplicateSchema2, AgentStoreMutationResultSchema2, AgentRunViewSchema2, AcceptInputAndAssignRunSchema2, AcquireAgentRunSchema2, CheckpointRunAssistantSchema2, RecordRunOperationSchema2, CommitRunTerminalSchema2, RequestRunInterruptSchema2, RecoverAgentRunSchema2, ReplaceCompactedRangeSchema2, SeedConversationInputSchema2, AgentRecoverableDescriptorSchema2, AgentRecoverablePageSchema2, AgentStoreTransitionSchema2, decodeAgentStoreEvent2, agentStoreEventDraft, canonicalAgentJson2, AgentConversationArchiveSchema2, encodeAgentConversationArchive2, decodeAgentConversationArchive2, createToolChronology, advanceToolChronology, canProjectToolChronology, isAssistantHistoryEvidence2, isCompleteAgentHistoryTurn, assistantStatus };
|
|
376
|
+
export { AgentStoreEventKindSchema2, AgentStoreEventEnvelopeSchema2, AppendAgentStoreEventSchema2, ReadAgentStoreEventsSchema2, AgentStoreEventPageSchema2, AgentStoreConflictSchema2, AgentStoreNotFoundSchema2, AgentStoreAppliedSchema2, AgentStoreDuplicateSchema2, AgentStoreMutationResultSchema2, AgentRunViewSchema2, AcceptInputAndAssignRunSchema2, AcquireAgentRunSchema2, CheckpointRunAssistantSchema2, RecordRunOperationSchema2, CommitRunTerminalSchema2, RequestRunInterruptSchema2, RecoverAgentRunSchema2, ReplaceCompactedRangeSchema2, SeedConversationInputSchema2, AgentRecoverableDescriptorSchema2, AgentRecoverablePageSchema2, AgentStoreTransitionSchema2, AgentStoreCheckpointRecordSchema, AgentStoreTransitionRecordSchema2, decodeAgentStoreEvent2, agentStoreEventDraft, canonicalAgentJson2, AgentConversationArchiveSchema2, encodeAgentConversationArchive2, decodeAgentConversationArchive2, createToolChronology, advanceToolChronology, canProjectToolChronology, isAssistantHistoryEvidence2, isCompleteAgentHistoryTurn, assistantStatus };
|
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DURABILITY_STEP_EVENT_KIND2,
|
|
3
|
+
DURABILITY_PARK_EVENT_KIND,
|
|
4
|
+
DURABILITY_EVENT_EVENT_KIND,
|
|
5
|
+
DURABILITY_EFFECT_EVENT_KIND,
|
|
6
|
+
StepEventPayloadSchema,
|
|
7
|
+
ParkEventPayloadSchema,
|
|
8
|
+
DeliveredEventPayloadSchema,
|
|
9
|
+
EffectEventPayloadSchema,
|
|
10
|
+
StepResultDecodeError2,
|
|
11
|
+
StepResultNotSerializableError2,
|
|
12
|
+
StepAbortedError2,
|
|
13
|
+
EffectUnresolvedError2,
|
|
14
|
+
ParkRecordDecodeError2,
|
|
15
|
+
ParkAbortedError2
|
|
16
|
+
} from "./index-snef22zr.js";
|
|
1
17
|
import {
|
|
2
18
|
raceAbort
|
|
3
19
|
} from "./index-b0kddvzw.js";
|
|
@@ -8,102 +24,9 @@ import {
|
|
|
8
24
|
MAX_TIMER_MS
|
|
9
25
|
} from "./index-eemvahkc.js";
|
|
10
26
|
|
|
11
|
-
// src/durability/contract.ts
|
|
12
|
-
import { z } from "zod";
|
|
13
|
-
var DURABILITY_STEP_EVENT_KIND2 = "durability/step";
|
|
14
|
-
var DURABILITY_PARK_EVENT_KIND = "durability/park";
|
|
15
|
-
var DURABILITY_EVENT_EVENT_KIND = "durability/event";
|
|
16
|
-
var DURABILITY_EFFECT_EVENT_KIND = "durability/effect";
|
|
17
|
-
var StepEventPayloadSchema = z.object({
|
|
18
|
-
runId: z.string().min(1),
|
|
19
|
-
stepName: z.string().min(1),
|
|
20
|
-
encoded: z.string()
|
|
21
|
-
});
|
|
22
|
-
var SleepParkSchema = z.object({
|
|
23
|
-
runId: z.string().min(1),
|
|
24
|
-
kind: z.literal("sleep"),
|
|
25
|
-
name: z.string().min(1),
|
|
26
|
-
deadline: z.number()
|
|
27
|
-
});
|
|
28
|
-
var WaitParkSchema = z.object({
|
|
29
|
-
runId: z.string().min(1),
|
|
30
|
-
kind: z.literal("wait"),
|
|
31
|
-
event: z.string().min(1),
|
|
32
|
-
id: z.string().min(1)
|
|
33
|
-
});
|
|
34
|
-
var ParkEventPayloadSchema = z.discriminatedUnion("kind", [
|
|
35
|
-
SleepParkSchema,
|
|
36
|
-
WaitParkSchema
|
|
37
|
-
]);
|
|
38
|
-
var DeliveredEventPayloadSchema = z.object({
|
|
39
|
-
runId: z.string().min(1),
|
|
40
|
-
event: z.string().min(1),
|
|
41
|
-
id: z.string().min(1),
|
|
42
|
-
encoded: z.string()
|
|
43
|
-
});
|
|
44
|
-
var EffectIdentity = { runId: z.string().min(1), effectName: z.string().min(1) };
|
|
45
|
-
var EffectEventPayloadSchema = z.discriminatedUnion("phase", [
|
|
46
|
-
z.object({ ...EffectIdentity, phase: z.literal("intent") }),
|
|
47
|
-
z.object({
|
|
48
|
-
...EffectIdentity,
|
|
49
|
-
phase: z.literal("accepted"),
|
|
50
|
-
encoded: z.string(),
|
|
51
|
-
via: z.enum(["run", "reconcile"])
|
|
52
|
-
}),
|
|
53
|
-
z.object({ ...EffectIdentity, phase: z.literal("uncertain") })
|
|
54
|
-
]);
|
|
55
|
-
|
|
56
|
-
class StepResultDecodeError2 extends Error {
|
|
57
|
-
constructor(message, options) {
|
|
58
|
-
super(message, options);
|
|
59
|
-
this.name = "StepResultDecodeError";
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
class StepResultNotSerializableError2 extends Error {
|
|
64
|
-
constructor(stepName, cause) {
|
|
65
|
-
super(`Step "${stepName}" returned a value that is not JSON-serializable`, {
|
|
66
|
-
cause
|
|
67
|
-
});
|
|
68
|
-
this.name = "StepResultNotSerializableError";
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
class StepAbortedError2 extends Error {
|
|
73
|
-
constructor(stepName) {
|
|
74
|
-
super(`Step "${stepName}" was aborted before it started`);
|
|
75
|
-
this.name = "StepAbortedError";
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
class EffectUnresolvedError2 extends Error {
|
|
80
|
-
effectName;
|
|
81
|
-
reason;
|
|
82
|
-
constructor(effectName, reason, options) {
|
|
83
|
-
super(`Effect "${effectName}" is unresolved (${reason}); its intent stands`, options);
|
|
84
|
-
this.effectName = effectName;
|
|
85
|
-
this.reason = reason;
|
|
86
|
-
this.name = "EffectUnresolvedError";
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
class ParkRecordDecodeError2 extends Error {
|
|
91
|
-
constructor(message, options) {
|
|
92
|
-
super(message, options);
|
|
93
|
-
this.name = "ParkRecordDecodeError";
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
class ParkAbortedError2 extends Error {
|
|
98
|
-
constructor(park) {
|
|
99
|
-
super(`Park "${park}" was aborted before it was satisfied`);
|
|
100
|
-
this.name = "ParkAbortedError";
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
27
|
// src/durability/json.ts
|
|
105
|
-
import { z
|
|
106
|
-
var DurableJsonSchema =
|
|
28
|
+
import { z } from "zod";
|
|
29
|
+
var DurableJsonSchema = z.custom((value) => isJsonData(value, {
|
|
107
30
|
maxDepth: 100,
|
|
108
31
|
maxNodes: Number.MAX_SAFE_INTEGER,
|
|
109
32
|
omitObjectUndefined: false
|
|
@@ -653,4 +576,4 @@ function resolveToolDurability(context, callId, signal) {
|
|
|
653
576
|
return contexts.get(context)?.(callId, signal);
|
|
654
577
|
}
|
|
655
578
|
|
|
656
|
-
export {
|
|
579
|
+
export { createLocalStepDurability2, AgentToolError2, isAgentToolError2, createToolDurabilityContext, resolveToolDurability };
|