experimental-ash 0.1.0-alpha.2 → 0.1.0-alpha.20
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 +598 -0
- package/dist/src/cli/commands/info.d.ts.map +1 -1
- package/dist/src/cli/commands/info.js +12 -41
- package/dist/src/cli/commands/info.js.map +1 -1
- package/dist/src/cli/commands/init.d.ts +14 -0
- package/dist/src/cli/commands/init.d.ts.map +1 -0
- package/dist/src/cli/commands/init.js +89 -0
- package/dist/src/cli/commands/init.js.map +1 -0
- package/dist/src/cli/dev/request-headers.d.ts +2 -1
- package/dist/src/cli/dev/request-headers.d.ts.map +1 -1
- package/dist/src/cli/dev/request-headers.js +1 -1
- package/dist/src/cli/dev/request-headers.js.map +1 -1
- package/dist/src/cli/run.d.ts.map +1 -1
- package/dist/src/cli/run.js +12 -0
- package/dist/src/cli/run.js.map +1 -1
- package/dist/src/cli/templates/init-app/.vercelignore +11 -0
- package/dist/src/cli/templates/init-app/agent/agent.ts +6 -0
- package/dist/src/cli/templates/init-app/agent/system.md +3 -0
- package/dist/src/cli/templates/init-app/agent/tools/get-weather.ts +13 -0
- package/dist/src/cli/templates/init-app/gitignore +8 -0
- package/dist/src/cli/templates/init-app/package.json +17 -0
- package/dist/src/cli/templates/init-app/tsconfig.json +16 -0
- package/dist/src/compiler/artifacts.d.ts +2 -13
- package/dist/src/compiler/artifacts.d.ts.map +1 -1
- package/dist/src/compiler/artifacts.js +8 -38
- package/dist/src/compiler/artifacts.js.map +1 -1
- package/dist/src/compiler/compile-agent.d.ts +0 -4
- package/dist/src/compiler/compile-agent.d.ts.map +1 -1
- package/dist/src/compiler/compile-agent.js +0 -2
- package/dist/src/compiler/compile-agent.js.map +1 -1
- package/dist/src/compiler/manifest.d.ts +68 -8
- package/dist/src/compiler/manifest.d.ts.map +1 -1
- package/dist/src/compiler/manifest.js +120 -31
- package/dist/src/compiler/manifest.js.map +1 -1
- package/dist/src/compiler/model-catalog.d.ts +25 -0
- package/dist/src/compiler/model-catalog.d.ts.map +1 -0
- package/dist/src/compiler/model-catalog.js +194 -0
- package/dist/src/compiler/model-catalog.js.map +1 -0
- package/dist/src/compiler/module-map.js +16 -5
- package/dist/src/compiler/module-map.js.map +1 -1
- package/dist/src/compiler/normalize-manifest.d.ts +0 -13
- package/dist/src/compiler/normalize-manifest.d.ts.map +1 -1
- package/dist/src/compiler/normalize-manifest.js +160 -44
- package/dist/src/compiler/normalize-manifest.js.map +1 -1
- package/dist/src/compiler/runtime-api-types.d.ts +9 -0
- package/dist/src/compiler/runtime-api-types.d.ts.map +1 -0
- package/dist/src/compiler/runtime-api-types.js +37 -0
- package/dist/src/compiler/runtime-api-types.js.map +1 -0
- package/dist/src/discover/discover-agent.d.ts +2 -2
- package/dist/src/discover/discover-agent.d.ts.map +1 -1
- package/dist/src/discover/discover-agent.js +19 -17
- package/dist/src/discover/discover-agent.js.map +1 -1
- package/dist/src/discover/discover-subagent.d.ts.map +1 -1
- package/dist/src/discover/discover-subagent.js +10 -3
- package/dist/src/discover/discover-subagent.js.map +1 -1
- package/dist/src/discover/filesystem.d.ts +4 -4
- package/dist/src/discover/filesystem.d.ts.map +1 -1
- package/dist/src/discover/filesystem.js +11 -7
- package/dist/src/discover/filesystem.js.map +1 -1
- package/dist/src/discover/grammar.d.ts +5 -0
- package/dist/src/discover/grammar.d.ts.map +1 -1
- package/dist/src/discover/grammar.js +6 -1
- package/dist/src/discover/grammar.js.map +1 -1
- package/dist/src/discover/manifest.d.ts +11 -51
- package/dist/src/discover/manifest.d.ts.map +1 -1
- package/dist/src/discover/manifest.js +3 -33
- package/dist/src/discover/manifest.js.map +1 -1
- package/dist/src/discover/system.d.ts +38 -0
- package/dist/src/discover/system.d.ts.map +1 -0
- package/dist/src/discover/system.js +81 -0
- package/dist/src/discover/system.js.map +1 -0
- package/dist/src/internal/application/compiled-artifacts.d.ts +0 -5
- package/dist/src/internal/application/compiled-artifacts.d.ts.map +1 -1
- package/dist/src/internal/application/compiled-artifacts.js +50 -71
- package/dist/src/internal/application/compiled-artifacts.js.map +1 -1
- package/dist/src/internal/application/package.d.ts +16 -0
- package/dist/src/internal/application/package.d.ts.map +1 -1
- package/dist/src/internal/application/package.js +73 -1
- package/dist/src/internal/application/package.js.map +1 -1
- package/dist/src/internal/authored-definition/connection.d.ts +93 -0
- package/dist/src/internal/authored-definition/connection.d.ts.map +1 -0
- package/dist/src/internal/authored-definition/connection.js +284 -0
- package/dist/src/internal/authored-definition/connection.js.map +1 -0
- package/dist/src/internal/authored-definition/core.d.ts +16 -5
- package/dist/src/internal/authored-definition/core.d.ts.map +1 -1
- package/dist/src/internal/authored-definition/core.js +93 -24
- package/dist/src/internal/authored-definition/core.js.map +1 -1
- package/dist/src/internal/message/builder.d.ts.map +1 -1
- package/dist/src/internal/message/builder.js +122 -151
- package/dist/src/internal/message/builder.js.map +1 -1
- package/dist/src/internal/message/handler.d.ts +10 -2
- package/dist/src/internal/message/handler.d.ts.map +1 -1
- package/dist/src/internal/message/handler.js +68 -26
- package/dist/src/internal/message/handler.js.map +1 -1
- package/dist/src/internal/message/reference.d.ts +5 -5
- package/dist/src/internal/message/reference.js +7 -8
- package/dist/src/internal/message/reference.js.map +1 -1
- package/dist/src/internal/message/vercel-workflow-output.d.ts +0 -8
- package/dist/src/internal/message/vercel-workflow-output.d.ts.map +1 -1
- package/dist/src/internal/message/vercel-workflow-output.js +5 -29
- package/dist/src/internal/message/vercel-workflow-output.js.map +1 -1
- package/dist/src/internal/message/workflow/action-steps.d.ts.map +1 -1
- package/dist/src/internal/message/workflow/action-steps.js +42 -19
- package/dist/src/internal/message/workflow/action-steps.js.map +1 -1
- package/dist/src/internal/message/workflow/compaction-step.d.ts +22 -0
- package/dist/src/internal/message/workflow/compaction-step.d.ts.map +1 -0
- package/dist/src/internal/message/workflow/compaction-step.js +135 -0
- package/dist/src/internal/message/workflow/compaction-step.js.map +1 -0
- package/dist/src/internal/message/workflow/handle-message.d.ts +10 -2
- package/dist/src/internal/message/workflow/handle-message.d.ts.map +1 -1
- package/dist/src/internal/message/workflow/handle-message.js +172 -58
- package/dist/src/internal/message/workflow/handle-message.js.map +1 -1
- package/dist/src/internal/message/workflow/handle-schedule.d.ts +1 -1
- package/dist/src/internal/message/workflow/handle-schedule.d.ts.map +1 -1
- package/dist/src/internal/message/workflow/handle-schedule.js +11 -6
- package/dist/src/internal/message/workflow/handle-schedule.js.map +1 -1
- package/dist/src/internal/message/workflow/handle-subagent.d.ts +2 -2
- package/dist/src/internal/message/workflow/handle-subagent.d.ts.map +1 -1
- package/dist/src/internal/message/workflow/handle-subagent.js +13 -7
- package/dist/src/internal/message/workflow/handle-subagent.js.map +1 -1
- package/dist/src/internal/message/workflow/session.d.ts +12 -5
- package/dist/src/internal/message/workflow/session.d.ts.map +1 -1
- package/dist/src/internal/message/workflow/session.js +11 -6
- package/dist/src/internal/message/workflow/session.js.map +1 -1
- package/dist/src/internal/message/workflow/stream-events.d.ts +5 -5
- package/dist/src/internal/message/workflow/stream-events.d.ts.map +1 -1
- package/dist/src/internal/message/workflow/stream-events.js +5 -9
- package/dist/src/internal/message/workflow/stream-events.js.map +1 -1
- package/dist/src/internal/message/workflow/subagent-steps.js +1 -0
- package/dist/src/internal/message/workflow/subagent-steps.js.map +1 -1
- package/dist/src/internal/message/workflow/subagent.d.ts +2 -0
- package/dist/src/internal/message/workflow/subagent.d.ts.map +1 -1
- package/dist/src/internal/message/workflow/turn-steps.d.ts +4 -4
- package/dist/src/internal/message/workflow/turn-steps.d.ts.map +1 -1
- package/dist/src/internal/message/workflow/turn-steps.js +80 -10
- package/dist/src/internal/message/workflow/turn-steps.js.map +1 -1
- package/dist/src/internal/nitro/host/configure-message-routes.js +5 -5
- package/dist/src/internal/nitro/host/configure-message-routes.js.map +1 -1
- package/dist/src/internal/nitro/host/create-application-nitro.d.ts.map +1 -1
- package/dist/src/internal/nitro/host/create-application-nitro.js +27 -8
- package/dist/src/internal/nitro/host/create-application-nitro.js.map +1 -1
- package/dist/src/internal/nitro/host/prepare-application-host.d.ts.map +1 -1
- package/dist/src/internal/nitro/host/prepare-application-host.js +2 -0
- package/dist/src/internal/nitro/host/prepare-application-host.js.map +1 -1
- package/dist/src/internal/nitro/host/prewarm-vercel-sandboxes.d.ts +2 -0
- package/dist/src/internal/nitro/host/prewarm-vercel-sandboxes.d.ts.map +1 -1
- package/dist/src/internal/nitro/host/prewarm-vercel-sandboxes.js +71 -3
- package/dist/src/internal/nitro/host/prewarm-vercel-sandboxes.js.map +1 -1
- package/dist/src/internal/nitro/host/types.d.ts +1 -0
- package/dist/src/internal/nitro/host/types.d.ts.map +1 -1
- package/dist/src/internal/nitro/routes/health.d.ts +4 -4
- package/dist/src/internal/nitro/routes/health.d.ts.map +1 -1
- package/dist/src/internal/nitro/routes/health.js +10 -1
- package/dist/src/internal/nitro/routes/health.js.map +1 -1
- package/dist/src/internal/nitro/routes/home-page/build-home-page-view-model.d.ts.map +1 -1
- package/dist/src/internal/nitro/routes/home-page/build-home-page-view-model.js +2 -37
- package/dist/src/internal/nitro/routes/home-page/build-home-page-view-model.js.map +1 -1
- package/dist/src/internal/nitro/routes/home-page/load-home-page-data.d.ts +2 -2
- 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 +3 -10
- package/dist/src/internal/nitro/routes/home-page/load-home-page-data.js.map +1 -1
- package/dist/src/internal/nitro/routes/index.d.ts +1 -0
- package/dist/src/internal/nitro/routes/index.d.ts.map +1 -1
- package/dist/src/internal/nitro/routes/index.html +1 -24
- package/dist/src/internal/nitro/routes/index.js +19 -14
- package/dist/src/internal/nitro/routes/index.js.map +1 -1
- package/dist/src/internal/nitro/routes/message.d.ts +4 -4
- package/dist/src/internal/nitro/routes/message.d.ts.map +1 -1
- package/dist/src/internal/nitro/routes/message.js +13 -1
- package/dist/src/internal/nitro/routes/message.js.map +1 -1
- package/dist/src/internal/nitro/routes/run-stream.d.ts +4 -9
- package/dist/src/internal/nitro/routes/run-stream.d.ts.map +1 -1
- package/dist/src/internal/nitro/routes/run-stream.js +14 -1
- package/dist/src/internal/nitro/routes/run-stream.js.map +1 -1
- package/dist/src/internal/nitro/routes/runtime-artifacts.d.ts +9 -0
- package/dist/src/internal/nitro/routes/runtime-artifacts.d.ts.map +1 -0
- package/dist/src/internal/nitro/routes/runtime-artifacts.js +23 -0
- package/dist/src/internal/nitro/routes/runtime-artifacts.js.map +1 -0
- package/dist/src/internal/nitro/runtime-configuration.d.ts +15 -0
- package/dist/src/internal/nitro/runtime-configuration.d.ts.map +1 -0
- package/dist/src/internal/nitro/runtime-configuration.js +23 -0
- package/dist/src/internal/nitro/runtime-configuration.js.map +1 -0
- package/dist/src/internal/nitro/shims/runtime-configuration-plugin.d.ts +10 -0
- package/dist/src/internal/nitro/shims/runtime-configuration-plugin.d.ts.map +1 -0
- package/dist/src/internal/nitro/shims/runtime-configuration-plugin.js +16 -0
- package/dist/src/internal/nitro/shims/runtime-configuration-plugin.js.map +1 -0
- package/dist/src/protocol/message.d.ts +56 -2
- package/dist/src/protocol/message.d.ts.map +1 -1
- package/dist/src/protocol/message.js +34 -1
- package/dist/src/protocol/message.js.map +1 -1
- package/dist/src/public/definitions/agent.d.ts +143 -0
- 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/connection.d.ts +117 -0
- package/dist/src/public/definitions/connection.d.ts.map +1 -0
- package/dist/src/public/definitions/connection.js +7 -0
- package/dist/src/public/definitions/connection.js.map +1 -0
- package/dist/src/public/definitions/sandbox.d.ts +24 -0
- 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/index.d.ts +4 -4
- package/dist/src/public/index.d.ts.map +1 -1
- package/dist/src/public/index.js +2 -2
- package/dist/src/public/index.js.map +1 -1
- package/dist/src/runtime/actions/execute-action.d.ts +9 -3
- package/dist/src/runtime/actions/execute-action.d.ts.map +1 -1
- package/dist/src/runtime/actions/execute-action.js +5 -0
- package/dist/src/runtime/actions/execute-action.js.map +1 -1
- package/dist/src/runtime/agent/bootstrap.d.ts +2 -0
- package/dist/src/runtime/agent/bootstrap.d.ts.map +1 -1
- package/dist/src/runtime/agent/bootstrap.js +0 -7
- package/dist/src/runtime/agent/bootstrap.js.map +1 -1
- package/dist/src/runtime/connections/http.d.ts +11 -0
- package/dist/src/runtime/connections/http.d.ts.map +1 -0
- package/dist/src/runtime/connections/http.js +305 -0
- package/dist/src/runtime/connections/http.js.map +1 -0
- package/dist/src/runtime/connections/mcp.d.ts +12 -0
- package/dist/src/runtime/connections/mcp.d.ts.map +1 -0
- package/dist/src/runtime/connections/mcp.js +504 -0
- package/dist/src/runtime/connections/mcp.js.map +1 -0
- package/dist/src/runtime/connections/registry.d.ts +40 -0
- package/dist/src/runtime/connections/registry.d.ts.map +1 -0
- package/dist/src/runtime/connections/registry.js +224 -0
- package/dist/src/runtime/connections/registry.js.map +1 -0
- package/dist/src/runtime/connections/service-account.d.ts +13 -0
- package/dist/src/runtime/connections/service-account.d.ts.map +1 -0
- package/dist/src/runtime/connections/service-account.js +128 -0
- package/dist/src/runtime/connections/service-account.js.map +1 -0
- package/dist/src/runtime/connections/types.d.ts +35 -0
- package/dist/src/runtime/connections/types.d.ts.map +1 -0
- package/dist/src/runtime/connections/types.js +2 -0
- package/dist/src/runtime/connections/types.js.map +1 -0
- package/dist/src/runtime/governance/auth/cache.d.ts +14 -0
- package/dist/src/runtime/governance/auth/cache.d.ts.map +1 -0
- package/dist/src/runtime/governance/auth/cache.js +35 -0
- package/dist/src/runtime/governance/auth/cache.js.map +1 -0
- package/dist/src/runtime/governance/auth/http-basic.d.ts +9 -0
- package/dist/src/runtime/governance/auth/http-basic.d.ts.map +1 -0
- package/dist/src/runtime/governance/auth/http-basic.js +64 -0
- package/dist/src/runtime/governance/auth/http-basic.js.map +1 -0
- package/dist/src/runtime/governance/auth/jwt-ecdsa.d.ts +9 -0
- package/dist/src/runtime/governance/auth/jwt-ecdsa.d.ts.map +1 -0
- package/dist/src/runtime/governance/auth/jwt-ecdsa.js +70 -0
- package/dist/src/runtime/governance/auth/jwt-ecdsa.js.map +1 -0
- package/dist/src/runtime/governance/auth/jwt-hmac.d.ts +9 -0
- package/dist/src/runtime/governance/auth/jwt-hmac.d.ts.map +1 -0
- package/dist/src/runtime/governance/auth/jwt-hmac.js +40 -0
- package/dist/src/runtime/governance/auth/jwt-hmac.js.map +1 -0
- package/dist/src/runtime/governance/auth/load-auth-policy.d.ts +17 -0
- package/dist/src/runtime/governance/auth/load-auth-policy.d.ts.map +1 -0
- package/dist/src/runtime/governance/auth/load-auth-policy.js +257 -0
- package/dist/src/runtime/governance/auth/load-auth-policy.js.map +1 -0
- package/dist/src/runtime/governance/auth/oidc.d.ts +9 -0
- package/dist/src/runtime/governance/auth/oidc.d.ts.map +1 -0
- package/dist/src/runtime/governance/auth/oidc.js +106 -0
- package/dist/src/runtime/governance/auth/oidc.js.map +1 -0
- package/dist/src/runtime/governance/auth/route-auth.d.ts +22 -0
- package/dist/src/runtime/governance/auth/route-auth.d.ts.map +1 -0
- package/dist/src/runtime/governance/auth/route-auth.js +238 -0
- package/dist/src/runtime/governance/auth/route-auth.js.map +1 -0
- package/dist/src/runtime/governance/auth/token-claims.d.ts +31 -0
- package/dist/src/runtime/governance/auth/token-claims.d.ts.map +1 -0
- package/dist/src/runtime/governance/auth/token-claims.js +85 -0
- package/dist/src/runtime/governance/auth/token-claims.js.map +1 -0
- package/dist/src/runtime/governance/auth/types.d.ts +130 -0
- package/dist/src/runtime/governance/auth/types.d.ts.map +1 -0
- package/dist/src/runtime/governance/auth/types.js +15 -0
- package/dist/src/runtime/governance/auth/types.js.map +1 -0
- package/dist/src/runtime/governance/network/ip-allow-list.d.ts +27 -0
- package/dist/src/runtime/governance/network/ip-allow-list.d.ts.map +1 -0
- package/dist/src/runtime/governance/network/ip-allow-list.js +99 -0
- package/dist/src/runtime/governance/network/ip-allow-list.js.map +1 -0
- package/dist/src/runtime/graph.d.ts +2 -0
- package/dist/src/runtime/graph.d.ts.map +1 -1
- package/dist/src/runtime/graph.js.map +1 -1
- package/dist/src/runtime/harness/contracts.d.ts +2 -2
- package/dist/src/runtime/harness/contracts.d.ts.map +1 -1
- package/dist/src/runtime/harness/contracts.js +1 -1
- package/dist/src/runtime/harness/contracts.js.map +1 -1
- package/dist/src/runtime/harness/run-turn.d.ts +3 -0
- package/dist/src/runtime/harness/run-turn.d.ts.map +1 -1
- package/dist/src/runtime/harness/run-turn.js +26 -3
- package/dist/src/runtime/harness/run-turn.js.map +1 -1
- package/dist/src/runtime/harness/tool-loop/create-harness.d.ts +6 -0
- package/dist/src/runtime/harness/tool-loop/create-harness.d.ts.map +1 -1
- package/dist/src/runtime/harness/tool-loop/create-harness.js +59 -23
- package/dist/src/runtime/harness/tool-loop/create-harness.js.map +1 -1
- package/dist/src/runtime/harness/tool-loop/internal/compaction.d.ts +63 -0
- package/dist/src/runtime/harness/tool-loop/internal/compaction.d.ts.map +1 -0
- package/dist/src/runtime/harness/tool-loop/internal/compaction.js +136 -0
- package/dist/src/runtime/harness/tool-loop/internal/compaction.js.map +1 -0
- package/dist/src/runtime/harness/tool-loop/internal/model-messages.d.ts +1 -1
- package/dist/src/runtime/harness/tool-loop/internal/model-messages.d.ts.map +1 -1
- package/dist/src/runtime/harness/tool-loop/internal/model-messages.js +1 -1
- package/dist/src/runtime/harness/tool-loop/internal/model-messages.js.map +1 -1
- package/dist/src/runtime/harness/tool-loop/internal/runtime-history.d.ts.map +1 -1
- package/dist/src/runtime/harness/tool-loop/internal/runtime-history.js +12 -4
- package/dist/src/runtime/harness/tool-loop/internal/runtime-history.js.map +1 -1
- package/dist/src/runtime/harness/tool-loop/internal/state.d.ts +11 -3
- package/dist/src/runtime/harness/tool-loop/internal/state.d.ts.map +1 -1
- package/dist/src/runtime/harness/tool-loop/internal/state.js +12 -9
- package/dist/src/runtime/harness/tool-loop/internal/state.js.map +1 -1
- package/dist/src/runtime/harness/tool-loop/internal/transcript.d.ts +9 -1
- package/dist/src/runtime/harness/tool-loop/internal/transcript.d.ts.map +1 -1
- package/dist/src/runtime/harness/tool-loop/internal/transcript.js +32 -20
- package/dist/src/runtime/harness/tool-loop/internal/transcript.js.map +1 -1
- package/dist/src/runtime/harness/workspace/bindings/local.d.ts +9 -0
- package/dist/src/runtime/harness/workspace/bindings/local.d.ts.map +1 -0
- package/dist/src/runtime/harness/workspace/bindings/local.js +248 -0
- package/dist/src/runtime/harness/workspace/bindings/local.js.map +1 -0
- package/dist/src/runtime/harness/workspace/bindings/types.d.ts +40 -0
- package/dist/src/runtime/harness/workspace/bindings/types.d.ts.map +1 -0
- package/dist/src/runtime/harness/workspace/bindings/types.js +2 -0
- package/dist/src/runtime/harness/workspace/bindings/types.js.map +1 -0
- package/dist/src/runtime/harness/workspace/bindings/vercel.d.ts +11 -0
- package/dist/src/runtime/harness/workspace/bindings/vercel.d.ts.map +1 -0
- package/dist/src/runtime/harness/workspace/bindings/vercel.js +294 -0
- package/dist/src/runtime/harness/workspace/bindings/vercel.js.map +1 -0
- package/dist/src/runtime/harness/workspace/ensure.d.ts +3 -0
- package/dist/src/runtime/harness/workspace/ensure.d.ts.map +1 -1
- package/dist/src/runtime/harness/workspace/ensure.js +35 -23
- package/dist/src/runtime/harness/workspace/ensure.js.map +1 -1
- package/dist/src/runtime/harness/workspace/keys.d.ts +30 -0
- package/dist/src/runtime/harness/workspace/keys.d.ts.map +1 -0
- package/dist/src/runtime/harness/workspace/keys.js +65 -0
- package/dist/src/runtime/harness/workspace/keys.js.map +1 -0
- package/dist/src/runtime/harness/workspace/sandbox.d.ts +19 -0
- package/dist/src/runtime/harness/workspace/sandbox.d.ts.map +1 -0
- package/dist/src/runtime/harness/workspace/sandbox.js +86 -0
- package/dist/src/runtime/harness/workspace/sandbox.js.map +1 -0
- package/dist/src/runtime/harness/workspace/seed-files.d.ts +20 -0
- package/dist/src/runtime/harness/workspace/seed-files.d.ts.map +1 -0
- package/dist/src/runtime/harness/workspace/seed-files.js +67 -0
- package/dist/src/runtime/harness/workspace/seed-files.js.map +1 -0
- package/dist/src/runtime/harness/workspace/spec.d.ts +3 -22
- package/dist/src/runtime/harness/workspace/spec.d.ts.map +1 -1
- package/dist/src/runtime/harness/workspace/spec.js +28 -35
- package/dist/src/runtime/harness/workspace/spec.js.map +1 -1
- package/dist/src/runtime/harness/workspace/state.d.ts.map +1 -1
- package/dist/src/runtime/harness/workspace/state.js +36 -20
- package/dist/src/runtime/harness/workspace/state.js.map +1 -1
- package/dist/src/runtime/harness/workspace/types.d.ts +62 -9
- package/dist/src/runtime/harness/workspace/types.d.ts.map +1 -1
- package/dist/src/runtime/harness/workspace/types.js +29 -6
- package/dist/src/runtime/harness/workspace/types.js.map +1 -1
- package/dist/src/runtime/loaders/bundled-artifacts.d.ts +10 -10
- package/dist/src/runtime/loaders/bundled-artifacts.d.ts.map +1 -1
- package/dist/src/runtime/loaders/bundled-artifacts.js +72 -1
- package/dist/src/runtime/loaders/bundled-artifacts.js.map +1 -1
- package/dist/src/runtime/loaders/compile-metadata.d.ts.map +1 -1
- package/dist/src/runtime/loaders/compile-metadata.js +0 -2
- package/dist/src/runtime/loaders/compile-metadata.js.map +1 -1
- package/dist/src/runtime/loaders/resolved-agent.d.ts.map +1 -1
- package/dist/src/runtime/loaders/resolved-agent.js +0 -8
- package/dist/src/runtime/loaders/resolved-agent.js.map +1 -1
- package/dist/src/runtime/prompt/compose.d.ts +1 -2
- package/dist/src/runtime/prompt/compose.d.ts.map +1 -1
- package/dist/src/runtime/prompt/compose.js +0 -11
- package/dist/src/runtime/prompt/compose.js.map +1 -1
- package/dist/src/runtime/resolve-agent-graph.d.ts +0 -3
- package/dist/src/runtime/resolve-agent-graph.d.ts.map +1 -1
- package/dist/src/runtime/resolve-agent-graph.js +25 -13
- package/dist/src/runtime/resolve-agent-graph.js.map +1 -1
- package/dist/src/runtime/resolve-agent.d.ts +2 -3
- package/dist/src/runtime/resolve-agent.d.ts.map +1 -1
- package/dist/src/runtime/resolve-agent.js +103 -12
- package/dist/src/runtime/resolve-agent.js.map +1 -1
- package/dist/src/runtime/sandboxes/ensure.d.ts +14 -1
- package/dist/src/runtime/sandboxes/ensure.d.ts.map +1 -1
- package/dist/src/runtime/sandboxes/ensure.js +147 -50
- package/dist/src/runtime/sandboxes/ensure.js.map +1 -1
- package/dist/src/runtime/sandboxes/types.d.ts +11 -1
- package/dist/src/runtime/sandboxes/types.d.ts.map +1 -1
- package/dist/src/runtime/session-context.d.ts +120 -1
- package/dist/src/runtime/session-context.d.ts.map +1 -1
- package/dist/src/runtime/session-context.js +270 -10
- package/dist/src/runtime/session-context.js.map +1 -1
- package/dist/src/runtime/sessions/auth.d.ts +46 -0
- package/dist/src/runtime/sessions/auth.d.ts.map +1 -0
- package/dist/src/runtime/sessions/auth.js +44 -0
- package/dist/src/runtime/sessions/auth.js.map +1 -0
- package/dist/src/runtime/sessions/compaction.d.ts +35 -0
- package/dist/src/runtime/sessions/compaction.d.ts.map +1 -0
- package/dist/src/runtime/sessions/compaction.js +75 -0
- package/dist/src/runtime/sessions/compaction.js.map +1 -0
- package/dist/src/runtime/sessions/compiled-agent-cache.d.ts +2 -0
- package/dist/src/runtime/sessions/compiled-agent-cache.d.ts.map +1 -1
- package/dist/src/runtime/sessions/compiled-agent-cache.js +1 -0
- package/dist/src/runtime/sessions/compiled-agent-cache.js.map +1 -1
- package/dist/src/runtime/sessions/messages.d.ts +47 -0
- package/dist/src/runtime/sessions/messages.d.ts.map +1 -1
- package/dist/src/runtime/sessions/messages.js +77 -0
- package/dist/src/runtime/sessions/messages.js.map +1 -1
- package/dist/src/runtime/sessions/prepare-turn.d.ts +1 -0
- package/dist/src/runtime/sessions/prepare-turn.d.ts.map +1 -1
- package/dist/src/runtime/sessions/prepare-turn.js +10 -3
- package/dist/src/runtime/sessions/prepare-turn.js.map +1 -1
- package/dist/src/runtime/sessions/run-session.d.ts +64 -23
- package/dist/src/runtime/sessions/run-session.d.ts.map +1 -1
- package/dist/src/runtime/sessions/run-session.js +140 -26
- package/dist/src/runtime/sessions/run-session.js.map +1 -1
- package/dist/src/runtime/sessions/turn.d.ts +11 -1
- package/dist/src/runtime/sessions/turn.d.ts.map +1 -1
- package/dist/src/runtime/sessions/types.d.ts +47 -0
- package/dist/src/runtime/sessions/types.d.ts.map +1 -1
- package/dist/src/runtime/sessions/types.js.map +1 -1
- package/dist/src/runtime/tools/execute-tool.d.ts +12 -3
- package/dist/src/runtime/tools/execute-tool.d.ts.map +1 -1
- package/dist/src/runtime/tools/execute-tool.js +21 -2
- package/dist/src/runtime/tools/execute-tool.js.map +1 -1
- package/dist/src/runtime/tools/registry.d.ts +10 -5
- package/dist/src/runtime/tools/registry.d.ts.map +1 -1
- package/dist/src/runtime/tools/registry.js +26 -2
- package/dist/src/runtime/tools/registry.js.map +1 -1
- package/dist/src/runtime/types.d.ts +47 -30
- package/dist/src/runtime/types.d.ts.map +1 -1
- package/dist/src/services/dev-client/request-headers.d.ts +20 -3
- package/dist/src/services/dev-client/request-headers.d.ts.map +1 -1
- package/dist/src/services/dev-client/request-headers.js +83 -2
- package/dist/src/services/dev-client/request-headers.js.map +1 -1
- package/dist/src/services/dev-client/send-message.d.ts +4 -1
- package/dist/src/services/dev-client/send-message.d.ts.map +1 -1
- package/dist/src/services/dev-client/send-message.js +29 -7
- package/dist/src/services/dev-client/send-message.js.map +1 -1
- package/dist/src/services/dev-client.d.ts +6 -0
- package/dist/src/services/dev-client.d.ts.map +1 -1
- package/dist/src/services/dev-client.js +1 -0
- package/dist/src/services/dev-client.js.map +1 -1
- package/docs/internals/README.md +235 -0
- package/docs/internals/compiler-and-artifacts.md +249 -0
- package/docs/internals/connections.md +220 -0
- package/docs/internals/discovery.md +289 -0
- package/docs/internals/harness-sidecar.md +378 -0
- package/docs/internals/message-runtime.md +398 -0
- package/docs/internals/sandboxes.md +440 -0
- package/docs/internals/turn-preparation-and-session-state.md +445 -0
- package/docs/internals/workspace.md +155 -0
- package/docs/public/README.md +72 -0
- package/docs/public/agent-ts.md +141 -0
- package/docs/public/auth-and-route-protection.md +141 -0
- package/docs/public/cli-build-and-debugging.md +79 -0
- package/docs/public/connections.md +162 -0
- package/docs/public/context-control.md +142 -0
- package/docs/public/getting-started.md +164 -0
- package/docs/public/project-layout.md +142 -0
- package/docs/public/runs-and-streaming.md +125 -0
- package/docs/public/sandboxes.md +158 -0
- package/docs/public/schedules.md +67 -0
- package/docs/public/session-context.md +110 -0
- package/docs/public/skills.md +154 -0
- package/docs/public/subagents.md +102 -0
- package/docs/public/tools.md +127 -0
- package/docs/public/typescript-api.md +85 -0
- package/docs/public/vercel-deployment.md +110 -0
- package/docs/public/workspace.md +106 -0
- package/package.json +16 -9
- package/dist/src/compiler/context.d.ts +0 -85
- package/dist/src/compiler/context.d.ts.map +0 -1
- package/dist/src/compiler/context.js +0 -128
- package/dist/src/compiler/context.js.map +0 -1
- package/dist/src/compiler/workspace.d.ts +0 -58
- package/dist/src/compiler/workspace.d.ts.map +0 -1
- package/dist/src/compiler/workspace.js +0 -70
- package/dist/src/compiler/workspace.js.map +0 -1
- package/dist/src/discover/context.d.ts +0 -35
- package/dist/src/discover/context.d.ts.map +0 -1
- package/dist/src/discover/context.js +0 -88
- package/dist/src/discover/context.js.map +0 -1
- package/dist/src/discover/discover-worker.d.ts +0 -31
- package/dist/src/discover/discover-worker.d.ts.map +0 -1
- package/dist/src/discover/discover-worker.js +0 -376
- package/dist/src/discover/discover-worker.js.map +0 -1
- package/dist/src/discover/workspace.d.ts +0 -35
- package/dist/src/discover/workspace.d.ts.map +0 -1
- package/dist/src/discover/workspace.js +0 -61
- package/dist/src/discover/workspace.js.map +0 -1
- package/dist/src/internal/message/routes.d.ts +0 -2
- package/dist/src/internal/message/routes.d.ts.map +0 -1
- package/dist/src/internal/message/routes.js +0 -2
- package/dist/src/internal/message/routes.js.map +0 -1
- package/dist/src/internal/message/workflow/session-callbacks.d.ts +0 -11
- package/dist/src/internal/message/workflow/session-callbacks.d.ts.map +0 -1
- package/dist/src/internal/message/workflow/session-callbacks.js +0 -127
- package/dist/src/internal/message/workflow/session-callbacks.js.map +0 -1
- package/dist/src/internal/message/workflow/stream-callbacks.d.ts +0 -10
- package/dist/src/internal/message/workflow/stream-callbacks.d.ts.map +0 -1
- package/dist/src/internal/message/workflow/stream-callbacks.js +0 -58
- package/dist/src/internal/message/workflow/stream-callbacks.js.map +0 -1
- package/dist/src/internal/object.d.ts +0 -18
- package/dist/src/internal/object.d.ts.map +0 -1
- package/dist/src/internal/object.js +0 -17
- package/dist/src/internal/object.js.map +0 -1
- package/dist/src/public/agent.d.ts +0 -2
- package/dist/src/public/agent.d.ts.map +0 -1
- package/dist/src/public/agent.js +0 -2
- package/dist/src/public/agent.js.map +0 -1
- package/dist/src/public/definitions/context.d.ts +0 -16
- package/dist/src/public/definitions/context.d.ts.map +0 -1
- package/dist/src/public/definitions/context.js +0 -8
- package/dist/src/public/definitions/context.js.map +0 -1
- package/dist/src/public/definitions/memory.d.ts +0 -20
- package/dist/src/public/definitions/memory.d.ts.map +0 -1
- package/dist/src/public/definitions/memory.js +0 -8
- package/dist/src/public/definitions/memory.js.map +0 -1
- package/dist/src/public/definitions/soul.d.ts +0 -20
- package/dist/src/public/definitions/soul.d.ts.map +0 -1
- package/dist/src/public/definitions/soul.js +0 -8
- package/dist/src/public/definitions/soul.js.map +0 -1
- package/dist/src/public/definitions/standard-json-schema.d.ts +0 -15
- package/dist/src/public/definitions/standard-json-schema.d.ts.map +0 -1
- package/dist/src/public/definitions/standard-json-schema.js +0 -2
- package/dist/src/public/definitions/standard-json-schema.js.map +0 -1
- package/dist/src/public/definitions/standard-schema.d.ts +0 -69
- package/dist/src/public/definitions/standard-schema.d.ts.map +0 -1
- package/dist/src/public/definitions/standard-schema.js +0 -197
- package/dist/src/public/definitions/standard-schema.js.map +0 -1
- package/dist/src/public/definitions/worker.d.ts +0 -171
- package/dist/src/public/definitions/worker.d.ts.map +0 -1
- package/dist/src/public/definitions/worker.js +0 -13
- package/dist/src/public/definitions/worker.js.map +0 -1
- package/dist/src/runtime/harness/tool-loop/internal/runtime-bash-files.d.ts +0 -19
- package/dist/src/runtime/harness/tool-loop/internal/runtime-bash-files.d.ts.map +0 -1
- package/dist/src/runtime/harness/tool-loop/internal/runtime-bash-files.js +0 -117
- package/dist/src/runtime/harness/tool-loop/internal/runtime-bash-files.js.map +0 -1
- package/dist/src/runtime/harness/tool-loop/internal/runtime-skills.d.ts +0 -23
- package/dist/src/runtime/harness/tool-loop/internal/runtime-skills.d.ts.map +0 -1
- package/dist/src/runtime/harness/tool-loop/internal/runtime-skills.js +0 -67
- package/dist/src/runtime/harness/tool-loop/internal/runtime-skills.js.map +0 -1
- package/dist/src/runtime/harness/workspace/project-workspace-overlay.d.ts +0 -19
- package/dist/src/runtime/harness/workspace/project-workspace-overlay.d.ts.map +0 -1
- package/dist/src/runtime/harness/workspace/project-workspace-overlay.js +0 -219
- package/dist/src/runtime/harness/workspace/project-workspace-overlay.js.map +0 -1
- package/dist/src/runtime/loaders/context.d.ts +0 -36
- package/dist/src/runtime/loaders/context.d.ts.map +0 -1
- package/dist/src/runtime/loaders/context.js +0 -116
- package/dist/src/runtime/loaders/context.js.map +0 -1
- package/dist/src/runtime/loaders/workspace.d.ts +0 -37
- package/dist/src/runtime/loaders/workspace.d.ts.map +0 -1
- package/dist/src/runtime/loaders/workspace.js +0 -104
- package/dist/src/runtime/loaders/workspace.js.map +0 -1
- package/dist/src/runtime/subagents/definitions.d.ts +0 -11
- package/dist/src/runtime/subagents/definitions.d.ts.map +0 -1
- package/dist/src/runtime/subagents/definitions.js +0 -15
- package/dist/src/runtime/subagents/definitions.js.map +0 -1
package/README.md
ADDED
|
@@ -0,0 +1,598 @@
|
|
|
1
|
+
# Ash
|
|
2
|
+
|
|
3
|
+
ASH stands for Agentic Serverless Harness. Ash is a filesystem-first framework for durable backend agents on Vercel.
|
|
4
|
+
|
|
5
|
+
Its core idea is simple: an agent should feel like a product surface on disk, not a prompt string trapped inside application code. In Ash, the core system prompt lives in `system.md`, additive always-on prompt layers can live in `system/`, reusable procedures live in `skills/`, shared authored code lives in `lib/`, named downstream dependencies live in `connections/`, isolated command environments live in `sandboxes/`, and typed executable integrations live in `tools/`. Simple agents stay mostly markdown. When behavior needs code, you add TypeScript without leaving the model.
|
|
6
|
+
|
|
7
|
+
- Markdown-first authoring that reads like a living spec
|
|
8
|
+
- TypeScript where types, schemas, and execution actually matter
|
|
9
|
+
- Durable message runs by default, not as an afterthought
|
|
10
|
+
- Authored sandboxes for isolated command environments
|
|
11
|
+
- Inspectable compiled artifacts under `.ash/`
|
|
12
|
+
- A single message endpoint with structured run streaming
|
|
13
|
+
- A Vercel-native runtime model built on Nitro and Workflows
|
|
14
|
+
|
|
15
|
+
## Why Ash Feels Different
|
|
16
|
+
|
|
17
|
+
Most agent frameworks start by asking you to assemble abstractions. Ash starts with the agent itself.
|
|
18
|
+
|
|
19
|
+
You author a directory. That directory is the contract. The markdown is readable by engineering, product, and operations. The TypeScript is reserved for the parts that benefit from real code. The result is an agent architecture that stays legible as it grows.
|
|
20
|
+
|
|
21
|
+
- `system.md` defines the core system prompt for the agent.
|
|
22
|
+
- `system/` adds ordered always-on prompt layers after the root system prompt.
|
|
23
|
+
- `skills/` package reusable capabilities and procedures that can be loaded on demand.
|
|
24
|
+
- `lib/` is the canonical place for shared authored source code imported by tools and other module-backed files.
|
|
25
|
+
- `connections/` declare named downstream dependencies with runtime-owned auth, policy, and optional MCP tool lowering.
|
|
26
|
+
- `sandboxes/` define named backend-managed bash-style environments with lifecycle hooks.
|
|
27
|
+
- `tools/` turn capabilities into typed executable integrations.
|
|
28
|
+
- `schedules/` let the same agent run recurring jobs.
|
|
29
|
+
- `subagents/` extend the model toward specialist delegation.
|
|
30
|
+
|
|
31
|
+
This is the shift Ash is designed around: agents should be easy to read before they are clever to execute.
|
|
32
|
+
|
|
33
|
+
## The Magic: Markdown Simplicity, TypeScript Power
|
|
34
|
+
|
|
35
|
+
A useful Ash agent can be understood in one glance:
|
|
36
|
+
|
|
37
|
+
```text
|
|
38
|
+
weather-agent/
|
|
39
|
+
├── package.json
|
|
40
|
+
└── agent/
|
|
41
|
+
├── agent.ts
|
|
42
|
+
├── system.md
|
|
43
|
+
├── system/
|
|
44
|
+
│ ├── forecast-guidelines.md
|
|
45
|
+
│ └── my-location.md
|
|
46
|
+
├── lib/
|
|
47
|
+
│ └── weather/
|
|
48
|
+
│ └── client.ts
|
|
49
|
+
├── sandboxes/
|
|
50
|
+
│ └── repo-shell.ts
|
|
51
|
+
├── skills/
|
|
52
|
+
│ └── get-weather.md
|
|
53
|
+
└── tools/
|
|
54
|
+
└── get-weather.ts
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
`agent/system.md`
|
|
58
|
+
|
|
59
|
+
```md
|
|
60
|
+
You are a weather-focused assistant. Be concise, accurate, and explicit about when you are using the local weather tool.
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
`agent/system/my-location.md`
|
|
64
|
+
|
|
65
|
+
```md
|
|
66
|
+
The default user location is Brooklyn, New York, unless the user specifies a different city.
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
`agent/skills/get-weather.md`
|
|
70
|
+
|
|
71
|
+
```md
|
|
72
|
+
---
|
|
73
|
+
description: Use the weather tool before answering forecast or temperature questions.
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
When the user asks about weather, temperature, or forecast conditions, call the `get_weather` tool before answering.
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
`agent/tools/get-weather.ts`
|
|
80
|
+
|
|
81
|
+
```ts
|
|
82
|
+
import { createWeatherClient } from "../lib/weather/client";
|
|
83
|
+
import { defineTool } from "ash";
|
|
84
|
+
import { z } from "zod";
|
|
85
|
+
|
|
86
|
+
const weatherClient = createWeatherClient();
|
|
87
|
+
|
|
88
|
+
export default defineTool({
|
|
89
|
+
name: "get_weather",
|
|
90
|
+
description: "Get the current weather for a city.",
|
|
91
|
+
inputSchema: z.object({
|
|
92
|
+
city: z.string(),
|
|
93
|
+
}),
|
|
94
|
+
async execute(input) {
|
|
95
|
+
return weatherClient.getForecast(input.city);
|
|
96
|
+
},
|
|
97
|
+
});
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
`agent/sandboxes/repo-shell.ts`
|
|
101
|
+
|
|
102
|
+
```ts
|
|
103
|
+
import { defineSandbox } from "ash";
|
|
104
|
+
|
|
105
|
+
export default defineSandbox({
|
|
106
|
+
description: "Use this isolated repo shell for command-line maintenance tasks.",
|
|
107
|
+
async bootstrap({ sandbox }) {
|
|
108
|
+
await sandbox.runCommand("mkdir -p repo");
|
|
109
|
+
},
|
|
110
|
+
async onSession({ sandbox }) {
|
|
111
|
+
await sandbox.runCommand("touch .session-ready");
|
|
112
|
+
},
|
|
113
|
+
});
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
`agent/lib/weather/client.ts`
|
|
117
|
+
|
|
118
|
+
```ts
|
|
119
|
+
export function createWeatherClient() {
|
|
120
|
+
return {
|
|
121
|
+
async getForecast(city: string) {
|
|
122
|
+
return {
|
|
123
|
+
city,
|
|
124
|
+
temperatureF: 72,
|
|
125
|
+
condition: "Sunny",
|
|
126
|
+
summary: `Sunny in ${city} with a light breeze.`,
|
|
127
|
+
};
|
|
128
|
+
},
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
`agent/agent.ts`
|
|
134
|
+
|
|
135
|
+
```ts
|
|
136
|
+
import { defineAgent } from "ash";
|
|
137
|
+
import { openai } from "@ai-sdk/openai";
|
|
138
|
+
|
|
139
|
+
export default defineAgent({
|
|
140
|
+
model: openai("gpt-5.4-mini"),
|
|
141
|
+
});
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
`defineAgent` also accepts provider model ids such as `"openai/gpt-5.4-mini"` when you prefer the gateway-style string form.
|
|
145
|
+
|
|
146
|
+
That is the point of Ash. The parts that should be prose stay as prose. The parts that should be code stay as code.
|
|
147
|
+
|
|
148
|
+
From those files, Ash will:
|
|
149
|
+
|
|
150
|
+
- discover and validate the authored agent surface
|
|
151
|
+
- lower markdown into the same typed public definitions used by code
|
|
152
|
+
- compile inspectable artifacts into `.ash/`
|
|
153
|
+
- compile `system.md` plus ordered `system/` layers into the base prompt
|
|
154
|
+
- seed `skills/` into the default runtime workspace root
|
|
155
|
+
- when present, materialize named authored connections and optionally lower allowed MCP tools into namespaced model-visible tools
|
|
156
|
+
- provision named authored sandboxes as isolated bash-style tool surfaces
|
|
157
|
+
- expose a stable message endpoint
|
|
158
|
+
- execute message requests as durable conversation runs and schedules/subagents as durable task runs
|
|
159
|
+
- stream structured lifecycle events while the run is happening
|
|
160
|
+
|
|
161
|
+
The experience is intentionally simple at the surface, but it does real runtime work underneath.
|
|
162
|
+
|
|
163
|
+
## What You Get Out Of The Box
|
|
164
|
+
|
|
165
|
+
- A pure-markdown agent is valid. You only need TypeScript when you want dynamic behavior.
|
|
166
|
+
- Markdown and TypeScript compile to the same underlying model instead of splitting the framework into two competing APIs.
|
|
167
|
+
- Skills are discoverable capabilities, and runtime skill loading is framework-owned through `activate_skill`.
|
|
168
|
+
- Authored sandboxes create named bash-style execution environments with template and per-session lifecycle hooks.
|
|
169
|
+
- Tools are strongly typed and schema-validated, but do not force the rest of the agent into code.
|
|
170
|
+
- Authored connections let Ash own downstream auth, policy, and optional MCP tool lowering instead of hiding them inside app-local clients.
|
|
171
|
+
- Sessions are durable across turns, with runtime-owned state carried forward by the workflow layer.
|
|
172
|
+
- Authored runtime code can read the active durable session with `getSession()`, including caller auth and parent lineage.
|
|
173
|
+
- Authored runtime code can resolve a named downstream handle with `await getConnection(...)`.
|
|
174
|
+
- Authored `skills/` files seed the default runtime workspace root.
|
|
175
|
+
- Schedules compile into runtime-owned scheduled executions.
|
|
176
|
+
- Optional route auth and IP allow lists protect Ash-owned `health`, `message`, and `stream` routes.
|
|
177
|
+
- Compiled output stays inspectable, which makes debugging and deployment behavior easier to reason about.
|
|
178
|
+
|
|
179
|
+
## Sandbox Environments
|
|
180
|
+
|
|
181
|
+
Ash now supports authored `sandboxes/` for cases where the model should get a command environment,
|
|
182
|
+
but a typed JSON tool is the wrong shape.
|
|
183
|
+
|
|
184
|
+
Important rules:
|
|
185
|
+
|
|
186
|
+
- each `sandboxes/*.ts` file keeps its internal sandbox name from the file path, but the
|
|
187
|
+
model-visible tool name is lowered to `lower_snake_case` with a `_sandbox` suffix
|
|
188
|
+
- the same `sandboxes/` slot is supported on the root agent and inside local subagent packages
|
|
189
|
+
- sandbox definitions export lifecycle hooks, not an explicit `name`
|
|
190
|
+
- `bootstrap()` prepares reusable template state
|
|
191
|
+
- `onSession()` runs once per durable Ash session for that sandbox
|
|
192
|
+
- the default backend is `vercel` on Vercel and `local` everywhere else
|
|
193
|
+
|
|
194
|
+
Vercel-specific behavior:
|
|
195
|
+
|
|
196
|
+
- when `ash build` runs inside a hosted Vercel build and both `VERCEL` and
|
|
197
|
+
`VERCEL_DEPLOYMENT_ID` are present, Ash now prewarms authored Vercel sandbox templates during
|
|
198
|
+
build
|
|
199
|
+
- that build-time prewarm runs `bootstrap()` for reusable template state only
|
|
200
|
+
- `onSession()` still runs later, inside the runtime turn path, once per durable Ash session
|
|
201
|
+
- if that hosted Vercel build-time prewarm fails, the build now fails too
|
|
202
|
+
- runtime still falls back to lazy template creation only when build-time prewarm was not attempted
|
|
203
|
+
in the first place
|
|
204
|
+
|
|
205
|
+
This is intentionally different from the default workspace:
|
|
206
|
+
|
|
207
|
+
- the workspace is one shared `bash` tool for the run
|
|
208
|
+
- sandboxes are additional isolated named tools with their own backend-managed state
|
|
209
|
+
|
|
210
|
+
## Quick Start
|
|
211
|
+
|
|
212
|
+
### Prerequisites
|
|
213
|
+
|
|
214
|
+
- Node `24.x`
|
|
215
|
+
- `pnpm`
|
|
216
|
+
- A Vercel account (for deploy step)
|
|
217
|
+
|
|
218
|
+
### Create and run a new agent
|
|
219
|
+
|
|
220
|
+
```bash
|
|
221
|
+
# 1) Scaffold a new agent
|
|
222
|
+
npx experimental-ash@latest init my-agent
|
|
223
|
+
cd my-agent
|
|
224
|
+
pnpm install
|
|
225
|
+
|
|
226
|
+
# 2) Start local dev (REPL is enabled by default)
|
|
227
|
+
pnpm dev
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
This command scaffolds a project from the built-in template and starts your local
|
|
231
|
+
runtime with the interactive REPL.
|
|
232
|
+
|
|
233
|
+
### Run a remote check against a deployed agent
|
|
234
|
+
|
|
235
|
+
```bash
|
|
236
|
+
# 3) Deploy to Vercel
|
|
237
|
+
npx vercel deploy
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
Copy the deployment URL from Vercel output (for example `https://my-agent-abc123.vercel.app`).
|
|
241
|
+
|
|
242
|
+
```bash
|
|
243
|
+
# 4) Point your local REPL at the deployed URL
|
|
244
|
+
pnpm dev https://my-agent-abc123.vercel.app
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
That command keeps your local REPL but sends messages to the deployed server.
|
|
248
|
+
|
|
249
|
+
Use these if you want to inspect what Ash is doing:
|
|
250
|
+
|
|
251
|
+
- `ash info` shows resolved authoring details for the current project.
|
|
252
|
+
- `ash build` compiles `.ash/` artifacts and host output.
|
|
253
|
+
- `ash dev --url <deployment-url>` is the same as `pnpm dev <deployment-url>`.
|
|
254
|
+
- `ash dev --run <run-id>` resumes a waiting run from its id.
|
|
255
|
+
|
|
256
|
+
If your Vercel preview is protected, set any required local auth env vars before step 4 (for example `VERCEL_AUTOMATION_BYPASS_SECRET`).
|
|
257
|
+
|
|
258
|
+
## Talk To The Agent
|
|
259
|
+
|
|
260
|
+
Ash exposes one default message route:
|
|
261
|
+
|
|
262
|
+
```text
|
|
263
|
+
POST /.well-known/ash/v1/message
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
Start a run:
|
|
267
|
+
|
|
268
|
+
```bash
|
|
269
|
+
curl -X POST http://127.0.0.1:3000/.well-known/ash/v1/message \
|
|
270
|
+
-H 'content-type: application/json' \
|
|
271
|
+
-d '{"message":"What is the weather in Brooklyn?"}'
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
The response returns a `runId`. Stream the run with:
|
|
275
|
+
|
|
276
|
+
```bash
|
|
277
|
+
curl http://127.0.0.1:3000/.well-known/ash/v1/runs/<runId>/stream
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
The stream is newline-delimited JSON and emits runtime lifecycle events such as:
|
|
281
|
+
|
|
282
|
+
- `run.started`
|
|
283
|
+
- `turn.started`
|
|
284
|
+
- `message.received`
|
|
285
|
+
- `actions.requested`
|
|
286
|
+
- `subagent.called`
|
|
287
|
+
- `action.result`
|
|
288
|
+
- `message.completed`
|
|
289
|
+
- `turn.completed`
|
|
290
|
+
- `session.waiting`
|
|
291
|
+
- `run.failed`
|
|
292
|
+
- `run.completed`
|
|
293
|
+
|
|
294
|
+
This is an important part of the Ash model. The runtime is not a black box. You can watch a durable agent run as a structured sequence of state transitions.
|
|
295
|
+
|
|
296
|
+
When a parent turn delegates to a local subagent, the parent stream emits `subagent.called` with
|
|
297
|
+
the child `runId` and `workflowId`. Clients can attach to that child run through the same
|
|
298
|
+
`GET /.well-known/ash/v1/runs/:runId/stream` route, and the child `run.started` event includes invocation
|
|
299
|
+
metadata that points back to the parent call.
|
|
300
|
+
|
|
301
|
+
## Protect Ash Routes
|
|
302
|
+
|
|
303
|
+
Ash can protect its own HTTP surfaces from `agent.ts`:
|
|
304
|
+
|
|
305
|
+
```ts
|
|
306
|
+
import { defineAgent } from "ash";
|
|
307
|
+
|
|
308
|
+
export default defineAgent({
|
|
309
|
+
model: "openai/gpt-5.4-mini",
|
|
310
|
+
network: {
|
|
311
|
+
ipAllowList: ["127.0.0.1", "10.0.0.0/8"],
|
|
312
|
+
},
|
|
313
|
+
auth: {
|
|
314
|
+
strategies: [
|
|
315
|
+
{
|
|
316
|
+
kind: "http-basic",
|
|
317
|
+
username: "ops",
|
|
318
|
+
password: process.env.ASH_BASIC_PASSWORD,
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
kind: "jwt-hmac",
|
|
322
|
+
issuer: "https://internal.example",
|
|
323
|
+
audiences: ["weather-agent"],
|
|
324
|
+
subjects: ["worker:*"],
|
|
325
|
+
algorithm: "HS256",
|
|
326
|
+
secret: process.env.ASH_HMAC_SECRET,
|
|
327
|
+
},
|
|
328
|
+
],
|
|
329
|
+
},
|
|
330
|
+
});
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
Ash currently supports four inbound strategy kinds:
|
|
334
|
+
|
|
335
|
+
- `http-basic`
|
|
336
|
+
- `jwt-hmac`
|
|
337
|
+
- `jwt-ecdsa`
|
|
338
|
+
- `oidc`
|
|
339
|
+
|
|
340
|
+
Behavior:
|
|
341
|
+
|
|
342
|
+
- If both `auth` and `network` are omitted, `/.well-known/ash/v1/health`, `/.well-known/ash/v1/message`, and `/.well-known/ash/v1/runs/:runId/stream` are open by default.
|
|
343
|
+
- If only `network` is configured, Ash enforces the IP allow list but still treats the request as unauthenticated.
|
|
344
|
+
- If `auth` is configured, the protected routes require `Authorization`. `http-basic` uses `Basic ...`. Token-backed strategies use `Bearer ...`.
|
|
345
|
+
- Ash does not enforce a second per-run ownership layer after route auth. Any caller that passes route auth may start, resume, or stream any run for that agent.
|
|
346
|
+
- Scheduled `schedules/` runs do not come from HTTP at all. They always execute with a framework-owned runtime principal so authored code still sees a caller in `getSession().auth`.
|
|
347
|
+
|
|
348
|
+
Quick examples:
|
|
349
|
+
|
|
350
|
+
```bash
|
|
351
|
+
curl -u ops:top-secret http://127.0.0.1:3000/.well-known/ash/v1/health
|
|
352
|
+
|
|
353
|
+
curl -X POST http://127.0.0.1:3000/.well-known/ash/v1/message \
|
|
354
|
+
-H 'authorization: Basic b3BzOnRvcC1zZWNyZXQ=' \
|
|
355
|
+
-H 'content-type: application/json' \
|
|
356
|
+
-d '{"message":"Hello"}'
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
## Authoring Surface
|
|
360
|
+
|
|
361
|
+
Ash supports both a nested `agent/` layout and a flat project-root layout. The nested layout is the recommended default.
|
|
362
|
+
|
|
363
|
+
| Surface | Purpose | Typical Format |
|
|
364
|
+
| --- | --- | --- |
|
|
365
|
+
| `system` | Base system prompt and behavior | `system.md`, `system.ts` |
|
|
366
|
+
| `system/` | Additive always-on prompt layers | markdown or modules |
|
|
367
|
+
| `agent.ts` | Additive configuration such as model selection and metadata | `agent.ts` |
|
|
368
|
+
| `skills/` | Reusable capability packs and procedures | flat markdown, modules, or packaged skills |
|
|
369
|
+
| `lib/` | Package-local helper modules imported by authored entrypoints | TypeScript or JavaScript modules |
|
|
370
|
+
| `connections/` | Named downstream dependencies with runtime-owned auth, policy, and optional MCP tool lowering | TypeScript or JavaScript modules |
|
|
371
|
+
| `sandboxes/` | Named isolated bash-style environments with lifecycle hooks | TypeScript or JavaScript modules |
|
|
372
|
+
| `tools/` | Executable integrations | TypeScript or JavaScript modules |
|
|
373
|
+
| `schedules/` | Recurring jobs such as digests, syncs, and maintenance | markdown or modules |
|
|
374
|
+
| `subagents/` | Specialist local subagents | subagent packages |
|
|
375
|
+
|
|
376
|
+
The design rule behind all of this is straightforward: filesystem authoring and programmatic authoring should compile to the same internal agent model.
|
|
377
|
+
|
|
378
|
+
Each local subagent package can also define its own package-local `lib/`, `tools/`, `sandboxes/`,
|
|
379
|
+
and nested `subagents/` tree. `schedules/` remain root-only.
|
|
380
|
+
|
|
381
|
+
When the default harness workspace is created, shipped authored files appear at the workspace root:
|
|
382
|
+
|
|
383
|
+
- `skills/**/*` -> `skills/**/*`
|
|
384
|
+
|
|
385
|
+
Authored `lib/**/*` modules are not mounted into the harness workspace. They stay package-local
|
|
386
|
+
implementation code that entrypoint modules import through normal ESM resolution.
|
|
387
|
+
|
|
388
|
+
Authored sandboxes are also not mounted into the shared workspace. They are provisioned as separate
|
|
389
|
+
named execution environments and exposed as their own tools.
|
|
390
|
+
|
|
391
|
+
Those files are not injected wholesale into the always-on prompt. The base prompt only gets a short
|
|
392
|
+
workspace-awareness section that points the model at the relevant root entries, and deeper
|
|
393
|
+
inspection happens through the runtime workspace tools.
|
|
394
|
+
|
|
395
|
+
## TypeScript Without Losing The Plot
|
|
396
|
+
|
|
397
|
+
Ash is not trying to avoid code. It is trying to make code earn its place.
|
|
398
|
+
|
|
399
|
+
The framework exports typed public definitions such as `defineAgent`, `defineSystem`, `defineSkill`, `defineConnection`, `defineSandbox`, `defineTool`, `defineSchedule`, and `defineSubagent`. That gives you a clean path from markdown-first authoring into more dynamic behavior without abandoning the original mental model.
|
|
400
|
+
|
|
401
|
+
In practice, that means:
|
|
402
|
+
|
|
403
|
+
- use markdown for instruction layers, reusable procedures, and scheduled task bodies
|
|
404
|
+
- use TypeScript for `lib/`, connections, sandboxes, tools, model configuration, dynamic authored modules, and advanced composition
|
|
405
|
+
- keep the authored surface understandable even as runtime behavior becomes more capable
|
|
406
|
+
|
|
407
|
+
## Runtime Session Context
|
|
408
|
+
|
|
409
|
+
Authored runtime functions can read the active durable Ash session with `getSession()`.
|
|
410
|
+
|
|
411
|
+
```ts
|
|
412
|
+
import { defineTool, getSession } from "ash";
|
|
413
|
+
import { z } from "zod";
|
|
414
|
+
|
|
415
|
+
export default defineTool({
|
|
416
|
+
name: "get_weather",
|
|
417
|
+
description: "Get the current weather for a city.",
|
|
418
|
+
inputSchema: z.object({
|
|
419
|
+
city: z.string(),
|
|
420
|
+
}),
|
|
421
|
+
async execute(input) {
|
|
422
|
+
const session = getSession();
|
|
423
|
+
|
|
424
|
+
return {
|
|
425
|
+
city: input.city,
|
|
426
|
+
currentCallerId: session.auth.current?.principalId,
|
|
427
|
+
initiatorCallerId: session.auth.initiator?.principalId,
|
|
428
|
+
runId: session.runId,
|
|
429
|
+
sessionId: session.sessionId,
|
|
430
|
+
turnId: session.turn.id,
|
|
431
|
+
parentRunId: session.parent?.runId,
|
|
432
|
+
};
|
|
433
|
+
},
|
|
434
|
+
});
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
Today the public `Session` shape includes:
|
|
438
|
+
|
|
439
|
+
```ts
|
|
440
|
+
interface SessionTurn {
|
|
441
|
+
id: string;
|
|
442
|
+
sequence: number;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
interface SessionAuthContext {
|
|
446
|
+
attributes: Readonly<Record<string, string | readonly string[]>>;
|
|
447
|
+
authenticator: "http-basic" | "jwt-hmac" | "jwt-ecdsa" | "oidc" | "schedule";
|
|
448
|
+
issuer?: string;
|
|
449
|
+
principalId: string;
|
|
450
|
+
principalType: "service" | "user" | "runtime" | "unknown";
|
|
451
|
+
subject?: string;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
interface Session {
|
|
455
|
+
auth: {
|
|
456
|
+
current: SessionAuthContext | null;
|
|
457
|
+
initiator: SessionAuthContext | null;
|
|
458
|
+
};
|
|
459
|
+
sessionId: string;
|
|
460
|
+
runId: string;
|
|
461
|
+
turn: SessionTurn;
|
|
462
|
+
parent?: {
|
|
463
|
+
runId: string;
|
|
464
|
+
sessionId: string;
|
|
465
|
+
turn: SessionTurn;
|
|
466
|
+
};
|
|
467
|
+
}
|
|
468
|
+
```
|
|
469
|
+
|
|
470
|
+
Notes:
|
|
471
|
+
|
|
472
|
+
- `auth.current` is the caller for the active inbound turn.
|
|
473
|
+
- `auth.initiator` is the caller that started the durable session.
|
|
474
|
+
- For unprotected agents, both auth fields are `null`.
|
|
475
|
+
- For authenticated `next-message` turns, `auth.current` may change while `auth.initiator` stays stable.
|
|
476
|
+
- For top-level schedule runs, both auth fields point at a framework-owned `schedule` principal.
|
|
477
|
+
- `runId` and `sessionId` identify the current durable execution.
|
|
478
|
+
- `turn` identifies the current authored turn fragment and is always present.
|
|
479
|
+
- `parent` is present only when the current execution is a child subagent run.
|
|
480
|
+
- `parent.turn` identifies the delegating parent turn when `parent` is present.
|
|
481
|
+
- `getSession()` is backed by async local storage and only works inside authored runtime execution such as tools and other Ash-invoked function bodies.
|
|
482
|
+
- Calling `getSession()` during top-level module evaluation throws because no authored runtime session is active yet.
|
|
483
|
+
|
|
484
|
+
## Runtime Connections
|
|
485
|
+
|
|
486
|
+
Authored connections live under `connections/*.ts` and let Ash own downstream auth, retry and timeout policy, and optional MCP tool lowering.
|
|
487
|
+
|
|
488
|
+
`agent/connections/snowflake.ts`
|
|
489
|
+
|
|
490
|
+
```ts
|
|
491
|
+
import { defineConnection } from "ash";
|
|
492
|
+
|
|
493
|
+
export default defineConnection({
|
|
494
|
+
kind: "mcp",
|
|
495
|
+
transport: {
|
|
496
|
+
type: "streamable-http",
|
|
497
|
+
url: process.env.SNOWFLAKE_MCP_URL,
|
|
498
|
+
},
|
|
499
|
+
auth: {
|
|
500
|
+
kind: "bearer",
|
|
501
|
+
token: process.env.SNOWFLAKE_MCP_TOKEN,
|
|
502
|
+
},
|
|
503
|
+
policy: {
|
|
504
|
+
timeoutMs: 30_000,
|
|
505
|
+
retryAttempts: 1,
|
|
506
|
+
},
|
|
507
|
+
tools: {
|
|
508
|
+
mode: "allow",
|
|
509
|
+
allow: ["query", "explore"],
|
|
510
|
+
namespace: "snowflake",
|
|
511
|
+
},
|
|
512
|
+
});
|
|
513
|
+
```
|
|
514
|
+
|
|
515
|
+
Authored runtime code can then bind the live handle lazily with `await getConnection(name)`:
|
|
516
|
+
|
|
517
|
+
```ts
|
|
518
|
+
import { defineTool, getConnection } from "ash";
|
|
519
|
+
import { z } from "zod";
|
|
520
|
+
|
|
521
|
+
export default defineTool({
|
|
522
|
+
name: "execute_sql",
|
|
523
|
+
description: "Execute a read-only Snowflake query.",
|
|
524
|
+
inputSchema: z.object({
|
|
525
|
+
sql: z.string(),
|
|
526
|
+
}),
|
|
527
|
+
async execute(input) {
|
|
528
|
+
const snowflake = await getConnection("snowflake");
|
|
529
|
+
|
|
530
|
+
if (snowflake.kind !== "mcp") {
|
|
531
|
+
throw new Error('Expected connection "snowflake" to be an MCP connection.');
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
return await snowflake.callTool("query", {
|
|
535
|
+
sql: input.sql,
|
|
536
|
+
});
|
|
537
|
+
},
|
|
538
|
+
});
|
|
539
|
+
```
|
|
540
|
+
|
|
541
|
+
Current boundary:
|
|
542
|
+
|
|
543
|
+
- `connections/` is a root-agent slot today.
|
|
544
|
+
- MCP over streamable HTTP is implemented end to end, including optional namespaced tool lowering such as `snowflake.query`.
|
|
545
|
+
- HTTP connections are implemented end to end through `await getConnection(...).request(...)`.
|
|
546
|
+
- HTTP auth currently supports service-owned `none`, `api-key`, `basic`, `bearer`, and `service-account` flows.
|
|
547
|
+
- Current `service-account` auth uses Google's OAuth 2 service-account token flow, which fits Google APIs such as Sheets.
|
|
548
|
+
- `service-account` auth for MCP and `user-passthrough` remain later-phase work.
|
|
549
|
+
|
|
550
|
+
## Current Scope
|
|
551
|
+
|
|
552
|
+
The current implementation is already useful, but it is intentionally opinionated about what is finished and what is still maturing.
|
|
553
|
+
|
|
554
|
+
- Discovery, compilation, prompt layering, tools, skills, schedules, durable message runs, and stream events are implemented today.
|
|
555
|
+
- Authored connections are part of discovery, compilation, runtime resolution, async-local authored execution, MCP tool lowering, and HTTP request execution today.
|
|
556
|
+
- Authored sandboxes are part of discovery, compilation, runtime provisioning, and harness injection today.
|
|
557
|
+
- Local subagents are part of the authored surface, compiler output, and runtime delegation flow.
|
|
558
|
+
- Each local subagent call runs as a separate child workflow with its own durable stream.
|
|
559
|
+
- Local and Vercel sandbox backends are implemented today. Docker is intentionally deferred.
|
|
560
|
+
|
|
561
|
+
That boundary is important because Ash is optimizing for correctness and a coherent long-term model, not for piling on loosely connected features.
|
|
562
|
+
|
|
563
|
+
## Framework Internals
|
|
564
|
+
|
|
565
|
+
If you are evaluating Ash as a framework, the internal architecture is intentionally split into clear phases:
|
|
566
|
+
|
|
567
|
+
1. Discovery walks the filesystem and emits a manifest plus diagnostics without executing authored modules.
|
|
568
|
+
2. The compiler writes framework-owned artifacts under `.ash/`.
|
|
569
|
+
3. Runtime loaders hydrate compiled inputs into runtime-owned models.
|
|
570
|
+
4. Turn preparation rebuilds prompt layers, history, skills, sandboxes, tools, and runtime state for the next step.
|
|
571
|
+
5. The harness executes a model turn with pause/resume around runtime actions and runtime-owned sandbox/workspace handles.
|
|
572
|
+
6. The durable workflow orchestrates conversation and task runs and streams run events.
|
|
573
|
+
|
|
574
|
+
That separation is a large part of why the top-level authoring model can stay simple without the runtime becoming opaque.
|
|
575
|
+
|
|
576
|
+
If you want to go deeper:
|
|
577
|
+
|
|
578
|
+
- Start with [docs/public/README.md](./docs/public/README.md) for end-user framework docs.
|
|
579
|
+
- Start with [apps/weather-agent](./apps/weather-agent) for the smallest complete example.
|
|
580
|
+
- Read [packages/ash/src/public/index.ts](./packages/ash/src/public/index.ts) for the public framework surface.
|
|
581
|
+
- Read [docs/internals/README.md](./docs/internals/README.md) for the implementation architecture.
|
|
582
|
+
- Explore [packages/ash](./packages/ash) for the framework and CLI itself.
|
|
583
|
+
|
|
584
|
+
## Repository Layout
|
|
585
|
+
|
|
586
|
+
```text
|
|
587
|
+
.
|
|
588
|
+
├── apps/
|
|
589
|
+
│ └── weather-agent/ # minimal end-to-end example
|
|
590
|
+
├── docs/
|
|
591
|
+
│ ├── public/ # end-user framework docs
|
|
592
|
+
│ └── internals/ # framework architecture notes
|
|
593
|
+
├── packages/
|
|
594
|
+
│ └── ash/ # framework package + CLI
|
|
595
|
+
└── README.md
|
|
596
|
+
```
|
|
597
|
+
|
|
598
|
+
Ash is built to make agent systems easier to author, easier to inspect, and easier to trust. The goal is not only to make agents more capable. It is to make them much easier to think about.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"info.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/info.ts"],"names":[],"mappings":"AAGA,UAAU,aAAa;IACrB,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;
|
|
1
|
+
{"version":3,"file":"info.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/info.ts"],"names":[],"mappings":"AAGA,UAAU,aAAa;IACrB,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAwBD;;GAEG;AACH,wBAAsB,oBAAoB,CAAC,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAwKhG"}
|
|
@@ -3,15 +3,6 @@ import { createCliTheme, renderCliBanner, renderCliSection } from "../ui/output.
|
|
|
3
3
|
function pluralize(count, noun) {
|
|
4
4
|
return `${count} ${noun}${count === 1 ? "" : "s"}`;
|
|
5
5
|
}
|
|
6
|
-
function formatContextEntryLabel(entry) {
|
|
7
|
-
if (entry.kind === "context-file") {
|
|
8
|
-
return entry.mediaType === undefined ? "Context File" : `Context File (${entry.mediaType})`;
|
|
9
|
-
}
|
|
10
|
-
return "Context Module";
|
|
11
|
-
}
|
|
12
|
-
function formatWorkspaceEntryLabel() {
|
|
13
|
-
return "Workspace File";
|
|
14
|
-
}
|
|
15
6
|
function formatDiscoverySummary(errors, warnings) {
|
|
16
7
|
const errorLabel = `${errors} error${errors === 1 ? "" : "s"}`;
|
|
17
8
|
const warningLabel = `${warnings} warning${warnings === 1 ? "" : "s"}`;
|
|
@@ -51,8 +42,7 @@ export async function printApplicationInfo(logger, appRoot) {
|
|
|
51
42
|
value: info.outputDir,
|
|
52
43
|
},
|
|
53
44
|
];
|
|
54
|
-
const
|
|
55
|
-
const workspaceRows = [];
|
|
45
|
+
const promptLayerRows = [];
|
|
56
46
|
if (compiledState !== null) {
|
|
57
47
|
applicationRows.push({
|
|
58
48
|
label: "Agent Root",
|
|
@@ -73,11 +63,11 @@ export async function printApplicationInfo(logger, appRoot) {
|
|
|
73
63
|
: "success",
|
|
74
64
|
value: formatDiscoverySummary(compiledState.metadata.discovery.summary.errors, compiledState.metadata.discovery.summary.warnings),
|
|
75
65
|
}, {
|
|
76
|
-
label: "
|
|
77
|
-
value: pluralize(compiledState.manifest.
|
|
66
|
+
label: "Prompt Layers",
|
|
67
|
+
value: pluralize(compiledState.manifest.promptLayers.length, "prompt layer"),
|
|
78
68
|
}, {
|
|
79
|
-
label: "
|
|
80
|
-
value: pluralize(compiledState.manifest.
|
|
69
|
+
label: "Skills",
|
|
70
|
+
value: pluralize(compiledState.manifest.skills.length, "skill"),
|
|
81
71
|
});
|
|
82
72
|
artifactRows.unshift({
|
|
83
73
|
label: "Compiled Manifest",
|
|
@@ -94,30 +84,16 @@ export async function printApplicationInfo(logger, appRoot) {
|
|
|
94
84
|
}, {
|
|
95
85
|
label: "Metadata",
|
|
96
86
|
value: compiledState.paths.compileMetadataPath,
|
|
97
|
-
}, {
|
|
98
|
-
label: "Workspace",
|
|
99
|
-
value: compiledState.paths.workspaceResourcesPath,
|
|
100
87
|
});
|
|
101
|
-
|
|
88
|
+
promptLayerRows.push(...(compiledState.manifest.promptLayers.length === 0
|
|
102
89
|
? [
|
|
103
90
|
{
|
|
104
|
-
label: "
|
|
105
|
-
value: "No
|
|
91
|
+
label: "Prompt Layers",
|
|
92
|
+
value: "No prompt layers discovered.",
|
|
106
93
|
},
|
|
107
94
|
]
|
|
108
|
-
: compiledState.manifest.
|
|
109
|
-
label:
|
|
110
|
-
value: entry.logicalPath,
|
|
111
|
-
}))));
|
|
112
|
-
workspaceRows.push(...(compiledState.manifest.workspace.length === 0
|
|
113
|
-
? [
|
|
114
|
-
{
|
|
115
|
-
label: "Workspace",
|
|
116
|
-
value: "No workspace seed files discovered.",
|
|
117
|
-
},
|
|
118
|
-
]
|
|
119
|
-
: compiledState.manifest.workspace.map((entry) => ({
|
|
120
|
-
label: formatWorkspaceEntryLabel(),
|
|
95
|
+
: compiledState.manifest.promptLayers.map((entry) => ({
|
|
96
|
+
label: entry.logicalPath.startsWith("system/") ? "Layer" : "System",
|
|
121
97
|
value: entry.logicalPath,
|
|
122
98
|
}))));
|
|
123
99
|
}
|
|
@@ -148,13 +124,8 @@ export async function printApplicationInfo(logger, appRoot) {
|
|
|
148
124
|
: [
|
|
149
125
|
"",
|
|
150
126
|
renderCliSection(theme, {
|
|
151
|
-
rows:
|
|
152
|
-
title: "
|
|
153
|
-
}),
|
|
154
|
-
"",
|
|
155
|
-
renderCliSection(theme, {
|
|
156
|
-
rows: workspaceRows,
|
|
157
|
-
title: "Workspace",
|
|
127
|
+
rows: promptLayerRows,
|
|
128
|
+
title: "Prompt Layers",
|
|
158
129
|
}),
|
|
159
130
|
]),
|
|
160
131
|
"",
|