experimental-ash 0.3.0-alpha.8 → 0.4.0-alpha.1
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 -0
- package/bin/ash.d.ts +5 -0
- package/bin/ash.js +30 -0
- package/dist/docs/internals/README.md +34 -0
- package/dist/docs/internals/compiler-and-artifacts.md +52 -0
- package/dist/docs/internals/context.md +100 -0
- package/dist/docs/internals/core-beliefs.md +71 -0
- package/dist/docs/internals/discovery.md +55 -0
- package/dist/docs/internals/hooks.md +202 -0
- package/dist/docs/internals/mechanical-invariants.md +151 -0
- package/dist/docs/internals/message-runtime.md +60 -0
- package/dist/docs/internals/testing.md +68 -0
- package/{docs → dist/docs}/public/README.md +14 -12
- package/{docs → dist/docs}/public/agent-ts.md +38 -6
- package/{docs → dist/docs}/public/auth-and-route-protection.md +4 -1
- package/{docs → dist/docs}/public/channels/README.md +21 -1
- package/dist/docs/public/channels/attachments.md +219 -0
- package/dist/docs/public/channels/slack.md +182 -0
- package/{docs → dist/docs}/public/cli-build-and-debugging.md +4 -1
- package/dist/docs/public/connections.md +182 -0
- package/{docs → dist/docs}/public/context-control.md +6 -2
- package/{docs → dist/docs}/public/evals.md +70 -10
- package/{docs → dist/docs}/public/getting-started.md +35 -27
- package/dist/docs/public/hooks.md +236 -0
- package/{docs → dist/docs}/public/human-in-the-loop.md +4 -1
- package/{docs → dist/docs}/public/instrumentation.md +11 -7
- package/dist/docs/public/meta.json +31 -0
- package/{docs → dist/docs}/public/project-layout.md +42 -21
- package/{docs → dist/docs}/public/runs-and-streaming.md +5 -5
- package/{docs/public/sandboxes.md → dist/docs/public/sandbox.md} +146 -49
- package/dist/docs/public/schedules.md +135 -0
- package/{docs → dist/docs}/public/session-context.md +9 -5
- package/{docs → dist/docs}/public/skills.md +4 -1
- package/{docs → dist/docs}/public/subagents.md +33 -17
- package/{docs → dist/docs}/public/tools.md +15 -11
- package/{docs → dist/docs}/public/typescript-api.md +26 -17
- package/{docs → dist/docs}/public/vercel-deployment.md +6 -3
- package/{docs → dist/docs}/public/workspace.md +7 -4
- package/dist/src/channel/adapter-context.d.ts +8 -0
- package/dist/src/channel/adapter-context.d.ts.map +1 -0
- package/dist/src/channel/adapter-context.js +19 -0
- package/dist/src/channel/adapter-context.js.map +1 -0
- package/dist/src/channel/adapter.d.ts +63 -34
- package/dist/src/channel/adapter.d.ts.map +1 -1
- package/dist/src/channel/adapter.js +15 -3
- package/dist/src/channel/adapter.js.map +1 -1
- package/dist/src/channel/resolve-text.d.ts +1 -1
- package/dist/src/channel/resolve-text.d.ts.map +1 -1
- package/dist/src/channel/schedule.d.ts +14 -11
- package/dist/src/channel/schedule.d.ts.map +1 -1
- package/dist/src/channel/schedule.js +32 -26
- package/dist/src/channel/schedule.js.map +1 -1
- package/dist/src/channel/slack-adapter.d.ts +129 -84
- package/dist/src/channel/slack-adapter.d.ts.map +1 -1
- package/dist/src/channel/slack-adapter.js +361 -232
- package/dist/src/channel/slack-adapter.js.map +1 -1
- package/dist/src/channel/slack-render.d.ts +27 -24
- package/dist/src/channel/slack-render.d.ts.map +1 -1
- package/dist/src/channel/slack-render.js +108 -211
- package/dist/src/channel/slack-render.js.map +1 -1
- package/dist/src/channel/slack-state.d.ts +23 -21
- package/dist/src/channel/slack-state.d.ts.map +1 -1
- package/dist/src/channel/slack-types.d.ts +19 -151
- package/dist/src/channel/slack-types.d.ts.map +1 -1
- package/dist/src/channel/types.d.ts +84 -91
- package/dist/src/channel/types.d.ts.map +1 -1
- package/dist/src/chunks/chunk-2BCVGULU.js +37 -0
- package/dist/src/chunks/chunk-2BCVGULU.js.map +7 -0
- package/dist/src/chunks/chunk-35LANRWR.js +87 -0
- package/dist/src/chunks/chunk-35LANRWR.js.map +7 -0
- package/dist/src/chunks/chunk-3G5VE3NT.js +3480 -0
- package/dist/src/chunks/chunk-3G5VE3NT.js.map +7 -0
- package/dist/src/chunks/chunk-5DCBVGNU.js +61 -0
- package/dist/src/chunks/chunk-5DCBVGNU.js.map +7 -0
- package/dist/src/chunks/chunk-5MZKUEVL.js +106 -0
- package/dist/src/chunks/chunk-5MZKUEVL.js.map +7 -0
- package/dist/src/chunks/chunk-A7Q4YIKU.js +203 -0
- package/dist/src/chunks/chunk-A7Q4YIKU.js.map +7 -0
- package/dist/src/chunks/chunk-AFK4DTZH.js +35 -0
- package/dist/src/chunks/chunk-AFK4DTZH.js.map +7 -0
- package/dist/src/chunks/chunk-AL5YANUC.js +89 -0
- package/dist/src/chunks/chunk-AL5YANUC.js.map +7 -0
- package/dist/src/chunks/chunk-APDYQG3O.js +15 -0
- package/dist/src/chunks/chunk-APDYQG3O.js.map +7 -0
- package/dist/src/chunks/chunk-BMHAGZOU.js +35 -0
- package/dist/src/chunks/chunk-BMHAGZOU.js.map +7 -0
- package/dist/src/chunks/chunk-CCLHYHJ7.js +2362 -0
- package/dist/src/chunks/chunk-CCLHYHJ7.js.map +7 -0
- package/dist/src/chunks/chunk-CRDH75PY.js +80 -0
- package/dist/src/chunks/chunk-CRDH75PY.js.map +7 -0
- package/dist/src/chunks/chunk-CWTR3RAI.js +28838 -0
- package/dist/src/chunks/chunk-CWTR3RAI.js.map +7 -0
- package/dist/src/chunks/chunk-DB7AV7FN.js +44 -0
- package/dist/src/chunks/chunk-DB7AV7FN.js.map +7 -0
- package/dist/src/chunks/chunk-E7IAIRUB.js +169 -0
- package/dist/src/chunks/chunk-E7IAIRUB.js.map +7 -0
- package/dist/src/chunks/chunk-ECF5WPI3.js +133 -0
- package/dist/src/chunks/chunk-ECF5WPI3.js.map +7 -0
- package/dist/src/chunks/chunk-GJL2PGSX.js +61 -0
- package/dist/src/chunks/chunk-GJL2PGSX.js.map +7 -0
- package/dist/src/chunks/chunk-HDY67XYG.js +34344 -0
- package/dist/src/chunks/chunk-HDY67XYG.js.map +7 -0
- package/dist/src/chunks/chunk-HV3FCU6O.js +592 -0
- package/dist/src/chunks/chunk-HV3FCU6O.js.map +7 -0
- package/dist/src/chunks/chunk-IM3GMMPU.js +29 -0
- package/dist/src/chunks/chunk-IM3GMMPU.js.map +7 -0
- package/dist/src/chunks/chunk-KCXGTLFG.js +229 -0
- package/dist/src/chunks/chunk-KCXGTLFG.js.map +7 -0
- package/dist/src/chunks/chunk-LCRB4QVX.js +27 -0
- package/dist/src/chunks/chunk-LCRB4QVX.js.map +7 -0
- package/dist/src/chunks/chunk-OB3GWKHC.js +52 -0
- package/dist/src/chunks/chunk-OB3GWKHC.js.map +7 -0
- package/dist/src/chunks/chunk-OOUH2UZR.js +546 -0
- package/dist/src/chunks/chunk-OOUH2UZR.js.map +7 -0
- package/dist/src/chunks/chunk-OR2PYMRV.js +35 -0
- package/dist/src/chunks/chunk-OR2PYMRV.js.map +7 -0
- package/dist/src/chunks/chunk-P22MMFUP.js +33 -0
- package/dist/src/chunks/chunk-P22MMFUP.js.map +7 -0
- package/dist/src/chunks/chunk-QDAXXJW5.js +131 -0
- package/dist/src/chunks/chunk-QDAXXJW5.js.map +7 -0
- package/dist/src/chunks/chunk-QUZBDAM5.js +76 -0
- package/dist/src/chunks/chunk-QUZBDAM5.js.map +7 -0
- package/dist/src/chunks/chunk-SQI7OWK2.js +184 -0
- package/dist/src/chunks/chunk-SQI7OWK2.js.map +7 -0
- package/dist/src/chunks/chunk-TP5TFXAL.js +203 -0
- package/dist/src/chunks/chunk-TP5TFXAL.js.map +7 -0
- package/dist/src/chunks/chunk-TY5REWC3.js +44 -0
- package/dist/src/chunks/chunk-TY5REWC3.js.map +7 -0
- package/dist/src/chunks/chunk-UQPZY6ZZ.js +3493 -0
- package/dist/src/chunks/chunk-UQPZY6ZZ.js.map +7 -0
- package/dist/src/chunks/chunk-UVQANAMB.js +117 -0
- package/dist/src/chunks/chunk-UVQANAMB.js.map +7 -0
- package/dist/src/chunks/chunk-V3ZR2VJX.js +81 -0
- package/dist/src/chunks/chunk-V3ZR2VJX.js.map +7 -0
- package/dist/src/chunks/chunk-VAOZLYCZ.js +738 -0
- package/dist/src/chunks/chunk-VAOZLYCZ.js.map +7 -0
- package/dist/src/chunks/chunk-XIS5VWUF.js +16 -0
- package/dist/src/chunks/chunk-XIS5VWUF.js.map +7 -0
- package/dist/src/chunks/chunk-YTRI464Y.js +15 -0
- package/dist/src/chunks/chunk-YTRI464Y.js.map +7 -0
- package/dist/src/chunks/chunk-ZCQU2IQJ.js +85 -0
- package/dist/src/chunks/chunk-ZCQU2IQJ.js.map +7 -0
- package/dist/src/chunks/dev-authored-source-watcher-6DWYULJ5.js +2968 -0
- package/dist/src/chunks/dev-authored-source-watcher-6DWYULJ5.js.map +7 -0
- package/dist/src/chunks/host-U4XVGNYJ.js +20 -0
- package/dist/src/chunks/host-U4XVGNYJ.js.map +7 -0
- package/dist/src/chunks/just-bash-GRSOFQHN.js +69989 -0
- package/dist/src/chunks/just-bash-GRSOFQHN.js.map +7 -0
- package/dist/src/chunks/token-APS2CB5L.js +71 -0
- package/dist/src/chunks/token-APS2CB5L.js.map +7 -0
- package/dist/src/chunks/token-util-5UM65FIP.js +7 -0
- package/dist/src/chunks/token-util-5UM65FIP.js.map +7 -0
- package/dist/src/cli/commands/info.js +228 -160
- package/dist/src/cli/commands/info.js.map +7 -1
- package/dist/src/cli/commands/init.d.ts.map +1 -1
- package/dist/src/cli/commands/init.js +92 -76
- package/dist/src/cli/commands/init.js.map +7 -1
- package/dist/src/cli/dev/environment.d.ts.map +1 -1
- package/dist/src/cli/dev/environment.js +12 -31
- package/dist/src/cli/dev/environment.js.map +7 -1
- package/dist/src/cli/dev/input-requests.d.ts +3 -3
- package/dist/src/cli/dev/input-requests.d.ts.map +1 -1
- package/dist/src/cli/dev/input-requests.js +15 -165
- package/dist/src/cli/dev/input-requests.js.map +7 -1
- package/dist/src/cli/dev/input.js +9 -31
- package/dist/src/cli/dev/input.js.map +7 -1
- package/dist/src/cli/dev/repl.d.ts +29 -3
- package/dist/src/cli/dev/repl.d.ts.map +1 -1
- package/dist/src/cli/dev/repl.js +1050 -855
- package/dist/src/cli/dev/repl.js.map +7 -1
- package/dist/src/cli/dev/terminal.js +9 -180
- package/dist/src/cli/dev/terminal.js.map +7 -1
- package/dist/src/cli/dev/url.js +9 -27
- package/dist/src/cli/dev/url.js.map +7 -1
- package/dist/src/cli/run.d.ts +32 -5
- package/dist/src/cli/run.d.ts.map +1 -1
- package/dist/src/cli/run.js +236 -199
- package/dist/src/cli/run.js.map +7 -1
- package/dist/src/cli/templates/init-app/agent/agent.ts +1 -2
- package/dist/src/cli/templates/init-app/agent/system.md +1 -1
- package/dist/src/cli/templates/init-app/agent/tools/hello.ts +12 -0
- package/dist/src/cli/templates/init-app/package.json +1 -0
- package/dist/src/cli/ui/output.js +18 -93
- package/dist/src/cli/ui/output.js.map +7 -1
- package/dist/src/client/client.d.ts +2 -41
- package/dist/src/client/client.d.ts.map +1 -1
- package/dist/src/client/client.js +13 -45
- package/dist/src/client/client.js.map +1 -1
- package/dist/src/client/index.d.ts +9 -9
- package/dist/src/client/index.d.ts.map +1 -1
- package/dist/src/client/index.js +6 -6
- package/dist/src/client/index.js.map +1 -1
- package/dist/src/client/message-response.d.ts +2 -16
- package/dist/src/client/message-response.d.ts.map +1 -1
- package/dist/src/client/message-response.js +1 -15
- package/dist/src/client/message-response.js.map +1 -1
- package/dist/src/client/ndjson.d.ts +1 -1
- package/dist/src/client/ndjson.d.ts.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 +3 -3
- package/dist/src/client/open-stream.js.map +1 -1
- package/dist/src/client/session-utils.d.ts +2 -2
- package/dist/src/client/session-utils.d.ts.map +1 -1
- package/dist/src/client/session-utils.js +1 -1
- package/dist/src/client/session-utils.js.map +1 -1
- package/dist/src/client/session.d.ts +3 -22
- package/dist/src/client/session.d.ts.map +1 -1
- package/dist/src/client/session.js +7 -26
- package/dist/src/client/session.js.map +1 -1
- package/dist/src/client/types.d.ts +15 -40
- package/dist/src/client/types.d.ts.map +1 -1
- package/dist/src/compiled/@ai-sdk/provider/LICENSE +13 -0
- package/dist/src/compiled/@ai-sdk/provider/index.d.ts +1 -0
- package/dist/src/compiled/@ai-sdk/provider/index.js +411 -0
- package/dist/src/compiled/@ai-sdk/provider/index.js.map +7 -0
- package/dist/src/compiled/@ai-sdk/provider/package.json +7 -0
- package/dist/src/compiled/@standard-schema/spec/LICENSE +21 -0
- package/dist/src/compiled/@standard-schema/spec/index.d.ts +66 -0
- package/dist/src/compiled/@standard-schema/spec/index.js +1 -0
- package/dist/src/compiled/@standard-schema/spec/package.json +7 -0
- package/dist/src/compiled/jose/LICENSE.md +21 -0
- package/dist/src/compiled/jose/index.d.ts +40 -0
- package/dist/src/compiled/jose/index.js +3782 -0
- package/dist/src/compiled/jose/index.js.map +7 -0
- package/dist/src/compiled/jose/package.json +7 -0
- package/dist/src/compiled/just-bash/LICENSE +201 -0
- package/dist/src/compiled/just-bash/index.d.ts +47 -0
- package/dist/src/compiled/just-bash/index.js +69869 -0
- package/dist/src/compiled/just-bash/index.js.map +7 -0
- package/dist/src/compiled/just-bash/package.json +7 -0
- package/dist/src/compiled/turndown/LICENSE +21 -0
- package/dist/src/compiled/turndown/index.d.ts +13 -0
- package/dist/src/compiled/turndown/index.js +17318 -0
- package/dist/src/compiled/turndown/index.js.map +7 -0
- package/dist/src/compiled/turndown/package.json +7 -0
- package/dist/src/compiled/zod-validation-error/LICENSE +9 -0
- package/dist/src/compiled/zod-validation-error/index.d.ts +12 -0
- package/dist/src/compiled/zod-validation-error/index.js +703 -0
- package/dist/src/compiled/zod-validation-error/index.js.map +7 -0
- package/dist/src/compiled/zod-validation-error/package.json +7 -0
- package/dist/src/compiler/artifacts.d.ts +3 -3
- package/dist/src/compiler/artifacts.d.ts.map +1 -1
- package/dist/src/compiler/artifacts.js +5 -5
- package/dist/src/compiler/artifacts.js.map +1 -1
- package/dist/src/compiler/channel-url.d.ts +0 -9
- package/dist/src/compiler/channel-url.d.ts.map +1 -1
- package/dist/src/compiler/channel-url.js +0 -9
- package/dist/src/compiler/channel-url.js.map +1 -1
- package/dist/src/compiler/compile-agent.d.ts +5 -5
- package/dist/src/compiler/compile-agent.d.ts.map +1 -1
- package/dist/src/compiler/compile-agent.js +5 -5
- package/dist/src/compiler/compile-agent.js.map +1 -1
- package/dist/src/compiler/compile-from-memory.d.ts +5 -15
- package/dist/src/compiler/compile-from-memory.d.ts.map +1 -1
- package/dist/src/compiler/compile-from-memory.js +3 -4
- package/dist/src/compiler/compile-from-memory.js.map +1 -1
- package/dist/src/compiler/manifest.d.ts +86 -194
- package/dist/src/compiler/manifest.d.ts.map +1 -1
- package/dist/src/compiler/manifest.js +61 -26
- package/dist/src/compiler/manifest.js.map +1 -1
- package/dist/src/compiler/model-catalog.d.ts +33 -0
- package/dist/src/compiler/model-catalog.d.ts.map +1 -1
- package/dist/src/compiler/model-catalog.js +103 -72
- package/dist/src/compiler/model-catalog.js.map +1 -1
- package/dist/src/compiler/module-map.d.ts +2 -2
- package/dist/src/compiler/module-map.d.ts.map +1 -1
- package/dist/src/compiler/module-map.js +21 -12
- package/dist/src/compiler/module-map.js.map +1 -1
- package/dist/src/compiler/normalize-agent-config.d.ts +11 -15
- package/dist/src/compiler/normalize-agent-config.d.ts.map +1 -1
- package/dist/src/compiler/normalize-agent-config.js +61 -45
- package/dist/src/compiler/normalize-agent-config.js.map +1 -1
- package/dist/src/compiler/normalize-channel.d.ts +10 -2
- package/dist/src/compiler/normalize-channel.d.ts.map +1 -1
- package/dist/src/compiler/normalize-channel.js +32 -5
- package/dist/src/compiler/normalize-channel.js.map +1 -1
- package/dist/src/compiler/normalize-connection.d.ts +3 -3
- package/dist/src/compiler/normalize-connection.d.ts.map +1 -1
- package/dist/src/compiler/normalize-connection.js +3 -3
- package/dist/src/compiler/normalize-connection.js.map +1 -1
- package/dist/src/compiler/normalize-helpers.d.ts +2 -7
- package/dist/src/compiler/normalize-helpers.d.ts.map +1 -1
- package/dist/src/compiler/normalize-helpers.js +4 -9
- package/dist/src/compiler/normalize-helpers.js.map +1 -1
- package/dist/src/compiler/normalize-hook.d.ts +13 -0
- package/dist/src/compiler/normalize-hook.d.ts.map +1 -0
- package/dist/src/compiler/normalize-hook.js +20 -0
- package/dist/src/compiler/normalize-hook.js.map +1 -0
- package/dist/src/compiler/normalize-manifest.d.ts +2 -2
- package/dist/src/compiler/normalize-manifest.d.ts.map +1 -1
- package/dist/src/compiler/normalize-manifest.js +29 -19
- package/dist/src/compiler/normalize-manifest.js.map +1 -1
- package/dist/src/compiler/normalize-prompt-layer.d.ts +2 -2
- package/dist/src/compiler/normalize-prompt-layer.d.ts.map +1 -1
- package/dist/src/compiler/normalize-prompt-layer.js +6 -6
- package/dist/src/compiler/normalize-prompt-layer.js.map +1 -1
- package/dist/src/compiler/normalize-sandbox.d.ts +2 -14
- package/dist/src/compiler/normalize-sandbox.d.ts.map +1 -1
- package/dist/src/compiler/normalize-sandbox.js +2 -15
- package/dist/src/compiler/normalize-sandbox.js.map +1 -1
- package/dist/src/compiler/normalize-schedule.d.ts +15 -6
- package/dist/src/compiler/normalize-schedule.d.ts.map +1 -1
- package/dist/src/compiler/normalize-schedule.js +48 -17
- package/dist/src/compiler/normalize-schedule.js.map +1 -1
- package/dist/src/compiler/normalize-skill.d.ts +3 -3
- package/dist/src/compiler/normalize-skill.d.ts.map +1 -1
- package/dist/src/compiler/normalize-skill.js +8 -7
- package/dist/src/compiler/normalize-skill.js.map +1 -1
- package/dist/src/compiler/normalize-subagent.d.ts +4 -5
- package/dist/src/compiler/normalize-subagent.d.ts.map +1 -1
- package/dist/src/compiler/normalize-subagent.js +13 -21
- package/dist/src/compiler/normalize-subagent.js.map +1 -1
- package/dist/src/compiler/normalize-tool.d.ts +2 -2
- package/dist/src/compiler/normalize-tool.d.ts.map +1 -1
- package/dist/src/compiler/normalize-tool.js +6 -6
- package/dist/src/compiler/normalize-tool.js.map +1 -1
- package/dist/src/compiler/resource-files.js +1 -1
- package/dist/src/compiler/resource-files.js.map +1 -1
- package/dist/src/context/accessors.d.ts +5 -5
- package/dist/src/context/accessors.d.ts.map +1 -1
- package/dist/src/context/accessors.js +3 -3
- package/dist/src/context/accessors.js.map +1 -1
- package/dist/src/context/container.d.ts +1 -1
- package/dist/src/context/container.d.ts.map +1 -1
- package/dist/src/context/container.js +1 -1
- package/dist/src/context/container.js.map +1 -1
- package/dist/src/context/hook-lifecycle.d.ts +111 -0
- package/dist/src/context/hook-lifecycle.d.ts.map +1 -0
- package/dist/src/context/hook-lifecycle.js +193 -0
- package/dist/src/context/hook-lifecycle.js.map +1 -0
- package/dist/src/context/key.d.ts +0 -41
- package/dist/src/context/key.d.ts.map +1 -1
- package/dist/src/context/key.js +0 -41
- package/dist/src/context/key.js.map +1 -1
- package/dist/src/context/keys.d.ts +9 -9
- package/dist/src/context/keys.d.ts.map +1 -1
- package/dist/src/context/keys.js +8 -8
- package/dist/src/context/keys.js.map +1 -1
- package/dist/src/context/node.d.ts +1 -1
- 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 +5 -4
- package/dist/src/context/provider.d.ts.map +1 -1
- package/dist/src/context/providers/connection.d.ts +2 -2
- package/dist/src/context/providers/connection.d.ts.map +1 -1
- package/dist/src/context/providers/connection.js +4 -4
- package/dist/src/context/providers/connection.js.map +1 -1
- 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 +24 -7
- 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 +1 -1
- 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 -7
- package/dist/src/context/providers/skill.js.map +1 -1
- package/dist/src/context/run-step.d.ts +2 -2
- package/dist/src/context/run-step.d.ts.map +1 -1
- package/dist/src/context/run-step.js +7 -7
- package/dist/src/context/run-step.js.map +1 -1
- package/dist/src/context/seed-keys.d.ts +18 -3
- package/dist/src/context/seed-keys.d.ts.map +1 -1
- package/dist/src/context/seed-keys.js +16 -1
- package/dist/src/context/seed-keys.js.map +1 -1
- package/dist/src/context/serialize.d.ts +1 -1
- package/dist/src/context/serialize.d.ts.map +1 -1
- package/dist/src/context/serialize.js +3 -3
- package/dist/src/context/serialize.js.map +1 -1
- package/dist/src/discover/connections.d.ts +3 -18
- package/dist/src/discover/connections.d.ts.map +1 -1
- package/dist/src/discover/connections.js +5 -20
- package/dist/src/discover/connections.js.map +1 -1
- package/dist/src/discover/discover-agent.d.ts +8 -7
- package/dist/src/discover/discover-agent.d.ts.map +1 -1
- package/dist/src/discover/discover-agent.js +97 -53
- package/dist/src/discover/discover-agent.js.map +1 -1
- package/dist/src/discover/discover-subagent.d.ts +4 -4
- package/dist/src/discover/discover-subagent.d.ts.map +1 -1
- package/dist/src/discover/discover-subagent.js +37 -23
- package/dist/src/discover/discover-subagent.js.map +1 -1
- package/dist/src/discover/filesystem.d.ts +7 -6
- package/dist/src/discover/filesystem.d.ts.map +1 -1
- package/dist/src/discover/filesystem.js +20 -11
- package/dist/src/discover/filesystem.js.map +1 -1
- package/dist/src/discover/grammar.d.ts +69 -56
- package/dist/src/discover/grammar.d.ts.map +1 -1
- package/dist/src/discover/grammar.js +92 -132
- package/dist/src/discover/grammar.js.map +1 -1
- package/dist/src/discover/lib.d.ts +3 -3
- package/dist/src/discover/lib.d.ts.map +1 -1
- package/dist/src/discover/lib.js +4 -4
- package/dist/src/discover/lib.js.map +1 -1
- package/dist/src/discover/manifest.d.ts +25 -63
- package/dist/src/discover/manifest.d.ts.map +1 -1
- package/dist/src/discover/manifest.js +7 -18
- package/dist/src/discover/manifest.js.map +1 -1
- package/dist/src/discover/markdown.d.ts +2 -2
- package/dist/src/discover/markdown.d.ts.map +1 -1
- package/dist/src/discover/markdown.js +3 -3
- package/dist/src/discover/markdown.js.map +1 -1
- package/dist/src/discover/project-source.d.ts +1 -21
- package/dist/src/discover/project-source.d.ts.map +1 -1
- package/dist/src/discover/project-source.js.map +1 -1
- package/dist/src/discover/project.d.ts +2 -2
- package/dist/src/discover/project.d.ts.map +1 -1
- package/dist/src/discover/project.js +3 -3
- package/dist/src/discover/project.js.map +1 -1
- package/dist/src/discover/resource-tree.d.ts +2 -2
- package/dist/src/discover/resource-tree.d.ts.map +1 -1
- package/dist/src/discover/resource-tree.js +3 -3
- package/dist/src/discover/resource-tree.js.map +1 -1
- package/dist/src/discover/{sandboxes.d.ts → sandbox.d.ts} +9 -17
- package/dist/src/discover/sandbox.d.ts.map +1 -0
- package/dist/src/discover/{sandboxes.js → sandbox.js} +56 -33
- package/dist/src/discover/sandbox.js.map +1 -0
- package/dist/src/discover/skills.d.ts +3 -4
- package/dist/src/discover/skills.d.ts.map +1 -1
- package/dist/src/discover/skills.js +11 -40
- package/dist/src/discover/skills.js.map +1 -1
- package/dist/src/discover/slots.js +1 -1
- package/dist/src/discover/slots.js.map +1 -1
- package/dist/src/discover/system.d.ts +3 -3
- package/dist/src/discover/system.d.ts.map +1 -1
- package/dist/src/discover/system.js +6 -6
- package/dist/src/discover/system.js.map +1 -1
- package/dist/src/evals/cli/eval.d.ts +20 -4
- package/dist/src/evals/cli/eval.d.ts.map +1 -1
- package/dist/src/evals/cli/eval.js +166 -177
- package/dist/src/evals/cli/eval.js.map +7 -1
- package/dist/src/evals/define-eval-suite.d.ts +6 -39
- package/dist/src/evals/define-eval-suite.d.ts.map +1 -1
- package/dist/src/evals/define-eval-suite.js +9 -79
- package/dist/src/evals/define-eval-suite.js.map +7 -1
- package/dist/src/evals/index.d.ts +3 -3
- package/dist/src/evals/index.d.ts.map +1 -1
- package/dist/src/evals/index.js +9 -5
- package/dist/src/evals/index.js.map +7 -1
- package/dist/src/evals/loaders/index.js +20 -27
- package/dist/src/evals/loaders/index.js.map +7 -1
- package/dist/src/evals/loaders/json.js +9 -19
- package/dist/src/evals/loaders/json.js.map +7 -1
- package/dist/src/evals/loaders/yaml.js +10 -26
- package/dist/src/evals/loaders/yaml.js.map +7 -1
- package/dist/src/evals/reporters/index.d.ts +2 -2
- package/dist/src/evals/reporters/index.d.ts.map +1 -1
- package/dist/src/evals/reporters/index.js +14 -14
- package/dist/src/evals/reporters/index.js.map +7 -1
- package/dist/src/evals/runner/artifacts.d.ts +1 -1
- package/dist/src/evals/runner/artifacts.d.ts.map +1 -1
- package/dist/src/evals/runner/artifacts.js +11 -84
- package/dist/src/evals/runner/artifacts.js.map +7 -1
- package/dist/src/evals/runner/derive-run-facts.d.ts +2 -2
- package/dist/src/evals/runner/derive-run-facts.d.ts.map +1 -1
- package/dist/src/evals/runner/derive-run-facts.js +9 -60
- package/dist/src/evals/runner/derive-run-facts.js.map +7 -1
- package/dist/src/evals/runner/discover.d.ts +12 -5
- package/dist/src/evals/runner/discover.d.ts.map +1 -1
- package/dist/src/evals/runner/discover.js +16 -82
- package/dist/src/evals/runner/discover.js.map +7 -1
- package/dist/src/evals/runner/execute-case.d.ts +2 -2
- package/dist/src/evals/runner/execute-case.d.ts.map +1 -1
- package/dist/src/evals/runner/execute-case.js +10 -89
- package/dist/src/evals/runner/execute-case.js.map +7 -1
- package/dist/src/evals/runner/execute-suite.d.ts +3 -3
- package/dist/src/evals/runner/execute-suite.d.ts.map +1 -1
- package/dist/src/evals/runner/execute-suite.js +14 -126
- package/dist/src/evals/runner/execute-suite.js.map +7 -1
- package/dist/src/evals/runner/reporters/braintrust.d.ts +1 -16
- package/dist/src/evals/runner/reporters/braintrust.d.ts.map +1 -1
- package/dist/src/evals/runner/reporters/braintrust.js +10 -164
- package/dist/src/evals/runner/reporters/braintrust.js.map +7 -1
- package/dist/src/evals/runner/reporters/console.d.ts +2 -2
- package/dist/src/evals/runner/reporters/console.d.ts.map +1 -1
- package/dist/src/evals/runner/reporters/console.js +10 -116
- package/dist/src/evals/runner/reporters/console.js.map +7 -1
- package/dist/src/evals/runner/reporters/types.d.ts +1 -1
- package/dist/src/evals/runner/reporters/types.d.ts.map +1 -1
- package/dist/src/evals/runner/reporters/types.js +2 -2
- package/dist/src/evals/runner/reporters/types.js.map +7 -1
- package/dist/src/evals/runner/resolve-git-metadata.js +9 -33
- package/dist/src/evals/runner/resolve-git-metadata.js.map +7 -1
- package/dist/src/evals/scorers/autoevals-client.d.ts +15 -0
- package/dist/src/evals/scorers/autoevals-client.d.ts.map +1 -0
- package/dist/src/evals/scorers/autoevals-client.js +10 -0
- package/dist/src/evals/scorers/autoevals-client.js.map +7 -0
- package/dist/src/evals/scorers/autoevals.d.ts +44 -0
- package/dist/src/evals/scorers/autoevals.d.ts.map +1 -0
- package/dist/src/evals/scorers/autoevals.js +18 -0
- package/dist/src/evals/scorers/autoevals.js.map +7 -0
- package/dist/src/evals/scorers/json.d.ts +1 -1
- package/dist/src/evals/scorers/json.d.ts.map +1 -1
- package/dist/src/evals/scorers/json.js +9 -32
- package/dist/src/evals/scorers/json.js.map +7 -1
- package/dist/src/evals/scorers/run.d.ts +1 -1
- package/dist/src/evals/scorers/run.d.ts.map +1 -1
- package/dist/src/evals/scorers/run.js +15 -53
- package/dist/src/evals/scorers/run.js.map +7 -1
- package/dist/src/evals/scorers/sql.d.ts +1 -1
- package/dist/src/evals/scorers/sql.d.ts.map +1 -1
- package/dist/src/evals/scorers/sql.js +9 -35
- package/dist/src/evals/scorers/sql.js.map +7 -1
- package/dist/src/evals/scorers/text.d.ts +8 -1
- package/dist/src/evals/scorers/text.d.ts.map +1 -1
- package/dist/src/evals/scorers/text.js +14 -25
- package/dist/src/evals/scorers/text.js.map +7 -1
- package/dist/src/evals/scores/index.d.ts +25 -5
- package/dist/src/evals/scores/index.d.ts.map +1 -1
- package/dist/src/evals/scores/index.js +35 -53
- package/dist/src/evals/scores/index.js.map +7 -1
- package/dist/src/evals/types.d.ts +42 -13
- package/dist/src/evals/types.d.ts.map +1 -1
- package/dist/src/evals/types.js +2 -2
- package/dist/src/evals/types.js.map +7 -1
- package/dist/src/execution/authorization-challenge-defaults.d.ts +44 -0
- package/dist/src/execution/authorization-challenge-defaults.d.ts.map +1 -0
- package/dist/src/execution/authorization-challenge-defaults.js +61 -0
- package/dist/src/execution/authorization-challenge-defaults.js.map +1 -0
- package/dist/src/execution/await-authorization-orchestrator.d.ts +39 -0
- package/dist/src/execution/await-authorization-orchestrator.d.ts.map +1 -0
- package/dist/src/execution/await-authorization-orchestrator.js +197 -0
- package/dist/src/execution/await-authorization-orchestrator.js.map +1 -0
- package/dist/src/execution/await-authorization-splice.d.ts +24 -0
- package/dist/src/execution/await-authorization-splice.d.ts.map +1 -0
- package/dist/src/execution/await-authorization-splice.js +67 -0
- package/dist/src/execution/await-authorization-splice.js.map +1 -0
- package/dist/src/execution/connection-auth-steps.d.ts +146 -0
- package/dist/src/execution/connection-auth-steps.d.ts.map +1 -0
- package/dist/src/execution/connection-auth-steps.js +343 -0
- package/dist/src/execution/connection-auth-steps.js.map +1 -0
- package/dist/src/execution/continuous-entry.d.ts +15 -6
- package/dist/src/execution/continuous-entry.d.ts.map +1 -1
- package/dist/src/execution/continuous-entry.js +285 -42
- package/dist/src/execution/continuous-entry.js.map +1 -1
- package/dist/src/execution/continuous-runtime-errors.d.ts +29 -0
- package/dist/src/execution/continuous-runtime-errors.d.ts.map +1 -0
- package/dist/src/execution/continuous-runtime-errors.js +35 -0
- package/dist/src/execution/continuous-runtime-errors.js.map +1 -0
- package/dist/src/execution/continuous-runtime.d.ts +10 -14
- package/dist/src/execution/continuous-runtime.d.ts.map +1 -1
- package/dist/src/execution/continuous-runtime.js +49 -38
- package/dist/src/execution/continuous-runtime.js.map +1 -1
- package/dist/src/execution/node-step.d.ts +14 -7
- package/dist/src/execution/node-step.d.ts.map +1 -1
- package/dist/src/execution/node-step.js +7 -6
- package/dist/src/execution/node-step.js.map +1 -1
- package/dist/src/execution/runtime-context.d.ts +3 -16
- package/dist/src/execution/runtime-context.d.ts.map +1 -1
- package/dist/src/execution/runtime-context.js +6 -16
- package/dist/src/execution/runtime-context.js.map +1 -1
- package/dist/src/execution/sandbox/bash-tool.d.ts.map +1 -0
- package/dist/src/execution/{sandboxes → sandbox}/bash-tool.js +2 -2
- package/dist/src/execution/sandbox/bash-tool.js.map +1 -0
- package/dist/src/execution/{sandboxes → sandbox}/bindings/local.d.ts +1 -1
- package/dist/src/execution/sandbox/bindings/local.d.ts.map +1 -0
- package/dist/src/execution/{sandboxes → sandbox}/bindings/local.js +21 -9
- package/dist/src/execution/sandbox/bindings/local.js.map +1 -0
- package/dist/src/execution/sandbox/bindings/vercel.d.ts +23 -0
- package/dist/src/execution/sandbox/bindings/vercel.d.ts.map +1 -0
- package/dist/src/execution/{sandboxes → sandbox}/bindings/vercel.js +128 -30
- package/dist/src/execution/sandbox/bindings/vercel.js.map +1 -0
- package/dist/src/execution/sandbox/ensure.d.ts +42 -0
- package/dist/src/execution/sandbox/ensure.d.ts.map +1 -0
- package/dist/src/execution/sandbox/ensure.js +120 -0
- package/dist/src/execution/sandbox/ensure.js.map +1 -0
- package/dist/src/execution/sandbox/glob-tool.d.ts +22 -0
- package/dist/src/execution/sandbox/glob-tool.d.ts.map +1 -0
- package/dist/src/execution/{sandboxes → sandbox}/glob-tool.js +7 -41
- package/dist/src/execution/sandbox/glob-tool.js.map +1 -0
- package/dist/src/execution/{sandboxes → sandbox}/grep-tool.d.ts +0 -10
- package/dist/src/execution/sandbox/grep-tool.d.ts.map +1 -0
- package/dist/src/execution/{sandboxes → sandbox}/grep-tool.js +5 -29
- package/dist/src/execution/sandbox/grep-tool.js.map +1 -0
- package/dist/src/execution/{sandboxes → sandbox}/prewarm.d.ts +3 -3
- package/dist/src/execution/sandbox/prewarm.d.ts.map +1 -0
- package/dist/src/execution/{sandboxes → sandbox}/prewarm.js +73 -63
- package/dist/src/execution/sandbox/prewarm.js.map +1 -0
- package/dist/src/execution/sandbox/read-file-tool.d.ts.map +1 -0
- package/dist/src/execution/{sandboxes → sandbox}/read-file-tool.js +4 -4
- package/dist/src/execution/{sandboxes → sandbox}/read-file-tool.js.map +1 -1
- package/dist/src/execution/{sandboxes → sandbox}/require-sandbox.d.ts +1 -1
- package/dist/src/execution/sandbox/require-sandbox.d.ts.map +1 -0
- package/dist/src/execution/{sandboxes → sandbox}/require-sandbox.js +5 -5
- package/dist/src/execution/sandbox/require-sandbox.js.map +1 -0
- package/dist/src/execution/{sandboxes → sandbox}/ripgrep-probe.d.ts +1 -1
- package/dist/src/execution/sandbox/ripgrep-probe.d.ts.map +1 -0
- package/dist/src/execution/{sandboxes → sandbox}/ripgrep-probe.js +0 -8
- package/dist/src/execution/sandbox/ripgrep-probe.js.map +1 -0
- package/dist/src/execution/{sandboxes → sandbox}/session.d.ts +7 -15
- package/dist/src/execution/sandbox/session.d.ts.map +1 -0
- package/dist/src/execution/{sandboxes → sandbox}/session.js +4 -11
- package/dist/src/execution/sandbox/session.js.map +1 -0
- package/dist/src/execution/sandbox/shell-quote.d.ts.map +1 -0
- package/dist/src/execution/sandbox/shell-quote.js.map +1 -0
- package/dist/src/execution/sandbox/truncate-output.d.ts.map +1 -0
- package/dist/src/execution/sandbox/truncate-output.js.map +1 -0
- package/dist/src/execution/sandbox/write-file-tool.d.ts.map +1 -0
- package/dist/src/execution/{sandboxes → sandbox}/write-file-tool.js +3 -3
- package/dist/src/execution/{sandboxes → sandbox}/write-file-tool.js.map +1 -1
- package/dist/src/execution/session-start.d.ts +3 -3
- package/dist/src/execution/session-start.d.ts.map +1 -1
- package/dist/src/execution/session-start.js +3 -3
- package/dist/src/execution/session-start.js.map +1 -1
- package/dist/src/execution/session.d.ts +2 -2
- package/dist/src/execution/session.d.ts.map +1 -1
- package/dist/src/execution/session.js +0 -2
- package/dist/src/execution/session.js.map +1 -1
- package/dist/src/execution/skills/access.d.ts +4 -9
- package/dist/src/execution/skills/access.d.ts.map +1 -1
- package/dist/src/execution/skills/access.js +3 -26
- package/dist/src/execution/skills/access.js.map +1 -1
- package/dist/src/execution/skills/handle.d.ts +3 -3
- package/dist/src/execution/skills/handle.d.ts.map +1 -1
- package/dist/src/execution/skills/handle.js +5 -5
- package/dist/src/execution/skills/handle.js.map +1 -1
- package/dist/src/execution/skills/instructions.d.ts +2 -2
- package/dist/src/execution/skills/instructions.d.ts.map +1 -1
- package/dist/src/execution/skills/instructions.js +1 -1
- package/dist/src/execution/skills/instructions.js.map +1 -1
- package/dist/src/execution/skills/seed.d.ts +4 -4
- package/dist/src/execution/skills/seed.d.ts.map +1 -1
- package/dist/src/execution/skills/seed.js +9 -9
- package/dist/src/execution/skills/seed.js.map +1 -1
- package/dist/src/execution/skills/types.d.ts +2 -15
- package/dist/src/execution/skills/types.d.ts.map +1 -1
- package/dist/src/execution/subagent-adapter.d.ts +71 -0
- package/dist/src/execution/subagent-adapter.d.ts.map +1 -0
- package/dist/src/execution/subagent-adapter.js +159 -0
- package/dist/src/execution/subagent-adapter.js.map +1 -0
- package/dist/src/execution/subagent-hitl-proxy.d.ts +55 -0
- package/dist/src/execution/subagent-hitl-proxy.d.ts.map +1 -0
- package/dist/src/execution/subagent-hitl-proxy.js +82 -0
- package/dist/src/execution/subagent-hitl-proxy.js.map +1 -0
- package/dist/src/execution/subagent-invocation.d.ts +2 -7
- package/dist/src/execution/subagent-invocation.d.ts.map +1 -1
- package/dist/src/execution/subagent-invocation.js +2 -6
- package/dist/src/execution/subagent-invocation.js.map +1 -1
- package/dist/src/execution/subagent-tool.d.ts +21 -8
- package/dist/src/execution/subagent-tool.d.ts.map +1 -1
- package/dist/src/execution/subagent-tool.js +16 -15
- package/dist/src/execution/subagent-tool.js.map +1 -1
- package/dist/src/execution/tool-compaction.d.ts +4 -19
- package/dist/src/execution/tool-compaction.d.ts.map +1 -1
- package/dist/src/execution/tool-compaction.js +9 -19
- package/dist/src/execution/tool-compaction.js.map +1 -1
- package/dist/src/execution/types.d.ts +14 -9
- package/dist/src/execution/types.d.ts.map +1 -1
- package/dist/src/execution/web-fetch/html.js +1 -1
- package/dist/src/execution/web-fetch/html.js.map +1 -1
- package/dist/src/execution/web-fetch/tool.js +3 -3
- package/dist/src/execution/web-fetch/tool.js.map +1 -1
- package/dist/src/execution/workflow-entry.d.ts.map +1 -1
- package/dist/src/execution/workflow-entry.js +251 -37
- package/dist/src/execution/workflow-entry.js.map +1 -1
- package/dist/src/execution/workflow-runtime.d.ts +3 -13
- package/dist/src/execution/workflow-runtime.d.ts.map +1 -1
- package/dist/src/execution/workflow-runtime.js +7 -17
- package/dist/src/execution/workflow-runtime.js.map +1 -1
- package/dist/src/execution/workflow-steps.d.ts +57 -16
- package/dist/src/execution/workflow-steps.d.ts.map +1 -1
- package/dist/src/execution/workflow-steps.js +235 -83
- package/dist/src/execution/workflow-steps.js.map +1 -1
- package/dist/src/harness/action-result-helpers.d.ts +33 -0
- package/dist/src/harness/action-result-helpers.d.ts.map +1 -0
- package/dist/src/harness/action-result-helpers.js +76 -0
- package/dist/src/harness/action-result-helpers.js.map +1 -0
- package/dist/src/harness/attachment-staging.d.ts +18 -39
- package/dist/src/harness/attachment-staging.d.ts.map +1 -1
- package/dist/src/harness/attachment-staging.js +230 -50
- package/dist/src/harness/attachment-staging.js.map +1 -1
- package/dist/src/harness/compaction.d.ts +4 -4
- package/dist/src/harness/compaction.d.ts.map +1 -1
- package/dist/src/harness/compaction.js +3 -4
- package/dist/src/harness/compaction.js.map +1 -1
- package/dist/src/harness/emission.d.ts +61 -14
- package/dist/src/harness/emission.d.ts.map +1 -1
- package/dist/src/harness/emission.js +110 -24
- package/dist/src/harness/emission.js.map +1 -1
- package/dist/src/harness/execute-tool.d.ts +2 -17
- package/dist/src/harness/execute-tool.d.ts.map +1 -1
- package/dist/src/harness/input-extraction.d.ts +1 -1
- package/dist/src/harness/input-extraction.d.ts.map +1 -1
- package/dist/src/harness/input-extraction.js +2 -2
- package/dist/src/harness/input-extraction.js.map +1 -1
- package/dist/src/harness/input-requests.d.ts +8 -14
- package/dist/src/harness/input-requests.d.ts.map +1 -1
- package/dist/src/harness/input-requests.js +9 -13
- package/dist/src/harness/input-requests.js.map +1 -1
- package/dist/src/harness/instrumentation-config.d.ts +4 -3
- package/dist/src/harness/instrumentation-config.d.ts.map +1 -1
- package/dist/src/harness/instrumentation-config.js +6 -2
- package/dist/src/harness/instrumentation-config.js.map +1 -1
- package/dist/src/harness/messages.d.ts +2 -2
- package/dist/src/harness/messages.d.ts.map +1 -1
- package/dist/src/harness/model-call-error.d.ts +5 -0
- package/dist/src/harness/model-call-error.d.ts.map +1 -0
- package/dist/src/harness/model-call-error.js +56 -0
- package/dist/src/harness/model-call-error.js.map +1 -0
- package/dist/src/harness/otel-integration.js +3 -3
- package/dist/src/harness/otel-integration.js.map +1 -1
- package/dist/src/harness/prompt-cache.d.ts +0 -14
- package/dist/src/harness/prompt-cache.d.ts.map +1 -1
- package/dist/src/harness/prompt-cache.js.map +1 -1
- package/dist/src/harness/provider-tools.d.ts +1 -1
- package/dist/src/harness/provider-tools.d.ts.map +1 -1
- package/dist/src/harness/proxy-input-requests.d.ts +37 -0
- package/dist/src/harness/proxy-input-requests.d.ts.map +1 -0
- package/dist/src/harness/proxy-input-requests.js +92 -0
- package/dist/src/harness/proxy-input-requests.js.map +1 -0
- package/dist/src/harness/runtime-actions.d.ts +26 -11
- package/dist/src/harness/runtime-actions.d.ts.map +1 -1
- package/dist/src/harness/runtime-actions.js +57 -13
- package/dist/src/harness/runtime-actions.js.map +1 -1
- package/dist/src/harness/step-hooks.d.ts +27 -6
- package/dist/src/harness/step-hooks.d.ts.map +1 -1
- package/dist/src/harness/step-hooks.js +41 -64
- package/dist/src/harness/step-hooks.js.map +1 -1
- package/dist/src/harness/tool-loop.d.ts +1 -1
- package/dist/src/harness/tool-loop.d.ts.map +1 -1
- package/dist/src/harness/tool-loop.js +211 -96
- package/dist/src/harness/tool-loop.js.map +1 -1
- package/dist/src/harness/tool-result-pruning.d.ts +4 -21
- package/dist/src/harness/tool-result-pruning.d.ts.map +1 -1
- package/dist/src/harness/tool-result-pruning.js +4 -21
- package/dist/src/harness/tool-result-pruning.js.map +1 -1
- package/dist/src/harness/tools.d.ts +9 -13
- package/dist/src/harness/tools.d.ts.map +1 -1
- package/dist/src/harness/tools.js +15 -20
- package/dist/src/harness/tools.js.map +1 -1
- package/dist/src/harness/types.d.ts +26 -10
- package/dist/src/harness/types.d.ts.map +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/internal/application/cache-metadata.d.ts +10 -0
- package/dist/src/internal/application/cache-metadata.d.ts.map +1 -0
- package/dist/src/internal/application/cache-metadata.js +43 -0
- package/dist/src/internal/application/cache-metadata.js.map +1 -0
- package/dist/src/internal/application/compiled-artifacts.d.ts +1 -1
- package/dist/src/internal/application/compiled-artifacts.d.ts.map +1 -1
- package/dist/src/internal/application/compiled-artifacts.js +12 -13
- package/dist/src/internal/application/compiled-artifacts.js.map +1 -1
- package/dist/src/internal/application/import-specifier.d.ts +18 -0
- package/dist/src/internal/application/import-specifier.d.ts.map +1 -0
- package/dist/src/internal/application/import-specifier.js +59 -0
- package/dist/src/internal/application/import-specifier.js.map +1 -0
- package/dist/src/internal/application/package.d.ts +5 -1
- package/dist/src/internal/application/package.d.ts.map +1 -1
- package/dist/src/internal/application/package.js +21 -14
- package/dist/src/internal/application/package.js.map +1 -1
- package/dist/src/internal/application/paths.d.ts +3 -4
- package/dist/src/internal/application/paths.d.ts.map +1 -1
- package/dist/src/internal/application/paths.js +4 -5
- package/dist/src/internal/application/paths.js.map +1 -1
- package/dist/src/internal/application/runtime-compiled-artifacts-source.d.ts +7 -0
- package/dist/src/internal/application/runtime-compiled-artifacts-source.d.ts.map +1 -0
- package/dist/src/internal/application/runtime-compiled-artifacts-source.js +13 -0
- package/dist/src/internal/application/runtime-compiled-artifacts-source.js.map +1 -0
- package/dist/src/internal/attachments/data.d.ts +5 -12
- package/dist/src/internal/attachments/data.d.ts.map +1 -1
- package/dist/src/internal/attachments/data.js +12 -12
- package/dist/src/internal/attachments/data.js.map +1 -1
- package/dist/src/internal/attachments/errors.d.ts +33 -0
- package/dist/src/internal/attachments/errors.d.ts.map +1 -0
- package/dist/src/internal/attachments/errors.js +27 -0
- package/dist/src/internal/attachments/errors.js.map +1 -0
- package/dist/src/internal/attachments/refs.d.ts +56 -0
- package/dist/src/internal/attachments/refs.d.ts.map +1 -0
- package/dist/src/internal/attachments/refs.js +95 -0
- package/dist/src/internal/attachments/refs.js.map +1 -0
- package/dist/src/internal/attachments/sandbox-refs.d.ts +47 -0
- package/dist/src/internal/attachments/sandbox-refs.d.ts.map +1 -0
- package/dist/src/internal/attachments/sandbox-refs.js +79 -0
- package/dist/src/internal/attachments/sandbox-refs.js.map +1 -0
- package/dist/src/internal/authored-definition/channel.d.ts +1 -1
- 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 +1 -1
- package/dist/src/internal/authored-definition/connection.d.ts.map +1 -1
- package/dist/src/internal/authored-definition/connection.js +15 -23
- package/dist/src/internal/authored-definition/connection.js.map +1 -1
- package/dist/src/internal/authored-definition/core.d.ts +27 -20
- package/dist/src/internal/authored-definition/core.d.ts.map +1 -1
- package/dist/src/internal/authored-definition/core.js +58 -39
- package/dist/src/internal/authored-definition/core.js.map +1 -1
- package/dist/src/internal/authored-definition/sandbox.d.ts +1 -1
- package/dist/src/internal/authored-definition/sandbox.d.ts.map +1 -1
- package/dist/src/internal/authored-definition/sandbox.js +1 -1
- package/dist/src/internal/authored-definition/sandbox.js.map +1 -1
- package/dist/src/internal/authored-definition/schema-backed.d.ts +6 -21
- package/dist/src/internal/authored-definition/schema-backed.d.ts.map +1 -1
- package/dist/src/internal/authored-definition/schema-backed.js +7 -49
- package/dist/src/internal/authored-definition/schema-backed.js.map +1 -1
- package/dist/src/internal/authored-module-loader.d.ts +13 -0
- package/dist/src/internal/authored-module-loader.d.ts.map +1 -0
- package/dist/src/internal/authored-module-loader.js +179 -0
- package/dist/src/internal/authored-module-loader.js.map +1 -0
- package/dist/src/internal/authored-module-map-loader.d.ts +11 -0
- package/dist/src/internal/authored-module-map-loader.d.ts.map +1 -0
- package/dist/src/internal/authored-module-map-loader.js +54 -0
- package/dist/src/internal/authored-module-map-loader.js.map +1 -0
- package/dist/src/internal/authored-module.d.ts +7 -6
- package/dist/src/internal/authored-module.d.ts.map +1 -1
- package/dist/src/internal/authored-module.js +12 -70
- package/dist/src/internal/authored-module.js.map +1 -1
- package/dist/src/internal/json-schema.d.ts +2 -2
- package/dist/src/internal/json-schema.d.ts.map +1 -1
- package/dist/src/internal/logging.d.ts +97 -0
- package/dist/src/internal/logging.d.ts.map +1 -0
- package/dist/src/internal/logging.js +227 -0
- package/dist/src/internal/logging.js.map +1 -0
- package/dist/src/internal/logical-paths.js +1 -1
- package/dist/src/internal/logical-paths.js.map +1 -1
- package/dist/src/internal/nitro/host/artifacts-config.d.ts +17 -0
- package/dist/src/internal/nitro/host/artifacts-config.d.ts.map +1 -0
- package/dist/src/internal/nitro/host/artifacts-config.js +18 -0
- package/dist/src/internal/nitro/host/artifacts-config.js.map +1 -0
- package/dist/src/internal/nitro/host/build-application.d.ts.map +1 -1
- package/dist/src/internal/nitro/host/build-application.js +11 -11
- package/dist/src/internal/nitro/host/build-application.js.map +1 -1
- package/dist/src/internal/nitro/host/channel-routes.d.ts +32 -0
- package/dist/src/internal/nitro/host/channel-routes.d.ts.map +1 -0
- package/dist/src/internal/nitro/host/channel-routes.js +127 -0
- package/dist/src/internal/nitro/host/channel-routes.js.map +1 -0
- package/dist/src/internal/nitro/host/compiled-sandbox-backend-prune-plugin.d.ts +0 -10
- package/dist/src/internal/nitro/host/compiled-sandbox-backend-prune-plugin.d.ts.map +1 -1
- package/dist/src/internal/nitro/host/compiled-sandbox-backend-prune-plugin.js +0 -10
- package/dist/src/internal/nitro/host/compiled-sandbox-backend-prune-plugin.js.map +1 -1
- package/dist/src/internal/nitro/host/configure-nitro-routes.d.ts +11 -0
- package/dist/src/internal/nitro/host/configure-nitro-routes.d.ts.map +1 -0
- package/dist/src/internal/nitro/host/configure-nitro-routes.js +297 -0
- package/dist/src/internal/nitro/host/configure-nitro-routes.js.map +1 -0
- package/dist/src/internal/nitro/host/create-application-nitro.d.ts +2 -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 +67 -37
- package/dist/src/internal/nitro/host/create-application-nitro.js.map +1 -1
- package/dist/src/internal/nitro/host/cron-handler-route.d.ts +42 -0
- package/dist/src/internal/nitro/host/cron-handler-route.d.ts.map +1 -0
- package/dist/src/internal/nitro/host/cron-handler-route.js +50 -0
- package/dist/src/internal/nitro/host/cron-handler-route.js.map +1 -0
- package/dist/src/internal/nitro/host/dev-authored-source-watcher.d.ts +2 -1
- package/dist/src/internal/nitro/host/dev-authored-source-watcher.d.ts.map +1 -1
- package/dist/src/internal/nitro/host/dev-authored-source-watcher.js +23 -109
- package/dist/src/internal/nitro/host/dev-authored-source-watcher.js.map +1 -1
- package/dist/src/internal/nitro/host/load-home-page-web-assets.js +1 -1
- package/dist/src/internal/nitro/host/load-home-page-web-assets.js.map +1 -1
- package/dist/src/internal/nitro/host/nitro-routing-import-specifier-plugin.d.ts +7 -0
- package/dist/src/internal/nitro/host/nitro-routing-import-specifier-plugin.d.ts.map +1 -0
- package/dist/src/internal/nitro/host/nitro-routing-import-specifier-plugin.js +29 -0
- package/dist/src/internal/nitro/host/nitro-routing-import-specifier-plugin.js.map +1 -0
- package/dist/src/internal/nitro/host/prepare-application-host.d.ts +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 +7 -7
- package/dist/src/internal/nitro/host/prepare-application-host.js.map +1 -1
- package/dist/src/internal/nitro/host/{prewarm-vercel-sandboxes.d.ts → prewarm-vercel-sandbox.d.ts} +5 -5
- package/dist/src/internal/nitro/host/prewarm-vercel-sandbox.d.ts.map +1 -0
- package/dist/src/internal/nitro/host/{prewarm-vercel-sandboxes.js → prewarm-vercel-sandbox.js} +8 -8
- package/dist/src/internal/nitro/host/prewarm-vercel-sandbox.js.map +1 -0
- package/dist/src/internal/nitro/host/schedule-task-routes.d.ts +57 -0
- package/dist/src/internal/nitro/host/schedule-task-routes.d.ts.map +1 -0
- package/dist/src/internal/nitro/host/schedule-task-routes.js +149 -0
- package/dist/src/internal/nitro/host/schedule-task-routes.js.map +1 -0
- package/dist/src/internal/nitro/host/server-external-packages.d.ts +6 -0
- package/dist/src/internal/nitro/host/server-external-packages.d.ts.map +1 -0
- package/dist/src/internal/nitro/host/server-external-packages.js +108 -0
- package/dist/src/internal/nitro/host/server-external-packages.js.map +1 -0
- package/dist/src/internal/nitro/host/start-development-server.d.ts +8 -1
- package/dist/src/internal/nitro/host/start-development-server.d.ts.map +1 -1
- package/dist/src/internal/nitro/host/start-development-server.js +108 -10
- package/dist/src/internal/nitro/host/start-development-server.js.map +1 -1
- package/dist/src/internal/nitro/host/types.d.ts +5 -5
- package/dist/src/internal/nitro/host/types.d.ts.map +1 -1
- package/dist/src/internal/nitro/host/vercel-build-output-config.d.ts +9 -0
- package/dist/src/internal/nitro/host/vercel-build-output-config.d.ts.map +1 -0
- package/dist/src/internal/nitro/host/vercel-build-output-config.js +15 -0
- package/dist/src/internal/nitro/host/vercel-build-output-config.js.map +1 -0
- package/dist/src/internal/nitro/host.d.ts +3 -3
- package/dist/src/internal/nitro/host.d.ts.map +1 -1
- package/dist/src/internal/nitro/host.js +2 -2
- package/dist/src/internal/nitro/host.js.map +1 -1
- package/dist/src/internal/nitro/routes/channel-dispatch.d.ts +1 -1
- package/dist/src/internal/nitro/routes/channel-dispatch.d.ts.map +1 -1
- package/dist/src/internal/nitro/routes/channel-dispatch.js +1 -1
- package/dist/src/internal/nitro/routes/channel-dispatch.js.map +1 -1
- package/dist/src/internal/nitro/routes/health.d.ts +1 -1
- package/dist/src/internal/nitro/routes/health.d.ts.map +1 -1
- package/dist/src/internal/nitro/routes/health.js +7 -3
- package/dist/src/internal/nitro/routes/health.js.map +1 -1
- package/dist/src/internal/nitro/routes/home-page/build-home-page-response.d.ts +2 -2
- package/dist/src/internal/nitro/routes/home-page/build-home-page-response.d.ts.map +1 -1
- package/dist/src/internal/nitro/routes/home-page/build-home-page-response.js +21 -20
- package/dist/src/internal/nitro/routes/home-page/build-home-page-response.js.map +1 -1
- package/dist/src/internal/nitro/routes/home-page/load-home-page-data.d.ts +4 -4
- package/dist/src/internal/nitro/routes/home-page/load-home-page-data.d.ts.map +1 -1
- package/dist/src/internal/nitro/routes/home-page/load-home-page-data.js +6 -6
- package/dist/src/internal/nitro/routes/home-page/load-home-page-data.js.map +1 -1
- package/dist/src/internal/nitro/routes/home.js +2 -2
- package/dist/src/internal/nitro/routes/home.js.map +1 -1
- package/dist/src/internal/nitro/routes/runtime-artifacts.d.ts +2 -1
- package/dist/src/internal/nitro/routes/runtime-artifacts.d.ts.map +1 -1
- package/dist/src/internal/nitro/routes/runtime-artifacts.js +9 -3
- package/dist/src/internal/nitro/routes/runtime-artifacts.js.map +1 -1
- package/dist/src/internal/nitro/routes/runtime-stack.d.ts +4 -4
- package/dist/src/internal/nitro/routes/runtime-stack.d.ts.map +1 -1
- package/dist/src/internal/nitro/routes/runtime-stack.js +15 -5
- package/dist/src/internal/nitro/routes/runtime-stack.js.map +1 -1
- package/dist/src/internal/nitro/routes/schedule-task.d.ts +1 -1
- package/dist/src/internal/nitro/routes/schedule-task.d.ts.map +1 -1
- package/dist/src/internal/nitro/routes/schedule-task.js +4 -3
- package/dist/src/internal/nitro/routes/schedule-task.js.map +1 -1
- package/dist/src/internal/nitro/routes/web-ui/assets/index-BNNLLyx5.js +11 -0
- package/dist/src/internal/nitro/routes/web-ui/index.html +2 -2
- package/dist/src/internal/nitro/routes/workflow-data.d.ts +2 -2
- package/dist/src/internal/nitro/routes/workflow-data.d.ts.map +1 -1
- package/dist/src/internal/nitro/routes/workflow-data.js +2 -2
- package/dist/src/internal/nitro/routes/workflow-data.js.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-events.js +2 -2
- package/dist/src/internal/nitro/routes/workflow-run-events.js.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-steps.js +2 -2
- package/dist/src/internal/nitro/routes/workflow-run-steps.js.map +1 -1
- package/dist/src/internal/nitro/routes/workflow-run.d.ts.map +1 -1
- package/dist/src/internal/nitro/routes/workflow-run.js +2 -2
- package/dist/src/internal/nitro/routes/workflow-run.js.map +1 -1
- package/dist/src/internal/nitro/routes/workflow-runs.d.ts.map +1 -1
- package/dist/src/internal/nitro/routes/workflow-runs.js +2 -2
- package/dist/src/internal/nitro/routes/workflow-runs.js.map +1 -1
- package/dist/src/internal/runtime-model.d.ts +11 -3
- package/dist/src/internal/runtime-model.d.ts.map +1 -1
- package/dist/src/internal/runtime-model.js +22 -3
- package/dist/src/internal/runtime-model.js.map +1 -1
- package/dist/src/internal/runtime-registry.d.ts +1 -1
- package/dist/src/internal/runtime-registry.js +1 -1
- package/dist/src/internal/workflow/builtins.d.ts +10 -0
- package/dist/src/internal/workflow/builtins.d.ts.map +1 -0
- package/dist/src/internal/workflow/builtins.js +19 -0
- package/dist/src/internal/workflow/builtins.js.map +1 -0
- package/dist/src/internal/workflow/index.d.ts +7 -0
- package/dist/src/internal/workflow/index.d.ts.map +1 -0
- package/dist/src/internal/workflow/index.js +10 -0
- package/dist/src/internal/workflow/index.js.map +1 -0
- package/dist/src/internal/{message → workflow-bundle}/builder.d.ts +4 -4
- package/dist/src/internal/workflow-bundle/builder.d.ts.map +1 -0
- package/dist/src/internal/{message → workflow-bundle}/builder.js +167 -29
- package/dist/src/internal/workflow-bundle/builder.js.map +1 -0
- package/dist/src/internal/{message → workflow-bundle}/nitro-step-entry.d.ts +1 -0
- package/dist/src/internal/workflow-bundle/nitro-step-entry.d.ts.map +1 -0
- package/dist/src/internal/{message → workflow-bundle}/nitro-step-entry.js +10 -2
- package/dist/src/internal/workflow-bundle/nitro-step-entry.js.map +1 -0
- package/dist/src/internal/{message → workflow-bundle}/vercel-workflow-output.d.ts +4 -0
- package/dist/src/internal/workflow-bundle/vercel-workflow-output.d.ts.map +1 -0
- package/dist/src/internal/{message → workflow-bundle}/vercel-workflow-output.js +16 -0
- package/dist/src/internal/workflow-bundle/vercel-workflow-output.js.map +1 -0
- package/dist/src/protocol/message.d.ts +103 -45
- package/dist/src/protocol/message.d.ts.map +1 -1
- package/dist/src/protocol/message.js +66 -2
- package/dist/src/protocol/message.js.map +1 -1
- package/dist/src/protocol/routes.d.ts +24 -7
- package/dist/src/protocol/routes.d.ts.map +1 -1
- package/dist/src/protocol/routes.js +26 -9
- package/dist/src/protocol/routes.js.map +1 -1
- package/dist/src/public/channels/auth.d.ts +111 -137
- package/dist/src/public/channels/auth.d.ts.map +1 -1
- package/dist/src/public/channels/auth.js +126 -124
- package/dist/src/public/channels/auth.js.map +1 -1
- package/dist/src/public/channels/http.d.ts +5 -49
- package/dist/src/public/channels/http.d.ts.map +1 -1
- package/dist/src/public/channels/http.js +9 -52
- package/dist/src/public/channels/http.js.map +1 -1
- package/dist/src/public/channels/index.d.ts +7 -28
- package/dist/src/public/channels/index.d.ts.map +1 -1
- package/dist/src/public/channels/index.js +5 -26
- package/dist/src/public/channels/index.js.map +1 -1
- package/dist/src/public/channels/slack/index.d.ts +51 -125
- package/dist/src/public/channels/slack/index.d.ts.map +1 -1
- package/dist/src/public/channels/slack/index.js +446 -149
- package/dist/src/public/channels/slack/index.js.map +1 -1
- package/dist/src/public/channels/slack/lowlevel.d.ts +3 -11
- package/dist/src/public/channels/slack/lowlevel.d.ts.map +1 -1
- package/dist/src/public/channels/slack/lowlevel.js +1 -9
- package/dist/src/public/channels/slack/lowlevel.js.map +1 -1
- package/dist/src/public/channels/slack/slack-interaction.d.ts +53 -5
- package/dist/src/public/channels/slack/slack-interaction.d.ts.map +1 -1
- package/dist/src/public/channels/slack/slack-interaction.js +94 -20
- package/dist/src/public/channels/slack/slack-interaction.js.map +1 -1
- package/dist/src/public/channels/upload-policy.d.ts +0 -25
- package/dist/src/public/channels/upload-policy.d.ts.map +1 -1
- package/dist/src/public/channels/upload-policy.js +1 -26
- package/dist/src/public/channels/upload-policy.js.map +1 -1
- package/dist/src/public/connections/errors.d.ts +113 -0
- package/dist/src/public/connections/errors.d.ts.map +1 -0
- package/dist/src/public/connections/errors.js +54 -0
- package/dist/src/public/connections/errors.js.map +1 -0
- package/dist/src/public/connections/index.d.ts +6 -22
- package/dist/src/public/connections/index.d.ts.map +1 -1
- package/dist/src/public/connections/index.js +4 -21
- package/dist/src/public/connections/index.js.map +1 -1
- package/dist/src/public/context/index.d.ts +4 -4
- package/dist/src/public/context/index.d.ts.map +1 -1
- package/dist/src/public/context/index.js +2 -2
- package/dist/src/public/context/index.js.map +1 -1
- package/dist/src/public/definitions/agent.d.ts +7 -72
- package/dist/src/public/definitions/agent.d.ts.map +1 -1
- package/dist/src/public/definitions/agent.js.map +1 -1
- package/dist/src/public/definitions/channel.d.ts +32 -55
- package/dist/src/public/definitions/channel.d.ts.map +1 -1
- package/dist/src/public/definitions/channel.js +1 -26
- package/dist/src/public/definitions/channel.js.map +1 -1
- package/dist/src/public/definitions/connections/mcp.d.ts +37 -18
- package/dist/src/public/definitions/connections/mcp.d.ts.map +1 -1
- package/dist/src/public/definitions/connections/mcp.js +12 -0
- package/dist/src/public/definitions/connections/mcp.js.map +1 -1
- package/dist/src/public/definitions/hook.d.ts +127 -0
- package/dist/src/public/definitions/hook.d.ts.map +1 -0
- package/dist/src/public/definitions/hook.js +12 -0
- package/dist/src/public/definitions/hook.js.map +1 -0
- package/dist/src/public/definitions/instrumentation.d.ts +19 -20
- package/dist/src/public/definitions/instrumentation.d.ts.map +1 -1
- package/dist/src/public/definitions/instrumentation.js +2 -20
- package/dist/src/public/definitions/instrumentation.js.map +1 -1
- package/dist/src/public/definitions/sandbox-backend.d.ts +21 -8
- package/dist/src/public/definitions/sandbox-backend.d.ts.map +1 -1
- package/dist/src/public/definitions/sandbox.d.ts +51 -32
- 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/schedule.d.ts +57 -5
- package/dist/src/public/definitions/schedule.d.ts.map +1 -1
- package/dist/src/public/definitions/schedule.js +30 -2
- package/dist/src/public/definitions/schedule.js.map +1 -1
- package/dist/src/public/definitions/skill.d.ts +7 -14
- package/dist/src/public/definitions/skill.d.ts.map +1 -1
- package/dist/src/public/definitions/skill.js.map +1 -1
- package/dist/src/public/definitions/system.d.ts +3 -1
- package/dist/src/public/definitions/system.d.ts.map +1 -1
- package/dist/src/public/definitions/system.js.map +1 -1
- package/dist/src/public/definitions/tool.d.ts +11 -55
- package/dist/src/public/definitions/tool.d.ts.map +1 -1
- package/dist/src/public/definitions/tool.js +0 -14
- package/dist/src/public/definitions/tool.js.map +1 -1
- package/dist/src/public/helpers/markdown.d.ts +16 -27
- package/dist/src/public/helpers/markdown.d.ts.map +1 -1
- package/dist/src/public/helpers/markdown.js +19 -49
- package/dist/src/public/helpers/markdown.js.map +1 -1
- package/dist/src/public/hooks/index.d.ts +10 -0
- package/dist/src/public/hooks/index.d.ts.map +1 -0
- package/dist/src/public/hooks/index.js +10 -0
- package/dist/src/public/hooks/index.js.map +1 -0
- package/dist/src/public/index.d.ts +2 -18
- package/dist/src/public/index.d.ts.map +1 -1
- package/dist/src/public/index.js +2 -18
- package/dist/src/public/index.js.map +1 -1
- package/dist/src/public/instrumentation/index.d.ts +2 -19
- package/dist/src/public/instrumentation/index.d.ts.map +1 -1
- package/dist/src/public/instrumentation/index.js +2 -19
- package/dist/src/public/instrumentation/index.js.map +1 -1
- package/dist/src/public/sandbox/backends/default.d.ts +8 -0
- package/dist/src/public/sandbox/backends/default.d.ts.map +1 -0
- package/dist/src/public/{sandboxes → sandbox}/backends/default.js +2 -14
- package/dist/src/public/sandbox/backends/default.js.map +1 -0
- package/dist/src/public/{sandboxes → sandbox}/backends/local.d.ts +1 -1
- package/dist/src/public/sandbox/backends/local.d.ts.map +1 -0
- package/dist/src/public/{sandboxes → sandbox}/backends/local.js +1 -1
- package/dist/src/public/sandbox/backends/local.js.map +1 -0
- package/dist/src/public/sandbox/backends/vercel.d.ts +12 -0
- package/dist/src/public/sandbox/backends/vercel.d.ts.map +1 -0
- package/dist/src/public/sandbox/backends/vercel.js +13 -0
- package/dist/src/public/sandbox/backends/vercel.js.map +1 -0
- package/dist/src/public/sandbox/index.d.ts +12 -0
- package/dist/src/public/sandbox/index.d.ts.map +1 -0
- package/dist/src/public/sandbox/index.js +10 -0
- package/dist/src/public/sandbox/index.js.map +1 -0
- package/dist/src/public/sandbox/vercel-sandbox.d.ts +32 -0
- package/dist/src/public/sandbox/vercel-sandbox.d.ts.map +1 -0
- package/dist/src/public/sandbox/vercel-sandbox.js +2 -0
- package/dist/src/public/sandbox/vercel-sandbox.js.map +1 -0
- package/dist/src/public/sandboxes/vercel-sandbox.d.ts +42 -0
- package/dist/src/public/sandboxes/vercel-sandbox.d.ts.map +1 -0
- package/dist/src/public/sandboxes/vercel-sandbox.js +2 -0
- package/dist/src/public/sandboxes/vercel-sandbox.js.map +1 -0
- package/dist/src/public/schedules/index.d.ts +2 -17
- package/dist/src/public/schedules/index.d.ts.map +1 -1
- package/dist/src/public/schedules/index.js +2 -17
- package/dist/src/public/schedules/index.js.map +1 -1
- package/dist/src/public/skills/index.d.ts +3 -20
- package/dist/src/public/skills/index.d.ts.map +1 -1
- package/dist/src/public/skills/index.js +2 -19
- package/dist/src/public/skills/index.js.map +1 -1
- package/dist/src/public/system/index.d.ts +2 -28
- package/dist/src/public/system/index.d.ts.map +1 -1
- package/dist/src/public/system/index.js +2 -28
- package/dist/src/public/system/index.js.map +1 -1
- package/dist/src/public/tools/approval/approval-helpers.d.ts +1 -1
- package/dist/src/public/tools/approval/approval-helpers.d.ts.map +1 -1
- package/dist/src/public/tools/approval/index.d.ts +2 -20
- package/dist/src/public/tools/approval/index.d.ts.map +1 -1
- package/dist/src/public/tools/approval/index.js +1 -19
- package/dist/src/public/tools/approval/index.js.map +1 -1
- package/dist/src/public/tools/defaults.d.ts +1 -1
- package/dist/src/public/tools/defaults.d.ts.map +1 -1
- package/dist/src/public/tools/defaults.js +10 -30
- package/dist/src/public/tools/defaults.js.map +1 -1
- package/dist/src/public/tools/define-bash-tool.d.ts +2 -18
- package/dist/src/public/tools/define-bash-tool.d.ts.map +1 -1
- package/dist/src/public/tools/define-bash-tool.js +3 -19
- package/dist/src/public/tools/define-bash-tool.js.map +1 -1
- package/dist/src/public/tools/define-glob-tool.d.ts +1 -1
- package/dist/src/public/tools/define-glob-tool.d.ts.map +1 -1
- package/dist/src/public/tools/define-glob-tool.js +2 -2
- package/dist/src/public/tools/define-glob-tool.js.map +1 -1
- package/dist/src/public/tools/define-grep-tool.d.ts +1 -1
- package/dist/src/public/tools/define-grep-tool.d.ts.map +1 -1
- package/dist/src/public/tools/define-grep-tool.js +2 -2
- package/dist/src/public/tools/define-grep-tool.js.map +1 -1
- package/dist/src/public/tools/define-read-file-tool.d.ts +1 -1
- package/dist/src/public/tools/define-read-file-tool.d.ts.map +1 -1
- package/dist/src/public/tools/define-read-file-tool.js +3 -3
- package/dist/src/public/tools/define-read-file-tool.js.map +1 -1
- package/dist/src/public/tools/define-write-file-tool.d.ts +1 -1
- package/dist/src/public/tools/define-write-file-tool.d.ts.map +1 -1
- package/dist/src/public/tools/define-write-file-tool.js +2 -2
- package/dist/src/public/tools/define-write-file-tool.js.map +1 -1
- package/dist/src/public/tools/index.d.ts +7 -30
- package/dist/src/public/tools/index.d.ts.map +1 -1
- package/dist/src/public/tools/index.js +7 -30
- package/dist/src/public/tools/index.js.map +1 -1
- package/dist/src/public/tools/internal.d.ts +2 -12
- package/dist/src/public/tools/internal.d.ts.map +1 -1
- package/dist/src/public/tools/internal.js +0 -10
- package/dist/src/public/tools/internal.js.map +1 -1
- package/dist/src/public/types/json.d.ts +29 -0
- package/dist/src/public/types/json.d.ts.map +1 -0
- package/dist/src/public/types/json.js +14 -0
- package/dist/src/public/types/json.js.map +1 -0
- package/dist/src/runtime/actions/types.d.ts +14 -14
- package/dist/src/runtime/actions/types.js +2 -2
- package/dist/src/runtime/actions/types.js.map +1 -1
- package/dist/src/runtime/agent/bootstrap-model.d.ts +1 -1
- package/dist/src/runtime/agent/bootstrap-model.d.ts.map +1 -1
- package/dist/src/runtime/agent/bootstrap-model.js +2 -2
- package/dist/src/runtime/agent/bootstrap-model.js.map +1 -1
- package/dist/src/runtime/agent/bootstrap.d.ts +10 -38
- package/dist/src/runtime/agent/bootstrap.d.ts.map +1 -1
- package/dist/src/runtime/agent/bootstrap.js +28 -63
- package/dist/src/runtime/agent/bootstrap.js.map +1 -1
- package/dist/src/runtime/agent/mock-model-adapter.d.ts +1 -1
- package/dist/src/runtime/agent/mock-model-adapter.d.ts.map +1 -1
- package/dist/src/runtime/agent/mock-model-adapter.js +2 -2
- package/dist/src/runtime/agent/mock-model-adapter.js.map +1 -1
- package/dist/src/runtime/agent/resolve-model.d.ts +3 -3
- package/dist/src/runtime/agent/resolve-model.d.ts.map +1 -1
- package/dist/src/runtime/agent/resolve-model.js +6 -6
- package/dist/src/runtime/agent/resolve-model.js.map +1 -1
- package/dist/src/runtime/cache-key.d.ts +1 -1
- package/dist/src/runtime/cache-key.d.ts.map +1 -1
- package/dist/src/runtime/cache-key.js +3 -3
- package/dist/src/runtime/cache-key.js.map +1 -1
- package/dist/src/runtime/channels/registry.d.ts +4 -2
- package/dist/src/runtime/channels/registry.d.ts.map +1 -1
- package/dist/src/runtime/channels/registry.js +89 -28
- package/dist/src/runtime/channels/registry.js.map +1 -1
- package/dist/src/runtime/compiled-artifacts-source.d.ts +18 -1
- package/dist/src/runtime/compiled-artifacts-source.d.ts.map +1 -1
- package/dist/src/runtime/compiled-artifacts-source.js +19 -2
- package/dist/src/runtime/compiled-artifacts-source.js.map +1 -1
- package/dist/src/runtime/connections/authorization-complete-page.d.ts +12 -0
- package/dist/src/runtime/connections/authorization-complete-page.d.ts.map +1 -0
- package/dist/src/runtime/connections/authorization-complete-page.js +73 -0
- package/dist/src/runtime/connections/authorization-complete-page.js.map +1 -0
- package/dist/src/runtime/connections/authorization-tokens.d.ts +57 -0
- package/dist/src/runtime/connections/authorization-tokens.d.ts.map +1 -0
- package/dist/src/runtime/connections/authorization-tokens.js +93 -0
- package/dist/src/runtime/connections/authorization-tokens.js.map +1 -0
- package/dist/src/runtime/connections/callback-route.d.ts +57 -0
- package/dist/src/runtime/connections/callback-route.d.ts.map +1 -0
- package/dist/src/runtime/connections/callback-route.js +140 -0
- package/dist/src/runtime/connections/callback-route.js.map +1 -0
- package/dist/src/runtime/connections/mcp-client.d.ts +9 -2
- package/dist/src/runtime/connections/mcp-client.d.ts.map +1 -1
- package/dist/src/runtime/connections/mcp-client.js +60 -2
- package/dist/src/runtime/connections/mcp-client.js.map +1 -1
- package/dist/src/runtime/connections/principal-context.d.ts +101 -0
- package/dist/src/runtime/connections/principal-context.d.ts.map +1 -0
- package/dist/src/runtime/connections/principal-context.js +112 -0
- package/dist/src/runtime/connections/principal-context.js.map +1 -0
- package/dist/src/runtime/connections/principal.d.ts +74 -0
- package/dist/src/runtime/connections/principal.d.ts.map +1 -0
- package/dist/src/runtime/connections/principal.js +107 -0
- package/dist/src/runtime/connections/principal.js.map +1 -0
- package/dist/src/runtime/connections/registry.d.ts +4 -4
- package/dist/src/runtime/connections/registry.d.ts.map +1 -1
- package/dist/src/runtime/connections/registry.js +1 -1
- package/dist/src/runtime/connections/registry.js.map +1 -1
- package/dist/src/runtime/connections/types.d.ts +204 -17
- package/dist/src/runtime/connections/types.d.ts.map +1 -1
- package/dist/src/runtime/connections/types.js +34 -1
- package/dist/src/runtime/connections/types.js.map +1 -1
- package/dist/src/runtime/connections/validate-authorization.d.ts +33 -0
- package/dist/src/runtime/connections/validate-authorization.d.ts.map +1 -0
- package/dist/src/runtime/connections/validate-authorization.js +84 -0
- package/dist/src/runtime/connections/validate-authorization.js.map +1 -0
- package/dist/src/runtime/framework-channels/index.d.ts +6 -19
- package/dist/src/runtime/framework-channels/index.d.ts.map +1 -1
- package/dist/src/runtime/framework-channels/index.js +14 -21
- package/dist/src/runtime/framework-channels/index.js.map +1 -1
- package/dist/src/runtime/framework-tools/ask-question.d.ts +2 -2
- package/dist/src/runtime/framework-tools/ask-question.d.ts.map +1 -1
- package/dist/src/runtime/framework-tools/ask-question.js +1 -1
- package/dist/src/runtime/framework-tools/ask-question.js.map +1 -1
- package/dist/src/runtime/framework-tools/bash.d.ts +2 -2
- package/dist/src/runtime/framework-tools/bash.d.ts.map +1 -1
- package/dist/src/runtime/framework-tools/bash.js +1 -1
- package/dist/src/runtime/framework-tools/bash.js.map +1 -1
- package/dist/src/runtime/framework-tools/connection-search.d.ts +54 -15
- package/dist/src/runtime/framework-tools/connection-search.d.ts.map +1 -1
- package/dist/src/runtime/framework-tools/connection-search.js +154 -17
- package/dist/src/runtime/framework-tools/connection-search.js.map +1 -1
- package/dist/src/runtime/framework-tools/connection-tools.d.ts +23 -14
- package/dist/src/runtime/framework-tools/connection-tools.d.ts.map +1 -1
- package/dist/src/runtime/framework-tools/connection-tools.js +71 -32
- package/dist/src/runtime/framework-tools/connection-tools.js.map +1 -1
- package/dist/src/runtime/framework-tools/file-state.d.ts +2 -2
- package/dist/src/runtime/framework-tools/file-state.d.ts.map +1 -1
- package/dist/src/runtime/framework-tools/file-state.js +1 -1
- package/dist/src/runtime/framework-tools/file-state.js.map +1 -1
- package/dist/src/runtime/framework-tools/glob.d.ts +2 -2
- package/dist/src/runtime/framework-tools/glob.d.ts.map +1 -1
- package/dist/src/runtime/framework-tools/glob.js +1 -1
- package/dist/src/runtime/framework-tools/glob.js.map +1 -1
- package/dist/src/runtime/framework-tools/grep.d.ts +2 -2
- package/dist/src/runtime/framework-tools/grep.d.ts.map +1 -1
- package/dist/src/runtime/framework-tools/grep.js +1 -1
- package/dist/src/runtime/framework-tools/grep.js.map +1 -1
- package/dist/src/runtime/framework-tools/index.d.ts +11 -16
- package/dist/src/runtime/framework-tools/index.d.ts.map +1 -1
- package/dist/src/runtime/framework-tools/index.js +38 -52
- package/dist/src/runtime/framework-tools/index.js.map +1 -1
- package/dist/src/runtime/framework-tools/pending-connection-tool-calls.d.ts +79 -0
- package/dist/src/runtime/framework-tools/pending-connection-tool-calls.d.ts.map +1 -0
- package/dist/src/runtime/framework-tools/pending-connection-tool-calls.js +64 -0
- package/dist/src/runtime/framework-tools/pending-connection-tool-calls.js.map +1 -0
- package/dist/src/runtime/framework-tools/read-file.d.ts +2 -2
- package/dist/src/runtime/framework-tools/read-file.d.ts.map +1 -1
- package/dist/src/runtime/framework-tools/read-file.js +2 -2
- package/dist/src/runtime/framework-tools/read-file.js.map +1 -1
- package/dist/src/runtime/framework-tools/skill.d.ts +5 -12
- package/dist/src/runtime/framework-tools/skill.d.ts.map +1 -1
- package/dist/src/runtime/framework-tools/skill.js +7 -17
- package/dist/src/runtime/framework-tools/skill.js.map +1 -1
- package/dist/src/runtime/framework-tools/todo.d.ts +2 -2
- package/dist/src/runtime/framework-tools/todo.d.ts.map +1 -1
- package/dist/src/runtime/framework-tools/todo.js +2 -2
- package/dist/src/runtime/framework-tools/todo.js.map +1 -1
- package/dist/src/runtime/framework-tools/web-fetch.d.ts +1 -1
- package/dist/src/runtime/framework-tools/web-fetch.d.ts.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/web-search.d.ts +1 -1
- package/dist/src/runtime/framework-tools/web-search.d.ts.map +1 -1
- package/dist/src/runtime/framework-tools/write-file.d.ts +2 -2
- package/dist/src/runtime/framework-tools/write-file.d.ts.map +1 -1
- package/dist/src/runtime/framework-tools/write-file.js +1 -1
- package/dist/src/runtime/framework-tools/write-file.js.map +1 -1
- package/dist/src/runtime/governance/auth/http-basic.d.ts +1 -1
- package/dist/src/runtime/governance/auth/http-basic.d.ts.map +1 -1
- package/dist/src/runtime/governance/auth/http-basic.js.map +1 -1
- package/dist/src/runtime/governance/auth/jwt-ecdsa.d.ts +1 -1
- package/dist/src/runtime/governance/auth/jwt-ecdsa.d.ts.map +1 -1
- package/dist/src/runtime/governance/auth/jwt-ecdsa.js +2 -2
- package/dist/src/runtime/governance/auth/jwt-ecdsa.js.map +1 -1
- package/dist/src/runtime/governance/auth/jwt-hmac.d.ts +1 -1
- package/dist/src/runtime/governance/auth/jwt-hmac.d.ts.map +1 -1
- package/dist/src/runtime/governance/auth/jwt-hmac.js +2 -2
- package/dist/src/runtime/governance/auth/jwt-hmac.js.map +1 -1
- package/dist/src/runtime/governance/auth/oidc.d.ts +1 -1
- package/dist/src/runtime/governance/auth/oidc.d.ts.map +1 -1
- package/dist/src/runtime/governance/auth/oidc.js +31 -10
- package/dist/src/runtime/governance/auth/oidc.js.map +1 -1
- package/dist/src/runtime/governance/auth/token-claims.d.ts +2 -2
- package/dist/src/runtime/governance/auth/token-claims.d.ts.map +1 -1
- package/dist/src/runtime/governance/auth/types.d.ts +16 -2
- package/dist/src/runtime/governance/auth/types.d.ts.map +1 -1
- package/dist/src/runtime/governance/auth/types.js.map +1 -1
- package/dist/src/runtime/graph.d.ts +17 -10
- package/dist/src/runtime/graph.d.ts.map +1 -1
- package/dist/src/runtime/graph.js +6 -6
- package/dist/src/runtime/graph.js.map +1 -1
- package/dist/src/runtime/hooks/registry.d.ts +53 -0
- package/dist/src/runtime/hooks/registry.d.ts.map +1 -0
- package/dist/src/runtime/hooks/registry.js +54 -0
- package/dist/src/runtime/hooks/registry.js.map +1 -0
- package/dist/src/runtime/input/types.js +1 -1
- package/dist/src/runtime/input/types.js.map +1 -1
- package/dist/src/runtime/loaders/bundled-artifacts.d.ts +3 -3
- package/dist/src/runtime/loaders/bundled-artifacts.d.ts.map +1 -1
- package/dist/src/runtime/loaders/bundled-artifacts.js +1 -1
- package/dist/src/runtime/loaders/bundled-artifacts.js.map +1 -1
- package/dist/src/runtime/loaders/compile-metadata.d.ts +2 -2
- package/dist/src/runtime/loaders/compile-metadata.d.ts.map +1 -1
- package/dist/src/runtime/loaders/compile-metadata.js +3 -3
- package/dist/src/runtime/loaders/compile-metadata.js.map +1 -1
- package/dist/src/runtime/loaders/manifest.d.ts +2 -2
- package/dist/src/runtime/loaders/manifest.d.ts.map +1 -1
- package/dist/src/runtime/loaders/manifest.js +4 -4
- package/dist/src/runtime/loaders/manifest.js.map +1 -1
- package/dist/src/runtime/loaders/module-map.d.ts +2 -2
- package/dist/src/runtime/loaders/module-map.d.ts.map +1 -1
- package/dist/src/runtime/loaders/module-map.js +4 -72
- package/dist/src/runtime/loaders/module-map.js.map +1 -1
- package/dist/src/runtime/prompt/compose.d.ts +4 -4
- package/dist/src/runtime/prompt/compose.d.ts.map +1 -1
- package/dist/src/runtime/prompt/compose.js +3 -3
- package/dist/src/runtime/prompt/compose.js.map +1 -1
- package/dist/src/runtime/prompt/connections.d.ts +1 -1
- package/dist/src/runtime/prompt/connections.d.ts.map +1 -1
- package/dist/src/runtime/prompt/connections.js +1 -1
- package/dist/src/runtime/prompt/connections.js.map +1 -1
- package/dist/src/runtime/resolve-agent-graph.d.ts +5 -5
- package/dist/src/runtime/resolve-agent-graph.d.ts.map +1 -1
- package/dist/src/runtime/resolve-agent-graph.js +45 -61
- package/dist/src/runtime/resolve-agent-graph.js.map +1 -1
- package/dist/src/runtime/resolve-agent.d.ts +4 -4
- package/dist/src/runtime/resolve-agent.d.ts.map +1 -1
- package/dist/src/runtime/resolve-agent.js +45 -46
- package/dist/src/runtime/resolve-agent.js.map +1 -1
- package/dist/src/runtime/resolve-channel.d.ts +3 -3
- package/dist/src/runtime/resolve-channel.d.ts.map +1 -1
- package/dist/src/runtime/resolve-channel.js +6 -4
- package/dist/src/runtime/resolve-channel.js.map +1 -1
- package/dist/src/runtime/resolve-connection.d.ts +5 -5
- package/dist/src/runtime/resolve-connection.d.ts.map +1 -1
- package/dist/src/runtime/resolve-connection.js +13 -17
- package/dist/src/runtime/resolve-connection.js.map +1 -1
- package/dist/src/runtime/resolve-helpers.d.ts +5 -10
- package/dist/src/runtime/resolve-helpers.d.ts.map +1 -1
- package/dist/src/runtime/resolve-helpers.js +4 -11
- package/dist/src/runtime/resolve-helpers.js.map +1 -1
- package/dist/src/runtime/resolve-hook.d.ts +14 -0
- package/dist/src/runtime/resolve-hook.d.ts.map +1 -0
- package/dist/src/runtime/resolve-hook.js +68 -0
- package/dist/src/runtime/resolve-hook.js.map +1 -0
- package/dist/src/runtime/resolve-sandbox.d.ts +3 -3
- package/dist/src/runtime/resolve-sandbox.d.ts.map +1 -1
- package/dist/src/runtime/resolve-sandbox.js +5 -5
- package/dist/src/runtime/resolve-sandbox.js.map +1 -1
- package/dist/src/runtime/resolve-tool.d.ts +3 -3
- package/dist/src/runtime/resolve-tool.d.ts.map +1 -1
- package/dist/src/runtime/resolve-tool.js +4 -3
- package/dist/src/runtime/resolve-tool.js.map +1 -1
- package/dist/src/runtime/{sandboxes → sandbox}/keys.d.ts +7 -10
- package/dist/src/runtime/sandbox/keys.d.ts.map +1 -0
- package/dist/src/runtime/{sandboxes → sandbox}/keys.js +15 -33
- package/dist/src/runtime/sandbox/keys.js.map +1 -0
- package/dist/src/runtime/sandbox/registry.d.ts +61 -0
- package/dist/src/runtime/sandbox/registry.d.ts.map +1 -0
- package/dist/src/runtime/sandbox/registry.js +43 -0
- package/dist/src/runtime/sandbox/registry.js.map +1 -0
- package/dist/src/runtime/schedules/register.d.ts +2 -11
- package/dist/src/runtime/schedules/register.d.ts.map +1 -1
- package/dist/src/runtime/schedules/register.js +0 -31
- package/dist/src/runtime/schedules/register.js.map +1 -1
- package/dist/src/runtime/schedules/resolve-schedule.d.ts +3 -3
- package/dist/src/runtime/schedules/resolve-schedule.d.ts.map +1 -1
- package/dist/src/runtime/schedules/resolve-schedule.js +3 -2
- package/dist/src/runtime/schedules/resolve-schedule.js.map +1 -1
- package/dist/src/runtime/sessions/auth.d.ts +1 -7
- package/dist/src/runtime/sessions/auth.d.ts.map +1 -1
- package/dist/src/runtime/sessions/auth.js +1 -19
- package/dist/src/runtime/sessions/auth.js.map +1 -1
- package/dist/src/runtime/sessions/compiled-agent-cache.d.ts +15 -13
- package/dist/src/runtime/sessions/compiled-agent-cache.d.ts.map +1 -1
- package/dist/src/runtime/sessions/compiled-agent-cache.js +35 -16
- package/dist/src/runtime/sessions/compiled-agent-cache.js.map +1 -1
- package/dist/src/runtime/sessions/runtime-session.d.ts +5 -21
- package/dist/src/runtime/sessions/runtime-session.d.ts.map +1 -1
- package/dist/src/runtime/sessions/runtime-session.js +2 -17
- package/dist/src/runtime/sessions/runtime-session.js.map +1 -1
- package/dist/src/runtime/sessions/turn.d.ts +9 -18
- package/dist/src/runtime/sessions/turn.d.ts.map +1 -1
- package/dist/src/runtime/skills/load-skill-content.d.ts +2 -3
- package/dist/src/runtime/skills/load-skill-content.d.ts.map +1 -1
- package/dist/src/runtime/skills/load-skill-content.js +1 -4
- package/dist/src/runtime/skills/load-skill-content.js.map +1 -1
- package/dist/src/runtime/skills/load-skills.d.ts +2 -18
- package/dist/src/runtime/skills/load-skills.d.ts.map +1 -1
- package/dist/src/runtime/skills/load-skills.js +1 -30
- package/dist/src/runtime/skills/load-skills.js.map +1 -1
- package/dist/src/runtime/skills/source.d.ts +6 -19
- package/dist/src/runtime/skills/source.d.ts.map +1 -1
- package/dist/src/runtime/skills/source.js +33 -14
- package/dist/src/runtime/skills/source.js.map +1 -1
- package/dist/src/runtime/standard-schema.d.ts +1 -1
- package/dist/src/runtime/standard-schema.d.ts.map +1 -1
- package/dist/src/runtime/subagents/registry.d.ts +5 -5
- package/dist/src/runtime/subagents/registry.d.ts.map +1 -1
- package/dist/src/runtime/subagents/registry.js +30 -30
- package/dist/src/runtime/subagents/registry.js.map +1 -1
- package/dist/src/runtime/tools/registry.d.ts +2 -2
- package/dist/src/runtime/tools/registry.d.ts.map +1 -1
- package/dist/src/runtime/tools/registry.js +1 -1
- package/dist/src/runtime/tools/registry.js.map +1 -1
- package/dist/src/runtime/types.d.ts +93 -94
- package/dist/src/runtime/types.d.ts.map +1 -1
- package/dist/src/runtime/validation.js +1 -1
- package/dist/src/runtime/validation.js.map +1 -1
- package/dist/src/runtime/workspace/seed-files.d.ts +1 -1
- package/dist/src/runtime/workspace/seed-files.d.ts.map +1 -1
- package/dist/src/runtime/workspace/seed-files.js +1 -1
- package/dist/src/runtime/workspace/seed-files.js.map +1 -1
- package/dist/src/runtime/workspace/spec.d.ts +3 -16
- package/dist/src/runtime/workspace/spec.d.ts.map +1 -1
- package/dist/src/runtime/workspace/spec.js +1 -14
- package/dist/src/runtime/workspace/spec.js.map +1 -1
- package/dist/src/sandbox/state.d.ts +34 -0
- package/dist/src/sandbox/state.d.ts.map +1 -0
- package/dist/src/sandbox/state.js +2 -0
- package/dist/src/sandbox/state.js.map +1 -0
- package/dist/src/services/dev-client/live-stream.d.ts +1 -1
- package/dist/src/services/dev-client/live-stream.d.ts.map +1 -1
- package/dist/src/services/dev-client/live-stream.js +1 -1
- package/dist/src/services/dev-client/live-stream.js.map +1 -1
- package/dist/src/services/dev-client/request-headers.d.ts +14 -1
- package/dist/src/services/dev-client/request-headers.d.ts.map +1 -1
- package/dist/src/services/dev-client/request-headers.js +70 -31
- package/dist/src/services/dev-client/request-headers.js.map +1 -1
- package/dist/src/services/dev-client/send-message.d.ts +3 -3
- package/dist/src/services/dev-client/send-message.d.ts.map +1 -1
- package/dist/src/services/dev-client/send-message.js +7 -7
- package/dist/src/services/dev-client/send-message.js.map +1 -1
- package/dist/src/services/dev-client/session.d.ts +1 -1
- package/dist/src/services/dev-client/session.d.ts.map +1 -1
- package/dist/src/services/dev-client/session.js +1 -1
- package/dist/src/services/dev-client/session.js.map +1 -1
- package/dist/src/services/dev-client/stream.d.ts +1 -1
- package/dist/src/services/dev-client/stream.d.ts.map +1 -1
- package/dist/src/services/dev-client/stream.js +2 -2
- package/dist/src/services/dev-client/stream.js.map +1 -1
- package/dist/src/services/dev-client/vercel-auth-error.d.ts +43 -0
- package/dist/src/services/dev-client/vercel-auth-error.d.ts.map +1 -0
- package/dist/src/services/dev-client/vercel-auth-error.js +99 -0
- package/dist/src/services/dev-client/vercel-auth-error.js.map +1 -0
- package/dist/src/services/dev-client.d.ts +5 -5
- package/dist/src/services/dev-client.d.ts.map +1 -1
- package/dist/src/services/dev-client.js +36 -8
- package/dist/src/services/dev-client.js.map +1 -1
- package/dist/src/services/host.d.ts +2 -1
- package/dist/src/services/host.d.ts.map +1 -1
- package/dist/src/services/host.js +1 -1
- package/dist/src/services/host.js.map +1 -1
- package/dist/src/services/inspect-application.d.ts +2 -2
- package/dist/src/services/inspect-application.d.ts.map +1 -1
- package/dist/src/services/inspect-application.js +12 -4
- package/dist/src/services/inspect-application.js.map +1 -1
- package/dist/src/shared/agent-definition.d.ts +112 -0
- package/dist/src/shared/agent-definition.d.ts.map +1 -0
- package/dist/src/shared/agent-definition.js +2 -0
- package/dist/src/shared/agent-definition.js.map +1 -0
- package/dist/src/shared/errors.d.ts +18 -0
- package/dist/src/shared/errors.d.ts.map +1 -0
- package/dist/src/shared/errors.js +67 -0
- package/dist/src/shared/errors.js.map +1 -0
- package/dist/src/shared/guards.d.ts +32 -0
- package/dist/src/shared/guards.d.ts.map +1 -0
- package/dist/src/shared/guards.js +36 -0
- package/dist/src/shared/guards.js.map +1 -0
- package/dist/src/shared/node.d.ts +7 -0
- package/dist/src/shared/node.d.ts.map +1 -0
- package/dist/src/shared/node.js +2 -0
- package/dist/src/shared/node.js.map +1 -0
- package/dist/src/shared/optional.d.ts +3 -1
- package/dist/src/shared/optional.d.ts.map +1 -1
- package/dist/src/shared/skill-definition.d.ts +8 -0
- package/dist/src/shared/skill-definition.d.ts.map +1 -0
- package/dist/src/shared/skill-definition.js +2 -0
- package/dist/src/shared/skill-definition.js.map +1 -0
- package/dist/src/{internal → shared}/source-ref.d.ts +17 -11
- package/dist/src/shared/source-ref.d.ts.map +1 -0
- package/dist/src/{internal → shared}/source-ref.js.map +1 -1
- package/dist/src/shared/tool-definition.d.ts +14 -3
- package/dist/src/shared/tool-definition.d.ts.map +1 -1
- package/package.json +56 -50
- package/dist/src/cli/templates/init-app/agent/tools/get_weather.ts +0 -14
- package/dist/src/discover/sandboxes.d.ts.map +0 -1
- package/dist/src/discover/sandboxes.js.map +0 -1
- package/dist/src/execution/sandboxes/bash-tool.d.ts.map +0 -1
- package/dist/src/execution/sandboxes/bash-tool.js.map +0 -1
- package/dist/src/execution/sandboxes/bindings/local.d.ts.map +0 -1
- package/dist/src/execution/sandboxes/bindings/local.js.map +0 -1
- package/dist/src/execution/sandboxes/bindings/vercel.d.ts +0 -33
- package/dist/src/execution/sandboxes/bindings/vercel.d.ts.map +0 -1
- package/dist/src/execution/sandboxes/bindings/vercel.js.map +0 -1
- package/dist/src/execution/sandboxes/ensure.d.ts +0 -41
- package/dist/src/execution/sandboxes/ensure.d.ts.map +0 -1
- package/dist/src/execution/sandboxes/ensure.js +0 -125
- package/dist/src/execution/sandboxes/ensure.js.map +0 -1
- package/dist/src/execution/sandboxes/glob-tool.d.ts +0 -35
- package/dist/src/execution/sandboxes/glob-tool.d.ts.map +0 -1
- package/dist/src/execution/sandboxes/glob-tool.js.map +0 -1
- package/dist/src/execution/sandboxes/grep-tool.d.ts.map +0 -1
- package/dist/src/execution/sandboxes/grep-tool.js.map +0 -1
- package/dist/src/execution/sandboxes/prewarm.d.ts.map +0 -1
- package/dist/src/execution/sandboxes/prewarm.js.map +0 -1
- package/dist/src/execution/sandboxes/read-file-tool.d.ts.map +0 -1
- package/dist/src/execution/sandboxes/require-sandbox.d.ts.map +0 -1
- package/dist/src/execution/sandboxes/require-sandbox.js.map +0 -1
- package/dist/src/execution/sandboxes/ripgrep-probe.d.ts.map +0 -1
- package/dist/src/execution/sandboxes/ripgrep-probe.js.map +0 -1
- package/dist/src/execution/sandboxes/session.d.ts.map +0 -1
- package/dist/src/execution/sandboxes/session.js.map +0 -1
- package/dist/src/execution/sandboxes/shell-quote.d.ts.map +0 -1
- package/dist/src/execution/sandboxes/shell-quote.js.map +0 -1
- package/dist/src/execution/sandboxes/truncate-output.d.ts.map +0 -1
- package/dist/src/execution/sandboxes/truncate-output.js.map +0 -1
- package/dist/src/execution/sandboxes/types.d.ts +0 -33
- package/dist/src/execution/sandboxes/types.d.ts.map +0 -1
- package/dist/src/execution/sandboxes/types.js +0 -2
- package/dist/src/execution/sandboxes/types.js.map +0 -1
- package/dist/src/execution/sandboxes/write-file-tool.d.ts.map +0 -1
- package/dist/src/execution/session-snapshot.d.ts +0 -21
- package/dist/src/execution/session-snapshot.d.ts.map +0 -1
- package/dist/src/execution/session-snapshot.js +0 -58
- package/dist/src/execution/session-snapshot.js.map +0 -1
- package/dist/src/internal/message/builder.d.ts.map +0 -1
- package/dist/src/internal/message/builder.js.map +0 -1
- package/dist/src/internal/message/health.d.ts +0 -5
- package/dist/src/internal/message/health.d.ts.map +0 -1
- package/dist/src/internal/message/health.js +0 -13
- package/dist/src/internal/message/health.js.map +0 -1
- package/dist/src/internal/message/nitro-step-entry.d.ts.map +0 -1
- package/dist/src/internal/message/nitro-step-entry.js.map +0 -1
- package/dist/src/internal/message/vercel-workflow-output.d.ts.map +0 -1
- package/dist/src/internal/message/vercel-workflow-output.js.map +0 -1
- package/dist/src/internal/nitro/host/configure-message-routes.d.ts +0 -11
- package/dist/src/internal/nitro/host/configure-message-routes.d.ts.map +0 -1
- package/dist/src/internal/nitro/host/configure-message-routes.js +0 -274
- package/dist/src/internal/nitro/host/configure-message-routes.js.map +0 -1
- package/dist/src/internal/nitro/host/prewarm-vercel-sandboxes.d.ts.map +0 -1
- package/dist/src/internal/nitro/host/prewarm-vercel-sandboxes.js.map +0 -1
- package/dist/src/internal/nitro/routes/web-ui/assets/index.js +0 -11
- package/dist/src/internal/nitro/shims/schedule-task-handler.d.ts +0 -16
- package/dist/src/internal/nitro/shims/schedule-task-handler.d.ts.map +0 -1
- package/dist/src/internal/nitro/shims/schedule-task-handler.js +0 -39
- package/dist/src/internal/nitro/shims/schedule-task-handler.js.map +0 -1
- package/dist/src/internal/source-ref.d.ts.map +0 -1
- package/dist/src/public/definitions/subagent.d.ts +0 -23
- package/dist/src/public/definitions/subagent.d.ts.map +0 -1
- package/dist/src/public/definitions/subagent.js +0 -7
- package/dist/src/public/definitions/subagent.js.map +0 -1
- package/dist/src/public/sandboxes/backends/default.d.ts +0 -20
- package/dist/src/public/sandboxes/backends/default.d.ts.map +0 -1
- package/dist/src/public/sandboxes/backends/default.js.map +0 -1
- package/dist/src/public/sandboxes/backends/local.d.ts.map +0 -1
- package/dist/src/public/sandboxes/backends/local.js.map +0 -1
- package/dist/src/public/sandboxes/backends/vercel.d.ts +0 -29
- package/dist/src/public/sandboxes/backends/vercel.d.ts.map +0 -1
- package/dist/src/public/sandboxes/backends/vercel.js +0 -30
- package/dist/src/public/sandboxes/backends/vercel.js.map +0 -1
- package/dist/src/public/sandboxes/defaults.d.ts +0 -12
- package/dist/src/public/sandboxes/defaults.d.ts.map +0 -1
- package/dist/src/public/sandboxes/defaults.js +0 -31
- package/dist/src/public/sandboxes/defaults.js.map +0 -1
- package/dist/src/public/sandboxes/index.d.ts +0 -43
- package/dist/src/public/sandboxes/index.d.ts.map +0 -1
- package/dist/src/public/sandboxes/index.js +0 -42
- package/dist/src/public/sandboxes/index.js.map +0 -1
- package/dist/src/public/sandboxes/internal.d.ts +0 -14
- package/dist/src/public/sandboxes/internal.d.ts.map +0 -1
- package/dist/src/public/sandboxes/internal.js +0 -25
- package/dist/src/public/sandboxes/internal.js.map +0 -1
- package/dist/src/public/subagents/index.d.ts +0 -19
- package/dist/src/public/subagents/index.d.ts.map +0 -1
- package/dist/src/public/subagents/index.js +0 -19
- package/dist/src/public/subagents/index.js.map +0 -1
- package/dist/src/runtime/framework-sandboxes/default.d.ts +0 -29
- package/dist/src/runtime/framework-sandboxes/default.d.ts.map +0 -1
- package/dist/src/runtime/framework-sandboxes/default.js +0 -37
- package/dist/src/runtime/framework-sandboxes/default.js.map +0 -1
- package/dist/src/runtime/framework-sandboxes/index.d.ts +0 -2
- package/dist/src/runtime/framework-sandboxes/index.d.ts.map +0 -1
- package/dist/src/runtime/framework-sandboxes/index.js +0 -2
- package/dist/src/runtime/framework-sandboxes/index.js.map +0 -1
- package/dist/src/runtime/sandboxes/keys.d.ts.map +0 -1
- package/dist/src/runtime/sandboxes/keys.js.map +0 -1
- package/dist/src/runtime/sandboxes/registry.d.ts +0 -49
- package/dist/src/runtime/sandboxes/registry.d.ts.map +0 -1
- package/dist/src/runtime/sandboxes/registry.js +0 -50
- package/dist/src/runtime/sandboxes/registry.js.map +0 -1
- package/dist/src/runtime/skills/types.d.ts +0 -8
- package/dist/src/runtime/skills/types.d.ts.map +0 -1
- package/dist/src/runtime/skills/types.js +0 -2
- package/dist/src/runtime/skills/types.js.map +0 -1
- package/dist/src/shared/source-metadata.d.ts +0 -16
- package/dist/src/shared/source-metadata.d.ts.map +0 -1
- package/dist/src/shared/source-metadata.js +0 -2
- package/dist/src/shared/source-metadata.js.map +0 -1
- package/docs/internals/README.md +0 -72
- package/docs/internals/channels.md +0 -108
- package/docs/internals/compiler-and-artifacts.md +0 -250
- package/docs/internals/context.md +0 -302
- package/docs/internals/discovery.md +0 -289
- package/docs/internals/message-runtime.md +0 -169
- package/docs/internals/testing.md +0 -238
- package/docs/public/schedules.md +0 -70
- /package/{docs → dist/docs}/external-agent-protocol.md +0 -0
- /package/dist/src/execution/{sandboxes → sandbox}/bash-tool.d.ts +0 -0
- /package/dist/src/execution/{sandboxes → sandbox}/read-file-tool.d.ts +0 -0
- /package/dist/src/execution/{sandboxes → sandbox}/shell-quote.d.ts +0 -0
- /package/dist/src/execution/{sandboxes → sandbox}/shell-quote.js +0 -0
- /package/dist/src/execution/{sandboxes → sandbox}/truncate-output.d.ts +0 -0
- /package/dist/src/execution/{sandboxes → sandbox}/truncate-output.js +0 -0
- /package/dist/src/execution/{sandboxes → sandbox}/write-file-tool.d.ts +0 -0
- /package/dist/src/internal/nitro/routes/web-ui/assets/{style.css → style-Kqb6YxTP.css} +0 -0
- /package/dist/src/{internal → shared}/source-ref.js +0 -0
package/README.md
CHANGED
|
@@ -7,6 +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
|
+
- `connections/` define external MCP server connections
|
|
10
11
|
- `sandbox/` overrides the agent's single sandbox (optional) and seeds workspace files
|
|
11
12
|
- `channels/` define message ingress and delivery
|
|
12
13
|
- `subagents/` define specialist child agents
|
|
@@ -51,6 +52,7 @@ my-agent/
|
|
|
51
52
|
├── system/
|
|
52
53
|
├── skills/
|
|
53
54
|
├── tools/
|
|
55
|
+
├── connections/
|
|
54
56
|
├── sandbox/
|
|
55
57
|
├── channels/
|
|
56
58
|
├── subagents/
|
|
@@ -122,6 +124,7 @@ Start here:
|
|
|
122
124
|
3. [`docs/public/project-layout.md`](docs/public/project-layout.md)
|
|
123
125
|
4. [`docs/public/agent-ts.md`](docs/public/agent-ts.md)
|
|
124
126
|
5. [`docs/public/typescript-api.md`](docs/public/typescript-api.md)
|
|
127
|
+
6. [`docs/public/connections.md`](docs/public/connections.md)
|
|
125
128
|
|
|
126
129
|
## Repo Guide
|
|
127
130
|
|
package/bin/ash.d.ts
CHANGED
|
@@ -41,6 +41,11 @@ export interface BootstrapCliModule {
|
|
|
41
41
|
|
|
42
42
|
export interface BootstrapDependencies extends BootstrapBuildDependencies {
|
|
43
43
|
importModule?: (specifier: string) => Promise<BootstrapCliModule>;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Node.js version string used by tests to exercise the bin version guard.
|
|
47
|
+
*/
|
|
48
|
+
nodeVersion?: string;
|
|
44
49
|
}
|
|
45
50
|
|
|
46
51
|
/**
|
package/bin/ash.js
CHANGED
|
@@ -7,6 +7,7 @@ import { dirname, resolve } from "node:path";
|
|
|
7
7
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
8
8
|
|
|
9
9
|
const require = createRequire(import.meta.url);
|
|
10
|
+
const minimumNodeMajorVersion = 24;
|
|
10
11
|
|
|
11
12
|
function createBootstrapOptions(overrides = {}) {
|
|
12
13
|
const packageRoot =
|
|
@@ -105,6 +106,27 @@ function inputTsconfigPath({ packageRoot }) {
|
|
|
105
106
|
return resolve(packageRoot, "tsconfig.json");
|
|
106
107
|
}
|
|
107
108
|
|
|
109
|
+
function parseNodeMajorVersion(version) {
|
|
110
|
+
const match = /^v?(\d+)/.exec(version);
|
|
111
|
+
return match ? Number(match[1]) : undefined;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
function assertSupportedNodeVersion(version = process.version) {
|
|
115
|
+
const majorVersion = parseNodeMajorVersion(version);
|
|
116
|
+
|
|
117
|
+
if (majorVersion !== undefined && majorVersion >= minimumNodeMajorVersion) {
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
throw new Error(
|
|
122
|
+
[
|
|
123
|
+
`Ash requires Node.js ${minimumNodeMajorVersion} or newer.`,
|
|
124
|
+
`You are running ${version}.`,
|
|
125
|
+
"Please upgrade Node.js and try again.",
|
|
126
|
+
].join(" "),
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
|
|
108
130
|
function resolveTsgoCliPath({ tsgoCliPath }) {
|
|
109
131
|
if (tsgoCliPath) {
|
|
110
132
|
return tsgoCliPath;
|
|
@@ -203,6 +225,8 @@ export async function ensureBuiltCli(overrides = {}, dependencies = {}) {
|
|
|
203
225
|
* Runs the compiled Ash CLI, building the workspace package on demand when needed.
|
|
204
226
|
*/
|
|
205
227
|
export async function runAshCli(argv = process.argv.slice(2), overrides = {}, dependencies = {}) {
|
|
228
|
+
assertSupportedNodeVersion(dependencies.nodeVersion);
|
|
229
|
+
|
|
206
230
|
const cliEntrypointPath = await ensureBuiltCli(overrides, dependencies);
|
|
207
231
|
const importModule = dependencies.importModule ?? ((specifier) => import(specifier));
|
|
208
232
|
const cliModule = await importModule(pathToFileURL(cliEntrypointPath).href);
|
|
@@ -238,5 +262,11 @@ if (await isDirectExecution()) {
|
|
|
238
262
|
const message = error instanceof Error ? error.message : String(error);
|
|
239
263
|
console.error(message);
|
|
240
264
|
process.exitCode = 1;
|
|
265
|
+
} finally {
|
|
266
|
+
// The CLI bootstraps build/dev toolchains that can leave native service
|
|
267
|
+
// handles alive after the command has completed. Once the top-level
|
|
268
|
+
// command resolves, terminate the bin process explicitly so commands like
|
|
269
|
+
// `ash dev` + `/exit` do not hang on leaked implementation details.
|
|
270
|
+
process.exit(process.exitCode ?? 0);
|
|
241
271
|
}
|
|
242
272
|
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Internals
|
|
2
|
+
|
|
3
|
+
The architecture is a three-layer split:
|
|
4
|
+
|
|
5
|
+
- **Channels** normalize platform input, define continuation tokens, and own delivery policy.
|
|
6
|
+
- **The harness** does one unit of AI work and returns `{ session, next }`.
|
|
7
|
+
- **The runtime** persists state, follows `next`, streams events, and owns workflow primitives.
|
|
8
|
+
|
|
9
|
+
All runtime state flows through a single `AshContext` bound by one `AsyncLocalStorage`. Authored code should not know anything about workflow orchestration.
|
|
10
|
+
|
|
11
|
+
## Start Here
|
|
12
|
+
|
|
13
|
+
If you want the shortest path through the architecture, read these in order:
|
|
14
|
+
|
|
15
|
+
1. `packages/ash/src/protocol/routes.ts`
|
|
16
|
+
2. `packages/ash/src/protocol/message.ts`
|
|
17
|
+
3. `packages/ash/src/channel/types.ts`
|
|
18
|
+
4. `packages/ash/src/harness/tool-loop.ts`
|
|
19
|
+
5. `packages/ash/src/harness/types.ts`
|
|
20
|
+
6. `packages/ash/src/context/container.ts`
|
|
21
|
+
7. `packages/ash/src/context/keys.ts`
|
|
22
|
+
8. `packages/ash/src/execution/workflow-entry.ts`
|
|
23
|
+
9. `packages/ash/src/execution/workflow-runtime.ts`
|
|
24
|
+
|
|
25
|
+
## Guides
|
|
26
|
+
|
|
27
|
+
- [`../../ARCHITECTURE.md`](../../ARCHITECTURE.md) — the repo-level architecture map
|
|
28
|
+
- [`core-beliefs.md`](./core-beliefs.md) — the principles behind Ash's architecture rules
|
|
29
|
+
- [`mechanical-invariants.md`](./mechanical-invariants.md) — detailed constraints that should become lints or structural tests
|
|
30
|
+
- [`context.md`](./context.md) — the unified context system
|
|
31
|
+
- [`compiler-and-artifacts.md`](./compiler-and-artifacts.md) — how authored files become `.ash/` artifacts
|
|
32
|
+
- [`discovery.md`](./discovery.md) — how the framework finds authored sources
|
|
33
|
+
- [`message-runtime.md`](./message-runtime.md) — the HTTP surface and runtime execution
|
|
34
|
+
- [`testing.md`](./testing.md) — test tiers and helpers
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Compiler and Artifacts
|
|
2
|
+
|
|
3
|
+
The compiler takes discovery output and freezes it into inspectable artifacts under `.ash/`. This is the bridge between the authoring tree and the runtime — the runtime never crawls the raw authoring tree.
|
|
4
|
+
|
|
5
|
+
## Flow
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
resolveDiscoveryProject() → discoverAgent() → writeCompilerArtifacts()
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Artifacts are written even when discovery has errors, so `ash info` and inspection always work. `CompileAgentError` is thrown after writing.
|
|
12
|
+
|
|
13
|
+
## Artifact Layout
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
.ash/
|
|
17
|
+
discovery/
|
|
18
|
+
agent-discovery-manifest.json # serialized discovery result (compiler input)
|
|
19
|
+
diagnostics.json # accumulated diagnostics + summary counts
|
|
20
|
+
compile/
|
|
21
|
+
compiled-agent-manifest.json # normalized runtime-facing manifest
|
|
22
|
+
compile-metadata.json # hashes, status, artifact paths
|
|
23
|
+
module-map.mjs # static imports keyed by (nodeId, sourceId)
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Module Map
|
|
27
|
+
|
|
28
|
+
Discovery avoids executing authored code. The module map is the handoff — it statically imports every module-backed authored source so the runtime can resolve tool execute functions, sandbox lifecycle hooks, and model instances from stable `(nodeId, sourceId)` coordinates.
|
|
29
|
+
|
|
30
|
+
`lib/` modules are not indexed directly but come in transitively through normal imports.
|
|
31
|
+
|
|
32
|
+
## Key Artifacts
|
|
33
|
+
|
|
34
|
+
**`compiled-agent-manifest.json`** — the normalized runtime-facing manifest. Preserves config, prompt, skill, sandbox, schedule, and tool metadata; flattened subagent nodes with explicit `subagentEdges`; manifest kind and version. `sandbox` is `null` or one entry, and `sandboxWorkspaces` is an array of size 0 or 1 (single-sandbox model).
|
|
35
|
+
|
|
36
|
+
**`compile-metadata.json`** — artifact paths, SHA-256 digests, diagnostics summary, compile status, generator version, and `sourceGraphHash`. The `sourceGraphHash` drives sandbox template cache invalidation — runtime and Vercel build-time prewarm both derive template keys from it.
|
|
37
|
+
|
|
38
|
+
**`module-map.mjs`** — frozen object keyed by `(nodeId, sourceId)`. Authored sandbox modules are indexed directly (runtime needs their lifecycle hooks); `lib/` modules come in transitively.
|
|
39
|
+
|
|
40
|
+
## Bundled Artifacts
|
|
41
|
+
|
|
42
|
+
Both Nitro handlers and workflow bundles need compiled artifacts without re-deriving them at request time. `compiled-artifacts.ts` generates a bootstrap module that embeds the manifest, context, workspace, metadata, and module map, then installs them into the runtime loader.
|
|
43
|
+
|
|
44
|
+
Schedule resolution only happens after a clean compile — core artifacts are always written, but registration requires valid compiled state.
|
|
45
|
+
|
|
46
|
+
## Invariants
|
|
47
|
+
|
|
48
|
+
- Keep artifacts inspectable and versioned.
|
|
49
|
+
- Do not move runtime behavior into the compiler.
|
|
50
|
+
- Do not make runtime request paths depend on rediscovery.
|
|
51
|
+
- Keep module execution deferred until runtime.
|
|
52
|
+
- Preserve stable `sourceId` keys across discovery, compiler, and runtime.
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# Unified Context
|
|
2
|
+
|
|
3
|
+
Ash uses a single `AshContext` container bound by one `AsyncLocalStorage` instance. No secondary storage, no custom dehydration, no out-of-band parameter passing.
|
|
4
|
+
|
|
5
|
+
## Core Model
|
|
6
|
+
|
|
7
|
+
`ContextContainer` holds a durable map and a virtual overlay. Reads check the virtual overlay first, then the durable map. Writes always target the durable map.
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
interface AshContext {
|
|
11
|
+
get<T>(key: ContextKey<T>): T | undefined;
|
|
12
|
+
require<T>(key: ContextKey<T>): T;
|
|
13
|
+
has<T>(key: ContextKey<T>): boolean;
|
|
14
|
+
set<T>(key: ContextKey<T>, value: T): T;
|
|
15
|
+
set<T>(key: ContextKey<T>, updater: (current: T | undefined) => T): T;
|
|
16
|
+
ensure<T>(key: ContextKey<T>, create: () => T): T;
|
|
17
|
+
}
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
`loadContext()` returns the active context or throws. Public accessors (`getSession()`, `getSandbox()`, `getSkill()`) delegate to it.
|
|
21
|
+
|
|
22
|
+
## Type Hierarchy
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
ContextReader { get, require, has }
|
|
26
|
+
↑ extends
|
|
27
|
+
ContextAccessor { set, ensure }
|
|
28
|
+
↑ extends
|
|
29
|
+
AshContext { entries() }
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Seed Keys
|
|
33
|
+
|
|
34
|
+
Set by the runtime entry point. Serialized at `"use step"` boundaries via their codec. Keys self-register in a global registry — the serialization layer resolves string names back to typed keys from this registry.
|
|
35
|
+
|
|
36
|
+
| Key | Type |
|
|
37
|
+
| ---------------------- | ---------------------------- |
|
|
38
|
+
| `AuthKey` | `SessionAuthContext \| null` |
|
|
39
|
+
| `InitiatorAuthKey` | `SessionAuthContext \| null` |
|
|
40
|
+
| `SessionIdKey` | `string` |
|
|
41
|
+
| `RunIdKey` | `string` |
|
|
42
|
+
| `ContinuationTokenKey` | `string` |
|
|
43
|
+
| `ModeKey` | `RunMode` |
|
|
44
|
+
| `NodeSelectorKey` | `string` |
|
|
45
|
+
| `ParentSessionKey` | `SessionParent` |
|
|
46
|
+
| `ChannelKey` | `Channel` |
|
|
47
|
+
| `BundleKey` | `CompiledBundle` |
|
|
48
|
+
| `SessionPreparedKey` | `boolean` |
|
|
49
|
+
|
|
50
|
+
## Virtual Keys
|
|
51
|
+
|
|
52
|
+
Created by providers during `runStep`. Never serialized — reconstructed each step.
|
|
53
|
+
|
|
54
|
+
| Key | Type | Provider |
|
|
55
|
+
| ------------ | --------------- | ----------------- |
|
|
56
|
+
| `SessionKey` | `Session` | `sessionProvider` |
|
|
57
|
+
| `SandboxKey` | `SandboxAccess` | `sandboxProvider` |
|
|
58
|
+
| `SkillKey` | `SkillAccess` | `skillProvider` |
|
|
59
|
+
|
|
60
|
+
## Providers
|
|
61
|
+
|
|
62
|
+
Providers implement `ContextProvider<T>` and run in dependency order during `runStep`:
|
|
63
|
+
|
|
64
|
+
1. `sessionProvider` — depends on seed keys only
|
|
65
|
+
2. `sandboxProvider` — depends on `BundleKey`, `SessionIdKey`
|
|
66
|
+
3. `skillProvider` — depends on `BundleKey`
|
|
67
|
+
4. Channel-declared public providers — depend on whatever is visible after `onDeliver()`
|
|
68
|
+
|
|
69
|
+
Framework providers use a superset `FrameworkContextProvider` that also receives the harness session and may commit provider-owned session data after the step.
|
|
70
|
+
|
|
71
|
+
## Step Runner
|
|
72
|
+
|
|
73
|
+
`runStep` orchestrates the provider lifecycle:
|
|
74
|
+
|
|
75
|
+
1. Clear the previous step's virtual overlay
|
|
76
|
+
2. Build framework virtual providers in dependency order
|
|
77
|
+
3. Build channel-scoped public providers
|
|
78
|
+
4. Run the callback inside `contextStorage.run(ctx, ...)`
|
|
79
|
+
5. Call framework provider `commit` hooks for provider-owned session state
|
|
80
|
+
|
|
81
|
+
Authored hook lifecycle dispatch (`lifecycle.session`, `lifecycle.turn`)
|
|
82
|
+
runs inside step (4)'s ALS scope, before the harness step. See
|
|
83
|
+
[`./hooks.md`](./hooks.md) for the full pipeline and the
|
|
84
|
+
`SessionPreparedKey` flag's failure semantics.
|
|
85
|
+
|
|
86
|
+
## Channel Context
|
|
87
|
+
|
|
88
|
+
Channels set custom durable context keys inside `onDeliver(ctx, payload)`. The method receives a `ContextAccessor` and returns `Promise<StepInput>`. This runs once per turn (both initial `run()` and each `deliver()`), after auth keys are seeded. Channel code stays workflow-agnostic because it only touches the accessor.
|
|
89
|
+
|
|
90
|
+
Auth lives on the run and deliver inputs:
|
|
91
|
+
|
|
92
|
+
- `RunInput.auth` — the caller for the current run
|
|
93
|
+
- `RunInput.initiatorAuth` — the caller that started the durable session
|
|
94
|
+
- On `deliver()`, `AuthKey` updates from `DeliverInput.auth` so `session.auth.current` reflects the follow-up caller while `session.auth.initiator` stays the same.
|
|
95
|
+
|
|
96
|
+
## Step Boundary Serialization
|
|
97
|
+
|
|
98
|
+
At each `"use step"` boundary, `serializeContext` iterates all entries and calls each codec. `deserializeContext` resolves string names back to typed keys via the global registry. Keys without a codec must be JSON-safe.
|
|
99
|
+
|
|
100
|
+
The workflow runtime serializes the durable context at `start()` time, then threads the latest serialized context forward after every durable step. Each step boundary deserializes, `onDeliver()` mutates for the turn, and providers reconstruct virtual values.
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Core Beliefs
|
|
2
|
+
|
|
3
|
+
This document explains the model behind the rules in [`AGENTS.md`](../../AGENTS.md).
|
|
4
|
+
Rules say what to do; this file explains why those rules exist.
|
|
5
|
+
|
|
6
|
+
## The Filesystem Is The Authoring Surface
|
|
7
|
+
|
|
8
|
+
Ash apps should be readable before they are executed. A contributor should be
|
|
9
|
+
able to inspect `agent/` and understand the agent's instructions, tools,
|
|
10
|
+
connections, channels, hooks, schedules, and subagents without tracing
|
|
11
|
+
generated code.
|
|
12
|
+
|
|
13
|
+
That is why authored identifiers are derived from paths. A file path is a single
|
|
14
|
+
source of truth; a repeated `name` field is a second source that can drift.
|
|
15
|
+
|
|
16
|
+
The hooks surface (`agent/hooks/`) deliberately reuses the unified
|
|
17
|
+
`AshContext` rather than introducing a parallel state-patch channel:
|
|
18
|
+
hooks read and write through `ctx.ash` like every other authored
|
|
19
|
+
function. One context, one set of keys, one place to look when debugging.
|
|
20
|
+
|
|
21
|
+
## Durable Work Belongs In The Runtime
|
|
22
|
+
|
|
23
|
+
Workflow primitives are runtime concerns. Channels should understand platforms,
|
|
24
|
+
harnesses should understand one unit of AI work, and runtime/execution should
|
|
25
|
+
understand persistence, workflow steps, resumptions, and streams.
|
|
26
|
+
|
|
27
|
+
Keeping that split intact gives Ash a small set of places where durable behavior
|
|
28
|
+
can be reasoned about, tested, and changed.
|
|
29
|
+
|
|
30
|
+
## The Harness Decides Control Flow
|
|
31
|
+
|
|
32
|
+
The harness returns `next`: continue with another step, wait for a follow-up, or
|
|
33
|
+
finish with output. The runtime follows that instruction. Re-creating model,
|
|
34
|
+
tool, or platform policy in the runtime loop makes behavior harder to inspect
|
|
35
|
+
and easier to fork accidentally.
|
|
36
|
+
|
|
37
|
+
## Context Is A Single Ambient Contract
|
|
38
|
+
|
|
39
|
+
Ash uses one `AshContext` container for runtime state. Seed keys carry
|
|
40
|
+
serializable values across step boundaries; providers derive values for the
|
|
41
|
+
current step. Additional `AsyncLocalStorage` instances or hidden dehydration
|
|
42
|
+
protocols create parallel contracts that agents and humans must rediscover.
|
|
43
|
+
|
|
44
|
+
## Public APIs Need A Harness
|
|
45
|
+
|
|
46
|
+
Every public API should have documentation and a fixture. The documentation
|
|
47
|
+
teaches app authors and coding agents how to use the API; the fixture proves the
|
|
48
|
+
surface works through the same shape users will depend on.
|
|
49
|
+
|
|
50
|
+
## Scenario Tests Are The Verification Ritual
|
|
51
|
+
|
|
52
|
+
Scenario tests are not only a test tier. They are the place where a contributor
|
|
53
|
+
can verify that an Ash behavior works from the outside: compile an app, run the
|
|
54
|
+
runtime, exercise the channel or route, and inspect the result.
|
|
55
|
+
|
|
56
|
+
If a scenario test is too complex to read quickly, split it. The goal is not just
|
|
57
|
+
coverage; it is a legible proof of behavior.
|
|
58
|
+
|
|
59
|
+
## Pre-1.0 Means Prefer Correctness
|
|
60
|
+
|
|
61
|
+
Ash is still pre-1.0. When a current design is wrong, fix the contract instead
|
|
62
|
+
of layering compatibility around it. Backwards compatibility matters for shipped
|
|
63
|
+
behavior, persisted data, and stable public interfaces; it should not preserve
|
|
64
|
+
in-progress mistakes on the current branch.
|
|
65
|
+
|
|
66
|
+
## Plans Are Part Of The System
|
|
67
|
+
|
|
68
|
+
Active plans are design intent, not chat transcripts. If
|
|
69
|
+
[`research/active/`](../../research/active/README.md) says one thing and the code
|
|
70
|
+
says another, treat that as spec drift. Either update the code to match the plan
|
|
71
|
+
or update the plan in a separate PR before continuing.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Discovery
|
|
2
|
+
|
|
3
|
+
Discovery answers: given an app root and agent root, what authored sources exist? It does not execute authored code.
|
|
4
|
+
|
|
5
|
+
## Project Resolution
|
|
6
|
+
|
|
7
|
+
`resolveDiscoveryProject()` walks upward from a start path looking for a supported layout:
|
|
8
|
+
|
|
9
|
+
- **nested**: app root has `package.json`, agent lives under `agent/`
|
|
10
|
+
- **flat**: project root is the agent root
|
|
11
|
+
|
|
12
|
+
## Agent Scan
|
|
13
|
+
|
|
14
|
+
`discoverAgent()` reads the agent root, sorts entries by name (for stable manifest ordering), and scans each slot:
|
|
15
|
+
|
|
16
|
+
- `system.md` / `system/` — prompt sources
|
|
17
|
+
- `agent.ts` — optional config module (reference only)
|
|
18
|
+
- `tools/` — module-backed, never imported. File stem becomes runtime tool name.
|
|
19
|
+
- `hooks/` — module-backed lifecycle and stream-event subscribers, recursively discovered. Path-relative slug becomes the hook id.
|
|
20
|
+
- `skills/` — flat markdown/module files, or packaged `skills/<name>/SKILL.md`
|
|
21
|
+
- `sandbox/` — single folder. Optional `sandbox.<ext>` lifecycle module + `workspace/**` seed files.
|
|
22
|
+
- `subagents/` — local subagent packages, recursively discovered
|
|
23
|
+
- `schedules/` — each schedule is a directory containing `schedule.ts` (module definition with `cron` and `channel`) and `prompt.md` (prompt text)
|
|
24
|
+
- `lib/` — package-local helpers, not a runtime surface
|
|
25
|
+
|
|
26
|
+
**Markdown sources** are read and lowered into definition objects during discovery. **Module sources** are preserved as `ModuleSourceRef` (`logicalPath`, `sourceId`, optional `exportName`) — never imported.
|
|
27
|
+
|
|
28
|
+
The output is `DiscoverAgentResult` with `diagnostics` and `manifest` (`AgentSourceManifest`). The manifest is the compiler input contract, not the runtime manifest.
|
|
29
|
+
|
|
30
|
+
## Subagents
|
|
31
|
+
|
|
32
|
+
Local subagents (`subagents/<name>/`) are recursively discovered. Each gets its own `AgentSourceManifest` with its own `system`, `tools/`, `skills/`, `sandbox/`, and nested `subagents/`. An `agent.ts` config module is required (subagents reuse the same `defineAgent` surface as the root agent).
|
|
33
|
+
|
|
34
|
+
## Diagnostics
|
|
35
|
+
|
|
36
|
+
Discovery accumulates diagnostics instead of failing early. Partial results are always preserved — even a broken subagent appears in the manifest. This makes `ash info` and artifact inspection useful regardless of errors.
|
|
37
|
+
|
|
38
|
+
## Unified Slot Walker
|
|
39
|
+
|
|
40
|
+
`channels/`, `hooks/`, and `tools/` all ride the unified
|
|
41
|
+
`discoverNamedModuleDirectory` helper in `discover/grammar.ts`. It supports both
|
|
42
|
+
flat (`tools/`) and recursive (`channels/`, `hooks/`) walks, plus per-segment
|
|
43
|
+
validation (used by `channels/`, `hooks/`, `tools/`). Adding a new authored
|
|
44
|
+
module slot typically means: register a directory name in `filesystem.ts`, add
|
|
45
|
+
a slug validator in `grammar.ts`, call `discoverNamedModuleDirectory` from the
|
|
46
|
+
parent discoverer.
|
|
47
|
+
|
|
48
|
+
`schedules/` retains a bespoke `discoverScheduleSources` walker because each
|
|
49
|
+
schedule is a directory containing `schedule.ts` plus `prompt.md`, which does
|
|
50
|
+
not fit the flat-or-recursive "module-only" shape the unified helper expects.
|
|
51
|
+
When the helper grows a markdown extension, `schedules/` collapses into it.
|
|
52
|
+
|
|
53
|
+
## Extension Pattern
|
|
54
|
+
|
|
55
|
+
Adding a new authored slot: teach discovery to find it → extend the manifest → teach the compiler to write artifacts → teach the runtime to resolve it.
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
# Hooks
|
|
2
|
+
|
|
3
|
+
Hooks are the first-class extension point for authored agent code that needs
|
|
4
|
+
to run **around** a turn instead of inside it. Tools answer the model;
|
|
5
|
+
hooks answer the runtime.
|
|
6
|
+
|
|
7
|
+
This page explains the discovery → compile → resolve → dispatch pipeline
|
|
8
|
+
and the runtime contract every authored hook handler relies on. The
|
|
9
|
+
end-user-facing reference lives at
|
|
10
|
+
[`docs/public/hooks.md`](../public/hooks.md).
|
|
11
|
+
|
|
12
|
+
## Architectural Rationale
|
|
13
|
+
|
|
14
|
+
Plugins and authored agent code need to subscribe to the same lifecycle
|
|
15
|
+
moments. Shipping hooks first closes the gap between "extension authored
|
|
16
|
+
inside the agent" and "extension contributed by a plugin": both flow
|
|
17
|
+
through one runtime registry, one `HookContext`, one set of ordering
|
|
18
|
+
rules.
|
|
19
|
+
|
|
20
|
+
The hooks surface deliberately reuses the unified `AshContext`:
|
|
21
|
+
`HookContext.ash` is the same `ContextAccessor` tools, providers, and
|
|
22
|
+
channels get. There is no parallel state-patch channel — one
|
|
23
|
+
`AshContext`, one set of keys, one place to look when debugging.
|
|
24
|
+
|
|
25
|
+
`HookContext` itself is intentionally tiny: `agent`, `channel`, `session`
|
|
26
|
+
identity plus the `ash` accessor. Per-turn `turnId` and `sequence` come
|
|
27
|
+
from `LifecycleHookInput.turn` for lifecycle hooks, and from
|
|
28
|
+
`event.data.{turnId, sequence}` for stream-event hooks — never duplicated
|
|
29
|
+
on the context.
|
|
30
|
+
|
|
31
|
+
## Authoring shape
|
|
32
|
+
|
|
33
|
+
```ts
|
|
34
|
+
defineHook({
|
|
35
|
+
lifecycle?: {
|
|
36
|
+
session?: LifecycleHook;
|
|
37
|
+
turn?: LifecycleHook;
|
|
38
|
+
};
|
|
39
|
+
events?: {
|
|
40
|
+
[K in HandleMessageStreamEvent["type"]]?: StreamEventHook<…>;
|
|
41
|
+
"*"?: StreamEventHook<HandleMessageStreamEvent>;
|
|
42
|
+
};
|
|
43
|
+
});
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
The split between `lifecycle:` and `events:` is structural so the
|
|
47
|
+
contract is explicit at the call site. `lifecycle:` may return
|
|
48
|
+
`{ modelContext? }` — visible to the next model call only, never written
|
|
49
|
+
to durable history. `events:` is observe-only.
|
|
50
|
+
|
|
51
|
+
## Pipeline
|
|
52
|
+
|
|
53
|
+
Discovery (`src/discover/discover-agent.ts` and `discover-subagent.ts`)
|
|
54
|
+
walks `agent/hooks/` recursively via the unified
|
|
55
|
+
`discoverNamedModuleDirectory` helper, validates each path segment with
|
|
56
|
+
`createHookNameDiagnostic` (charset identical to `TOOL_SLUG_PATTERN`),
|
|
57
|
+
and emits `ModuleSourceRef[]` on the `hooks` field of
|
|
58
|
+
`AgentSourceManifest`.
|
|
59
|
+
|
|
60
|
+
Compile (`src/compiler/normalize-hook.ts`) derives the path-relative
|
|
61
|
+
slug (`agent/hooks/auth/load-profile.ts` → `"auth/load-profile"`) and
|
|
62
|
+
produces `CompiledHookDefinition` entries on the compiled manifest. The
|
|
63
|
+
compiler performs no per-handler validation — hook handlers are
|
|
64
|
+
arbitrary functions and can only be inspected at runtime.
|
|
65
|
+
|
|
66
|
+
Resolve (`src/runtime/resolve-hook.ts`) loads the authored module
|
|
67
|
+
export and reads its nested `lifecycle` and `events` maps directly. Each
|
|
68
|
+
declared handler must be a function; mismatches throw
|
|
69
|
+
`ResolveAgentError` so typos surface at boot. There is no hardcoded
|
|
70
|
+
list of valid event types — unknown event keys are accepted at resolve
|
|
71
|
+
time and simply never fire at dispatch time.
|
|
72
|
+
|
|
73
|
+
Registry (`src/runtime/hooks/registry.ts`) builds a
|
|
74
|
+
`RuntimeHookRegistry` per resolved agent node:
|
|
75
|
+
|
|
76
|
+
- `session` — flat ordered array of `lifecycle.session` subscribers.
|
|
77
|
+
- `turn` — flat ordered array of `lifecycle.turn` subscribers.
|
|
78
|
+
- `streamEventsByType` — bucketed map keyed by event type.
|
|
79
|
+
- `streamEventsWildcard` — flat array of `*` subscribers.
|
|
80
|
+
|
|
81
|
+
The registry hangs off `ResolvedRuntimeAgentNode.hookRegistry` and is
|
|
82
|
+
also surfaced on the `CompiledRuntimeAgentBundle` for direct access from
|
|
83
|
+
the workflow path.
|
|
84
|
+
|
|
85
|
+
## Dispatch
|
|
86
|
+
|
|
87
|
+
Lifecycle dispatch lives in `src/context/hook-lifecycle.ts`. Both
|
|
88
|
+
runtime entry points (`execution/workflow-steps.ts` for the durable
|
|
89
|
+
workflow path and `execution/continuous-entry.ts` for the in-memory
|
|
90
|
+
continuous path) call `runHookLifecycleStep` once per turn, **inside**
|
|
91
|
+
the active ALS scope so hook code can read and write `ctx.ash` like
|
|
92
|
+
every other authored function. `runHookLifecycleStep` wraps
|
|
93
|
+
`dispatchHookLifecycle`, lowers a `turn-failed` outcome into a parking
|
|
94
|
+
`StepResult` (`{ next: null }` for conversation mode,
|
|
95
|
+
`{ next: { done: true, output } }` for task mode), and otherwise hands
|
|
96
|
+
off to the supplied harness step callback with the (possibly
|
|
97
|
+
augmented) input.
|
|
98
|
+
|
|
99
|
+
Both runtime entry points gate dispatch on
|
|
100
|
+
`getHarnessEmissionState(session).turnId === ""` so tool-loop
|
|
101
|
+
continuations and runtime-action resumes (which are continuations of
|
|
102
|
+
an existing turn) skip the lifecycle stack.
|
|
103
|
+
|
|
104
|
+
Stages, in order:
|
|
105
|
+
|
|
106
|
+
1. **`lifecycle.session`** runs sequentially in registry order, but
|
|
107
|
+
only when `ash.sessionPrepared` is unset. The dispatcher sets the
|
|
108
|
+
flag **before** running the chain so a thrown hook does not retry on
|
|
109
|
+
the next turn — `lifecycle.session` errors are terminal session
|
|
110
|
+
failures (`session.failed`).
|
|
111
|
+
2. **`lifecycle.turn`** runs sequentially. Each hook may return
|
|
112
|
+
`{ modelContext? }`. Contributions from session and turn are
|
|
113
|
+
concatenated; the resulting `modelContext` becomes a one-shot
|
|
114
|
+
addition to the next model call's message list. A thrown hook is
|
|
115
|
+
caught here and lowered into a recoverable `turn.failed` cascade
|
|
116
|
+
(`session.started` once → `turn.started` → `message.received` →
|
|
117
|
+
`step.failed` → `turn.failed` → `session.waiting`).
|
|
118
|
+
|
|
119
|
+
If an event hook subscribed to one of the failure-cascade events
|
|
120
|
+
itself throws while the dispatcher is emitting the recoverable
|
|
121
|
+
`turn.failed`, the throw escalates and the runtime emits
|
|
122
|
+
`session.failed` instead. This is the bounded second-order behavior
|
|
123
|
+
when both a `lifecycle.turn` and a `turn.failed` event hook fail.
|
|
124
|
+
|
|
125
|
+
Stream-event dispatch is `dispatchStreamEventHooks`, called from each
|
|
126
|
+
runtime's `HarnessEmitFn` composer **after** the channel adapter's
|
|
127
|
+
event handler runs. The dispatcher reads the typed bucket
|
|
128
|
+
(`registry.streamEventsByType.get(eventType)`) followed by the flat
|
|
129
|
+
wildcard bucket (`registry.streamEventsWildcard`); thrown errors
|
|
130
|
+
propagate through the emit composer. The existing harness error path
|
|
131
|
+
catches them and emits the recoverable `turn.failed` cascade.
|
|
132
|
+
|
|
133
|
+
## `SessionPreparedKey`
|
|
134
|
+
|
|
135
|
+
Lives in `src/context/seed-keys.ts`. JSON-safe boolean, no codec. Set
|
|
136
|
+
**before** the `lifecycle.session` chain runs so a thrown hook leaves
|
|
137
|
+
the flag set — the next turn does not retry. Compaction does not clear
|
|
138
|
+
the flag.
|
|
139
|
+
|
|
140
|
+
## Subagent Isolation
|
|
141
|
+
|
|
142
|
+
Subagent hooks are fully isolated by structural construction:
|
|
143
|
+
|
|
144
|
+
- Each subagent runs through its own `runStep(ctx, …)` ALS scope,
|
|
145
|
+
established by the existing subagent invocation pipeline. Hooks
|
|
146
|
+
resolve from the subagent node's `hookRegistry`, not the parent
|
|
147
|
+
agent's.
|
|
148
|
+
- `ctx.ash` reads hit the subagent's container, not the parent's.
|
|
149
|
+
- Lexicographic ordering applies within a subagent's hook set only.
|
|
150
|
+
Parent and child registries do not interleave.
|
|
151
|
+
|
|
152
|
+
The `discover/discover-subagent.ts` path walks each local subagent's
|
|
153
|
+
`hooks/` directory using the same unified helper as the root agent.
|
|
154
|
+
|
|
155
|
+
## Error Containment
|
|
156
|
+
|
|
157
|
+
| Stage | On throw |
|
|
158
|
+
| ------------------- | -------------------------------------------------------------------------------------- |
|
|
159
|
+
| `lifecycle.session` | Re-thrown by dispatcher → terminal session failure (`session.failed`) |
|
|
160
|
+
| `lifecycle.turn` | Caught by dispatcher → recoverable `turn.failed` cascade emitted |
|
|
161
|
+
| Stream-event hooks | Propagated through the emit composer → existing harness error path emits `turn.failed` |
|
|
162
|
+
|
|
163
|
+
The contract with `HarnessEmitFn`: the wrapped emit fn calls the
|
|
164
|
+
channel adapter's event handler first, writes the (possibly
|
|
165
|
+
transformed) event to the durable stream, **then** fans out to authored
|
|
166
|
+
stream-event hook subscribers. The durable record is consistent with
|
|
167
|
+
what was written even if a downstream hook throws.
|
|
168
|
+
|
|
169
|
+
## Testing Strategy
|
|
170
|
+
|
|
171
|
+
- Unit tests live alongside the implementation
|
|
172
|
+
(`src/runtime/hooks/registry.ts` ⇄ `runtime/hooks/registry.test.ts`,
|
|
173
|
+
`src/compiler/normalize-hook.ts` ⇄ `compiler/normalize-hook.test.ts`,
|
|
174
|
+
`src/runtime/resolve-hook.ts` ⇄ `runtime/resolve-hook.test.ts`).
|
|
175
|
+
- Lifecycle dispatcher behavior is covered by
|
|
176
|
+
`src/context/hook-lifecycle.integration.test.ts` (synthetic context,
|
|
177
|
+
session/turn modelContext threading, recoverable turn-failed path,
|
|
178
|
+
stream-event fan-out, error propagation).
|
|
179
|
+
- Discovery integration is folded into
|
|
180
|
+
`src/discover/agent.integration.test.ts` (recursive walk,
|
|
181
|
+
slug-charset rejection).
|
|
182
|
+
- End-to-end on-disk → bundle → dispatch wiring is pinned by
|
|
183
|
+
`test/scenarios/hooks-end-to-end.scenario.test.ts`.
|
|
184
|
+
|
|
185
|
+
## Mechanical Invariants
|
|
186
|
+
|
|
187
|
+
The plan calls these out as lints / structural tests to land alongside
|
|
188
|
+
hook adoption. They are not yet enforced mechanically and live as
|
|
189
|
+
documented expectations:
|
|
190
|
+
|
|
191
|
+
- Hook modules never import workflow primitives (`start`, `resumeHook`,
|
|
192
|
+
`createHook`, `getWritable`).
|
|
193
|
+
- Hook return shapes have no `state` field — durable state goes through
|
|
194
|
+
`ctx.ash`.
|
|
195
|
+
- Subagent hooks never read parent ALS context.
|
|
196
|
+
|
|
197
|
+
## Related Pages
|
|
198
|
+
|
|
199
|
+
- [`docs/public/hooks.md`](../public/hooks.md) — author-facing reference
|
|
200
|
+
- [`./discovery.md`](./discovery.md) — discovery layout and the unified slot walker
|
|
201
|
+
- [`./context.md`](./context.md) — `AshContext` surface shared by hooks
|
|
202
|
+
- [`./message-runtime.md`](./message-runtime.md) — runtime stream events
|