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,12 +1,11 @@
|
|
|
1
1
|
import type { LanguageModel, ModelMessage } from "ai";
|
|
2
|
-
import type { ChannelEmitter } from "../channel/types.js";
|
|
3
2
|
import type { SandboxState } from "../execution/sandboxes/types.js";
|
|
4
3
|
import type { HandleMessageStreamEvent, RuntimeIdentity } from "../protocol/message.js";
|
|
5
|
-
import type { NeedsApprovalContext } from "../public/definitions/tool.js";
|
|
6
4
|
import type { RunMode } from "../run-mode.js";
|
|
7
5
|
import type { RuntimeModelReference } from "../runtime/agent/bootstrap.js";
|
|
8
|
-
import type {
|
|
6
|
+
import type { InputResponse } from "../runtime/input/types.js";
|
|
9
7
|
import type { JsonValue } from "../runtime/json.js";
|
|
8
|
+
import type { HarnessToolDefinition } from "./execute-tool.js";
|
|
10
9
|
/**
|
|
11
10
|
* Serializable tool definition stored on the session.
|
|
12
11
|
*
|
|
@@ -42,7 +41,7 @@ export interface SessionAgent {
|
|
|
42
41
|
readonly tools: readonly SessionToolDefinition[];
|
|
43
42
|
}
|
|
44
43
|
/**
|
|
45
|
-
* Serializable session
|
|
44
|
+
* Serializable session data passed between harness and runtime.
|
|
46
45
|
*
|
|
47
46
|
* Only contains plain data -- no resolved model instances or tool execute
|
|
48
47
|
* functions. The harness resolves those at step time via injected config.
|
|
@@ -51,14 +50,23 @@ export interface HarnessSession {
|
|
|
51
50
|
readonly agent: SessionAgent;
|
|
52
51
|
readonly compaction: CompactionConfig;
|
|
53
52
|
readonly continuationToken: string;
|
|
53
|
+
/**
|
|
54
|
+
* Durable authored context keyed by public `ContextKey.name`.
|
|
55
|
+
*/
|
|
56
|
+
readonly context?: Readonly<Record<string, unknown>>;
|
|
54
57
|
readonly history: ModelMessage[];
|
|
58
|
+
/**
|
|
59
|
+
* Internal framework bookkeeping that must survive durable steps but is not
|
|
60
|
+
* part of the authored durable context API.
|
|
61
|
+
*/
|
|
62
|
+
readonly internal?: Readonly<Record<string, unknown>>;
|
|
63
|
+
readonly sessionId: string;
|
|
55
64
|
readonly sandboxState?: SandboxState;
|
|
56
|
-
readonly state?: Readonly<Record<string, unknown>>;
|
|
57
65
|
}
|
|
58
66
|
/**
|
|
59
67
|
* Result returned by the compaction callback.
|
|
60
68
|
*
|
|
61
|
-
* `session` carries any
|
|
69
|
+
* `session` carries any durable-context or internal-bookkeeping resets.
|
|
62
70
|
* `messages` carries context to inject after compaction (e.g. the current
|
|
63
71
|
* todo list as a user message).
|
|
64
72
|
*/
|
|
@@ -67,10 +75,14 @@ export interface CompactionCallbackResult {
|
|
|
67
75
|
readonly session: HarnessSession;
|
|
68
76
|
}
|
|
69
77
|
/**
|
|
70
|
-
* Input payload for a
|
|
78
|
+
* Input payload for a harness turn.
|
|
79
|
+
*
|
|
80
|
+
* Carries an optional text message and/or structured input responses
|
|
81
|
+
* from the channel emitter's `onDeliver`. The harness resolves any
|
|
82
|
+
* pending input batch at the start of `runStep` before the model call.
|
|
71
83
|
*/
|
|
72
84
|
export interface StepInput {
|
|
73
|
-
readonly
|
|
85
|
+
readonly inputResponses?: readonly InputResponse[];
|
|
74
86
|
readonly message?: string;
|
|
75
87
|
}
|
|
76
88
|
/**
|
|
@@ -88,6 +100,10 @@ export interface StepDone {
|
|
|
88
100
|
* - `StepDone` means "the conversation is finished."
|
|
89
101
|
*/
|
|
90
102
|
export type StepNext = StepDone | StepFn | null;
|
|
103
|
+
/**
|
|
104
|
+
* Type guard for the terminal done signal in a step result.
|
|
105
|
+
*/
|
|
106
|
+
export declare function isStepDone(next: StepNext): next is StepDone;
|
|
91
107
|
/**
|
|
92
108
|
* Result returned by one harness step invocation.
|
|
93
109
|
*/
|
|
@@ -101,9 +117,12 @@ export interface StepResult {
|
|
|
101
117
|
*/
|
|
102
118
|
export type StepFn = (session: HarnessSession, input?: StepInput) => Promise<StepResult>;
|
|
103
119
|
/**
|
|
104
|
-
* Map from tool name to its
|
|
120
|
+
* Map from tool name to its harness-owned definition.
|
|
121
|
+
*
|
|
122
|
+
* The harness uses these definitions for schema extraction, tool execution
|
|
123
|
+
* (via {@link executeAuthoredTool}), approval gates, and compaction hooks.
|
|
105
124
|
*/
|
|
106
|
-
export type
|
|
125
|
+
export type HarnessToolMap = ReadonlyMap<string, HarnessToolDefinition>;
|
|
107
126
|
/**
|
|
108
127
|
* Callback that writes one event to the event stream.
|
|
109
128
|
*
|
|
@@ -116,15 +135,6 @@ export type HarnessEmitFn = (event: HandleMessageStreamEvent) => Promise<void>;
|
|
|
116
135
|
* Dependencies injected into the tool-loop harness at construction time.
|
|
117
136
|
*/
|
|
118
137
|
export interface ToolLoopHarnessConfig {
|
|
119
|
-
/**
|
|
120
|
-
* Optional channel emitter for input resolution.
|
|
121
|
-
*
|
|
122
|
-
* When provided and the session has pending input requests, the harness
|
|
123
|
-
* calls {@link ChannelEmitter.resolveInput} to let the channel convert
|
|
124
|
-
* raw platform text into structured input results before resolving the
|
|
125
|
-
* pending batch.
|
|
126
|
-
*/
|
|
127
|
-
readonly channelEmitter?: ChannelEmitter;
|
|
128
138
|
readonly emit?: HarnessEmitFn;
|
|
129
139
|
/**
|
|
130
140
|
* Execution mode for the current harness.
|
|
@@ -135,23 +145,29 @@ export interface ToolLoopHarnessConfig {
|
|
|
135
145
|
*/
|
|
136
146
|
readonly mode: RunMode;
|
|
137
147
|
/**
|
|
138
|
-
* Called after compaction to let the execution layer
|
|
139
|
-
* compaction hooks. The harness applies
|
|
140
|
-
* the returned messages to the
|
|
141
|
-
*
|
|
142
|
-
* When not provided, compaction has no state side effects.
|
|
148
|
+
* Called after compaction to let the execution layer run session
|
|
149
|
+
* lifecycle hooks (e.g. tool compaction hooks). The harness applies
|
|
150
|
+
* the returned session and appends the returned messages to the
|
|
151
|
+
* compacted history.
|
|
143
152
|
*/
|
|
144
153
|
readonly onCompaction?: (session: HarnessSession) => CompactionCallbackResult | Promise<CompactionCallbackResult>;
|
|
145
154
|
readonly resolveModel: (reference: RuntimeModelReference) => Promise<LanguageModel>;
|
|
146
155
|
/**
|
|
147
|
-
* Runtime identity metadata attached to the `
|
|
156
|
+
* Runtime identity metadata attached to the `session.started` event.
|
|
148
157
|
*
|
|
149
|
-
* When provided, the harness includes this in the first `
|
|
158
|
+
* When provided, the harness includes this in the first `session.started`
|
|
150
159
|
* event so remote consumers (eval runners, reporters) receive
|
|
151
160
|
* authoritative server-side metadata.
|
|
152
161
|
*/
|
|
153
162
|
readonly runtimeIdentity?: RuntimeIdentity;
|
|
154
|
-
|
|
155
|
-
|
|
163
|
+
/**
|
|
164
|
+
* Unified tool definitions for this harness step.
|
|
165
|
+
*
|
|
166
|
+
* Each entry carries schema, execution, and approval gates. The
|
|
167
|
+
* harness derives AI SDK tool definitions, runs
|
|
168
|
+
* {@link executeAuthoredTool}, and checks approval gates from these
|
|
169
|
+
* definitions directly.
|
|
170
|
+
*/
|
|
171
|
+
readonly tools: HarnessToolMap;
|
|
156
172
|
}
|
|
157
173
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/harness/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAEtD,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/harness/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAEtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,KAAK,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACxF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,KAAK,EAAE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AAE,aAAa,CAAC;IAC9B;;;;;;OAMG;IACH,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB;;;;;OAKG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,CACtB,OAAO,EAAE,cAAc,KACpB,wBAAwB,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;IAClE,QAAQ,CAAC,YAAY,EAAE,CAAC,SAAS,EAAE,qBAAqB,KAAK,OAAO,CAAC,aAAa,CAAC,CAAC;IACpF;;;;;;OAMG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,eAAe,CAAC;IAC3C;;;;;;;OAOG;IACH,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC;CAChC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/harness/types.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/harness/types.ts"],"names":[],"mappings":"AAgHA;;GAEG;AACH,MAAM,UAAU,UAAU,CAAC,IAAc;IACvC,OAAO,IAAI,KAAK,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,MAAM,IAAI,IAAI,CAAC;AACrE,CAAC"}
|
|
@@ -5,11 +5,13 @@ import type { CompileAgentResult } from "../../compiler/compile-agent.js";
|
|
|
5
5
|
*/
|
|
6
6
|
export interface GeneratedCompiledArtifactsFiles {
|
|
7
7
|
bootstrapPath: string;
|
|
8
|
-
nitroPluginPath: string;
|
|
9
8
|
}
|
|
10
9
|
/**
|
|
11
|
-
* Writes the generated compiled-artifacts bootstrap
|
|
12
|
-
*
|
|
10
|
+
* Writes the generated compiled-artifacts bootstrap module.
|
|
11
|
+
*
|
|
12
|
+
* The bootstrap self-installs bundled artifacts on import and exports a
|
|
13
|
+
* default function so it can be used directly as a Nitro plugin — no
|
|
14
|
+
* separate plugin wrapper file is needed.
|
|
13
15
|
*/
|
|
14
16
|
export declare function writeCompiledArtifactsFiles(input: {
|
|
15
17
|
compileResult: CompileAgentResult;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compiled-artifacts.d.ts","sourceRoot":"","sources":["../../../../src/internal/application/compiled-artifacts.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAY1E;;;GAGG;AACH,MAAM,WAAW,+BAA+B;IAC9C,aAAa,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"compiled-artifacts.d.ts","sourceRoot":"","sources":["../../../../src/internal/application/compiled-artifacts.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAY1E;;;GAGG;AACH,MAAM,WAAW,+BAA+B;IAC9C,aAAa,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;GAMG;AACH,wBAAsB,2BAA2B,CAAC,KAAK,EAAE;IACvD,aAAa,EAAE,kBAAkB,CAAC;IAClC,MAAM,EAAE,MAAM,CAAC;CAChB,GAAG,OAAO,CAAC,+BAA+B,CAAC,CAmB3C"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { mkdir, writeFile } from "node:fs/promises";
|
|
2
|
-
import {
|
|
2
|
+
import { join } from "node:path";
|
|
3
3
|
import { ROOT_COMPILED_AGENT_NODE_ID, } from "../../compiler/manifest.js";
|
|
4
4
|
import { createCompiledModuleMapSource } from "../../compiler/module-map.js";
|
|
5
5
|
import { materializeWorkspaceFileSources } from "../../runtime/workspace/seed-files.js";
|
|
@@ -7,30 +7,25 @@ import { createWorkspaceSpec } from "../../runtime/workspace/spec.js";
|
|
|
7
7
|
import { WORKSPACE_ROOT } from "../../runtime/workspace/types.js";
|
|
8
8
|
import { resolvePackageSourceFilePath } from "./package.js";
|
|
9
9
|
/**
|
|
10
|
-
* Writes the generated compiled-artifacts bootstrap
|
|
11
|
-
*
|
|
10
|
+
* Writes the generated compiled-artifacts bootstrap module.
|
|
11
|
+
*
|
|
12
|
+
* The bootstrap self-installs bundled artifacts on import and exports a
|
|
13
|
+
* default function so it can be used directly as a Nitro plugin — no
|
|
14
|
+
* separate plugin wrapper file is needed.
|
|
12
15
|
*/
|
|
13
16
|
export async function writeCompiledArtifactsFiles(input) {
|
|
14
17
|
const bootstrapPath = join(input.outDir, "compiled-artifacts-bootstrap.mjs");
|
|
15
|
-
const nitroPluginPath = join(input.outDir, "compiled-artifacts-plugin.ts");
|
|
16
18
|
const workspaceResources = await collectBundledWorkspaceResources(input.compileResult);
|
|
17
19
|
await mkdir(input.outDir, { recursive: true });
|
|
18
|
-
await
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
})),
|
|
26
|
-
writeFile(nitroPluginPath, createCompiledArtifactsNitroPluginSource({
|
|
27
|
-
bootstrapPath,
|
|
28
|
-
nitroPluginPath,
|
|
29
|
-
})),
|
|
30
|
-
]);
|
|
20
|
+
await writeFile(bootstrapPath, await createCompiledArtifactsBootstrapSource({
|
|
21
|
+
compileResult: input.compileResult,
|
|
22
|
+
installModulePath: resolvePackageSourceFilePath("src/runtime/loaders/bundled-artifacts.ts"),
|
|
23
|
+
moduleMapPath: bootstrapPath,
|
|
24
|
+
metadata: input.compileResult.metadata,
|
|
25
|
+
workspaceResources,
|
|
26
|
+
}));
|
|
31
27
|
return {
|
|
32
28
|
bootstrapPath,
|
|
33
|
-
nitroPluginPath,
|
|
34
29
|
};
|
|
35
30
|
}
|
|
36
31
|
function normalizeImportSpecifierPath(path) {
|
|
@@ -70,6 +65,12 @@ async function createCompiledArtifactsBootstrapSource(input) {
|
|
|
70
65
|
"",
|
|
71
66
|
"installCompiledArtifactsBootstrap();",
|
|
72
67
|
"",
|
|
68
|
+
"// Default export satisfies the Nitro plugin contract so this file",
|
|
69
|
+
"// can be used directly as a Nitro plugin without a separate wrapper.",
|
|
70
|
+
"export default function installCompiledArtifactsPlugin() {",
|
|
71
|
+
" // Already installed on import above.",
|
|
72
|
+
"}",
|
|
73
|
+
"",
|
|
73
74
|
"export async function __ashInstallCompiledArtifactsStep() {",
|
|
74
75
|
' "use step";',
|
|
75
76
|
" return null;",
|
|
@@ -115,26 +116,4 @@ function toBundledWorkspaceRelativePath(path) {
|
|
|
115
116
|
}
|
|
116
117
|
return path.slice(workspacePrefix.length);
|
|
117
118
|
}
|
|
118
|
-
function createCompiledArtifactsNitroPluginSource(input) {
|
|
119
|
-
const bootstrapImportPath = createRelativeImportSpecifier({
|
|
120
|
-
fromDirectory: dirname(input.nitroPluginPath),
|
|
121
|
-
targetPath: input.bootstrapPath,
|
|
122
|
-
});
|
|
123
|
-
return [
|
|
124
|
-
"// Generated by Ash. Do not edit by hand.",
|
|
125
|
-
`import { installCompiledArtifactsBootstrap } from ${JSON.stringify(bootstrapImportPath)};`,
|
|
126
|
-
"",
|
|
127
|
-
"export default function installCompiledArtifactsPlugin() {",
|
|
128
|
-
" installCompiledArtifactsBootstrap();",
|
|
129
|
-
"}",
|
|
130
|
-
"",
|
|
131
|
-
].join("\n");
|
|
132
|
-
}
|
|
133
|
-
function createRelativeImportSpecifier(input) {
|
|
134
|
-
const relativePath = normalizeImportSpecifierPath(relative(input.fromDirectory, input.targetPath));
|
|
135
|
-
if (relativePath.startsWith(".")) {
|
|
136
|
-
return relativePath;
|
|
137
|
-
}
|
|
138
|
-
return `./${relativePath}`;
|
|
139
|
-
}
|
|
140
119
|
//# sourceMappingURL=compiled-artifacts.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compiled-artifacts.js","sourceRoot":"","sources":["../../../../src/internal/application/compiled-artifacts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"compiled-artifacts.js","sourceRoot":"","sources":["../../../../src/internal/application/compiled-artifacts.ts"],"names":[],"mappings":"AAAA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AS,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;YACxB,SAAS,CAAC,GAAG,CAAC,GAAG,EAAE;gBACjB,aAAa,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC;gBAC9C,MAAM;gBACN,IAAI,EAAE,YAAY;aACnB,CAAC,CAAC;QACL,CAAC;IACH,CAAC;AACH,CAAC;AAED,SAAS,8BAA8B,CAAC,IAAY;IAClD,MAAM,eAAe,GAAG,GAAG,cAAc,GAAG,CAAC;IAE7C,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,eAAe,CAAC,EAAE,CAAC;QACtC,MAAM,IAAI,KAAK,CACb,yCAAyC,IAAI,sBAAsB,cAAc,IAAI,CACtF,CAAC;IACJ,CAAC;IAED,OAAO,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;AAC5C,CAAC"}
|
|
@@ -6,7 +6,7 @@ import { ASH_PACKAGE_NAME } from "../../package-name.js";
|
|
|
6
6
|
let cachedPackageInfo;
|
|
7
7
|
// The package build stamps the published version into `dist` so bundled
|
|
8
8
|
// deployments can still report package metadata without resolving package.json.
|
|
9
|
-
const BUNDLED_FALLBACK_PACKAGE_VERSION = "0.2.0-alpha.
|
|
9
|
+
const BUNDLED_FALLBACK_PACKAGE_VERSION = "0.2.0-alpha.21";
|
|
10
10
|
const BUNDLED_FALLBACK_PACKAGE_VERSION_PLACEHOLDER = "__ASH_PACKAGE_VERSION_PLACEHOLDER__";
|
|
11
11
|
function resolveFallbackPackageVersion() {
|
|
12
12
|
return BUNDLED_FALLBACK_PACKAGE_VERSION === BUNDLED_FALLBACK_PACKAGE_VERSION_PLACEHOLDER
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Route } from "../../public/definitions/channel.js";
|
|
2
2
|
/**
|
|
3
3
|
* Normalizes one authored channel definition into the canonical internal
|
|
4
4
|
* shape consumed by the compiler.
|
|
5
5
|
*
|
|
6
|
-
* The
|
|
6
|
+
* The route API is a Web-standard `(Request, ctx) => Response` handler
|
|
7
7
|
* with an optional `method` field (defaulting to `"POST"` at compile time).
|
|
8
8
|
* Disable sentinels are handled by the compiler before this function is
|
|
9
9
|
* called.
|
|
10
10
|
*/
|
|
11
|
-
export declare function normalizeChannelDefinition(value: unknown, message: string):
|
|
11
|
+
export declare function normalizeChannelDefinition(value: unknown, message: string): Route;
|
|
12
12
|
//# sourceMappingURL=channel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../../../../src/internal/authored-definition/channel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../../../../src/internal/authored-definition/channel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,KAAK,EAAE,MAAM,qCAAqC,CAAC;AAWhF;;;;;;;;GAQG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,KAAK,CA2BjF"}
|
|
@@ -10,15 +10,16 @@ const CHANNEL_METHODS = new Set([
|
|
|
10
10
|
* Normalizes one authored channel definition into the canonical internal
|
|
11
11
|
* shape consumed by the compiler.
|
|
12
12
|
*
|
|
13
|
-
* The
|
|
13
|
+
* The route API is a Web-standard `(Request, ctx) => Response` handler
|
|
14
14
|
* with an optional `method` field (defaulting to `"POST"` at compile time).
|
|
15
15
|
* Disable sentinels are handled by the compiler before this function is
|
|
16
16
|
* called.
|
|
17
17
|
*/
|
|
18
18
|
export function normalizeChannelDefinition(value, message) {
|
|
19
19
|
const record = expectObjectRecord(value, message);
|
|
20
|
-
expectOnlyKnownKeys(record, ["fetch", "method"], message);
|
|
20
|
+
expectOnlyKnownKeys(record, ["fetch", "method", "serializableChannels"], message);
|
|
21
21
|
const fetchHandler = expectFunction(record.fetch, message);
|
|
22
|
+
const serializableChannels = getSerializableChannels(record.serializableChannels, message);
|
|
22
23
|
let method;
|
|
23
24
|
if (record.method !== undefined) {
|
|
24
25
|
if (typeof record.method !== "string" || !CHANNEL_METHODS.has(record.method)) {
|
|
@@ -27,8 +28,31 @@ export function normalizeChannelDefinition(value, message) {
|
|
|
27
28
|
method = record.method;
|
|
28
29
|
}
|
|
29
30
|
if (method === undefined) {
|
|
30
|
-
|
|
31
|
+
if (serializableChannels === undefined) {
|
|
32
|
+
return { fetch: fetchHandler };
|
|
33
|
+
}
|
|
34
|
+
return { fetch: fetchHandler, serializableChannels };
|
|
35
|
+
}
|
|
36
|
+
if (serializableChannels === undefined) {
|
|
37
|
+
return { fetch: fetchHandler, method };
|
|
38
|
+
}
|
|
39
|
+
return { fetch: fetchHandler, method, serializableChannels };
|
|
40
|
+
}
|
|
41
|
+
function getSerializableChannels(value, message) {
|
|
42
|
+
if (value === undefined) {
|
|
43
|
+
return undefined;
|
|
44
|
+
}
|
|
45
|
+
if (!Array.isArray(value)) {
|
|
46
|
+
throw new Error(message);
|
|
47
|
+
}
|
|
48
|
+
for (const entry of value) {
|
|
49
|
+
if (typeof entry !== "function") {
|
|
50
|
+
throw new Error(message);
|
|
51
|
+
}
|
|
52
|
+
if (typeof entry.kind !== "string") {
|
|
53
|
+
throw new Error(message);
|
|
54
|
+
}
|
|
31
55
|
}
|
|
32
|
-
return
|
|
56
|
+
return value;
|
|
33
57
|
}
|
|
34
58
|
//# sourceMappingURL=channel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channel.js","sourceRoot":"","sources":["../../../../src/internal/authored-definition/channel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEhG,MAAM,eAAe,GAA+B,IAAI,GAAG,CAAC;IAC1D,KAAK;IACL,MAAM;IACN,KAAK;IACL,QAAQ;IACR,OAAO;CACR,CAAC,CAAC;AAEH;;;;;;;;GAQG;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M,KAAK,SAAS,EAAE,CAAC;QACzB,IAAI,oBAAoB,KAAK,SAAS,EAAE,CAAC;YACvC,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC;QACjC,CAAC;QACD,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,oBAAoB,EAAE,CAAC;IACvD,CAAC;IAED,IAAI,oBAAoB,KAAK,SAAS,EAAE,CAAC;QACvC,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,CAAC;IACzC,CAAC;IAED,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,oBAAoB,EAAE,CAAC;AAC/D,CAAC;AAED,SAAS,uBAAuB,CAAC,KAAc,EAAE,OAAe;IAC9D,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QAC1B,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;IAC3B,CAAC;IAED,KAAK,MAAM,KAAK,IAAI,KAAK,EAAE,CAAC;QAC1B,IAAI,OAAO,KAAK,KAAK,UAAU,EAAE,CAAC;YAChC,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;QAC3B,CAAC;QAED,IAAI,OAAQ,KAAqC,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;YACpE,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;QAC3B,CAAC;IACH,CAAC;IAED,OAAO,KAAsC,CAAC;AAChD,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { McpClientConnectionDefinition } from "../../public/definitions/connections/mcp.js";
|
|
2
|
+
/**
|
|
3
|
+
* Validates one authored MCP client connection module export at build time
|
|
4
|
+
* and returns the public definition type. The module export is `unknown`
|
|
5
|
+
* because it comes from a dynamically-loaded authored file; this function
|
|
6
|
+
* bridges the gap with runtime checks so authoring errors surface during
|
|
7
|
+
* `ash build`.
|
|
8
|
+
*/
|
|
9
|
+
export declare function normalizeMcpClientConnectionDefinition(value: unknown, message: string): McpClientConnectionDefinition;
|
|
10
|
+
//# sourceMappingURL=connection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connection.d.ts","sourceRoot":"","sources":["../../../../src/internal/authored-definition/connection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,6CAA6C,CAAC;AAWjG;;;;;;GAMG;AACH,wBAAgB,sCAAsC,CACpD,KAAK,EAAE,OAAO,EACd,OAAO,EAAE,MAAM,GACd,6BAA6B,CAoC/B"}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { expectObjectRecord, expectOnlyKnownKeys } from "../authored-module.js";
|
|
2
|
+
const KNOWN_TOP_LEVEL_KEYS = ["authorization", "description", "headers", "tools", "url"];
|
|
3
|
+
const KNOWN_AUTHORIZATION_KEYS = ["token"];
|
|
4
|
+
/**
|
|
5
|
+
* Validates one authored MCP client connection module export at build time
|
|
6
|
+
* and returns the public definition type. The module export is `unknown`
|
|
7
|
+
* because it comes from a dynamically-loaded authored file; this function
|
|
8
|
+
* bridges the gap with runtime checks so authoring errors surface during
|
|
9
|
+
* `ash build`.
|
|
10
|
+
*/
|
|
11
|
+
export function normalizeMcpClientConnectionDefinition(value, message) {
|
|
12
|
+
const record = expectObjectRecord(value, message);
|
|
13
|
+
expectOnlyKnownKeys(record, KNOWN_TOP_LEVEL_KEYS, message);
|
|
14
|
+
validateUrl(record, message);
|
|
15
|
+
validateDescription(record, message);
|
|
16
|
+
const authorization = normalizeAuthorization(record, message);
|
|
17
|
+
const headers = normalizeHeaders(record, message);
|
|
18
|
+
const tools = normalizeToolFilter(record, message);
|
|
19
|
+
if (authorization !== undefined && headers !== undefined && typeof headers !== "function") {
|
|
20
|
+
const headerKeys = Object.keys(headers);
|
|
21
|
+
if (headerKeys.some((k) => k.toLowerCase() === "authorization")) {
|
|
22
|
+
throw new Error(`${message} "headers" must not include an "Authorization" key when "authorization" is also provided.`);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
const result = {
|
|
26
|
+
description: record.description,
|
|
27
|
+
url: record.url,
|
|
28
|
+
};
|
|
29
|
+
if (authorization !== undefined) {
|
|
30
|
+
result.authorization = authorization;
|
|
31
|
+
}
|
|
32
|
+
if (headers !== undefined) {
|
|
33
|
+
result.headers = headers;
|
|
34
|
+
}
|
|
35
|
+
if (tools !== undefined) {
|
|
36
|
+
result.tools = tools;
|
|
37
|
+
}
|
|
38
|
+
return result;
|
|
39
|
+
}
|
|
40
|
+
function validateUrl(record, message) {
|
|
41
|
+
if (typeof record.url !== "string" || !URL.canParse(record.url)) {
|
|
42
|
+
throw new Error(`${message} The "url" field must be a valid URL.`);
|
|
43
|
+
}
|
|
44
|
+
const parsed = new URL(record.url);
|
|
45
|
+
if (parsed.protocol !== "https:" && parsed.protocol !== "http:") {
|
|
46
|
+
throw new Error(`${message} The "url" field must use the http or https protocol, got "${parsed.protocol}".`);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
function validateDescription(record, message) {
|
|
50
|
+
if (typeof record.description !== "string" || record.description.length === 0) {
|
|
51
|
+
throw new Error(`${message} The "description" field must be a non-empty string.`);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
function normalizeAuthorization(record, message) {
|
|
55
|
+
if (record.authorization === undefined) {
|
|
56
|
+
return undefined;
|
|
57
|
+
}
|
|
58
|
+
const authorization = expectObjectRecord(record.authorization, `${message} The "authorization" field must be an object with a "token" property.`);
|
|
59
|
+
expectOnlyKnownKeys(authorization, KNOWN_AUTHORIZATION_KEYS, `${message} The "authorization" field`);
|
|
60
|
+
const { token } = authorization;
|
|
61
|
+
if (token === null || token === undefined) {
|
|
62
|
+
throw new Error(`${message} The "authorization.token" field must be a string, Promise, or function.`);
|
|
63
|
+
}
|
|
64
|
+
const tokenType = typeof token;
|
|
65
|
+
if (tokenType !== "string" && tokenType !== "function" && tokenType !== "object") {
|
|
66
|
+
throw new Error(`${message} The "authorization.token" field must be a string, Promise, or function.`);
|
|
67
|
+
}
|
|
68
|
+
if (tokenType === "string" && token.length === 0) {
|
|
69
|
+
throw new Error(`${message} The "authorization.token" field must be a non-empty string.`);
|
|
70
|
+
}
|
|
71
|
+
if (tokenType === "object" && typeof token.then !== "function") {
|
|
72
|
+
throw new Error(`${message} The "authorization.token" field must be a string, Promise, or function.`);
|
|
73
|
+
}
|
|
74
|
+
return { token: token };
|
|
75
|
+
}
|
|
76
|
+
function normalizeHeaders(record, message) {
|
|
77
|
+
if (record.headers === undefined) {
|
|
78
|
+
return undefined;
|
|
79
|
+
}
|
|
80
|
+
if (typeof record.headers === "function") {
|
|
81
|
+
return record.headers;
|
|
82
|
+
}
|
|
83
|
+
if (typeof record.headers !== "object" ||
|
|
84
|
+
record.headers === null ||
|
|
85
|
+
Array.isArray(record.headers)) {
|
|
86
|
+
throw new Error(`${message} The "headers" field must be a plain object or a function.`);
|
|
87
|
+
}
|
|
88
|
+
const headersRecord = record.headers;
|
|
89
|
+
for (const [key, val] of Object.entries(headersRecord)) {
|
|
90
|
+
const valType = typeof val;
|
|
91
|
+
if (valType !== "string" && valType !== "function" && valType !== "object") {
|
|
92
|
+
throw new Error(`${message} The "headers.${key}" value must be a string, Promise, or function.`);
|
|
93
|
+
}
|
|
94
|
+
if (valType === "object" &&
|
|
95
|
+
(val === null || typeof val.then !== "function")) {
|
|
96
|
+
throw new Error(`${message} The "headers.${key}" value must be a string, Promise, or function.`);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return headersRecord;
|
|
100
|
+
}
|
|
101
|
+
function normalizeToolFilter(record, message) {
|
|
102
|
+
if (record.tools === undefined) {
|
|
103
|
+
return undefined;
|
|
104
|
+
}
|
|
105
|
+
if (typeof record.tools !== "object" || record.tools === null || Array.isArray(record.tools)) {
|
|
106
|
+
throw new Error(`${message} The "tools" field must specify either "allow" or "block".`);
|
|
107
|
+
}
|
|
108
|
+
const toolsRecord = record.tools;
|
|
109
|
+
const hasAllow = "allow" in toolsRecord;
|
|
110
|
+
const hasBlock = "block" in toolsRecord;
|
|
111
|
+
if (hasAllow && hasBlock) {
|
|
112
|
+
throw new Error(`${message} The "tools" field must specify either "allow" or "block", not both.`);
|
|
113
|
+
}
|
|
114
|
+
if (!hasAllow && !hasBlock) {
|
|
115
|
+
throw new Error(`${message} The "tools" field must specify either "allow" or "block".`);
|
|
116
|
+
}
|
|
117
|
+
if (hasAllow) {
|
|
118
|
+
validateStringArray(toolsRecord.allow, `${message} The "tools.allow"`);
|
|
119
|
+
return { allow: toolsRecord.allow };
|
|
120
|
+
}
|
|
121
|
+
validateStringArray(toolsRecord.block, `${message} The "tools.block"`);
|
|
122
|
+
return { block: toolsRecord.block };
|
|
123
|
+
}
|
|
124
|
+
function validateStringArray(value, label) {
|
|
125
|
+
if (!Array.isArray(value)) {
|
|
126
|
+
throw new Error(`${label} field must be an array of strings.`);
|
|
127
|
+
}
|
|
128
|
+
for (let i = 0; i < value.length; i++) {
|
|
129
|
+
if (typeof value[i] !== "string") {
|
|
130
|
+
throw new Error(`${label}[${i}] must be a string.`);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
//# sourceMappingURL=connection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connection.js","sourceRoot":"","sources":["../../../../src/internal/authored-definition/connection.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEhF,MAAM,oBAAoB,GAAG,CAAC,eAAe,EAAE,aAAa,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,CAAU,CAAC;AAClG,MAAM,wBAAwB,GAAG,CAAC,OAAO,CAAU,CAAC;AAEpD;;;;;;GAMG;AACH,MAAM,UAAU,sCAAsC,CACpD,KAAc,EACd,OAAe;IAEf,MAA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AAC;IAC1F,CAAC;IAED,IAAI,QAAQ,EAAE,CAAC;QACb,mBAAmB,CAAC,WAAW,CAAC,KAAK,EAAE,GAAG,OAAO,oBAAoB,CAAC,CAAC;QACvE,OAAO,EAAE,KAAK,EAAE,WAAW,CAAC,KAA0B,EAAE,CAAC;IAC3D,CAAC;IAED,mBAAmB,CAAC,WAAW,CAAC,KAAK,EAAE,GAAG,OAAO,oBAAoB,CAAC,CAAC;IACvE,OAAO,EAAE,KAAK,EAAE,WAAW,CAAC,KAA0B,EAAE,CAAC;AAC3D,CAAC;AAED,SAAS,mBAAmB,CAAC,KAAc,EAAE,KAAa;IACxD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QAC1B,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,qCAAqC,CAAC,CAAC;IACjE,CAAC;IACD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACtC,IAAI,OAAO,KAAK,CAAC,CAAC,CAAC,KAAK,QAAQ,EAAE,CAAC;YACjC,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,IAAI,CAAC,qBAAqB,CAAC,CAAC;QACtD,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -61,7 +61,7 @@ export function expectOnlyKnownKeys(record, knownKeys, message) {
|
|
|
61
61
|
const knownKeySet = new Set(knownKeys);
|
|
62
62
|
for (const key of Object.keys(record)) {
|
|
63
63
|
if (!knownKeySet.has(key)) {
|
|
64
|
-
throw new Error(message);
|
|
64
|
+
throw new Error(`${message} Unknown key "${key}".`);
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authored-module.js","sourceRoot":"","sources":["../../../src/internal/authored-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACz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
import { rewriteGeneratedWorkflowImport, rewriteGeneratedWorkflowImports } from "./rewrite-generated-imports.js";
|
|
3
|
-
export { rewriteGeneratedWorkflowImport, rewriteGeneratedWorkflowImports };
|
|
4
2
|
/**
|
|
5
3
|
* Builds the package-owned workflow bundles used by the Nitro host.
|
|
6
4
|
*/
|
|
@@ -25,4 +23,5 @@ interface MessageWorkflowBuilderOptions {
|
|
|
25
23
|
rootDir: string;
|
|
26
24
|
watch: boolean;
|
|
27
25
|
}
|
|
26
|
+
export {};
|
|
28
27
|
//# sourceMappingURL=builder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../../../../src/internal/message/builder.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAA8C,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../../../../src/internal/message/builder.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAA8C,MAAM,oBAAoB,CAAC;AAU7F;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,WAAW;;gBAIzC,OAAO,EAAE,6BAA6B;IAuBlD,cAAuB,wBAAwB,IAAI,OAAO,CAEzD;IAEK,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IA2D5B;;;OAGG;IACG,iBAAiB,CAAC,OAAO,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAwGzF;AAED,UAAU,6BAA6B;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,8BAA8B,EAAE,MAAM,CAAC;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,OAAO,CAAC;CAChB"}
|