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
|
@@ -67,7 +67,7 @@ When something is wrong:
|
|
|
67
67
|
3. confirm the file is in the right authored slot
|
|
68
68
|
4. confirm the root-vs-subagent boundary is valid
|
|
69
69
|
5. confirm secrets are coming from env vars, not hard-coded values
|
|
70
|
-
6. replay the
|
|
70
|
+
6. replay the session and inspect the stream events
|
|
71
71
|
|
|
72
72
|
## Common Gotchas
|
|
73
73
|
|
|
@@ -36,8 +36,9 @@ Ash loads these layers deterministically by path, so keep filenames stable and i
|
|
|
36
36
|
|
|
37
37
|
Skills are not part of the always-on prompt by default.
|
|
38
38
|
|
|
39
|
-
Instead, Ash advertises available skills and adds a framework-owned `
|
|
40
|
-
|
|
39
|
+
Instead, Ash advertises available skills and adds a framework-owned `load_skill` tool. When the
|
|
40
|
+
request clearly matches a skill description, or the user names a skill explicitly, the model should
|
|
41
|
+
activate that skill. Ash then appends the skill's markdown to the active system instructions for
|
|
41
42
|
later turn work.
|
|
42
43
|
|
|
43
44
|
This is how you keep rich procedures available without bloating every turn.
|
|
@@ -67,6 +68,10 @@ remaining uncertainty.
|
|
|
67
68
|
Packaged skills are useful when you also want sibling files such as `references/`, `assets/`, or
|
|
68
69
|
`scripts/` under the same skill directory.
|
|
69
70
|
|
|
71
|
+
Those packaged paths also show up under the runtime workspace root, so the model can inspect them
|
|
72
|
+
with the normal file or shell tools instead of requiring all of that content to be pasted into the
|
|
73
|
+
prompt.
|
|
74
|
+
|
|
70
75
|
### Skill Rules That Matter
|
|
71
76
|
|
|
72
77
|
- packaged `SKILL.md` files must include YAML frontmatter
|
|
@@ -132,4 +137,3 @@ For most agents:
|
|
|
132
137
|
- [`skills.md`](./skills.md)
|
|
133
138
|
- [`workspace.md`](./workspace.md)
|
|
134
139
|
- [`subagents.md`](./subagents.md)
|
|
135
|
-
|
package/docs/public/evals.md
CHANGED
|
@@ -5,8 +5,8 @@ command.
|
|
|
5
5
|
|
|
6
6
|
Use evals when you want to:
|
|
7
7
|
|
|
8
|
-
- guard a prompt or tool change with real
|
|
9
|
-
- compare output against expected text, JSON, SQL, or
|
|
8
|
+
- guard a prompt or tool change with real sessions
|
|
9
|
+
- compare output against expected text, JSON, SQL, or session behavior
|
|
10
10
|
- export results to Braintrust for review and comparison
|
|
11
11
|
|
|
12
12
|
## Where Evals Live
|
|
@@ -76,7 +76,7 @@ Common optional suite fields:
|
|
|
76
76
|
An eval case is a small input/expected pair plus optional tags and metadata.
|
|
77
77
|
|
|
78
78
|
`input` may be either a string or an object. `expected` is optional, which is useful for behavior
|
|
79
|
-
checks that only care about the
|
|
79
|
+
checks that only care about the session itself.
|
|
80
80
|
|
|
81
81
|
You can provide cases directly:
|
|
82
82
|
|
|
@@ -96,7 +96,7 @@ Useful commands:
|
|
|
96
96
|
|
|
97
97
|
## Send A Message
|
|
98
98
|
|
|
99
|
-
Start a durable
|
|
99
|
+
Start a durable session:
|
|
100
100
|
|
|
101
101
|
```bash
|
|
102
102
|
curl -X POST http://127.0.0.1:3000/.well-known/ash/v1/message \
|
|
@@ -107,35 +107,38 @@ curl -X POST http://127.0.0.1:3000/.well-known/ash/v1/message \
|
|
|
107
107
|
Ash responds quickly with:
|
|
108
108
|
|
|
109
109
|
- a `continuationToken` in the JSON body
|
|
110
|
-
- an `x-ash-
|
|
110
|
+
- an `x-ash-session-id` header for the stream route
|
|
111
111
|
|
|
112
|
-
## Stream The
|
|
112
|
+
## Stream The Session
|
|
113
113
|
|
|
114
|
-
Attach to the
|
|
114
|
+
Attach to the session stream:
|
|
115
115
|
|
|
116
116
|
```bash
|
|
117
|
-
curl http://127.0.0.1:3000/.well-known/ash/v1/
|
|
117
|
+
curl http://127.0.0.1:3000/.well-known/ash/v1/sessions/<sessionId>/stream
|
|
118
118
|
```
|
|
119
119
|
|
|
120
120
|
The stream is NDJSON. Expect lifecycle events such as:
|
|
121
121
|
|
|
122
|
-
- `
|
|
122
|
+
- `session.started`
|
|
123
123
|
- `turn.started`
|
|
124
124
|
- `message.received`
|
|
125
|
+
- `step.started`
|
|
125
126
|
- `actions.requested`
|
|
126
127
|
- `action.result`
|
|
127
128
|
- `subagent.started`
|
|
128
129
|
- `subagent.event`
|
|
129
130
|
- `subagent.completed`
|
|
130
|
-
- `
|
|
131
|
+
- `reasoning.completed`
|
|
131
132
|
- `message.completed`
|
|
133
|
+
- `step.completed`
|
|
132
134
|
- `turn.completed`
|
|
133
135
|
- `session.waiting`
|
|
134
|
-
- `
|
|
136
|
+
- `session.completed`
|
|
137
|
+
- `session.failed`
|
|
135
138
|
|
|
136
|
-
`message.completed.data.finishReason` tells you
|
|
137
|
-
|
|
138
|
-
|
|
139
|
+
`message.completed.data.finishReason` tells you whether assistant text is
|
|
140
|
+
interim tool-call narration or a terminal reply. `step.completed.data.finishReason`
|
|
141
|
+
still carries the same step outcome, and `step.completed.data.usage` carries usage.
|
|
139
142
|
|
|
140
143
|
## Send A Follow-Up Message
|
|
141
144
|
|
|
@@ -153,4 +156,4 @@ curl -X POST http://127.0.0.1:3000/.well-known/ash/v1/message \
|
|
|
153
156
|
- [`agent-ts.md`](./agent-ts.md) for runtime config
|
|
154
157
|
- [`skills.md`](./skills.md) for on-demand procedures
|
|
155
158
|
- [`tools.md`](./tools.md) for typed integrations
|
|
156
|
-
- [`runs-and-streaming.md`](./runs-and-streaming.md) for the durable
|
|
159
|
+
- [`runs-and-streaming.md`](./runs-and-streaming.md) for the durable session model
|
|
@@ -5,17 +5,18 @@ Ash supports human-in-the-loop (HITL) in two forms:
|
|
|
5
5
|
- tool approval requests
|
|
6
6
|
- explicit user questions via the framework `ask_question` tool
|
|
7
7
|
|
|
8
|
-
Both use the same
|
|
8
|
+
Both use the same unified `InputRequest` / `InputResponse` protocol:
|
|
9
9
|
|
|
10
10
|
1. the model requests input
|
|
11
11
|
2. Ash emits an `input.requested` stream event
|
|
12
|
-
3. the
|
|
12
|
+
3. the turn parks at `session.waiting`
|
|
13
13
|
4. the client either:
|
|
14
|
-
- sends `
|
|
14
|
+
- sends `inputResponses` (structured answers keyed by `requestId`)
|
|
15
15
|
- or sends a normal follow-up `message` instead
|
|
16
16
|
|
|
17
|
-
If the user sends a normal follow-up message instead of answering, Ash
|
|
18
|
-
|
|
17
|
+
If the user sends a normal follow-up message instead of answering, Ash keeps the session parked
|
|
18
|
+
if the text doesn't match any pending option. If the text matches an option label (case-insensitive),
|
|
19
|
+
it resolves as a structured response automatically.
|
|
19
20
|
|
|
20
21
|
## Configure Tool Approval In `tools/*.ts`
|
|
21
22
|
|
|
@@ -105,43 +106,40 @@ pending question for the client to surface to the user.
|
|
|
105
106
|
|
|
106
107
|
## Stream Behavior
|
|
107
108
|
|
|
108
|
-
When HITL is needed, the
|
|
109
|
+
When HITL is needed, the session stream includes:
|
|
109
110
|
|
|
110
111
|
- `input.requested`
|
|
111
112
|
- `session.waiting`
|
|
112
113
|
|
|
113
|
-
`input.requested.data.requests` contains one or more
|
|
114
|
-
|
|
115
|
-
- tool approval requests
|
|
116
|
-
- user questions
|
|
117
|
-
- or both
|
|
118
|
-
|
|
119
|
-
Tool approval request shape:
|
|
114
|
+
`input.requested.data.requests` contains one or more `InputRequest` objects. All requests share
|
|
115
|
+
a single unified shape — tool approvals and questions use the same type:
|
|
120
116
|
|
|
121
117
|
```json
|
|
122
118
|
{
|
|
123
|
-
"
|
|
124
|
-
"
|
|
125
|
-
"
|
|
119
|
+
"requestId": "approval_123",
|
|
120
|
+
"prompt": "Approve tool call: bash",
|
|
121
|
+
"display": "confirmation",
|
|
122
|
+
"allowFreeform": false,
|
|
123
|
+
"options": [
|
|
124
|
+
{ "id": "approve", "label": "Yes" },
|
|
125
|
+
{ "id": "deny", "label": "No" }
|
|
126
|
+
],
|
|
126
127
|
"action": {
|
|
127
128
|
"kind": "tool-call",
|
|
128
129
|
"callId": "call_123",
|
|
129
130
|
"toolName": "bash",
|
|
130
|
-
"input": {
|
|
131
|
-
"command": "rm -rf /tmp/demo"
|
|
132
|
-
}
|
|
131
|
+
"input": { "command": "rm -rf /tmp/demo" }
|
|
133
132
|
}
|
|
134
133
|
}
|
|
135
134
|
```
|
|
136
135
|
|
|
137
|
-
Question request
|
|
136
|
+
Question request:
|
|
138
137
|
|
|
139
138
|
```json
|
|
140
139
|
{
|
|
141
|
-
"
|
|
142
|
-
"toolName": "ask_question",
|
|
140
|
+
"requestId": "call_456",
|
|
143
141
|
"prompt": "Which environment should I use?",
|
|
144
|
-
"
|
|
142
|
+
"display": "select",
|
|
145
143
|
"options": [
|
|
146
144
|
{ "id": "prod", "label": "Production" },
|
|
147
145
|
{ "id": "staging", "label": "Staging" }
|
|
@@ -161,6 +159,12 @@ Question request shape:
|
|
|
161
159
|
}
|
|
162
160
|
```
|
|
163
161
|
|
|
162
|
+
The `display` hint tells the client how to render:
|
|
163
|
+
|
|
164
|
+
- `"confirmation"` — binary yes/no (buttons)
|
|
165
|
+
- `"select"` — pick from a list (dropdown)
|
|
166
|
+
- `"text"` — freeform input (text field)
|
|
167
|
+
|
|
164
168
|
## Respond Over HTTP
|
|
165
169
|
|
|
166
170
|
Use the same `POST /.well-known/ash/v1/message` endpoint for HITL responses.
|
|
@@ -168,7 +172,7 @@ Use the same `POST /.well-known/ash/v1/message` endpoint for HITL responses.
|
|
|
168
172
|
Allowed request bodies:
|
|
169
173
|
|
|
170
174
|
```json
|
|
171
|
-
{ "message": "start a
|
|
175
|
+
{ "message": "start a session" }
|
|
172
176
|
```
|
|
173
177
|
|
|
174
178
|
```json
|
|
@@ -178,12 +182,8 @@ Allowed request bodies:
|
|
|
178
182
|
```json
|
|
179
183
|
{
|
|
180
184
|
"continuationToken": "<token>",
|
|
181
|
-
"
|
|
182
|
-
{
|
|
183
|
-
"kind": "tool-approval-result",
|
|
184
|
-
"approvalId": "approval_123",
|
|
185
|
-
"approved": true
|
|
186
|
-
}
|
|
185
|
+
"inputResponses": [
|
|
186
|
+
{ "requestId": "approval_123", "optionId": "approve" }
|
|
187
187
|
]
|
|
188
188
|
}
|
|
189
189
|
```
|
|
@@ -191,15 +191,8 @@ Allowed request bodies:
|
|
|
191
191
|
```json
|
|
192
192
|
{
|
|
193
193
|
"continuationToken": "<token>",
|
|
194
|
-
"
|
|
195
|
-
{
|
|
196
|
-
"kind": "question-result",
|
|
197
|
-
"callId": "call_456",
|
|
198
|
-
"output": {
|
|
199
|
-
"status": "answered",
|
|
200
|
-
"optionId": "prod"
|
|
201
|
-
}
|
|
202
|
-
}
|
|
194
|
+
"inputResponses": [
|
|
195
|
+
{ "requestId": "call_456", "optionId": "prod" }
|
|
203
196
|
]
|
|
204
197
|
}
|
|
205
198
|
```
|
|
@@ -210,30 +203,26 @@ You can also send both in one request:
|
|
|
210
203
|
{
|
|
211
204
|
"continuationToken": "<token>",
|
|
212
205
|
"message": "Also, use the stricter settings.",
|
|
213
|
-
"
|
|
214
|
-
{
|
|
215
|
-
"kind": "tool-approval-result",
|
|
216
|
-
"approvalId": "approval_123",
|
|
217
|
-
"approved": true
|
|
218
|
-
}
|
|
206
|
+
"inputResponses": [
|
|
207
|
+
{ "requestId": "approval_123", "optionId": "approve" }
|
|
219
208
|
]
|
|
220
209
|
}
|
|
221
210
|
```
|
|
222
211
|
|
|
223
|
-
##
|
|
224
|
-
|
|
225
|
-
All HITL requests are optional.
|
|
212
|
+
## Slack Behavior
|
|
226
213
|
|
|
227
|
-
The
|
|
214
|
+
The Slack channel renders HITL requests as Block Kit interactive elements:
|
|
228
215
|
|
|
229
|
-
|
|
216
|
+
- **Approvals** → buttons (Yes / No)
|
|
217
|
+
- **Questions with options** → static select menu
|
|
218
|
+
- **Freeform questions** → prompt text (user replies in thread)
|
|
230
219
|
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
- the new user message becomes the next turn input
|
|
220
|
+
When the user clicks a button or selects an option, the Slack interaction payload is
|
|
221
|
+
automatically routed to the parked session. Text replies in the thread are resolved
|
|
222
|
+
against the pending request options (case-insensitive label matching).
|
|
235
223
|
|
|
236
|
-
|
|
224
|
+
The Slack channel handles both Events API webhooks and interaction payloads at the same
|
|
225
|
+
webhook URL — no separate interactivity endpoint needed.
|
|
237
226
|
|
|
238
227
|
## CLI Behavior
|
|
239
228
|
|
|
@@ -243,8 +232,7 @@ This is the intended model. HITL requests are advisory pauses, not mandatory blo
|
|
|
243
232
|
- questions prompt for an option number or freeform answer
|
|
244
233
|
- `Escape` returns to the normal `you>` prompt without answering
|
|
245
234
|
|
|
246
|
-
If you press `Escape` and then send a normal message, the pending requests are ignored
|
|
247
|
-
above.
|
|
235
|
+
If you press `Escape` and then send a normal message, the pending requests are ignored.
|
|
248
236
|
|
|
249
237
|
## Current Limits
|
|
250
238
|
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Migration Guide
|
|
2
|
+
|
|
3
|
+
Ash now has one durable authored-context model.
|
|
4
|
+
|
|
5
|
+
## Breaking Changes
|
|
6
|
+
|
|
7
|
+
- `getState(key)` is now `getContext(key)`.
|
|
8
|
+
- `setState(key, value)` is now `setContext(key, value)`.
|
|
9
|
+
- `ensureContext(key, valueOrFactory)` replaces `ContextKey({ initial })`.
|
|
10
|
+
- `ContextKeyOptions.initial` was removed.
|
|
11
|
+
- Public `ContextKey` values are session-durable by default.
|
|
12
|
+
- `HarnessSession.state` is now split into `session.context` and internal `session.internal`.
|
|
13
|
+
- Tool compaction hooks no longer return `sessionPatch`. Mutate durable context through `ctx` instead.
|
|
14
|
+
|
|
15
|
+
## Before
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import { ContextKey, getState, setState } from "experimental-ash";
|
|
19
|
+
|
|
20
|
+
const NotesKey = new ContextKey("myapp.notes", {
|
|
21
|
+
initial: () => ({ notes: [] }),
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
setState(NotesKey, (current) => ({
|
|
25
|
+
notes: [...current.notes, "hello"],
|
|
26
|
+
}));
|
|
27
|
+
|
|
28
|
+
return getState(NotesKey);
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## After
|
|
32
|
+
|
|
33
|
+
```ts
|
|
34
|
+
import { ContextKey, ensureContext, getContext, setContext } from "experimental-ash";
|
|
35
|
+
|
|
36
|
+
const NotesKey = new ContextKey("myapp.notes");
|
|
37
|
+
|
|
38
|
+
const current = ensureContext(NotesKey, () => ({ notes: [] }));
|
|
39
|
+
|
|
40
|
+
setContext(NotesKey, {
|
|
41
|
+
notes: [...current.notes, "hello"],
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
return getContext(NotesKey);
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Channel Guidance
|
|
48
|
+
|
|
49
|
+
- Use `channel.onDeliver(ctx, payload)` to seed or extend durable context on every turn.
|
|
50
|
+
- Treat serialized channel state as immutable after the run starts.
|
|
51
|
+
- Move mutable per-session data into durable context or `session.internal`, not onto the channel instance.
|
|
52
|
+
|
|
53
|
+
## Compaction Hooks
|
|
54
|
+
|
|
55
|
+
Before:
|
|
56
|
+
|
|
57
|
+
```ts
|
|
58
|
+
onCompact() {
|
|
59
|
+
return {
|
|
60
|
+
sessionPatch: { state: {} },
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
After:
|
|
66
|
+
|
|
67
|
+
```ts
|
|
68
|
+
onCompact({ ctx }) {
|
|
69
|
+
ctx.set(NotesKey, { notes: [] });
|
|
70
|
+
}
|
|
71
|
+
```
|
|
@@ -16,6 +16,7 @@ my-agent/
|
|
|
16
16
|
├── system.md
|
|
17
17
|
├── system/
|
|
18
18
|
├── channels/
|
|
19
|
+
├── connections/
|
|
19
20
|
├── skills/
|
|
20
21
|
├── lib/
|
|
21
22
|
├── sandboxes/
|
|
@@ -32,6 +33,7 @@ my-agent/
|
|
|
32
33
|
| `system/` | Additive always-on prompt layers | Loaded in deterministic path order |
|
|
33
34
|
| `agent.ts` | Runtime config | Model, name, metadata, workspace, build, compaction |
|
|
34
35
|
| `channels/` | HTTP or messaging entrypoints | Root-only today |
|
|
36
|
+
| `connections/` | External service connections (MCP) | Each file defines one connection; name derived from filename |
|
|
35
37
|
| `skills/` | On-demand procedures and capability packs | Flat markdown, module-backed skills, or packaged skills |
|
|
36
38
|
| `lib/` | Shared authored helper code | Import-only source, not mounted into the workspace |
|
|
37
39
|
| `sandboxes/` | Isolated bash-style environments. Supports file form (`sandboxes/<name>.ts`) and folder form (`sandboxes/<name>/sandbox.ts` + optional `sandboxes/<name>/workspace/**`). | Supported on the root agent and local subagents |
|
|
@@ -50,6 +52,8 @@ agent/
|
|
|
50
52
|
│ └── escalation-rules.md
|
|
51
53
|
├── channels/
|
|
52
54
|
│ └── slack.ts
|
|
55
|
+
├── connections/
|
|
56
|
+
│ └── linear.ts
|
|
53
57
|
├── skills/
|
|
54
58
|
│ ├── summarize.md
|
|
55
59
|
│ └── research/
|
|
@@ -139,6 +143,7 @@ Use:
|
|
|
139
143
|
- `system/` for additional always-on layers
|
|
140
144
|
- `skills/` for optional procedures the model should load on demand
|
|
141
145
|
- `tools/` for typed business logic and API calls
|
|
146
|
+
- `connections/` for external services exposed via MCP (model discovers and calls their tools)
|
|
142
147
|
- `sandboxes/` for isolated shell/file environments
|
|
143
148
|
- `channels/` for HTTP or messaging ingress and delivery
|
|
144
149
|
- `lib/` for shared helper modules imported by the slots above
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Sessions And Streaming
|
|
2
2
|
|
|
3
|
-
Ash is durable and
|
|
3
|
+
Ash is durable and session-based by default.
|
|
4
4
|
|
|
5
5
|
The key client model is:
|
|
6
6
|
|
|
7
|
-
- `POST /.well-known/ash/v1/message` starts a
|
|
7
|
+
- `POST /.well-known/ash/v1/message` starts a session or sends a follow-up
|
|
8
8
|
- the response gives you a `continuationToken`
|
|
9
|
-
- the response headers give you the `
|
|
10
|
-
- `GET /.well-known/ash/v1/
|
|
9
|
+
- the response headers give you the `sessionId` for streaming
|
|
10
|
+
- `GET /.well-known/ash/v1/sessions/:sessionId/stream` lets you watch the session in real time
|
|
11
11
|
|
|
12
12
|
Ash keeps those separate on purpose:
|
|
13
13
|
|
|
14
14
|
- channels own `continuationToken` as the resume handle
|
|
15
|
-
- the runtime owns `
|
|
15
|
+
- the runtime owns `sessionId` as the stream handle
|
|
16
16
|
|
|
17
|
-
## Start A
|
|
17
|
+
## Start A Session
|
|
18
18
|
|
|
19
19
|
```bash
|
|
20
20
|
curl -X POST http://127.0.0.1:3000/.well-known/ash/v1/message \
|
|
@@ -22,20 +22,21 @@ curl -X POST http://127.0.0.1:3000/.well-known/ash/v1/message \
|
|
|
22
22
|
-d '{"message":"Summarize the latest forecast."}'
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
Ash responds immediately. The JSON body includes a `continuationToken`, and the
|
|
26
|
-
header identifies the durable
|
|
25
|
+
Ash responds immediately. The JSON body includes a `continuationToken`, and the
|
|
26
|
+
`x-ash-session-id` header identifies the durable session to stream.
|
|
27
27
|
|
|
28
|
-
## Stream A
|
|
28
|
+
## Stream A Session
|
|
29
29
|
|
|
30
30
|
```bash
|
|
31
|
-
curl http://127.0.0.1:3000/.well-known/ash/v1/
|
|
31
|
+
curl http://127.0.0.1:3000/.well-known/ash/v1/sessions/<sessionId>/stream
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
Common stream events:
|
|
35
35
|
|
|
36
|
-
- `
|
|
36
|
+
- `session.started`
|
|
37
37
|
- `turn.started`
|
|
38
38
|
- `message.received`
|
|
39
|
+
- `step.started`
|
|
39
40
|
- `sandbox.initialized`
|
|
40
41
|
- `sandbox.restored`
|
|
41
42
|
- `sandbox.command`
|
|
@@ -44,18 +45,19 @@ Common stream events:
|
|
|
44
45
|
- `subagent.started`
|
|
45
46
|
- `subagent.event`
|
|
46
47
|
- `subagent.completed`
|
|
47
|
-
- `
|
|
48
|
+
- `reasoning.completed`
|
|
48
49
|
- `message.completed`
|
|
50
|
+
- `step.completed`
|
|
49
51
|
- `turn.completed`
|
|
50
52
|
- `session.waiting`
|
|
51
|
-
- `
|
|
52
|
-
- `
|
|
53
|
+
- `session.failed`
|
|
54
|
+
- `session.completed`
|
|
53
55
|
|
|
54
56
|
`message.completed` can appear more than once in a single turn when the agent
|
|
55
|
-
produces
|
|
56
|
-
Use `message.completed.data.finishReason` to distinguish
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
produces interim assistant text before making a tool call.
|
|
58
|
+
Use `message.completed.data.finishReason` to distinguish tool-call narration
|
|
59
|
+
from terminal assistant replies. `step.completed.data.finishReason` mirrors the
|
|
60
|
+
same step outcome, and usage lives on `step.completed`.
|
|
59
61
|
|
|
60
62
|
## Send A Follow-Up Message
|
|
61
63
|
|
|
@@ -73,21 +75,26 @@ curl -X POST http://127.0.0.1:3000/.well-known/ash/v1/message \
|
|
|
73
75
|
The stream route accepts `startIndex` so clients can reconnect by event count:
|
|
74
76
|
|
|
75
77
|
```bash
|
|
76
|
-
curl http://127.0.0.1:3000/.well-known/ash/v1/
|
|
78
|
+
curl http://127.0.0.1:3000/.well-known/ash/v1/sessions/<sessionId>/stream?startIndex=<count>
|
|
77
79
|
```
|
|
78
80
|
|
|
79
81
|
## The Execution Model
|
|
80
82
|
|
|
81
|
-
Ash
|
|
82
|
-
|
|
83
|
-
durable
|
|
83
|
+
Ash uses three nested concepts:
|
|
84
|
+
|
|
85
|
+
- `session`: the whole durable conversation or task
|
|
86
|
+
- `turn`: one user-visible roundtrip inside that session
|
|
87
|
+
- `step`: one model call inside that turn
|
|
88
|
+
|
|
89
|
+
That is why tools, sandboxes, and subagents feel synchronous from authored code even though the
|
|
90
|
+
overall session remains durable.
|
|
84
91
|
|
|
85
92
|
Important behavior:
|
|
86
93
|
|
|
87
94
|
- follow-up messages reuse the same session through the continuation token
|
|
88
95
|
- schedules do not wait for follow-up HTTP messages
|
|
89
|
-
- subagent activity stays inline on the parent
|
|
90
|
-
child-
|
|
96
|
+
- subagent activity stays inline on the parent session stream rather than spawning a separate public
|
|
97
|
+
child-session stream
|
|
91
98
|
|
|
92
99
|
## What To Read Next
|
|
93
100
|
|
package/docs/public/schedules.md
CHANGED
|
@@ -8,7 +8,7 @@ Schedules live under `schedules/` at the root agent package.
|
|
|
8
8
|
|
|
9
9
|
- schedules are root-only today
|
|
10
10
|
- local subagents cannot declare `schedules/`
|
|
11
|
-
- schedule
|
|
11
|
+
- schedule sessions are task sessions, not conversation sessions
|
|
12
12
|
|
|
13
13
|
## Markdown Schedule Example
|
|
14
14
|
|
|
@@ -45,10 +45,10 @@ Ash compiles schedules into runtime-owned scheduled tasks.
|
|
|
45
45
|
Important behavior:
|
|
46
46
|
|
|
47
47
|
- the schedule id is derived from its path, for example `schedules/daily-digest`
|
|
48
|
-
- the
|
|
48
|
+
- the schedule session goes through the same durable runtime engine as other task sessions
|
|
49
49
|
- schedule triggers always start the runtime in task mode, not conversation mode
|
|
50
|
-
- top-level schedule
|
|
51
|
-
- if a scheduled task attempts to park for another user message, Ash fails the
|
|
50
|
+
- top-level schedule sessions do not wait for follow-up HTTP messages
|
|
51
|
+
- if a scheduled task attempts to park for another user message, Ash fails the session instead of
|
|
52
52
|
silently completing it
|
|
53
53
|
- `getSession().auth.current` and `getSession().auth.initiator` are both set to a framework-owned
|
|
54
54
|
`schedule` principal
|