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,66 +1,37 @@
|
|
|
1
|
-
import { compileChannelRoute, matchChannelRoute } from "../host/channel-url-matcher.js";
|
|
2
1
|
import { resolveNitroChannelRuntimeBundle } from "./runtime-stack.js";
|
|
3
2
|
/**
|
|
4
|
-
*
|
|
5
|
-
* channels. Registered N times in `configure-message-routes.ts` — once per
|
|
6
|
-
* channel — but uses the same handler file because Nitro can't pass
|
|
7
|
-
* channel identity into a handler module from the registration site.
|
|
3
|
+
* Dispatches one channel request identified by `routeKey`.
|
|
8
4
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* params.
|
|
17
|
-
* 4. Calls the matched channel's `fetch` and awaits any pending
|
|
18
|
-
* background tasks before returning the response so serverless
|
|
19
|
-
* invocations stay alive long enough to drive `runtime.run()` to
|
|
20
|
-
* completion.
|
|
5
|
+
* Each channel route is mounted as its own virtual Nitro handler with the
|
|
6
|
+
* route key and artifacts config baked in. Nitro's router matches the URL
|
|
7
|
+
* and populates `event.context.params`, so no custom URL matching is
|
|
8
|
+
* needed — the handler looks up the channel by its `(method, urlPath)` key
|
|
9
|
+
* directly. When routes register background work through `ctx.waitUntil`,
|
|
10
|
+
* Nitro forwards that work to `event.waitUntil()` so webhook
|
|
11
|
+
* acknowledgements can return immediately.
|
|
21
12
|
*/
|
|
22
|
-
export
|
|
23
|
-
const bundle = await resolveNitroChannelRuntimeBundle();
|
|
24
|
-
const
|
|
25
|
-
const requestUrl = new URL(event.req.url);
|
|
26
|
-
const match = matchChannelRoute(compiledRoutes, {
|
|
27
|
-
method: event.req.method,
|
|
28
|
-
urlPath: requestUrl.pathname,
|
|
29
|
-
});
|
|
30
|
-
if (match === null) {
|
|
31
|
-
// The Nitro router only invokes us for routes we registered, so a
|
|
32
|
-
// miss here means the channel set has drifted between registration
|
|
33
|
-
// and dispatch — bail with a 404 rather than throwing.
|
|
34
|
-
return Response.json({ error: "No matching channel for this request.", ok: false }, { status: 404 });
|
|
35
|
-
}
|
|
36
|
-
const matchedChannel = bundle.channels.find((channel) => channel.method.toUpperCase() === match.route.method &&
|
|
37
|
-
channel.urlPath === match.route.urlPath);
|
|
13
|
+
export async function dispatchChannelRequest(event, routeKey, config) {
|
|
14
|
+
const bundle = await resolveNitroChannelRuntimeBundle(config);
|
|
15
|
+
const matchedChannel = bundle.channels.find((channel) => `${channel.method.toUpperCase()} ${channel.urlPath}` === routeKey);
|
|
38
16
|
if (matchedChannel === undefined) {
|
|
39
17
|
return Response.json({ error: "No matching channel for this request.", ok: false }, { status: 404 });
|
|
40
18
|
}
|
|
41
|
-
// Snapshot the H3-attached socket peer IP once per request and pass it
|
|
42
|
-
// through to the channel via `ChannelContext.requestIp`. Channels that
|
|
43
|
-
// need IP allowlisting call `isIpAllowed(ctx.requestIp, allowList)` from
|
|
44
|
-
// `experimental-ash/channels/auth`.
|
|
45
19
|
const requestIp = extractSocketIp(event);
|
|
46
20
|
const backgroundTasks = [];
|
|
47
21
|
const ctx = {
|
|
48
|
-
// The bundle's `runtime` field is the framework's internal workflow
|
|
49
|
-
// runtime instance — `Runtime` in `channel/types.ts`. The public
|
|
50
|
-
// channel surface exposes it as `agent` because, conceptually, what
|
|
51
|
-
// a channel handler talks to is "this agent" (runtime + harness)
|
|
52
|
-
// rather than "the workflow runtime."
|
|
53
22
|
agent: bundle.runtime,
|
|
54
23
|
waitUntil(task) {
|
|
55
24
|
backgroundTasks.push(task);
|
|
56
25
|
},
|
|
57
|
-
params:
|
|
26
|
+
params: event.context.params ?? {},
|
|
58
27
|
requestIp,
|
|
59
28
|
};
|
|
60
29
|
const response = await matchedChannel.fetch(event.req, ctx);
|
|
61
|
-
|
|
30
|
+
if (backgroundTasks.length > 0) {
|
|
31
|
+
event.waitUntil(Promise.allSettled(backgroundTasks));
|
|
32
|
+
}
|
|
62
33
|
return response;
|
|
63
|
-
}
|
|
34
|
+
}
|
|
64
35
|
function extractSocketIp(event) {
|
|
65
36
|
const ip = event.req.ip;
|
|
66
37
|
return typeof ip === "string" && ip.length > 0 ? ip : null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channel-dispatch.js","sourceRoot":"","sources":["../../../../../src/internal/nitro/routes/channel-dispatch.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"channel-dispatch.js","sourceRoot":"","sources":["../../../../../src/internal/nitro/routes/channel-dispatch.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gCAAgC,EAAE,MAAM,oBAAoB,CAAC;AAEtE;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC1C,KAAc,EACd,QAAgB,EAChB,MAA4B;IAE5B,MAAM,MAAM,GAAG,MAAM,gCAAgC,CAAC,MAAM,CAAC,CAAC;IAE9D,MAAM,cAAc,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,CACzC,CAAC,OAAO,EAAE,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,IAAI,OAAO,CAAC,OAAO,EAAE,KAAK,QAAQ,CAC/E,CAAC;IAEF,IAAI,cAAc,KAAK,SAAS,EAAE,CAAC;QACjC,OAAO,QAAQ,CAAC,IAAI,CAClB,EAAE,KAAK,EAAE,uCAAuC,EAAE,EAAE,EAAE,KAAK,EAAE,EAC7D,EAAE,MAAM,EAAE,GAAG,EAAE,CAChB,CAAC;IACJ,CAAC;IAED,MAAM,SAAS,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC;IACzC,MAAM,eAAe,GAAuB,EAAE,CAAC;IAE/C,MAAM,GAAG,GAAiB;QACxB,KAAK,EAAE,MAAM,CAAC,OAAO;QACrB,SAAS,CAAC,IAAI;YACZ,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC7B,CAAC;QACD,MAAM,EAAG,KAAK,CAAC,OAAO,CAAC,MAAiC,IAAI,EAAE;QAC9D,SAAS;KACV,CAAC;IAEF,MAAM,QAAQ,GAAG,MAAM,cAAc,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IAE5D,IAAI,eAAe,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC/B,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC,CAAC;IACvD,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,SAAS,eAAe,CAAC,KAAc;IACrC,MAAM,EAAE,GAAG,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;IACxB,OAAO,OAAO,EAAE,KAAK,QAAQ,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AAC7D,CAAC"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import type { HomePageData } from "./load-home-page-data.js";
|
|
2
|
+
/**
|
|
3
|
+
* One summary count shown in the home-page overview.
|
|
4
|
+
*/
|
|
5
|
+
export interface HomePageSummaryCount {
|
|
6
|
+
readonly label: string;
|
|
7
|
+
readonly value: number;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* One source-backed row displayed in the home-page tables.
|
|
11
|
+
*/
|
|
12
|
+
export interface HomePageSourceRow {
|
|
13
|
+
readonly details: string;
|
|
14
|
+
readonly logicalPath: string;
|
|
15
|
+
readonly name: string;
|
|
16
|
+
readonly sourceKind: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* One schedule row displayed in the home-page schedule table.
|
|
20
|
+
*/
|
|
21
|
+
export interface HomePageScheduleRow {
|
|
22
|
+
readonly cron: string;
|
|
23
|
+
readonly logicalPath: string;
|
|
24
|
+
readonly name: string;
|
|
25
|
+
readonly preview: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* One subagent row displayed in the home-page subagent table.
|
|
29
|
+
*/
|
|
30
|
+
export interface HomePageSubagentRow {
|
|
31
|
+
readonly details: string;
|
|
32
|
+
readonly kind: "Local";
|
|
33
|
+
readonly logicalPath: string;
|
|
34
|
+
readonly name: string;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* One endpoint row displayed in the home-page endpoint table.
|
|
38
|
+
*/
|
|
39
|
+
export interface HomePageEndpointRow {
|
|
40
|
+
readonly method: "GET" | "POST";
|
|
41
|
+
readonly name: string;
|
|
42
|
+
readonly notes: string;
|
|
43
|
+
readonly path: string;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Runtime overview section returned by the home-page JSON route.
|
|
47
|
+
*/
|
|
48
|
+
export interface HomePageOverview {
|
|
49
|
+
readonly configMetadata: Readonly<Record<string, string>>;
|
|
50
|
+
readonly configSource: string;
|
|
51
|
+
readonly discoveryErrors: number;
|
|
52
|
+
readonly discoveryWarnings: number;
|
|
53
|
+
readonly modelId: string;
|
|
54
|
+
readonly subagentCount: number;
|
|
55
|
+
readonly systemPromptSource: string;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* System prompt section returned by the home-page JSON route.
|
|
59
|
+
*/
|
|
60
|
+
export interface HomePageSystemPrompt {
|
|
61
|
+
readonly logicalPath: string;
|
|
62
|
+
readonly markdownPreview: string;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Full response payload returned by Ash's home-page JSON route.
|
|
66
|
+
*/
|
|
67
|
+
export interface HomePageResponse {
|
|
68
|
+
readonly agentId: string;
|
|
69
|
+
readonly endpointRows: readonly HomePageEndpointRow[];
|
|
70
|
+
readonly heroSummary: string;
|
|
71
|
+
readonly messageRequestExample: string;
|
|
72
|
+
readonly overview: HomePageOverview;
|
|
73
|
+
readonly pageDescription: string;
|
|
74
|
+
readonly pageTitle: string;
|
|
75
|
+
readonly promptLayers: readonly HomePageSourceRow[];
|
|
76
|
+
readonly sandboxes: readonly HomePageSourceRow[];
|
|
77
|
+
readonly schedules: readonly HomePageScheduleRow[];
|
|
78
|
+
readonly skills: readonly HomePageSourceRow[];
|
|
79
|
+
readonly subagents: readonly HomePageSubagentRow[];
|
|
80
|
+
readonly summaryCounts: readonly HomePageSummaryCount[];
|
|
81
|
+
readonly systemPrompt: HomePageSystemPrompt;
|
|
82
|
+
readonly tools: readonly HomePageSourceRow[];
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Builds the JSON payload served to Ash's static Nitro home page.
|
|
86
|
+
*/
|
|
87
|
+
export declare function buildHomePageResponse(data: HomePageData): HomePageResponse;
|
|
88
|
+
//# sourceMappingURL=build-home-page-response.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-home-page-response.d.ts","sourceRoot":"","sources":["../../../../../../src/internal/nitro/routes/home-page/build-home-page-response.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAEV,YAAY,EAKb,MAAM,0BAA0B,CAAC;AAElC;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,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S,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,YAAY,EAAE,SAAS,iBAAiB,EAAE,CAAC;IACpD,QAAQ,CAAC,SAAS,EAAE,SAAS,iBAAiB,EAAE,CAAC;IACjD,QAAQ,CAAC,SAAS,EAAE,SAAS,mBAAmB,EAAE,CAAC;IACnD,QAAQ,CAAC,MAAM,EAAE,SAAS,iBAAiB,EAAE,CAAC;IAC9C,QAAQ,CAAC,SAAS,EAAE,SAAS,mBAAmB,EAAE,CAAC;IACnD,QAAQ,CAAC,aAAa,EAAE,SAAS,oBAAoB,EAAE,CAAC;IACxD,QAAQ,CAAC,YAAY,EAAE,oBAAoB,CAAC;IAC5C,QAAQ,CAAC,KAAK,EAAE,SAAS,iBAAiB,EAAE,CAAC;CAC9C;AAkJD;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,YAAY,GAAG,gBAAgB,CAiE1E"}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { ASH_HEALTH_ROUTE_PATH, ASH_HOME_ROUTE_PATH, ASH_MESSAGE_ROUTE_PATH, ASH_MESSAGE_STREAM_ROUTE_PATTERN, } from "../../../../protocol/routes.js";
|
|
2
|
+
function pluralize(count, noun) {
|
|
3
|
+
return `${count} ${noun}${count === 1 ? "" : "s"}`;
|
|
4
|
+
}
|
|
5
|
+
function truncateCopy(value, maxLength) {
|
|
6
|
+
if (value.length <= maxLength) {
|
|
7
|
+
return value;
|
|
8
|
+
}
|
|
9
|
+
return `${value.slice(0, maxLength - 3).trimEnd()}...`;
|
|
10
|
+
}
|
|
11
|
+
function findSystemPrompt(agent) {
|
|
12
|
+
return agent.promptLayers.find((promptLayer) => promptLayer.kind === "system");
|
|
13
|
+
}
|
|
14
|
+
function createHeroSummary(data) {
|
|
15
|
+
const { agent, manifest, schedules } = data;
|
|
16
|
+
return `Compiled inspection surface for the current runtime. Runs on ${agent.config.model.id} with ${pluralize(agent.promptLayers.length, "prompt layer")}, ${pluralize(agent.skills.length, "skill")}, ${pluralize(agent.tools.length, "tool")}, ${pluralize(agent.sandboxes.length, "sandbox")}, ${pluralize(schedules.length, "schedule")}, and ${pluralize(manifest.subagents.length, "subagent")}.`;
|
|
17
|
+
}
|
|
18
|
+
function createPageDescription(data) {
|
|
19
|
+
return truncateCopy(createHeroSummary(data), 155);
|
|
20
|
+
}
|
|
21
|
+
function renderPromptLayerRows(promptLayers) {
|
|
22
|
+
return promptLayers.map((promptLayer) => ({
|
|
23
|
+
details: truncateCopy(promptLayer.markdown.trim(), promptLayer.kind === "system" ? 420 : 240),
|
|
24
|
+
logicalPath: promptLayer.logicalPath,
|
|
25
|
+
name: promptLayer.name,
|
|
26
|
+
sourceKind: promptLayer.sourceKind === "module" ? "Module" : promptLayer.sourceKind,
|
|
27
|
+
}));
|
|
28
|
+
}
|
|
29
|
+
function renderSkillRows(skills) {
|
|
30
|
+
return skills.map((skill) => ({
|
|
31
|
+
details: skill.description,
|
|
32
|
+
logicalPath: skill.logicalPath,
|
|
33
|
+
name: skill.name,
|
|
34
|
+
sourceKind: skill.sourceKind,
|
|
35
|
+
}));
|
|
36
|
+
}
|
|
37
|
+
function renderToolRows(agent) {
|
|
38
|
+
return agent.tools.map((tool) => ({
|
|
39
|
+
details: tool.description,
|
|
40
|
+
logicalPath: tool.logicalPath,
|
|
41
|
+
name: tool.name,
|
|
42
|
+
sourceKind: tool.sourceKind === "module" ? "Module" : tool.sourceKind,
|
|
43
|
+
}));
|
|
44
|
+
}
|
|
45
|
+
function renderSandboxRows(sandboxes) {
|
|
46
|
+
return sandboxes.map((sandbox) => {
|
|
47
|
+
const lifecycleLabels = [
|
|
48
|
+
sandbox.bootstrap !== undefined ? "template bootstrap" : null,
|
|
49
|
+
sandbox.onSession !== undefined ? "per-session init" : null,
|
|
50
|
+
].filter((label) => label !== null);
|
|
51
|
+
const details = lifecycleLabels.length === 0
|
|
52
|
+
? "No lifecycle hooks."
|
|
53
|
+
: `Lifecycle: ${lifecycleLabels.join(" + ")}.`;
|
|
54
|
+
return {
|
|
55
|
+
details,
|
|
56
|
+
logicalPath: sandbox.logicalPath,
|
|
57
|
+
name: sandbox.name,
|
|
58
|
+
sourceKind: sandbox.sourceKind === "module" ? "Module" : sandbox.sourceKind,
|
|
59
|
+
};
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
function renderScheduleRows(schedules) {
|
|
63
|
+
return schedules.map((schedule) => ({
|
|
64
|
+
cron: schedule.cron,
|
|
65
|
+
logicalPath: schedule.logicalPath,
|
|
66
|
+
name: schedule.name,
|
|
67
|
+
preview: truncateCopy(schedule.markdown.trim(), 220),
|
|
68
|
+
}));
|
|
69
|
+
}
|
|
70
|
+
function renderSubagentRows(manifest) {
|
|
71
|
+
const nestedSubagentCountByNodeId = new Map();
|
|
72
|
+
for (const edge of manifest.subagentEdges) {
|
|
73
|
+
nestedSubagentCountByNodeId.set(edge.parentNodeId, (nestedSubagentCountByNodeId.get(edge.parentNodeId) ?? 0) + 1);
|
|
74
|
+
}
|
|
75
|
+
return manifest.subagents.map((subagent) => ({
|
|
76
|
+
details: `Local subagent package with ${pluralize(subagent.agent.tools.length, "tool")} and ${pluralize(nestedSubagentCountByNodeId.get(subagent.nodeId) ?? 0, "nested subagent")}.`,
|
|
77
|
+
kind: "Local",
|
|
78
|
+
logicalPath: subagent.logicalPath,
|
|
79
|
+
name: subagent.name,
|
|
80
|
+
}));
|
|
81
|
+
}
|
|
82
|
+
function renderEndpointRows() {
|
|
83
|
+
return [
|
|
84
|
+
{
|
|
85
|
+
method: "GET",
|
|
86
|
+
name: "Health",
|
|
87
|
+
notes: "Readiness JSON for the current host.",
|
|
88
|
+
path: ASH_HEALTH_ROUTE_PATH,
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
method: "GET",
|
|
92
|
+
name: "Home data",
|
|
93
|
+
notes: "Inspection JSON consumed by the static home page.",
|
|
94
|
+
path: ASH_HOME_ROUTE_PATH,
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
method: "POST",
|
|
98
|
+
name: "Message",
|
|
99
|
+
notes: "Starts or resumes a durable agent run from JSON input.",
|
|
100
|
+
path: ASH_MESSAGE_ROUTE_PATH,
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
method: "GET",
|
|
104
|
+
name: "Run stream",
|
|
105
|
+
notes: "Streams NDJSON events for one active or completed run.",
|
|
106
|
+
path: ASH_MESSAGE_STREAM_ROUTE_PATTERN,
|
|
107
|
+
},
|
|
108
|
+
];
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Builds the JSON payload served to Ash's static Nitro home page.
|
|
112
|
+
*/
|
|
113
|
+
export function buildHomePageResponse(data) {
|
|
114
|
+
const systemPrompt = findSystemPrompt(data.agent);
|
|
115
|
+
const requestExample = `POST ${ASH_MESSAGE_ROUTE_PATH}
|
|
116
|
+
content-type: application/json
|
|
117
|
+
|
|
118
|
+
{
|
|
119
|
+
"message": "Tell me what you can do."
|
|
120
|
+
}`;
|
|
121
|
+
return {
|
|
122
|
+
agentId: data.agent.config.name,
|
|
123
|
+
endpointRows: renderEndpointRows(),
|
|
124
|
+
heroSummary: createHeroSummary(data),
|
|
125
|
+
messageRequestExample: requestExample,
|
|
126
|
+
overview: {
|
|
127
|
+
configMetadata: data.agent.config.metadata,
|
|
128
|
+
configSource: data.agent.config.source?.logicalPath ?? "Implicit defaults",
|
|
129
|
+
discoveryErrors: data.agent.metadata.diagnosticsSummary.errors,
|
|
130
|
+
discoveryWarnings: data.agent.metadata.diagnosticsSummary.warnings,
|
|
131
|
+
modelId: data.agent.config.model.id,
|
|
132
|
+
subagentCount: data.manifest.subagents.length,
|
|
133
|
+
systemPromptSource: systemPrompt?.logicalPath ?? "No system prompt discovered",
|
|
134
|
+
},
|
|
135
|
+
pageDescription: createPageDescription(data),
|
|
136
|
+
pageTitle: `${data.agent.config.name} | Ash`,
|
|
137
|
+
promptLayers: renderPromptLayerRows(data.agent.promptLayers),
|
|
138
|
+
sandboxes: renderSandboxRows(data.agent.sandboxes),
|
|
139
|
+
schedules: renderScheduleRows(data.schedules),
|
|
140
|
+
skills: renderSkillRows(data.agent.skills),
|
|
141
|
+
subagents: renderSubagentRows(data.manifest),
|
|
142
|
+
summaryCounts: [
|
|
143
|
+
{
|
|
144
|
+
label: "prompt layer",
|
|
145
|
+
value: data.agent.promptLayers.length,
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
label: "skill",
|
|
149
|
+
value: data.agent.skills.length,
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
label: "tool",
|
|
153
|
+
value: data.agent.tools.length,
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
label: "sandbox",
|
|
157
|
+
value: data.agent.sandboxes.length,
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
label: "schedule",
|
|
161
|
+
value: data.schedules.length,
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
label: "subagent",
|
|
165
|
+
value: data.manifest.subagents.length,
|
|
166
|
+
},
|
|
167
|
+
],
|
|
168
|
+
systemPrompt: {
|
|
169
|
+
logicalPath: systemPrompt?.logicalPath ?? "No system prompt discovered",
|
|
170
|
+
markdownPreview: truncateCopy(systemPrompt?.markdown.trim() ?? "This agent does not currently define a system prompt.", 420),
|
|
171
|
+
},
|
|
172
|
+
tools: renderToolRows(data.agent),
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
//# sourceMappingURL=build-home-page-response.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-home-page-response.js","sourceRoot":"","sources":["../../../../../../src/internal/nitro/routes/home-page/build-home-page-response.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,sBAAsB,EACtB,gCAAgC,GACjC,MAAM,gCAAgC,CAAC;AAoGxC,SAAS,SAAS,CAAC,KAAa,EAAE,IAAY;IAC5C,OAAO,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,KAAK,CAA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AAK,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM;aAChC;YACD;gBACE,KAAK,EAAE,MAAM;gBACb,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM;aAC/B;YACD;gBACE,KAAK,EAAE,SAAS;gBAChB,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM;aACnC;YACD;gBACE,KAAK,EAAE,UAAU;gBACjB,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM;aAC7B;YACD;gBACE,KAAK,EAAE,UAAU;gBACjB,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,MAAM;aACtC;SACF;QACD,YAAY,EAAE;YACZ,WAAW,EAAE,YAAY,EAAE,WAAW,IAAI,6BAA6B;YACvE,eAAe,EAAE,YAAY,CAC3B,YAAY,EAAE,QAAQ,CAAC,IAAI,EAAE,IAAI,uDAAuD,EACxF,GAAG,CACJ;SACF;QACD,KAAK,EAAE,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC;KAClC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"home.d.ts","sourceRoot":"","sources":["../../../../../src/internal/nitro/routes/home.ts"],"names":[],"mappings":"AAgBA;;GAEG;AACH,wBAAsB,yBAAyB,CAC7C,KAAK,GAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAA;CAAO,GAC/B,OAAO,CAAC,QAAQ,CAAC,CAOnB"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { buildHomePageResponse } from "./home-page/build-home-page-response.js";
|
|
2
|
+
import { loadHomePageData, resolveHomePageCompiledArtifactsSource, } from "./home-page/load-home-page-data.js";
|
|
3
|
+
async function createHomePagePayload(input) {
|
|
4
|
+
const data = await loadHomePageData({
|
|
5
|
+
compiledArtifactsSource: resolveHomePageCompiledArtifactsSource({
|
|
6
|
+
appRoot: input.appRoot,
|
|
7
|
+
}),
|
|
8
|
+
});
|
|
9
|
+
return buildHomePageResponse(data);
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Builds the package-owned JSON response consumed by Ash's static home page.
|
|
13
|
+
*/
|
|
14
|
+
export async function handleHomePageDataRequest(input = {}) {
|
|
15
|
+
return new Response(JSON.stringify(await createHomePagePayload(input)), {
|
|
16
|
+
headers: {
|
|
17
|
+
"cache-control": "no-store",
|
|
18
|
+
"content-type": "application/json; charset=utf-8",
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=home.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"home.js","sourceRoot":"","sources":["../../../../../src/internal/nitro/routes/home.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,EACL,gBAAgB,EAChB,sCAAsC,GACvC,MAAM,oCAAoC,CAAC;AAE5C,KAAK,UAAU,qBAAqB,CAAC,KAA2B;IAC9D,MAAM,IAAI,GAAG,MAAM,gBAAgB,CAAC;QAClC,uBAAuB,EAAE,sCAAsC,CAAC;YAC9D,OAAO,EAAE,KAAK,CAAC,OAAO;SACvB,CAAC;KACH,CAAC,CAAC;IAEH,OAAO,qBAAqB,CAAC,IAAI,CAAC,CAAC;AACrC,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,yBAAyB,CAC7C,QAA8B,EAAE;IAEhC,OAAO,IAAI,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,qBAAqB,CAAC,KAAK,CAAC,CAAC,EAAE;QACtE,OAAO,EAAE;YACP,eAAe,EAAE,UAAU;YAC3B,cAAc,EAAE,iCAAiC;SAClD;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Builds the package-owned home page response for one resolved application.
|
|
3
3
|
*/
|
|
4
|
-
export declare function handleHomePageRequest(input
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
export declare function handleHomePageRequest(input: {
|
|
5
|
+
agentInfoOnlyMode?: boolean;
|
|
6
|
+
homePageHtml: string;
|
|
7
7
|
}): Promise<Response>;
|
|
8
|
-
/**
|
|
9
|
-
* Nitro route for Ash's package-owned home page.
|
|
10
|
-
*/
|
|
11
|
-
declare const _default: () => Promise<Response>;
|
|
12
|
-
export default _default;
|
|
13
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/nitro/routes/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/nitro/routes/index.ts"],"names":[],"mappings":"AAyBA;;GAEG;AACH,wBAAsB,qBAAqB,CAAC,KAAK,EAAE;IACjD,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,YAAY,EAAE,MAAM,CAAC;CACtB,GAAG,OAAO,CAAC,QAAQ,CAAC,CAYpB"}
|
|
@@ -1,50 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { renderHomePage } from "./home-page/render-home-page.js";
|
|
5
|
-
function resolveConfiguredAppRoot(configuredAppRoot) {
|
|
6
|
-
if (typeof configuredAppRoot === "string") {
|
|
7
|
-
return configuredAppRoot;
|
|
1
|
+
function resolveAgentInfoOnlyMode(configuredAgentInfoOnlyMode) {
|
|
2
|
+
if (typeof configuredAgentInfoOnlyMode === "boolean") {
|
|
3
|
+
return configuredAgentInfoOnlyMode;
|
|
8
4
|
}
|
|
9
|
-
|
|
10
|
-
return typeof runtimeConfiguration.appRoot === "string"
|
|
11
|
-
? runtimeConfiguration.appRoot
|
|
12
|
-
: undefined;
|
|
5
|
+
return process.env.VERCEL === "1";
|
|
13
6
|
}
|
|
14
|
-
function
|
|
15
|
-
|
|
16
|
-
|
|
7
|
+
function injectHomePageRuntimeFlags(input) {
|
|
8
|
+
const runtimeFlagsScript = `<script>globalThis.__ASH_UI_AGENT_INFO_ONLY_MODE__=${input.agentInfoOnlyMode ? "true" : "false"};</script>`;
|
|
9
|
+
if (input.homePageHtml.includes("</head>")) {
|
|
10
|
+
return input.homePageHtml.replace("</head>", `${runtimeFlagsScript}</head>`);
|
|
17
11
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
throw new Error("Missing Ash home page template in Ash Nitro runtime configuration.");
|
|
12
|
+
if (input.homePageHtml.includes("</body>")) {
|
|
13
|
+
return input.homePageHtml.replace("</body>", `${runtimeFlagsScript}</body>`);
|
|
21
14
|
}
|
|
22
|
-
return
|
|
23
|
-
}
|
|
24
|
-
async function createHomePageHtml(input = {}) {
|
|
25
|
-
const template = resolveConfiguredHomePageTemplate(input.homePageTemplate);
|
|
26
|
-
const data = await loadHomePageData({
|
|
27
|
-
compiledArtifactsSource: resolveHomePageCompiledArtifactsSource({
|
|
28
|
-
appRoot: resolveConfiguredAppRoot(input.appRoot),
|
|
29
|
-
}),
|
|
30
|
-
});
|
|
31
|
-
const viewModel = buildHomePageViewModel(data);
|
|
32
|
-
return renderHomePage(template, viewModel);
|
|
15
|
+
return `${runtimeFlagsScript}${input.homePageHtml}`;
|
|
33
16
|
}
|
|
34
17
|
/**
|
|
35
18
|
* Builds the package-owned home page response for one resolved application.
|
|
36
19
|
*/
|
|
37
|
-
export async function handleHomePageRequest(input
|
|
38
|
-
|
|
20
|
+
export async function handleHomePageRequest(input) {
|
|
21
|
+
const homePageHtml = injectHomePageRuntimeFlags({
|
|
22
|
+
agentInfoOnlyMode: resolveAgentInfoOnlyMode(input.agentInfoOnlyMode),
|
|
23
|
+
homePageHtml: input.homePageHtml,
|
|
24
|
+
});
|
|
25
|
+
return new Response(homePageHtml, {
|
|
39
26
|
headers: {
|
|
27
|
+
"cache-control": "no-store",
|
|
40
28
|
"content-type": "text/html; charset=utf-8",
|
|
41
29
|
},
|
|
42
30
|
});
|
|
43
31
|
}
|
|
44
|
-
/**
|
|
45
|
-
* Nitro route for Ash's package-owned home page.
|
|
46
|
-
*/
|
|
47
|
-
export default async () => {
|
|
48
|
-
return await handleHomePageRequest();
|
|
49
|
-
};
|
|
50
32
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/nitro/routes/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/nitro/routes/index.ts"],"names":[],"mappings":"AAAA,SAAS,wBAAwB,CAAC,2BAAqC;IACrE,IAAI,OAAO,2BAA2B,KAAK,SAAS,EAAE,CAAC;QACrD,OAAO,2BAA2B,CAAC;IACrC,CAAC;IAED,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,KAAK,GAAG,CAAC;AACpC,CAAC;AAED,SAAS,0BAA0B,CAAC,KAGnC;IACC,MAAM,kBAAkB,GAAG,sDAAsD,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,YAAY,CAAC;IAExI,IAAI,KAAK,CAAC,YAAY,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;QAC3C,OAAO,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC,SAAS,EAAE,GAAG,kBAAkB,SAAS,CAAC,CAAC;IAC/E,CAAC;IAED,IAAI,KAAK,CAAC,YAAY,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;QAC3C,OAAO,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC,SAAS,EAAE,GAAG,kBAAkB,SAAS,CAAC,CAAC;IAC/E,CAAC;IAED,OAAO,GAAG,kBAAkB,GAAG,KAAK,CAAC,YAAY,EAAE,CAAC;AACtD,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,KAG3C;IACC,MAAM,YAAY,GAAG,0BAA0B,CAAC;QAC9C,iBAAiB,EAAE,wBAAwB,CAAC,KAAK,CAAC,iBAAiB,CAAC;QACpE,YAAY,EAAE,KAAK,CAAC,YAAY;KACjC,CAAC,CAAC;IAEH,OAAO,IAAI,QAAQ,CAAC,YAAY,EAAE;QAChC,OAAO,EAAE;YACP,eAAe,EAAE,UAAU;YAC3B,cAAc,EAAE,0BAA0B;SAC3C;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { type RuntimeCompiledArtifactsSource } from "../../../runtime/compiled-artifacts-source.js";
|
|
2
|
+
/**
|
|
3
|
+
* Configuration values needed to resolve the compiled-artifact source for
|
|
4
|
+
* package-owned Nitro routes. Passed explicitly from virtual handlers
|
|
5
|
+
* rather than read from a global runtime configuration store.
|
|
6
|
+
*/
|
|
7
|
+
export interface NitroArtifactsConfig {
|
|
8
|
+
readonly appRoot?: string;
|
|
9
|
+
readonly dev?: boolean;
|
|
10
|
+
}
|
|
2
11
|
/**
|
|
3
12
|
* Resolves the compiled-artifact source available to package-owned Nitro
|
|
4
13
|
* routes.
|
|
5
14
|
*/
|
|
6
|
-
export declare function resolveNitroCompiledArtifactsSource(
|
|
7
|
-
appRoot?: string;
|
|
8
|
-
}): RuntimeCompiledArtifactsSource;
|
|
15
|
+
export declare function resolveNitroCompiledArtifactsSource(config: NitroArtifactsConfig): RuntimeCompiledArtifactsSource;
|
|
9
16
|
//# sourceMappingURL=runtime-artifacts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-artifacts.d.ts","sourceRoot":"","sources":["../../../../../src/internal/nitro/routes/runtime-artifacts.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,8BAA8B,EACpC,MAAM,+CAA+C,CAAC;
|
|
1
|
+
{"version":3,"file":"runtime-artifacts.d.ts","sourceRoot":"","sources":["../../../../../src/internal/nitro/routes/runtime-artifacts.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,8BAA8B,EACpC,MAAM,+CAA+C,CAAC;AAGvD;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC;CACxB;AAED;;;GAGG;AACH,wBAAgB,mCAAmC,CACjD,MAAM,EAAE,oBAAoB,GAC3B,8BAA8B,CAkBhC"}
|
|
@@ -1,18 +1,11 @@
|
|
|
1
1
|
import { createBundledRuntimeCompiledArtifactsSource, createDiskRuntimeCompiledArtifactsSource, } from "../../../runtime/compiled-artifacts-source.js";
|
|
2
2
|
import { readBundledCompiledArtifacts } from "../../../runtime/loaders/bundled-artifacts.js";
|
|
3
|
-
import { readAshNitroRuntimeConfiguration } from "../runtime-configuration.js";
|
|
4
3
|
/**
|
|
5
4
|
* Resolves the compiled-artifact source available to package-owned Nitro
|
|
6
5
|
* routes.
|
|
7
6
|
*/
|
|
8
|
-
export function resolveNitroCompiledArtifactsSource(
|
|
9
|
-
const
|
|
10
|
-
const appRoot = typeof input.appRoot === "string"
|
|
11
|
-
? input.appRoot
|
|
12
|
-
: typeof runtimeConfiguration.appRoot === "string"
|
|
13
|
-
? runtimeConfiguration.appRoot
|
|
14
|
-
: undefined;
|
|
15
|
-
const isDevelopment = runtimeConfiguration.dev === true;
|
|
7
|
+
export function resolveNitroCompiledArtifactsSource(config) {
|
|
8
|
+
const { appRoot, dev: isDevelopment } = config;
|
|
16
9
|
if (isDevelopment && appRoot !== undefined) {
|
|
17
10
|
return createDiskRuntimeCompiledArtifactsSource(appRoot);
|
|
18
11
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-artifacts.js","sourceRoot":"","sources":["../../../../../src/internal/nitro/routes/runtime-artifacts.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,2CAA2C,EAC3C,wCAAwC,GAEzC,MAAM,+CAA+C,CAAC;AACvD,OAAO,EAAE,4BAA4B,EAAE,MAAM,+CAA+C,CAAC;
|
|
1
|
+
{"version":3,"file":"runtime-artifacts.js","sourceRoot":"","sources":["../../../../../src/internal/nitro/routes/runtime-artifacts.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,2CAA2C,EAC3C,wCAAwC,GAEzC,MAAM,+CAA+C,CAAC;AACvD,OAAO,EAAE,4BAA4B,EAAE,MAAM,+CAA+C,CAAC;AAY7F;;;GAGG;AACH,MAAM,UAAU,mCAAmC,CACjD,MAA4B;IAE5B,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,aAAa,EAAE,GAAG,MAAM,CAAC;IAE/C,IAAI,aAAa,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC3C,OAAO,wCAAwC,CAAC,OAAO,CAAC,CAAC;IAC3D,CAAC;IAED,IAAI,4BAA4B,EAAE,KAAK,IAAI,EAAE,CAAC;QAC5C,OAAO,2CAA2C,EAAE,CAAC;IACvD,CAAC;IAED,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC1B,OAAO,wCAAwC,CAAC,OAAO,CAAC,CAAC;IAC3D,CAAC;IAED,MAAM,IAAI,KAAK,CACb,4FAA4F,CAC7F,CAAC;AACJ,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ScheduleDispatcher } from "../../../channel/schedule.js";
|
|
2
2
|
import type { Runtime } from "../../../channel/types.js";
|
|
3
3
|
import type { ResolvedChannelDefinition } from "../../../runtime/types.js";
|
|
4
|
+
import { type NitroArtifactsConfig } from "./runtime-artifacts.js";
|
|
4
5
|
/**
|
|
5
6
|
* Bundle returned to the per-channel Nitro dispatch handler.
|
|
6
7
|
*
|
|
@@ -8,7 +9,7 @@ import type { ResolvedChannelDefinition } from "../../../runtime/types.js";
|
|
|
8
9
|
* overrides minus authored disables) and the per-request workflow runtime.
|
|
9
10
|
* The dispatch handler walks `channels` to match the inbound request
|
|
10
11
|
* against a registered URL pattern, then calls the matched channel's
|
|
11
|
-
* `fetch` with a `
|
|
12
|
+
* `fetch` with a `RouteContext` built from `runtime`.
|
|
12
13
|
*/
|
|
13
14
|
export interface NitroChannelRuntimeBundle {
|
|
14
15
|
readonly channels: readonly ResolvedChannelDefinition[];
|
|
@@ -19,11 +20,11 @@ export interface NitroChannelRuntimeBundle {
|
|
|
19
20
|
* (already merged with framework defaults by `resolve-agent-graph.ts`)
|
|
20
21
|
* and a fresh workflow runtime.
|
|
21
22
|
*
|
|
22
|
-
* No singleton caching is needed — session
|
|
23
|
-
* workflow
|
|
24
|
-
*
|
|
23
|
+
* No singleton caching is needed — durable session execution lives inside the
|
|
24
|
+
* workflow runtime and the channel set is recomputed from the compiled bundle
|
|
25
|
+
* on each request.
|
|
25
26
|
*/
|
|
26
|
-
export declare function resolveNitroChannelRuntimeBundle(): Promise<NitroChannelRuntimeBundle>;
|
|
27
|
+
export declare function resolveNitroChannelRuntimeBundle(config: NitroArtifactsConfig): Promise<NitroChannelRuntimeBundle>;
|
|
27
28
|
/**
|
|
28
29
|
* Builds and returns the schedule channel backed by the workflow runtime.
|
|
29
30
|
*
|
|
@@ -33,5 +34,5 @@ export declare function resolveNitroChannelRuntimeBundle(): Promise<NitroChannel
|
|
|
33
34
|
* inbound HTTP request and do not fit the per-request `Channel.fetch`
|
|
34
35
|
* shape.
|
|
35
36
|
*/
|
|
36
|
-
export declare function
|
|
37
|
+
export declare function resolveNitroScheduleDispatcher(config: NitroArtifactsConfig): ScheduleDispatcher;
|
|
37
38
|
//# sourceMappingURL=runtime-stack.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-stack.d.ts","sourceRoot":"","sources":["../../../../../src/internal/nitro/routes/runtime-stack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"runtime-stack.d.ts","sourceRoot":"","sources":["../../../../../src/internal/nitro/routes/runtime-stack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AAGzD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,EACL,KAAK,oBAAoB,EAE1B,MAAM,wBAAwB,CAAC;AAEhC;;;;;;;;GAQG;AACH,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,QAAQ,EAAE,SAAS,yBAAyB,EAAE,CAAC;IACxD,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC3B;AAED;;;;;;;;GAQG;AACH,wBAAsB,gCAAgC,CACpD,MAAM,EAAE,oBAAoB,GAC3B,OAAO,CAAC,yBAAyB,CAAC,CAUpC;AAED;;;;;;;;GAQG;AACH,wBAAgB,8BAA8B,CAAC,MAAM,EAAE,oBAAoB,GAAG,kBAAkB,CAI/F"}
|