stitchkit 0.136.0 → 0.136.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 +13 -0
- package/README.md +12 -0
- package/dist/agent-executor/executor-contract.d.ts.map +1 -1
- package/dist/agent-executor/vocabulary.d.ts +80 -0
- package/dist/agent-executor/vocabulary.d.ts.map +1 -1
- package/dist/agent-parts/model.d.ts +94 -0
- package/dist/agent-parts/model.d.ts.map +1 -1
- package/dist/agent-parts/parts.d.ts +176 -0
- package/dist/agent-parts/parts.d.ts.map +1 -1
- package/dist/agent-runtime/browser/browser-control-contract.d.ts +440 -0
- package/dist/agent-runtime/browser/browser-control-contract.d.ts.map +1 -1
- package/dist/agent-runtime/browser/control-schema.d.ts +528 -0
- package/dist/agent-runtime/browser/control-schema.d.ts.map +1 -1
- package/dist/agent-runtime/event-schema.d.ts +704 -0
- package/dist/agent-runtime/event-schema.d.ts.map +1 -1
- package/dist/agent-runtime/history/run-history-parts.d.ts.map +1 -1
- package/dist/agent-runtime/loop/provider-stream-parts.d.ts.map +1 -1
- package/dist/agent-runtime/loop/provider-stream-segments.d.ts +0 -2
- package/dist/agent-runtime/loop/provider-stream-segments.d.ts.map +1 -1
- package/dist/agent-runtime/loop/run-approval-signature.d.ts +5 -1
- package/dist/agent-runtime/loop/run-approval-signature.d.ts.map +1 -1
- package/dist/agent-runtime/loop/run-loop-events.d.ts +6 -1
- package/dist/agent-runtime/loop/run-loop-events.d.ts.map +1 -1
- package/dist/agent-runtime/loop/run-stream-parts.d.ts.map +1 -1
- package/dist/agent-runtime/loop/run-stream-recorded.d.ts.map +1 -1
- package/dist/agent-runtime/loop/run-tool-call.d.ts +11 -3
- package/dist/agent-runtime/loop/run-tool-call.d.ts.map +1 -1
- package/dist/agent-runtime/providers/ai-sdk-normalize.d.ts +4 -0
- package/dist/agent-runtime/providers/ai-sdk-normalize.d.ts.map +1 -1
- package/dist/agent-runtime/providers/ai-sdk-tools.d.ts.map +1 -1
- package/dist/agent-runtime/runtime-internals.d.ts +1 -3
- package/dist/agent-runtime/runtime-internals.d.ts.map +1 -1
- package/dist/agent-runtime/schemas-json-projection.d.ts +29 -0
- package/dist/agent-runtime/schemas-json-projection.d.ts.map +1 -0
- package/dist/agent-runtime/schemas-message.d.ts +88 -0
- package/dist/agent-runtime/schemas-message.d.ts.map +1 -1
- package/dist/agent-runtime/schemas-run.d.ts +88 -0
- package/dist/agent-runtime/schemas-run.d.ts.map +1 -1
- package/dist/agent-runtime/stores/branch-messages.d.ts.map +1 -1
- package/dist/agent-runtime/stores/branch-replay.d.ts +264 -0
- package/dist/agent-runtime/stores/branch-replay.d.ts.map +1 -1
- package/dist/agent-runtime/stores/conversations.d.ts +88 -0
- package/dist/agent-runtime/stores/conversations.d.ts.map +1 -1
- package/dist/agent-runtime/stores/sql-rows.d.ts +64 -0
- package/dist/agent-runtime/stores/sql-rows.d.ts.map +1 -1
- package/dist/agent-runtime/stores/store-driver-contract.d.ts +616 -0
- package/dist/agent-runtime/stores/store-driver-contract.d.ts.map +1 -1
- package/dist/agent-runtime/stores/store-events.d.ts +1056 -0
- package/dist/agent-runtime/stores/store-events.d.ts.map +1 -1
- package/dist/agent-runtime/stores/store.d.ts +1232 -0
- package/dist/agent-runtime/stores/store.d.ts.map +1 -1
- package/dist/agent-runtime/terminal-commit.d.ts +69 -5
- package/dist/agent-runtime/terminal-commit.d.ts.map +1 -1
- package/dist/agent-runtime/testing/store-conformance-lifecycle.d.ts +164 -36
- package/dist/agent-runtime/testing/store-conformance-lifecycle.d.ts.map +1 -1
- package/dist/agent-runtime/testing/store-conformance-support.d.ts +82 -18
- package/dist/agent-runtime/testing/store-conformance-support.d.ts.map +1 -1
- package/dist/application/diagnostic-journal-manager.d.ts +1 -1
- package/dist/application/diagnostic-journal-manager.d.ts.map +1 -1
- package/dist/application/notification-delivery.d.ts.map +1 -1
- package/dist/entrypoints/agent-executor/acp.js +5 -4
- package/dist/entrypoints/agent-executor/claude-sdk.js +7 -6
- package/dist/entrypoints/agent-executor/claude.js +7 -6
- package/dist/entrypoints/agent-executor/codex.js +6 -5
- package/dist/entrypoints/agent-executor/testing/claude-sdk.js +4 -3
- package/dist/entrypoints/agent-executor/testing.js +7 -6
- package/dist/entrypoints/agent-executor.js +7 -7
- package/dist/entrypoints/agent-runtime/ai-sdk.js +30 -24
- package/dist/entrypoints/agent-runtime/anthropic.js +3 -3
- package/dist/entrypoints/agent-runtime/browser.js +8 -7
- package/dist/entrypoints/agent-runtime/harness.js +14 -14
- package/dist/entrypoints/agent-runtime/openai.js +3 -3
- package/dist/entrypoints/agent-runtime/openrouter.js +3 -3
- package/dist/entrypoints/agent-runtime/postgres.js +9 -9
- package/dist/entrypoints/agent-runtime/realtime.js +9 -8
- package/dist/entrypoints/agent-runtime/sqlite/bun.js +10 -10
- package/dist/entrypoints/agent-runtime/sqlite/node.js +10 -10
- package/dist/entrypoints/agent-runtime/testing.js +8 -8
- package/dist/entrypoints/agent-runtime.js +21 -21
- package/dist/entrypoints/application/diagnostic-journal.js +14 -10
- package/dist/entrypoints/application.js +16 -4
- package/dist/entrypoints/tools/agent.js +2 -2
- package/dist/entrypoints/tools/toolkit.js +1 -1
- package/dist/entrypoints/tools.js +5 -3
- package/dist/index-1psbyyhj.js +21 -0
- package/dist/{index-kzsetgh9.js → index-26v8hjqm.js} +4 -4
- package/dist/{index-4243301z.js → index-2wm9b9vs.js} +5 -5
- package/dist/{index-tb36xawm.js → index-32ew02z1.js} +1 -1
- package/dist/{index-1en7k3q5.js → index-4q9tmzea.js} +3 -3
- package/dist/{index-shte29pg.js → index-8cnfgwg8.js} +148 -106
- package/dist/{index-mkmep637.js → index-9m1m92rg.js} +1 -1
- package/dist/index-a1rjr381.js +114 -0
- package/dist/{index-6kwdfb9m.js → index-akesakvj.js} +23 -4
- package/dist/{index-rg08syp1.js → index-d5mhgx72.js} +7 -5
- package/dist/{index-36mtj8xm.js → index-e4w0sfm1.js} +2 -2
- package/dist/{index-jperyn0c.js → index-gj4wdts6.js} +1 -1
- package/dist/{index-pd9e8rz4.js → index-gvv7y0s4.js} +1 -1
- package/dist/{index-vebzvse6.js → index-jy907kcs.js} +24 -1
- package/dist/{index-54wp467c.js → index-k5azb3v3.js} +4 -21
- package/dist/{index-qcy8et93.js → index-kaq9nb7h.js} +6 -6
- package/dist/{index-vse7x1qt.js → index-knqye3gv.js} +1 -1
- package/dist/{index-tav72wz5.js → index-ks4rhtcc.js} +5 -0
- package/dist/{index-xnqab06h.js → index-mtpcax6d.js} +3 -3
- package/dist/{index-7qza24g1.js → index-px9r6wv1.js} +1 -1
- package/dist/{index-epwvp88y.js → index-r9w7wfgn.js} +1 -1
- package/dist/{index-aacwkve4.js → index-sjq4akrx.js} +3 -5
- package/dist/{index-5dxgx3yj.js → index-tcv71frn.js} +1 -1
- package/dist/{index-1zy31r3b.js → index-v92djygb.js} +1 -1
- package/dist/{index-9f60gnfn.js → index-xaa3603f.js} +4 -11
- package/dist/{index-j3r7r1mh.js → index-yv7d6tav.js} +1 -1
- package/dist/{index-hberxns4.js → index-zagc12j1.js} +5 -5
- package/dist/{index-j5vzhj3d.js → index-zqc64g69.js} +3 -3
- package/dist/{index-hpzhz1vm.js → index-zthekmrt.js} +2 -2
- package/dist/internal/json-stringify.d.ts +37 -0
- package/dist/internal/json-stringify.d.ts.map +1 -0
- package/llms/agent-runtime.5.txt +1 -1
- package/llms/agent-runtime.txt +14 -0
- package/llms/application.2.txt +6 -3
- package/llms/application.3.txt +2 -1
- package/llms/application.txt +4 -1
- package/llms-full.txt +27 -6
- package/llms.txt +2 -2
- package/package.json +1 -1
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
AgentModelAssistantMessageSchema2,
|
|
14
14
|
AgentModelToolMessageSchema2,
|
|
15
15
|
AgentModelMessageSchema2
|
|
16
|
-
} from "../index-
|
|
16
|
+
} from "../index-jy907kcs.js";
|
|
17
17
|
import {
|
|
18
18
|
createBoundedSinkManager
|
|
19
19
|
} from "../index-7an2fs5h.js";
|
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
AgentUsageValueSchema2,
|
|
36
36
|
AgentCostValueSchema2,
|
|
37
37
|
AgentUsageSchema2
|
|
38
|
-
} from "../index-
|
|
38
|
+
} from "../index-yv7d6tav.js";
|
|
39
39
|
import {
|
|
40
40
|
AgentProviderEnvelopeSchema2,
|
|
41
41
|
AgentTextPartSchema2,
|
|
@@ -49,10 +49,10 @@ import {
|
|
|
49
49
|
AgentOpaquePartSchema2,
|
|
50
50
|
AgentControlPartSchema2,
|
|
51
51
|
AgentMessagePartSchema2
|
|
52
|
-
} from "../index-
|
|
52
|
+
} from "../index-ks4rhtcc.js";
|
|
53
53
|
import {
|
|
54
54
|
AgentProviderResponseSchema2
|
|
55
|
-
} from "../index-
|
|
55
|
+
} from "../index-px9r6wv1.js";
|
|
56
56
|
import {
|
|
57
57
|
AgentRunStateSchema2,
|
|
58
58
|
AgentRunQueuePrioritySchema2,
|
|
@@ -64,7 +64,7 @@ import {
|
|
|
64
64
|
AgentRunSchema2,
|
|
65
65
|
AgentSnapshotSchema2,
|
|
66
66
|
AgentRunMetricsSchema2
|
|
67
|
-
} from "../index-
|
|
67
|
+
} from "../index-gvv7y0s4.js";
|
|
68
68
|
import {
|
|
69
69
|
AgentAdmissionEventSchema2,
|
|
70
70
|
AgentTransientDeltaEventSchema2,
|
|
@@ -82,14 +82,7 @@ import {
|
|
|
82
82
|
AgentRuntimeEventCursorSchema2,
|
|
83
83
|
advanceAgentRuntimeEventCursor2,
|
|
84
84
|
agentDurableEventId2
|
|
85
|
-
} from "../index-
|
|
86
|
-
import {
|
|
87
|
-
AgentRuntimeConflictError2,
|
|
88
|
-
AgentRunUnsettledError2,
|
|
89
|
-
parseOptionalAgentUsage,
|
|
90
|
-
addUsage,
|
|
91
|
-
createIdleDeadline
|
|
92
|
-
} from "../index-9f60gnfn.js";
|
|
85
|
+
} from "../index-4q9tmzea.js";
|
|
93
86
|
import {
|
|
94
87
|
PurgeInvocationPayloadsInputSchema2,
|
|
95
88
|
PurgeInvocationPayloadsResultSchema2,
|
|
@@ -131,7 +124,7 @@ import {
|
|
|
131
124
|
AgentSeedReceiptSchema2,
|
|
132
125
|
AgentHistoryMutationSchema2,
|
|
133
126
|
ACTIVE_AGENT_RUN_STATES2
|
|
134
|
-
} from "../index-
|
|
127
|
+
} from "../index-kaq9nb7h.js";
|
|
135
128
|
import"../index-ha1tv70k.js";
|
|
136
129
|
import"../index-d1pdv8qc.js";
|
|
137
130
|
import"../index-dsa676h8.js";
|
|
@@ -178,7 +171,7 @@ import {
|
|
|
178
171
|
createAgentEventSearchTools2,
|
|
179
172
|
AgentStoreUnsupportedCapabilityError2,
|
|
180
173
|
createAgentRuntimeStore2
|
|
181
|
-
} from "../index-
|
|
174
|
+
} from "../index-d5mhgx72.js";
|
|
182
175
|
import {
|
|
183
176
|
AgentContextOverflowError2,
|
|
184
177
|
unknownUsage,
|
|
@@ -224,7 +217,7 @@ import {
|
|
|
224
217
|
AgentTokenCountSchema2,
|
|
225
218
|
selectAgentHistory2,
|
|
226
219
|
composeAgentPrompt2
|
|
227
|
-
} from "../index-
|
|
220
|
+
} from "../index-8cnfgwg8.js";
|
|
228
221
|
import"../index-m38ej7e5.js";
|
|
229
222
|
import"../index-dmrx8xma.js";
|
|
230
223
|
import {
|
|
@@ -262,13 +255,20 @@ import {
|
|
|
262
255
|
AgentConversationSummarySchema2,
|
|
263
256
|
AgentConversationPageSchema2,
|
|
264
257
|
AgentConversationMessagePageSchema2
|
|
265
|
-
} from "../index-
|
|
258
|
+
} from "../index-v92djygb.js";
|
|
266
259
|
import"../index-6kec3b14.js";
|
|
267
260
|
import"../index-tgehj4bp.js";
|
|
268
261
|
import"../index-5c4m8zdf.js";
|
|
269
262
|
import {
|
|
270
263
|
createMemoryAgentRuntimeStore2
|
|
271
|
-
} from "../index-
|
|
264
|
+
} from "../index-zqc64g69.js";
|
|
265
|
+
import {
|
|
266
|
+
AgentRuntimeConflictError2,
|
|
267
|
+
AgentRunUnsettledError2,
|
|
268
|
+
parseOptionalAgentUsage,
|
|
269
|
+
addUsage,
|
|
270
|
+
createIdleDeadline
|
|
271
|
+
} from "../index-xaa3603f.js";
|
|
272
272
|
import {
|
|
273
273
|
isAssistantHistoryEvidence2,
|
|
274
274
|
isCompleteAgentHistoryTurn
|
|
@@ -276,7 +276,7 @@ import {
|
|
|
276
276
|
import"../index-p9cab61p.js";
|
|
277
277
|
import {
|
|
278
278
|
createAgentRuntimeEventSink2
|
|
279
|
-
} from "../index-
|
|
279
|
+
} from "../index-gj4wdts6.js";
|
|
280
280
|
import {
|
|
281
281
|
isObjectSchemaType,
|
|
282
282
|
stripStrictOptionalNulls
|
|
@@ -287,7 +287,7 @@ import {
|
|
|
287
287
|
isAgentProviderError2,
|
|
288
288
|
classifyProviderFailure2,
|
|
289
289
|
isToolResultFailure2
|
|
290
|
-
} from "../index-
|
|
290
|
+
} from "../index-knqye3gv.js";
|
|
291
291
|
import {
|
|
292
292
|
buildToolManifest2
|
|
293
293
|
} from "../index-08a3qfr8.js";
|
|
@@ -300,7 +300,7 @@ import {
|
|
|
300
300
|
import {
|
|
301
301
|
zodToAgentInputJsonSchema,
|
|
302
302
|
mountAgentTools2
|
|
303
|
-
} from "../index-
|
|
303
|
+
} from "../index-k5azb3v3.js";
|
|
304
304
|
import"../index-rjs94dny.js";
|
|
305
305
|
import"../index-xrgn784x.js";
|
|
306
306
|
import"../index-bjrcbcn2.js";
|
|
@@ -20,6 +20,9 @@ import {
|
|
|
20
20
|
import"../../index-6kec3b14.js";
|
|
21
21
|
import"../../index-673drwkn.js";
|
|
22
22
|
import"../../index-jwtmw39p.js";
|
|
23
|
+
import {
|
|
24
|
+
projectJson
|
|
25
|
+
} from "../../index-a1rjr381.js";
|
|
23
26
|
import {
|
|
24
27
|
attemptExclusiveLock
|
|
25
28
|
} from "../../index-43k180c2.js";
|
|
@@ -41,9 +44,6 @@ import {
|
|
|
41
44
|
// src/application/diagnostic-journal.ts
|
|
42
45
|
import { randomUUID } from "node:crypto";
|
|
43
46
|
|
|
44
|
-
// src/application/diagnostic-journal-manager.ts
|
|
45
|
-
import { z as z5 } from "zod";
|
|
46
|
-
|
|
47
47
|
// src/application/diagnostic-journal-storage.ts
|
|
48
48
|
import { constants } from "node:fs";
|
|
49
49
|
import { lstat as lstat2, open, realpath, rename as rename2, unlink } from "node:fs/promises";
|
|
@@ -663,6 +663,13 @@ function waitForProgress(progressWaiters, predicate, options) {
|
|
|
663
663
|
onProgress();
|
|
664
664
|
});
|
|
665
665
|
}
|
|
666
|
+
function admittedEventJson(schema, event) {
|
|
667
|
+
const parsed = schema.safeParse(event);
|
|
668
|
+
if (!parsed.success)
|
|
669
|
+
return;
|
|
670
|
+
const json = projectJson(parsed.data);
|
|
671
|
+
return json.ok && schema.safeParse(json.value).success ? json.value : undefined;
|
|
672
|
+
}
|
|
666
673
|
function createDiagnosticJournalManager(config, storage) {
|
|
667
674
|
const limits = DiagnosticJournalLimitsSchema2.parse(config.limits);
|
|
668
675
|
const encoder = new TextEncoder;
|
|
@@ -789,13 +796,10 @@ function createDiagnosticJournalManager(config, storage) {
|
|
|
789
796
|
return refuse("failed");
|
|
790
797
|
if (state !== "open")
|
|
791
798
|
return refuse("closed");
|
|
792
|
-
const
|
|
793
|
-
if (
|
|
794
|
-
return refuse("invalid");
|
|
795
|
-
const json = z5.json().safeParse(parsed.data);
|
|
796
|
-
if (!json.success)
|
|
799
|
+
const json = admittedEventJson(config.eventSchema, event);
|
|
800
|
+
if (json === undefined)
|
|
797
801
|
return refuse("invalid");
|
|
798
|
-
const payload = encoder.encode(JSON.stringify(json
|
|
802
|
+
const payload = encoder.encode(JSON.stringify(json));
|
|
799
803
|
if (payload.byteLength > limits.maxEventBytes)
|
|
800
804
|
return refuse("oversized");
|
|
801
805
|
if (pendingItems >= limits.maxPendingItems)
|
|
@@ -805,7 +809,7 @@ function createDiagnosticJournalManager(config, storage) {
|
|
|
805
809
|
schemaVersion: 1,
|
|
806
810
|
epoch: config.epoch,
|
|
807
811
|
sequence,
|
|
808
|
-
event: json
|
|
812
|
+
event: json
|
|
809
813
|
});
|
|
810
814
|
const bytes = encoder.encode(`${JSON.stringify(frame)}
|
|
811
815
|
`);
|
|
@@ -93,6 +93,10 @@ import {
|
|
|
93
93
|
managedResourceDependencyId2,
|
|
94
94
|
defineManagedResource2
|
|
95
95
|
} from "../index-50ejfz75.js";
|
|
96
|
+
import {
|
|
97
|
+
describeJsonRefusal,
|
|
98
|
+
projectJson
|
|
99
|
+
} from "../index-a1rjr381.js";
|
|
96
100
|
import {
|
|
97
101
|
jsonResponse
|
|
98
102
|
} from "../index-kyejf658.js";
|
|
@@ -1325,8 +1329,12 @@ function projectionFor(config, version) {
|
|
|
1325
1329
|
return config.retiredVersions && Object.hasOwn(config.retiredVersions, version) ? config.retiredVersions[version] : undefined;
|
|
1326
1330
|
}
|
|
1327
1331
|
function recordable(result) {
|
|
1328
|
-
const
|
|
1329
|
-
return
|
|
1332
|
+
const projected = projectJson(result);
|
|
1333
|
+
return projected.ok ? { receipt: projected.value } : {
|
|
1334
|
+
receipt: null,
|
|
1335
|
+
unrecorded: "not-json",
|
|
1336
|
+
refusal: describeJsonRefusal(projected.refusal)
|
|
1337
|
+
};
|
|
1330
1338
|
}
|
|
1331
1339
|
function notificationDeliveryPlan(config, payload) {
|
|
1332
1340
|
return NotificationDeliveryStateSchema.parse({
|
|
@@ -1381,7 +1389,11 @@ async function deliverNotification(input) {
|
|
|
1381
1389
|
let confirmed;
|
|
1382
1390
|
let dropped;
|
|
1383
1391
|
try {
|
|
1384
|
-
confirmed = await confirm({
|
|
1392
|
+
confirmed = await confirm({
|
|
1393
|
+
action,
|
|
1394
|
+
receipt: entry.receipt,
|
|
1395
|
+
...entry.unrecorded && { unrecorded: entry.unrecorded }
|
|
1396
|
+
});
|
|
1385
1397
|
} catch (error) {
|
|
1386
1398
|
if (entry.unrecorded || !(error instanceof OutboxStateLimitError))
|
|
1387
1399
|
throw error;
|
|
@@ -1391,7 +1403,7 @@ async function deliverNotification(input) {
|
|
|
1391
1403
|
if (dropped)
|
|
1392
1404
|
await input.report(dropped);
|
|
1393
1405
|
if (entry.unrecorded) {
|
|
1394
|
-
await input.report(new Error(`Notification action "${action}" returned a receipt that is not JSON`));
|
|
1406
|
+
await input.report(new Error(`Notification action "${action}" returned a receipt that is not JSON: ${entry.refusal}`));
|
|
1395
1407
|
}
|
|
1396
1408
|
if (!confirmed)
|
|
1397
1409
|
return false;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AgentModelProviderOptionsSchema2,
|
|
3
3
|
AgentModelMessageSchema2
|
|
4
|
-
} from "../../index-
|
|
4
|
+
} from "../../index-jy907kcs.js";
|
|
5
5
|
import"../../index-ha1tv70k.js";
|
|
6
6
|
import"../../index-d1pdv8qc.js";
|
|
7
7
|
import"../../index-dsa676h8.js";
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
} from "../../index-125ks2ec.js";
|
|
17
17
|
import {
|
|
18
18
|
buildAgentTools
|
|
19
|
-
} from "../../index-
|
|
19
|
+
} from "../../index-k5azb3v3.js";
|
|
20
20
|
import"../../index-bjrcbcn2.js";
|
|
21
21
|
import"../../index-7csn6pva.js";
|
|
22
22
|
import {
|
|
@@ -25,7 +25,7 @@ import"../../index-efbzm2se.js";
|
|
|
25
25
|
import"../../index-a09r9ff0.js";
|
|
26
26
|
import {
|
|
27
27
|
mountAgentTools2
|
|
28
|
-
} from "../../index-
|
|
28
|
+
} from "../../index-k5azb3v3.js";
|
|
29
29
|
import"../../index-rjs94dny.js";
|
|
30
30
|
import"../../index-xrgn784x.js";
|
|
31
31
|
import"../../index-bjrcbcn2.js";
|
|
@@ -79,11 +79,13 @@ import {
|
|
|
79
79
|
findUntypedProperties2
|
|
80
80
|
} from "../index-3kb8dw48.js";
|
|
81
81
|
import {
|
|
82
|
-
AgentToolError2,
|
|
83
|
-
isAgentToolError2,
|
|
84
82
|
defineAgentTool2,
|
|
85
83
|
mountAgentTools2
|
|
86
|
-
} from "../index-
|
|
84
|
+
} from "../index-k5azb3v3.js";
|
|
85
|
+
import {
|
|
86
|
+
AgentToolError2,
|
|
87
|
+
isAgentToolError2
|
|
88
|
+
} from "../index-1psbyyhj.js";
|
|
87
89
|
import {
|
|
88
90
|
createToolInvoker2
|
|
89
91
|
} from "../index-yjx5jna7.js";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// src/tools/agent-tool-error.ts
|
|
2
|
+
var AGENT_TOOL_ERROR_BRAND = Symbol.for("stitchkit.AgentToolError");
|
|
3
|
+
|
|
4
|
+
class AgentToolError2 extends Error {
|
|
5
|
+
output;
|
|
6
|
+
constructor(output, cause) {
|
|
7
|
+
let message = "Tool execution failed";
|
|
8
|
+
try {
|
|
9
|
+
message = JSON.stringify(output);
|
|
10
|
+
} catch {}
|
|
11
|
+
super(message, cause === undefined ? undefined : { cause });
|
|
12
|
+
this.name = "AgentToolError";
|
|
13
|
+
this.output = output;
|
|
14
|
+
Object.defineProperty(this, AGENT_TOOL_ERROR_BRAND, { value: true });
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
function isAgentToolError2(value) {
|
|
18
|
+
return typeof value === "object" && value !== null && AGENT_TOOL_ERROR_BRAND in value;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export { AgentToolError2, isAgentToolError2 };
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AgentTimestampSchema2
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-yv7d6tav.js";
|
|
4
4
|
import {
|
|
5
5
|
AgentMessagePartSchema2
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-ks4rhtcc.js";
|
|
7
7
|
import {
|
|
8
8
|
AgentSnapshotSchema2
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-gvv7y0s4.js";
|
|
10
10
|
import {
|
|
11
11
|
isDurableAgentRuntimeEvent,
|
|
12
12
|
AgentRuntimeEventSchema2
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-4q9tmzea.js";
|
|
14
14
|
|
|
15
15
|
// src/agent-runtime/browser/control-schema.ts
|
|
16
16
|
import { z as z2 } from "zod";
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AgentMessageSchema2
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-yv7d6tav.js";
|
|
4
4
|
import {
|
|
5
5
|
AgentRunSchema2
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-gvv7y0s4.js";
|
|
7
7
|
import {
|
|
8
8
|
missing,
|
|
9
9
|
nextEventSeqByMaximum,
|
|
10
10
|
agentSqlTables,
|
|
11
11
|
createAgentRuntimeStore2
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-d5mhgx72.js";
|
|
13
13
|
import {
|
|
14
14
|
canonicalAgentJson2
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-kaq9nb7h.js";
|
|
16
16
|
import {
|
|
17
17
|
createCompanionHost,
|
|
18
18
|
conversationTables,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
scanSqlRecoverable,
|
|
25
25
|
listSqlConversations,
|
|
26
26
|
pageSqlConversationMessages
|
|
27
|
-
} from "./index-
|
|
27
|
+
} from "./index-zagc12j1.js";
|
|
28
28
|
import {
|
|
29
29
|
rollbackSqliteFailure
|
|
30
30
|
} from "./index-ttexdtjj.js";
|
|
@@ -4,17 +4,17 @@ import {
|
|
|
4
4
|
AgentTimestampSchema2,
|
|
5
5
|
AgentMessageSchema2,
|
|
6
6
|
AgentAssistantPlaceholderSchema2
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-yv7d6tav.js";
|
|
8
8
|
import {
|
|
9
9
|
AgentProviderEnvelopeSchema2
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-ks4rhtcc.js";
|
|
11
11
|
import {
|
|
12
12
|
AgentRunStateSchema2,
|
|
13
13
|
AgentRunOperationSchema2,
|
|
14
14
|
AgentTerminalReasonSchema2,
|
|
15
15
|
AgentRunSchema2,
|
|
16
16
|
AgentRunMetricsSchema2
|
|
17
|
-
} from "./index-
|
|
17
|
+
} from "./index-gvv7y0s4.js";
|
|
18
18
|
|
|
19
19
|
// src/agent-runtime/event-schema.ts
|
|
20
20
|
import { z } from "zod";
|