stitchkit 0.84.1 → 0.85.1
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 +52 -0
- package/dist/agent-runtime/control-schema.d.ts +61 -0
- package/dist/agent-runtime/control-schema.d.ts.map +1 -1
- package/dist/agent-runtime/event-schema.d.ts +88 -1
- package/dist/agent-runtime/event-schema.d.ts.map +1 -1
- package/dist/agent-runtime/run-execution.d.ts.map +1 -1
- package/dist/agent-runtime/run-operation-lifecycle.d.ts +25 -0
- package/dist/agent-runtime/run-operation-lifecycle.d.ts.map +1 -0
- package/dist/agent-runtime/schemas.d.ts +67 -0
- package/dist/agent-runtime/schemas.d.ts.map +1 -1
- package/dist/agent-runtime/store-driver.d.ts +18 -0
- package/dist/agent-runtime/store-driver.d.ts.map +1 -1
- package/dist/agent-runtime/store.d.ts +208 -0
- package/dist/agent-runtime/store.d.ts.map +1 -1
- package/dist/agent-runtime/terminal-commit.d.ts +9 -0
- package/dist/agent-runtime/terminal-commit.d.ts.map +1 -1
- package/dist/agent-runtime-browser.js +11 -3
- package/dist/agent-runtime-harness.js +4 -4
- package/dist/agent-runtime-sqlite-bun.js +3 -3
- package/dist/agent-runtime-sqlite-node.js +3 -3
- package/dist/agent-runtime.d.ts +2 -2
- package/dist/agent-runtime.d.ts.map +1 -1
- package/dist/agent-runtime.js +14 -4
- package/dist/{index-85vfqd7m.js → index-4hk633vz.js} +11 -3
- package/dist/{index-devfkwfm.js → index-66nxrgy0.js} +2 -2
- package/dist/{index-5s3zajp8.js → index-ff0kcqvp.js} +9 -3
- package/dist/{index-11vzj2sk.js → index-fq492hg0.js} +28 -2
- package/dist/{index-st8v8739.js → index-jpp7jd1p.js} +206 -26
- package/dist/{index-x1th9s8c.js → index-x15ss2dx.js} +50 -1
- package/dist/testing.js +26 -2
- package/llms-full.txt +61 -5
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -15,6 +15,58 @@ additive**; the first breaking change landed in 0.10.0. Grep the file for
|
|
|
15
15
|
|
|
16
16
|
## [Unreleased]
|
|
17
17
|
|
|
18
|
+
## [0.85.1] — 2026-09-07
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
|
|
22
|
+
- **A later model step cannot outrun its durable lifecycle or the previous
|
|
23
|
+
structural checkpoint.** AI SDK lifecycle callbacks deliberately suppress
|
|
24
|
+
callback failures, so the 0.85.0 request-start write could lose a revision
|
|
25
|
+
race with stream persistence while the provider request still executed. The
|
|
26
|
+
runtime now uses the callback only for concrete-model call identity; awaited
|
|
27
|
+
step preparation and model middleware record request admission before `doStream`, and every step
|
|
28
|
+
after the first waits for the prior step's structural checkpoint. A rejected
|
|
29
|
+
lifecycle write therefore prevents the provider call instead of producing an
|
|
30
|
+
unrecorded inference. Deferred-store and failed-admission tests cover both
|
|
31
|
+
sides of the guarantee. → ADR 0174 (amended).
|
|
32
|
+
|
|
33
|
+
## [0.85.0] — 2026-09-07
|
|
34
|
+
|
|
35
|
+
### ⚠️ Breaking changes
|
|
36
|
+
|
|
37
|
+
**Who must act:** applications implementing `AgentRuntimeStore` directly.
|
|
38
|
+
Normalized drivers passed to `createAgentRuntimeStore` need no new method.
|
|
39
|
+
|
|
40
|
+
- **Direct stores add `recordRunOperation`.** The mutation durably replaces
|
|
41
|
+
`AgentRun.lastOperation` under the existing revision, owner and fencing-token
|
|
42
|
+
contract. `// before: { checkpointRunAssistant, commitRunTerminal }` →
|
|
43
|
+
`// after: { checkpointRunAssistant, recordRunOperation, commitRunTerminal }`.
|
|
44
|
+
See the 0.85.0 migration in the upgrading guide.
|
|
45
|
+
|
|
46
|
+
### Added
|
|
47
|
+
|
|
48
|
+
- **Agent model requests and compaction expose one truthful durable lifecycle.**
|
|
49
|
+
`AgentRun.lastOperation` and the post-CAS `run-operation` event carry
|
|
50
|
+
`model-request`/`compaction`, operation and step identity, phases from
|
|
51
|
+
`started` through `first-output` to a terminal outcome, and original
|
|
52
|
+
timestamps. Request start is measured immediately before provider
|
|
53
|
+
`doStream`; first output requires a non-empty text/reasoning/tool-argument
|
|
54
|
+
delta or complete tool call. Reconnect reads the same fact from the snapshot,
|
|
55
|
+
and public terminal phases contain no raw provider error. The browser control
|
|
56
|
+
schema and cursors accept the durable event. `compaction` means the configured
|
|
57
|
+
callback is running, including a `not_needed` budget check; it does not claim
|
|
58
|
+
a summary was written. Wall-clock timestamps are observations, not ordered
|
|
59
|
+
durations, so a clock correction cannot fail a run. → ADR 0174.
|
|
60
|
+
|
|
61
|
+
### Changed
|
|
62
|
+
|
|
63
|
+
- **Tool, approval and step boundaries checkpoint independently from delta
|
|
64
|
+
batching.** `checkpointEveryEvents` still bounds ordinary stream persistence
|
|
65
|
+
and every live delta still publishes, while tool call/result/error/denial,
|
|
66
|
+
approval request/response and step finish force one checkpoint. The guarantee
|
|
67
|
+
begins when the managed loop observes the normalized boundary; it does not
|
|
68
|
+
claim persistence before a tool side effect. → ADR 0174.
|
|
69
|
+
|
|
18
70
|
## [0.84.1] — 2026-09-07
|
|
19
71
|
|
|
20
72
|
### Added
|
|
@@ -307,6 +307,24 @@ export declare const AgentControlResponseSchema: z.ZodDiscriminatedUnion<[z.ZodO
|
|
|
307
307
|
}>;
|
|
308
308
|
}, z.core.$strip>>;
|
|
309
309
|
}, z.core.$strip>>;
|
|
310
|
+
lastOperation: z.ZodOptional<z.ZodObject<{
|
|
311
|
+
operationId: z.ZodString;
|
|
312
|
+
kind: z.ZodEnum<{
|
|
313
|
+
compaction: "compaction";
|
|
314
|
+
"model-request": "model-request";
|
|
315
|
+
}>;
|
|
316
|
+
phase: z.ZodEnum<{
|
|
317
|
+
cancelled: "cancelled";
|
|
318
|
+
completed: "completed";
|
|
319
|
+
failed: "failed";
|
|
320
|
+
"first-output": "first-output";
|
|
321
|
+
started: "started";
|
|
322
|
+
}>;
|
|
323
|
+
step: z.ZodOptional<z.ZodInt>;
|
|
324
|
+
startedAt: z.ZodISODateTime;
|
|
325
|
+
firstOutputAt: z.ZodOptional<z.ZodISODateTime>;
|
|
326
|
+
finishedAt: z.ZodOptional<z.ZodISODateTime>;
|
|
327
|
+
}, z.core.$strip>>;
|
|
310
328
|
createdAt: z.ZodISODateTime;
|
|
311
329
|
updatedAt: z.ZodISODateTime;
|
|
312
330
|
}, z.core.$strip>>;
|
|
@@ -518,6 +536,24 @@ export declare const AgentControlDeliverySchema: z.ZodDiscriminatedUnion<[z.ZodO
|
|
|
518
536
|
}>;
|
|
519
537
|
}, z.core.$strip>>;
|
|
520
538
|
}, z.core.$strip>>;
|
|
539
|
+
lastOperation: z.ZodOptional<z.ZodObject<{
|
|
540
|
+
operationId: z.ZodString;
|
|
541
|
+
kind: z.ZodEnum<{
|
|
542
|
+
compaction: "compaction";
|
|
543
|
+
"model-request": "model-request";
|
|
544
|
+
}>;
|
|
545
|
+
phase: z.ZodEnum<{
|
|
546
|
+
cancelled: "cancelled";
|
|
547
|
+
completed: "completed";
|
|
548
|
+
failed: "failed";
|
|
549
|
+
"first-output": "first-output";
|
|
550
|
+
started: "started";
|
|
551
|
+
}>;
|
|
552
|
+
step: z.ZodOptional<z.ZodInt>;
|
|
553
|
+
startedAt: z.ZodISODateTime;
|
|
554
|
+
firstOutputAt: z.ZodOptional<z.ZodISODateTime>;
|
|
555
|
+
finishedAt: z.ZodOptional<z.ZodISODateTime>;
|
|
556
|
+
}, z.core.$strip>>;
|
|
521
557
|
createdAt: z.ZodISODateTime;
|
|
522
558
|
updatedAt: z.ZodISODateTime;
|
|
523
559
|
}, z.core.$strip>;
|
|
@@ -842,6 +878,31 @@ export declare const AgentControlDeliverySchema: z.ZodDiscriminatedUnion<[z.ZodO
|
|
|
842
878
|
running: "running";
|
|
843
879
|
superseded: "superseded";
|
|
844
880
|
}>;
|
|
881
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
882
|
+
conversationId: z.ZodString;
|
|
883
|
+
runId: z.ZodString;
|
|
884
|
+
emittedAt: z.ZodISODateTime;
|
|
885
|
+
type: z.ZodLiteral<"run-operation">;
|
|
886
|
+
eventId: z.ZodString;
|
|
887
|
+
snapshotVersion: z.ZodInt;
|
|
888
|
+
operation: z.ZodObject<{
|
|
889
|
+
operationId: z.ZodString;
|
|
890
|
+
kind: z.ZodEnum<{
|
|
891
|
+
compaction: "compaction";
|
|
892
|
+
"model-request": "model-request";
|
|
893
|
+
}>;
|
|
894
|
+
phase: z.ZodEnum<{
|
|
895
|
+
cancelled: "cancelled";
|
|
896
|
+
completed: "completed";
|
|
897
|
+
failed: "failed";
|
|
898
|
+
"first-output": "first-output";
|
|
899
|
+
started: "started";
|
|
900
|
+
}>;
|
|
901
|
+
step: z.ZodOptional<z.ZodInt>;
|
|
902
|
+
startedAt: z.ZodISODateTime;
|
|
903
|
+
firstOutputAt: z.ZodOptional<z.ZodISODateTime>;
|
|
904
|
+
finishedAt: z.ZodOptional<z.ZodISODateTime>;
|
|
905
|
+
}, z.core.$strip>;
|
|
845
906
|
}, z.core.$strip>, z.ZodObject<{
|
|
846
907
|
conversationId: z.ZodString;
|
|
847
908
|
runId: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"control-schema.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/control-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,KAAK,iBAAiB,EAA2B,MAAM,gBAAgB,CAAC;AACjF,OAAO,EAA0B,KAAK,aAAa,EAAuB,MAAM,WAAW,CAAC;AAM5F,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAoCpC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAM5E,eAAO,MAAM,0BAA0B
|
|
1
|
+
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AE,CAAC,CAAC,CAAC;CAC/E;AACD,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,uBAAuB,CAAC;IAChC,aAAa,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC,CAAC;CAChE;AAED,wBAAgB,sBAAsB,IAAI,gBAAgB,CAEzD;AAED,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,gBAAgB,EACtB,WAAW,EAAE,aAAa,GACzB,gBAAgB,CAuBlB;AAED,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,gBAAgB,EACtB,QAAQ,EAAE,iBAAiB,GAC1B,gBAAgB,CA0ClB"}
|
|
@@ -192,6 +192,24 @@ export declare const AgentAdmissionEventSchema: z.ZodObject<{
|
|
|
192
192
|
}>;
|
|
193
193
|
}, z.core.$strip>>;
|
|
194
194
|
}, z.core.$strip>>;
|
|
195
|
+
lastOperation: z.ZodOptional<z.ZodObject<{
|
|
196
|
+
operationId: z.ZodString;
|
|
197
|
+
kind: z.ZodEnum<{
|
|
198
|
+
compaction: "compaction";
|
|
199
|
+
"model-request": "model-request";
|
|
200
|
+
}>;
|
|
201
|
+
phase: z.ZodEnum<{
|
|
202
|
+
cancelled: "cancelled";
|
|
203
|
+
completed: "completed";
|
|
204
|
+
failed: "failed";
|
|
205
|
+
"first-output": "first-output";
|
|
206
|
+
started: "started";
|
|
207
|
+
}>;
|
|
208
|
+
step: z.ZodOptional<z.ZodInt>;
|
|
209
|
+
startedAt: z.ZodISODateTime;
|
|
210
|
+
firstOutputAt: z.ZodOptional<z.ZodISODateTime>;
|
|
211
|
+
finishedAt: z.ZodOptional<z.ZodISODateTime>;
|
|
212
|
+
}, z.core.$strip>>;
|
|
195
213
|
createdAt: z.ZodISODateTime;
|
|
196
214
|
updatedAt: z.ZodISODateTime;
|
|
197
215
|
}, z.core.$strip>;
|
|
@@ -523,6 +541,32 @@ export declare const AgentRunStateEventSchema: z.ZodObject<{
|
|
|
523
541
|
superseded: "superseded";
|
|
524
542
|
}>;
|
|
525
543
|
}, z.core.$strip>;
|
|
544
|
+
export declare const AgentRunOperationEventSchema: z.ZodObject<{
|
|
545
|
+
conversationId: z.ZodString;
|
|
546
|
+
runId: z.ZodString;
|
|
547
|
+
emittedAt: z.ZodISODateTime;
|
|
548
|
+
type: z.ZodLiteral<"run-operation">;
|
|
549
|
+
eventId: z.ZodString;
|
|
550
|
+
snapshotVersion: z.ZodInt;
|
|
551
|
+
operation: z.ZodObject<{
|
|
552
|
+
operationId: z.ZodString;
|
|
553
|
+
kind: z.ZodEnum<{
|
|
554
|
+
compaction: "compaction";
|
|
555
|
+
"model-request": "model-request";
|
|
556
|
+
}>;
|
|
557
|
+
phase: z.ZodEnum<{
|
|
558
|
+
cancelled: "cancelled";
|
|
559
|
+
completed: "completed";
|
|
560
|
+
failed: "failed";
|
|
561
|
+
"first-output": "first-output";
|
|
562
|
+
started: "started";
|
|
563
|
+
}>;
|
|
564
|
+
step: z.ZodOptional<z.ZodInt>;
|
|
565
|
+
startedAt: z.ZodISODateTime;
|
|
566
|
+
firstOutputAt: z.ZodOptional<z.ZodISODateTime>;
|
|
567
|
+
finishedAt: z.ZodOptional<z.ZodISODateTime>;
|
|
568
|
+
}, z.core.$strip>;
|
|
569
|
+
}, z.core.$strip>;
|
|
526
570
|
export declare const AgentToolStatusEventSchema: z.ZodObject<{
|
|
527
571
|
conversationId: z.ZodString;
|
|
528
572
|
runId: z.ZodString;
|
|
@@ -909,6 +953,24 @@ export declare const AgentRuntimeEventSchema: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
909
953
|
}>;
|
|
910
954
|
}, z.core.$strip>>;
|
|
911
955
|
}, z.core.$strip>>;
|
|
956
|
+
lastOperation: z.ZodOptional<z.ZodObject<{
|
|
957
|
+
operationId: z.ZodString;
|
|
958
|
+
kind: z.ZodEnum<{
|
|
959
|
+
compaction: "compaction";
|
|
960
|
+
"model-request": "model-request";
|
|
961
|
+
}>;
|
|
962
|
+
phase: z.ZodEnum<{
|
|
963
|
+
cancelled: "cancelled";
|
|
964
|
+
completed: "completed";
|
|
965
|
+
failed: "failed";
|
|
966
|
+
"first-output": "first-output";
|
|
967
|
+
started: "started";
|
|
968
|
+
}>;
|
|
969
|
+
step: z.ZodOptional<z.ZodInt>;
|
|
970
|
+
startedAt: z.ZodISODateTime;
|
|
971
|
+
firstOutputAt: z.ZodOptional<z.ZodISODateTime>;
|
|
972
|
+
finishedAt: z.ZodOptional<z.ZodISODateTime>;
|
|
973
|
+
}, z.core.$strip>>;
|
|
912
974
|
createdAt: z.ZodISODateTime;
|
|
913
975
|
updatedAt: z.ZodISODateTime;
|
|
914
976
|
}, z.core.$strip>;
|
|
@@ -1233,6 +1295,31 @@ export declare const AgentRuntimeEventSchema: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
1233
1295
|
running: "running";
|
|
1234
1296
|
superseded: "superseded";
|
|
1235
1297
|
}>;
|
|
1298
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1299
|
+
conversationId: z.ZodString;
|
|
1300
|
+
runId: z.ZodString;
|
|
1301
|
+
emittedAt: z.ZodISODateTime;
|
|
1302
|
+
type: z.ZodLiteral<"run-operation">;
|
|
1303
|
+
eventId: z.ZodString;
|
|
1304
|
+
snapshotVersion: z.ZodInt;
|
|
1305
|
+
operation: z.ZodObject<{
|
|
1306
|
+
operationId: z.ZodString;
|
|
1307
|
+
kind: z.ZodEnum<{
|
|
1308
|
+
compaction: "compaction";
|
|
1309
|
+
"model-request": "model-request";
|
|
1310
|
+
}>;
|
|
1311
|
+
phase: z.ZodEnum<{
|
|
1312
|
+
cancelled: "cancelled";
|
|
1313
|
+
completed: "completed";
|
|
1314
|
+
failed: "failed";
|
|
1315
|
+
"first-output": "first-output";
|
|
1316
|
+
started: "started";
|
|
1317
|
+
}>;
|
|
1318
|
+
step: z.ZodOptional<z.ZodInt>;
|
|
1319
|
+
startedAt: z.ZodISODateTime;
|
|
1320
|
+
firstOutputAt: z.ZodOptional<z.ZodISODateTime>;
|
|
1321
|
+
finishedAt: z.ZodOptional<z.ZodISODateTime>;
|
|
1322
|
+
}, z.core.$strip>;
|
|
1236
1323
|
}, z.core.$strip>, z.ZodObject<{
|
|
1237
1324
|
conversationId: z.ZodString;
|
|
1238
1325
|
runId: z.ZodString;
|
|
@@ -1441,5 +1528,5 @@ export interface AgentRuntimeCursorAdvance {
|
|
|
1441
1528
|
/** Detect duplicate or missing delivery so reconnect can reload the durable snapshot. */
|
|
1442
1529
|
export declare function advanceAgentRuntimeEventCursor(rawCursor: AgentRuntimeEventCursor, event: AgentRuntimeEvent): AgentRuntimeCursorAdvance;
|
|
1443
1530
|
/** Stable identity for a post-CAS event; safe for outbox/dedup keys. */
|
|
1444
|
-
export declare function agentDurableEventId(type: 'admission' | 'assistant-checkpoint' | 'run-state' | 'terminal', runId: string, snapshotVersion: number): string;
|
|
1531
|
+
export declare function agentDurableEventId(type: 'admission' | 'assistant-checkpoint' | 'run-state' | 'run-operation' | 'terminal', runId: string, snapshotVersion: number): string;
|
|
1445
1532
|
//# sourceMappingURL=event-schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-schema.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/event-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"event-schema.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/event-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAexB,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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C,SAAS,EAAE,uBAAuB,EAClC,KAAK,EAAE,iBAAiB,GACvB,yBAAyB,CAiC3B;AAED,wEAAwE;AACxE,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,WAAW,GAAG,sBAAsB,GAAG,WAAW,GAAG,eAAe,GAAG,UAAU,EACvF,KAAK,EAAE,MAAM,EACb,eAAe,EAAE,MAAM,GACtB,MAAM,CAER"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-execution.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/run-execution.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"run-execution.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/run-execution.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,OAAO,EACb,MAAM,IAAI,CAAC;AAMZ,OAAO,EAAE,KAAK,iBAAiB,EAAuB,MAAM,UAAU,CAAC;AAEvE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAI1D,OAAO,KAAK,EAAqB,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAavE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAKL,KAAK,QAAQ,EAOd,MAAM,WAAW,CAAC;AAuCnB,8DAA8D;AAC9D,MAAM,WAAW,uBAAuB,CAAC,OAAO,EAAE,KAAK,SAAS,OAAO;IACrE,MAAM,EAAE,kBAAkB,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAC3C,OAAO,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,IAAI,MAAM,CAAC;IACrB,GAAG,IAAI,IAAI,CAAC;IACZ,qBAAqB,EAAE,MAAM,CAAC;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,sBAAsB,CAAC;CACpC;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,KAAK,SAAS,OAAO,EAC9D,YAAY,EAAE,uBAAuB,CAAC,OAAO,EAAE,KAAK,CAAC,WAcb;IACtC,WAAW,EAAE,QAAQ,CAAC;IACtB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,WAAW,CAAC;IACpB,gFAAgF;IAChF,GAAG,EAAE,MAAM,CAAC;IACZ,gFAAgF;IAChF,UAAU,CAAC,IAAI,IAAI,CAAC;CACrB,KAAG,OAAO,CAAC,kBAAkB,CAAC,CAoiChC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type LanguageModel } from 'ai';
|
|
2
|
+
import type { AgentRuntimeEvent } from './event-schema.js';
|
|
3
|
+
import { type AgentRun, type AgentSnapshot } from './schemas.js';
|
|
4
|
+
import type { AgentRuntimeStore } from './store.js';
|
|
5
|
+
type TerminalOperationPhase = 'completed' | 'failed' | 'cancelled';
|
|
6
|
+
export interface AgentRunOperationLifecycleConfig {
|
|
7
|
+
store: AgentRuntimeStore;
|
|
8
|
+
runtimeEpoch: string;
|
|
9
|
+
currentRun(): AgentRun;
|
|
10
|
+
acceptSnapshot(snapshot: AgentSnapshot): void;
|
|
11
|
+
publish(event: AgentRuntimeEvent): Promise<void>;
|
|
12
|
+
now(): Date;
|
|
13
|
+
}
|
|
14
|
+
/** One durable latest-operation state machine for an executing run. */
|
|
15
|
+
export declare function createAgentRunOperationLifecycle(config: AgentRunOperationLifecycleConfig): {
|
|
16
|
+
noteProviderCall(callId: string): void;
|
|
17
|
+
prepareModel(model: LanguageModel, step: number, fallbackCallId: string): Promise<LanguageModel>;
|
|
18
|
+
checkpointStep(step: number): void;
|
|
19
|
+
failStepCheckpoints(error: unknown): void;
|
|
20
|
+
startCompaction(operationId: string): Promise<void>;
|
|
21
|
+
firstOutput(): Promise<void>;
|
|
22
|
+
finish(phase: TerminalOperationPhase): Promise<void>;
|
|
23
|
+
};
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=run-operation-lifecycle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-operation-lifecycle.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/run-operation-lifecycle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAqB,MAAM,IAAI,CAAC;AAC3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAGxD,OAAO,EACL,KAAK,QAAQ,EAGb,KAAK,aAAa,EACnB,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAGjD,KAAK,sBAAsB,GAAG,WAAW,GAAG,QAAQ,GAAG,WAAW,CAAC;AAEnE,MAAM,WAAW,gCAAgC;IAC/C,KAAK,EAAE,iBAAiB,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,IAAI,QAAQ,CAAC;IACvB,cAAc,CAAC,QAAQ,EAAE,aAAa,GAAG,IAAI,CAAC;IAC9C,OAAO,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD,GAAG,IAAI,IAAI,CAAC;CACb;AAED,uEAAuE;AACvE,wBAAgB,gCAAgC,CAAC,MAAM,EAAE,gCAAgC;IA4CrF,gBAAgB,SAAS,MAAM,GAAG,IAAI;IAGhC,YAAY,QACT,aAAa,QACd,MAAM,kBACI,MAAM,GACrB,OAAO,CAAC,aAAa,CAAC;IAgCzB,cAAc,OAAO,MAAM,GAAG,IAAI;IAQlC,mBAAmB,QAAQ,OAAO,GAAG,IAAI;IAIzC,eAAe,cAAc,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAUnD,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAY5B,MAAM,QAAQ,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC;EAavD"}
|
|
@@ -282,6 +282,37 @@ export declare const AgentRunQueuePrioritySchema: z.ZodEnum<{
|
|
|
282
282
|
"interrupt-next": "interrupt-next";
|
|
283
283
|
}>;
|
|
284
284
|
export type AgentRunQueuePriority = z.infer<typeof AgentRunQueuePrioritySchema>;
|
|
285
|
+
export declare const AgentRunOperationKindSchema: z.ZodEnum<{
|
|
286
|
+
compaction: "compaction";
|
|
287
|
+
"model-request": "model-request";
|
|
288
|
+
}>;
|
|
289
|
+
export declare const AgentRunOperationPhaseSchema: z.ZodEnum<{
|
|
290
|
+
cancelled: "cancelled";
|
|
291
|
+
completed: "completed";
|
|
292
|
+
failed: "failed";
|
|
293
|
+
"first-output": "first-output";
|
|
294
|
+
started: "started";
|
|
295
|
+
}>;
|
|
296
|
+
/** The last runtime operation, with timestamps that survive reconnect. */
|
|
297
|
+
export declare const AgentRunOperationSchema: z.ZodObject<{
|
|
298
|
+
operationId: z.ZodString;
|
|
299
|
+
kind: z.ZodEnum<{
|
|
300
|
+
compaction: "compaction";
|
|
301
|
+
"model-request": "model-request";
|
|
302
|
+
}>;
|
|
303
|
+
phase: z.ZodEnum<{
|
|
304
|
+
cancelled: "cancelled";
|
|
305
|
+
completed: "completed";
|
|
306
|
+
failed: "failed";
|
|
307
|
+
"first-output": "first-output";
|
|
308
|
+
started: "started";
|
|
309
|
+
}>;
|
|
310
|
+
step: z.ZodOptional<z.ZodInt>;
|
|
311
|
+
startedAt: z.ZodISODateTime;
|
|
312
|
+
firstOutputAt: z.ZodOptional<z.ZodISODateTime>;
|
|
313
|
+
finishedAt: z.ZodOptional<z.ZodISODateTime>;
|
|
314
|
+
}, z.core.$strip>;
|
|
315
|
+
export type AgentRunOperation = z.infer<typeof AgentRunOperationSchema>;
|
|
285
316
|
export declare const AgentTerminalReasonSchema: z.ZodEnum<{
|
|
286
317
|
abandoned: "abandoned";
|
|
287
318
|
absorbed: "absorbed";
|
|
@@ -540,6 +571,24 @@ export declare const AgentRunSchema: z.ZodObject<{
|
|
|
540
571
|
}>;
|
|
541
572
|
}, z.core.$strip>>;
|
|
542
573
|
}, z.core.$strip>>;
|
|
574
|
+
lastOperation: z.ZodOptional<z.ZodObject<{
|
|
575
|
+
operationId: z.ZodString;
|
|
576
|
+
kind: z.ZodEnum<{
|
|
577
|
+
compaction: "compaction";
|
|
578
|
+
"model-request": "model-request";
|
|
579
|
+
}>;
|
|
580
|
+
phase: z.ZodEnum<{
|
|
581
|
+
cancelled: "cancelled";
|
|
582
|
+
completed: "completed";
|
|
583
|
+
failed: "failed";
|
|
584
|
+
"first-output": "first-output";
|
|
585
|
+
started: "started";
|
|
586
|
+
}>;
|
|
587
|
+
step: z.ZodOptional<z.ZodInt>;
|
|
588
|
+
startedAt: z.ZodISODateTime;
|
|
589
|
+
firstOutputAt: z.ZodOptional<z.ZodISODateTime>;
|
|
590
|
+
finishedAt: z.ZodOptional<z.ZodISODateTime>;
|
|
591
|
+
}, z.core.$strip>>;
|
|
543
592
|
createdAt: z.ZodISODateTime;
|
|
544
593
|
updatedAt: z.ZodISODateTime;
|
|
545
594
|
}, z.core.$strip>;
|
|
@@ -735,6 +784,24 @@ export declare const AgentSnapshotSchema: z.ZodObject<{
|
|
|
735
784
|
}>;
|
|
736
785
|
}, z.core.$strip>>;
|
|
737
786
|
}, z.core.$strip>>;
|
|
787
|
+
lastOperation: z.ZodOptional<z.ZodObject<{
|
|
788
|
+
operationId: z.ZodString;
|
|
789
|
+
kind: z.ZodEnum<{
|
|
790
|
+
compaction: "compaction";
|
|
791
|
+
"model-request": "model-request";
|
|
792
|
+
}>;
|
|
793
|
+
phase: z.ZodEnum<{
|
|
794
|
+
cancelled: "cancelled";
|
|
795
|
+
completed: "completed";
|
|
796
|
+
failed: "failed";
|
|
797
|
+
"first-output": "first-output";
|
|
798
|
+
started: "started";
|
|
799
|
+
}>;
|
|
800
|
+
step: z.ZodOptional<z.ZodInt>;
|
|
801
|
+
startedAt: z.ZodISODateTime;
|
|
802
|
+
firstOutputAt: z.ZodOptional<z.ZodISODateTime>;
|
|
803
|
+
finishedAt: z.ZodOptional<z.ZodISODateTime>;
|
|
804
|
+
}, z.core.$strip>>;
|
|
738
805
|
createdAt: z.ZodISODateTime;
|
|
739
806
|
updatedAt: z.ZodISODateTime;
|
|
740
807
|
}, z.core.$strip>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,mBAAmB,aAAoB,CAAC;AACrD,eAAO,MAAM,wBAAwB,UAAwB,CAAC;AAC9D,eAAO,MAAM,oBAAoB,kBAAmC,CAAC;AACrE,eAAO,MAAM,qBAAqB,2CAAiC,CAAC;AAEpE,eAAO,MAAM,2BAA2B;;;;iBAItC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,eAAO,MAAM,mBAAmB;;;iBAG9B,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;iBAInC,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;iBAK9B,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;iBAKhC,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;iBAMlC,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;iBAMpC,CAAC;AAEH,eAAO,MAAM,kCAAkC;;;;;;iBAM7C,CAAC;AAEH,eAAO,MAAM,mCAAmC;;;;;iBAK9C,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;iBAGhC,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;iBAGjC,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;iBAgB9B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkBhC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
|
|
@@ -106,6 +106,24 @@ export declare const AgentStoredRunSchema: z.ZodObject<{
|
|
|
106
106
|
}>;
|
|
107
107
|
}, z.core.$strip>>;
|
|
108
108
|
}, z.core.$strip>>;
|
|
109
|
+
lastOperation: z.ZodOptional<z.ZodObject<{
|
|
110
|
+
operationId: z.ZodString;
|
|
111
|
+
kind: z.ZodEnum<{
|
|
112
|
+
compaction: "compaction";
|
|
113
|
+
"model-request": "model-request";
|
|
114
|
+
}>;
|
|
115
|
+
phase: z.ZodEnum<{
|
|
116
|
+
cancelled: "cancelled";
|
|
117
|
+
completed: "completed";
|
|
118
|
+
failed: "failed";
|
|
119
|
+
"first-output": "first-output";
|
|
120
|
+
started: "started";
|
|
121
|
+
}>;
|
|
122
|
+
step: z.ZodOptional<z.ZodInt>;
|
|
123
|
+
startedAt: z.ZodISODateTime;
|
|
124
|
+
firstOutputAt: z.ZodOptional<z.ZodISODateTime>;
|
|
125
|
+
finishedAt: z.ZodOptional<z.ZodISODateTime>;
|
|
126
|
+
}, z.core.$strip>>;
|
|
109
127
|
createdAt: z.ZodISODateTime;
|
|
110
128
|
updatedAt: z.ZodISODateTime;
|
|
111
129
|
}, z.core.$strip>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store-driver.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/store-driver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,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