stitchkit 0.84.0 → 0.85.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/CHANGELOG.md +78 -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/deferred-tool-search.d.ts.map +1 -1
- package/dist/agent-runtime/deferred-tool-selection.d.ts +17 -0
- package/dist/agent-runtime/deferred-tool-selection.d.ts.map +1 -1
- package/dist/agent-runtime/deferred-tool-types.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 +21 -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/sqlite.d.ts.map +1 -1
- package/dist/agent-runtime/store-driver.d.ts +26 -1
- 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 +32 -6
- package/dist/{index-85vfqd7m.js → index-4hk633vz.js} +11 -3
- package/dist/{index-cksjz4eg.js → index-66nxrgy0.js} +17 -16
- package/dist/{index-st8v8739.js → index-9merfjxf.js} +141 -14
- package/dist/{index-5s3zajp8.js → index-ff0kcqvp.js} +9 -3
- package/dist/{index-19eet1qx.js → index-fq492hg0.js} +31 -5
- package/dist/{index-x1th9s8c.js → index-x15ss2dx.js} +50 -1
- package/dist/testing.js +26 -2
- package/dist/tools/async-operation.d.ts +18 -1
- package/dist/tools/async-operation.d.ts.map +1 -1
- package/dist/tools.js +3 -1
- package/llms-full.txt +69 -8
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -15,6 +15,84 @@ additive**; the first breaking change landed in 0.10.0. Grep the file for
|
|
|
15
15
|
|
|
16
16
|
## [Unreleased]
|
|
17
17
|
|
|
18
|
+
## [0.85.0] — 2026-09-07
|
|
19
|
+
|
|
20
|
+
### ⚠️ Breaking changes
|
|
21
|
+
|
|
22
|
+
**Who must act:** applications implementing `AgentRuntimeStore` directly.
|
|
23
|
+
Normalized drivers passed to `createAgentRuntimeStore` need no new method.
|
|
24
|
+
|
|
25
|
+
- **Direct stores add `recordRunOperation`.** The mutation durably replaces
|
|
26
|
+
`AgentRun.lastOperation` under the existing revision, owner and fencing-token
|
|
27
|
+
contract. `// before: { checkpointRunAssistant, commitRunTerminal }` →
|
|
28
|
+
`// after: { checkpointRunAssistant, recordRunOperation, commitRunTerminal }`.
|
|
29
|
+
See the 0.85.0 migration in the upgrading guide.
|
|
30
|
+
|
|
31
|
+
### Added
|
|
32
|
+
|
|
33
|
+
- **Agent model requests and compaction expose one truthful durable lifecycle.**
|
|
34
|
+
`AgentRun.lastOperation` and the post-CAS `run-operation` event carry
|
|
35
|
+
`model-request`/`compaction`, operation and step identity, phases from
|
|
36
|
+
`started` through `first-output` to a terminal outcome, and original
|
|
37
|
+
timestamps. Request start is measured immediately before provider
|
|
38
|
+
`doStream`; first output requires a non-empty text/reasoning/tool-argument
|
|
39
|
+
delta or complete tool call. Reconnect reads the same fact from the snapshot,
|
|
40
|
+
and public terminal phases contain no raw provider error. The browser control
|
|
41
|
+
schema and cursors accept the durable event. `compaction` means the configured
|
|
42
|
+
callback is running, including a `not_needed` budget check; it does not claim
|
|
43
|
+
a summary was written. Wall-clock timestamps are observations, not ordered
|
|
44
|
+
durations, so a clock correction cannot fail a run. → ADR 0174.
|
|
45
|
+
|
|
46
|
+
### Changed
|
|
47
|
+
|
|
48
|
+
- **Tool, approval and step boundaries checkpoint independently from delta
|
|
49
|
+
batching.** `checkpointEveryEvents` still bounds ordinary stream persistence
|
|
50
|
+
and every live delta still publishes, while tool call/result/error/denial,
|
|
51
|
+
approval request/response and step finish force one checkpoint. The guarantee
|
|
52
|
+
begins when the managed loop observes the normalized boundary; it does not
|
|
53
|
+
claim persistence before a tool side effect. → ADR 0174.
|
|
54
|
+
|
|
55
|
+
## [0.84.1] — 2026-09-07
|
|
56
|
+
|
|
57
|
+
### Added
|
|
58
|
+
|
|
59
|
+
- **`defineAsyncOperationContract` accepts `expose` per capability.** This
|
|
60
|
+
contract is built inside the framework, so an application that made tools
|
|
61
|
+
opt-in with `createContractFactory({ toolExposure: 'explicit' })` set that
|
|
62
|
+
default on its own factory and these endpoints never passed through it: it
|
|
63
|
+
was handed `start` and `cancel` — both effectful — as agent tools with no way
|
|
64
|
+
to say otherwise short of rebuilding the contract by hand. The same shape
|
|
65
|
+
that handed a project a `track_<prefix>` tool in 0.82.0. The default is
|
|
66
|
+
unchanged: unlike a browser event ingest, an async operation is a plausible
|
|
67
|
+
thing for an agent to start and follow, so this says who decides rather than
|
|
68
|
+
deciding for everyone.
|
|
69
|
+
|
|
70
|
+
### Fixed
|
|
71
|
+
|
|
72
|
+
- **Agent-runtime reads no longer reserve SQLite's WAL writer slot.**
|
|
73
|
+
`loadSnapshot`, `loadRun`, `listActiveRuns`, recovery scans and conversation
|
|
74
|
+
reads now use a deferred read transaction, so they see one committed snapshot
|
|
75
|
+
while an independent `BEGIN IMMEDIATE` writer is active. Mutations retain
|
|
76
|
+
`BEGIN IMMEDIATE`, fail promptly on contention and are never retried by the
|
|
77
|
+
store. Custom `AgentRuntimeStoreDriver` implementations remain source
|
|
78
|
+
compatible: `transaction(work, { access: 'read' })` is additive and absent
|
|
79
|
+
options still mean write access.
|
|
80
|
+
|
|
81
|
+
- **The deferred tool catalog answers a multi-word query.** The whole query was
|
|
82
|
+
one substring needle, so a catalog holding `resource_clock: Current server
|
|
83
|
+
time and timezone.` returned `NO_MATCH` for `resource_clock time timezone` —
|
|
84
|
+
the tool's own name plus the words a model expects to find — while the bare
|
|
85
|
+
name selected it. Adding a true word could only ever subtract. The phrase pass
|
|
86
|
+
is unchanged and still wins, so every query that selected something selects
|
|
87
|
+
the same things in the same order; only when it finds nothing are the words
|
|
88
|
+
matched, ranked by how many an entry carries.
|
|
89
|
+
|
|
90
|
+
The rule now also reaches the model, which is the half that made the empty
|
|
91
|
+
answer a dead end: the generated `tool_search` description and the `query`
|
|
92
|
+
schema both state that the query is matched as a phrase first and word by word
|
|
93
|
+
after, and that an exact name always wins. An empty answer with no stated rule
|
|
94
|
+
is indistinguishable from "no such tool" and from "not allowed".
|
|
95
|
+
|
|
18
96
|
## [0.84.0] — 2026-09-07
|
|
19
97
|
|
|
20
98
|
### ⚠️ Breaking changes
|
|
@@ -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
|
+
{"version":3,"file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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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deferred-tool-search.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/deferred-tool-search.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,+BAA+B,EACrC,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EACL,KAAK,6BAA6B,EAGlC,8BAA8B,EAC9B,kCAAkC,EAClC,KAAK,uBAAuB,EAC7B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AAExD,KAAK,gBAAgB,GAAG,+BAA+B,CACrD,OAAO,kCAAkC,EACzC,OAAO,8BAA8B,CACtC,CAAC;
|
|
1
|
+
{"version":3,"file":"deferred-tool-search.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/deferred-tool-search.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,+BAA+B,EACrC,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EACL,KAAK,6BAA6B,EAGlC,8BAA8B,EAC9B,kCAAkC,EAClC,KAAK,uBAAuB,EAC7B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AAExD,KAAK,gBAAgB,GAAG,+BAA+B,CACrD,OAAO,kCAAkC,EACzC,OAAO,8BAA8B,CACtC,CAAC;AAiBF,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG,gBAAgB,CAmBxE;AAED,wBAAgB,wBAAwB,CAAC,OAAO,EAC9C,MAAM,EAAE,6BAA6B,CAAC,OAAO,CAAC,EAC9C,UAAU,EAAE,sBAAsB,CAAC,OAAO,CAAC,EAC3C,OAAO,EAAE,uBAAuB,GAC/B,gBAAgB,CA8GlB"}
|
|
@@ -7,6 +7,23 @@ export declare function uniqueKnown(names: readonly string[], surface: DeferredR
|
|
|
7
7
|
rejected: number;
|
|
8
8
|
};
|
|
9
9
|
export declare function schemaBytes(names: readonly string[], surface: DeferredResolvedSurface): number;
|
|
10
|
+
/**
|
|
11
|
+
* Rank the catalog against a query, whole phrase first and words after.
|
|
12
|
+
*
|
|
13
|
+
* The whole trimmed query used to be the only needle, so a model that did the
|
|
14
|
+
* natural thing — naming the tool and adding the words it expected to find,
|
|
15
|
+
* `resource_clock time timezone` — got `NO_MATCH` from a catalog that held
|
|
16
|
+
* `resource_clock: Current server time and timezone.`, while the bare name
|
|
17
|
+
* selected it. An empty answer is indistinguishable from "no such tool" and
|
|
18
|
+
* from "you are not allowed", so the model learned nothing it could act on and
|
|
19
|
+
* the fix was to guess a shorter query.
|
|
20
|
+
*
|
|
21
|
+
* The phrase pass is unchanged and still wins: every query that selected
|
|
22
|
+
* something before selects the same things in the same order. Only when it
|
|
23
|
+
* finds nothing do the words get their turn, ranked by how many of them an
|
|
24
|
+
* entry matches — deterministic, and a fallback rather than a second ranking
|
|
25
|
+
* competing with the first.
|
|
26
|
+
*/
|
|
10
27
|
export declare function ranked(query: string, manifest: readonly DeferredAgentToolManifestEntry[]): string[];
|
|
11
28
|
export declare function latestSelection(messages: readonly ModelMessage[], searchName: string, runId: string, surface: DeferredResolvedSurface, maxSelectedTools: number): {
|
|
12
29
|
selected: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deferred-tool-selection.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/deferred-tool-selection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AACvC,OAAO,EACL,KAAK,8BAA8B,EAEnC,KAAK,uBAAuB,EAC7B,MAAM,uBAAuB,CAAC;AAG/B,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAEhD;AACD,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAG1D;AACD,wBAAgB,WAAW,CACzB,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,OAAO,EAAE,uBAAuB,GAC/B;IAAE,KAAK,EAAE,MAAM,EAAE,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAWvC;AACD,wBAAgB,WAAW,CACzB,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,OAAO,EAAE,uBAAuB,GAC/B,MAAM,CAQR;AACD,wBAAgB,MAAM,CACpB,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,SAAS,8BAA8B,EAAE,GAClD,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"deferred-tool-selection.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/deferred-tool-selection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AACvC,OAAO,EACL,KAAK,8BAA8B,EAEnC,KAAK,uBAAuB,EAC7B,MAAM,uBAAuB,CAAC;AAG/B,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAEhD;AACD,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAG1D;AACD,wBAAgB,WAAW,CACzB,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,OAAO,EAAE,uBAAuB,GAC/B;IAAE,KAAK,EAAE,MAAM,EAAE,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAWvC;AACD,wBAAgB,WAAW,CACzB,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,OAAO,EAAE,uBAAuB,GAC/B,MAAM,CAQR;AACD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,MAAM,CACpB,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,SAAS,8BAA8B,EAAE,GAClD,MAAM,EAAE,CAGV;AAyDD,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,SAAS,YAAY,EAAE,EACjC,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,uBAAuB,EAChC,gBAAgB,EAAE,MAAM,GACvB;IAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;IAAC,MAAM,EAAE,SAAS,GAAG,SAAS,CAAA;CAAE,CA8BvD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deferred-tool-types.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/deferred-tool-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAClC,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACtD,OAAO,KAAK,EAAE,uBAAuB,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACvF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAClF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AAEjF,eAAO,MAAM,kCAAkC;;;;;
|
|
1
|
+
{"version":3,"file":"deferred-tool-types.d.ts","sourceRoot":"","sources":["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GAAG,MAAM,CAAC;CAC/D,CACJ,CAAC;AACJ,MAAM,WAAW,uBAAuB;IACtC,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,kCAAkC,CAAC;IAC/C,QAAQ,EAAE,SAAS,8BAA8B,EAAE,CAAC;IACpD,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,8BAA8B,CAAC,CAAC;IAC5D,WAAW,EAAE,8BAA8B,CAAC;IAC5C,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;CAC7B;AACD,MAAM,WAAW,2BAA2B,CAAC,OAAO;IAClD,KAAK,CACH,UAAU,EAAE,sBAAsB,CAAC,OAAO,CAAC,EAC3C,MAAM,CAAC,EAAE,4BAA4B,GACpC,OAAO,CAAC;IACX,WAAW,CACT,sBAAsB,CAAC,EAAE,uBAAuB,CAAC,OAAO,CAAC,GACxD,uBAAuB,CAAC,OAAO,CAAC,CAAC;CACrC"}
|
|
@@ -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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F,MAAM,WAAW,yBAAyB;IACxC,MAAM,EAAE,UAAU,GAAG,WAAW,GAAG,KAAK,CAAC;IACzC,MAAM,EAAE,uBAAuB,CAAC;CACjC;AAiBD,yFAAyF;AACzF,wBAAgB,8BAA8B,CAC5C,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,CAuhChC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { AgentRuntimeEvent } from './event-schema.js';
|
|
2
|
+
import { type AgentRun, type AgentSnapshot } from './schemas.js';
|
|
3
|
+
import type { AgentRuntimeStore } from './store.js';
|
|
4
|
+
type TerminalOperationPhase = 'completed' | 'failed' | 'cancelled';
|
|
5
|
+
export interface AgentRunOperationLifecycleConfig {
|
|
6
|
+
store: AgentRuntimeStore;
|
|
7
|
+
runtimeEpoch: string;
|
|
8
|
+
currentRun(): AgentRun;
|
|
9
|
+
acceptSnapshot(snapshot: AgentSnapshot): void;
|
|
10
|
+
publish(event: AgentRuntimeEvent): Promise<void>;
|
|
11
|
+
now(): Date;
|
|
12
|
+
}
|
|
13
|
+
/** One durable latest-operation state machine for an executing run. */
|
|
14
|
+
export declare function createAgentRunOperationLifecycle(config: AgentRunOperationLifecycleConfig): {
|
|
15
|
+
startCompaction(operationId: string): Promise<void>;
|
|
16
|
+
startModelRequest(providerCallId: string, step: number): Promise<void>;
|
|
17
|
+
firstOutput(): Promise<void>;
|
|
18
|
+
finish(phase: TerminalOperationPhase): Promise<void>;
|
|
19
|
+
};
|
|
20
|
+
export {};
|
|
21
|
+
//# 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,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;IA+BrF,eAAe,cAAc,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAUnD,iBAAiB,iBAAiB,MAAM,QAAQ,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAWtE,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
|
updated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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkBhC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sqlite.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/sqlite.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAe,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAGL,KAAK,uBAAuB,EAC7B,MAAM,iBAAiB,CAAC;AAIzB,OAAO,EAML,uBAAuB,EACxB,MAAM,gBAAgB,CAAC;AAExB,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEvF,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,EAAE,cAAc,CAAC;IACzB,sEAAsE;IACtE,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,UAAU,CAAC,OAAO,uBAAuB,CAAC,cAAc,CAAC,CAAC,CAAC;IAClE,aAAa,EAAE,uBAAuB,CAAC;IACvC,oFAAoF;IACpF,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB;AAqGD;;;GAGG;AACH,wBAAgB,4BAA4B,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,CAwF3E;AAED,wBAAgB,6BAA6B,CAC3C,MAAM,EAAE,6BAA6B,GACpC,uBAAuB,
|
|
1
|
+
{"version":3,"file":"sqlite.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/sqlite.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAe,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAGL,KAAK,uBAAuB,EAC7B,MAAM,iBAAiB,CAAC;AAIzB,OAAO,EAML,uBAAuB,EACxB,MAAM,gBAAgB,CAAC;AAExB,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEvF,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,EAAE,cAAc,CAAC;IACzB,sEAAsE;IACtE,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,UAAU,CAAC,OAAO,uBAAuB,CAAC,cAAc,CAAC,CAAC,CAAC;IAClE,aAAa,EAAE,uBAAuB,CAAC;IACvC,oFAAoF;IACpF,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB;AAqGD;;;GAGG;AACH,wBAAgB,4BAA4B,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,CAwF3E;AAED,wBAAgB,6BAA6B,CAC3C,MAAM,EAAE,6BAA6B,GACpC,uBAAuB,CA+azB"}
|
|
@@ -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>;
|
|
@@ -587,7 +605,14 @@ export type AgentStoreCompareAndSwapResult = {
|
|
|
587
605
|
};
|
|
588
606
|
export interface AgentRuntimeStoreDriver<TRANSACTION> {
|
|
589
607
|
conversations?: AgentConversationPurgeDriver<TRANSACTION>;
|
|
590
|
-
|
|
608
|
+
/**
|
|
609
|
+
* Run one coherent store operation. `read` lets an adapter take a stable
|
|
610
|
+
* snapshot without reserving its writer slot; absent options retain the
|
|
611
|
+
* write-safe transaction used by existing adapters.
|
|
612
|
+
*/
|
|
613
|
+
transaction<RESULT>(work: (transaction: TRANSACTION) => Promise<RESULT>, options?: {
|
|
614
|
+
access: 'read' | 'write';
|
|
615
|
+
}): Promise<RESULT>;
|
|
591
616
|
head: {
|
|
592
617
|
load(transaction: TRANSACTION, conversationId: string): Promise<AgentRuntimeHead | undefined>;
|
|
593
618
|
compareAndSwap(transaction: TRANSACTION, input: {
|
|
@@ -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,KAAK,YAAY,EAIjB,KAAK,QAAQ,EAKd,MAAM,WAAW,CAAC;AACnB,OAAO,EAML,KAAK,oBAAoB,EAEzB,KAAK,iBAAiB,
|
|
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,KAAK,YAAY,EAIjB,KAAK,QAAQ,EAKd,MAAM,WAAW,CAAC;AACnB,OAAO,EAML,KAAK,oBAAoB,EAEzB,KAAK,iBAAiB,EAgBvB,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,KAAK,4BAA4B,EAElC,MAAM,eAAe,CAA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