experimental-ash 0.2.0-alpha.2 → 0.2.0-alpha.21
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/dist/src/channel/http-channel.d.ts +26 -0
- package/dist/src/channel/http-channel.d.ts.map +1 -0
- package/dist/src/channel/http-channel.js +24 -0
- package/dist/src/channel/http-channel.js.map +1 -0
- package/dist/src/channel/resolve-text.d.ts +20 -0
- package/dist/src/channel/resolve-text.d.ts.map +1 -0
- package/dist/src/channel/resolve-text.js +60 -0
- package/dist/src/channel/resolve-text.js.map +1 -0
- package/dist/src/channel/schedule-channel.d.ts +16 -0
- package/dist/src/channel/schedule-channel.d.ts.map +1 -0
- package/dist/src/channel/schedule-channel.js +20 -0
- package/dist/src/channel/schedule-channel.js.map +1 -0
- package/dist/src/channel/schedule.d.ts +4 -6
- package/dist/src/channel/schedule.d.ts.map +1 -1
- package/dist/src/channel/schedule.js +6 -9
- package/dist/src/channel/schedule.js.map +1 -1
- package/dist/src/channel/slack-channel.d.ts +125 -0
- package/dist/src/channel/slack-channel.d.ts.map +1 -0
- package/dist/src/channel/slack-channel.js +320 -0
- package/dist/src/channel/slack-channel.js.map +1 -0
- package/dist/src/channel/subagent-channel.d.ts +41 -0
- package/dist/src/channel/subagent-channel.d.ts.map +1 -0
- package/dist/src/channel/{subagent-emitter.js → subagent-channel.js} +15 -19
- package/dist/src/channel/subagent-channel.js.map +1 -0
- package/dist/src/channel/types.d.ts +157 -90
- package/dist/src/channel/types.d.ts.map +1 -1
- package/dist/src/channel/types.js +64 -1
- package/dist/src/channel/types.js.map +1 -1
- package/dist/src/cli/dev/input-requests.d.ts +4 -4
- package/dist/src/cli/dev/input-requests.d.ts.map +1 -1
- package/dist/src/cli/dev/input-requests.js +34 -65
- package/dist/src/cli/dev/input-requests.js.map +1 -1
- package/dist/src/cli/dev/repl.d.ts.map +1 -1
- package/dist/src/cli/dev/repl.js +41 -24
- package/dist/src/cli/dev/repl.js.map +1 -1
- package/dist/src/client/index.d.ts +3 -2
- package/dist/src/client/index.d.ts.map +1 -1
- package/dist/src/client/index.js +1 -0
- package/dist/src/client/index.js.map +1 -1
- package/dist/src/client/message-response.d.ts +5 -5
- package/dist/src/client/message-response.d.ts.map +1 -1
- package/dist/src/client/message-response.js +6 -6
- package/dist/src/client/message-response.js.map +1 -1
- package/dist/src/client/open-stream.d.ts +1 -1
- package/dist/src/client/open-stream.d.ts.map +1 -1
- package/dist/src/client/open-stream.js +1 -1
- package/dist/src/client/open-stream.js.map +1 -1
- package/dist/src/client/session-utils.d.ts +3 -3
- package/dist/src/client/session-utils.d.ts.map +1 -1
- package/dist/src/client/session-utils.js +4 -4
- package/dist/src/client/session-utils.js.map +1 -1
- package/dist/src/client/session.d.ts +5 -5
- package/dist/src/client/session.js +28 -28
- package/dist/src/client/session.js.map +1 -1
- package/dist/src/client/types.d.ts +8 -8
- package/dist/src/client/types.d.ts.map +1 -1
- package/dist/src/compiler/channel-url.d.ts +1 -1
- package/dist/src/compiler/channel-url.js +1 -1
- package/dist/src/compiler/manifest.d.ts +38 -5
- package/dist/src/compiler/manifest.d.ts.map +1 -1
- package/dist/src/compiler/manifest.js +15 -1
- package/dist/src/compiler/manifest.js.map +1 -1
- package/dist/src/compiler/module-map.js +8 -0
- package/dist/src/compiler/module-map.js.map +1 -1
- package/dist/src/compiler/normalize-channel.d.ts +1 -1
- package/dist/src/compiler/normalize-channel.js +3 -3
- package/dist/src/compiler/normalize-channel.js.map +1 -1
- package/dist/src/compiler/normalize-connection.d.ts +14 -0
- package/dist/src/compiler/normalize-connection.d.ts.map +1 -0
- package/dist/src/compiler/normalize-connection.js +29 -0
- package/dist/src/compiler/normalize-connection.js.map +1 -0
- package/dist/src/compiler/normalize-manifest.d.ts.map +1 -1
- package/dist/src/compiler/normalize-manifest.js +2 -0
- package/dist/src/compiler/normalize-manifest.js.map +1 -1
- package/dist/src/context/accessors.d.ts +13 -12
- package/dist/src/context/accessors.d.ts.map +1 -1
- package/dist/src/context/accessors.js +16 -17
- package/dist/src/context/accessors.js.map +1 -1
- package/dist/src/context/container.d.ts +17 -19
- package/dist/src/context/container.d.ts.map +1 -1
- package/dist/src/context/container.js +21 -14
- package/dist/src/context/container.js.map +1 -1
- package/dist/src/context/durable-context.d.ts +18 -0
- package/dist/src/context/durable-context.d.ts.map +1 -0
- package/dist/src/context/durable-context.js +49 -0
- package/dist/src/context/durable-context.js.map +1 -0
- package/dist/src/context/key.d.ts +43 -83
- package/dist/src/context/key.d.ts.map +1 -1
- package/dist/src/context/key.js +58 -80
- package/dist/src/context/key.js.map +1 -1
- package/dist/src/context/keys.d.ts +8 -20
- package/dist/src/context/keys.d.ts.map +1 -1
- package/dist/src/context/keys.js +20 -34
- package/dist/src/context/keys.js.map +1 -1
- package/dist/src/context/provider.d.ts +2 -2
- package/dist/src/context/provider.d.ts.map +1 -1
- package/dist/src/context/providers/connection.d.ts +4 -0
- package/dist/src/context/providers/connection.d.ts.map +1 -0
- package/dist/src/context/providers/connection.js +18 -0
- package/dist/src/context/providers/connection.js.map +1 -0
- package/dist/src/context/providers/session.d.ts.map +1 -1
- package/dist/src/context/providers/session.js +1 -2
- package/dist/src/context/providers/session.js.map +1 -1
- package/dist/src/context/providers/skill.d.ts.map +1 -1
- package/dist/src/context/providers/skill.js +2 -15
- package/dist/src/context/providers/skill.js.map +1 -1
- package/dist/src/context/run-step.d.ts +6 -8
- package/dist/src/context/run-step.d.ts.map +1 -1
- package/dist/src/context/run-step.js +15 -17
- package/dist/src/context/run-step.js.map +1 -1
- package/dist/src/context/seed-keys.d.ts +21 -0
- package/dist/src/context/seed-keys.d.ts.map +1 -0
- package/dist/src/context/seed-keys.js +31 -0
- package/dist/src/context/seed-keys.js.map +1 -0
- package/dist/src/context/serialize.d.ts +8 -9
- package/dist/src/context/serialize.d.ts.map +1 -1
- package/dist/src/context/serialize.js +38 -15
- package/dist/src/context/serialize.js.map +1 -1
- package/dist/src/discover/connections.d.ts +48 -0
- package/dist/src/discover/connections.d.ts.map +1 -0
- package/dist/src/discover/connections.js +169 -0
- package/dist/src/discover/connections.js.map +1 -0
- package/dist/src/discover/discover-agent.d.ts +1 -0
- package/dist/src/discover/discover-agent.d.ts.map +1 -1
- package/dist/src/discover/discover-agent.js +8 -0
- package/dist/src/discover/discover-agent.js.map +1 -1
- package/dist/src/discover/discover-subagent.js +7 -0
- package/dist/src/discover/discover-subagent.js.map +1 -1
- package/dist/src/discover/filesystem.d.ts +3 -3
- package/dist/src/discover/filesystem.d.ts.map +1 -1
- package/dist/src/discover/filesystem.js +7 -0
- package/dist/src/discover/filesystem.js.map +1 -1
- package/dist/src/discover/grammar.d.ts +20 -4
- package/dist/src/discover/grammar.d.ts.map +1 -1
- package/dist/src/discover/grammar.js +31 -5
- package/dist/src/discover/grammar.js.map +1 -1
- package/dist/src/discover/manifest.d.ts +28 -1
- package/dist/src/discover/manifest.d.ts.map +1 -1
- package/dist/src/discover/manifest.js +11 -1
- package/dist/src/discover/manifest.js.map +1 -1
- package/dist/src/evals/runner/artifacts.js +1 -1
- package/dist/src/evals/runner/artifacts.js.map +1 -1
- package/dist/src/evals/runner/derive-run-facts.js +5 -5
- package/dist/src/evals/runner/derive-run-facts.js.map +1 -1
- package/dist/src/evals/runner/execute-case.js +4 -4
- package/dist/src/evals/runner/execute-case.js.map +1 -1
- package/dist/src/evals/runner/execute-suite.js +1 -1
- package/dist/src/evals/runner/execute-suite.js.map +1 -1
- package/dist/src/evals/runner/reporters/braintrust.js +2 -2
- package/dist/src/evals/runner/reporters/braintrust.js.map +1 -1
- package/dist/src/evals/types.d.ts +4 -4
- package/dist/src/evals/types.d.ts.map +1 -1
- package/dist/src/execution/continuous-entry.d.ts +18 -9
- package/dist/src/execution/continuous-entry.d.ts.map +1 -1
- package/dist/src/execution/continuous-entry.js +62 -18
- package/dist/src/execution/continuous-entry.js.map +1 -1
- package/dist/src/execution/continuous-runtime.d.ts +1 -1
- package/dist/src/execution/continuous-runtime.d.ts.map +1 -1
- package/dist/src/execution/continuous-runtime.js +14 -10
- package/dist/src/execution/continuous-runtime.js.map +1 -1
- package/dist/src/execution/node-step.d.ts +1 -2
- package/dist/src/execution/node-step.d.ts.map +1 -1
- package/dist/src/execution/node-step.js +42 -55
- package/dist/src/execution/node-step.js.map +1 -1
- package/dist/src/execution/runtime-context.d.ts +3 -0
- package/dist/src/execution/runtime-context.d.ts.map +1 -1
- package/dist/src/execution/runtime-context.js +6 -4
- package/dist/src/execution/runtime-context.js.map +1 -1
- package/dist/src/execution/session.d.ts +2 -1
- package/dist/src/execution/session.d.ts.map +1 -1
- package/dist/src/execution/session.js +1 -0
- package/dist/src/execution/session.js.map +1 -1
- package/dist/src/execution/skills/access.d.ts.map +1 -1
- package/dist/src/execution/skills/instructions.d.ts +6 -6
- package/dist/src/execution/skills/instructions.d.ts.map +1 -1
- package/dist/src/execution/skills/instructions.js +15 -15
- package/dist/src/execution/skills/instructions.js.map +1 -1
- package/dist/src/execution/skills/types.d.ts +4 -4
- package/dist/src/execution/skills/types.d.ts.map +1 -1
- package/dist/src/execution/step-context.d.ts +27 -0
- package/dist/src/execution/step-context.d.ts.map +1 -0
- package/dist/src/execution/step-context.js +54 -0
- package/dist/src/execution/step-context.js.map +1 -0
- package/dist/src/execution/subagent-tool.d.ts +1 -1
- package/dist/src/execution/subagent-tool.d.ts.map +1 -1
- package/dist/src/execution/subagent-tool.js +3 -4
- package/dist/src/execution/subagent-tool.js.map +1 -1
- package/dist/src/execution/tool-compaction.d.ts +1 -3
- package/dist/src/execution/tool-compaction.d.ts.map +1 -1
- package/dist/src/execution/tool-compaction.js +6 -20
- package/dist/src/execution/tool-compaction.js.map +1 -1
- package/dist/src/execution/types.d.ts +1 -1
- package/dist/src/execution/types.d.ts.map +1 -1
- package/dist/src/execution/workflow-entry.d.ts +4 -5
- package/dist/src/execution/workflow-entry.d.ts.map +1 -1
- package/dist/src/execution/workflow-entry.js +7 -2
- package/dist/src/execution/workflow-entry.js.map +1 -1
- package/dist/src/execution/workflow-runtime.d.ts.map +1 -1
- package/dist/src/execution/workflow-runtime.js +10 -5
- package/dist/src/execution/workflow-runtime.js.map +1 -1
- package/dist/src/execution/workflow-steps.d.ts +13 -6
- package/dist/src/execution/workflow-steps.d.ts.map +1 -1
- package/dist/src/execution/workflow-steps.js +24 -19
- package/dist/src/execution/workflow-steps.js.map +1 -1
- package/dist/src/harness/emission.d.ts +36 -27
- package/dist/src/harness/emission.d.ts.map +1 -1
- package/dist/src/harness/emission.js +130 -84
- package/dist/src/harness/emission.js.map +1 -1
- package/dist/src/harness/execute-tool.d.ts +52 -0
- package/dist/src/harness/execute-tool.d.ts.map +1 -0
- package/dist/src/harness/execute-tool.js +59 -0
- package/dist/src/harness/execute-tool.js.map +1 -0
- package/dist/src/harness/input-extraction.d.ts +3 -3
- package/dist/src/harness/input-extraction.d.ts.map +1 -1
- package/dist/src/harness/input-extraction.js +15 -8
- package/dist/src/harness/input-extraction.js.map +1 -1
- package/dist/src/harness/input-requests.d.ts +46 -40
- package/dist/src/harness/input-requests.d.ts.map +1 -1
- package/dist/src/harness/input-requests.js +169 -245
- package/dist/src/harness/input-requests.js.map +1 -1
- package/dist/src/harness/messages.d.ts +10 -9
- package/dist/src/harness/messages.d.ts.map +1 -1
- package/dist/src/harness/messages.js +23 -20
- package/dist/src/harness/messages.js.map +1 -1
- package/dist/src/harness/provider-tools.d.ts +2 -2
- package/dist/src/harness/provider-tools.d.ts.map +1 -1
- package/dist/src/harness/provider-tools.js +7 -3
- package/dist/src/harness/provider-tools.js.map +1 -1
- package/dist/src/harness/step-hooks.d.ts +77 -0
- package/dist/src/harness/step-hooks.d.ts.map +1 -0
- package/dist/src/harness/step-hooks.js +192 -0
- package/dist/src/harness/step-hooks.js.map +1 -0
- package/dist/src/harness/tool-loop.d.ts +4 -2
- package/dist/src/harness/tool-loop.d.ts.map +1 -1
- package/dist/src/harness/tool-loop.js +130 -181
- package/dist/src/harness/tool-loop.js.map +1 -1
- package/dist/src/harness/tools.d.ts +12 -16
- package/dist/src/harness/tools.d.ts.map +1 -1
- package/dist/src/harness/tools.js +39 -33
- package/dist/src/harness/tools.js.map +1 -1
- package/dist/src/harness/types.d.ts +44 -28
- package/dist/src/harness/types.d.ts.map +1 -1
- package/dist/src/harness/types.js +6 -1
- package/dist/src/harness/types.js.map +1 -1
- package/dist/src/internal/application/compiled-artifacts.d.ts +5 -3
- package/dist/src/internal/application/compiled-artifacts.d.ts.map +1 -1
- package/dist/src/internal/application/compiled-artifacts.js +19 -40
- package/dist/src/internal/application/compiled-artifacts.js.map +1 -1
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/internal/authored-definition/channel.d.ts +3 -3
- package/dist/src/internal/authored-definition/channel.d.ts.map +1 -1
- package/dist/src/internal/authored-definition/channel.js +28 -4
- package/dist/src/internal/authored-definition/channel.js.map +1 -1
- package/dist/src/internal/authored-definition/connection.d.ts +10 -0
- package/dist/src/internal/authored-definition/connection.d.ts.map +1 -0
- package/dist/src/internal/authored-definition/connection.js +134 -0
- package/dist/src/internal/authored-definition/connection.js.map +1 -0
- package/dist/src/internal/authored-module.js +1 -1
- package/dist/src/internal/authored-module.js.map +1 -1
- package/dist/src/internal/message/builder.d.ts +1 -2
- package/dist/src/internal/message/builder.d.ts.map +1 -1
- package/dist/src/internal/message/builder.js +4 -12
- package/dist/src/internal/message/builder.js.map +1 -1
- package/dist/src/internal/nitro/host/configure-message-routes.d.ts +3 -1
- package/dist/src/internal/nitro/host/configure-message-routes.d.ts.map +1 -1
- package/dist/src/internal/nitro/host/configure-message-routes.js +124 -25
- package/dist/src/internal/nitro/host/configure-message-routes.js.map +1 -1
- package/dist/src/internal/nitro/host/create-application-nitro.d.ts.map +1 -1
- package/dist/src/internal/nitro/host/create-application-nitro.js +63 -21
- package/dist/src/internal/nitro/host/create-application-nitro.js.map +1 -1
- package/dist/src/internal/nitro/host/load-home-page-web-assets.d.ts +13 -0
- package/dist/src/internal/nitro/host/load-home-page-web-assets.d.ts.map +1 -0
- package/dist/src/internal/nitro/host/load-home-page-web-assets.js +35 -0
- package/dist/src/internal/nitro/host/load-home-page-web-assets.js.map +1 -0
- package/dist/src/internal/nitro/host/prepare-application-host.js +1 -1
- package/dist/src/internal/nitro/host/prepare-application-host.js.map +1 -1
- package/dist/src/internal/nitro/routes/channel-dispatch.d.ts +10 -18
- package/dist/src/internal/nitro/routes/channel-dispatch.d.ts.map +1 -1
- package/dist/src/internal/nitro/routes/channel-dispatch.js +16 -45
- package/dist/src/internal/nitro/routes/channel-dispatch.js.map +1 -1
- package/dist/src/internal/nitro/routes/home-page/build-home-page-response.d.ts +88 -0
- package/dist/src/internal/nitro/routes/home-page/build-home-page-response.d.ts.map +1 -0
- package/dist/src/internal/nitro/routes/home-page/build-home-page-response.js +175 -0
- package/dist/src/internal/nitro/routes/home-page/build-home-page-response.js.map +1 -0
- package/dist/src/internal/nitro/routes/home.d.ts +7 -0
- package/dist/src/internal/nitro/routes/home.d.ts.map +1 -0
- package/dist/src/internal/nitro/routes/home.js +22 -0
- package/dist/src/internal/nitro/routes/home.js.map +1 -0
- package/dist/src/internal/nitro/routes/index.d.ts +3 -8
- package/dist/src/internal/nitro/routes/index.d.ts.map +1 -1
- package/dist/src/internal/nitro/routes/index.js +18 -36
- package/dist/src/internal/nitro/routes/index.js.map +1 -1
- package/dist/src/internal/nitro/routes/runtime-artifacts.d.ts +10 -3
- package/dist/src/internal/nitro/routes/runtime-artifacts.d.ts.map +1 -1
- package/dist/src/internal/nitro/routes/runtime-artifacts.js +2 -9
- package/dist/src/internal/nitro/routes/runtime-artifacts.js.map +1 -1
- package/dist/src/internal/nitro/routes/runtime-stack.d.ts +8 -7
- package/dist/src/internal/nitro/routes/runtime-stack.d.ts.map +1 -1
- package/dist/src/internal/nitro/routes/runtime-stack.js +10 -10
- package/dist/src/internal/nitro/routes/runtime-stack.js.map +1 -1
- package/dist/src/internal/nitro/routes/schedule-task.d.ts +7 -7
- package/dist/src/internal/nitro/routes/schedule-task.d.ts.map +1 -1
- package/dist/src/internal/nitro/routes/schedule-task.js +22 -30
- package/dist/src/internal/nitro/routes/schedule-task.js.map +1 -1
- package/dist/src/internal/nitro/routes/web-ui/assets/index.js +10 -0
- package/dist/src/internal/nitro/routes/web-ui/assets/style.css +2 -0
- package/dist/src/internal/nitro/routes/web-ui/index.html +17 -0
- package/dist/src/internal/nitro/routes/workflow-data.d.ts +32 -0
- package/dist/src/internal/nitro/routes/workflow-data.d.ts.map +1 -0
- package/dist/src/internal/nitro/routes/workflow-data.js +142 -0
- package/dist/src/internal/nitro/routes/workflow-data.js.map +1 -0
- package/dist/src/internal/nitro/routes/workflow-route-helpers.d.ts +46 -0
- package/dist/src/internal/nitro/routes/workflow-route-helpers.d.ts.map +1 -0
- package/dist/src/internal/nitro/routes/workflow-route-helpers.js +137 -0
- package/dist/src/internal/nitro/routes/workflow-route-helpers.js.map +1 -0
- package/dist/src/internal/nitro/routes/workflow-run-events.d.ts +14 -0
- package/dist/src/internal/nitro/routes/workflow-run-events.d.ts.map +1 -0
- package/dist/src/internal/nitro/routes/workflow-run-events.js +42 -0
- package/dist/src/internal/nitro/routes/workflow-run-events.js.map +1 -0
- package/dist/src/internal/nitro/routes/workflow-run-steps.d.ts +14 -0
- package/dist/src/internal/nitro/routes/workflow-run-steps.d.ts.map +1 -0
- package/dist/src/internal/nitro/routes/workflow-run-steps.js +42 -0
- package/dist/src/internal/nitro/routes/workflow-run-steps.js.map +1 -0
- package/dist/src/internal/nitro/routes/workflow-run.d.ts +13 -0
- package/dist/src/internal/nitro/routes/workflow-run.d.ts.map +1 -0
- package/dist/src/internal/nitro/routes/workflow-run.js +35 -0
- package/dist/src/internal/nitro/routes/workflow-run.js.map +1 -0
- package/dist/src/internal/nitro/routes/workflow-runs.d.ts +11 -0
- package/dist/src/internal/nitro/routes/workflow-runs.d.ts.map +1 -0
- package/dist/src/internal/nitro/routes/workflow-runs.js +29 -0
- package/dist/src/internal/nitro/routes/workflow-runs.js.map +1 -0
- package/dist/src/protocol/message.d.ts +160 -76
- package/dist/src/protocol/message.d.ts.map +1 -1
- package/dist/src/protocol/message.js +92 -36
- package/dist/src/protocol/message.js.map +1 -1
- package/dist/src/protocol/routes.d.ts +11 -3
- package/dist/src/protocol/routes.d.ts.map +1 -1
- package/dist/src/protocol/routes.js +12 -4
- package/dist/src/protocol/routes.js.map +1 -1
- package/dist/src/public/channels/auth.d.ts +32 -81
- package/dist/src/public/channels/auth.d.ts.map +1 -1
- package/dist/src/public/channels/auth.js +23 -86
- package/dist/src/public/channels/auth.js.map +1 -1
- package/dist/src/public/channels/http.d.ts +66 -26
- package/dist/src/public/channels/http.d.ts.map +1 -1
- package/dist/src/public/channels/http.js +88 -78
- package/dist/src/public/channels/http.js.map +1 -1
- package/dist/src/public/channels/index.d.ts +9 -10
- package/dist/src/public/channels/index.d.ts.map +1 -1
- package/dist/src/public/channels/index.js +9 -9
- package/dist/src/public/channels/index.js.map +1 -1
- package/dist/src/public/channels/slack/index.d.ts +104 -37
- package/dist/src/public/channels/slack/index.d.ts.map +1 -1
- package/dist/src/public/channels/slack/index.js +168 -47
- package/dist/src/public/channels/slack/index.js.map +1 -1
- package/dist/src/public/channels/slack/lowlevel.d.ts +5 -5
- package/dist/src/public/channels/slack/lowlevel.d.ts.map +1 -1
- package/dist/src/public/channels/slack/lowlevel.js +4 -4
- package/dist/src/public/channels/slack/lowlevel.js.map +1 -1
- package/dist/src/public/connections/index.d.ts +25 -0
- package/dist/src/public/connections/index.d.ts.map +1 -0
- package/dist/src/public/connections/index.js +24 -0
- package/dist/src/public/connections/index.js.map +1 -0
- package/dist/src/public/definitions/channel.d.ts +89 -60
- package/dist/src/public/definitions/channel.d.ts.map +1 -1
- package/dist/src/public/definitions/channel.js +42 -24
- package/dist/src/public/definitions/channel.js.map +1 -1
- package/dist/src/public/definitions/connections/mcp.d.ts +60 -0
- package/dist/src/public/definitions/connections/mcp.d.ts.map +1 -0
- package/dist/src/public/definitions/connections/mcp.js +7 -0
- package/dist/src/public/definitions/connections/mcp.js.map +1 -0
- package/dist/src/public/definitions/tool.d.ts +14 -7
- package/dist/src/public/definitions/tool.d.ts.map +1 -1
- package/dist/src/public/definitions/tool.js.map +1 -1
- package/dist/src/public/index.d.ts +10 -9
- package/dist/src/public/index.d.ts.map +1 -1
- package/dist/src/public/index.js +7 -6
- package/dist/src/public/index.js.map +1 -1
- package/dist/src/public/sandboxes/internal.d.ts +1 -1
- package/dist/src/public/sandboxes/internal.js +1 -1
- package/dist/src/public/tools/defaults.d.ts +6 -6
- package/dist/src/public/tools/defaults.d.ts.map +1 -1
- package/dist/src/public/tools/defaults.js +6 -6
- package/dist/src/public/tools/defaults.js.map +1 -1
- package/dist/src/public/tools/internal.d.ts +1 -1
- package/dist/src/public/tools/internal.js +1 -1
- package/dist/src/runtime/actions/types.d.ts +21 -18
- package/dist/src/runtime/actions/types.d.ts.map +1 -1
- package/dist/src/runtime/actions/types.js +22 -19
- package/dist/src/runtime/actions/types.js.map +1 -1
- package/dist/src/runtime/agent/bootstrap-model-utils.d.ts +37 -0
- package/dist/src/runtime/agent/bootstrap-model-utils.d.ts.map +1 -0
- package/dist/src/runtime/agent/bootstrap-model-utils.js +149 -0
- package/dist/src/runtime/agent/bootstrap-model-utils.js.map +1 -0
- package/dist/src/runtime/agent/bootstrap-model.d.ts.map +1 -1
- package/dist/src/runtime/agent/bootstrap-model.js +11 -80
- package/dist/src/runtime/agent/bootstrap-model.js.map +1 -1
- package/dist/src/runtime/agent/bootstrap.d.ts.map +1 -1
- package/dist/src/runtime/agent/bootstrap.js +4 -1
- package/dist/src/runtime/agent/bootstrap.js.map +1 -1
- package/dist/src/runtime/agent/mock-model-adapter.d.ts.map +1 -1
- package/dist/src/runtime/agent/mock-model-adapter.js +72 -134
- package/dist/src/runtime/agent/mock-model-adapter.js.map +1 -1
- package/dist/src/runtime/channels/registry.d.ts +21 -0
- package/dist/src/runtime/channels/registry.d.ts.map +1 -0
- package/dist/src/runtime/channels/registry.js +65 -0
- package/dist/src/runtime/channels/registry.js.map +1 -0
- package/dist/src/runtime/connections/mcp-client.d.ts +48 -0
- package/dist/src/runtime/connections/mcp-client.d.ts.map +1 -0
- package/dist/src/runtime/connections/mcp-client.js +182 -0
- package/dist/src/runtime/connections/mcp-client.js.map +1 -0
- package/dist/src/runtime/connections/registry.d.ts +33 -0
- package/dist/src/runtime/connections/registry.d.ts.map +1 -0
- package/dist/src/runtime/connections/registry.js +54 -0
- package/dist/src/runtime/connections/registry.js.map +1 -0
- package/dist/src/runtime/connections/types.d.ts +75 -0
- package/dist/src/runtime/connections/types.d.ts.map +1 -0
- package/dist/src/runtime/connections/types.js +9 -0
- package/dist/src/runtime/connections/types.js.map +1 -0
- package/dist/src/runtime/framework-channels/index.d.ts +6 -6
- package/dist/src/runtime/framework-channels/index.d.ts.map +1 -1
- package/dist/src/runtime/framework-channels/index.js +16 -14
- package/dist/src/runtime/framework-channels/index.js.map +1 -1
- package/dist/src/runtime/framework-tools/ask-question.js +4 -4
- package/dist/src/runtime/framework-tools/ask-question.js.map +1 -1
- package/dist/src/runtime/framework-tools/connection-execute.d.ts +10 -0
- package/dist/src/runtime/framework-tools/connection-execute.d.ts.map +1 -0
- package/dist/src/runtime/framework-tools/connection-execute.js +50 -0
- package/dist/src/runtime/framework-tools/connection-execute.js.map +1 -0
- package/dist/src/runtime/framework-tools/connection-search.d.ts +43 -0
- package/dist/src/runtime/framework-tools/connection-search.d.ts.map +1 -0
- package/dist/src/runtime/framework-tools/connection-search.js +135 -0
- package/dist/src/runtime/framework-tools/connection-search.js.map +1 -0
- package/dist/src/runtime/framework-tools/file-state.d.ts +5 -5
- package/dist/src/runtime/framework-tools/file-state.d.ts.map +1 -1
- package/dist/src/runtime/framework-tools/file-state.js +6 -8
- package/dist/src/runtime/framework-tools/file-state.js.map +1 -1
- package/dist/src/runtime/framework-tools/index.d.ts +3 -1
- package/dist/src/runtime/framework-tools/index.d.ts.map +1 -1
- package/dist/src/runtime/framework-tools/index.js +10 -1
- package/dist/src/runtime/framework-tools/index.js.map +1 -1
- package/dist/src/runtime/framework-tools/skill.d.ts +4 -4
- package/dist/src/runtime/framework-tools/skill.d.ts.map +1 -1
- package/dist/src/runtime/framework-tools/skill.js +14 -11
- package/dist/src/runtime/framework-tools/skill.js.map +1 -1
- package/dist/src/runtime/framework-tools/todo.d.ts.map +1 -1
- package/dist/src/runtime/framework-tools/todo.js +2 -4
- package/dist/src/runtime/framework-tools/todo.js.map +1 -1
- package/dist/src/runtime/input/types.d.ts +40 -115
- package/dist/src/runtime/input/types.d.ts.map +1 -1
- package/dist/src/runtime/input/types.js +28 -66
- package/dist/src/runtime/input/types.js.map +1 -1
- package/dist/src/runtime/loaders/module-map.js +8 -0
- package/dist/src/runtime/loaders/module-map.js.map +1 -1
- package/dist/src/runtime/prompt/compose.d.ts +4 -1
- package/dist/src/runtime/prompt/compose.d.ts.map +1 -1
- package/dist/src/runtime/prompt/compose.js +18 -1
- package/dist/src/runtime/prompt/compose.js.map +1 -1
- package/dist/src/runtime/prompt/connections.d.ts +10 -0
- package/dist/src/runtime/prompt/connections.d.ts.map +1 -0
- package/dist/src/runtime/prompt/connections.js +25 -0
- package/dist/src/runtime/prompt/connections.js.map +1 -0
- package/dist/src/runtime/resolve-agent-graph.d.ts.map +1 -1
- package/dist/src/runtime/resolve-agent-graph.js +29 -7
- package/dist/src/runtime/resolve-agent-graph.js.map +1 -1
- package/dist/src/runtime/resolve-agent.d.ts.map +1 -1
- package/dist/src/runtime/resolve-agent.js +3 -0
- package/dist/src/runtime/resolve-agent.js.map +1 -1
- package/dist/src/runtime/resolve-channel.d.ts.map +1 -1
- package/dist/src/runtime/resolve-channel.js +1 -0
- package/dist/src/runtime/resolve-channel.js.map +1 -1
- package/dist/src/runtime/resolve-connection.d.ts +16 -0
- package/dist/src/runtime/resolve-connection.d.ts.map +1 -0
- package/dist/src/runtime/resolve-connection.js +69 -0
- package/dist/src/runtime/resolve-connection.js.map +1 -0
- package/dist/src/runtime/resolve-tool.d.ts.map +1 -1
- package/dist/src/runtime/resolve-tool.js +8 -0
- package/dist/src/runtime/resolve-tool.js.map +1 -1
- package/dist/src/runtime/sessions/auth.d.ts +1 -1
- package/dist/src/runtime/sessions/compiled-agent-cache.d.ts +2 -0
- package/dist/src/runtime/sessions/compiled-agent-cache.d.ts.map +1 -1
- package/dist/src/runtime/sessions/compiled-agent-cache.js +14 -0
- package/dist/src/runtime/sessions/compiled-agent-cache.js.map +1 -1
- package/dist/src/runtime/skills/fragment-context.d.ts +2 -2
- package/dist/src/runtime/skills/fragment-context.d.ts.map +1 -1
- package/dist/src/runtime/skills/fragment-context.js +2 -2
- package/dist/src/runtime/skills/fragment-context.js.map +1 -1
- package/dist/src/runtime/standard-schema.d.ts +28 -0
- package/dist/src/runtime/standard-schema.d.ts.map +1 -0
- package/dist/src/runtime/standard-schema.js +65 -0
- package/dist/src/runtime/standard-schema.js.map +1 -0
- package/dist/src/runtime/types.d.ts +29 -3
- package/dist/src/runtime/types.d.ts.map +1 -1
- package/dist/src/services/dev-client/send-message.d.ts +2 -2
- package/dist/src/services/dev-client/send-message.d.ts.map +1 -1
- package/dist/src/services/dev-client/send-message.js +21 -22
- package/dist/src/services/dev-client/send-message.js.map +1 -1
- package/dist/src/services/dev-client/session.d.ts +5 -5
- package/dist/src/services/dev-client/session.d.ts.map +1 -1
- package/dist/src/services/dev-client/session.js +2 -2
- package/dist/src/services/dev-client/session.js.map +1 -1
- package/dist/src/services/dev-client.d.ts +6 -6
- package/dist/src/services/dev-client.d.ts.map +1 -1
- package/dist/src/services/dev-client.js +3 -3
- package/dist/src/services/dev-client.js.map +1 -1
- package/docs/external-agent-protocol.md +37 -34
- package/docs/internals/channels.md +15 -12
- package/docs/internals/context.md +81 -161
- package/docs/internals/message-runtime.md +28 -26
- package/docs/public/README.md +22 -20
- package/docs/public/auth-and-route-protection.md +15 -12
- package/docs/public/channels/README.md +16 -11
- package/docs/public/cli-build-and-debugging.md +1 -1
- package/docs/public/context-control.md +7 -3
- package/docs/public/evals.md +3 -3
- package/docs/public/getting-started.md +15 -12
- package/docs/public/human-in-the-loop.md +45 -57
- package/docs/public/migration-guide.md +71 -0
- package/docs/public/project-layout.md +5 -0
- package/docs/public/runs-and-streaming.md +32 -25
- package/docs/public/schedules.md +4 -4
- package/docs/public/session-context.md +131 -15
- package/docs/public/skills.md +27 -3
- package/docs/public/subagents.md +2 -2
- package/docs/public/tools.md +23 -30
- package/docs/public/typescript-api.md +16 -12
- package/docs/public/vercel-deployment.md +3 -4
- package/docs/public/workspace.md +11 -11
- package/package.json +18 -11
- package/dist/src/channel/emitter-registry.d.ts +0 -34
- package/dist/src/channel/emitter-registry.d.ts.map +0 -1
- package/dist/src/channel/emitter-registry.js +0 -63
- package/dist/src/channel/emitter-registry.js.map +0 -1
- package/dist/src/channel/http-emitter.d.ts +0 -16
- package/dist/src/channel/http-emitter.d.ts.map +0 -1
- package/dist/src/channel/http-emitter.js +0 -22
- package/dist/src/channel/http-emitter.js.map +0 -1
- package/dist/src/channel/schedule-emitter.d.ts +0 -15
- package/dist/src/channel/schedule-emitter.d.ts.map +0 -1
- package/dist/src/channel/schedule-emitter.js +0 -21
- package/dist/src/channel/schedule-emitter.js.map +0 -1
- package/dist/src/channel/slack-emitter.d.ts +0 -56
- package/dist/src/channel/slack-emitter.d.ts.map +0 -1
- package/dist/src/channel/slack-emitter.js +0 -235
- package/dist/src/channel/slack-emitter.js.map +0 -1
- package/dist/src/channel/subagent-emitter.d.ts +0 -41
- package/dist/src/channel/subagent-emitter.d.ts.map +0 -1
- package/dist/src/channel/subagent-emitter.js.map +0 -1
- package/dist/src/context/state.d.ts +0 -27
- package/dist/src/context/state.d.ts.map +0 -1
- package/dist/src/context/state.js +0 -53
- package/dist/src/context/state.js.map +0 -1
- package/dist/src/internal/message/nitro-route-shims.d.ts +0 -6
- package/dist/src/internal/message/nitro-route-shims.d.ts.map +0 -1
- package/dist/src/internal/message/nitro-route-shims.js +0 -38
- package/dist/src/internal/message/nitro-route-shims.js.map +0 -1
- package/dist/src/internal/message/rewrite-generated-imports.d.ts +0 -15
- package/dist/src/internal/message/rewrite-generated-imports.d.ts.map +0 -1
- package/dist/src/internal/message/rewrite-generated-imports.js +0 -59
- package/dist/src/internal/message/rewrite-generated-imports.js.map +0 -1
- package/dist/src/internal/nitro/host/channel-url-matcher.d.ts +0 -35
- package/dist/src/internal/nitro/host/channel-url-matcher.d.ts.map +0 -1
- package/dist/src/internal/nitro/host/channel-url-matcher.js +0 -57
- package/dist/src/internal/nitro/host/channel-url-matcher.js.map +0 -1
- package/dist/src/internal/nitro/routes/home-page/build-home-page-view-model.d.ts +0 -11
- package/dist/src/internal/nitro/routes/home-page/build-home-page-view-model.d.ts.map +0 -1
- package/dist/src/internal/nitro/routes/home-page/build-home-page-view-model.js +0 -264
- package/dist/src/internal/nitro/routes/home-page/build-home-page-view-model.js.map +0 -1
- package/dist/src/internal/nitro/routes/home-page/render-home-page.d.ts +0 -9
- package/dist/src/internal/nitro/routes/home-page/render-home-page.d.ts.map +0 -1
- package/dist/src/internal/nitro/routes/home-page/render-home-page.js +0 -15
- package/dist/src/internal/nitro/routes/home-page/render-home-page.js.map +0 -1
- package/dist/src/internal/nitro/routes/index.html +0 -525
- package/dist/src/internal/nitro/runtime-configuration.d.ts +0 -16
- package/dist/src/internal/nitro/runtime-configuration.d.ts.map +0 -1
- package/dist/src/internal/nitro/runtime-configuration.js +0 -23
- package/dist/src/internal/nitro/runtime-configuration.js.map +0 -1
- package/dist/src/internal/nitro/shims/runtime-configuration-plugin.d.ts +0 -10
- package/dist/src/internal/nitro/shims/runtime-configuration-plugin.d.ts.map +0 -1
- package/dist/src/internal/nitro/shims/runtime-configuration-plugin.js +0 -17
- package/dist/src/internal/nitro/shims/runtime-configuration-plugin.js.map +0 -1
- package/dist/src/runtime/tools/execute-tool.d.ts +0 -20
- package/dist/src/runtime/tools/execute-tool.d.ts.map +0 -1
- package/dist/src/runtime/tools/execute-tool.js +0 -69
- package/dist/src/runtime/tools/execute-tool.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/evals/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACxF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAEhE;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjD,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACvD;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,aAAa,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1C,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/evals/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACxF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAEhE;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAA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AC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,KAAK,EAAE;QAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/D,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;IAC/B,QAAQ,CAAC,KAAK,EAAE,SAAS,iBAAiB,EAAE,CAAC;IAC7C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,6EAA6E;IAC7E,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B"}
|
|
@@ -1,15 +1,24 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type
|
|
1
|
+
import type { DeliverPayload, SessionAuthContext } from "../channel/types.js";
|
|
2
|
+
import { type HarnessEmitFn } from "../harness/types.js";
|
|
3
3
|
import { type CreateRuntime } from "./node-step.js";
|
|
4
|
+
/**
|
|
5
|
+
* One item in the continuous runtime's in-memory delivery queue.
|
|
6
|
+
*
|
|
7
|
+
* Carries the serializable payload (message + input responses) and an
|
|
8
|
+
* optional auth update from `DeliverInput.auth`.
|
|
9
|
+
*/
|
|
10
|
+
export interface QueueItem {
|
|
11
|
+
readonly auth?: SessionAuthContext | null;
|
|
12
|
+
readonly payload: DeliverPayload;
|
|
13
|
+
}
|
|
4
14
|
/**
|
|
5
15
|
* Input for the continuous (non-durable) entry.
|
|
6
16
|
*
|
|
7
17
|
* The caller — the continuous runtime — provides the durability shell:
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* runtime flavor.
|
|
18
|
+
* one serialized runtime seed context, a composed `emit` function backed by
|
|
19
|
+
* the event stream, the initial user message, the inbound message queue, a
|
|
20
|
+
* `park` function, and a `createRuntime` factory so the subagent tool wrapper
|
|
21
|
+
* can start delegated child runs on the same runtime flavor.
|
|
13
22
|
*
|
|
14
23
|
* Everything else (session construction, node step wiring, provider
|
|
15
24
|
* lifecycle, the turn loop) is owned by this module, mirroring how
|
|
@@ -18,13 +27,13 @@ import { type CreateRuntime } from "./node-step.js";
|
|
|
18
27
|
*/
|
|
19
28
|
export interface ContinuousEntryInput {
|
|
20
29
|
readonly createRuntime: CreateRuntime;
|
|
21
|
-
readonly ctx: AshContext;
|
|
22
30
|
readonly emit: HarnessEmitFn;
|
|
23
31
|
readonly input: {
|
|
24
32
|
readonly message: string;
|
|
25
33
|
};
|
|
26
34
|
readonly park: () => Promise<void>;
|
|
27
|
-
readonly queue:
|
|
35
|
+
readonly queue: QueueItem[];
|
|
36
|
+
readonly serializedRuntimeContext: Record<string, unknown>;
|
|
28
37
|
}
|
|
29
38
|
/**
|
|
30
39
|
* Result returned when the continuous entry completes. The continuous
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"continuous-entry.d.ts","sourceRoot":"","sources":["../../../src/execution/continuous-entry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"continuous-entry.d.ts","sourceRoot":"","sources":["../../../src/execution/continuous-entry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAI9E,OAAO,EACL,KAAK,aAAa,EAInB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,aAAa,EAA2B,MAAM,gBAAgB,CAAC;AAS7E;;;;;GAKG;AACH,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,IAAI,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAC1C,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC;CAClC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC;IACtC,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAC7B,QAAQ,CAAC,KAAK,EAAE;QAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAC7C,QAAQ,CAAC,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC,QAAQ,CAAC,KAAK,EAAE,SAAS,EAAE,CAAC;IAC5B,QAAQ,CAAC,wBAAwB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC5D;AAED;;;;;GAKG;AACH,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;CAC9B;AAED;;;;;;;;GAQG;AACH,wBAAsB,eAAe,CAAC,KAAK,EAAE,oBAAoB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAwFjG"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { BundleKey,
|
|
2
|
-
import {
|
|
1
|
+
import { BundleKey, ContinuationTokenKey, ModeKey, SessionIdKey } from "../context/keys.js";
|
|
2
|
+
import { deserializeRuntimeContext } from "../context/serialize.js";
|
|
3
3
|
import { coalesceTurnInputs } from "../harness/messages.js";
|
|
4
|
+
import { isStepDone, } from "../harness/types.js";
|
|
4
5
|
import { createExecutionNodeStep } from "./node-step.js";
|
|
5
6
|
import { createSession } from "./session.js";
|
|
7
|
+
import { prepareStepContext, runStepWithChannelGuard } from "./step-context.js";
|
|
6
8
|
import { createTaskModeWaitError } from "./task-mode.js";
|
|
7
9
|
/**
|
|
8
10
|
* Main body of a continuous (in-memory) run.
|
|
@@ -14,34 +16,59 @@ import { createTaskModeWaitError } from "./task-mode.js";
|
|
|
14
16
|
* on the queue and coalesce follow-up messages before the next turn.
|
|
15
17
|
*/
|
|
16
18
|
export async function continuousEntry(input) {
|
|
17
|
-
const { createRuntime,
|
|
18
|
-
const
|
|
19
|
-
const
|
|
19
|
+
const { createRuntime, emit, input: entryInput, park, queue, serializedRuntimeContext } = input;
|
|
20
|
+
const seedCtx = await deserializeRuntimeContext(serializedRuntimeContext);
|
|
21
|
+
const bundle = seedCtx.get(BundleKey);
|
|
22
|
+
const mode = seedCtx.get(ModeKey);
|
|
20
23
|
const session = createSession({
|
|
21
24
|
compactionOverrides: {
|
|
22
25
|
thresholdPercent: bundle.resolvedAgent.config.compaction?.thresholdPercent,
|
|
23
26
|
},
|
|
24
|
-
continuationToken:
|
|
27
|
+
continuationToken: seedCtx.get(ContinuationTokenKey),
|
|
28
|
+
sessionId: seedCtx.get(SessionIdKey),
|
|
25
29
|
turnAgent: bundle.turnAgent,
|
|
26
30
|
});
|
|
27
31
|
const rawStep = createExecutionNodeStep({
|
|
28
|
-
channelEmitter: ctx.get(ChannelEmitterKey),
|
|
29
32
|
compiledArtifactsSource: bundle.compiledArtifactsSource,
|
|
30
33
|
createRuntime,
|
|
31
34
|
emit,
|
|
32
35
|
mode,
|
|
33
36
|
node: bundle.graph.root,
|
|
34
37
|
});
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
+
/**
|
|
39
|
+
* Wraps a raw step with context provider lifecycle. When a
|
|
40
|
+
* {@link QueueItem} carries deliver-time auth, it is applied to the
|
|
41
|
+
* in-memory context before the channel's onDeliver hook runs.
|
|
42
|
+
*/
|
|
43
|
+
const deliverStep = (item) => {
|
|
44
|
+
return async (stepSession) => {
|
|
45
|
+
const prepared = await prepareStepContext({
|
|
46
|
+
delivery: item,
|
|
47
|
+
serializedRuntimeContext,
|
|
48
|
+
session: stepSession,
|
|
49
|
+
});
|
|
50
|
+
return runStepWithChannelGuard(prepared, stepSession, (enrichedSession) => rawStep(enrichedSession, prepared.input));
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Continuation step — called when the harness returns a `next` step
|
|
55
|
+
* function (tool-loop continuation). No deliver payload.
|
|
56
|
+
*/
|
|
57
|
+
const wrapContinuation = (innerStep) => {
|
|
58
|
+
return async (stepSession, stepInput) => {
|
|
59
|
+
const prepared = await prepareStepContext({
|
|
60
|
+
serializedRuntimeContext,
|
|
61
|
+
session: stepSession,
|
|
62
|
+
});
|
|
63
|
+
return runStepWithChannelGuard(prepared, stepSession, (enrichedSession) => innerStep(enrichedSession, stepInput));
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
let currentStep = deliverStep({ payload: { message: entryInput.message } });
|
|
38
67
|
let currentSession = session;
|
|
39
68
|
while (true) {
|
|
40
|
-
const stepResult = await currentStep(currentSession,
|
|
69
|
+
const stepResult = await currentStep(currentSession, undefined);
|
|
41
70
|
currentSession = stepResult.session;
|
|
42
|
-
if (stepResult.next
|
|
43
|
-
typeof stepResult.next === "object" &&
|
|
44
|
-
"done" in stepResult.next) {
|
|
71
|
+
if (isStepDone(stepResult.next)) {
|
|
45
72
|
return { output: stepResult.next.output, status: "completed" };
|
|
46
73
|
}
|
|
47
74
|
if (stepResult.next === null) {
|
|
@@ -52,12 +79,29 @@ export async function continuousEntry(input) {
|
|
|
52
79
|
await park();
|
|
53
80
|
}
|
|
54
81
|
await Promise.resolve();
|
|
55
|
-
|
|
56
|
-
currentStep =
|
|
82
|
+
const coalescedItem = coalesceQueueItems(queue.splice(0));
|
|
83
|
+
currentStep = deliverStep(coalescedItem);
|
|
57
84
|
continue;
|
|
58
85
|
}
|
|
59
|
-
currentStep = stepResult.next;
|
|
60
|
-
currentInput = undefined;
|
|
86
|
+
currentStep = wrapContinuation(stepResult.next);
|
|
61
87
|
}
|
|
62
88
|
}
|
|
89
|
+
/**
|
|
90
|
+
* Coalesces an array of {@link QueueItem}s into a single item by
|
|
91
|
+
* reducing the payloads and keeping the last auth value.
|
|
92
|
+
*/
|
|
93
|
+
function coalesceQueueItems(items) {
|
|
94
|
+
const payload = items.map((i) => i.payload).reduce(coalesceTurnInputs);
|
|
95
|
+
// Keep the last auth — the most recent deliver's caller wins.
|
|
96
|
+
let lastAuth;
|
|
97
|
+
for (const item of items) {
|
|
98
|
+
if (item.auth !== undefined) {
|
|
99
|
+
lastAuth = item.auth;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
if (lastAuth === undefined) {
|
|
103
|
+
return { payload };
|
|
104
|
+
}
|
|
105
|
+
return { auth: lastAuth, payload };
|
|
106
|
+
}
|
|
63
107
|
//# sourceMappingURL=continuous-entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"continuous-entry.js","sourceRoot":"","sources":["../../../src/execution/continuous-entry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"continuous-entry.js","sourceRoot":"","sources":["../../../src/execution/continuous-entry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,oBAAoB,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC5F,OAAO,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAGL,UAAU,GAEX,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAsB,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAChF,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAmDzD;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,KAA2B;IAC/D,MAAM,EAAE,aAAa,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,wBAAwB,EAAE,GAAG,KAAK,CAAC;IAEhG,MAAM,OAAO,GAAG,MAAM,yBAAyB,CAAC,wBAAwB,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,KAAkB;IAC5C,MAAM,OAAO,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC;IAEvE,8DAA8D;IAC9D,IAAI,QAA+C,CAAC;IACpD,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;YAC5B,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC;QACvB,CAAC;IACH,CAAC;IAED,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC3B,OAAO,EAAE,OAAO,EAAE,CAAC;IACrB,CAAC;IAED,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC;AACrC,CAAC"}
|
|
@@ -12,7 +12,7 @@ import type { RuntimeCompiledArtifactsSource } from "../runtime/compiled-artifac
|
|
|
12
12
|
* when a follow-up message arrives.
|
|
13
13
|
*
|
|
14
14
|
* An optional `nodeSelector` in the config targets a specific node in
|
|
15
|
-
* the compiled agent graph.
|
|
15
|
+
* the compiled agent graph. Routes omit it (root agent). The subagent
|
|
16
16
|
* tool creates a child runtime with the target node's selector.
|
|
17
17
|
*/
|
|
18
18
|
export declare function createContinuousLoopRuntime(config: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"continuous-runtime.d.ts","sourceRoot":"","sources":["../../../src/execution/continuous-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"continuous-runtime.d.ts","sourceRoot":"","sources":["../../../src/execution/continuous-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAKV,OAAO,EACR,MAAM,qBAAqB,CAAC;AAO7B,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,yCAAyC,CAAC;AAK9F;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,2BAA2B,CAAC,MAAM,EAAE;IAClD,QAAQ,CAAC,uBAAuB,EAAE,8BAA8B,CAAC;IACjE,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;CAChC,GAAG,OAAO,CAiGV"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { assertNoDurableContextInRuntimeSeed, serializeRuntimeContext, } from "../context/serialize.js";
|
|
1
2
|
import { getCompiledRuntimeAgentBundle } from "../runtime/sessions/compiled-agent-cache.js";
|
|
2
3
|
import { continuousEntry } from "./continuous-entry.js";
|
|
3
4
|
import { buildRunContext } from "./runtime-context.js";
|
|
@@ -13,7 +14,7 @@ import { buildRunContext } from "./runtime-context.js";
|
|
|
13
14
|
* when a follow-up message arrives.
|
|
14
15
|
*
|
|
15
16
|
* An optional `nodeSelector` in the config targets a specific node in
|
|
16
|
-
* the compiled agent graph.
|
|
17
|
+
* the compiled agent graph. Routes omit it (root agent). The subagent
|
|
17
18
|
* tool creates a child runtime with the target node's selector.
|
|
18
19
|
*/
|
|
19
20
|
export function createContinuousLoopRuntime(config) {
|
|
@@ -26,27 +27,27 @@ export function createContinuousLoopRuntime(config) {
|
|
|
26
27
|
nodeSelector: config.nodeSelector,
|
|
27
28
|
});
|
|
28
29
|
const ctx = buildRunContext({ bundle, run: input });
|
|
30
|
+
assertNoDurableContextInRuntimeSeed(ctx);
|
|
31
|
+
const serializedRuntimeContext = serializeRuntimeContext(ctx);
|
|
29
32
|
const eventStream = new TransformStream(undefined, undefined, new CountQueuingStrategy({ highWaterMark: 1024 }));
|
|
30
33
|
const queue = [];
|
|
31
34
|
queues.set(input.continuationToken, queue);
|
|
32
35
|
const result = (async () => {
|
|
33
36
|
const writer = eventStream.writable.getWriter();
|
|
34
|
-
const rawEmit = async (event) => {
|
|
35
|
-
await writer.write(event);
|
|
36
|
-
};
|
|
37
37
|
const emit = async (event) => {
|
|
38
|
-
await input.
|
|
38
|
+
const toEmit = await input.channel.onEvent(event);
|
|
39
|
+
await writer.write(toEmit);
|
|
39
40
|
};
|
|
40
41
|
try {
|
|
41
42
|
const entryResult = await continuousEntry({
|
|
42
43
|
createRuntime: createContinuousLoopRuntime,
|
|
43
|
-
ctx,
|
|
44
44
|
emit,
|
|
45
45
|
input: input.input,
|
|
46
46
|
park: () => new Promise((resolve) => {
|
|
47
47
|
parked.set(input.continuationToken, resolve);
|
|
48
48
|
}),
|
|
49
49
|
queue,
|
|
50
|
+
serializedRuntimeContext,
|
|
50
51
|
});
|
|
51
52
|
await writer.close();
|
|
52
53
|
queues.delete(input.continuationToken);
|
|
@@ -70,19 +71,22 @@ export function createContinuousLoopRuntime(config) {
|
|
|
70
71
|
if (queue === undefined) {
|
|
71
72
|
throw new Error(`No active session for continuationToken "${input.continuationToken}".`);
|
|
72
73
|
}
|
|
73
|
-
queue.push(
|
|
74
|
+
queue.push({
|
|
75
|
+
auth: input.auth,
|
|
76
|
+
payload: input.payload,
|
|
77
|
+
});
|
|
74
78
|
const signal = parked.get(input.continuationToken);
|
|
75
79
|
if (signal !== undefined) {
|
|
76
80
|
parked.delete(input.continuationToken);
|
|
77
81
|
signal();
|
|
78
82
|
}
|
|
79
83
|
},
|
|
80
|
-
async getEventStream(
|
|
84
|
+
async getEventStream(_sessionId, _options) {
|
|
81
85
|
// The continuous runtime delivers events synchronously through the
|
|
82
86
|
// `RunHandle.events` stream returned by `run()`. There is no
|
|
83
87
|
// out-of-band durable event store to read from, so a separate
|
|
84
|
-
// event-stream lookup by
|
|
85
|
-
// need this method should target the workflow runtime.
|
|
88
|
+
// event-stream lookup by session id is unsupported here. Routes
|
|
89
|
+
// that need this method should target the workflow runtime.
|
|
86
90
|
throw new Error("createContinuousLoopRuntime does not support getEventStream(); read events from RunHandle.events instead.");
|
|
87
91
|
},
|
|
88
92
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"continuous-runtime.js","sourceRoot":"","sources":["../../../src/execution/continuous-runtime.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"continuous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S,EAAE,CAAC;gBACxB,MAAM,IAAI,KAAK,CAAC,4CAA4C,KAAK,CAAC,iBAAiB,IAAI,CAAC,CAAC;YAC3F,CAAC;YAED,KAAK,CAAC,IAAI,CAAC;gBACT,IAAI,EAAE,KAAK,CAAC,IAAI;gBAChB,OAAO,EAAE,KAAK,CAAC,OAAO;aACvB,CAAC,CAAC;YAEH,MAAM,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;YAEnD,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;gBACzB,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;gBACvC,MAAM,EAAE,CAAC;YACX,CAAC;QACH,CAAC;QAED,KAAK,CAAC,cAAc,CAClB,UAAkB,EAClB,QAAgC;YAEhC,mEAAmE;YACnE,6DAA6D;YAC7D,8DAA8D;YAC9D,gEAAgE;YAChE,4DAA4D;YAC5D,MAAM,IAAI,KAAK,CACb,2GAA2G,CAC5G,CAAC;QACJ,CAAC;KACF,CAAC;IAEF,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Runtime } from "../channel/types.js";
|
|
2
2
|
import type { HarnessEmitFn, StepFn } from "../harness/types.js";
|
|
3
3
|
import type { RunMode } from "../run-mode.js";
|
|
4
4
|
import type { RuntimeCompiledArtifactsSource } from "../runtime/compiled-artifacts-source.js";
|
|
@@ -17,7 +17,6 @@ export type CreateRuntime = (config: {
|
|
|
17
17
|
* Input for building a harness step for one resolved runtime node.
|
|
18
18
|
*/
|
|
19
19
|
export interface CreateExecutionNodeStepInput {
|
|
20
|
-
readonly channelEmitter?: ChannelEmitter;
|
|
21
20
|
readonly compiledArtifactsSource: RuntimeCompiledArtifactsSource;
|
|
22
21
|
/**
|
|
23
22
|
* Runtime constructor used by the subagent tool executor to start
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-step.d.ts","sourceRoot":"","sources":["../../../src/execution/node-step.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"node-step.d.ts","sourceRoot":"","sources":["../../../src/execution/node-step.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAGnD,OAAO,KAAK,EAAE,aAAa,EAAkB,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAGjF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAE9C,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,yCAAyC,CAAC;AAC9F,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAQpE;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,MAAM,EAAE;IACnC,QAAQ,CAAC,uBAAuB,EAAE,8BAA8B,CAAC;IACjE,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;CAChC,KAAK,OAAO,CAAC;AAEd;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,uBAAuB,EAAE,8BAA8B,CAAC;IACjE;;;;OAIG;IACH,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC;IACtC,QAAQ,CAAC,IAAI,CAAC,EAAE,aAAa,CAAC;IAC9B,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,wBAAwB,CAAC;CACzC;AAID;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,4BAA4B,GAAG,MAAM,CAkBnF"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { createToolLoopHarness } from "../harness/tool-loop.js";
|
|
2
2
|
import { resolveInstalledPackageInfo } from "../internal/application/package.js";
|
|
3
3
|
import { resolveRuntimeModelReference } from "../runtime/agent/resolve-model.js";
|
|
4
|
-
import { executeRuntimeToolCall } from "../runtime/tools/execute-tool.js";
|
|
5
4
|
import { findRegisteredRuntimeTool } from "../runtime/tools/registry.js";
|
|
6
5
|
import { createSubagentToolExecutor } from "./subagent-tool.js";
|
|
7
6
|
import { createToolCompactionHandler } from "./tool-compaction.js";
|
|
@@ -13,22 +12,19 @@ const NOOP_EMIT = async () => { };
|
|
|
13
12
|
export function createExecutionNodeStep(input) {
|
|
14
13
|
const parentEmit = input.emit ?? NOOP_EMIT;
|
|
15
14
|
const resolveModel = createRuntimeModelResolver(input.compiledArtifactsSource);
|
|
16
|
-
const
|
|
15
|
+
const tools = createNodeHarnessTools({
|
|
17
16
|
createRuntime: input.createRuntime,
|
|
18
17
|
node: input.node,
|
|
19
18
|
parentEmit,
|
|
20
19
|
});
|
|
21
|
-
const toolNeedsApprovalFns = createNodeNeedsApprovalFns(input.node);
|
|
22
20
|
const onCompaction = createToolCompactionHandler(collectResolvedTools(input.node));
|
|
23
21
|
return createToolLoopHarness({
|
|
24
|
-
channelEmitter: input.channelEmitter,
|
|
25
22
|
emit: input.emit,
|
|
26
23
|
mode: input.mode,
|
|
27
24
|
onCompaction,
|
|
28
25
|
resolveModel,
|
|
29
26
|
runtimeIdentity: buildRuntimeIdentity(input.node),
|
|
30
|
-
|
|
31
|
-
toolNeedsApprovalFns,
|
|
27
|
+
tools,
|
|
32
28
|
});
|
|
33
29
|
}
|
|
34
30
|
/**
|
|
@@ -58,6 +54,11 @@ function buildRuntimeIdentity(node) {
|
|
|
58
54
|
}
|
|
59
55
|
return identity;
|
|
60
56
|
}
|
|
57
|
+
function createRuntimeModelResolver(compiledArtifactsSource) {
|
|
58
|
+
return (modelReference) => resolveRuntimeModelReference(modelReference, {
|
|
59
|
+
compiledArtifactsSource,
|
|
60
|
+
});
|
|
61
|
+
}
|
|
61
62
|
/**
|
|
62
63
|
* Collects the {@link ResolvedToolDefinition}s visible to one runtime node
|
|
63
64
|
* for compaction-hook dispatch.
|
|
@@ -65,67 +66,53 @@ function buildRuntimeIdentity(node) {
|
|
|
65
66
|
function collectResolvedTools(node) {
|
|
66
67
|
return [...node.toolRegistry.toolsByName.values()].map((registered) => registered.definition);
|
|
67
68
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}
|
|
78
|
-
function createRuntimeModelResolver(compiledArtifactsSource) {
|
|
79
|
-
return (modelReference) => resolveRuntimeModelReference(modelReference, {
|
|
80
|
-
compiledArtifactsSource,
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
function createNodeToolExecutors(input) {
|
|
84
|
-
const executors = new Map();
|
|
69
|
+
/**
|
|
70
|
+
* Resolves unified {@link HarnessToolDefinition}s from the node's registries.
|
|
71
|
+
*
|
|
72
|
+
* For authored tools: copies all lifecycle fields from the resolved definition.
|
|
73
|
+
* For subagent tools: wraps the subagent executor as the execute function.
|
|
74
|
+
* Tools without `execute` (provider-managed) get entries with schema but no execute.
|
|
75
|
+
*/
|
|
76
|
+
function createNodeHarnessTools(input) {
|
|
77
|
+
const tools = new Map();
|
|
85
78
|
for (const tool of input.node.turnAgent.tools) {
|
|
86
|
-
|
|
87
|
-
continue;
|
|
88
|
-
}
|
|
89
|
-
executors.set(tool.name, createToolExecutor({
|
|
79
|
+
const definition = resolveHarnessToolDefinition({
|
|
90
80
|
createRuntime: input.createRuntime,
|
|
91
81
|
node: input.node,
|
|
92
82
|
parentEmit: input.parentEmit,
|
|
93
83
|
tool,
|
|
94
|
-
})
|
|
84
|
+
});
|
|
85
|
+
if (definition !== null) {
|
|
86
|
+
tools.set(tool.name, definition);
|
|
87
|
+
}
|
|
95
88
|
}
|
|
96
|
-
return
|
|
89
|
+
return tools;
|
|
97
90
|
}
|
|
98
|
-
function
|
|
91
|
+
function resolveHarnessToolDefinition(input) {
|
|
99
92
|
if (input.tool.kind === "subagent") {
|
|
100
|
-
return
|
|
93
|
+
return {
|
|
94
|
+
description: input.tool.description ?? "",
|
|
95
|
+
execute: createSubagentToolExecutor({
|
|
96
|
+
createRuntime: input.createRuntime,
|
|
97
|
+
parentEmit: input.parentEmit,
|
|
98
|
+
subagentTool: input.tool,
|
|
99
|
+
}),
|
|
100
|
+
inputSchema: input.tool.inputSchema ?? {},
|
|
101
|
+
name: input.tool.name,
|
|
102
|
+
};
|
|
101
103
|
}
|
|
102
104
|
const registeredTool = findRegisteredRuntimeTool(input.node.toolRegistry, input.tool.name);
|
|
103
105
|
if (registeredTool === null) {
|
|
104
|
-
return
|
|
105
|
-
}
|
|
106
|
-
return registeredTool.definition.execute !== undefined;
|
|
107
|
-
}
|
|
108
|
-
function createToolExecutor(input) {
|
|
109
|
-
if (input.tool.kind === "subagent") {
|
|
110
|
-
return createSubagentToolExecutor({
|
|
111
|
-
createRuntime: input.createRuntime,
|
|
112
|
-
parentEmit: input.parentEmit,
|
|
113
|
-
subagentTool: input.tool,
|
|
114
|
-
});
|
|
106
|
+
return null;
|
|
115
107
|
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
},
|
|
125
|
-
registry: input.node.toolRegistry,
|
|
126
|
-
visibleTools: input.node.toolRegistry.preparedTools,
|
|
127
|
-
});
|
|
128
|
-
return toolResult.output;
|
|
108
|
+
const def = registeredTool.definition;
|
|
109
|
+
return {
|
|
110
|
+
description: def.description,
|
|
111
|
+
execute: def.execute,
|
|
112
|
+
inputSchema: (def.inputSchema ?? {}),
|
|
113
|
+
inputValidator: def.inputValidator,
|
|
114
|
+
name: def.name,
|
|
115
|
+
needsApproval: def.needsApproval,
|
|
129
116
|
};
|
|
130
117
|
}
|
|
131
118
|
//# sourceMappingURL=node-step.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-step.js","sourceRoot":"","sources":["../../../src/execution/node-step.ts"],"names":[],"mappings":"
|
|
1
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ACjD,cAAc,EAAE,GAAG,CAAC,cAAc;QAClC,IAAI,EAAE,GAAG,CAAC,IAAI;QACd,aAAa,EAAE,GAAG,CAAC,aAAa;KACjC,CAAC;AACJ,CAAC"}
|
|
@@ -11,6 +11,9 @@ import { type CompiledBundle } from "../context/keys.js";
|
|
|
11
11
|
*
|
|
12
12
|
* `initiatorAuth` defaults to `auth` when omitted (root run behavior).
|
|
13
13
|
* `parent` is only present for delegated child runs.
|
|
14
|
+
*
|
|
15
|
+
* The channel's `onDeliver` hook is NOT called here — it runs later
|
|
16
|
+
* inside the step execution when the first turn's payload is processed.
|
|
14
17
|
*/
|
|
15
18
|
export declare function buildRunContext(input: {
|
|
16
19
|
readonly bundle: CompiledBundle;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-context.d.ts","sourceRoot":"","sources":["../../../src/execution/runtime-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAsB,MAAM,qBAAqB,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAIL,KAAK,cAAc,
|
|
1
|
+
{"version":3,"file":"runtime-context.d.ts","sourceRoot":"","sources":["../../../src/execution/runtime-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAsB,MAAM,qBAAqB,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAIL,KAAK,cAAc,EAMpB,MAAM,oBAAoB,CAAC;AAE5B;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE;IACrC,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;IAChC,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC;CACxB,GAAG,cAAc,CAkBjB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AshContextImpl } from "../context/container.js";
|
|
2
|
-
import { AuthKey, BundleKey,
|
|
2
|
+
import { AuthKey, BundleKey, ChannelKey, ContinuationTokenKey, InitiatorAuthKey, ModeKey, ParentSessionKey, SessionIdKey, } from "../context/keys.js";
|
|
3
3
|
/**
|
|
4
4
|
* Builds a fully-seeded {@link AshContextImpl} for one run.
|
|
5
5
|
*
|
|
@@ -10,16 +10,18 @@ import { AuthKey, BundleKey, ChannelEmitterKey, ContinuationTokenKey, InitiatorA
|
|
|
10
10
|
*
|
|
11
11
|
* `initiatorAuth` defaults to `auth` when omitted (root run behavior).
|
|
12
12
|
* `parent` is only present for delegated child runs.
|
|
13
|
+
*
|
|
14
|
+
* The channel's `onDeliver` hook is NOT called here — it runs later
|
|
15
|
+
* inside the step execution when the first turn's payload is processed.
|
|
13
16
|
*/
|
|
14
17
|
export function buildRunContext(input) {
|
|
15
18
|
const { bundle, run } = input;
|
|
16
19
|
const ctx = new AshContextImpl();
|
|
17
|
-
const auth = run.auth
|
|
20
|
+
const auth = run.auth;
|
|
18
21
|
ctx.set(BundleKey, bundle);
|
|
19
|
-
ctx.set(
|
|
22
|
+
ctx.set(ChannelKey, run.channel);
|
|
20
23
|
ctx.set(ContinuationTokenKey, run.continuationToken);
|
|
21
24
|
ctx.set(ModeKey, run.mode);
|
|
22
|
-
ctx.set(RunIdKey, run.sessionId);
|
|
23
25
|
ctx.set(SessionIdKey, run.sessionId);
|
|
24
26
|
ctx.set(AuthKey, auth);
|
|
25
27
|
ctx.set(InitiatorAuthKey, run.initiatorAuth ?? auth);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-context.js","sourceRoot":"","sources":["../../../src/execution/runtime-context.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EACL,OAAO,EACP,SAAS,EACT,
|
|
1
|
+
{"version":3,"file":"runtime-context.js","sourceRoot":"","sources":["../../../src/execution/runtime-context.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EACL,OAAO,EACP,SAAS,EACT,UAAU,EAEV,oBAAoB,EACpB,gBAAgB,EAChB,OAAO,EACP,gBAAgB,EAChB,YAAY,GACb,MAAM,oBAAoB,CAAC;AAE5B;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,eAAe,CAAC,KAG/B;IACC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,KAAK,CAAC;IAC9B,MAAM,GAAG,GAAG,IAAI,cAAc,EAAE,CAAC;IACjC,MAAM,IAAI,GAA8B,GAAG,CAAC,IAAI,CAAC;IAEjD,GAAG,CAAC,GAAG,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IAC3B,GAAG,CAAC,GAAG,CAAC,UAAU,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IACjC,GAAG,CAAC,GAAG,CAAC,oBAAoB,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAAC;IACrD,GAAG,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;IAC3B,GAAG,CAAC,GAAG,CAAC,YAAY,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC;IACrC,GAAG,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACvB,GAAG,CAAC,GAAG,CAAC,gBAAgB,EAAE,GAAG,CAAC,aAAa,IAAI,IAAI,CAAC,CAAC;IAErD,IAAI,GAAG,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;QAC7B,GAAG,CAAC,GAAG,CAAC,gBAAgB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACxC,CAAC;IAED,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -27,11 +27,12 @@ export declare function createCompactionConfig(input?: {
|
|
|
27
27
|
* agent config). Subagent callers typically omit this.
|
|
28
28
|
*/
|
|
29
29
|
export interface CreateSessionInput {
|
|
30
|
-
readonly turnAgent: RuntimeTurnAgent;
|
|
31
30
|
readonly continuationToken: string;
|
|
32
31
|
readonly compactionOverrides?: {
|
|
33
32
|
readonly thresholdPercent?: number;
|
|
34
33
|
};
|
|
34
|
+
readonly sessionId: string;
|
|
35
|
+
readonly turnAgent: RuntimeTurnAgent;
|
|
35
36
|
}
|
|
36
37
|
/**
|
|
37
38
|
* Creates a fresh serializable {@link HarnessSession} for a harness run.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../src/execution/session.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAyB,MAAM,qBAAqB,CAAC;AACjF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAMtE;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,GAAE;IACL,QAAQ,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IACtC,QAAQ,CAAC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IACvC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC/B;;;;;;;EAqBP;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../src/execution/session.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAyB,MAAM,qBAAqB,CAAC;AACjF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAMtE;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,GAAE;IACL,QAAQ,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IACtC,QAAQ,CAAC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IACvC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC/B;;;;;;;EAqBP;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,iBAAi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,UAAU,6BAA6B;IAC3C,OAAO,YAAY,MAAM,CAAC,UAAU,EAAE,EAAE,CAAC;AAC3C,CAAC;AAED,SAAS,4BAA4B,CAAC,SAA2B;IAC/D,OAAO,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QACpC,WAAW,EAAE,IAAI,CAAC,WAAW,IAAI,EAAE;QACnC,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,UAAU,EAAE,wBAAwB,CAAC,IAAI,CAAC,WAAW,CAAC;KACvD,CAAC,CAAC,CAAC;AACN,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"access.d.ts","sourceRoot":"","sources":["../../../../src/execution/skills/access.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"access.d.ts","sourceRoot":"","sources":["../../../../src/execution/skills/access.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,KAAK,EAAmB,WAAW,EAAE,MAAM,YAAY,CAAC;AAE/D;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE;IACxC,QAAQ,CAAC,cAAc,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3C,QAAQ,CAAC,MAAM,EAAE,SAAS,kBAAkB,EAAE,CAAC;CAChD,GAAG,WAAW,CA4Dd"}
|