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.
Files changed (40) hide show
  1. package/CHANGELOG.md +78 -0
  2. package/dist/agent-runtime/control-schema.d.ts +61 -0
  3. package/dist/agent-runtime/control-schema.d.ts.map +1 -1
  4. package/dist/agent-runtime/deferred-tool-search.d.ts.map +1 -1
  5. package/dist/agent-runtime/deferred-tool-selection.d.ts +17 -0
  6. package/dist/agent-runtime/deferred-tool-selection.d.ts.map +1 -1
  7. package/dist/agent-runtime/deferred-tool-types.d.ts.map +1 -1
  8. package/dist/agent-runtime/event-schema.d.ts +88 -1
  9. package/dist/agent-runtime/event-schema.d.ts.map +1 -1
  10. package/dist/agent-runtime/run-execution.d.ts.map +1 -1
  11. package/dist/agent-runtime/run-operation-lifecycle.d.ts +21 -0
  12. package/dist/agent-runtime/run-operation-lifecycle.d.ts.map +1 -0
  13. package/dist/agent-runtime/schemas.d.ts +67 -0
  14. package/dist/agent-runtime/schemas.d.ts.map +1 -1
  15. package/dist/agent-runtime/sqlite.d.ts.map +1 -1
  16. package/dist/agent-runtime/store-driver.d.ts +26 -1
  17. package/dist/agent-runtime/store-driver.d.ts.map +1 -1
  18. package/dist/agent-runtime/store.d.ts +208 -0
  19. package/dist/agent-runtime/store.d.ts.map +1 -1
  20. package/dist/agent-runtime/terminal-commit.d.ts +9 -0
  21. package/dist/agent-runtime/terminal-commit.d.ts.map +1 -1
  22. package/dist/agent-runtime-browser.js +11 -3
  23. package/dist/agent-runtime-harness.js +4 -4
  24. package/dist/agent-runtime-sqlite-bun.js +3 -3
  25. package/dist/agent-runtime-sqlite-node.js +3 -3
  26. package/dist/agent-runtime.d.ts +2 -2
  27. package/dist/agent-runtime.d.ts.map +1 -1
  28. package/dist/agent-runtime.js +32 -6
  29. package/dist/{index-85vfqd7m.js → index-4hk633vz.js} +11 -3
  30. package/dist/{index-cksjz4eg.js → index-66nxrgy0.js} +17 -16
  31. package/dist/{index-st8v8739.js → index-9merfjxf.js} +141 -14
  32. package/dist/{index-5s3zajp8.js → index-ff0kcqvp.js} +9 -3
  33. package/dist/{index-19eet1qx.js → index-fq492hg0.js} +31 -5
  34. package/dist/{index-x1th9s8c.js → index-x15ss2dx.js} +50 -1
  35. package/dist/testing.js +26 -2
  36. package/dist/tools/async-operation.d.ts +18 -1
  37. package/dist/tools/async-operation.d.ts.map +1 -1
  38. package/dist/tools.js +3 -1
  39. package/llms-full.txt +69 -8
  40. package/package.json +1 -1
@@ -201,6 +201,24 @@ export declare const AgentStoreAppliedSchema: z.ZodObject<{
201
201
  }>;
202
202
  }, z.core.$strip>>;
203
203
  }, z.core.$strip>>;
204
+ lastOperation: z.ZodOptional<z.ZodObject<{
205
+ operationId: z.ZodString;
206
+ kind: z.ZodEnum<{
207
+ compaction: "compaction";
208
+ "model-request": "model-request";
209
+ }>;
210
+ phase: z.ZodEnum<{
211
+ cancelled: "cancelled";
212
+ completed: "completed";
213
+ failed: "failed";
214
+ "first-output": "first-output";
215
+ started: "started";
216
+ }>;
217
+ step: z.ZodOptional<z.ZodInt>;
218
+ startedAt: z.ZodISODateTime;
219
+ firstOutputAt: z.ZodOptional<z.ZodISODateTime>;
220
+ finishedAt: z.ZodOptional<z.ZodISODateTime>;
221
+ }, z.core.$strip>>;
204
222
  createdAt: z.ZodISODateTime;
205
223
  updatedAt: z.ZodISODateTime;
206
224
  }, z.core.$strip>>;
@@ -398,6 +416,24 @@ export declare const AgentStoreDuplicateSchema: z.ZodObject<{
398
416
  }>;
399
417
  }, z.core.$strip>>;
400
418
  }, z.core.$strip>>;
419
+ lastOperation: z.ZodOptional<z.ZodObject<{
420
+ operationId: z.ZodString;
421
+ kind: z.ZodEnum<{
422
+ compaction: "compaction";
423
+ "model-request": "model-request";
424
+ }>;
425
+ phase: z.ZodEnum<{
426
+ cancelled: "cancelled";
427
+ completed: "completed";
428
+ failed: "failed";
429
+ "first-output": "first-output";
430
+ started: "started";
431
+ }>;
432
+ step: z.ZodOptional<z.ZodInt>;
433
+ startedAt: z.ZodISODateTime;
434
+ firstOutputAt: z.ZodOptional<z.ZodISODateTime>;
435
+ finishedAt: z.ZodOptional<z.ZodISODateTime>;
436
+ }, z.core.$strip>>;
401
437
  createdAt: z.ZodISODateTime;
402
438
  updatedAt: z.ZodISODateTime;
403
439
  }, z.core.$strip>;
@@ -682,6 +718,24 @@ export declare const AgentStoreDuplicateSchema: z.ZodObject<{
682
718
  }>;
683
719
  }, z.core.$strip>>;
684
720
  }, z.core.$strip>>;
721
+ lastOperation: z.ZodOptional<z.ZodObject<{
722
+ operationId: z.ZodString;
723
+ kind: z.ZodEnum<{
724
+ compaction: "compaction";
725
+ "model-request": "model-request";
726
+ }>;
727
+ phase: z.ZodEnum<{
728
+ cancelled: "cancelled";
729
+ completed: "completed";
730
+ failed: "failed";
731
+ "first-output": "first-output";
732
+ started: "started";
733
+ }>;
734
+ step: z.ZodOptional<z.ZodInt>;
735
+ startedAt: z.ZodISODateTime;
736
+ firstOutputAt: z.ZodOptional<z.ZodISODateTime>;
737
+ finishedAt: z.ZodOptional<z.ZodISODateTime>;
738
+ }, z.core.$strip>>;
685
739
  createdAt: z.ZodISODateTime;
686
740
  updatedAt: z.ZodISODateTime;
687
741
  }, z.core.$strip>>;
@@ -880,6 +934,24 @@ export declare const AgentStoreMutationResultSchema: z.ZodDiscriminatedUnion<[z.
880
934
  }>;
881
935
  }, z.core.$strip>>;
882
936
  }, z.core.$strip>>;
937
+ lastOperation: z.ZodOptional<z.ZodObject<{
938
+ operationId: z.ZodString;
939
+ kind: z.ZodEnum<{
940
+ compaction: "compaction";
941
+ "model-request": "model-request";
942
+ }>;
943
+ phase: z.ZodEnum<{
944
+ cancelled: "cancelled";
945
+ completed: "completed";
946
+ failed: "failed";
947
+ "first-output": "first-output";
948
+ started: "started";
949
+ }>;
950
+ step: z.ZodOptional<z.ZodInt>;
951
+ startedAt: z.ZodISODateTime;
952
+ firstOutputAt: z.ZodOptional<z.ZodISODateTime>;
953
+ finishedAt: z.ZodOptional<z.ZodISODateTime>;
954
+ }, z.core.$strip>>;
883
955
  createdAt: z.ZodISODateTime;
884
956
  updatedAt: z.ZodISODateTime;
885
957
  }, z.core.$strip>>;
@@ -1076,6 +1148,24 @@ export declare const AgentStoreMutationResultSchema: z.ZodDiscriminatedUnion<[z.
1076
1148
  }>;
1077
1149
  }, z.core.$strip>>;
1078
1150
  }, z.core.$strip>>;
1151
+ lastOperation: z.ZodOptional<z.ZodObject<{
1152
+ operationId: z.ZodString;
1153
+ kind: z.ZodEnum<{
1154
+ compaction: "compaction";
1155
+ "model-request": "model-request";
1156
+ }>;
1157
+ phase: z.ZodEnum<{
1158
+ cancelled: "cancelled";
1159
+ completed: "completed";
1160
+ failed: "failed";
1161
+ "first-output": "first-output";
1162
+ started: "started";
1163
+ }>;
1164
+ step: z.ZodOptional<z.ZodInt>;
1165
+ startedAt: z.ZodISODateTime;
1166
+ firstOutputAt: z.ZodOptional<z.ZodISODateTime>;
1167
+ finishedAt: z.ZodOptional<z.ZodISODateTime>;
1168
+ }, z.core.$strip>>;
1079
1169
  createdAt: z.ZodISODateTime;
1080
1170
  updatedAt: z.ZodISODateTime;
1081
1171
  }, z.core.$strip>;
@@ -1360,6 +1450,24 @@ export declare const AgentStoreMutationResultSchema: z.ZodDiscriminatedUnion<[z.
1360
1450
  }>;
1361
1451
  }, z.core.$strip>>;
1362
1452
  }, z.core.$strip>>;
1453
+ lastOperation: z.ZodOptional<z.ZodObject<{
1454
+ operationId: z.ZodString;
1455
+ kind: z.ZodEnum<{
1456
+ compaction: "compaction";
1457
+ "model-request": "model-request";
1458
+ }>;
1459
+ phase: z.ZodEnum<{
1460
+ cancelled: "cancelled";
1461
+ completed: "completed";
1462
+ failed: "failed";
1463
+ "first-output": "first-output";
1464
+ started: "started";
1465
+ }>;
1466
+ step: z.ZodOptional<z.ZodInt>;
1467
+ startedAt: z.ZodISODateTime;
1468
+ firstOutputAt: z.ZodOptional<z.ZodISODateTime>;
1469
+ finishedAt: z.ZodOptional<z.ZodISODateTime>;
1470
+ }, z.core.$strip>>;
1363
1471
  createdAt: z.ZodISODateTime;
1364
1472
  updatedAt: z.ZodISODateTime;
1365
1473
  }, z.core.$strip>>;
@@ -1482,6 +1590,24 @@ export declare const AgentRunViewSchema: z.ZodObject<{
1482
1590
  }>;
1483
1591
  }, z.core.$strip>>;
1484
1592
  }, z.core.$strip>>;
1593
+ lastOperation: z.ZodOptional<z.ZodObject<{
1594
+ operationId: z.ZodString;
1595
+ kind: z.ZodEnum<{
1596
+ compaction: "compaction";
1597
+ "model-request": "model-request";
1598
+ }>;
1599
+ phase: z.ZodEnum<{
1600
+ cancelled: "cancelled";
1601
+ completed: "completed";
1602
+ failed: "failed";
1603
+ "first-output": "first-output";
1604
+ started: "started";
1605
+ }>;
1606
+ step: z.ZodOptional<z.ZodInt>;
1607
+ startedAt: z.ZodISODateTime;
1608
+ firstOutputAt: z.ZodOptional<z.ZodISODateTime>;
1609
+ finishedAt: z.ZodOptional<z.ZodISODateTime>;
1610
+ }, z.core.$strip>>;
1485
1611
  createdAt: z.ZodISODateTime;
1486
1612
  updatedAt: z.ZodISODateTime;
1487
1613
  }, z.core.$strip>;
@@ -1767,6 +1893,24 @@ export declare const AcceptInputAndAssignRunSchema: z.ZodObject<{
1767
1893
  }>;
1768
1894
  }, z.core.$strip>>;
1769
1895
  }, z.core.$strip>>;
1896
+ lastOperation: z.ZodOptional<z.ZodObject<{
1897
+ operationId: z.ZodString;
1898
+ kind: z.ZodEnum<{
1899
+ compaction: "compaction";
1900
+ "model-request": "model-request";
1901
+ }>;
1902
+ phase: z.ZodEnum<{
1903
+ cancelled: "cancelled";
1904
+ completed: "completed";
1905
+ failed: "failed";
1906
+ "first-output": "first-output";
1907
+ started: "started";
1908
+ }>;
1909
+ step: z.ZodOptional<z.ZodInt>;
1910
+ startedAt: z.ZodISODateTime;
1911
+ firstOutputAt: z.ZodOptional<z.ZodISODateTime>;
1912
+ finishedAt: z.ZodOptional<z.ZodISODateTime>;
1913
+ }, z.core.$strip>>;
1770
1914
  createdAt: z.ZodISODateTime;
1771
1915
  updatedAt: z.ZodISODateTime;
1772
1916
  }, z.core.$strip>;
@@ -1932,6 +2076,31 @@ export declare const CheckpointRunAssistantSchema: z.ZodObject<{
1932
2076
  }, z.core.$strip>>;
1933
2077
  }, z.core.$strip>>;
1934
2078
  }, z.core.$strip>;
2079
+ export declare const RecordRunOperationSchema: z.ZodObject<{
2080
+ conversationId: z.ZodString;
2081
+ runId: z.ZodString;
2082
+ expectedRevision: z.ZodInt;
2083
+ ownerId: z.ZodString;
2084
+ fencingToken: z.ZodOptional<z.ZodInt>;
2085
+ operation: z.ZodObject<{
2086
+ operationId: z.ZodString;
2087
+ kind: z.ZodEnum<{
2088
+ compaction: "compaction";
2089
+ "model-request": "model-request";
2090
+ }>;
2091
+ phase: z.ZodEnum<{
2092
+ cancelled: "cancelled";
2093
+ completed: "completed";
2094
+ failed: "failed";
2095
+ "first-output": "first-output";
2096
+ started: "started";
2097
+ }>;
2098
+ step: z.ZodOptional<z.ZodInt>;
2099
+ startedAt: z.ZodISODateTime;
2100
+ firstOutputAt: z.ZodOptional<z.ZodISODateTime>;
2101
+ finishedAt: z.ZodOptional<z.ZodISODateTime>;
2102
+ }, z.core.$strip>;
2103
+ }, z.core.$strip>;
1935
2104
  export declare const CommitRunTerminalSchema: z.ZodObject<{
1936
2105
  conversationId: z.ZodString;
1937
2106
  runId: z.ZodString;
@@ -2218,6 +2387,7 @@ export declare const ReplaceCompactedRangeSchema: z.ZodObject<{
2218
2387
  export type AcceptInputAndAssignRun = z.infer<typeof AcceptInputAndAssignRunSchema>;
2219
2388
  export type AcquireAgentRun = z.infer<typeof AcquireAgentRunSchema>;
2220
2389
  export type CheckpointRunAssistant = z.infer<typeof CheckpointRunAssistantSchema>;
2390
+ export type RecordRunOperation = z.infer<typeof RecordRunOperationSchema>;
2221
2391
  export type CommitRunTerminal = z.infer<typeof CommitRunTerminalSchema>;
2222
2392
  export type RequestRunInterrupt = z.infer<typeof RequestRunInterruptSchema>;
2223
2393
  export type RecoverAgentRun = z.infer<typeof RecoverAgentRunSchema>;
@@ -2321,6 +2491,24 @@ export declare const AgentRecoverableDescriptorSchema: z.ZodObject<{
2321
2491
  }>;
2322
2492
  }, z.core.$strip>>;
2323
2493
  }, z.core.$strip>>;
2494
+ lastOperation: z.ZodOptional<z.ZodObject<{
2495
+ operationId: z.ZodString;
2496
+ kind: z.ZodEnum<{
2497
+ compaction: "compaction";
2498
+ "model-request": "model-request";
2499
+ }>;
2500
+ phase: z.ZodEnum<{
2501
+ cancelled: "cancelled";
2502
+ completed: "completed";
2503
+ failed: "failed";
2504
+ "first-output": "first-output";
2505
+ started: "started";
2506
+ }>;
2507
+ step: z.ZodOptional<z.ZodInt>;
2508
+ startedAt: z.ZodISODateTime;
2509
+ firstOutputAt: z.ZodOptional<z.ZodISODateTime>;
2510
+ finishedAt: z.ZodOptional<z.ZodISODateTime>;
2511
+ }, z.core.$strip>>;
2324
2512
  createdAt: z.ZodISODateTime;
2325
2513
  updatedAt: z.ZodISODateTime;
2326
2514
  }, z.core.$strip>;
@@ -2425,6 +2613,24 @@ export declare const AgentRecoverablePageSchema: z.ZodObject<{
2425
2613
  }>;
2426
2614
  }, z.core.$strip>>;
2427
2615
  }, z.core.$strip>>;
2616
+ lastOperation: z.ZodOptional<z.ZodObject<{
2617
+ operationId: z.ZodString;
2618
+ kind: z.ZodEnum<{
2619
+ compaction: "compaction";
2620
+ "model-request": "model-request";
2621
+ }>;
2622
+ phase: z.ZodEnum<{
2623
+ cancelled: "cancelled";
2624
+ completed: "completed";
2625
+ failed: "failed";
2626
+ "first-output": "first-output";
2627
+ started: "started";
2628
+ }>;
2629
+ step: z.ZodOptional<z.ZodInt>;
2630
+ startedAt: z.ZodISODateTime;
2631
+ firstOutputAt: z.ZodOptional<z.ZodISODateTime>;
2632
+ finishedAt: z.ZodOptional<z.ZodISODateTime>;
2633
+ }, z.core.$strip>>;
2428
2634
  createdAt: z.ZodISODateTime;
2429
2635
  updatedAt: z.ZodISODateTime;
2430
2636
  }, z.core.$strip>;
@@ -2464,6 +2670,8 @@ export interface AgentRuntimeStore {
2464
2670
  acceptInputAndAssignRun(input: AcceptInputAndAssignRun): Promise<AgentStoreMutationResult>;
2465
2671
  acquireRun(input: AcquireAgentRun): Promise<AgentStoreMutationResult>;
2466
2672
  checkpointRunAssistant(input: CheckpointRunAssistant): Promise<AgentStoreMutationResult>;
2673
+ /** Durably replace the run's latest observable model/compaction operation. */
2674
+ recordRunOperation(input: RecordRunOperation): Promise<AgentStoreMutationResult>;
2467
2675
  requestRunInterrupt(input: RequestRunInterrupt): Promise<AgentStoreMutationResult>;
2468
2676
  recoverRun(input: RecoverAgentRun): Promise<AgentStoreMutationResult>;
2469
2677
  commitRunTerminal(input: CommitRunTerminal): Promise<AgentStoreMutationResult>;
@@ -1 +1 @@
1
- {"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,2BAA2B,EAAE,4BAA4B,EAAE,MAAM,SAAS,CAAC;AACzF,OAAO,EAIL,KAAK,QAAQ,EAEb,KAAK,aAAa,EAInB,MAAM,WAAW,CAAC;AAEnB,eAAO,MAAM,wBAAwB;;;iBAGnC,CAAC;AACH,eAAO,MAAM,wBAAwB;;iBAAgD,CAAC;AACtF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAGlC,CAAC;AACH,eAAO,MAAM,yBA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,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;IACnF,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;IACtE,iBAAiB,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;IAC/E,qBAAqB,CAAC,KAAK,EAAE,qBAAqB,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;IACvF;;;;;;;OAOG;IACH,eAAe,CAAC,KAAK,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;CAC3F"}
@@ -119,6 +119,15 @@ export declare function appliedSnapshot(result: AgentStoreMutationResult, operat
119
119
  provenance: "computed" | "estimated" | "provider-reported" | "unavailable";
120
120
  } | undefined;
121
121
  } | undefined;
122
+ lastOperation?: {
123
+ operationId: string;
124
+ kind: "compaction" | "model-request";
125
+ phase: "cancelled" | "completed" | "failed" | "first-output" | "started";
126
+ step?: number | undefined;
127
+ startedAt: string;
128
+ firstOutputAt?: string | undefined;
129
+ finishedAt?: string | undefined;
130
+ } | undefined;
122
131
  createdAt: string;
123
132
  updatedAt: string;
124
133
  }[];
@@ -1 +1 @@
1
- {"version":3,"file":"terminal-commit.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/terminal-commit.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EAGjB,KAAK,QAAQ,EAEb,KAAK,mBAAmB,EACxB,KAAK,UAAU,EAChB,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAE,iBAAiB,EAAgB,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAGzF,qBAAa,yBAA0B,SAAQ,KAAK;IAClD,YAAY,SAAS,EAAE,MAAM,EAG5B;CACF;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,wBAAwB,EAAE,SA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AAY,SAAS,EAAE,MAAM,EAG5B;CACF;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,wBAAwB,EAAE,SAAS,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGlF;AAED,UAAU,uBAAuB;IAC/B,GAAG,EAAE,QAAQ,CAAC;IACd,SAAS,EAAE,YAAY,CAAC;IACxB,MAAM,EAAE,mBAAmB,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8DAA8D;IAC9D,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,eAAe,EAAE,MAAM,EAAE,CAAA;KAAE,EAAE,CAAC;CACzD;AAED,MAAM,WAAW,6BAA8B,SAAQ,uBAAuB;IAC5E;;;;;;OAMG;IACH,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,OAAO,CAAC;IAC3B;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAE,SAAS,QAAQ,EAAE,CAAC;CAChC;AAuID,wBAAsB,sBAAsB,CAAC,KAAK,EAAE;IAClD,KAAK,EAAE,iBAAiB,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,uBAAuB,CAAC;IACnC,GAAG,EAAE,MAAM,IAAI,CAAC;CACjB,GAAG,OAAO,CAAC,6BAA6B,CAAC,CA2DzC"}
@@ -7,13 +7,14 @@ import {
7
7
  createAgentControlView,
8
8
  reduceAgentControlEvent,
9
9
  reduceAgentControlSnapshot
10
- } from "./index-5s3zajp8.js";
10
+ } from "./index-ff0kcqvp.js";
11
11
  import {
12
12
  AgentAdmissionEventSchema,
13
13
  AgentCheckpointEventSchema,
14
14
  AgentReasoningDeltaEventSchema,
15
15
  AgentReasoningEndEventSchema,
16
16
  AgentReasoningStartEventSchema,
17
+ AgentRunOperationEventSchema,
17
18
  AgentRunStateEventSchema,
18
19
  AgentRuntimeEventCursorSchema,
19
20
  AgentRuntimeEventSchema,
@@ -22,7 +23,7 @@ import {
22
23
  AgentTransientDeltaEventSchema,
23
24
  advanceAgentRuntimeEventCursor,
24
25
  agentDurableEventId
25
- } from "./index-85vfqd7m.js";
26
+ } from "./index-4hk633vz.js";
26
27
  import {
27
28
  AgentAssistantPlaceholderSchema,
28
29
  AgentControlPartSchema,
@@ -40,6 +41,9 @@ import {
40
41
  AgentRecordIdSchema,
41
42
  AgentRecordVersionSchema,
42
43
  AgentRunMetricsSchema,
44
+ AgentRunOperationKindSchema,
45
+ AgentRunOperationPhaseSchema,
46
+ AgentRunOperationSchema,
43
47
  AgentRunQueuePrioritySchema,
44
48
  AgentRunSchema,
45
49
  AgentRunStateSchema,
@@ -55,7 +59,7 @@ import {
55
59
  AgentUsageSchema,
56
60
  AgentUsageValueSchema,
57
61
  runStateForTerminalReason
58
- } from "./index-x1th9s8c.js";
62
+ } from "./index-x15ss2dx.js";
59
63
  export {
60
64
  runStateForTerminalReason,
61
65
  reduceAgentControlSnapshot,
@@ -84,6 +88,10 @@ export {
84
88
  AgentRunStateEventSchema,
85
89
  AgentRunSchema,
86
90
  AgentRunQueuePrioritySchema,
91
+ AgentRunOperationSchema,
92
+ AgentRunOperationPhaseSchema,
93
+ AgentRunOperationKindSchema,
94
+ AgentRunOperationEventSchema,
87
95
  AgentRunMetricsSchema,
88
96
  AgentRecordVersionSchema,
89
97
  AgentRecordIdSchema,
@@ -2,7 +2,7 @@ import {
2
2
  composeAgentPrompt,
3
3
  createAgentRuntime,
4
4
  createAgentRuntimeEventSink
5
- } from "./index-st8v8739.js";
5
+ } from "./index-9merfjxf.js";
6
6
  import {
7
7
  AgentModelDescriptorSchema
8
8
  } from "./index-tg3m2ec5.js";
@@ -14,9 +14,9 @@ import {
14
14
  import {
15
15
  AgentControlRequestSchema,
16
16
  AgentControlResponseSchema
17
- } from "./index-5s3zajp8.js";
18
- import"./index-85vfqd7m.js";
19
- import"./index-x1th9s8c.js";
17
+ } from "./index-ff0kcqvp.js";
18
+ import"./index-4hk633vz.js";
19
+ import"./index-x15ss2dx.js";
20
20
  import"./index-3xnq72rz.js";
21
21
  import {
22
22
  defineRuntimeTool
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  createSqliteAgentRuntimeStore,
3
3
  initializeAgentRuntimeSqlite
4
- } from "./index-cksjz4eg.js";
5
- import"./index-19eet1qx.js";
4
+ } from "./index-66nxrgy0.js";
5
+ import"./index-fq492hg0.js";
6
6
  import"./index-y2s6h5bf.js";
7
- import"./index-x1th9s8c.js";
7
+ import"./index-x15ss2dx.js";
8
8
 
9
9
  // src/agent-runtime-sqlite-bun.ts
10
10
  import { Database } from "bun:sqlite";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  createSqliteAgentRuntimeStore,
3
3
  initializeAgentRuntimeSqlite
4
- } from "./index-cksjz4eg.js";
5
- import"./index-19eet1qx.js";
4
+ } from "./index-66nxrgy0.js";
5
+ import"./index-fq492hg0.js";
6
6
  import"./index-y2s6h5bf.js";
7
- import"./index-x1th9s8c.js";
7
+ import"./index-x15ss2dx.js";
8
8
 
9
9
  // src/agent-runtime-sqlite-node.ts
10
10
  import { DatabaseSync } from "node:sqlite";
@@ -3,7 +3,7 @@ export { AgentContextOverflowError } from './agent-runtime/context-refusal.js';
3
3
  export { type AgentConversationMessagePage, AgentConversationMessagePageSchema, type AgentConversationPage, AgentConversationPageSchema, type AgentConversationReader, type AgentConversationSummary, AgentConversationSummarySchema, } from './agent-runtime/conversations.js';
4
4
  export { type AgentCoordinatedRun, type AgentInputPolicy, type AgentRunTicket, type AgentSessionCloseOptions, type AgentSessionCloseResult, type AgentSessionCoordinator, type AgentStopReason, createAgentSessionCoordinator, } from './agent-runtime/coordinator.js';
5
5
  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, 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';
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';
7
7
  export { type AgentHistoryProjectionDecision, type AgentHistoryProjectionOptions, type AgentHistoryProjectionResult, projectAgentHistory, projectAgentHistoryDetailed, } from './agent-runtime/history.js';
8
8
  export { type AgentToolFenceConfig, type AgentToolFenceContext, createAgentToolFenceLifecycle, } from './agent-runtime/managed-tools.js';
9
9
  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';
@@ -15,7 +15,7 @@ export { AgentConversationPurgedError, type AgentConversationPurgeInput, AgentCo
15
15
  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
16
  export type { AgentRuntimeResult } from './agent-runtime/runtime-result.js';
17
17
  export * from './agent-runtime/schemas.js';
18
- 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 RecoverAgentRun, RecoverAgentRunSchema, type ReplaceCompactedRange, ReplaceCompactedRangeSchema, type RequestRunInterrupt, RequestRunInterruptSchema, } from './agent-runtime/store.js';
18
+ 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
19
  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';
20
20
  export type { AgentConversationPurgeDriver } from './agent-runtime/store-purge.js';
21
21
  export { AgentRuntimeConflictError } from './agent-runtime/terminal-commit.js';
@@ -1 +1 @@
1
- {"version":3,"file":"agent-runtime.d.ts","sourceRoot":"","sources":["../src/agent-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,+BAA+B,EACpC,K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0B,EAC1B,KAAK,gBAAgB,EACrB,sBAAsB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,8BAA8B,EACnC,KAAK,cAAc,EACnB,oBAAoB,EACpB,uBAAuB,EACvB,6BAA6B,GAC9B,MAAM,8BAA8B,CAAC;AACtC,YAAY,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAC;AAChF,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EACL,KAAK,0BAA0B,EAC/B,0BAA0B,GAC3B,MAAM,iCAAiC,CAAC"}
@@ -25,13 +25,14 @@ import {
25
25
  AgentStoredRunSchema,
26
26
  CheckpointRunAssistantSchema,
27
27
  CommitRunTerminalSchema,
28
+ RecordRunOperationSchema,
28
29
  RecoverAgentRunSchema,
29
30
  ReplaceCompactedRangeSchema,
30
31
  RequestRunInterruptSchema,
31
32
  createAgentRuntimeStore,
32
33
  createMemoryAgentRuntimeStore,
33
34
  purgeAgentConversation
34
- } from "./index-19eet1qx.js";
35
+ } from "./index-fq492hg0.js";
35
36
  import {
36
37
  AgentContextOverflowError,
37
38
  AgentRuntimeConflictError,
@@ -48,7 +49,7 @@ import {
48
49
  registerDeferredToolRepair,
49
50
  repairedSearchCall,
50
51
  selectAgentHistory
51
- } from "./index-st8v8739.js";
52
+ } from "./index-9merfjxf.js";
52
53
  import {
53
54
  AgentModelCapabilitySchema,
54
55
  AgentModelCatalogEntrySchema,
@@ -79,6 +80,7 @@ import {
79
80
  AgentReasoningDeltaEventSchema,
80
81
  AgentReasoningEndEventSchema,
81
82
  AgentReasoningStartEventSchema,
83
+ AgentRunOperationEventSchema,
82
84
  AgentRunStateEventSchema,
83
85
  AgentRuntimeEventCursorSchema,
84
86
  AgentRuntimeEventSchema,
@@ -87,7 +89,7 @@ import {
87
89
  AgentTransientDeltaEventSchema,
88
90
  advanceAgentRuntimeEventCursor,
89
91
  agentDurableEventId
90
- } from "./index-85vfqd7m.js";
92
+ } from "./index-4hk633vz.js";
91
93
  import {
92
94
  AgentAssistantPlaceholderSchema,
93
95
  AgentControlPartSchema,
@@ -105,6 +107,9 @@ import {
105
107
  AgentRecordIdSchema,
106
108
  AgentRecordVersionSchema,
107
109
  AgentRunMetricsSchema,
110
+ AgentRunOperationKindSchema,
111
+ AgentRunOperationPhaseSchema,
112
+ AgentRunOperationSchema,
108
113
  AgentRunQueuePrioritySchema,
109
114
  AgentRunSchema,
110
115
  AgentRunStateSchema,
@@ -120,7 +125,7 @@ import {
120
125
  AgentUsageSchema,
121
126
  AgentUsageValueSchema,
122
127
  runStateForTerminalReason
123
- } from "./index-x1th9s8c.js";
128
+ } from "./index-x15ss2dx.js";
124
129
  import {
125
130
  buildToolManifest,
126
131
  mountAgent
@@ -258,7 +263,7 @@ function structuredCompaction(config) {
258
263
  // src/agent-runtime/deferred-tool-types.ts
259
264
  import { z } from "zod";
260
265
  var DeferredAgentToolSearchInputSchema = z.object({
261
- query: z.string().min(1),
266
+ query: z.string().min(1).describe("An exact tool name, or words describing the tool. Matched as one phrase first, then word by word."),
262
267
  reason: z.enum(["inactive_call"]).optional()
263
268
  });
264
269
  var DeferredAgentToolMatchSchema = z.object({
@@ -316,6 +321,22 @@ function schemaBytes(names, surface) {
316
321
  return bytes;
317
322
  }
318
323
  function ranked(query, manifest) {
324
+ const phrase = rankedByPhrase(query, manifest);
325
+ return phrase.length > 0 ? phrase : rankedByWords(query, manifest);
326
+ }
327
+ function rankedByWords(query, manifest) {
328
+ const words = [
329
+ ...new Set(query.trim().toLocaleLowerCase().split(/\s+/u).filter((word) => word.length > 0))
330
+ ];
331
+ if (words.length < 2)
332
+ return [];
333
+ return manifest.map((entry, order) => {
334
+ const haystack = `${entry.name} ${entry.description}`.toLocaleLowerCase();
335
+ const hits = words.filter((word) => haystack.includes(word)).length;
336
+ return { name: entry.name, order, hits };
337
+ }).filter((entry) => entry.hits > 0).sort((left, right) => right.hits - left.hits || left.order - right.order).map((entry) => entry.name);
338
+ }
339
+ function rankedByPhrase(query, manifest) {
319
340
  const needle = query.trim().toLocaleLowerCase();
320
341
  return manifest.map((entry, order) => {
321
342
  const name = entry.name.toLocaleLowerCase();
@@ -358,7 +379,7 @@ function latestSelection(messages, searchName, runId, surface, maxSelectedTools)
358
379
  }
359
380
 
360
381
  // src/agent-runtime/deferred-tool-search.ts
361
- var description = "Search the available tool catalog and select exact tools for the next step.";
382
+ var description = "Search the available tool catalog and select exact tools for the next step. " + "The query is matched as one phrase against tool names and descriptions; " + "if nothing matches the phrase, its individual words are matched and the " + "tools matching the most words rank first. An exact tool name always wins, " + "so prefer one when you know it.";
362
383
  function placeholderDeferredSearch(name) {
363
384
  return defineRuntimeTool({
364
385
  name,
@@ -830,6 +851,7 @@ export {
830
851
  RequestRunInterruptSchema,
831
852
  ReplaceCompactedRangeSchema,
832
853
  RecoverAgentRunSchema,
854
+ RecordRunOperationSchema,
833
855
  DeferredAgentToolSearchInputSchema,
834
856
  DeferredAgentToolReceiptSchema,
835
857
  DeferredAgentToolMatchSchema,
@@ -868,6 +890,10 @@ export {
868
890
  AgentRunStartedEventSchema,
869
891
  AgentRunSchema,
870
892
  AgentRunQueuePrioritySchema,
893
+ AgentRunOperationSchema,
894
+ AgentRunOperationPhaseSchema,
895
+ AgentRunOperationKindSchema,
896
+ AgentRunOperationEventSchema,
871
897
  AgentRunMetricsSchema,
872
898
  AgentRunEventSchema,
873
899
  AgentRecoverablePageSchema,