stitchkit 0.127.0 → 0.128.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 +137 -6
- package/dist/agent-executor/acp/v1-connect.d.ts +9 -1
- package/dist/agent-executor/acp/v1-connect.d.ts.map +1 -1
- package/dist/agent-executor/acp/v1-driver.d.ts +8 -2
- package/dist/agent-executor/acp/v1-driver.d.ts.map +1 -1
- package/dist/agent-executor/acp/v1-map.d.ts.map +1 -1
- package/dist/agent-executor/acp/v1-session.d.ts +8 -0
- package/dist/agent-executor/acp/v1-session.d.ts.map +1 -1
- package/dist/agent-executor/claude/cli-driver.d.ts +4 -0
- package/dist/agent-executor/claude/cli-driver.d.ts.map +1 -1
- package/dist/agent-executor/claude/protocol.d.ts +20 -2
- package/dist/agent-executor/claude/protocol.d.ts.map +1 -1
- package/dist/agent-executor/claude/session.d.ts +2 -1
- package/dist/agent-executor/claude/session.d.ts.map +1 -1
- package/dist/agent-executor/claude/transcript.d.ts +7 -4
- package/dist/agent-executor/claude/transcript.d.ts.map +1 -1
- package/dist/agent-executor/claude-sdk/driver.d.ts +4 -0
- package/dist/agent-executor/claude-sdk/driver.d.ts.map +1 -1
- package/dist/agent-executor/claude-sdk/session.d.ts.map +1 -1
- package/dist/agent-executor/codex/driver.d.ts +4 -0
- package/dist/agent-executor/codex/driver.d.ts.map +1 -1
- package/dist/agent-executor/codex/protocol.d.ts +26 -2
- package/dist/agent-executor/codex/protocol.d.ts.map +1 -1
- package/dist/agent-executor/codex/session.d.ts +3 -1
- package/dist/agent-executor/codex/session.d.ts.map +1 -1
- package/dist/agent-executor/image-input.d.ts +71 -0
- package/dist/agent-executor/image-input.d.ts.map +1 -0
- package/dist/agent-executor/session-primitives.d.ts +0 -3
- package/dist/agent-executor/session-primitives.d.ts.map +1 -1
- package/dist/agent-runtime/agent-tool.d.ts +21 -7
- package/dist/agent-runtime/agent-tool.d.ts.map +1 -1
- package/dist/agent-runtime/branch-contract.d.ts +1 -0
- package/dist/agent-runtime/branch-contract.d.ts.map +1 -1
- package/dist/agent-runtime/branch-identities.d.ts +5 -2
- package/dist/agent-runtime/branch-identities.d.ts.map +1 -1
- package/dist/agent-runtime/branch-messages.d.ts +9 -9
- package/dist/agent-runtime/branch-messages.d.ts.map +1 -1
- package/dist/agent-runtime/branch-observations.d.ts +45 -32
- package/dist/agent-runtime/branch-observations.d.ts.map +1 -1
- package/dist/agent-runtime/branch-provider.d.ts +12 -6
- package/dist/agent-runtime/branch-provider.d.ts.map +1 -1
- package/dist/agent-runtime/branch-source.d.ts +13 -1
- package/dist/agent-runtime/branch-source.d.ts.map +1 -1
- package/dist/agent-runtime/child-tools.d.ts +64 -0
- package/dist/agent-runtime/child-tools.d.ts.map +1 -1
- package/dist/agent-runtime/event-search-tools.d.ts +82 -5
- package/dist/agent-runtime/event-search-tools.d.ts.map +1 -1
- package/dist/agent-runtime/invocation-attempt.d.ts +1 -1
- package/dist/agent-runtime/invocation-attempt.d.ts.map +1 -1
- package/dist/agent-runtime/invocation-payload.d.ts +12 -0
- package/dist/agent-runtime/invocation-payload.d.ts.map +1 -1
- package/dist/agent-runtime/invocation-read.d.ts +6 -3
- package/dist/agent-runtime/invocation-read.d.ts.map +1 -1
- package/dist/agent-runtime/invocation-schema.d.ts +50 -8
- package/dist/agent-runtime/invocation-schema.d.ts.map +1 -1
- package/dist/agent-runtime/invocations.d.ts +20 -9
- package/dist/agent-runtime/invocations.d.ts.map +1 -1
- package/dist/agent-runtime/postgres.d.ts.map +1 -1
- package/dist/agent-runtime/schedule-tools.d.ts +30 -0
- package/dist/agent-runtime/schedule-tools.d.ts.map +1 -1
- package/dist/agent-runtime/schemas-invocation-payload.d.ts +48 -0
- package/dist/agent-runtime/schemas-invocation-payload.d.ts.map +1 -0
- package/dist/agent-runtime/sql-events.d.ts.map +1 -1
- package/dist/agent-runtime/sql-session.d.ts +11 -0
- package/dist/agent-runtime/sql-session.d.ts.map +1 -1
- package/dist/agent-runtime/sqlite-transactions.d.ts.map +1 -1
- package/dist/agent-runtime/state-tools.d.ts +55 -0
- package/dist/agent-runtime/state-tools.d.ts.map +1 -1
- package/dist/agent-runtime/store-branch.d.ts.map +1 -1
- package/dist/agent-runtime/store-conformance-lifecycle.d.ts +20 -20
- package/dist/agent-runtime/store-conformance-support.d.ts +10 -10
- package/dist/agent-runtime/store-create.d.ts.map +1 -1
- package/dist/agent-runtime/store-driver-contract.d.ts +12 -0
- package/dist/agent-runtime/store-driver-contract.d.ts.map +1 -1
- package/dist/agent-runtime/store-memory-events.d.ts.map +1 -1
- package/dist/agent-runtime/store.d.ts +7 -0
- package/dist/agent-runtime/store.d.ts.map +1 -1
- package/dist/declaration/declaration.d.ts +6 -3
- package/dist/declaration/declaration.d.ts.map +1 -1
- package/dist/entrypoints/agent-executor/acp.d.ts +1 -1
- package/dist/entrypoints/agent-executor/acp.d.ts.map +1 -1
- package/dist/entrypoints/agent-executor/acp.js +23 -12
- package/dist/entrypoints/agent-executor/claude-sdk.js +26 -10
- package/dist/entrypoints/agent-executor/claude.js +35 -16
- package/dist/entrypoints/agent-executor/codex.js +81 -21
- package/dist/entrypoints/agent-executor.js +1 -1
- package/dist/entrypoints/agent-runtime/harness.js +5 -6
- package/dist/entrypoints/agent-runtime/openrouter.js +2 -2
- package/dist/entrypoints/agent-runtime/postgres.js +8 -3
- package/dist/entrypoints/agent-runtime/sandbox.js +3 -3
- package/dist/entrypoints/agent-runtime/sqlite/bun.js +4 -4
- package/dist/entrypoints/agent-runtime/sqlite/node.js +4 -4
- package/dist/entrypoints/agent-runtime/testing.js +6 -6
- package/dist/entrypoints/agent-runtime.d.ts +9 -7
- package/dist/entrypoints/agent-runtime.d.ts.map +1 -1
- package/dist/entrypoints/agent-runtime.js +246 -199
- package/dist/entrypoints/application/diagnostic-journal.js +4 -4
- package/dist/entrypoints/application/directory-inbox.js +8 -8
- package/dist/entrypoints/cli/publish.js +8 -8
- package/dist/entrypoints/cli.js +10 -9
- package/dist/entrypoints/declaration.js +0 -1
- package/dist/entrypoints/files.js +40 -17
- package/dist/entrypoints/node.js +4 -4
- package/dist/entrypoints/observability.js +1 -1
- package/dist/entrypoints/process.js +1 -1
- package/dist/entrypoints/server.js +7 -7
- package/dist/entrypoints/service-host/macos.js +4 -4
- package/dist/entrypoints/service-host.d.ts +4 -1
- package/dist/entrypoints/service-host.d.ts.map +1 -1
- package/dist/entrypoints/service-host.js +831 -220
- package/dist/entrypoints/spend.js +1 -1
- package/dist/entrypoints/telegram.js +4 -4
- package/dist/entrypoints/tools/agent.js +4 -3
- package/dist/entrypoints/tools/invoker.js +3 -2
- package/dist/entrypoints/tools/mcp.js +4 -3
- package/dist/entrypoints/tools/toolkit.js +6 -5
- package/dist/entrypoints/tools.d.ts +1 -1
- package/dist/entrypoints/tools.d.ts.map +1 -1
- package/dist/entrypoints/tools.js +10 -8
- package/dist/files/directory-appearance.d.ts +20 -9
- package/dist/files/directory-appearance.d.ts.map +1 -1
- package/dist/files/polled-json.d.ts.map +1 -1
- package/dist/files/regular-file.d.ts +15 -5
- package/dist/files/regular-file.d.ts.map +1 -1
- package/dist/{index-z4k0hqp9.js → index-0gqs8ght.js} +106 -24
- package/dist/{index-caywx1c0.js → index-13dnv6d0.js} +107 -10
- package/dist/{index-a725ayvz.js → index-1qwrczr1.js} +1 -1
- package/dist/{index-xtkw9866.js → index-2c5w2d1d.js} +1 -1
- package/dist/{index-g1q7fwn9.js → index-2nwvn7m2.js} +1 -1
- package/dist/{index-4s2w4g37.js → index-3tnwtz38.js} +80 -2
- package/dist/{index-5e0zsbf7.js → index-4j8efqr3.js} +1 -1
- package/dist/{index-p1m9djt6.js → index-5v5vg85s.js} +1 -1
- package/dist/{index-x90w78yz.js → index-673drwkn.js} +23 -8
- package/dist/{index-7xp05h20.js → index-6wp4dn9d.js} +6 -6
- package/dist/{index-0hdm5sx6.js → index-8x22nprv.js} +6 -2
- package/dist/{index-j13gzgdv.js → index-bz3gn6cs.js} +8 -4
- package/dist/{index-d96c1n1q.js → index-c5gp2gh6.js} +20 -19
- package/dist/{index-wbnpa8z6.js → index-d54npte7.js} +4 -4
- package/dist/{index-kmbpej2y.js → index-emgrmavr.js} +102 -61
- package/dist/{index-bbzvrq66.js → index-g3e57qj6.js} +455 -202
- package/dist/index-gf92hc87.js +100 -0
- package/dist/{index-3djgv3ch.js → index-gzny6zsw.js} +25 -10
- package/dist/{index-3b31z0pc.js → index-hj1zq7mh.js} +12 -6
- package/dist/{index-8xr2eq99.js → index-jfecdk1e.js} +3 -3
- package/dist/{index-dvd1qdwa.js → index-ke02kxsr.js} +3 -3
- package/dist/{index-83n766x4.js → index-m18xm96h.js} +15 -9
- package/dist/{index-qnzhmk2s.js → index-n7f89hjw.js} +90 -47
- package/dist/{index-3agqmmrg.js → index-pn5b11ce.js} +7 -9
- package/dist/{index-3gwp8ez6.js → index-pwskmywy.js} +12 -17
- package/dist/{index-9wh98cpa.js → index-rxnyygke.js} +130 -90
- package/dist/{index-0djnptn8.js → index-rzeezh79.js} +10 -3
- package/dist/{index-nbv44x0x.js → index-s2e3h616.js} +137 -36
- package/dist/{index-5zwac8ft.js → index-t7wa7k12.js} +2 -2
- package/dist/{index-xypxnzhp.js → index-v1mxss62.js} +2 -2
- package/dist/index-vgzhw2zk.js +304 -0
- package/dist/{index-jrka9029.js → index-vmbxj75t.js} +2 -2
- package/dist/{index-j516jaaz.js → index-waa6t4zx.js} +49 -2
- package/dist/{index-fcw255hd.js → index-xv9jb84s.js} +2 -2
- package/dist/{index-dwa6pskj.js → index-y065r8g5.js} +82 -43
- package/dist/internal/bounded-file-confirm.d.ts +32 -0
- package/dist/internal/bounded-file-confirm.d.ts.map +1 -0
- package/dist/internal/bounded-file-read.d.ts +10 -7
- package/dist/internal/bounded-file-read.d.ts.map +1 -1
- package/dist/internal/file-observation.d.ts +5 -1
- package/dist/internal/file-observation.d.ts.map +1 -1
- package/dist/internal/process-instance.d.ts +8 -0
- package/dist/internal/process-instance.d.ts.map +1 -1
- package/dist/internal/unix-socket.d.ts +3 -1
- package/dist/internal/unix-socket.d.ts.map +1 -1
- package/dist/server/unix-client.d.ts +7 -0
- package/dist/server/unix-client.d.ts.map +1 -1
- package/dist/service-host/systemd-inspect.d.ts +3 -1
- package/dist/service-host/systemd-inspect.d.ts.map +1 -1
- package/dist/service-host/systemd-render-shared.d.ts +64 -0
- package/dist/service-host/systemd-render-shared.d.ts.map +1 -0
- package/dist/service-host/systemd-render.d.ts +31 -26
- package/dist/service-host/systemd-render.d.ts.map +1 -1
- package/dist/service-host/systemd-timer-render.d.ts +31 -0
- package/dist/service-host/systemd-timer-render.d.ts.map +1 -0
- package/dist/service-host/systemd-timer-rollback.d.ts +26 -0
- package/dist/service-host/systemd-timer-rollback.d.ts.map +1 -0
- package/dist/service-host/systemd-timer.d.ts +82 -0
- package/dist/service-host/systemd-timer.d.ts.map +1 -0
- package/dist/service-host/systemd-unit-ops.d.ts +26 -0
- package/dist/service-host/systemd-unit-ops.d.ts.map +1 -0
- package/dist/service-host/systemd.d.ts +1 -1
- package/dist/service-host/systemd.d.ts.map +1 -1
- package/dist/tools/access.d.ts +30 -1
- package/dist/tools/access.d.ts.map +1 -1
- package/dist/tools/agent.d.ts +2 -2
- package/dist/tools/agent.d.ts.map +1 -1
- package/dist/tools/cli/args-scan.d.ts +5 -0
- package/dist/tools/cli/args-scan.d.ts.map +1 -1
- package/dist/tools/cli/args.d.ts +11 -5
- package/dist/tools/cli/args.d.ts.map +1 -1
- package/dist/tools/cli/invoke.d.ts +2 -1
- package/dist/tools/cli/invoke.d.ts.map +1 -1
- package/dist/tools/cli/notices.d.ts.map +1 -1
- package/dist/tools/cli/run-managed.d.ts.map +1 -1
- package/dist/tools/cli/session.d.ts.map +1 -1
- package/dist/tools/execute.d.ts.map +1 -1
- package/dist/tools/invoker.d.ts +2 -1
- package/dist/tools/invoker.d.ts.map +1 -1
- package/dist/tools/list-names.d.ts +2 -3
- package/dist/tools/list-names.d.ts.map +1 -1
- package/dist/tools/manifest.d.ts +2 -3
- package/dist/tools/manifest.d.ts.map +1 -1
- package/dist/tools/mcp/mount.d.ts +5 -5
- package/dist/tools/mcp/mount.d.ts.map +1 -1
- package/dist/tools/mcp/register.d.ts +2 -1
- package/dist/tools/mcp/register.d.ts.map +1 -1
- package/dist/tools/mcp/runtime-tools.d.ts.map +1 -1
- package/llms/agent-executor-acp.txt +10 -6
- package/llms/agent-executor-claude-sdk.txt +1 -1
- package/llms/agent-executor-claude.txt +1 -1
- package/llms/agent-executor-codex.txt +1 -1
- package/llms/agent-runtime.4.txt +21 -9
- package/llms/cli.3.txt +4 -4
- package/llms/cli.txt +1 -0
- package/llms/declaration.txt +2 -2
- package/llms/files.txt +1 -1
- package/llms/node.txt +2 -2
- package/llms/server.5.txt +2 -2
- package/llms/service-host.txt +5 -5
- package/llms/stitchkit.txt +81 -77
- package/llms/tools.3.txt +3 -2
- package/llms/upgrading-0.128.0.txt +147 -0
- package/llms/upgrading.txt +1 -0
- package/llms-full.txt +272 -113
- package/llms.txt +14 -13
- package/package.json +1 -1
- package/dist/index-ajmtxsky.js +0 -193
- package/dist/index-ax3wns1a.js +0 -93
|
@@ -35,7 +35,8 @@ import {
|
|
|
35
35
|
AgentConversationBranchReceiptSchema2,
|
|
36
36
|
AgentConversationBranchResultSchema2,
|
|
37
37
|
AgentConversationBranchPlanSchema2,
|
|
38
|
-
|
|
38
|
+
defineAgentToolDescriptor,
|
|
39
|
+
bindAgentTool,
|
|
39
40
|
SqlIntegerSchema,
|
|
40
41
|
AgentChildBudgetSchema2,
|
|
41
42
|
AgentChildStateSchema2,
|
|
@@ -57,10 +58,11 @@ import {
|
|
|
57
58
|
DeferredAgentToolReceiptSchema2,
|
|
58
59
|
AgentEventSearchResultSchema2,
|
|
59
60
|
createAgentEventSearch2,
|
|
61
|
+
AGENT_EVENT_SEARCH_TOOL_DESCRIPTORS2,
|
|
60
62
|
createAgentEventSearchTools2,
|
|
61
63
|
AgentStoreUnsupportedCapabilityError2,
|
|
62
64
|
createAgentRuntimeStore2
|
|
63
|
-
} from "../index-
|
|
65
|
+
} from "../index-g3e57qj6.js";
|
|
64
66
|
import {
|
|
65
67
|
AgentCodingToolAuthorizationSchema2,
|
|
66
68
|
refuseUnknownSpillReference
|
|
@@ -117,14 +119,18 @@ import {
|
|
|
117
119
|
} from "../index-9xr44d2g.js";
|
|
118
120
|
import"../index-brhhaygm.js";
|
|
119
121
|
import {
|
|
122
|
+
PurgeInvocationPayloadsInputSchema2,
|
|
123
|
+
PurgeInvocationPayloadsResultSchema2,
|
|
120
124
|
ModelInvocationTraceSchema2,
|
|
121
125
|
CompletionInvocationInputSchema2,
|
|
126
|
+
InvocationPayloadOmissionReasonSchema2,
|
|
122
127
|
InvocationResponseSchema,
|
|
123
128
|
ModelInvocationRecordSchema2,
|
|
129
|
+
ModelInvocationPayloadReadSchema2,
|
|
124
130
|
isModelInvocationRecord,
|
|
125
131
|
isAssistantHistoryEvidence2,
|
|
126
132
|
isCompleteAgentHistoryTurn
|
|
127
|
-
} from "../index-
|
|
133
|
+
} from "../index-vgzhw2zk.js";
|
|
128
134
|
import {
|
|
129
135
|
createBoundedSinkManager
|
|
130
136
|
} from "../index-prf6ayhf.js";
|
|
@@ -156,6 +162,7 @@ import {
|
|
|
156
162
|
AgentStepSpendProviderSchema,
|
|
157
163
|
AgentStepSpendSchema2,
|
|
158
164
|
normalizeStepUsage,
|
|
165
|
+
InvocationPayloadTooLargeError2,
|
|
159
166
|
currentModelInvocationAttempt2,
|
|
160
167
|
AgentModelCapabilitySchema2,
|
|
161
168
|
AgentModelDescriptorSchema2,
|
|
@@ -172,7 +179,7 @@ import {
|
|
|
172
179
|
createMemoryAgentModelSelectionStore2,
|
|
173
180
|
defineModelRegistry2,
|
|
174
181
|
validateAgentModelSnapshot2
|
|
175
|
-
} from "../index-
|
|
182
|
+
} from "../index-emgrmavr.js";
|
|
176
183
|
import {
|
|
177
184
|
AgentConversationSummarySchema2,
|
|
178
185
|
AgentConversationPageSchema2,
|
|
@@ -184,13 +191,16 @@ import"../index-27hck3z2.js";
|
|
|
184
191
|
import"../index-ngwf1s3c.js";
|
|
185
192
|
import"../index-360j58vb.js";
|
|
186
193
|
import"../index-j903yhp4.js";
|
|
187
|
-
import
|
|
194
|
+
import {
|
|
195
|
+
resolveToolAccess
|
|
196
|
+
} from "../index-rxnyygke.js";
|
|
188
197
|
import"../index-yt1gg11x.js";
|
|
189
198
|
import"../index-3ypvpkwr.js";
|
|
199
|
+
import"../index-gf92hc87.js";
|
|
190
200
|
import"../index-werjqesf.js";
|
|
191
201
|
import {
|
|
192
202
|
mountAgent2
|
|
193
|
-
} from "../index-
|
|
203
|
+
} from "../index-hj1zq7mh.js";
|
|
194
204
|
import {
|
|
195
205
|
AgentContextOverflowError2,
|
|
196
206
|
createAgentSessionCoordinator2,
|
|
@@ -217,7 +227,7 @@ import {
|
|
|
217
227
|
agentGoalStateSlot2,
|
|
218
228
|
agentTodoStateSlot2,
|
|
219
229
|
createAgentRuntime2
|
|
220
|
-
} from "../index-
|
|
230
|
+
} from "../index-n7f89hjw.js";
|
|
221
231
|
import"../index-m38ej7e5.js";
|
|
222
232
|
import"../index-d4svrknj.js";
|
|
223
233
|
import {
|
|
@@ -234,7 +244,7 @@ import"../index-v59pxmf1.js";
|
|
|
234
244
|
import"../index-7kfcb576.js";
|
|
235
245
|
import {
|
|
236
246
|
createMemoryAgentRuntimeStore2
|
|
237
|
-
} from "../index-
|
|
247
|
+
} from "../index-waa6t4zx.js";
|
|
238
248
|
import {
|
|
239
249
|
createAgentRuntimeEventSink2
|
|
240
250
|
} from "../index-wv8dqy7q.js";
|
|
@@ -243,14 +253,11 @@ import"../index-bmaz3jzy.js";
|
|
|
243
253
|
import"../index-xrgn784x.js";
|
|
244
254
|
import {
|
|
245
255
|
buildToolManifest2
|
|
246
|
-
} from "../index-
|
|
247
|
-
import"../index-
|
|
256
|
+
} from "../index-c5gp2gh6.js";
|
|
257
|
+
import"../index-pn5b11ce.js";
|
|
248
258
|
import"../index-wa6h4tz6.js";
|
|
249
259
|
import"../index-jb4m241t.js";
|
|
250
|
-
import"../index-
|
|
251
|
-
import {
|
|
252
|
-
resolveToolAccess
|
|
253
|
-
} from "../index-ax3wns1a.js";
|
|
260
|
+
import"../index-4j8efqr3.js";
|
|
254
261
|
import {
|
|
255
262
|
defineRuntimeTool2,
|
|
256
263
|
executableAgentRuntimeTools
|
|
@@ -1063,47 +1070,87 @@ function createAgentChildManager(input) {
|
|
|
1063
1070
|
}
|
|
1064
1071
|
|
|
1065
1072
|
// src/agent-runtime/child-tools.ts
|
|
1073
|
+
var ChildSpawnInputSchema = z3.object({
|
|
1074
|
+
childInput: z3.json(),
|
|
1075
|
+
budget: AgentChildBudgetSchema2,
|
|
1076
|
+
seedUptoSeq: z3.int().positive().optional()
|
|
1077
|
+
}).strict();
|
|
1078
|
+
var ChildSpawnOutputSchema = z3.object({
|
|
1079
|
+
childConversationId: z3.string(),
|
|
1080
|
+
state: z3.string(),
|
|
1081
|
+
resultReference: z3.string().optional()
|
|
1082
|
+
});
|
|
1083
|
+
var SUBAGENT_DESCRIPTOR = defineAgentToolDescriptor({
|
|
1084
|
+
name: "subagent",
|
|
1085
|
+
description: "Run a child conversation seeded from the current durable parent history.",
|
|
1086
|
+
identity: { serviceName: "agent-children", action: "spawn", method: "POST" },
|
|
1087
|
+
input: ChildSpawnInputSchema,
|
|
1088
|
+
output: ChildSpawnOutputSchema,
|
|
1089
|
+
expose: ["AGENT"]
|
|
1090
|
+
});
|
|
1091
|
+
var SUBAGENT_FORK_DESCRIPTOR = defineAgentToolDescriptor({
|
|
1092
|
+
name: "subagent_fork",
|
|
1093
|
+
description: "Run a child conversation seeded from the parent through one exact event sequence.",
|
|
1094
|
+
identity: { serviceName: "agent-children", action: "fork", method: "POST" },
|
|
1095
|
+
input: ChildSpawnInputSchema,
|
|
1096
|
+
output: ChildSpawnOutputSchema,
|
|
1097
|
+
expose: ["AGENT"]
|
|
1098
|
+
});
|
|
1099
|
+
var LIST_AGENTS_DESCRIPTOR = defineAgentToolDescriptor({
|
|
1100
|
+
name: "list_agents",
|
|
1101
|
+
description: "List the durable child graph of this conversation.",
|
|
1102
|
+
identity: { serviceName: "agent-children", action: "list", method: "GET" },
|
|
1103
|
+
input: z3.object({}).strict(),
|
|
1104
|
+
output: z3.object({ children: z3.array(AgentChildRecordSchema2) }),
|
|
1105
|
+
expose: ["AGENT"]
|
|
1106
|
+
});
|
|
1107
|
+
var SEND_MESSAGE_DESCRIPTOR = defineAgentToolDescriptor({
|
|
1108
|
+
name: "send_message",
|
|
1109
|
+
description: "Send one follow-up input to an active child conversation.",
|
|
1110
|
+
identity: { serviceName: "agent-children", action: "message", method: "POST" },
|
|
1111
|
+
input: z3.object({
|
|
1112
|
+
childConversationId: z3.string().min(1),
|
|
1113
|
+
input: z3.json()
|
|
1114
|
+
}).strict(),
|
|
1115
|
+
output: z3.object({ sent: z3.literal(true) }),
|
|
1116
|
+
expose: ["AGENT"]
|
|
1117
|
+
});
|
|
1118
|
+
var INTERRUPT_AGENT_DESCRIPTOR = defineAgentToolDescriptor({
|
|
1119
|
+
name: "interrupt_agent",
|
|
1120
|
+
description: "Stop one active child conversation at a durable policy boundary.",
|
|
1121
|
+
identity: { serviceName: "agent-children", action: "interrupt", method: "POST" },
|
|
1122
|
+
input: z3.object({ childConversationId: z3.string().min(1) }).strict(),
|
|
1123
|
+
output: z3.object({ interrupted: z3.literal(true) }),
|
|
1124
|
+
expose: ["AGENT"]
|
|
1125
|
+
});
|
|
1126
|
+
var AGENT_CHILD_TOOL_DESCRIPTORS = Object.freeze([
|
|
1127
|
+
SUBAGENT_DESCRIPTOR,
|
|
1128
|
+
SUBAGENT_FORK_DESCRIPTOR,
|
|
1129
|
+
LIST_AGENTS_DESCRIPTOR,
|
|
1130
|
+
SEND_MESSAGE_DESCRIPTOR,
|
|
1131
|
+
INTERRUPT_AGENT_DESCRIPTOR
|
|
1132
|
+
]);
|
|
1066
1133
|
function childTool({ manager, run }, conversationId, fork) {
|
|
1067
|
-
return
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
identity: {
|
|
1071
|
-
serviceName: "agent-children",
|
|
1072
|
-
action: fork ? "fork" : "spawn",
|
|
1073
|
-
method: "POST"
|
|
1074
|
-
},
|
|
1075
|
-
input: z3.object({
|
|
1076
|
-
childInput: z3.json(),
|
|
1077
|
-
budget: AgentChildBudgetSchema2,
|
|
1078
|
-
seedUptoSeq: z3.int().positive().optional()
|
|
1079
|
-
}).strict(),
|
|
1080
|
-
output: z3.object({
|
|
1081
|
-
childConversationId: z3.string(),
|
|
1082
|
-
state: z3.string(),
|
|
1083
|
-
resultReference: z3.string().optional()
|
|
1084
|
-
}),
|
|
1085
|
-
expose: ["AGENT"],
|
|
1086
|
-
handler: async ({ input }) => {
|
|
1087
|
-
if (fork && input.seedUptoSeq === undefined) {
|
|
1088
|
-
throw new TypeError("subagent_fork requires seedUptoSeq");
|
|
1089
|
-
}
|
|
1090
|
-
run.signal.throwIfAborted();
|
|
1091
|
-
const child = await manager.spawnChild({
|
|
1092
|
-
parentConversationId: conversationId,
|
|
1093
|
-
childInput: input.childInput,
|
|
1094
|
-
budget: input.budget,
|
|
1095
|
-
...input.seedUptoSeq !== undefined && { seedUptoSeq: input.seedUptoSeq }
|
|
1096
|
-
});
|
|
1097
|
-
await manager.waitChild(child.childConversationId);
|
|
1098
|
-
const finished = (await manager.listChildren(conversationId)).find((record) => record.childConversationId === child.childConversationId);
|
|
1099
|
-
if (!finished)
|
|
1100
|
-
throw new Error("Child record disappeared after settlement");
|
|
1101
|
-
return {
|
|
1102
|
-
childConversationId: finished.childConversationId,
|
|
1103
|
-
state: finished.state,
|
|
1104
|
-
...finished.resultReference && { resultReference: finished.resultReference }
|
|
1105
|
-
};
|
|
1134
|
+
return bindAgentTool(fork ? SUBAGENT_FORK_DESCRIPTOR : SUBAGENT_DESCRIPTOR, async ({ input }) => {
|
|
1135
|
+
if (fork && input.seedUptoSeq === undefined) {
|
|
1136
|
+
throw new TypeError("subagent_fork requires seedUptoSeq");
|
|
1106
1137
|
}
|
|
1138
|
+
run.signal.throwIfAborted();
|
|
1139
|
+
const child = await manager.spawnChild({
|
|
1140
|
+
parentConversationId: conversationId,
|
|
1141
|
+
childInput: input.childInput,
|
|
1142
|
+
budget: input.budget,
|
|
1143
|
+
...input.seedUptoSeq !== undefined && { seedUptoSeq: input.seedUptoSeq }
|
|
1144
|
+
});
|
|
1145
|
+
await manager.waitChild(child.childConversationId);
|
|
1146
|
+
const finished = (await manager.listChildren(conversationId)).find((record) => record.childConversationId === child.childConversationId);
|
|
1147
|
+
if (!finished)
|
|
1148
|
+
throw new Error("Child record disappeared after settlement");
|
|
1149
|
+
return {
|
|
1150
|
+
childConversationId: finished.childConversationId,
|
|
1151
|
+
state: finished.state,
|
|
1152
|
+
...finished.resultReference && { resultReference: finished.resultReference }
|
|
1153
|
+
};
|
|
1107
1154
|
});
|
|
1108
1155
|
}
|
|
1109
1156
|
function createAgentChildTools(config) {
|
|
@@ -1112,41 +1159,16 @@ function createAgentChildTools(config) {
|
|
|
1112
1159
|
return [
|
|
1113
1160
|
childTool(config, conversationId, false),
|
|
1114
1161
|
childTool(config, conversationId, true),
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
expose: ["AGENT"],
|
|
1122
|
-
handler: async () => ({ children: [...await manager.listChildren(conversationId)] })
|
|
1123
|
-
}),
|
|
1124
|
-
defineAgentTool({
|
|
1125
|
-
name: "send_message",
|
|
1126
|
-
description: "Send one follow-up input to an active child conversation.",
|
|
1127
|
-
identity: { serviceName: "agent-children", action: "message", method: "POST" },
|
|
1128
|
-
input: z3.object({
|
|
1129
|
-
childConversationId: z3.string().min(1),
|
|
1130
|
-
input: z3.json()
|
|
1131
|
-
}).strict(),
|
|
1132
|
-
output: z3.object({ sent: z3.literal(true) }),
|
|
1133
|
-
expose: ["AGENT"],
|
|
1134
|
-
handler: async ({ input }) => {
|
|
1135
|
-
await manager.sendMessage(conversationId, input.childConversationId, input.input);
|
|
1136
|
-
return { sent: true };
|
|
1137
|
-
}
|
|
1162
|
+
bindAgentTool(LIST_AGENTS_DESCRIPTOR, async () => ({
|
|
1163
|
+
children: [...await manager.listChildren(conversationId)]
|
|
1164
|
+
})),
|
|
1165
|
+
bindAgentTool(SEND_MESSAGE_DESCRIPTOR, async ({ input }) => {
|
|
1166
|
+
await manager.sendMessage(conversationId, input.childConversationId, input.input);
|
|
1167
|
+
return { sent: true };
|
|
1138
1168
|
}),
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
identity: { serviceName: "agent-children", action: "interrupt", method: "POST" },
|
|
1143
|
-
input: z3.object({ childConversationId: z3.string().min(1) }).strict(),
|
|
1144
|
-
output: z3.object({ interrupted: z3.literal(true) }),
|
|
1145
|
-
expose: ["AGENT"],
|
|
1146
|
-
handler: async ({ input }) => {
|
|
1147
|
-
await manager.interruptChild(conversationId, input.childConversationId);
|
|
1148
|
-
return { interrupted: true };
|
|
1149
|
-
}
|
|
1169
|
+
bindAgentTool(INTERRUPT_AGENT_DESCRIPTOR, async ({ input }) => {
|
|
1170
|
+
await manager.interruptChild(conversationId, input.childConversationId);
|
|
1171
|
+
return { interrupted: true };
|
|
1150
1172
|
})
|
|
1151
1173
|
];
|
|
1152
1174
|
}
|
|
@@ -2114,6 +2136,60 @@ var AgentScheduleDeliveryOutcomeSchema = z6.discriminatedUnion("status", [
|
|
|
2114
2136
|
// src/agent-runtime/schedule-tools.ts
|
|
2115
2137
|
import { z as z7 } from "zod";
|
|
2116
2138
|
var ScheduledOutputSchema = z7.object({ scheduleId: z7.string(), nextAt: z7.string() }).strict();
|
|
2139
|
+
var SCHEDULE_AFTER_DESCRIPTOR = defineAgentToolDescriptor({
|
|
2140
|
+
name: "schedule_after",
|
|
2141
|
+
description: "Schedule durable input after a relative delay.",
|
|
2142
|
+
identity: { serviceName: "agent-schedules", action: "after", method: "POST" },
|
|
2143
|
+
input: z7.object({
|
|
2144
|
+
input: z7.json(),
|
|
2145
|
+
afterMs: z7.int().positive()
|
|
2146
|
+
}).strict(),
|
|
2147
|
+
output: ScheduledOutputSchema,
|
|
2148
|
+
expose: ["AGENT"]
|
|
2149
|
+
});
|
|
2150
|
+
var SCHEDULE_AT_DESCRIPTOR = defineAgentToolDescriptor({
|
|
2151
|
+
name: "schedule_at",
|
|
2152
|
+
description: "Schedule durable input at an absolute timestamp with an explicit offset.",
|
|
2153
|
+
identity: { serviceName: "agent-schedules", action: "at", method: "POST" },
|
|
2154
|
+
input: z7.object({ input: z7.json(), at: z7.string().min(1) }).strict(),
|
|
2155
|
+
output: ScheduledOutputSchema,
|
|
2156
|
+
expose: ["AGENT"]
|
|
2157
|
+
});
|
|
2158
|
+
var SCHEDULE_EVERY_DESCRIPTOR = defineAgentToolDescriptor({
|
|
2159
|
+
name: "schedule_every",
|
|
2160
|
+
description: "Schedule recurring durable input in an explicit conversation timezone.",
|
|
2161
|
+
identity: { serviceName: "agent-schedules", action: "every", method: "POST" },
|
|
2162
|
+
input: z7.object({
|
|
2163
|
+
input: z7.json(),
|
|
2164
|
+
everyMs: z7.int().positive(),
|
|
2165
|
+
timeZone: z7.string().min(1)
|
|
2166
|
+
}).strict(),
|
|
2167
|
+
output: ScheduledOutputSchema,
|
|
2168
|
+
expose: ["AGENT"]
|
|
2169
|
+
});
|
|
2170
|
+
var SCHEDULE_LIST_DESCRIPTOR = defineAgentToolDescriptor({
|
|
2171
|
+
name: "schedule_list",
|
|
2172
|
+
description: "List the durable schedules of this conversation.",
|
|
2173
|
+
identity: { serviceName: "agent-schedules", action: "list", method: "GET" },
|
|
2174
|
+
input: z7.object({}).strict(),
|
|
2175
|
+
output: z7.object({ schedules: z7.array(z7.json()) }).strict(),
|
|
2176
|
+
expose: ["AGENT"]
|
|
2177
|
+
});
|
|
2178
|
+
var SCHEDULE_CANCEL_DESCRIPTOR = defineAgentToolDescriptor({
|
|
2179
|
+
name: "schedule_cancel",
|
|
2180
|
+
description: "Cancel one durable deferred-input schedule.",
|
|
2181
|
+
identity: { serviceName: "agent-schedules", action: "cancel", method: "POST" },
|
|
2182
|
+
input: z7.object({ scheduleId: z7.string().min(1) }).strict(),
|
|
2183
|
+
output: z7.object({ cancelled: z7.boolean() }).strict(),
|
|
2184
|
+
expose: ["AGENT"]
|
|
2185
|
+
});
|
|
2186
|
+
var AGENT_SCHEDULE_TOOL_DESCRIPTORS = Object.freeze([
|
|
2187
|
+
SCHEDULE_AFTER_DESCRIPTOR,
|
|
2188
|
+
SCHEDULE_AT_DESCRIPTOR,
|
|
2189
|
+
SCHEDULE_EVERY_DESCRIPTOR,
|
|
2190
|
+
SCHEDULE_LIST_DESCRIPTOR,
|
|
2191
|
+
SCHEDULE_CANCEL_DESCRIPTOR
|
|
2192
|
+
]);
|
|
2117
2193
|
function createAgentScheduleTools({ service, run }) {
|
|
2118
2194
|
const conversationId = conversationOfRun(run, "createAgentScheduleTools");
|
|
2119
2195
|
const schedule = async (request) => {
|
|
@@ -2121,60 +2197,15 @@ function createAgentScheduleTools({ service, run }) {
|
|
|
2121
2197
|
return { scheduleId: result.id, nextAt: result.nextAt };
|
|
2122
2198
|
};
|
|
2123
2199
|
return [
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
expose: ["AGENT"],
|
|
2134
|
-
handler: ({ input }) => schedule(input)
|
|
2135
|
-
}),
|
|
2136
|
-
defineAgentTool({
|
|
2137
|
-
name: "schedule_at",
|
|
2138
|
-
description: "Schedule durable input at an absolute timestamp with an explicit offset.",
|
|
2139
|
-
identity: { serviceName: "agent-schedules", action: "at", method: "POST" },
|
|
2140
|
-
input: z7.object({ input: z7.json(), at: z7.string().min(1) }).strict(),
|
|
2141
|
-
output: ScheduledOutputSchema,
|
|
2142
|
-
expose: ["AGENT"],
|
|
2143
|
-
handler: ({ input }) => schedule(input)
|
|
2144
|
-
}),
|
|
2145
|
-
defineAgentTool({
|
|
2146
|
-
name: "schedule_every",
|
|
2147
|
-
description: "Schedule recurring durable input in an explicit conversation timezone.",
|
|
2148
|
-
identity: { serviceName: "agent-schedules", action: "every", method: "POST" },
|
|
2149
|
-
input: z7.object({
|
|
2150
|
-
input: z7.json(),
|
|
2151
|
-
everyMs: z7.int().positive(),
|
|
2152
|
-
timeZone: z7.string().min(1)
|
|
2153
|
-
}).strict(),
|
|
2154
|
-
output: ScheduledOutputSchema,
|
|
2155
|
-
expose: ["AGENT"],
|
|
2156
|
-
handler: ({ input }) => schedule(input)
|
|
2157
|
-
}),
|
|
2158
|
-
defineAgentTool({
|
|
2159
|
-
name: "schedule_list",
|
|
2160
|
-
description: "List the durable schedules of this conversation.",
|
|
2161
|
-
identity: { serviceName: "agent-schedules", action: "list", method: "GET" },
|
|
2162
|
-
input: z7.object({}).strict(),
|
|
2163
|
-
output: z7.object({ schedules: z7.array(z7.json()) }).strict(),
|
|
2164
|
-
expose: ["AGENT"],
|
|
2165
|
-
handler: async () => ({ schedules: [...await service.listSchedules(conversationId)] })
|
|
2166
|
-
}),
|
|
2167
|
-
defineAgentTool({
|
|
2168
|
-
name: "schedule_cancel",
|
|
2169
|
-
description: "Cancel one durable deferred-input schedule.",
|
|
2170
|
-
identity: { serviceName: "agent-schedules", action: "cancel", method: "POST" },
|
|
2171
|
-
input: z7.object({ scheduleId: z7.string().min(1) }).strict(),
|
|
2172
|
-
output: z7.object({ cancelled: z7.boolean() }).strict(),
|
|
2173
|
-
expose: ["AGENT"],
|
|
2174
|
-
handler: async ({ input }) => ({
|
|
2175
|
-
cancelled: await service.cancelSchedule(conversationId, input.scheduleId)
|
|
2176
|
-
})
|
|
2177
|
-
})
|
|
2200
|
+
bindAgentTool(SCHEDULE_AFTER_DESCRIPTOR, ({ input }) => schedule(input)),
|
|
2201
|
+
bindAgentTool(SCHEDULE_AT_DESCRIPTOR, ({ input }) => schedule(input)),
|
|
2202
|
+
bindAgentTool(SCHEDULE_EVERY_DESCRIPTOR, ({ input }) => schedule(input)),
|
|
2203
|
+
bindAgentTool(SCHEDULE_LIST_DESCRIPTOR, async () => ({
|
|
2204
|
+
schedules: [...await service.listSchedules(conversationId)]
|
|
2205
|
+
})),
|
|
2206
|
+
bindAgentTool(SCHEDULE_CANCEL_DESCRIPTOR, async ({ input }) => ({
|
|
2207
|
+
cancelled: await service.cancelSchedule(conversationId, input.scheduleId)
|
|
2208
|
+
}))
|
|
2178
2209
|
];
|
|
2179
2210
|
}
|
|
2180
2211
|
// src/agent-runtime/schedules.ts
|
|
@@ -2721,6 +2752,50 @@ var TodoItemSchema = z11.object({
|
|
|
2721
2752
|
step: z11.string().min(1),
|
|
2722
2753
|
status: z11.enum(["pending", "in_progress", "completed"])
|
|
2723
2754
|
}).strict();
|
|
2755
|
+
var TodoOutputSchema = z11.object({ items: z11.array(TodoItemSchema) }).strict();
|
|
2756
|
+
var CREATE_GOAL_DESCRIPTOR = defineAgentToolDescriptor({
|
|
2757
|
+
name: "create_goal",
|
|
2758
|
+
description: "Create the durable objective for this conversation.",
|
|
2759
|
+
identity: { serviceName: "agent-state", action: "create-goal", method: "POST" },
|
|
2760
|
+
input: z11.object({ objective: z11.string().min(1) }).strict(),
|
|
2761
|
+
output: GoalSchema,
|
|
2762
|
+
expose: ["AGENT"]
|
|
2763
|
+
});
|
|
2764
|
+
var UPDATE_GOAL_DESCRIPTOR = defineAgentToolDescriptor({
|
|
2765
|
+
name: "update_goal",
|
|
2766
|
+
description: "Update the durable objective or lifecycle status.",
|
|
2767
|
+
identity: { serviceName: "agent-state", action: "update-goal", method: "POST" },
|
|
2768
|
+
input: z11.object({
|
|
2769
|
+
objective: z11.string().min(1).optional(),
|
|
2770
|
+
status: z11.enum(["active", "complete", "blocked"]).optional()
|
|
2771
|
+
}).strict().refine((request) => request.objective !== undefined || request.status !== undefined, {
|
|
2772
|
+
message: "At least one goal field must be supplied"
|
|
2773
|
+
}),
|
|
2774
|
+
output: GoalSchema,
|
|
2775
|
+
expose: ["AGENT"]
|
|
2776
|
+
});
|
|
2777
|
+
var GET_GOAL_DESCRIPTOR = defineAgentToolDescriptor({
|
|
2778
|
+
name: "get_goal",
|
|
2779
|
+
description: "Read the durable objective for this conversation.",
|
|
2780
|
+
identity: { serviceName: "agent-state", action: "get-goal", method: "GET" },
|
|
2781
|
+
input: z11.object({}).strict(),
|
|
2782
|
+
output: z11.object({ goal: GoalSchema.optional() }).strict(),
|
|
2783
|
+
expose: ["AGENT"]
|
|
2784
|
+
});
|
|
2785
|
+
var TODO_WRITE_DESCRIPTOR = defineAgentToolDescriptor({
|
|
2786
|
+
name: "todo_write",
|
|
2787
|
+
description: "Replace the durable ordered work plan for this conversation.",
|
|
2788
|
+
identity: { serviceName: "agent-state", action: "write-todo", method: "POST" },
|
|
2789
|
+
input: TodoOutputSchema,
|
|
2790
|
+
output: TodoOutputSchema,
|
|
2791
|
+
expose: ["AGENT"]
|
|
2792
|
+
});
|
|
2793
|
+
var AGENT_STATE_TOOL_DESCRIPTORS = Object.freeze([
|
|
2794
|
+
CREATE_GOAL_DESCRIPTOR,
|
|
2795
|
+
UPDATE_GOAL_DESCRIPTOR,
|
|
2796
|
+
GET_GOAL_DESCRIPTOR,
|
|
2797
|
+
TODO_WRITE_DESCRIPTOR
|
|
2798
|
+
]);
|
|
2724
2799
|
function createAgentStateTools(config) {
|
|
2725
2800
|
const input = {
|
|
2726
2801
|
state: config.state,
|
|
@@ -2736,73 +2811,40 @@ function createAgentStateTools(config) {
|
|
|
2736
2811
|
return GoalSchema.parse(stored.value);
|
|
2737
2812
|
};
|
|
2738
2813
|
return [
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
identity: { serviceName: "agent-state", action: "create-goal", method: "POST" },
|
|
2743
|
-
input: z11.object({ objective: z11.string().min(1) }).strict(),
|
|
2744
|
-
output: GoalSchema,
|
|
2745
|
-
expose: ["AGENT"],
|
|
2746
|
-
handler: async ({ input: request }) => {
|
|
2747
|
-
if (await input.state.get(input.conversationId, "goal")) {
|
|
2748
|
-
throw new TypeError("A durable goal already exists for this conversation");
|
|
2749
|
-
}
|
|
2750
|
-
return writeGoal({ objective: request.objective, status: "active" });
|
|
2814
|
+
bindAgentTool(CREATE_GOAL_DESCRIPTOR, async ({ input: request }) => {
|
|
2815
|
+
if (await input.state.get(input.conversationId, "goal")) {
|
|
2816
|
+
throw new TypeError("A durable goal already exists for this conversation");
|
|
2751
2817
|
}
|
|
2818
|
+
return writeGoal({ objective: request.objective, status: "active" });
|
|
2752
2819
|
}),
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
status: z11.enum(["active", "complete", "blocked"]).optional()
|
|
2760
|
-
}).strict().refine((request) => request.objective !== undefined || request.status !== undefined, {
|
|
2761
|
-
message: "At least one goal field must be supplied"
|
|
2762
|
-
}),
|
|
2763
|
-
output: GoalSchema,
|
|
2764
|
-
expose: ["AGENT"],
|
|
2765
|
-
handler: async ({ input: request }) => {
|
|
2766
|
-
const current = await input.state.get(input.conversationId, "goal");
|
|
2767
|
-
if (!current)
|
|
2768
|
-
throw new TypeError("No durable goal exists for this conversation");
|
|
2769
|
-
const goal = GoalSchema.parse(current.value);
|
|
2770
|
-
return writeGoal({ ...goal, ...request });
|
|
2771
|
-
}
|
|
2820
|
+
bindAgentTool(UPDATE_GOAL_DESCRIPTOR, async ({ input: request }) => {
|
|
2821
|
+
const current = await input.state.get(input.conversationId, "goal");
|
|
2822
|
+
if (!current)
|
|
2823
|
+
throw new TypeError("No durable goal exists for this conversation");
|
|
2824
|
+
const goal = GoalSchema.parse(current.value);
|
|
2825
|
+
return writeGoal({ ...goal, ...request });
|
|
2772
2826
|
}),
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
identity: { serviceName: "agent-state", action: "get-goal", method: "GET" },
|
|
2777
|
-
input: z11.object({}).strict(),
|
|
2778
|
-
output: z11.object({ goal: GoalSchema.optional() }).strict(),
|
|
2779
|
-
expose: ["AGENT"],
|
|
2780
|
-
handler: async () => {
|
|
2781
|
-
const current = await input.state.get(input.conversationId, "goal");
|
|
2782
|
-
return { ...current && { goal: GoalSchema.parse(current.value) } };
|
|
2783
|
-
}
|
|
2827
|
+
bindAgentTool(GET_GOAL_DESCRIPTOR, async () => {
|
|
2828
|
+
const current = await input.state.get(input.conversationId, "goal");
|
|
2829
|
+
return { ...current && { goal: GoalSchema.parse(current.value) } };
|
|
2784
2830
|
}),
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
const stored = await input.state.set({
|
|
2794
|
-
conversationId: input.conversationId,
|
|
2795
|
-
name: "todo",
|
|
2796
|
-
value: request,
|
|
2797
|
-
actor: "agent"
|
|
2798
|
-
});
|
|
2799
|
-
return z11.object({ items: z11.array(TodoItemSchema) }).strict().parse(stored.value);
|
|
2800
|
-
}
|
|
2831
|
+
bindAgentTool(TODO_WRITE_DESCRIPTOR, async ({ input: request }) => {
|
|
2832
|
+
const stored = await input.state.set({
|
|
2833
|
+
conversationId: input.conversationId,
|
|
2834
|
+
name: "todo",
|
|
2835
|
+
value: request,
|
|
2836
|
+
actor: "agent"
|
|
2837
|
+
});
|
|
2838
|
+
return TodoOutputSchema.parse(stored.value);
|
|
2801
2839
|
})
|
|
2802
2840
|
];
|
|
2803
2841
|
}
|
|
2804
2842
|
export {
|
|
2805
2843
|
ACTIVE_AGENT_RUN_STATES2 as ACTIVE_AGENT_RUN_STATES,
|
|
2844
|
+
AGENT_CHILD_TOOL_DESCRIPTORS,
|
|
2845
|
+
AGENT_EVENT_SEARCH_TOOL_DESCRIPTORS2 as AGENT_EVENT_SEARCH_TOOL_DESCRIPTORS,
|
|
2846
|
+
AGENT_SCHEDULE_TOOL_DESCRIPTORS,
|
|
2847
|
+
AGENT_STATE_TOOL_DESCRIPTORS,
|
|
2806
2848
|
AcceptInputAndAssignRunSchema2 as AcceptInputAndAssignRunSchema,
|
|
2807
2849
|
AcquireAgentRunSchema2 as AcquireAgentRunSchema,
|
|
2808
2850
|
AgentAdmissionEventSchema2 as AgentAdmissionEventSchema,
|
|
@@ -2926,10 +2968,15 @@ export {
|
|
|
2926
2968
|
DeferredAgentToolMatchSchema2 as DeferredAgentToolMatchSchema,
|
|
2927
2969
|
DeferredAgentToolReceiptSchema2 as DeferredAgentToolReceiptSchema,
|
|
2928
2970
|
DeferredAgentToolSearchInputSchema2 as DeferredAgentToolSearchInputSchema,
|
|
2971
|
+
InvocationPayloadOmissionReasonSchema2 as InvocationPayloadOmissionReasonSchema,
|
|
2972
|
+
InvocationPayloadTooLargeError2 as InvocationPayloadTooLargeError,
|
|
2973
|
+
ModelInvocationPayloadReadSchema2 as ModelInvocationPayloadReadSchema,
|
|
2929
2974
|
ModelInvocationRecordSchema2 as ModelInvocationRecordSchema,
|
|
2930
2975
|
ModelInvocationTraceSchema2 as ModelInvocationTraceSchema,
|
|
2931
2976
|
ParkAbortedError2 as ParkAbortedError,
|
|
2932
2977
|
ParkRecordDecodeError2 as ParkRecordDecodeError,
|
|
2978
|
+
PurgeInvocationPayloadsInputSchema2 as PurgeInvocationPayloadsInputSchema,
|
|
2979
|
+
PurgeInvocationPayloadsResultSchema2 as PurgeInvocationPayloadsResultSchema,
|
|
2933
2980
|
ReadAgentStoreEventsSchema2 as ReadAgentStoreEventsSchema,
|
|
2934
2981
|
RecordRunOperationSchema2 as RecordRunOperationSchema,
|
|
2935
2982
|
RecoverAgentRunSchema2 as RecoverAgentRunSchema,
|
|
@@ -18,16 +18,16 @@ import {
|
|
|
18
18
|
createBoundedChannel2
|
|
19
19
|
} from "../../index-09f7w2qq.js";
|
|
20
20
|
import"../../index-6kec3b14.js";
|
|
21
|
-
import"../../index-
|
|
22
|
-
import"../../index-
|
|
21
|
+
import"../../index-673drwkn.js";
|
|
22
|
+
import"../../index-vmbxj75t.js";
|
|
23
23
|
import {
|
|
24
24
|
attemptExclusiveLock
|
|
25
|
-
} from "../../index-
|
|
25
|
+
} from "../../index-ke02kxsr.js";
|
|
26
26
|
import {
|
|
27
27
|
closeAfter,
|
|
28
28
|
BoundedFileReadError,
|
|
29
29
|
openRegularFile
|
|
30
|
-
} from "../../index-
|
|
30
|
+
} from "../../index-s2e3h616.js";
|
|
31
31
|
import {
|
|
32
32
|
errnoOf
|
|
33
33
|
} from "../../index-jj9228tt.js";
|
|
@@ -14,31 +14,31 @@ import {
|
|
|
14
14
|
backoffDelay
|
|
15
15
|
} from "../../index-gnjgkecx.js";
|
|
16
16
|
import"../../index-6kec3b14.js";
|
|
17
|
-
import"../../index-
|
|
18
|
-
import"../../index-
|
|
17
|
+
import"../../index-673drwkn.js";
|
|
18
|
+
import"../../index-vmbxj75t.js";
|
|
19
19
|
import {
|
|
20
20
|
defineManagedResource2
|
|
21
21
|
} from "../../index-50ejfz75.js";
|
|
22
22
|
import {
|
|
23
23
|
createFileStateStore2
|
|
24
|
-
} from "../../index-
|
|
25
|
-
import"../../index-
|
|
26
|
-
import"../../index-
|
|
24
|
+
} from "../../index-d54npte7.js";
|
|
25
|
+
import"../../index-2nwvn7m2.js";
|
|
26
|
+
import"../../index-ke02kxsr.js";
|
|
27
27
|
import {
|
|
28
28
|
isJsonData
|
|
29
29
|
} from "../../index-m6w6jtda.js";
|
|
30
30
|
import {
|
|
31
31
|
writeAtomicFileData
|
|
32
|
-
} from "../../index-
|
|
32
|
+
} from "../../index-t7wa7k12.js";
|
|
33
33
|
import {
|
|
34
34
|
publishAtomicFile
|
|
35
|
-
} from "../../index-
|
|
35
|
+
} from "../../index-2c5w2d1d.js";
|
|
36
36
|
import {
|
|
37
37
|
closeAfter,
|
|
38
38
|
BoundedFileReadError,
|
|
39
39
|
openRegularFile,
|
|
40
40
|
readBoundedFile
|
|
41
|
-
} from "../../index-
|
|
41
|
+
} from "../../index-s2e3h616.js";
|
|
42
42
|
import {
|
|
43
43
|
errnoOf
|
|
44
44
|
} from "../../index-jj9228tt.js";
|