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,206 +1,126 @@
|
|
|
1
1
|
# Unified Context
|
|
2
2
|
|
|
3
|
-
Ash uses
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
Ash uses one `AshContext` container, bound by one `AsyncLocalStorage`, to carry all ambient runtime
|
|
4
|
+
data through execution. There is no second authored-state channel and no separate dehydration path
|
|
5
|
+
for public context.
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Core Model
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
- `packages/ash/src/context/container.ts`
|
|
11
|
-
- `packages/ash/src/context/provider.ts`
|
|
12
|
-
- `packages/ash/src/context/keys.ts`
|
|
13
|
-
- `packages/ash/src/context/serialize.ts`
|
|
14
|
-
- `packages/ash/src/context/run-step.ts`
|
|
15
|
-
- `packages/ash/src/context/accessors.ts`
|
|
16
|
-
- `packages/ash/src/context/providers/session.ts`
|
|
17
|
-
- `packages/ash/src/context/providers/sandbox.ts`
|
|
18
|
-
- `packages/ash/src/context/providers/skill.ts`
|
|
9
|
+
Ash now has two key categories:
|
|
19
10
|
|
|
20
|
-
|
|
11
|
+
- `ContextKey<T>`: public durable authored context. Values live on `session.context`.
|
|
12
|
+
- `RuntimeContextKey<T>`: private framework-only runtime values. These seed one step and may be
|
|
13
|
+
reconstructed on the next step.
|
|
21
14
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
A typed key identifies a value in the container. Keys that hold non-JSON-safe values declare a
|
|
25
|
-
codec for serialization at `"use step"` boundaries.
|
|
26
|
-
|
|
27
|
-
```ts
|
|
28
|
-
class ContextKey<T> {
|
|
29
|
-
readonly name: string;
|
|
30
|
-
readonly codec?: {
|
|
31
|
-
serialize(value: T): unknown;
|
|
32
|
-
deserialize(data: unknown): T | Promise<T>;
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
### AshContext
|
|
38
|
-
|
|
39
|
-
The container interface. One instance per execution scope.
|
|
15
|
+
`AshContext` exposes a uniform API:
|
|
40
16
|
|
|
41
17
|
```ts
|
|
42
18
|
interface AshContext {
|
|
43
|
-
get<T>(key:
|
|
44
|
-
tryGet<T>(key:
|
|
45
|
-
has(key:
|
|
46
|
-
set<T>(key:
|
|
19
|
+
get<T>(key: ContextStoreKey<T>): T;
|
|
20
|
+
tryGet<T>(key: ContextStoreKey<T>): T | undefined;
|
|
21
|
+
has<T>(key: ContextStoreKey<T>): boolean;
|
|
22
|
+
set<T>(key: ContextStoreKey<T>, value: T): void;
|
|
23
|
+
ensure<T>(key: ContextStoreKey<T>, valueOrFactory: T | (() => T)): T;
|
|
47
24
|
}
|
|
48
25
|
```
|
|
49
26
|
|
|
50
|
-
|
|
27
|
+
Public helpers such as `getContext`, `setContext`, `ensureContext`, `getSession`, `getSandbox`, and
|
|
28
|
+
`getSkill` all delegate to this container.
|
|
51
29
|
|
|
52
|
-
|
|
53
|
-
call `contextStorage.run(...)`. Everything else reads via `requireContext()`.
|
|
30
|
+
## Durable Context Lifecycle
|
|
54
31
|
|
|
55
|
-
|
|
32
|
+
Durable authored context no longer piggybacks on runtime seed serialization.
|
|
56
33
|
|
|
57
|
-
|
|
58
|
-
model callbacks) uses this implicitly through the public accessors.
|
|
34
|
+
Every step now follows this flow:
|
|
59
35
|
|
|
60
|
-
|
|
36
|
+
1. Deserialize runtime seed keys with `deserializeRuntimeContext(...)`.
|
|
37
|
+
2. Hydrate all registered public `ContextKey`s from `session.context`.
|
|
38
|
+
3. Seed internal framework bookkeeping from `session.internal`.
|
|
39
|
+
4. Apply deliver-time auth and run `channel.onDeliver(...)`.
|
|
40
|
+
5. Run providers and step code inside `contextStorage.run(...)`.
|
|
41
|
+
6. Commit the full durable context bag back to `session.context`.
|
|
61
42
|
|
|
62
|
-
|
|
43
|
+
The main files are:
|
|
63
44
|
|
|
64
|
-
|
|
65
|
-
|
|
45
|
+
- `packages/ash/src/context/serialize.ts`
|
|
46
|
+
- `packages/ash/src/context/durable-context.ts`
|
|
47
|
+
- `packages/ash/src/execution/step-context.ts`
|
|
48
|
+
- `packages/ash/src/context/run-step.ts`
|
|
66
49
|
|
|
67
|
-
|
|
68
|
-
|-----|------|-------|
|
|
69
|
-
| `AuthKey` | `SessionAuthContext \| null` | none (JSON-safe) |
|
|
70
|
-
| `InitiatorAuthKey` | `SessionAuthContext \| null` | none |
|
|
71
|
-
| `SessionIdKey` | `string` | none |
|
|
72
|
-
| `RunIdKey` | `string` | none |
|
|
73
|
-
| `ContinuationTokenKey` | `string` | none |
|
|
74
|
-
| `ModeKey` | `RunMode` | none |
|
|
75
|
-
| `NodeSelectorKey` | `string` | none — points at the active graph node (root or a delegated subagent selector) |
|
|
76
|
-
| `ParentSessionKey` | `SessionParent` | none — set only on delegated child contexts to carry parent lineage |
|
|
77
|
-
| `ChannelEmitterKey` | `ChannelEmitter` | serializes kind + state, deserializes by hydrating the correct emitter class |
|
|
78
|
-
| `BundleKey` | `CompiledBundle` | serializes to `compiledArtifactsSource`, deserializes via `getCompiledRuntimeAgentBundle` |
|
|
50
|
+
## Runtime Seed Serialization
|
|
79
51
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
explicit seed key list.
|
|
52
|
+
`serializeRuntimeContext(...)` and `deserializeRuntimeContext(...)` only handle
|
|
53
|
+
`RuntimeContextKey`s marked `serializable: true`.
|
|
83
54
|
|
|
84
|
-
|
|
55
|
+
That includes seed values such as:
|
|
85
56
|
|
|
86
|
-
|
|
87
|
-
|
|
57
|
+
- auth and initiator auth
|
|
58
|
+
- session id and continuation token
|
|
59
|
+
- run mode
|
|
60
|
+
- parent lineage
|
|
61
|
+
- compiled bundle
|
|
62
|
+
- serialized channel
|
|
88
63
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
| `SessionKey` | `Session` | `sessionProvider` |
|
|
92
|
-
| `SandboxKey` | `SandboxAccess` | `sandboxProvider` |
|
|
93
|
-
| `SkillKey` | `SkillAccess` | `skillProvider` |
|
|
64
|
+
Durable authored context is intentionally excluded. `assertNoDurableContextInRuntimeSeed(...)`
|
|
65
|
+
guards against leaking a public `ContextKey` into the runtime seed payload.
|
|
94
66
|
|
|
95
67
|
## Providers
|
|
96
68
|
|
|
97
|
-
Providers
|
|
98
|
-
|
|
99
|
-
```ts
|
|
100
|
-
interface ContextProvider<T> {
|
|
101
|
-
readonly key: ContextKey<T>;
|
|
102
|
-
create(ctx: AshContext, session: HarnessSession):
|
|
103
|
-
ProviderResult<T> | undefined | Promise<ProviderResult<T> | undefined>;
|
|
104
|
-
commit?(value: T, session: HarnessSession):
|
|
105
|
-
HarnessSession | Promise<HarnessSession>;
|
|
106
|
-
}
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
`create` receives the context (with seed keys and earlier providers already set) and the current
|
|
110
|
-
harness session. It returns a `ProviderResult` with the live value and optionally a modified
|
|
111
|
-
session (e.g. skills enriching the system prompt). Returning `undefined` means the provider is not
|
|
112
|
-
active for this step.
|
|
113
|
-
|
|
114
|
-
`commit` is called after the step completes. It receives the live value (which may have been
|
|
115
|
-
mutated during the step) and the harness session from the step result. It returns an updated
|
|
116
|
-
session with any state changes persisted. Only providers with mutable state need this (sandbox
|
|
117
|
-
snapshots, skill activations).
|
|
118
|
-
|
|
119
|
-
Provider ordering matters. The framework providers are baked into `runStep` in dependency order:
|
|
120
|
-
|
|
121
|
-
1. `sessionProvider` — depends only on seed keys
|
|
122
|
-
2. `sandboxProvider` — depends on `BundleKey` and `SessionIdKey`
|
|
123
|
-
3. `skillProvider` — depends on `BundleKey`
|
|
124
|
-
|
|
125
|
-
There is no separate provider list to import — `runStep` knows its providers internally.
|
|
126
|
-
|
|
127
|
-
## Step Runner
|
|
128
|
-
|
|
129
|
-
`runStep` orchestrates the provider lifecycle around a step callback:
|
|
130
|
-
|
|
131
|
-
1. Iterates providers in order — each may set its key on the context and optionally modify the
|
|
132
|
-
harness session.
|
|
133
|
-
2. Runs the callback inside `contextStorage.run(ctx, ...)` so authored code can read the context.
|
|
134
|
-
3. After the callback completes, iterates providers again to call `commit` hooks, persisting
|
|
135
|
-
mutable state back onto the session.
|
|
136
|
-
|
|
137
|
-
## Serialization At Step Boundaries
|
|
138
|
-
|
|
139
|
-
`serializeContext` and `deserializeContext` handle durable step boundaries generically.
|
|
140
|
-
`serializeContext` iterates all entries in the context, calling each codec-backed key's codec
|
|
141
|
-
when present. `deserializeContext` iterates the plain JSON record
|
|
142
|
-
and resolves each string name back to its registered `ContextKey` via the global key registry.
|
|
143
|
-
Keys without a codec are stored as-is (they must be JSON-safe).
|
|
69
|
+
Providers still reconstruct derived runtime values on each step:
|
|
144
70
|
|
|
145
|
-
|
|
146
|
-
|
|
71
|
+
- `SessionKey` via `sessionProvider`
|
|
72
|
+
- `SandboxKey` via `sandboxProvider`
|
|
73
|
+
- `SkillKey` via `skillProvider`
|
|
147
74
|
|
|
148
|
-
|
|
149
|
-
Emitter classes themselves have no knowledge of serialization.
|
|
75
|
+
These are runtime-only values, so they use `RuntimeContextKey`, not public `ContextKey`.
|
|
150
76
|
|
|
151
|
-
|
|
77
|
+
Provider-owned mutable state stays separate from authored durable context:
|
|
152
78
|
|
|
153
|
-
|
|
79
|
+
- durable authored values live on `session.context`
|
|
80
|
+
- internal framework bookkeeping lives on `session.internal`
|
|
81
|
+
- provider snapshots such as `sandboxState` stay on their dedicated session fields
|
|
154
82
|
|
|
155
|
-
|
|
156
|
-
`createDelegatedChildContext` (for `delegate()`), sets seed keys, serializes, and passes
|
|
157
|
-
`serializedContext` to `workflowEntry` via `start()`. The ambient runtime is registered at
|
|
158
|
-
this point so durable steps can later recover it via `tryGetAmbientWorkflowRuntime()`.
|
|
83
|
+
## Channel Setup
|
|
159
84
|
|
|
160
|
-
|
|
85
|
+
`packages/ash/src/execution/step-context.ts` owns the pre-step channel path for both runtimes:
|
|
161
86
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
87
|
+
1. rebuild the fresh step context
|
|
88
|
+
2. hydrate durable context
|
|
89
|
+
3. seed pending input request bookkeeping
|
|
90
|
+
4. apply deliver-time auth
|
|
91
|
+
5. call `channel.onDeliver(ctx, payload)`
|
|
92
|
+
6. assert that serialized channel state did not change
|
|
165
93
|
|
|
166
|
-
|
|
94
|
+
That ordering matters. `onDeliver(...)` runs after durable context hydration, so channel-seeded
|
|
95
|
+
context cannot be overwritten by later hydration.
|
|
167
96
|
|
|
168
|
-
|
|
169
|
-
`DelegateInput` extends `RunInput` and adds `parent: SessionParent` and
|
|
170
|
-
`target: { selector }`. `createDelegatedChildContext` seeds the child context with the
|
|
171
|
-
forwarded initiator auth, the delegate's current auth, the parent lineage, the child node
|
|
172
|
-
selector, and the child's own run/session identifiers. The subagent tool wrapper in
|
|
173
|
-
`execution/subagent-tool.ts` is the sole in-tree caller of `delegate()`.
|
|
97
|
+
## Channel State Rule
|
|
174
98
|
|
|
175
|
-
|
|
99
|
+
Serialized channel state is immutable after the run starts.
|
|
176
100
|
|
|
177
|
-
`
|
|
178
|
-
|
|
179
|
-
from `NodeSelectorKey`, and calls `runStep` with the framework providers.
|
|
101
|
+
The runtime snapshots `channel.serialize()` before `onDeliver(...)` and again after step execution.
|
|
102
|
+
If the serialized shape changes, the runtime throws with guidance to move that data into:
|
|
180
103
|
|
|
181
|
-
|
|
104
|
+
- durable context when authored code needs it across turns
|
|
105
|
+
- internal `session.internal` when only framework bookkeeping needs it
|
|
182
106
|
|
|
183
|
-
|
|
184
|
-
the `activate_skill` action reads `SkillKey`. Authored tools access context through the public
|
|
185
|
-
accessors (`getSession`, `getSandbox`, etc.).
|
|
107
|
+
This keeps channel responsibilities narrow:
|
|
186
108
|
|
|
187
|
-
|
|
109
|
+
- transport normalization
|
|
110
|
+
- continuation token ownership
|
|
111
|
+
- per-turn context seeding
|
|
112
|
+
- delivery policy
|
|
188
113
|
|
|
189
|
-
|
|
114
|
+
It prevents channels from becoming an untracked second session storage system.
|
|
190
115
|
|
|
191
|
-
|
|
192
|
-
- `getSandbox(name)` reads `SandboxKey`
|
|
193
|
-
- `getSkill(identifier)` reads `SkillKey`
|
|
116
|
+
## Runtime Split
|
|
194
117
|
|
|
195
|
-
|
|
118
|
+
Both runtime flavors now use the same context story:
|
|
196
119
|
|
|
197
|
-
|
|
120
|
+
- workflow runtime stores runtime seed keys once, then rebuilds a fresh step context on every
|
|
121
|
+
durable step
|
|
122
|
+
- continuous runtime also rebuilds a fresh step context on every step, even though the process is
|
|
123
|
+
still live
|
|
198
124
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
- `execution/framework-context.ts` — `FrameworkContext`, `Dehydratable`, channel emitter
|
|
202
|
-
dehydration
|
|
203
|
-
- `execution/context.ts` — `StepExecutionContext`, `ManagedRuntimeContext`, incremental context
|
|
204
|
-
assembly
|
|
205
|
-
- The `Dehydratable` interface on channel emitters (replaced by key codecs)
|
|
206
|
-
- Separate `session` parameter threading through tool executors and action handlers
|
|
125
|
+
That removes the old semantic split where in-memory runs behaved differently from durable workflow
|
|
126
|
+
runs.
|
|
@@ -5,10 +5,8 @@ channel-harness-runtime path. The old message-workflow and runtime-harness stack
|
|
|
5
5
|
|
|
6
6
|
## Files To Read
|
|
7
7
|
|
|
8
|
-
- `packages/ash/src/
|
|
9
|
-
- `packages/ash/src/internal/nitro/routes/run-stream.ts`
|
|
8
|
+
- `packages/ash/src/public/channels/http.ts`
|
|
10
9
|
- `packages/ash/src/runtime/governance/auth/route-auth.ts`
|
|
11
|
-
- `packages/ash/src/channel/http.ts`
|
|
12
10
|
- `packages/ash/src/channel/types.ts`
|
|
13
11
|
- `packages/ash/src/harness/tool-loop.ts`
|
|
14
12
|
- `packages/ash/src/harness/types.ts`
|
|
@@ -21,7 +19,7 @@ channel-harness-runtime path. The old message-workflow and runtime-harness stack
|
|
|
21
19
|
|
|
22
20
|
- `GET /.well-known/ash/v1/health`
|
|
23
21
|
- `POST /.well-known/ash/v1/message`
|
|
24
|
-
- `GET /.well-known/ash/v1/
|
|
22
|
+
- `GET /.well-known/ash/v1/sessions/:sessionId/stream`
|
|
25
23
|
|
|
26
24
|
The route prefix stays `v1`. What changed is the runtime behind it.
|
|
27
25
|
|
|
@@ -44,12 +42,12 @@ See [`context.md`](./context.md) for the full model.
|
|
|
44
42
|
|
|
45
43
|
1. Nitro route auth validates the caller in `route-auth.ts`.
|
|
46
44
|
2. `message.ts` parses either `{ message }` or `{ continuationToken, message }`.
|
|
47
|
-
3.
|
|
45
|
+
3. The HTTP channel derives a continuation token and owns event delivery via `onEvent`.
|
|
48
46
|
4. The channel calls `runtime.run(...)` or `runtime.deliver(...)`.
|
|
49
47
|
5. The runtime creates or reloads the durable session and invokes the shared harness step.
|
|
50
48
|
6. The harness returns `{ session, next }`.
|
|
51
|
-
7. The runtime persists the updated session, follows `next`, and streams events under the
|
|
52
|
-
8. Clients read the durable
|
|
49
|
+
7. The runtime persists the updated session, follows `next`, and streams events under the session id.
|
|
50
|
+
8. Clients read the durable session through `GET /.well-known/ash/v1/sessions/:sessionId/stream`.
|
|
53
51
|
|
|
54
52
|
## Start And Follow-Up Requests
|
|
55
53
|
|
|
@@ -69,22 +67,22 @@ Important behavior:
|
|
|
69
67
|
|
|
70
68
|
- New starts return `202 Accepted`.
|
|
71
69
|
- Start responses include `sessionId` and `continuationToken` in the JSON body.
|
|
72
|
-
- Start responses also include `x-ash-
|
|
73
|
-
stream.
|
|
70
|
+
- Start responses also include `x-ash-session-id` and `location` headers so clients know which
|
|
71
|
+
session to stream.
|
|
74
72
|
- Follow-up requests return `200 OK` with the same `continuationToken`.
|
|
75
|
-
- `
|
|
73
|
+
- `sessionId` is the stream handle; `continuationToken` is the resume handle.
|
|
76
74
|
|
|
77
75
|
## Stream Contract
|
|
78
76
|
|
|
79
|
-
|
|
80
|
-
canonical NDJSON stream.
|
|
77
|
+
The stream channel reads the durable workflow session directly from the workflow runtime and returns
|
|
78
|
+
the canonical NDJSON stream.
|
|
81
79
|
|
|
82
80
|
Important behavior:
|
|
83
81
|
|
|
84
82
|
- `startIndex` reconnects by event count.
|
|
85
|
-
- Stream headers always include `x-ash-
|
|
83
|
+
- Stream headers always include `x-ash-session-id`, `x-ash-stream-format`, `x-ash-stream-version`, and
|
|
86
84
|
`x-ash-workflow-id`.
|
|
87
|
-
- The stream route does not know about continuation tokens. It only needs the durable `
|
|
85
|
+
- The stream route does not know about continuation tokens. It only needs the durable `sessionId`.
|
|
88
86
|
|
|
89
87
|
## Event Delivery
|
|
90
88
|
|
|
@@ -93,8 +91,8 @@ The runtime owns stream plumbing, but the channel owns delivery policy.
|
|
|
93
91
|
Important behavior:
|
|
94
92
|
|
|
95
93
|
- the runtime composes a raw stream writer from `getWritable()`
|
|
96
|
-
- the
|
|
97
|
-
|
|
94
|
+
- the runtime calls `channel.onEvent(event)` for each lifecycle event; the channel returns the
|
|
95
|
+
(possibly transformed) event and may perform platform side effects before returning
|
|
98
96
|
- the harness emits lifecycle events without knowing whether they go to HTTP, Slack, both, or
|
|
99
97
|
neither
|
|
100
98
|
|
|
@@ -105,9 +103,10 @@ format.
|
|
|
105
103
|
|
|
106
104
|
The current stream surface is:
|
|
107
105
|
|
|
108
|
-
- `
|
|
106
|
+
- `session.started`
|
|
109
107
|
- `turn.started`
|
|
110
108
|
- `message.received`
|
|
109
|
+
- `step.started`
|
|
111
110
|
- `sandbox.initialized`
|
|
112
111
|
- `sandbox.restored`
|
|
113
112
|
- `sandbox.command`
|
|
@@ -116,18 +115,21 @@ The current stream surface is:
|
|
|
116
115
|
- `subagent.started`
|
|
117
116
|
- `subagent.event`
|
|
118
117
|
- `subagent.completed`
|
|
119
|
-
- `
|
|
118
|
+
- `reasoning.completed`
|
|
120
119
|
- `message.completed`
|
|
120
|
+
- `step.completed`
|
|
121
121
|
- `turn.completed`
|
|
122
|
+
- `step.failed`
|
|
123
|
+
- `turn.failed`
|
|
122
124
|
- `session.waiting`
|
|
123
|
-
- `
|
|
124
|
-
- `
|
|
125
|
+
- `session.completed`
|
|
126
|
+
- `session.failed`
|
|
125
127
|
|
|
126
|
-
`message.completed.data.finishReason`
|
|
127
|
-
`
|
|
128
|
-
|
|
128
|
+
`message.completed.data.finishReason` remains available for message-level
|
|
129
|
+
consumers. `step.completed.data.finishReason` mirrors the model-step outcome,
|
|
130
|
+
and `tool-calls` means the turn is continuing through tool execution.
|
|
129
131
|
|
|
130
|
-
Subagent activity is now inline on the parent
|
|
132
|
+
Subagent activity is now inline on the parent session stream. There is no separate legacy child-workflow
|
|
131
133
|
stream path.
|
|
132
134
|
|
|
133
135
|
## Auth Boundary
|
|
@@ -139,7 +141,7 @@ Important behavior:
|
|
|
139
141
|
- If both `auth` and `network` are omitted, the routes are open.
|
|
140
142
|
- If only `network` is configured, the caller must pass the IP allow list.
|
|
141
143
|
- If `auth` is configured, the caller must satisfy one configured strategy.
|
|
142
|
-
- There is still no separate per-
|
|
144
|
+
- There is still no separate per-session ownership ACL after route auth succeeds.
|
|
143
145
|
|
|
144
146
|
The runtime stores both `auth.current` and `auth.initiator`. A later authenticated follow-up message
|
|
145
147
|
may replace `auth.current` without rewriting the original initiator snapshot.
|
|
@@ -153,5 +155,5 @@ The current ownership split is:
|
|
|
153
155
|
- The harness owns model/tool work and the `next` decision.
|
|
154
156
|
- Execution/runtime owns durable workflow entry, persistence, and event-stream plumbing.
|
|
155
157
|
- Clients keep both identifiers:
|
|
156
|
-
- `
|
|
158
|
+
- `sessionId` for streaming
|
|
157
159
|
- `continuationToken` for the next user message
|
package/docs/public/README.md
CHANGED
|
@@ -19,21 +19,22 @@ Read in this order:
|
|
|
19
19
|
2. [project-layout.md](./project-layout.md)
|
|
20
20
|
3. [agent-ts.md](./agent-ts.md)
|
|
21
21
|
4. [typescript-api.md](./typescript-api.md)
|
|
22
|
-
5. [
|
|
23
|
-
6. [
|
|
24
|
-
7. [
|
|
25
|
-
8. [
|
|
26
|
-
9. [
|
|
27
|
-
10. [
|
|
28
|
-
11. [
|
|
29
|
-
12. [
|
|
30
|
-
13. [
|
|
31
|
-
14. [
|
|
32
|
-
15. [
|
|
33
|
-
16. [
|
|
34
|
-
17. [
|
|
35
|
-
18. [
|
|
36
|
-
19. [
|
|
22
|
+
5. [migration-guide.md](./migration-guide.md)
|
|
23
|
+
6. [context-control.md](./context-control.md)
|
|
24
|
+
7. [skills.md](./skills.md)
|
|
25
|
+
8. [tools.md](./tools.md)
|
|
26
|
+
9. [workspace.md](./workspace.md)
|
|
27
|
+
10. [sandboxes.md](./sandboxes.md)
|
|
28
|
+
11. [channels/README.md](./channels/README.md)
|
|
29
|
+
12. [human-in-the-loop.md](./human-in-the-loop.md)
|
|
30
|
+
13. [session-context.md](./session-context.md)
|
|
31
|
+
14. [runs-and-streaming.md](./runs-and-streaming.md)
|
|
32
|
+
15. [subagents.md](./subagents.md)
|
|
33
|
+
16. [schedules.md](./schedules.md)
|
|
34
|
+
17. [evals.md](./evals.md)
|
|
35
|
+
18. [auth-and-route-protection.md](./auth-and-route-protection.md)
|
|
36
|
+
19. [vercel-deployment.md](./vercel-deployment.md)
|
|
37
|
+
20. [cli-build-and-debugging.md](./cli-build-and-debugging.md)
|
|
37
38
|
|
|
38
39
|
## The Public Mental Model
|
|
39
40
|
|
|
@@ -55,11 +56,12 @@ Ash then gives you:
|
|
|
55
56
|
|
|
56
57
|
- a stable HTTP message route
|
|
57
58
|
- optional channel webhook routes
|
|
58
|
-
- a reconnectable
|
|
59
|
-
- durable session
|
|
59
|
+
- a reconnectable session stream
|
|
60
|
+
- durable session context across turns
|
|
60
61
|
- a shared runtime workspace
|
|
61
62
|
- optional isolated sandboxes
|
|
62
|
-
- typed runtime helpers such as `getSession()`, `
|
|
63
|
+
- typed runtime helpers such as `getSession()`, `getContext()`, `setContext()`, `ensureContext()`,
|
|
64
|
+
`getSandbox()`, and `getSkill()`
|
|
63
65
|
|
|
64
66
|
## The Runtime Shape
|
|
65
67
|
|
|
@@ -73,13 +75,13 @@ know:
|
|
|
73
75
|
That is why Ash exposes two identifiers:
|
|
74
76
|
|
|
75
77
|
- `continuationToken` for the next user message
|
|
76
|
-
- `
|
|
78
|
+
- `sessionId` for streaming and inspection
|
|
77
79
|
|
|
78
80
|
## How To Use These Docs
|
|
79
81
|
|
|
80
82
|
- Start with the authored filesystem shape and `agent.ts`.
|
|
81
83
|
- Then add runtime surfaces in this order: skills, tools, workspace, sandboxes, channels.
|
|
82
|
-
- Then learn the durable runtime model: HITL, session context,
|
|
84
|
+
- Then learn the durable runtime model: HITL, session context, sessions, streaming, and
|
|
83
85
|
continuation-token follow-ups.
|
|
84
86
|
- Then add advanced features: subagents, schedules, route protection, deployment.
|
|
85
87
|
|
|
@@ -9,16 +9,16 @@ These settings apply to:
|
|
|
9
9
|
|
|
10
10
|
- `GET /.well-known/ash/v1/health`
|
|
11
11
|
- `POST /.well-known/ash/v1/message`
|
|
12
|
-
- `GET /.well-known/ash/v1/
|
|
12
|
+
- `GET /.well-known/ash/v1/sessions/:sessionId/stream`
|
|
13
13
|
|
|
14
14
|
## The Main API
|
|
15
15
|
|
|
16
16
|
```ts
|
|
17
17
|
// agent/channels/.well-known/ash/v1/message.ts
|
|
18
|
-
import {
|
|
18
|
+
import { httpRoute } from "experimental-ash/channels/http";
|
|
19
19
|
import { vercelOidc } from "experimental-ash/channels/auth";
|
|
20
20
|
|
|
21
|
-
export default
|
|
21
|
+
export default httpRoute({
|
|
22
22
|
auth: vercelOidc(),
|
|
23
23
|
});
|
|
24
24
|
```
|
|
@@ -26,10 +26,10 @@ export default httpMessageChannel({
|
|
|
26
26
|
For open routes, use `none()` explicitly:
|
|
27
27
|
|
|
28
28
|
```ts
|
|
29
|
-
import {
|
|
29
|
+
import { httpRoute } from "experimental-ash/channels/http";
|
|
30
30
|
import { none } from "experimental-ash/channels/auth";
|
|
31
31
|
|
|
32
|
-
export default
|
|
32
|
+
export default httpRoute({
|
|
33
33
|
auth: none(),
|
|
34
34
|
});
|
|
35
35
|
```
|
|
@@ -96,27 +96,31 @@ Inside runtime code, `getSession().auth` gives you the caller snapshot.
|
|
|
96
96
|
Important behavior:
|
|
97
97
|
|
|
98
98
|
- `auth.current` is the caller for the active inbound turn
|
|
99
|
-
- `auth.initiator` is the caller that started the durable
|
|
100
|
-
-
|
|
99
|
+
- `auth.initiator` is the caller that started the durable session
|
|
100
|
+
- follow-up messages update `auth.current` without changing `auth.initiator`
|
|
101
101
|
- unprotected agents expose both as `null`
|
|
102
102
|
|
|
103
|
+
Auth on follow-up messages (`deliver()`) is honored by both the workflow and continuous runtimes.
|
|
104
|
+
When a different user sends a follow-up to the same session, `session.auth.current` reflects the
|
|
105
|
+
new caller on that turn while `session.auth.initiator` stays the same.
|
|
106
|
+
|
|
103
107
|
## What Ash Does Not Do
|
|
104
108
|
|
|
105
|
-
Ash does not add a second
|
|
109
|
+
Ash does not add a second session-ownership ACL layer on top of route auth.
|
|
106
110
|
|
|
107
111
|
In practice that means:
|
|
108
112
|
|
|
109
113
|
- route access is governed at the HTTP boundary
|
|
110
114
|
- the durable session keeps the caller snapshot for authored runtime use
|
|
111
|
-
- there is no separate per-
|
|
115
|
+
- there is no separate per-session ownership list you manage later
|
|
112
116
|
|
|
113
117
|
## Example: Basic Auth Request
|
|
114
118
|
|
|
115
119
|
```ts
|
|
116
|
-
import {
|
|
120
|
+
import { httpRoute } from "experimental-ash/channels/http";
|
|
117
121
|
import { httpBasic } from "experimental-ash/channels/auth";
|
|
118
122
|
|
|
119
|
-
export default
|
|
123
|
+
export default httpRoute({
|
|
120
124
|
auth: httpBasic({
|
|
121
125
|
username: "ops",
|
|
122
126
|
password: process.env.ROUTE_AUTH_BASIC_PASSWORD,
|
|
@@ -129,4 +133,3 @@ export default httpMessageChannel({
|
|
|
129
133
|
- [`agent-ts.md`](./agent-ts.md)
|
|
130
134
|
- [`session-context.md`](./session-context.md)
|
|
131
135
|
- [`vercel-deployment.md`](./vercel-deployment.md)
|
|
132
|
-
|
|
@@ -9,6 +9,7 @@ Channels are the transport layer in Ash's channel-harness-runtime split. A chann
|
|
|
9
9
|
- deriving or resuming the stable `continuationToken`
|
|
10
10
|
- applying route auth and network policy
|
|
11
11
|
- deciding how runtime events are delivered back to the platform
|
|
12
|
+
- seeding per-turn durable context inside `onDeliver(...)`
|
|
12
13
|
|
|
13
14
|
The runtime and harness still own the model turn, tool execution, compaction, and session
|
|
14
15
|
persistence.
|
|
@@ -17,8 +18,8 @@ persistence.
|
|
|
17
18
|
|
|
18
19
|
Ash ships the public HTTP protocol as channels:
|
|
19
20
|
|
|
20
|
-
- `
|
|
21
|
-
- `
|
|
21
|
+
- `httpRoute()` for `POST /.well-known/ash/v1/message`
|
|
22
|
+
- `httpRunStreamRoute()` for `GET /.well-known/ash/v1/sessions/:sessionId/stream`
|
|
22
23
|
|
|
23
24
|
Ash also supports authored channels under `agent/channels/` for platform-specific integrations such
|
|
24
25
|
as Slack or custom webhooks.
|
|
@@ -43,9 +44,9 @@ Rules that matter:
|
|
|
43
44
|
## The Main API
|
|
44
45
|
|
|
45
46
|
```ts
|
|
46
|
-
import {
|
|
47
|
+
import { defineRoute } from "experimental-ash";
|
|
47
48
|
|
|
48
|
-
export default
|
|
49
|
+
export default defineRoute({
|
|
49
50
|
method: "POST",
|
|
50
51
|
async fetch() {
|
|
51
52
|
return new Response("ok");
|
|
@@ -53,30 +54,32 @@ export default defineChannel({
|
|
|
53
54
|
});
|
|
54
55
|
```
|
|
55
56
|
|
|
56
|
-
`
|
|
57
|
+
`defineRoute(...)` defines a route — the HTTP request handler that receives webhooks and calls
|
|
58
|
+
`agent.run()` or `agent.deliver()`. The route constructs a `Channel` (the conduit that owns auth,
|
|
59
|
+
events, delivery, context, and serialization) and passes it to the runtime.
|
|
57
60
|
|
|
58
61
|
## HTTP Channels
|
|
59
62
|
|
|
60
63
|
The framework ships two HTTP helpers on `experimental-ash/channels/http`:
|
|
61
64
|
|
|
62
|
-
- `
|
|
63
|
-
- `
|
|
65
|
+
- `httpRoute({ auth })`
|
|
66
|
+
- `httpRunStreamRoute({ auth })`
|
|
64
67
|
|
|
65
68
|
Both require an auth function. Use `experimental-ash/channels/auth` for the common helpers such as
|
|
66
69
|
`vercelOidc()`, `httpBasic()`, and `none()`.
|
|
67
70
|
|
|
68
71
|
```ts
|
|
69
|
-
import {
|
|
72
|
+
import { httpRoute } from "experimental-ash/channels/http";
|
|
70
73
|
import { vercelOidc } from "experimental-ash/channels/auth";
|
|
71
74
|
|
|
72
|
-
export default
|
|
75
|
+
export default httpRoute({
|
|
73
76
|
auth: vercelOidc(),
|
|
74
77
|
});
|
|
75
78
|
```
|
|
76
79
|
|
|
77
80
|
## Slack And Other Authored Channels
|
|
78
81
|
|
|
79
|
-
Authored channels can wrap those helpers or build custom transport flows with `
|
|
82
|
+
Authored channels can wrap those helpers or build custom transport flows with `defineRoute(...)`.
|
|
80
83
|
|
|
81
84
|
Use a custom channel when you want:
|
|
82
85
|
|
|
@@ -84,10 +87,12 @@ Use a custom channel when you want:
|
|
|
84
87
|
- transport-specific delivery behavior
|
|
85
88
|
- custom request parsing before the runtime turn starts
|
|
86
89
|
|
|
90
|
+
Channel constructor state is for stable serialized transport identity only. Once a run starts, keep
|
|
91
|
+
that state immutable and move mutable per-session data into durable context or `session.internal`.
|
|
92
|
+
|
|
87
93
|
## What To Read Next
|
|
88
94
|
|
|
89
95
|
- [`../project-layout.md`](../project-layout.md)
|
|
90
96
|
- [`../typescript-api.md`](../typescript-api.md)
|
|
91
97
|
- [`../auth-and-route-protection.md`](../auth-and-route-protection.md)
|
|
92
98
|
- [`../../external-agent-protocol.md`](../../external-agent-protocol.md)
|
|
93
|
-
|