experimental-ash 0.2.0-alpha.9 → 0.3.0-alpha.10
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/README.md +3 -4
- package/bin/ash.d.ts +2 -2
- package/bin/ash.js +13 -4
- package/dist/src/channel/adapter.d.ts +178 -0
- package/dist/src/channel/adapter.d.ts.map +1 -0
- package/dist/src/channel/adapter.js +47 -0
- package/dist/src/channel/adapter.js.map +1 -0
- package/dist/src/channel/schedule.d.ts +3 -6
- package/dist/src/channel/schedule.d.ts.map +1 -1
- package/dist/src/channel/schedule.js +4 -10
- package/dist/src/channel/schedule.js.map +1 -1
- package/dist/src/channel/slack-adapter.d.ts +116 -0
- package/dist/src/channel/slack-adapter.d.ts.map +1 -0
- package/dist/src/channel/slack-adapter.js +594 -0
- package/dist/src/channel/slack-adapter.js.map +1 -0
- package/dist/src/channel/slack-render.d.ts +30 -0
- package/dist/src/channel/slack-render.d.ts.map +1 -0
- package/dist/src/channel/slack-render.js +244 -0
- package/dist/src/channel/slack-render.js.map +1 -0
- package/dist/src/channel/slack-state.d.ts +68 -0
- package/dist/src/channel/slack-state.d.ts.map +1 -0
- package/dist/src/channel/slack-state.js +2 -0
- package/dist/src/channel/slack-state.js.map +1 -0
- package/dist/src/channel/slack-types.d.ts +187 -0
- package/dist/src/channel/slack-types.d.ts.map +1 -0
- package/dist/src/channel/slack-types.js +2 -0
- package/dist/src/channel/slack-types.js.map +1 -0
- package/dist/src/channel/types.d.ts +135 -121
- package/dist/src/channel/types.d.ts.map +1 -1
- package/dist/src/cli/dev/environment.d.ts.map +1 -1
- package/dist/src/cli/dev/input-requests.js +1 -1
- package/dist/src/cli/dev/input-requests.js.map +1 -1
- package/dist/src/cli/dev/repl.d.ts +28 -1
- package/dist/src/cli/dev/repl.d.ts.map +1 -1
- package/dist/src/cli/dev/repl.js +547 -123
- package/dist/src/cli/dev/repl.js.map +1 -1
- package/dist/src/cli/dev/terminal.d.ts +2 -0
- package/dist/src/cli/dev/terminal.d.ts.map +1 -1
- package/dist/src/cli/dev/terminal.js +69 -3
- package/dist/src/cli/dev/terminal.js.map +1 -1
- package/dist/src/cli/run.js.map +1 -1
- package/dist/src/cli/templates/init-app/package.json +1 -1
- package/dist/src/cli/ui/output.d.ts +2 -1
- package/dist/src/cli/ui/output.d.ts.map +1 -1
- package/dist/src/cli/ui/output.js +9 -0
- package/dist/src/cli/ui/output.js.map +1 -1
- package/dist/src/client/client-error.d.ts.map +1 -1
- package/dist/src/client/client.d.ts.map +1 -1
- package/dist/src/client/index.d.ts +2 -2
- package/dist/src/client/index.d.ts.map +1 -1
- package/dist/src/client/index.js.map +1 -1
- package/dist/src/client/message-response.d.ts.map +1 -1
- package/dist/src/client/session.d.ts.map +1 -1
- package/dist/src/compiler/artifacts.d.ts +0 -1
- package/dist/src/compiler/artifacts.d.ts.map +1 -1
- package/dist/src/compiler/artifacts.js +0 -6
- package/dist/src/compiler/artifacts.js.map +1 -1
- package/dist/src/compiler/compile-agent.d.ts +6 -0
- package/dist/src/compiler/compile-agent.d.ts.map +1 -1
- package/dist/src/compiler/compile-agent.js +4 -2
- package/dist/src/compiler/compile-agent.js.map +1 -1
- package/dist/src/compiler/compile-from-memory.d.ts +84 -0
- package/dist/src/compiler/compile-from-memory.d.ts.map +1 -0
- package/dist/src/compiler/compile-from-memory.js +61 -0
- package/dist/src/compiler/compile-from-memory.js.map +1 -0
- package/dist/src/compiler/manifest.d.ts +50 -24
- package/dist/src/compiler/manifest.d.ts.map +1 -1
- package/dist/src/compiler/manifest.js +17 -3
- package/dist/src/compiler/manifest.js.map +1 -1
- package/dist/src/compiler/module-map.d.ts +9 -1
- package/dist/src/compiler/module-map.d.ts.map +1 -1
- package/dist/src/compiler/module-map.js +25 -1
- package/dist/src/compiler/module-map.js.map +1 -1
- package/dist/src/compiler/normalize-agent-config.js +4 -10
- package/dist/src/compiler/normalize-agent-config.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/compiler/normalize-sandbox.d.ts +3 -3
- package/dist/src/compiler/normalize-sandbox.js +3 -3
- package/dist/src/context/accessors.d.ts +32 -15
- package/dist/src/context/accessors.d.ts.map +1 -1
- package/dist/src/context/accessors.js +45 -29
- package/dist/src/context/accessors.js.map +1 -1
- package/dist/src/context/container.d.ts +55 -16
- package/dist/src/context/container.d.ts.map +1 -1
- package/dist/src/context/container.js +84 -16
- package/dist/src/context/container.js.map +1 -1
- package/dist/src/context/key.d.ts +48 -59
- package/dist/src/context/key.d.ts.map +1 -1
- package/dist/src/context/key.js +17 -52
- package/dist/src/context/key.js.map +1 -1
- package/dist/src/context/keys.d.ts +4 -13
- package/dist/src/context/keys.d.ts.map +1 -1
- package/dist/src/context/keys.js +13 -28
- package/dist/src/context/keys.js.map +1 -1
- package/dist/src/context/node.d.ts +2 -2
- package/dist/src/context/node.d.ts.map +1 -1
- package/dist/src/context/node.js +1 -1
- package/dist/src/context/node.js.map +1 -1
- package/dist/src/context/provider.d.ts +23 -10
- 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/sandbox.d.ts +2 -2
- package/dist/src/context/providers/sandbox.d.ts.map +1 -1
- package/dist/src/context/providers/sandbox.js +5 -3
- package/dist/src/context/providers/sandbox.js.map +1 -1
- package/dist/src/context/providers/session.d.ts +2 -2
- package/dist/src/context/providers/session.d.ts.map +1 -1
- package/dist/src/context/providers/session.js +4 -4
- package/dist/src/context/providers/session.js.map +1 -1
- package/dist/src/context/providers/skill.d.ts +2 -2
- package/dist/src/context/providers/skill.d.ts.map +1 -1
- package/dist/src/context/providers/skill.js +4 -17
- package/dist/src/context/providers/skill.js.map +1 -1
- package/dist/src/context/run-step.d.ts +9 -10
- package/dist/src/context/run-step.d.ts.map +1 -1
- package/dist/src/context/run-step.js +32 -25
- 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 +19 -0
- package/dist/src/context/seed-keys.js.map +1 -0
- package/dist/src/context/serialize.d.ts +3 -3
- package/dist/src/context/serialize.d.ts.map +1 -1
- package/dist/src/context/serialize.js +15 -4
- package/dist/src/context/serialize.js.map +1 -1
- package/dist/src/discover/connections.d.ts +49 -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 +10 -1
- package/dist/src/discover/discover-agent.d.ts.map +1 -1
- package/dist/src/discover/discover-agent.js +36 -16
- package/dist/src/discover/discover-agent.js.map +1 -1
- package/dist/src/discover/discover-subagent.d.ts +6 -0
- package/dist/src/discover/discover-subagent.d.ts.map +1 -1
- package/dist/src/discover/discover-subagent.js +27 -9
- 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 +11 -4
- package/dist/src/discover/filesystem.js.map +1 -1
- package/dist/src/discover/grammar.d.ts +43 -13
- package/dist/src/discover/grammar.d.ts.map +1 -1
- package/dist/src/discover/grammar.js +42 -27
- package/dist/src/discover/grammar.js.map +1 -1
- package/dist/src/discover/lib.d.ts +3 -4
- package/dist/src/discover/lib.d.ts.map +1 -1
- package/dist/src/discover/lib.js +3 -1
- package/dist/src/discover/lib.js.map +1 -1
- package/dist/src/discover/manifest.d.ts +41 -16
- 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/discover/markdown.d.ts +4 -2
- package/dist/src/discover/markdown.d.ts.map +1 -1
- package/dist/src/discover/markdown.js +3 -4
- package/dist/src/discover/markdown.js.map +1 -1
- package/dist/src/discover/project-source.d.ts +128 -0
- package/dist/src/discover/project-source.d.ts.map +1 -0
- package/dist/src/discover/project-source.js +153 -0
- package/dist/src/discover/project-source.js.map +1 -0
- package/dist/src/discover/project.d.ts +12 -3
- package/dist/src/discover/project.d.ts.map +1 -1
- package/dist/src/discover/project.js +34 -31
- package/dist/src/discover/project.js.map +1 -1
- package/dist/src/discover/resource-tree.d.ts +4 -2
- package/dist/src/discover/resource-tree.d.ts.map +1 -1
- package/dist/src/discover/resource-tree.js +4 -3
- package/dist/src/discover/resource-tree.js.map +1 -1
- package/dist/src/discover/sandboxes.d.ts +24 -47
- package/dist/src/discover/sandboxes.d.ts.map +1 -1
- package/dist/src/discover/sandboxes.js +102 -195
- package/dist/src/discover/sandboxes.js.map +1 -1
- package/dist/src/discover/skills.d.ts +6 -0
- package/dist/src/discover/skills.d.ts.map +1 -1
- package/dist/src/discover/skills.js +15 -29
- package/dist/src/discover/skills.js.map +1 -1
- package/dist/src/discover/system.d.ts +3 -2
- package/dist/src/discover/system.d.ts.map +1 -1
- package/dist/src/discover/system.js +2 -0
- package/dist/src/discover/system.js.map +1 -1
- package/dist/src/evals/reporters/index.js.map +1 -1
- package/dist/src/evals/runner/derive-run-facts.js.map +1 -1
- package/dist/src/evals/runner/reporters/braintrust.js.map +1 -1
- package/dist/src/evals/runner/reporters/console.d.ts.map +1 -1
- package/dist/src/execution/continuous-entry.d.ts +28 -27
- package/dist/src/execution/continuous-entry.d.ts.map +1 -1
- package/dist/src/execution/continuous-entry.js +208 -35
- 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 +35 -10
- package/dist/src/execution/continuous-runtime.js.map +1 -1
- package/dist/src/execution/node-step.d.ts.map +1 -1
- package/dist/src/execution/node-step.js +34 -20
- package/dist/src/execution/node-step.js.map +1 -1
- package/dist/src/execution/runtime-context.d.ts +8 -3
- package/dist/src/execution/runtime-context.d.ts.map +1 -1
- package/dist/src/execution/runtime-context.js +11 -7
- package/dist/src/execution/runtime-context.js.map +1 -1
- package/dist/src/execution/sandboxes/bash-tool.d.ts +20 -8
- package/dist/src/execution/sandboxes/bash-tool.d.ts.map +1 -1
- package/dist/src/execution/sandboxes/bash-tool.js +34 -10
- package/dist/src/execution/sandboxes/bash-tool.js.map +1 -1
- package/dist/src/execution/sandboxes/bindings/local.js +6 -5
- package/dist/src/execution/sandboxes/bindings/local.js.map +1 -1
- package/dist/src/execution/sandboxes/bindings/vercel.d.ts.map +1 -1
- package/dist/src/execution/sandboxes/bindings/vercel.js +55 -20
- package/dist/src/execution/sandboxes/bindings/vercel.js.map +1 -1
- package/dist/src/execution/sandboxes/ensure.d.ts +9 -8
- package/dist/src/execution/sandboxes/ensure.d.ts.map +1 -1
- package/dist/src/execution/sandboxes/ensure.js +21 -26
- package/dist/src/execution/sandboxes/ensure.js.map +1 -1
- package/dist/src/execution/sandboxes/glob-tool.d.ts +14 -6
- package/dist/src/execution/sandboxes/glob-tool.d.ts.map +1 -1
- package/dist/src/execution/sandboxes/glob-tool.js +138 -22
- package/dist/src/execution/sandboxes/glob-tool.js.map +1 -1
- package/dist/src/execution/sandboxes/grep-tool.d.ts +11 -6
- package/dist/src/execution/sandboxes/grep-tool.d.ts.map +1 -1
- package/dist/src/execution/sandboxes/grep-tool.js +137 -50
- package/dist/src/execution/sandboxes/grep-tool.js.map +1 -1
- package/dist/src/execution/sandboxes/prewarm.d.ts +1 -1
- package/dist/src/execution/sandboxes/prewarm.d.ts.map +1 -1
- package/dist/src/execution/sandboxes/prewarm.js +83 -37
- package/dist/src/execution/sandboxes/prewarm.js.map +1 -1
- package/dist/src/execution/sandboxes/read-file-tool.d.ts +4 -5
- package/dist/src/execution/sandboxes/read-file-tool.d.ts.map +1 -1
- package/dist/src/execution/sandboxes/read-file-tool.js +11 -18
- package/dist/src/execution/sandboxes/read-file-tool.js.map +1 -1
- package/dist/src/execution/sandboxes/require-sandbox.d.ts +5 -4
- package/dist/src/execution/sandboxes/require-sandbox.d.ts.map +1 -1
- package/dist/src/execution/sandboxes/require-sandbox.js +9 -8
- package/dist/src/execution/sandboxes/require-sandbox.js.map +1 -1
- package/dist/src/execution/sandboxes/ripgrep-probe.d.ts +10 -0
- package/dist/src/execution/sandboxes/ripgrep-probe.d.ts.map +1 -0
- package/dist/src/execution/sandboxes/ripgrep-probe.js +45 -0
- package/dist/src/execution/sandboxes/ripgrep-probe.js.map +1 -0
- package/dist/src/execution/sandboxes/session.d.ts +9 -0
- package/dist/src/execution/sandboxes/session.d.ts.map +1 -1
- package/dist/src/execution/sandboxes/session.js +4 -0
- package/dist/src/execution/sandboxes/session.js.map +1 -1
- package/dist/src/execution/sandboxes/truncate-output.d.ts +73 -0
- package/dist/src/execution/sandboxes/truncate-output.d.ts.map +1 -0
- package/dist/src/execution/sandboxes/truncate-output.js +111 -0
- package/dist/src/execution/sandboxes/truncate-output.js.map +1 -0
- package/dist/src/execution/sandboxes/types.d.ts +2 -3
- package/dist/src/execution/sandboxes/types.d.ts.map +1 -1
- package/dist/src/execution/sandboxes/write-file-tool.d.ts +4 -5
- package/dist/src/execution/sandboxes/write-file-tool.d.ts.map +1 -1
- package/dist/src/execution/sandboxes/write-file-tool.js +9 -13
- package/dist/src/execution/sandboxes/write-file-tool.js.map +1 -1
- package/dist/src/execution/session-snapshot.d.ts +21 -0
- package/dist/src/execution/session-snapshot.d.ts.map +1 -0
- package/dist/src/execution/session-snapshot.js +58 -0
- package/dist/src/execution/session-snapshot.js.map +1 -0
- package/dist/src/execution/session-start.d.ts +16 -0
- package/dist/src/execution/session-start.d.ts.map +1 -0
- package/dist/src/execution/session-start.js +55 -0
- package/dist/src/execution/session-start.js.map +1 -0
- package/dist/src/execution/session.d.ts +17 -13
- package/dist/src/execution/session.d.ts.map +1 -1
- package/dist/src/execution/session.js +19 -16
- 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/subagent-invocation.d.ts +11 -2
- package/dist/src/execution/subagent-invocation.d.ts.map +1 -1
- package/dist/src/execution/subagent-invocation.js.map +1 -1
- package/dist/src/execution/subagent-tool.d.ts +27 -26
- package/dist/src/execution/subagent-tool.d.ts.map +1 -1
- package/dist/src/execution/subagent-tool.js +45 -77
- package/dist/src/execution/subagent-tool.js.map +1 -1
- package/dist/src/execution/tool-compaction.js +2 -2
- package/dist/src/execution/tool-compaction.js.map +1 -1
- package/dist/src/execution/types.d.ts +3 -1
- package/dist/src/execution/types.d.ts.map +1 -1
- package/dist/src/execution/web-fetch/tool.d.ts +20 -4
- package/dist/src/execution/web-fetch/tool.d.ts.map +1 -1
- package/dist/src/execution/web-fetch/tool.js +13 -7
- package/dist/src/execution/web-fetch/tool.js.map +1 -1
- package/dist/src/execution/workflow-entry.d.ts +7 -9
- package/dist/src/execution/workflow-entry.d.ts.map +1 -1
- package/dist/src/execution/workflow-entry.js +208 -43
- 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 +6 -1
- package/dist/src/execution/workflow-runtime.js.map +1 -1
- package/dist/src/execution/workflow-steps.d.ts +20 -8
- package/dist/src/execution/workflow-steps.d.ts.map +1 -1
- package/dist/src/execution/workflow-steps.js +186 -23
- package/dist/src/execution/workflow-steps.js.map +1 -1
- package/dist/src/harness/attachment-staging.d.ts +52 -0
- package/dist/src/harness/attachment-staging.d.ts.map +1 -0
- package/dist/src/harness/attachment-staging.js +116 -0
- package/dist/src/harness/attachment-staging.js.map +1 -0
- package/dist/src/harness/compaction.d.ts +13 -9
- package/dist/src/harness/compaction.d.ts.map +1 -1
- package/dist/src/harness/compaction.js +87 -38
- package/dist/src/harness/compaction.js.map +1 -1
- package/dist/src/harness/emission.d.ts +11 -42
- package/dist/src/harness/emission.d.ts.map +1 -1
- package/dist/src/harness/emission.js +78 -237
- package/dist/src/harness/emission.js.map +1 -1
- package/dist/src/harness/execute-tool.d.ts +24 -35
- package/dist/src/harness/execute-tool.d.ts.map +1 -1
- package/dist/src/harness/execute-tool.js +1 -58
- package/dist/src/harness/execute-tool.js.map +1 -1
- package/dist/src/harness/input-requests.d.ts +2 -0
- package/dist/src/harness/input-requests.d.ts.map +1 -1
- package/dist/src/harness/input-requests.js +27 -16
- package/dist/src/harness/input-requests.js.map +1 -1
- package/dist/src/harness/instrumentation-config.d.ts +18 -0
- package/dist/src/harness/instrumentation-config.d.ts.map +1 -0
- package/dist/src/harness/instrumentation-config.js +32 -0
- package/dist/src/harness/instrumentation-config.js.map +1 -0
- package/dist/src/harness/messages.d.ts +28 -6
- package/dist/src/harness/messages.d.ts.map +1 -1
- package/dist/src/harness/messages.js +56 -11
- package/dist/src/harness/messages.js.map +1 -1
- package/dist/src/harness/otel-integration.d.ts +10 -0
- package/dist/src/harness/otel-integration.d.ts.map +1 -0
- package/dist/src/harness/otel-integration.js +19 -0
- package/dist/src/harness/otel-integration.js.map +1 -0
- package/dist/src/harness/provider-tools.js.map +1 -1
- package/dist/src/harness/runtime-actions.d.ts +106 -0
- package/dist/src/harness/runtime-actions.d.ts.map +1 -0
- package/dist/src/harness/runtime-actions.js +261 -0
- package/dist/src/harness/runtime-actions.js.map +1 -0
- package/dist/src/harness/step-hooks.d.ts +67 -0
- package/dist/src/harness/step-hooks.d.ts.map +1 -0
- package/dist/src/harness/step-hooks.js +215 -0
- package/dist/src/harness/step-hooks.js.map +1 -0
- package/dist/src/harness/tool-loop.d.ts +0 -12
- package/dist/src/harness/tool-loop.d.ts.map +1 -1
- package/dist/src/harness/tool-loop.js +409 -162
- package/dist/src/harness/tool-loop.js.map +1 -1
- package/dist/src/harness/tool-result-pruning.d.ts +40 -0
- package/dist/src/harness/tool-result-pruning.d.ts.map +1 -0
- package/dist/src/harness/tool-result-pruning.js +142 -0
- package/dist/src/harness/tool-result-pruning.js.map +1 -0
- package/dist/src/harness/tools.d.ts +12 -3
- package/dist/src/harness/tools.d.ts.map +1 -1
- package/dist/src/harness/tools.js +22 -25
- package/dist/src/harness/tools.js.map +1 -1
- package/dist/src/harness/types.d.ts +32 -15
- package/dist/src/harness/types.d.ts.map +1 -1
- package/dist/src/internal/application/compiled-artifacts.d.ts +19 -3
- package/dist/src/internal/application/compiled-artifacts.d.ts.map +1 -1
- package/dist/src/internal/application/compiled-artifacts.js +64 -41
- package/dist/src/internal/application/compiled-artifacts.js.map +1 -1
- package/dist/src/internal/application/package.d.ts +0 -4
- package/dist/src/internal/application/package.d.ts.map +1 -1
- package/dist/src/internal/application/package.js +14 -24
- package/dist/src/internal/application/package.js.map +1 -1
- package/dist/src/internal/application/paths.d.ts +6 -1
- package/dist/src/internal/application/paths.d.ts.map +1 -1
- package/dist/src/internal/application/paths.js +12 -2
- package/dist/src/internal/application/paths.js.map +1 -1
- package/dist/src/internal/attachments/data.d.ts +36 -0
- package/dist/src/internal/attachments/data.d.ts.map +1 -0
- package/dist/src/internal/attachments/data.js +192 -0
- package/dist/src/internal/attachments/data.js.map +1 -0
- package/dist/src/internal/attachments/errors.d.ts +58 -0
- package/dist/src/internal/attachments/errors.d.ts.map +1 -0
- package/dist/src/internal/attachments/errors.js +37 -0
- package/dist/src/internal/attachments/errors.js.map +1 -0
- package/dist/src/internal/attachments/refs.d.ts +88 -0
- package/dist/src/internal/attachments/refs.d.ts.map +1 -0
- package/dist/src/internal/attachments/refs.js +118 -0
- package/dist/src/internal/attachments/refs.js.map +1 -0
- 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 +5 -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 +147 -0
- package/dist/src/internal/authored-definition/connection.js.map +1 -0
- package/dist/src/internal/authored-definition/schema-backed.d.ts +3 -2
- package/dist/src/internal/authored-definition/schema-backed.d.ts.map +1 -1
- package/dist/src/internal/authored-definition/schema-backed.js.map +1 -1
- package/dist/src/internal/authored-module.d.ts.map +1 -1
- package/dist/src/internal/authored-module.js +2 -2
- package/dist/src/internal/authored-module.js.map +1 -1
- package/dist/src/internal/json-schema.d.ts +2 -1
- package/dist/src/internal/json-schema.d.ts.map +1 -1
- package/dist/src/internal/json-schema.js.map +1 -1
- package/dist/src/internal/message/builder.d.ts +9 -5
- package/dist/src/internal/message/builder.d.ts.map +1 -1
- package/dist/src/internal/message/builder.js +107 -54
- package/dist/src/internal/message/builder.js.map +1 -1
- package/dist/src/internal/message/nitro-step-entry.d.ts +18 -0
- package/dist/src/internal/message/nitro-step-entry.d.ts.map +1 -0
- package/dist/src/internal/message/nitro-step-entry.js +132 -0
- package/dist/src/internal/message/nitro-step-entry.js.map +1 -0
- package/dist/src/internal/message/vercel-workflow-output.d.ts +35 -16
- package/dist/src/internal/message/vercel-workflow-output.d.ts.map +1 -1
- package/dist/src/internal/message/vercel-workflow-output.js +314 -121
- package/dist/src/internal/message/vercel-workflow-output.js.map +1 -1
- package/dist/src/internal/nitro/host/build-application.d.ts.map +1 -1
- package/dist/src/internal/nitro/host/build-application.js +57 -20
- package/dist/src/internal/nitro/host/build-application.js.map +1 -1
- package/dist/src/internal/nitro/host/configure-message-routes.d.ts +5 -2
- package/dist/src/internal/nitro/host/configure-message-routes.d.ts.map +1 -1
- package/dist/src/internal/nitro/host/configure-message-routes.js +194 -80
- package/dist/src/internal/nitro/host/configure-message-routes.js.map +1 -1
- package/dist/src/internal/nitro/host/create-application-nitro.d.ts +9 -2
- package/dist/src/internal/nitro/host/create-application-nitro.d.ts.map +1 -1
- package/dist/src/internal/nitro/host/create-application-nitro.js +414 -29
- package/dist/src/internal/nitro/host/create-application-nitro.js.map +1 -1
- package/dist/src/internal/nitro/host/prepare-application-host.d.ts.map +1 -1
- package/dist/src/internal/nitro/host/prepare-application-host.js +0 -2
- package/dist/src/internal/nitro/host/prepare-application-host.js.map +1 -1
- package/dist/src/internal/nitro/host/start-development-server.js.map +1 -1
- package/dist/src/internal/nitro/host/types.d.ts +4 -1
- package/dist/src/internal/nitro/host/types.d.ts.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/health.d.ts.map +1 -1
- package/dist/src/internal/nitro/routes/home-page/load-home-page-data.js.map +1 -1
- package/dist/src/internal/nitro/routes/home.d.ts +0 -5
- package/dist/src/internal/nitro/routes/home.d.ts.map +1 -1
- package/dist/src/internal/nitro/routes/home.js +2 -18
- package/dist/src/internal/nitro/routes/home.js.map +1 -1
- package/dist/src/internal/nitro/routes/index.d.ts +2 -7
- package/dist/src/internal/nitro/routes/index.d.ts.map +1 -1
- package/dist/src/internal/nitro/routes/index.js +2 -19
- 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 +5 -4
- package/dist/src/internal/nitro/routes/runtime-stack.d.ts.map +1 -1
- package/dist/src/internal/nitro/routes/runtime-stack.js +7 -7
- 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 +5 -4
- package/dist/src/internal/nitro/routes/web-ui/assets/style.css +1 -1
- package/dist/src/internal/nitro/routes/workflow-data.d.ts.map +1 -1
- package/dist/src/internal/nitro/routes/workflow-route-helpers.d.ts.map +1 -1
- package/dist/src/internal/nitro/routes/workflow-run-events.d.ts.map +1 -1
- package/dist/src/internal/nitro/routes/workflow-run-steps.d.ts.map +1 -1
- package/dist/src/internal/nitro/routes/workflow-run.d.ts.map +1 -1
- package/dist/src/internal/nitro/routes/workflow-runs.d.ts.map +1 -1
- package/dist/src/internal/runtime-registry.d.ts.map +1 -1
- package/dist/src/internal/runtime-registry.js.map +1 -1
- package/dist/src/protocol/message.d.ts +117 -8
- package/dist/src/protocol/message.d.ts.map +1 -1
- package/dist/src/protocol/message.js +158 -3
- package/dist/src/protocol/message.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 +57 -16
- package/dist/src/public/channels/http.d.ts.map +1 -1
- package/dist/src/public/channels/http.js +167 -45
- package/dist/src/public/channels/http.js.map +1 -1
- package/dist/src/public/channels/index.d.ts +12 -9
- package/dist/src/public/channels/index.d.ts.map +1 -1
- package/dist/src/public/channels/index.js +10 -8
- package/dist/src/public/channels/index.js.map +1 -1
- package/dist/src/public/channels/slack/index.d.ts +86 -25
- package/dist/src/public/channels/slack/index.d.ts.map +1 -1
- package/dist/src/public/channels/slack/index.js +115 -97
- package/dist/src/public/channels/slack/index.js.map +1 -1
- package/dist/src/public/channels/slack/lowlevel.d.ts +7 -8
- package/dist/src/public/channels/slack/lowlevel.d.ts.map +1 -1
- package/dist/src/public/channels/slack/lowlevel.js +6 -7
- package/dist/src/public/channels/slack/lowlevel.js.map +1 -1
- package/dist/src/public/channels/slack/slack-interaction.d.ts +16 -0
- package/dist/src/public/channels/slack/slack-interaction.d.ts.map +1 -0
- package/dist/src/public/channels/slack/slack-interaction.js +56 -0
- package/dist/src/public/channels/slack/slack-interaction.js.map +1 -0
- package/dist/src/public/channels/upload-policy.d.ts +120 -0
- package/dist/src/public/channels/upload-policy.d.ts.map +1 -0
- package/dist/src/public/channels/upload-policy.js +179 -0
- package/dist/src/public/channels/upload-policy.js.map +1 -0
- 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/context/index.d.ts +17 -0
- package/dist/src/public/context/index.d.ts.map +1 -0
- package/dist/src/public/context/index.js +15 -0
- package/dist/src/public/context/index.js.map +1 -0
- package/dist/src/public/definitions/channel.d.ts +61 -53
- package/dist/src/public/definitions/channel.d.ts.map +1 -1
- package/dist/src/public/definitions/channel.js +24 -24
- package/dist/src/public/definitions/channel.js.map +1 -1
- package/dist/src/public/definitions/connections/mcp.d.ts +73 -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/instrumentation.d.ts +67 -0
- package/dist/src/public/definitions/instrumentation.d.ts.map +1 -0
- package/dist/src/public/definitions/instrumentation.js +32 -0
- package/dist/src/public/definitions/instrumentation.js.map +1 -0
- package/dist/src/public/definitions/sandbox.d.ts +51 -57
- package/dist/src/public/definitions/sandbox.d.ts.map +1 -1
- package/dist/src/public/definitions/sandbox.js.map +1 -1
- package/dist/src/public/definitions/tool.d.ts +92 -33
- 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/helpers/markdown.js.map +1 -1
- package/dist/src/public/index.d.ts +19 -24
- package/dist/src/public/index.d.ts.map +1 -1
- package/dist/src/public/index.js +19 -16
- package/dist/src/public/index.js.map +1 -1
- package/dist/src/public/instrumentation/index.d.ts +22 -0
- package/dist/src/public/instrumentation/index.d.ts.map +1 -0
- package/dist/src/public/instrumentation/index.js +22 -0
- package/dist/src/public/instrumentation/index.js.map +1 -0
- package/dist/src/public/sandboxes/backends/vercel.js.map +1 -1
- package/dist/src/public/sandboxes/defaults.d.ts +2 -1
- package/dist/src/public/sandboxes/defaults.d.ts.map +1 -1
- package/dist/src/public/sandboxes/defaults.js +5 -9
- package/dist/src/public/sandboxes/defaults.js.map +1 -1
- package/dist/src/public/sandboxes/index.d.ts +23 -14
- package/dist/src/public/sandboxes/index.d.ts.map +1 -1
- package/dist/src/public/sandboxes/index.js +22 -13
- package/dist/src/public/sandboxes/index.js.map +1 -1
- package/dist/src/public/sandboxes/internal.d.ts +2 -2
- package/dist/src/public/sandboxes/internal.d.ts.map +1 -1
- package/dist/src/public/sandboxes/internal.js +2 -5
- package/dist/src/public/sandboxes/internal.js.map +1 -1
- package/dist/src/public/schedules/index.d.ts +20 -0
- package/dist/src/public/schedules/index.d.ts.map +1 -0
- package/dist/src/public/schedules/index.js +20 -0
- package/dist/src/public/schedules/index.js.map +1 -0
- package/dist/src/public/skills/index.d.ts +24 -0
- package/dist/src/public/skills/index.d.ts.map +1 -0
- package/dist/src/public/skills/index.js +23 -0
- package/dist/src/public/skills/index.js.map +1 -0
- package/dist/src/public/subagents/index.d.ts +19 -0
- package/dist/src/public/subagents/index.d.ts.map +1 -0
- package/dist/src/public/subagents/index.js +19 -0
- package/dist/src/public/subagents/index.js.map +1 -0
- package/dist/src/public/system/index.d.ts +31 -0
- package/dist/src/public/system/index.d.ts.map +1 -0
- package/dist/src/public/system/index.js +31 -0
- package/dist/src/public/system/index.js.map +1 -0
- package/dist/src/public/tools/defaults.d.ts +3 -2
- package/dist/src/public/tools/defaults.d.ts.map +1 -1
- package/dist/src/public/tools/defaults.js +3 -2
- package/dist/src/public/tools/defaults.js.map +1 -1
- package/dist/src/public/tools/define-bash-tool.d.ts +10 -33
- package/dist/src/public/tools/define-bash-tool.d.ts.map +1 -1
- package/dist/src/public/tools/define-bash-tool.js +11 -28
- package/dist/src/public/tools/define-bash-tool.js.map +1 -1
- package/dist/src/public/tools/define-glob-tool.d.ts +10 -42
- package/dist/src/public/tools/define-glob-tool.d.ts.map +1 -1
- package/dist/src/public/tools/define-glob-tool.js +11 -37
- package/dist/src/public/tools/define-glob-tool.js.map +1 -1
- package/dist/src/public/tools/define-grep-tool.d.ts +10 -42
- package/dist/src/public/tools/define-grep-tool.d.ts.map +1 -1
- package/dist/src/public/tools/define-grep-tool.js +11 -37
- package/dist/src/public/tools/define-grep-tool.js.map +1 -1
- package/dist/src/public/tools/define-read-file-tool.d.ts +9 -40
- package/dist/src/public/tools/define-read-file-tool.d.ts.map +1 -1
- package/dist/src/public/tools/define-read-file-tool.js +10 -40
- package/dist/src/public/tools/define-read-file-tool.js.map +1 -1
- package/dist/src/public/tools/define-write-file-tool.d.ts +10 -40
- package/dist/src/public/tools/define-write-file-tool.d.ts.map +1 -1
- package/dist/src/public/tools/define-write-file-tool.js +11 -40
- package/dist/src/public/tools/define-write-file-tool.js.map +1 -1
- package/dist/src/public/tools/index.d.ts +1 -2
- package/dist/src/public/tools/index.d.ts.map +1 -1
- package/dist/src/public/tools/index.js.map +1 -1
- package/dist/src/public/tools/internal.d.ts +1 -1
- package/dist/src/public/tools/internal.d.ts.map +1 -1
- package/dist/src/public/tools/internal.js +2 -4
- package/dist/src/public/tools/internal.js.map +1 -1
- package/dist/src/runtime/actions/types.d.ts +28 -87
- package/dist/src/runtime/actions/types.d.ts.map +1 -1
- package/dist/src/runtime/actions/types.js +15 -104
- package/dist/src/runtime/actions/types.js.map +1 -1
- package/dist/src/runtime/agent/bootstrap-model-utils.js.map +1 -1
- package/dist/src/runtime/agent/bootstrap.d.ts +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.js +16 -12
- package/dist/src/runtime/agent/mock-model-adapter.js.map +1 -1
- package/dist/src/runtime/agent/resolve-model.js.map +1 -1
- package/dist/src/runtime/channels/registry.d.ts +26 -0
- package/dist/src/runtime/channels/registry.d.ts.map +1 -0
- package/dist/src/runtime/channels/registry.js +72 -0
- package/dist/src/runtime/channels/registry.js.map +1 -0
- package/dist/src/runtime/connections/mcp-client.d.ts +55 -0
- package/dist/src/runtime/connections/mcp-client.d.ts.map +1 -0
- package/dist/src/runtime/connections/mcp-client.js +183 -0
- package/dist/src/runtime/connections/mcp-client.js.map +1 -0
- package/dist/src/runtime/connections/registry.d.ts +39 -0
- package/dist/src/runtime/connections/registry.d.ts.map +1 -0
- package/dist/src/runtime/connections/registry.js +62 -0
- package/dist/src/runtime/connections/registry.js.map +1 -0
- package/dist/src/runtime/connections/types.d.ts +79 -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 +3 -3
- package/dist/src/runtime/framework-channels/index.d.ts.map +1 -1
- package/dist/src/runtime/framework-channels/index.js +8 -6
- package/dist/src/runtime/framework-channels/index.js.map +1 -1
- package/dist/src/runtime/framework-sandboxes/default.d.ts +2 -2
- package/dist/src/runtime/framework-sandboxes/default.js +2 -2
- package/dist/src/runtime/framework-tools/ask-question.d.ts +2 -1
- package/dist/src/runtime/framework-tools/ask-question.d.ts.map +1 -1
- package/dist/src/runtime/framework-tools/ask-question.js.map +1 -1
- package/dist/src/runtime/framework-tools/bash.d.ts +2 -1
- package/dist/src/runtime/framework-tools/bash.d.ts.map +1 -1
- package/dist/src/runtime/framework-tools/bash.js +1 -2
- package/dist/src/runtime/framework-tools/bash.js.map +1 -1
- package/dist/src/runtime/framework-tools/connection-search.d.ts +63 -0
- package/dist/src/runtime/framework-tools/connection-search.d.ts.map +1 -0
- package/dist/src/runtime/framework-tools/connection-search.js +163 -0
- package/dist/src/runtime/framework-tools/connection-search.js.map +1 -0
- package/dist/src/runtime/framework-tools/connection-tools.d.ts +32 -0
- package/dist/src/runtime/framework-tools/connection-tools.d.ts.map +1 -0
- package/dist/src/runtime/framework-tools/connection-tools.js +72 -0
- package/dist/src/runtime/framework-tools/connection-tools.js.map +1 -0
- package/dist/src/runtime/framework-tools/file-state.d.ts +5 -11
- package/dist/src/runtime/framework-tools/file-state.d.ts.map +1 -1
- package/dist/src/runtime/framework-tools/file-state.js +6 -13
- package/dist/src/runtime/framework-tools/file-state.js.map +1 -1
- package/dist/src/runtime/framework-tools/glob.d.ts +2 -1
- package/dist/src/runtime/framework-tools/glob.d.ts.map +1 -1
- package/dist/src/runtime/framework-tools/glob.js +1 -2
- package/dist/src/runtime/framework-tools/glob.js.map +1 -1
- package/dist/src/runtime/framework-tools/grep.d.ts +2 -1
- package/dist/src/runtime/framework-tools/grep.d.ts.map +1 -1
- package/dist/src/runtime/framework-tools/grep.js +1 -2
- package/dist/src/runtime/framework-tools/grep.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 +7 -1
- package/dist/src/runtime/framework-tools/index.js.map +1 -1
- package/dist/src/runtime/framework-tools/read-file.d.ts +2 -1
- package/dist/src/runtime/framework-tools/read-file.d.ts.map +1 -1
- package/dist/src/runtime/framework-tools/read-file.js +1 -2
- package/dist/src/runtime/framework-tools/read-file.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 +18 -14
- 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 +5 -7
- package/dist/src/runtime/framework-tools/todo.js.map +1 -1
- package/dist/src/runtime/framework-tools/web-fetch.js +1 -1
- package/dist/src/runtime/framework-tools/web-fetch.js.map +1 -1
- package/dist/src/runtime/framework-tools/write-file.d.ts +2 -1
- package/dist/src/runtime/framework-tools/write-file.d.ts.map +1 -1
- package/dist/src/runtime/framework-tools/write-file.js +1 -2
- package/dist/src/runtime/framework-tools/write-file.js.map +1 -1
- package/dist/src/runtime/input/types.d.ts +3 -3
- package/dist/src/runtime/loaders/artifact-paths.d.ts +0 -1
- package/dist/src/runtime/loaders/artifact-paths.d.ts.map +1 -1
- package/dist/src/runtime/loaders/artifact-paths.js +0 -1
- package/dist/src/runtime/loaders/artifact-paths.js.map +1 -1
- package/dist/src/runtime/loaders/bundled-artifacts.d.ts +8 -3
- package/dist/src/runtime/loaders/bundled-artifacts.d.ts.map +1 -1
- package/dist/src/runtime/loaders/bundled-artifacts.js +13 -8
- package/dist/src/runtime/loaders/bundled-artifacts.js.map +1 -1
- package/dist/src/runtime/loaders/compile-metadata.d.ts.map +1 -1
- package/dist/src/runtime/loaders/manifest.d.ts.map +1 -1
- package/dist/src/runtime/loaders/module-map.d.ts.map +1 -1
- package/dist/src/runtime/loaders/module-map.js +1 -40
- 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 +17 -0
- 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 +24 -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 +30 -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 +10 -11
- 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 +72 -0
- package/dist/src/runtime/resolve-connection.js.map +1 -0
- package/dist/src/runtime/resolve-helpers.d.ts.map +1 -1
- package/dist/src/runtime/resolve-helpers.js.map +1 -1
- package/dist/src/runtime/resolve-tool.d.ts +7 -2
- package/dist/src/runtime/resolve-tool.d.ts.map +1 -1
- package/dist/src/runtime/resolve-tool.js +69 -27
- package/dist/src/runtime/resolve-tool.js.map +1 -1
- package/dist/src/runtime/sandboxes/keys.d.ts +8 -0
- package/dist/src/runtime/sandboxes/keys.d.ts.map +1 -1
- package/dist/src/runtime/sandboxes/keys.js +10 -2
- package/dist/src/runtime/sandboxes/keys.js.map +1 -1
- package/dist/src/runtime/sandboxes/registry.d.ts +20 -24
- package/dist/src/runtime/sandboxes/registry.d.ts.map +1 -1
- package/dist/src/runtime/sandboxes/registry.js +10 -13
- package/dist/src/runtime/sandboxes/registry.js.map +1 -1
- package/dist/src/runtime/schedules/register.d.ts.map +1 -1
- package/dist/src/runtime/schedules/register.js.map +1 -1
- package/dist/src/runtime/schedules/resolve-schedule.d.ts.map +1 -1
- package/dist/src/runtime/schedules/resolve-schedule.js.map +1 -1
- package/dist/src/runtime/sessions/auth.d.ts +3 -3
- package/dist/src/runtime/sessions/compiled-agent-cache.d.ts +9 -1
- package/dist/src/runtime/sessions/compiled-agent-cache.d.ts.map +1 -1
- package/dist/src/runtime/sessions/compiled-agent-cache.js +34 -13
- package/dist/src/runtime/sessions/compiled-agent-cache.js.map +1 -1
- package/dist/src/runtime/sessions/runtime-session.d.ts +75 -0
- package/dist/src/runtime/sessions/runtime-session.d.ts.map +1 -0
- package/dist/src/runtime/sessions/runtime-session.js +79 -0
- package/dist/src/runtime/sessions/runtime-session.js.map +1 -0
- package/dist/src/runtime/sessions/turn.d.ts +2 -2
- package/dist/src/runtime/sessions/turn.d.ts.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/subagents/registry.js.map +1 -1
- package/dist/src/runtime/tools/registry.js.map +1 -1
- package/dist/src/runtime/types.d.ts +73 -34
- package/dist/src/runtime/types.d.ts.map +1 -1
- package/dist/src/runtime/workspace/spec.d.ts.map +1 -1
- package/dist/src/runtime/workspace/spec.js +4 -6
- package/dist/src/runtime/workspace/spec.js.map +1 -1
- package/dist/src/runtime/workspace/types.d.ts +7 -24
- package/dist/src/runtime/workspace/types.d.ts.map +1 -1
- package/dist/src/runtime/workspace/types.js +6 -18
- package/dist/src/runtime/workspace/types.js.map +1 -1
- package/dist/src/services/dev-client/send-message.d.ts +1 -0
- package/dist/src/services/dev-client/send-message.d.ts.map +1 -1
- package/dist/src/services/dev-client/send-message.js +4 -0
- package/dist/src/services/dev-client/send-message.js.map +1 -1
- package/dist/src/services/dev-client/session.js.map +1 -1
- package/dist/src/services/host.js.map +1 -1
- package/dist/src/{runtime → shared}/json.d.ts +15 -3
- package/dist/src/shared/json.d.ts.map +1 -0
- package/dist/src/shared/json.js +157 -0
- package/dist/src/shared/json.js.map +1 -0
- package/dist/src/shared/optional.d.ts +2 -0
- package/dist/src/shared/optional.d.ts.map +1 -0
- package/dist/src/shared/optional.js +2 -0
- package/dist/src/shared/optional.js.map +1 -0
- package/dist/src/shared/source-metadata.d.ts +16 -0
- package/dist/src/shared/source-metadata.d.ts.map +1 -0
- package/dist/src/shared/source-metadata.js +2 -0
- package/dist/src/shared/source-metadata.js.map +1 -0
- package/dist/src/shared/tool-definition.d.ts +27 -0
- package/dist/src/shared/tool-definition.d.ts.map +1 -0
- package/dist/src/shared/tool-definition.js +2 -0
- package/dist/src/shared/tool-definition.js.map +1 -0
- package/docs/external-agent-protocol.md +26 -18
- package/docs/internals/README.md +2 -0
- package/docs/internals/channels.md +33 -24
- package/docs/internals/compiler-and-artifacts.md +7 -2
- package/docs/internals/context.md +153 -57
- package/docs/internals/discovery.md +22 -18
- package/docs/internals/message-runtime.md +19 -9
- package/docs/internals/testing.md +238 -0
- package/docs/public/README.md +3 -4
- package/docs/public/agent-ts.md +9 -1
- package/docs/public/auth-and-route-protection.md +11 -7
- package/docs/public/channels/README.md +124 -13
- package/docs/public/channels/attachments.md +167 -0
- package/docs/public/cli-build-and-debugging.md +0 -1
- package/docs/public/context-control.md +11 -8
- package/docs/public/getting-started.md +11 -2
- package/docs/public/human-in-the-loop.md +9 -12
- package/docs/public/instrumentation.md +73 -0
- package/docs/public/project-layout.md +32 -31
- package/docs/public/runs-and-streaming.md +14 -4
- package/docs/public/sandboxes.md +105 -161
- package/docs/public/session-context.md +173 -16
- package/docs/public/skills.md +30 -6
- package/docs/public/subagents.md +28 -8
- package/docs/public/tools.md +107 -66
- package/docs/public/typescript-api.md +79 -35
- package/docs/public/vercel-deployment.md +11 -10
- package/docs/public/workspace.md +23 -42
- package/package.json +78 -35
- 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 -18
- package/dist/src/channel/http-emitter.d.ts.map +0 -1
- package/dist/src/channel/http-emitter.js +0 -26
- package/dist/src/channel/http-emitter.js.map +0 -1
- package/dist/src/channel/schedule-emitter.d.ts +0 -17
- package/dist/src/channel/schedule-emitter.d.ts.map +0 -1
- package/dist/src/channel/schedule-emitter.js +0 -25
- package/dist/src/channel/schedule-emitter.js.map +0 -1
- package/dist/src/channel/slack-emitter.d.ts +0 -67
- package/dist/src/channel/slack-emitter.d.ts.map +0 -1
- package/dist/src/channel/slack-emitter.js +0 -282
- package/dist/src/channel/slack-emitter.js.map +0 -1
- package/dist/src/channel/subagent-emitter.d.ts +0 -42
- package/dist/src/channel/subagent-emitter.d.ts.map +0 -1
- package/dist/src/channel/subagent-emitter.js +0 -56
- package/dist/src/channel/subagent-emitter.js.map +0 -1
- package/dist/src/compiler/runtime-api-types.d.ts +0 -14
- package/dist/src/compiler/runtime-api-types.d.ts.map +0 -1
- package/dist/src/compiler/runtime-api-types.js +0 -43
- package/dist/src/compiler/runtime-api-types.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/harness/tool-schema.d.ts +0 -13
- package/dist/src/harness/tool-schema.d.ts.map +0 -1
- package/dist/src/harness/tool-schema.js +0 -33
- package/dist/src/harness/tool-schema.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/workflow-flow.d.ts +0 -8
- package/dist/src/internal/nitro/routes/workflow-flow.d.ts.map +0 -1
- package/dist/src/internal/nitro/routes/workflow-flow.js +0 -9
- package/dist/src/internal/nitro/routes/workflow-flow.js.map +0 -1
- package/dist/src/internal/nitro/routes/workflow-generated-handler.d.ts +0 -10
- package/dist/src/internal/nitro/routes/workflow-generated-handler.d.ts.map +0 -1
- package/dist/src/internal/nitro/routes/workflow-generated-handler.js +0 -30
- package/dist/src/internal/nitro/routes/workflow-generated-handler.js.map +0 -1
- package/dist/src/internal/nitro/routes/workflow-step.d.ts +0 -8
- package/dist/src/internal/nitro/routes/workflow-step.d.ts.map +0 -1
- package/dist/src/internal/nitro/routes/workflow-step.js +0 -9
- package/dist/src/internal/nitro/routes/workflow-step.js.map +0 -1
- package/dist/src/internal/nitro/routes/workflow-webhook.d.ts +0 -8
- package/dist/src/internal/nitro/routes/workflow-webhook.d.ts.map +0 -1
- package/dist/src/internal/nitro/routes/workflow-webhook.js +0 -9
- package/dist/src/internal/nitro/routes/workflow-webhook.js.map +0 -1
- 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/framework-tools/sandbox-targeting.d.ts +0 -56
- package/dist/src/runtime/framework-tools/sandbox-targeting.d.ts.map +0 -1
- package/dist/src/runtime/framework-tools/sandbox-targeting.js +0 -88
- package/dist/src/runtime/framework-tools/sandbox-targeting.js.map +0 -1
- package/dist/src/runtime/json.d.ts.map +0 -1
- package/dist/src/runtime/json.js +0 -55
- package/dist/src/runtime/json.js.map +0 -1
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ You author an agent as a directory on disk. The directory is the contract:
|
|
|
7
7
|
- `system.md` and `system/` define always-on instructions
|
|
8
8
|
- `skills/` define optional procedures
|
|
9
9
|
- `tools/` define typed executable integrations
|
|
10
|
-
- `
|
|
10
|
+
- `sandbox/` overrides the agent's single sandbox (optional) and seeds workspace files
|
|
11
11
|
- `channels/` define message ingress and delivery
|
|
12
12
|
- `subagents/` define specialist child agents
|
|
13
13
|
- `schedules/` define recurring jobs
|
|
@@ -22,7 +22,7 @@ The framework package is `experimental-ash`. The CLI binary is `ash`.
|
|
|
22
22
|
- TypeScript where typed runtime behavior matters
|
|
23
23
|
- Durable message runs and follow-up turns
|
|
24
24
|
- Inspectable compiled artifacts under `.ash/`
|
|
25
|
-
-
|
|
25
|
+
- Per-agent sandbox with optional authored overrides
|
|
26
26
|
- A stable HTTP protocol with explicit `continuationToken` and `runId` contracts
|
|
27
27
|
- A runtime model that keeps channels, harnesses, and workflow execution separate
|
|
28
28
|
|
|
@@ -51,7 +51,7 @@ my-agent/
|
|
|
51
51
|
├── system/
|
|
52
52
|
├── skills/
|
|
53
53
|
├── tools/
|
|
54
|
-
├──
|
|
54
|
+
├── sandbox/
|
|
55
55
|
├── channels/
|
|
56
56
|
├── subagents/
|
|
57
57
|
├── schedules/
|
|
@@ -128,4 +128,3 @@ Start here:
|
|
|
128
128
|
- [`packages/ash/README.md`](packages/ash/README.md) is the package-facing overview
|
|
129
129
|
- [`skills/agent/SKILL.md`](skills/agent/SKILL.md) is the app-authoring skill
|
|
130
130
|
- [`skills/framework/SKILL.md`](skills/framework/SKILL.md) is the internals skill
|
|
131
|
-
|
package/bin/ash.d.ts
CHANGED
|
@@ -15,9 +15,9 @@ export interface BootstrapOptions {
|
|
|
15
15
|
packageRoot?: string;
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* Absolute path to the
|
|
18
|
+
* Absolute path to the tsgo CLI entrypoint used for bootstrap builds.
|
|
19
19
|
*/
|
|
20
|
-
|
|
20
|
+
tsgoCliPath?: string;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
export interface BootstrapCommandOptions {
|
package/bin/ash.js
CHANGED
|
@@ -18,7 +18,7 @@ function createBootstrapOptions(overrides = {}) {
|
|
|
18
18
|
copyAssetsScriptPath:
|
|
19
19
|
overrides.copyAssetsScriptPath ?? resolve(packageRoot, "scripts", "copy-static-assets.mjs"),
|
|
20
20
|
packageRoot,
|
|
21
|
-
|
|
21
|
+
tsgoCliPath: overrides.tsgoCliPath,
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
24
|
|
|
@@ -105,8 +105,17 @@ function inputTsconfigPath({ packageRoot }) {
|
|
|
105
105
|
return resolve(packageRoot, "tsconfig.json");
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
function
|
|
109
|
-
|
|
108
|
+
function resolveTsgoCliPath({ tsgoCliPath }) {
|
|
109
|
+
if (tsgoCliPath) {
|
|
110
|
+
return tsgoCliPath;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// The `@typescript/native-preview` package only exports `./package.json`
|
|
114
|
+
// in its `exports` map, so `require.resolve("@typescript/native-preview/bin/tsgo.js")`
|
|
115
|
+
// fails with ERR_PACKAGE_PATH_NOT_EXPORTED. Resolve the package.json
|
|
116
|
+
// (which is exported) and join to the binary path manually.
|
|
117
|
+
const packageJsonPath = require.resolve("@typescript/native-preview/package.json");
|
|
118
|
+
return resolve(dirname(packageJsonPath), "bin", "tsgo.js");
|
|
110
119
|
}
|
|
111
120
|
|
|
112
121
|
async function runCommand(command, args, options) {
|
|
@@ -174,7 +183,7 @@ export async function ensureBuiltCli(overrides = {}, dependencies = {}) {
|
|
|
174
183
|
|
|
175
184
|
await executeCommand(
|
|
176
185
|
process.execPath,
|
|
177
|
-
[
|
|
186
|
+
[resolveTsgoCliPath({ tsgoCliPath: options.tsgoCliPath }), "-p", "tsconfig.json"],
|
|
178
187
|
{
|
|
179
188
|
cwd: options.packageRoot,
|
|
180
189
|
},
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import type { ContextAccessor } from "../context/key.js";
|
|
2
|
+
import type { ContextProvider } from "../context/provider.js";
|
|
3
|
+
import type { StepInput } from "../harness/types.js";
|
|
4
|
+
import type { AttachmentRef } from "../internal/attachments/refs.js";
|
|
5
|
+
import type { HandleMessageStreamEvent } from "../protocol/message.js";
|
|
6
|
+
import type { DeliverPayload } from "./types.js";
|
|
7
|
+
/**
|
|
8
|
+
* Context available to every adapter handler (`deliver` and event handlers).
|
|
9
|
+
*
|
|
10
|
+
* `state` is a mutable reference to the adapter's durable state. The runtime
|
|
11
|
+
* auto-snapshots it at step boundaries — no manual `serialize()` needed.
|
|
12
|
+
*
|
|
13
|
+
* `ctx` provides read/write access to durable context keys (the same
|
|
14
|
+
* {@link ContextAccessor} that tools and providers use).
|
|
15
|
+
*/
|
|
16
|
+
export interface ChannelAdapterContext<TState = Record<string, unknown>> {
|
|
17
|
+
/**
|
|
18
|
+
* Mutable adapter state. Auto-serialized at step boundaries via
|
|
19
|
+
* JSON snapshot. The adapter reads and writes this directly.
|
|
20
|
+
*/
|
|
21
|
+
state: TState;
|
|
22
|
+
/**
|
|
23
|
+
* Read/write access to durable context keys. Seed keys here for tools
|
|
24
|
+
* to read during the turn.
|
|
25
|
+
*/
|
|
26
|
+
readonly ctx: ContextAccessor;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Extracts the `data` field type from a stream event by its `type` discriminant.
|
|
30
|
+
* Events that carry no `data` field (e.g. `session.completed`) resolve to `undefined`.
|
|
31
|
+
*/
|
|
32
|
+
type EventData<T extends HandleMessageStreamEvent["type"]> = Extract<HandleMessageStreamEvent, {
|
|
33
|
+
type: T;
|
|
34
|
+
}> extends {
|
|
35
|
+
data: infer D;
|
|
36
|
+
} ? D : undefined;
|
|
37
|
+
/**
|
|
38
|
+
* A single outbound event handler. Receives the event's `data` (not the full
|
|
39
|
+
* envelope) and the adapter context. Void return — side effects only.
|
|
40
|
+
*/
|
|
41
|
+
type EventHandler<T extends HandleMessageStreamEvent["type"], TCtx extends ChannelAdapterContext<any> = ChannelAdapterContext> = (data: EventData<T>, ctx: TCtx) => void | Promise<void>;
|
|
42
|
+
/**
|
|
43
|
+
* Map of outbound event handlers keyed by event type. The adapter declares
|
|
44
|
+
* handlers for the event types it cares about. For undeclared types, the
|
|
45
|
+
* route's base layer (e.g. `slackRoute`) runs default behavior.
|
|
46
|
+
*/
|
|
47
|
+
export type ChannelEventHandlers<TCtx extends ChannelAdapterContext<any> = ChannelAdapterContext> = {
|
|
48
|
+
[K in HandleMessageStreamEvent["type"]]?: EventHandler<K, TCtx>;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Channel-owned resolver that turns an opaque {@link AttachmentRef} back
|
|
52
|
+
* into raw bytes.
|
|
53
|
+
*
|
|
54
|
+
* Attachment refs are the wire format channels use to carry inbound
|
|
55
|
+
* file identity across step boundaries without inlining the payload
|
|
56
|
+
* (inline bytes trip the Vercel Queue 8 KB per-field multipart cap).
|
|
57
|
+
* A channel that ingests file attachments must provide a resolver so
|
|
58
|
+
* the staging layer can re-fetch the bytes on demand at turn time.
|
|
59
|
+
*
|
|
60
|
+
* The resolver is called once per inbound file per turn, inside a
|
|
61
|
+
* workflow step boundary. It has full Node access and can reach any
|
|
62
|
+
* credential the adapter captured at construction time via closure
|
|
63
|
+
* (route options, adapter state, env-derived tokens, etc.).
|
|
64
|
+
*
|
|
65
|
+
* Throw {@link import("../internal/attachments/errors.js").AshAttachmentError}
|
|
66
|
+
* to surface structured failures to observability. Uncategorized
|
|
67
|
+
* throws are wrapped as `resolver-threw` by the staging dispatch.
|
|
68
|
+
*/
|
|
69
|
+
export interface AttachmentResolver {
|
|
70
|
+
resolve(ref: AttachmentRef): Promise<Buffer>;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Plain-object adapter that replaces the `Channel` abstract class.
|
|
74
|
+
*
|
|
75
|
+
* An adapter carries:
|
|
76
|
+
* - `kind`: stable durable identifier (like the old static `Channel.kind`)
|
|
77
|
+
* - `state`: initial state shape, auto-serialized at step boundaries
|
|
78
|
+
* - `deliver`: inbound hook (side effects + optional message transform)
|
|
79
|
+
* - Event handlers: outbound, keyed by event type name
|
|
80
|
+
* - `contextProviders`: optional per-step virtual providers
|
|
81
|
+
*
|
|
82
|
+
* Adapters are created via `defineSlackAdapter`, `defineHttpAdapter`, or
|
|
83
|
+
* directly as plain objects. They are NOT classes — no inheritance, no
|
|
84
|
+
* `serialize()`, no constructor rehydration.
|
|
85
|
+
*/
|
|
86
|
+
export type ChannelAdapter<TCtx extends ChannelAdapterContext<any> = ChannelAdapterContext> = {
|
|
87
|
+
/**
|
|
88
|
+
* Stable durable identifier for serialization across step boundaries.
|
|
89
|
+
* Must be unique across all adapters visible to one runtime bundle.
|
|
90
|
+
*
|
|
91
|
+
* Optional — defaults to `"http"` for httpRoute, `"slack"` for slackRoute,
|
|
92
|
+
* or derived from the route file path.
|
|
93
|
+
*/
|
|
94
|
+
readonly kind?: string;
|
|
95
|
+
/**
|
|
96
|
+
* Initial state shape. Auto-serialized at step boundaries via JSON
|
|
97
|
+
* snapshot. On rehydration, the runtime restores the serialized state
|
|
98
|
+
* and re-attaches the adapter's behavior functions from the registry.
|
|
99
|
+
*/
|
|
100
|
+
readonly state?: Record<string, unknown>;
|
|
101
|
+
/**
|
|
102
|
+
* Inbound hook: fires once per delivery before the harness starts.
|
|
103
|
+
*
|
|
104
|
+
* Side effects (context seeding, thread refresh, custom interactions)
|
|
105
|
+
* plus optional message transformation. Return a string to override the
|
|
106
|
+
* message the model sees. Return void to use the original payload message.
|
|
107
|
+
*
|
|
108
|
+
* For Slack adapters, the route's base layer runs AFTER this:
|
|
109
|
+
* 1. Resolves HITL against the ORIGINAL payload.message (not the
|
|
110
|
+
* returned string). Matched inputResponses go to the harness and
|
|
111
|
+
* the return value is ignored.
|
|
112
|
+
* 2. If no HITL to resolve, uses the returned string (or
|
|
113
|
+
* payload.message if void), prepends user context, and produces
|
|
114
|
+
* the StepInput for the harness.
|
|
115
|
+
*/
|
|
116
|
+
deliver?(payload: DeliverPayload, ctx: TCtx): StepInput | void | Promise<StepInput | void>;
|
|
117
|
+
/**
|
|
118
|
+
* Optional per-step virtual providers attached to this adapter.
|
|
119
|
+
*
|
|
120
|
+
* The runtime rebuilds these providers after deliver on every step for
|
|
121
|
+
* sessions using this adapter. Replaces the static `contextProviders`
|
|
122
|
+
* field on the old `ChannelClass` interface.
|
|
123
|
+
*/
|
|
124
|
+
readonly contextProviders?: readonly ContextProvider<unknown>[];
|
|
125
|
+
/**
|
|
126
|
+
* Optional factory that builds the adapter context for this adapter.
|
|
127
|
+
*
|
|
128
|
+
* The runtime calls this before invoking `deliver` or event handlers.
|
|
129
|
+
* Default returns a bare `ChannelAdapterContext`. Slack adapters override
|
|
130
|
+
* this to return a `SlackAdapterContext` with `ctx.slack`.
|
|
131
|
+
*
|
|
132
|
+
* @internal — set by `createSlackBaseAdapter`, not authored by users.
|
|
133
|
+
*/
|
|
134
|
+
readonly createAdapterContext?: (base: ChannelAdapterContext) => ChannelAdapterContext;
|
|
135
|
+
/**
|
|
136
|
+
* Optional resolver that turns an opaque {@link AttachmentRef}
|
|
137
|
+
* produced by this adapter into raw bytes.
|
|
138
|
+
*
|
|
139
|
+
* Channels that produce `FilePart`s whose `data` is an
|
|
140
|
+
* `ash-attachment:` URL must declare a resolver here so the
|
|
141
|
+
* staging layer can re-fetch the bytes at turn time. Channels that
|
|
142
|
+
* never emit refs (test adapters, framework `http` / `schedule` /
|
|
143
|
+
* `subagent` pass-throughs) omit it.
|
|
144
|
+
*
|
|
145
|
+
* Attachment resolvers are stateless handlers — all state (bot
|
|
146
|
+
* tokens, API credentials, cache) lives on the adapter and is
|
|
147
|
+
* captured by closure at construction time. Do not store
|
|
148
|
+
* per-resolve state on the handler.
|
|
149
|
+
*/
|
|
150
|
+
readonly attachments?: AttachmentResolver;
|
|
151
|
+
} & ChannelEventHandlers<TCtx>;
|
|
152
|
+
/**
|
|
153
|
+
* Produces the default {@link StepInput} when no custom adapter `deliver`
|
|
154
|
+
* hook is defined.
|
|
155
|
+
*
|
|
156
|
+
* Passes through both `message` and `inputResponses` from the delivery
|
|
157
|
+
* payload so tool-approval responses (and other HITL replies) reach the
|
|
158
|
+
* harness even when the channel has no bespoke deliver logic.
|
|
159
|
+
*/
|
|
160
|
+
export declare function defaultDeliverResult(payload: DeliverPayload): StepInput | undefined;
|
|
161
|
+
/**
|
|
162
|
+
* Returns the durable kind for an adapter, falling back to `"unknown"`.
|
|
163
|
+
*/
|
|
164
|
+
export declare function getAdapterKind(adapter: ChannelAdapter): string;
|
|
165
|
+
/**
|
|
166
|
+
* Returns the adapter's context providers, defaulting to an empty array.
|
|
167
|
+
*/
|
|
168
|
+
export declare function getAdapterContextProviders(adapter: ChannelAdapter): readonly ContextProvider<unknown>[];
|
|
169
|
+
/**
|
|
170
|
+
* Calls an adapter's event handler for a given event. Returns the event
|
|
171
|
+
* unchanged (adapters don't transform events — they perform side effects).
|
|
172
|
+
*
|
|
173
|
+
* If the adapter doesn't declare a handler for the event type, this is a
|
|
174
|
+
* no-op and returns the event as-is.
|
|
175
|
+
*/
|
|
176
|
+
export declare function callAdapterEventHandler(adapter: ChannelAdapter, event: HandleMessageStreamEvent, ctx: ChannelAdapterContext): Promise<HandleMessageStreamEvent>;
|
|
177
|
+
export {};
|
|
178
|
+
//# sourceMappingURL=adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../src/channel/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AACvE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAMjD;;;;;;;;GAQG;AACH,MAAM,WAAW,qBAAqB,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACrE;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,QAAQ,CAAC,GAAG,EAAE,eAAe,CAAC;CAC/B;AAMD;;;GAGG;AACH,KAAK,SAAS,CAAC,CAAC,SAAS,wBAAwB,CAAC,MAAM,CAAC,IACvD,OAAO,CAAC,wBAAwB,EAAE;IAAE,IAAI,EAAE,CAAC,CAAA;CAAE,CAAC,SAAS;IAAE,IAAI,EAAE,MAAM,CAAC,CAAA;CAAE,GAAG,CAAC,GAAG,SAAS,CAAC;AAE3F;;;GAGG;AACH,KAAK,YAAY,CACf,CAAC,SAAS,wBAAwB,CAAC,MAAM,CAAC,EAC1C,IAAI,SAAS,qBAAqB,CAAC,GAAG,CAAC,GAAG,qBAAqB,IAC7D,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,IAAI,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AAE5D;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,CAAC,IAAI,SAAS,qBAAqB,CAAC,GAAG,CAAC,GAAG,qBAAqB,IAC9F;KACG,CAAC,IAAI,wBAAwB,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC,EAAE,IAAI,CAAC;CAChE,CAAC;AAMJ;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,WAAW,kBAAkB;IACjC,OAAO,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAC9C;AAMD;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,cAAc,CAAC,IAAI,SAAS,qBAAqB,CAAC,GAAG,CAAC,GAAG,qBAAqB,IAAI;IAC5F;;;;;;OAMG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAEvB;;;;OAIG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEzC;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,CAAC,OAAO,EAAE,cAAc,EAAE,GAAG,EAAE,IAAI,GAAG,SAAS,GAAG,IAAI,GAAG,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC;IAE3F;;;;;;OAMG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,SAAS,eAAe,CAAC,OAAO,CAAC,EAAE,CAAC;IAEhE;;;;;;;;OAQG;IACH,QAAQ,CAAC,oBAAoB,CAAC,EAAE,CAAC,IAAI,EAAE,qBAAqB,KAAK,qBAAqB,CAAC;IAEvF;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,kBAAkB,CAAC;CAC3C,GAAG,oBAAoB,CAAC,IAAI,CAAC,CAAC;AAM/B;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,cAAc,GAAG,SAAS,GAAG,SAAS,CAUnF;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,cAAc,GAAG,MAAM,CAE9D;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,cAAc,GACtB,SAAS,eAAe,CAAC,OAAO,CAAC,EAAE,CAErC;AAED;;;;;;GAMG;AACH,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,cAAc,EACvB,KAAK,EAAE,wBAAwB,EAC/B,GAAG,EAAE,qBAAqB,GACzB,OAAO,CAAC,wBAAwB,CAAC,CAUnC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// ---------------------------------------------------------------------------
|
|
2
|
+
// Helpers
|
|
3
|
+
// ---------------------------------------------------------------------------
|
|
4
|
+
/**
|
|
5
|
+
* Produces the default {@link StepInput} when no custom adapter `deliver`
|
|
6
|
+
* hook is defined.
|
|
7
|
+
*
|
|
8
|
+
* Passes through both `message` and `inputResponses` from the delivery
|
|
9
|
+
* payload so tool-approval responses (and other HITL replies) reach the
|
|
10
|
+
* harness even when the channel has no bespoke deliver logic.
|
|
11
|
+
*/
|
|
12
|
+
export function defaultDeliverResult(payload) {
|
|
13
|
+
if (payload.message !== undefined) {
|
|
14
|
+
return { inputResponses: payload.inputResponses, message: payload.message };
|
|
15
|
+
}
|
|
16
|
+
if (payload.inputResponses !== undefined && payload.inputResponses.length > 0) {
|
|
17
|
+
return { inputResponses: payload.inputResponses };
|
|
18
|
+
}
|
|
19
|
+
return undefined;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Returns the durable kind for an adapter, falling back to `"unknown"`.
|
|
23
|
+
*/
|
|
24
|
+
export function getAdapterKind(adapter) {
|
|
25
|
+
return adapter.kind ?? "unknown";
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Returns the adapter's context providers, defaulting to an empty array.
|
|
29
|
+
*/
|
|
30
|
+
export function getAdapterContextProviders(adapter) {
|
|
31
|
+
return adapter.contextProviders ?? [];
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Calls an adapter's event handler for a given event. Returns the event
|
|
35
|
+
* unchanged (adapters don't transform events — they perform side effects).
|
|
36
|
+
*
|
|
37
|
+
* If the adapter doesn't declare a handler for the event type, this is a
|
|
38
|
+
* no-op and returns the event as-is.
|
|
39
|
+
*/
|
|
40
|
+
export async function callAdapterEventHandler(adapter, event, ctx) {
|
|
41
|
+
const handler = adapter[event.type];
|
|
42
|
+
if (handler !== undefined) {
|
|
43
|
+
await handler("data" in event ? event.data : undefined, ctx);
|
|
44
|
+
}
|
|
45
|
+
return event;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=adapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapter.js","sourceRoot":"","sources":["../../../src/channel/adapter.ts"],"names":[],"mappings":"AAqLA,8EAA8E;AAC9E,UAAU;AACV,8EAA8E;AAE9E;;;;;;;GAOG;AACH,MAAM,UAAU,oBAAoB,CAAC,OAAuB;IAC1D,IAAI,OAAO,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;QAClC,OAAO,EAAE,cAAc,EAAE,OAAO,CAAC,cAAc,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,CAAC;IAC9E,CAAC;IAED,IAAI,OAAO,CAAC,cAAc,KAAK,SAAS,IAAI,OAAO,CAAC,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC9E,OAAO,EAAE,cAAc,EAAE,OAAO,CAAC,cAAc,EAAE,CAAC;IACpD,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,OAAuB;IACpD,OAAO,OAAO,CAAC,IAAI,IAAI,SAAS,CAAC;AACnC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,0BAA0B,CACxC,OAAuB;IAEvB,OAAO,OAAO,CAAC,gBAAgB,IAAI,EAAE,CAAC;AACxC,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,OAAuB,EACvB,KAA+B,EAC/B,GAA0B;IAE1B,MAAM,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAErB,CAAC;IAEd,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC1B,MAAM,OAAO,CAAC,MAAM,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;IAC/D,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { ScheduleChannelEmitter } from "./schedule-emitter.js";
|
|
2
1
|
import type { RunHandle, Runtime } from "./types.js";
|
|
3
|
-
export { ScheduleChannelEmitter } from "./schedule-emitter.js";
|
|
4
2
|
/**
|
|
5
3
|
* Input for triggering a one-shot schedule run.
|
|
6
4
|
*/
|
|
@@ -9,23 +7,22 @@ export interface ScheduleTriggerInput {
|
|
|
9
7
|
readonly scheduleId: string;
|
|
10
8
|
}
|
|
11
9
|
/**
|
|
12
|
-
*
|
|
10
|
+
* Dispatcher for one-shot scheduled task execution.
|
|
13
11
|
*
|
|
14
12
|
* Each trigger generates a unique continuation token so every cron
|
|
15
13
|
* invocation starts a fresh session. Schedule runs always use task
|
|
16
14
|
* mode, so the runtime requires the harness to finish within the
|
|
17
15
|
* current invocation instead of parking for follow-up messages.
|
|
18
16
|
*
|
|
19
|
-
* The
|
|
17
|
+
* The dispatcher never touches the compiled bundle, the {@link AshContext},
|
|
20
18
|
* or any execution-layer machinery — it speaks to the runtime through
|
|
21
19
|
* `run` and `deliver` only.
|
|
22
20
|
*/
|
|
23
|
-
export declare class
|
|
21
|
+
export declare class ScheduleDispatcher {
|
|
24
22
|
private readonly runtime;
|
|
25
23
|
constructor(config: {
|
|
26
24
|
readonly runtime: Runtime;
|
|
27
25
|
});
|
|
28
|
-
createEmitter(): ScheduleChannelEmitter;
|
|
29
26
|
trigger(input: ScheduleTriggerInput): Promise<RunHandle>;
|
|
30
27
|
}
|
|
31
28
|
//# sourceMappingURL=schedule.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schedule.d.ts","sourceRoot":"","sources":["../../../src/channel/schedule.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"schedule.d.ts","sourceRoot":"","sources":["../../../src/channel/schedule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,OAAO,EAAsB,MAAM,YAAY,CAAC;AAEzE;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;;;;;;GAWG;AACH,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAU;IAElC,YAAY,MAAM,EAAE;QAAE,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;KAAE,EAEhD;IAEK,OAAO,CAAC,KAAK,EAAE,oBAAoB,GAAG,OAAO,CAAC,SAAS,CAAC,CAS7D;CACF"}
|
|
@@ -1,34 +1,28 @@
|
|
|
1
|
-
import { ScheduleChannelEmitter } from "./schedule-emitter.js";
|
|
2
|
-
export { ScheduleChannelEmitter } from "./schedule-emitter.js";
|
|
3
1
|
/**
|
|
4
|
-
*
|
|
2
|
+
* Dispatcher for one-shot scheduled task execution.
|
|
5
3
|
*
|
|
6
4
|
* Each trigger generates a unique continuation token so every cron
|
|
7
5
|
* invocation starts a fresh session. Schedule runs always use task
|
|
8
6
|
* mode, so the runtime requires the harness to finish within the
|
|
9
7
|
* current invocation instead of parking for follow-up messages.
|
|
10
8
|
*
|
|
11
|
-
* The
|
|
9
|
+
* The dispatcher never touches the compiled bundle, the {@link AshContext},
|
|
12
10
|
* or any execution-layer machinery — it speaks to the runtime through
|
|
13
11
|
* `run` and `deliver` only.
|
|
14
12
|
*/
|
|
15
|
-
export class
|
|
13
|
+
export class ScheduleDispatcher {
|
|
16
14
|
runtime;
|
|
17
15
|
constructor(config) {
|
|
18
16
|
this.runtime = config.runtime;
|
|
19
17
|
}
|
|
20
|
-
createEmitter() {
|
|
21
|
-
return new ScheduleChannelEmitter();
|
|
22
|
-
}
|
|
23
18
|
async trigger(input) {
|
|
24
19
|
const continuationToken = `schedule:${input.scheduleId}:${crypto.randomUUID()}`;
|
|
25
20
|
return await this.runtime.run({
|
|
21
|
+
adapter: { kind: "schedule" },
|
|
26
22
|
auth: createScheduleAuthContext(input.scheduleId),
|
|
27
|
-
channelEmitter: this.createEmitter(),
|
|
28
23
|
continuationToken,
|
|
29
24
|
input: { message: input.markdown },
|
|
30
25
|
mode: "task",
|
|
31
|
-
sessionId: crypto.randomUUID(),
|
|
32
26
|
});
|
|
33
27
|
}
|
|
34
28
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schedule.js","sourceRoot":"","sources":["../../../src/channel/schedule.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"schedule.js","sourceRoot":"","sources":["../../../src/channel/schedule.ts"],"names":[],"mappings":"AAUA;;;;;;;;;;;GAWG;AACH,MAAM,OAAO,kBAAkB;IACZ,OAAO,CAAU;IAElC,YAAY,MAAqC;QAC/C,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;IAChC,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,KAA2B;QACvC,MAAM,iBAAiB,GAAG,YAAY,KAAK,CAAC,UAAU,IAAI,MAAM,CAAC,UAAU,EAAE,EAAE,CAAC;QAChF,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC;YAC5B,OAAO,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE;YAC7B,IAAI,EAAE,yBAAyB,CAAC,KAAK,CAAC,UAAU,CAAC;YACjD,iBAAiB;YACjB,KAAK,EAAE,EAAE,OAAO,EAAE,KAAK,CAAC,QAAQ,EAAE;YAClC,IAAI,EAAE,MAAM;SACb,CAAC,CAAC;IACL,CAAC;CACF;AAED,SAAS,yBAAyB,CAAC,UAAkB;IACnD,OAAO;QACL,UAAU,EAAE,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE;QAC3C,aAAa,EAAE,UAAU;QACzB,MAAM,EAAE,iBAAiB;QACzB,WAAW,EAAE,gBAAgB,UAAU,EAAE;QACzC,aAAa,EAAE,SAAS;QACxB,OAAO,EAAE,UAAU;KACpB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Slack adapter context, base layer, and factory.
|
|
3
|
+
*
|
|
4
|
+
* The Slack adapter context extends the generic ChannelAdapterContext with
|
|
5
|
+
* a `slack` handle for Slack thread operations. The base layer provides
|
|
6
|
+
* default Slack behaviors (typing, posting, HITL cards) that user adapters
|
|
7
|
+
* can override per event type.
|
|
8
|
+
*/
|
|
9
|
+
import type { FilePart } from "ai";
|
|
10
|
+
import { type UploadPolicy } from "../public/channels/upload-policy.js";
|
|
11
|
+
import type { ChannelAdapter, ChannelAdapterContext } from "./adapter.js";
|
|
12
|
+
import type { SlackUserContext } from "./slack-state.js";
|
|
13
|
+
import type { SlackInteraction, SlackRenderable, SlackThreadMessage } from "./slack-types.js";
|
|
14
|
+
/**
|
|
15
|
+
* Extended adapter context for Slack adapters. Provides a `slack` handle
|
|
16
|
+
* for posting messages, editing messages, typing indicators, and reading
|
|
17
|
+
* thread history.
|
|
18
|
+
*
|
|
19
|
+
* Constructed by the slack base layer before calling user adapter handlers.
|
|
20
|
+
*/
|
|
21
|
+
export interface SlackAdapterContext<TState = Record<string, unknown>> extends ChannelAdapterContext<TState> {
|
|
22
|
+
readonly slack: SlackHandle;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Platform handle for Slack operations. Injected into the adapter context
|
|
26
|
+
* by the slack base layer.
|
|
27
|
+
*/
|
|
28
|
+
export interface SlackHandle {
|
|
29
|
+
/** Post a renderable (markdown or card) to the thread. */
|
|
30
|
+
post(renderable: SlackRenderable): Promise<void>;
|
|
31
|
+
/** Edit an existing message by timestamp. */
|
|
32
|
+
editMessage(ts: string, renderable: SlackRenderable): Promise<void>;
|
|
33
|
+
/** Show a typing indicator with the given status text. */
|
|
34
|
+
startTyping(status: string): Promise<void>;
|
|
35
|
+
/** Refresh thread messages from Slack. */
|
|
36
|
+
refresh(): Promise<void>;
|
|
37
|
+
/** Get recent thread messages (call refresh first). */
|
|
38
|
+
listRecentMessages(): Promise<readonly SlackThreadMessage[]>;
|
|
39
|
+
/** Slack channel ID. */
|
|
40
|
+
readonly channelId: string;
|
|
41
|
+
/** Chat SDK thread ID. */
|
|
42
|
+
readonly threadId: string;
|
|
43
|
+
/** Thread root timestamp. */
|
|
44
|
+
readonly threadTs?: string;
|
|
45
|
+
/** Workspace ID. */
|
|
46
|
+
readonly teamId?: string;
|
|
47
|
+
/** User context from the inbound mention. */
|
|
48
|
+
readonly userContext?: SlackUserContext;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Creates a Slack adapter that wraps a user adapter with default Slack
|
|
52
|
+
* behaviors. User handlers override defaults per event type.
|
|
53
|
+
*
|
|
54
|
+
* Default behaviors (run when user adapter doesn't declare the event):
|
|
55
|
+
* - turn.started: startTyping("Thinking...")
|
|
56
|
+
* - actions.requested: startTyping("Running tool1, tool2...")
|
|
57
|
+
* - message.completed: post(message) or buffer for typing status
|
|
58
|
+
* - session.failed: post("Something went wrong.")
|
|
59
|
+
* - input.requested: render HITL Block Kit cards + store pendingRequests
|
|
60
|
+
*/
|
|
61
|
+
export declare function createSlackBaseAdapter(input: {
|
|
62
|
+
readonly userAdapter?: ChannelAdapter<any>;
|
|
63
|
+
readonly slackState: Record<string, unknown>;
|
|
64
|
+
/**
|
|
65
|
+
* Effective upload policy for inbound Slack attachments. The Slack
|
|
66
|
+
* base layer filters disallowed parts out of the `FilePart` array
|
|
67
|
+
* before it reaches the harness; violations are logged and dropped
|
|
68
|
+
* rather than surfaced as an error so the text turn still goes
|
|
69
|
+
* through. Defaults to {@link DEFAULT_UPLOAD_POLICY}.
|
|
70
|
+
*/
|
|
71
|
+
readonly uploadPolicy?: UploadPolicy;
|
|
72
|
+
}): ChannelAdapter;
|
|
73
|
+
/**
|
|
74
|
+
* Creates a SlackHandle from the Chat SDK thread, lazily initialized.
|
|
75
|
+
*
|
|
76
|
+
* The Chat SDK imports happen dynamically to avoid bundler issues (same
|
|
77
|
+
* pattern as the old SlackChannel.getThread()).
|
|
78
|
+
*/
|
|
79
|
+
export declare function createSlackHandle(input: {
|
|
80
|
+
readonly botToken?: string;
|
|
81
|
+
readonly serializedThread: unknown;
|
|
82
|
+
readonly userContext?: SlackUserContext;
|
|
83
|
+
}): SlackHandle;
|
|
84
|
+
/**
|
|
85
|
+
* Maps Slack button clicks and select menus to HITL input responses.
|
|
86
|
+
*
|
|
87
|
+
* Buttons encode `requestId` as the button `value` and `optionId` as the
|
|
88
|
+
* `actionId`. Selects encode `requestId` as the `actionId` (prefixed with
|
|
89
|
+
* `select_`) and `optionId` as the `selectedOptionId`.
|
|
90
|
+
*
|
|
91
|
+
* Returns input responses, or an empty array when no actions could be mapped.
|
|
92
|
+
*/
|
|
93
|
+
export declare function deriveInputResponsesFromInteraction(interaction: SlackInteraction): readonly import("../runtime/input/types.js").InputResponse[];
|
|
94
|
+
/**
|
|
95
|
+
* Defines a Slack adapter. Validates the shape and returns the adapter
|
|
96
|
+
* unchanged so it can be passed to `slackRoute({ adapter })`.
|
|
97
|
+
*
|
|
98
|
+
* This is a convenience — you can also pass a plain object literal.
|
|
99
|
+
*/
|
|
100
|
+
export declare function defineSlackAdapter<TState extends object = Record<string, unknown>>(adapter: ChannelAdapter<SlackAdapterContext<TState>>): ChannelAdapter<SlackAdapterContext<TState>>;
|
|
101
|
+
/**
|
|
102
|
+
* Converts attachments on the most recent non-bot thread message into
|
|
103
|
+
* AI SDK `FilePart`s. Audio and video parts are skipped by default;
|
|
104
|
+
* failed byte fetches are silently dropped so a broken upload never
|
|
105
|
+
* prevents the text turn from going through.
|
|
106
|
+
*
|
|
107
|
+
* `uploadPolicy` filters out parts that exceed the size cap or fall
|
|
108
|
+
* outside the media-type allowlist. Dropped attachments emit a warning
|
|
109
|
+
* so operators can observe policy rejections without the turn failing.
|
|
110
|
+
*
|
|
111
|
+
* Exported so `slackRoute`'s new-session path can inject attachments on
|
|
112
|
+
* the initial bot mention (which goes through `agent.run`, bypassing
|
|
113
|
+
* the adapter's `deliver` hook).
|
|
114
|
+
*/
|
|
115
|
+
export declare function collectFilePartsFromMessages(messages: readonly SlackThreadMessage[], uploadPolicy?: UploadPolicy): Promise<FilePart[]>;
|
|
116
|
+
//# sourceMappingURL=slack-adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slack-adapter.d.ts","sourceRoot":"","sources":["../../../src/channel/slack-adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAyB,MAAM,IAAI,CAAC;AAM1D,OAAO,EAIL,KAAK,YAAY,EAClB,MAAM,qCAAqC,CAAC;AAE7C,OAAO,KAAK,EAEV,cAAc,EACd,qBAAqB,EAEtB,MAAM,cAAc,CAAC;AAUtB,OAAO,KAAK,EAAuB,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAC9E,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EAEf,kBAAkB,EACnB,MAAM,kBAAkB,CAAC;AAO1B;;;;;;GAMG;AACH,MAAM,WAAW,mBAAmB,CAClC,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAChC,SAAQ,qBAAqB,CAAC,MAAM,CAAC;IACrC,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;CAC7B;AAED;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,0DAA0D;IAC1D,IAAI,CAAC,UAAU,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD,6CAA6C;IAC7C,WAAW,CAAC,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACpE,0DAA0D;IAC1D,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3C,0CAA0C;IAC1C,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACzB,uDAAuD;IACvD,kBAAkB,IAAI,OAAO,CAAC,SAAS,kBAAkB,EAAE,CAAC,CAAC;IAC7D,wBAAwB;IACxB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,0BAA0B;IAC1B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,6BAA6B;IAC7B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,oBAAoB;IACpB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,6CAA6C;IAC7C,QAAQ,CAAC,WAAW,CAAC,EAAE,gBAAgB,CAAC;CACzC;AAsDD;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE;IAC5C,QAAQ,CAAC,WAAW,CAAC,EAAE,cAAc,CAAC,GAAG,CAAC,CAAC;IAC3C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC7C;;;;;;OAMG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,YAAY,CAAC;CACtC,GAAG,cAAc,CAoTjB;AAMD;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE;IACvC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAC;IACnC,QAAQ,CAAC,WAAW,CAAC,EAAE,gBAAgB,CAAC;CACzC,GAAG,WAAW,CA8Fd;AAMD;;;;;;;;GAQG;AACH,wBAAgB,mCAAmC,CACjD,WAAW,EAAE,gBAAgB,GAC5B,SAAS,OAAO,2BAA2B,EAAE,aAAa,EAAE,CA6B9D;AAUD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,SAAS,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChF,OAAO,EAAE,cAAc,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC,GACnD,cAAc,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC,CAE7C;AAiDD;;;;;;;;;;;;;GAaG;AACH,wBAAsB,4BAA4B,CAChD,QAAQ,EAAE,SAAS,kBAAkB,EAAE,EACvC,YAAY,GAAE,YAAoC,GACjD,OAAO,CAAC,QAAQ,EAAE,CAAC,CAMrB"}
|