experimental-ash 0.25.2 → 0.27.0
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/CHANGELOG.md +13 -0
- package/bin/ash.d.ts +4 -4
- package/bin/ash.js +12 -8
- package/dist/docs/public/channels/README.md +26 -2
- package/dist/docs/public/channels/discord.md +159 -0
- package/dist/docs/public/channels/slack.md +14 -2
- package/dist/docs/public/subagents.md +38 -0
- package/dist/src/_virtual/_rolldown/runtime.js +1 -0
- package/dist/src/channel/adapter-context.js +1 -24
- package/dist/src/channel/adapter.js +1 -62
- package/dist/src/channel/compiled-channel.js +1 -6
- package/dist/src/channel/cross-channel-receive.js +2 -108
- package/dist/src/channel/http.js +1 -30
- package/dist/src/channel/receive-args.js +1 -1
- package/dist/src/channel/resolve-text.js +1 -59
- package/dist/src/channel/routes.js +1 -15
- package/dist/src/channel/schedule.js +1 -81
- package/dist/src/channel/send.js +1 -81
- package/dist/src/channel/session-callback.js +1 -65
- package/dist/src/channel/session.js +1 -58
- package/dist/src/channel/types.js +1 -1
- package/dist/src/cli/commands/channels.d.ts +15 -0
- package/dist/src/cli/commands/channels.js +3 -0
- package/dist/src/cli/commands/info.js +2 -2
- package/dist/src/cli/dev/environment.js +1 -1
- package/dist/src/cli/dev/input-requests.js +1 -1
- package/dist/src/cli/dev/input.js +1 -1
- package/dist/src/cli/dev/repl.js +2 -3
- package/dist/src/cli/dev/terminal.js +5 -5
- package/dist/src/cli/dev/url.js +1 -1
- package/dist/src/cli/run.js +2 -2
- package/dist/src/cli/ui/output.js +8 -8
- package/dist/src/client/client-error.js +1 -19
- package/dist/src/client/client.js +1 -128
- package/dist/src/client/index.js +1 -11
- package/dist/src/client/message-reducer-types.js +1 -1
- package/dist/src/client/message-reducer.js +1 -456
- package/dist/src/client/message-response.js +1 -55
- package/dist/src/client/ndjson.js +3 -62
- package/dist/src/client/open-stream.js +1 -45
- package/dist/src/client/reducer.js +1 -1
- package/dist/src/client/session-utils.js +1 -62
- package/dist/src/client/session.js +1 -206
- package/dist/src/client/types.js +1 -1
- package/dist/src/client/url.js +1 -34
- package/dist/src/compiled/.vendor-stamp.json +6 -1
- package/dist/src/compiled/@vercel/oidc/LICENSE +202 -0
- package/dist/src/compiled/@vercel/oidc/index.d.ts +21 -0
- package/dist/src/compiled/@vercel/oidc/index.js +2 -0
- package/dist/src/compiled/@vercel/oidc/package.json +7 -0
- package/dist/src/compiled/chokidar/LICENSE +21 -0
- package/dist/src/compiled/chokidar/index.d.ts +33 -0
- package/dist/src/compiled/chokidar/index.js +1 -0
- package/dist/src/compiled/chokidar/package.json +7 -0
- package/dist/src/compiled/commander/LICENSE +22 -0
- package/dist/src/compiled/commander/index.d.ts +1113 -0
- package/dist/src/{chunks/url-JdCGA634.js → compiled/commander/index.js} +10 -10
- package/dist/src/compiled/commander/package.json +7 -0
- package/dist/src/compiled/gray-matter/LICENSE +21 -0
- package/dist/src/compiled/gray-matter/index.d.ts +62 -0
- package/dist/src/{chunks/gray-matter-D-9jHwOT.js → compiled/gray-matter/index.js} +2 -2
- package/dist/src/compiled/gray-matter/package.json +7 -0
- package/dist/src/compiled/picocolors/LICENSE +15 -0
- package/dist/src/compiled/picocolors/index.d.ts +55 -0
- package/dist/src/compiled/picocolors/index.js +1 -0
- package/dist/src/compiled/picocolors/package.json +7 -0
- package/dist/src/compiler/artifacts.js +1 -147
- package/dist/src/compiler/compile-agent.js +3 -76
- package/dist/src/compiler/compile-from-memory.js +1 -59
- package/dist/src/compiler/manifest.js +1 -424
- package/dist/src/compiler/model-catalog.js +1 -224
- package/dist/src/compiler/module-map.js +5 -295
- package/dist/src/compiler/normalize-agent-config.js +1 -157
- package/dist/src/compiler/normalize-channel.js +1 -51
- package/dist/src/compiler/normalize-connection.js +1 -58
- package/dist/src/compiler/normalize-helpers.js +1 -23
- package/dist/src/compiler/normalize-hook.js +1 -19
- package/dist/src/compiler/normalize-instructions.js +1 -28
- package/dist/src/compiler/normalize-manifest.js +1 -79
- package/dist/src/compiler/normalize-sandbox.js +1 -20
- package/dist/src/compiler/normalize-schedule.js +1 -38
- package/dist/src/compiler/normalize-skill.js +1 -60
- package/dist/src/compiler/normalize-subagent.js +1 -174
- package/dist/src/compiler/normalize-tool.js +1 -40
- package/dist/src/compiler/remote-agent-node.js +1 -19
- package/dist/src/compiler/workspace-resources.js +1 -85
- package/dist/src/context/accessors.js +1 -93
- package/dist/src/context/container.js +1 -89
- package/dist/src/context/hook-lifecycle.js +1 -242
- package/dist/src/context/key.js +1 -39
- package/dist/src/context/keys.js +1 -43
- package/dist/src/context/node.js +1 -9
- package/dist/src/context/provider.js +1 -1
- package/dist/src/context/providers/connection.js +1 -17
- package/dist/src/context/providers/sandbox.js +1 -46
- package/dist/src/context/providers/session.js +1 -18
- package/dist/src/context/run-step.js +1 -51
- package/dist/src/context/seed-keys.js +1 -37
- package/dist/src/context/serialize.js +1 -44
- package/dist/src/discover/connections.js +1 -153
- package/dist/src/discover/diagnostics.js +1 -82
- package/dist/src/discover/discover-agent.js +1 -159
- package/dist/src/discover/discover-subagent.js +1 -223
- package/dist/src/discover/filesystem.js +1 -215
- package/dist/src/discover/grammar.js +1 -371
- package/dist/src/discover/lib.js +1 -34
- package/dist/src/discover/manifest.js +1 -136
- package/dist/src/discover/markdown.js +1 -17
- package/dist/src/discover/named-source-directory.js +1 -188
- package/dist/src/discover/project-source.js +1 -152
- package/dist/src/discover/project.js +1 -117
- package/dist/src/discover/sandbox.js +1 -220
- package/dist/src/discover/schedules.js +1 -41
- package/dist/src/discover/skills.js +1 -274
- package/dist/src/discover/slots.js +1 -68
- package/dist/src/evals/cli/eval.js +1 -1
- package/dist/src/evals/define-eval-suite.js +1 -1
- package/dist/src/evals/index.js +1 -1
- package/dist/src/evals/loaders/index.js +1 -1
- package/dist/src/evals/loaders/json.js +1 -1
- package/dist/src/evals/loaders/yaml.js +1 -1
- package/dist/src/evals/reporters/index.js +1 -1
- package/dist/src/evals/runner/artifacts.js +3 -3
- package/dist/src/evals/runner/derive-run-facts.js +1 -1
- package/dist/src/evals/runner/discover.js +1 -1
- package/dist/src/evals/runner/execute-case.js +1 -1
- package/dist/src/evals/runner/execute-suite.js +1 -1
- package/dist/src/evals/runner/reporters/braintrust.js +2 -2
- package/dist/src/evals/runner/reporters/console.js +1 -1
- package/dist/src/evals/runner/resolve-git-metadata.js +1 -1
- package/dist/src/evals/scorers/autoevals-client.js +2 -2
- package/dist/src/evals/scorers/autoevals.js +1 -1
- package/dist/src/evals/scorers/json.js +1 -1
- package/dist/src/evals/scorers/run.js +1 -1
- package/dist/src/evals/scorers/sql.js +1 -1
- package/dist/src/evals/scorers/text.js +1 -1
- package/dist/src/evals/scores/index.js +1 -1
- package/dist/src/execution/authorization-challenge-defaults.js +1 -60
- package/dist/src/execution/await-authorization-orchestrator.js +1 -192
- package/dist/src/execution/await-authorization-splice.js +1 -66
- package/dist/src/execution/connection-auth-steps.js +1 -338
- package/dist/src/execution/node-step.js +1 -146
- package/dist/src/execution/remote-agent-dispatch.js +1 -79
- package/dist/src/execution/runtime-context.js +1 -26
- package/dist/src/execution/runtime-errors.js +1 -19
- package/dist/src/execution/sandbox/bash-tool.js +1 -42
- package/dist/src/execution/sandbox/bindings/local.js +1 -296
- package/dist/src/execution/sandbox/bindings/vercel.js +1 -363
- package/dist/src/execution/sandbox/ensure.js +1 -91
- package/dist/src/execution/sandbox/glob-tool.js +3 -146
- package/dist/src/execution/sandbox/grep-tool.js +3 -183
- package/dist/src/execution/sandbox/lazy-backend.js +1 -33
- package/dist/src/execution/sandbox/prewarm.js +1 -132
- package/dist/src/execution/sandbox/read-file-tool.js +3 -118
- package/dist/src/execution/sandbox/require-sandbox.js +1 -32
- package/dist/src/execution/sandbox/ripgrep-probe.js +1 -36
- package/dist/src/execution/sandbox/session.js +3 -158
- package/dist/src/execution/sandbox/shell-quote.js +1 -14
- package/dist/src/execution/sandbox/stream-utils.js +1 -22
- package/dist/src/execution/sandbox/truncate-output.js +3 -110
- package/dist/src/execution/sandbox/write-file-tool.js +1 -62
- package/dist/src/execution/session-callback-step.js +1 -72
- package/dist/src/execution/session.js +3 -94
- package/dist/src/execution/skills/instructions.js +2 -30
- package/dist/src/execution/skills/types.js +1 -1
- package/dist/src/execution/subagent-adapter.js +1 -94
- package/dist/src/execution/subagent-hitl-proxy.js +1 -81
- package/dist/src/execution/subagent-invocation.js +2 -16
- package/dist/src/execution/subagent-tool.js +1 -48
- package/dist/src/execution/tool-compaction.js +1 -54
- package/dist/src/execution/turn-workflow.js +1 -95
- package/dist/src/execution/web-fetch/html.js +7 -60
- package/dist/src/execution/web-fetch/tool.js +1 -90
- package/dist/src/execution/workflow-entry.js +1 -494
- package/dist/src/execution/workflow-errors.js +1 -54
- package/dist/src/execution/workflow-runtime.js +3 -161
- package/dist/src/execution/workflow-steps.js +1 -467
- package/dist/src/harness/action-result-helpers.js +1 -82
- package/dist/src/harness/attachment-staging.js +1 -303
- package/dist/src/harness/compaction.js +4 -221
- package/dist/src/harness/emission.js +1 -323
- package/dist/src/harness/execute-tool.js +1 -1
- package/dist/src/harness/input-extraction.js +1 -62
- package/dist/src/harness/input-requests.js +1 -306
- package/dist/src/harness/instrumentation-config.js +1 -42
- package/dist/src/harness/messages.js +1 -144
- package/dist/src/harness/model-call-error.js +1 -368
- package/dist/src/harness/otel-integration.js +1 -18
- package/dist/src/harness/prompt-cache.js +1 -137
- package/dist/src/harness/provider-tools.js +1 -137
- package/dist/src/harness/proxy-input-requests.js +1 -91
- package/dist/src/harness/runtime-actions.js +1 -321
- package/dist/src/harness/step-hooks.js +1 -192
- package/dist/src/harness/tool-loop.js +1 -877
- package/dist/src/harness/tool-result-pruning.js +1 -124
- package/dist/src/harness/tools.js +1 -98
- package/dist/src/harness/types.js +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/internal/application/cache-metadata.js +1 -42
- package/dist/src/internal/application/compiled-artifacts.js +4 -114
- package/dist/src/internal/application/import-specifier.js +1 -58
- package/dist/src/internal/application/package.js +1 -196
- package/dist/src/internal/application/paths.js +1 -117
- package/dist/src/internal/application/runtime-compiled-artifacts-source.js +1 -11
- package/dist/src/internal/attachments/data.js +1 -127
- package/dist/src/internal/attachments/errors.js +1 -26
- package/dist/src/internal/attachments/refs.js +1 -94
- package/dist/src/internal/attachments/sandbox-refs.js +1 -78
- package/dist/src/internal/attachments/url-refs.js +1 -20
- package/dist/src/internal/authored-asset-import-plugin.js +1 -141
- package/dist/src/internal/authored-definition/channel.js +1 -21
- package/dist/src/internal/authored-definition/connection.js +1 -148
- package/dist/src/internal/authored-definition/core.js +1 -180
- package/dist/src/internal/authored-definition/sandbox.js +1 -47
- package/dist/src/internal/authored-definition/schema-backed.js +1 -56
- package/dist/src/internal/authored-module-bundle.js +2 -19
- package/dist/src/internal/authored-module-loader.js +2 -263
- package/dist/src/internal/authored-module-map-loader.js +1 -53
- package/dist/src/internal/authored-module.js +1 -81
- package/dist/src/internal/authored-package-tsconfig-paths.js +1 -209
- package/dist/src/internal/bundler/nitro-rolldown.js +1 -42
- package/dist/src/internal/helpers/markdown.js +3 -174
- package/dist/src/internal/json-schema.js +1 -13
- package/dist/src/internal/logging.js +1 -226
- package/dist/src/internal/nitro/host/artifacts-config.js +1 -17
- package/dist/src/internal/nitro/host/build-application.js +1 -177
- package/dist/src/internal/nitro/host/build-vercel-agent-summary.js +1 -140
- package/dist/src/internal/nitro/host/channel-routes.js +2 -126
- package/dist/src/internal/nitro/host/compiled-sandbox-backend-prune-plugin.js +2 -28
- package/dist/src/internal/nitro/host/configure-nitro-routes.js +4 -272
- package/dist/src/internal/nitro/host/create-application-nitro.js +1 -491
- package/dist/src/internal/nitro/host/cron-handler-route.js +1 -49
- package/dist/src/internal/nitro/host/dev-authored-source-watcher.js +1 -390
- package/dist/src/internal/nitro/host/nitro-bundler-config.js +1 -10
- package/dist/src/internal/nitro/host/nitro-routing-import-specifier-plugin.js +1 -28
- package/dist/src/internal/nitro/host/prepare-application-host.js +1 -32
- package/dist/src/internal/nitro/host/schedule-task-routes.js +2 -148
- package/dist/src/internal/nitro/host/server-external-packages.js +1 -107
- package/dist/src/internal/nitro/host/start-development-server.js +1 -223
- package/dist/src/internal/nitro/host/types.js +1 -1
- package/dist/src/internal/nitro/host/vercel-build-output-config.js +1 -14
- package/dist/src/internal/nitro/host/vercel-build-prewarm.js +1 -30
- package/dist/src/internal/nitro/host.js +1 -2
- package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response.js +2 -180
- package/dist/src/internal/nitro/routes/agent-info/load-agent-info-data.js +1 -46
- package/dist/src/internal/nitro/routes/channel-dispatch.js +1 -74
- package/dist/src/internal/nitro/routes/health.js +1 -17
- package/dist/src/internal/nitro/routes/index.js +2 -89
- package/dist/src/internal/nitro/routes/info.js +1 -50
- package/dist/src/internal/nitro/routes/runtime-artifacts.js +1 -24
- package/dist/src/internal/nitro/routes/runtime-stack.js +1 -23
- package/dist/src/internal/nitro/routes/schedule-task.js +1 -57
- package/dist/src/internal/nitro/routes/workflow-data.js +1 -141
- package/dist/src/internal/nitro/routes/workflow-route-helpers.js +1 -137
- package/dist/src/internal/nitro/routes/workflow-run-events.js +1 -41
- package/dist/src/internal/nitro/routes/workflow-run-steps.js +1 -41
- package/dist/src/internal/nitro/routes/workflow-run.js +1 -34
- package/dist/src/internal/nitro/routes/workflow-runs.js +1 -28
- package/dist/src/internal/node-esm-compat-banner.js +2 -65
- package/dist/src/internal/package-name.js +1 -8
- package/dist/src/internal/process/pnpm.d.ts +28 -0
- package/dist/src/internal/process/pnpm.js +1 -0
- package/dist/src/internal/runtime-model.js +1 -24
- package/dist/src/internal/runtime-registry.js +1 -93
- package/dist/src/internal/vercel-agent-summary.js +1 -72
- package/dist/src/internal/workflow/builtins.js +1 -18
- package/dist/src/internal/workflow/index.js +1 -9
- package/dist/src/internal/workflow-bundle/ash-service-route-output.js +3 -93
- package/dist/src/internal/workflow-bundle/builder-support.js +5 -372
- package/dist/src/internal/workflow-bundle/builder.js +5 -472
- package/dist/src/internal/workflow-bundle/nitro-step-entry.js +2 -132
- package/dist/src/internal/workflow-bundle/vercel-workflow-output.js +3 -494
- package/dist/src/internal/workflow-bundle/workflow-builders.js +1 -292
- package/dist/src/internal/workflow-bundle/workflow-core-shim.js +1 -84
- package/dist/src/internal/workflow-bundle/workflow-transformer.js +5 -318
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/ajv.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/code.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/index.js +2 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/scope.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/errors.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/index.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/names.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/ref_error.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/resolve.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/rules.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/util.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/applicability.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/boolSchema.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/dataType.js +4 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/defaults.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/index.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/keyword.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/subschema.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/core.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/data.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-draft-07.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/equal.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/ucs2length.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/uri.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/validation_error.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/allOf.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/anyOf.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/contains.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/dependencies.js +4 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/if.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/index.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/items.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/items2020.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/not.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/oneOf.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/properties.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/thenElse.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/code.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/id.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/index.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/ref.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/discriminator/index.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/discriminator/types.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/draft7.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/format.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/index.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/metadata.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/const.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/enum.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/index.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitItems.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitLength.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitNumber.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/multipleOf.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/pattern.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/required.js +1 -0
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +1 -0
- package/dist/src/node_modules/.pnpm/autoevals@0.0.132_ws@8.21.0/node_modules/autoevals/jsdist/index.js +384 -0
- package/dist/src/node_modules/.pnpm/compute-cosine-similarity@1.1.0/node_modules/compute-cosine-similarity/lib/index.js +1 -0
- package/dist/src/node_modules/.pnpm/compute-dot@1.1.0/node_modules/compute-dot/lib/index.js +1 -0
- package/dist/src/node_modules/.pnpm/compute-l2norm@1.1.0/node_modules/compute-l2norm/lib/index.js +1 -0
- package/dist/src/node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js +1 -0
- package/dist/src/node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/index.js +1 -0
- package/dist/src/node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/lib/schemes.js +1 -0
- package/dist/src/node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/lib/utils.js +1 -0
- package/dist/src/node_modules/.pnpm/js-levenshtein@1.1.6/node_modules/js-levenshtein/index.js +1 -0
- package/dist/src/node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/dist/js-yaml.js +32 -0
- package/dist/src/node_modules/.pnpm/json-schema-traverse@1.0.0/node_modules/json-schema-traverse/index.js +1 -0
- package/dist/src/node_modules/.pnpm/mustache@4.2.0/node_modules/mustache/mustache.js +4 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/_vendor/partial-json-parser/parser.js +2 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/auth/workload-identity-auth.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/azure.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/client.js +11 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/core/api-promise.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/core/error.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/core/pagination.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/core/resource.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/core/streaming.js +3 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/core/uploads.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/error.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/index.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/internal/decoders/line.js +3 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/internal/detect-platform.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/internal/errors.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/internal/headers.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/internal/parse.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/internal/qs/formats.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/internal/qs/stringify.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/internal/qs/utils.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/internal/request-options.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/internal/shims.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/internal/to-file.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/internal/tslib.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/internal/uploads.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/internal/utils/base64.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/internal/utils/bytes.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/internal/utils/env.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/internal/utils/log.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/internal/utils/path.js +2 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/internal/utils/query.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/internal/utils/sleep.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/internal/utils/uuid.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/internal/utils/values.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/internal/utils.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/lib/AbstractChatCompletionRunner.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/lib/AssistantStream.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/lib/ChatCompletionRunner.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/lib/ChatCompletionStream.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/lib/ChatCompletionStreamingRunner.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/lib/EventStream.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/lib/ResponsesParser.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/lib/RunnableFunction.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/lib/Util.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/lib/chatCompletionUtils.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/lib/parser.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/lib/responses/ResponseStream.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/admin.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/organization/admin-api-keys.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/organization/audit-logs.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/organization/certificates.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/organization/data-retention.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/organization/groups/groups.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/organization/groups/roles.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/organization/groups/users.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/organization/invites.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/organization/organization.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/organization/projects/api-keys.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/organization/projects/certificates.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/organization/projects/data-retention.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/organization/projects/groups/groups.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/organization/projects/groups/roles.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/organization/projects/hosted-tool-permissions.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/organization/projects/model-permissions.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/organization/projects/projects.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/organization/projects/rate-limits.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/organization/projects/roles.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/organization/projects/service-accounts.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/organization/projects/spend-alerts.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/organization/projects/users/roles.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/organization/projects/users/users.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/organization/roles.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/organization/spend-alerts.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/organization/usage.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/organization/users/roles.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/admin/organization/users/users.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/audio/audio.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/audio/speech.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/audio/transcriptions.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/audio/translations.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/batches.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/beta/assistants.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/beta/beta.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/beta/chatkit/chatkit.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/beta/chatkit/sessions.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/beta/chatkit/threads.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/beta/realtime/realtime.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/beta/realtime/sessions.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/beta/realtime/transcription-sessions.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/beta/threads/messages.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/beta/threads/runs/runs.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/beta/threads/runs/steps.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/beta/threads/threads.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/chat/chat.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/chat/completions/completions.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/chat/completions/index.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/chat/completions/messages.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/chat/index.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/completions.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/containers/containers.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/containers/files/content.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/containers/files/files.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/conversations/conversations.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/conversations/items.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/embeddings.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/evals/evals.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/evals/runs/output-items.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/evals/runs/runs.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/files.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/fine-tuning/alpha/alpha.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/fine-tuning/alpha/graders.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/fine-tuning/checkpoints/checkpoints.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/fine-tuning/checkpoints/permissions.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/fine-tuning/fine-tuning.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/fine-tuning/jobs/checkpoints.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/fine-tuning/jobs/jobs.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/fine-tuning/methods.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/graders/grader-models.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/graders/graders.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/images.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/index.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/models.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/moderations.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/realtime/calls.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/realtime/client-secrets.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/realtime/realtime.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/responses/input-items.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/responses/input-tokens.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/responses/responses.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/shared.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/skills/content.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/skills/skills.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/skills/versions/content.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/skills/versions/versions.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/uploads/parts.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/uploads/uploads.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/vector-stores/file-batches.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/vector-stores/files.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/vector-stores/vector-stores.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/videos.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/webhooks/index.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/webhooks/webhooks.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/resources/webhooks.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/streaming.js +1 -0
- package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/version.js +1 -0
- package/dist/src/node_modules/.pnpm/validate.io-array@1.0.6/node_modules/validate.io-array/lib/index.js +1 -0
- package/dist/src/node_modules/.pnpm/validate.io-function@1.0.2/node_modules/validate.io-function/lib/index.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/Options.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/Refs.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/errorMessages.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/index.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parseDef.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parseTypes.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/any.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/array.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/date.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/default.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/map.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/never.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/null.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/number.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/object.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/record.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/set.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/string.js +3 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/union.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/selectParser.js +1 -0
- package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js +1 -0
- package/dist/src/node_modules/.pnpm/zod@3.25.76/node_modules/zod/index.js +1 -0
- package/dist/src/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/ZodError.js +1 -0
- package/dist/src/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/errors.js +1 -0
- package/dist/src/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/external.js +1 -0
- package/dist/src/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.js +1 -0
- package/dist/src/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js +1 -0
- package/dist/src/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/typeAliases.js +1 -0
- package/dist/src/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/util.js +1 -0
- package/dist/src/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/index.js +1 -0
- package/dist/src/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/locales/en.js +1 -0
- package/dist/src/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.js +1 -0
- package/dist/src/packages/ash-scaffold/src/channels.js +7 -0
- package/dist/src/packages/ash-scaffold/src/files.js +1 -0
- package/dist/src/packages/ash-scaffold/src/index.js +1 -0
- package/dist/src/packages/ash-scaffold/src/module-files.js +1 -0
- package/dist/src/packages/ash-scaffold/src/package-json.js +1 -0
- package/dist/src/packages/ash-scaffold/src/project.js +1 -0
- package/dist/src/protocol/message.js +2 -501
- package/dist/src/protocol/routes.js +1 -85
- package/dist/src/public/agents/auth.js +1 -37
- package/dist/src/public/channels/ash.js +2 -346
- package/dist/src/public/channels/auth.js +1 -414
- package/dist/src/public/channels/discord/api.d.ts +99 -0
- package/dist/src/public/channels/discord/api.js +2 -0
- package/dist/src/public/channels/discord/defaults.d.ts +9 -0
- package/dist/src/public/channels/discord/defaults.js +3 -0
- package/dist/src/public/channels/discord/discordChannel.d.ts +132 -0
- package/dist/src/public/channels/discord/discordChannel.js +1 -0
- package/dist/src/public/channels/discord/hitl.d.ts +34 -0
- package/dist/src/public/channels/discord/hitl.js +1 -0
- package/dist/src/public/channels/discord/inbound.d.ts +97 -0
- package/dist/src/public/channels/discord/inbound.js +2 -0
- package/dist/src/public/channels/discord/index.d.ts +7 -0
- package/dist/src/public/channels/discord/index.js +1 -0
- package/dist/src/public/channels/discord/responses.d.ts +11 -0
- package/dist/src/public/channels/discord/responses.js +1 -0
- package/dist/src/public/channels/discord/verify.d.ts +38 -0
- package/dist/src/public/channels/discord/verify.js +1 -0
- package/dist/src/public/channels/discord/verifyInbound.d.ts +6 -0
- package/dist/src/public/channels/discord/verifyInbound.js +1 -0
- package/dist/src/public/channels/index.js +1 -1
- package/dist/src/public/channels/slack/api-encoding.js +1 -40
- package/dist/src/public/channels/slack/api.js +1 -333
- package/dist/src/public/channels/slack/attachments.js +1 -156
- package/dist/src/public/channels/slack/blocks.js +3 -266
- package/dist/src/public/channels/slack/connections.js +1 -70
- package/dist/src/public/channels/slack/constants.d.ts +7 -0
- package/dist/src/public/channels/slack/constants.js +1 -0
- package/dist/src/public/channels/slack/defaults.js +4 -211
- package/dist/src/public/channels/slack/hitl.js +1 -242
- package/dist/src/public/channels/slack/inbound.js +2 -149
- package/dist/src/public/channels/slack/index.js +1 -13
- package/dist/src/public/channels/slack/interactions.js +1 -315
- package/dist/src/public/channels/slack/limits.js +1 -75
- package/dist/src/public/channels/slack/mrkdwn.js +1 -89
- package/dist/src/public/channels/slack/slackChannel.js +1 -250
- package/dist/src/public/channels/slack/thread.js +1 -45
- package/dist/src/public/channels/slack/verify.js +1 -70
- package/dist/src/public/channels/twilio/api.js +1 -103
- package/dist/src/public/channels/twilio/defaults.js +3 -69
- package/dist/src/public/channels/twilio/inbound.js +2 -123
- package/dist/src/public/channels/twilio/index.js +1 -4
- package/dist/src/public/channels/twilio/twilioChannel.js +1 -316
- package/dist/src/public/channels/twilio/twiml.js +1 -58
- package/dist/src/public/channels/twilio/verify.js +1 -73
- package/dist/src/public/channels/upload-policy.js +1 -170
- package/dist/src/public/connections/errors.js +1 -53
- package/dist/src/public/connections/index.js +1 -6
- package/dist/src/public/context/index.js +1 -13
- package/dist/src/public/definitions/agent.js +1 -6
- package/dist/src/public/definitions/channel.js +1 -24
- package/dist/src/public/definitions/connections/mcp.js +1 -20
- package/dist/src/public/definitions/defineChannel.js +1 -74
- package/dist/src/public/definitions/hook.js +1 -11
- package/dist/src/public/definitions/instructions.js +1 -7
- package/dist/src/public/definitions/instrumentation.js +1 -13
- package/dist/src/public/definitions/remote-agent.js +1 -11
- package/dist/src/public/definitions/sandbox-backend.js +1 -13
- package/dist/src/public/definitions/sandbox.js +1 -6
- package/dist/src/public/definitions/schedule.js +1 -32
- package/dist/src/public/definitions/skill.js +1 -7
- package/dist/src/public/definitions/source.js +1 -1
- package/dist/src/public/definitions/state.js +1 -34
- package/dist/src/public/definitions/tool.js +1 -27
- package/dist/src/public/hooks/index.js +1 -9
- package/dist/src/public/index.js +1 -5
- package/dist/src/public/instructions/index.js +1 -4
- package/dist/src/public/instrumentation/index.js +1 -4
- package/dist/src/public/next/index.js +1 -148
- package/dist/src/public/next/server.js +1 -348
- package/dist/src/public/next/vercel-json.js +1 -77
- package/dist/src/public/sandbox/backends/default.js +1 -15
- package/dist/src/public/sandbox/backends/local.js +1 -18
- package/dist/src/public/sandbox/backends/vercel.js +1 -25
- package/dist/src/public/sandbox/index.js +1 -10
- package/dist/src/public/sandbox/local-sandbox.js +1 -1
- package/dist/src/public/sandbox/vercel-sandbox.js +1 -1
- package/dist/src/public/schedules/index.js +1 -4
- package/dist/src/public/skills/index.js +1 -5
- package/dist/src/public/tool-result-narrowing.js +1 -87
- package/dist/src/public/tools/approval/approval-helpers.js +1 -22
- package/dist/src/public/tools/approval/index.js +1 -4
- package/dist/src/public/tools/defaults.js +1 -70
- package/dist/src/public/tools/define-bash-tool.js +1 -14
- package/dist/src/public/tools/define-glob-tool.js +1 -21
- package/dist/src/public/tools/define-grep-tool.js +1 -21
- package/dist/src/public/tools/define-read-file-tool.js +1 -27
- package/dist/src/public/tools/define-write-file-tool.js +1 -21
- package/dist/src/public/tools/index.js +1 -10
- package/dist/src/public/tools/internal.js +1 -24
- package/dist/src/public/types/json.js +1 -13
- package/dist/src/react/index.js +1 -3
- package/dist/src/react/use-ash-agent.js +2 -348
- package/dist/src/runtime/actions/keys.js +1 -30
- package/dist/src/runtime/actions/types.js +1 -99
- package/dist/src/runtime/agent/bootstrap-model-utils.js +1 -148
- package/dist/src/runtime/agent/bootstrap-model.js +1 -36
- package/dist/src/runtime/agent/bootstrap.js +1 -49
- package/dist/src/runtime/agent/mock-model-adapter.js +7 -358
- package/dist/src/runtime/agent/resolve-model.js +1 -48
- package/dist/src/runtime/cache-key.js +1 -52
- package/dist/src/runtime/channels/registry.js +1 -133
- package/dist/src/runtime/compiled-artifacts-source.js +1 -42
- package/dist/src/runtime/connections/authorization-complete-page.js +2 -21
- package/dist/src/runtime/connections/authorization-tokens.js +1 -66
- package/dist/src/runtime/connections/callback-route.js +1 -139
- package/dist/src/runtime/connections/mcp-client.js +1 -307
- package/dist/src/runtime/connections/principal-context.js +1 -111
- package/dist/src/runtime/connections/principal.js +1 -106
- package/dist/src/runtime/connections/registry.js +1 -61
- package/dist/src/runtime/connections/types.js +1 -41
- package/dist/src/runtime/connections/validate-authorization.js +1 -92
- package/dist/src/runtime/framework-channels/index.js +1 -38
- package/dist/src/runtime/framework-tools/ask-question.js +1 -30
- package/dist/src/runtime/framework-tools/bash.js +1 -40
- package/dist/src/runtime/framework-tools/connection-search.js +1 -224
- package/dist/src/runtime/framework-tools/connection-tools.js +1 -103
- package/dist/src/runtime/framework-tools/file-state.js +1 -71
- package/dist/src/runtime/framework-tools/glob.js +2 -56
- package/dist/src/runtime/framework-tools/grep.js +2 -75
- package/dist/src/runtime/framework-tools/index.js +1 -52
- package/dist/src/runtime/framework-tools/pending-connection-tool-calls.js +1 -63
- package/dist/src/runtime/framework-tools/read-file.js +2 -64
- package/dist/src/runtime/framework-tools/skill.js +1 -47
- package/dist/src/runtime/framework-tools/todo.js +3 -122
- package/dist/src/runtime/framework-tools/web-fetch.js +2 -42
- package/dist/src/runtime/framework-tools/web-search.js +1 -15
- package/dist/src/runtime/framework-tools/write-file.js +2 -48
- package/dist/src/runtime/governance/auth/http-basic.js +1 -63
- package/dist/src/runtime/governance/auth/jwt-ecdsa.js +1 -69
- package/dist/src/runtime/governance/auth/jwt-hmac.js +1 -39
- package/dist/src/runtime/governance/auth/oidc.js +1 -126
- package/dist/src/runtime/governance/auth/token-claims.js +1 -84
- package/dist/src/runtime/governance/auth/types.js +1 -14
- package/dist/src/runtime/governance/network/ip-allow-list.js +1 -66
- package/dist/src/runtime/graph.js +1 -17
- package/dist/src/runtime/hooks/registry.js +1 -55
- package/dist/src/runtime/input/types.js +1 -63
- package/dist/src/runtime/loaders/artifact-paths.js +1 -26
- package/dist/src/runtime/loaders/bundled-artifacts.js +1 -21
- package/dist/src/runtime/loaders/compile-metadata.js +1 -92
- package/dist/src/runtime/loaders/manifest.js +1 -56
- package/dist/src/runtime/loaders/module-map.js +1 -64
- package/dist/src/runtime/prompt/compose.js +2 -47
- package/dist/src/runtime/prompt/connections.js +2 -23
- package/dist/src/runtime/resolve-agent-graph.js +1 -287
- package/dist/src/runtime/resolve-agent.js +1 -134
- package/dist/src/runtime/resolve-channel.js +1 -62
- package/dist/src/runtime/resolve-connection.js +1 -72
- package/dist/src/runtime/resolve-helpers.js +1 -58
- package/dist/src/runtime/resolve-hook.js +1 -67
- package/dist/src/runtime/resolve-sandbox.js +1 -65
- package/dist/src/runtime/resolve-tool.js +1 -110
- package/dist/src/runtime/sandbox/keys.js +1 -72
- package/dist/src/runtime/sandbox/registry.js +1 -42
- package/dist/src/runtime/schedules/register.js +1 -62
- package/dist/src/runtime/schedules/resolve-schedule.js +1 -66
- package/dist/src/runtime/session-callback-route.js +1 -87
- package/dist/src/runtime/sessions/auth.js +1 -18
- package/dist/src/runtime/sessions/compiled-agent-cache.js +1 -125
- package/dist/src/runtime/sessions/runtime-session.js +1 -50
- package/dist/src/runtime/sessions/turn.js +1 -1
- package/dist/src/runtime/skills/fragment-context.js +1 -4
- package/dist/src/runtime/skills/sandbox-access.js +1 -85
- package/dist/src/runtime/subagents/registry.js +1 -62
- package/dist/src/runtime/tools/registry.js +1 -40
- package/dist/src/runtime/types.js +1 -1
- package/dist/src/runtime/validation.js +1 -7
- package/dist/src/runtime/workspace/seed-files.js +1 -42
- package/dist/src/runtime/workspace/spec.js +2 -22
- package/dist/src/runtime/workspace/types.js +1 -9
- package/dist/src/sandbox/state.js +1 -1
- package/dist/src/services/dev-client/request-headers.js +1 -197
- package/dist/src/services/dev-client/stream.js +1 -7
- package/dist/src/services/dev-client/url.js +1 -25
- package/dist/src/services/dev-client/vercel-auth-error.js +2 -98
- package/dist/src/services/dev-client.js +1 -48
- package/dist/src/services/inspect-application.js +1 -45
- package/dist/src/shared/agent-definition.js +1 -1
- package/dist/src/shared/errors.js +1 -66
- package/dist/src/shared/guards.js +1 -35
- package/dist/src/shared/json-schemas.js +1 -41
- package/dist/src/shared/json.js +1 -80
- package/dist/src/shared/node.js +1 -1
- package/dist/src/shared/optional.js +1 -1
- package/dist/src/shared/run-mode.js +1 -1
- package/dist/src/shared/sandbox-backend.js +1 -1
- package/dist/src/shared/sandbox-definition.js +1 -1
- package/dist/src/shared/sandbox-session.js +1 -1
- package/dist/src/shared/skill-definition.js +1 -1
- package/dist/src/shared/skill-package.js +1 -100
- package/dist/src/shared/source-ref.js +1 -1
- package/dist/src/shared/tool-definition.js +1 -1
- package/package.json +12 -6
- package/dist/src/chunks/authored-module-loader-DcCfCiBm.js +0 -4
- package/dist/src/chunks/chunk-DSjMdhoD.js +0 -1
- package/dist/src/chunks/client-ZqNLLMZB.js +0 -4
- package/dist/src/chunks/compile-agent-C4OrJW6C.js +0 -5
- package/dist/src/chunks/dev-authored-source-watcher-PwAxalwl.js +0 -1
- package/dist/src/chunks/errors-HYWjHxV6.js +0 -1
- package/dist/src/chunks/guards-26p6sOw3.js +0 -1
- package/dist/src/chunks/host-F-DkwYJK.js +0 -70
- package/dist/src/chunks/input-requests-DJiy6dG9.js +0 -1
- package/dist/src/chunks/jsdist-BkeWZ7EZ.js +0 -443
- package/dist/src/chunks/paths-DnlVBqHu.js +0 -85
- package/dist/src/chunks/picocolors-aAkqW4On.js +0 -1
- package/dist/src/chunks/runtime-model-Dh0Nz64z.js +0 -1
- package/dist/src/chunks/token-YW4VSeBB.js +0 -1
- package/dist/src/chunks/types-BJSR0JNV.js +0 -1
|
@@ -1,91 +1 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* Returns the live `requestId → childContinuationToken` map stored on
|
|
4
|
-
* the session. Always returns a fresh `Map` (never a live reference),
|
|
5
|
-
* so callers may treat the result as read-only without worrying about
|
|
6
|
-
* accidental mutation of session state.
|
|
7
|
-
*/
|
|
8
|
-
export function getProxyInputRequests(session) {
|
|
9
|
-
return new Map(Object.entries(readMap(session)));
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Returns true when the session is currently proxying one or more
|
|
13
|
-
* HITL requests on behalf of a descendant subagent.
|
|
14
|
-
*/
|
|
15
|
-
export function hasProxyInputRequests(session) {
|
|
16
|
-
for (const _ of Object.keys(readMap(session))) {
|
|
17
|
-
return true;
|
|
18
|
-
}
|
|
19
|
-
return false;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Replaces any prior entries for `forChildContinuationToken` with the
|
|
23
|
-
* provided `entries`. A child that raises a fresh batch overwrites its
|
|
24
|
-
* previous batch — the parent never keeps stale request metadata.
|
|
25
|
-
*/
|
|
26
|
-
export function upsertProxyInputRequests(input) {
|
|
27
|
-
const next = {};
|
|
28
|
-
for (const [requestId, childToken] of Object.entries(readMap(input.session))) {
|
|
29
|
-
if (childToken !== input.forChildContinuationToken) {
|
|
30
|
-
next[requestId] = childToken;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
for (const [requestId, childToken] of input.entries) {
|
|
34
|
-
next[requestId] = childToken;
|
|
35
|
-
}
|
|
36
|
-
return writeMap(input.session, next);
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Removes every entry belonging to `childContinuationToken`. Called
|
|
40
|
-
* when a child subagent finishes (via `resolvePendingRuntimeActions`)
|
|
41
|
-
* so stale button clicks no longer route to a dead child.
|
|
42
|
-
*/
|
|
43
|
-
export function clearProxyInputRequestsForChild(session, childContinuationToken) {
|
|
44
|
-
const current = readMap(session);
|
|
45
|
-
const next = {};
|
|
46
|
-
let changed = false;
|
|
47
|
-
for (const [requestId, childToken] of Object.entries(current)) {
|
|
48
|
-
if (childToken === childContinuationToken) {
|
|
49
|
-
changed = true;
|
|
50
|
-
continue;
|
|
51
|
-
}
|
|
52
|
-
next[requestId] = childToken;
|
|
53
|
-
}
|
|
54
|
-
if (!changed) {
|
|
55
|
-
return session;
|
|
56
|
-
}
|
|
57
|
-
return writeMap(session, next);
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Projects one child {@link SubagentInputRequestHookPayload} into the
|
|
61
|
-
* `(requestId, childContinuationToken)` tuples the parent session
|
|
62
|
-
* stores. Pure — does not touch session state.
|
|
63
|
-
*/
|
|
64
|
-
export function toProxyInputRequestEntries(payload) {
|
|
65
|
-
return payload.event.requests.map((request) => [request.requestId, payload.childContinuationToken]);
|
|
66
|
-
}
|
|
67
|
-
function readMap(session) {
|
|
68
|
-
const raw = session.state?.[PROXY_INPUT_REQUESTS_KEY];
|
|
69
|
-
if (raw === null || typeof raw !== "object" || Array.isArray(raw)) {
|
|
70
|
-
return {};
|
|
71
|
-
}
|
|
72
|
-
const result = {};
|
|
73
|
-
for (const [key, value] of Object.entries(raw)) {
|
|
74
|
-
if (typeof value === "string") {
|
|
75
|
-
result[key] = value;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
return result;
|
|
79
|
-
}
|
|
80
|
-
function writeMap(session, entries) {
|
|
81
|
-
const state = { ...session.state };
|
|
82
|
-
if (Object.keys(entries).length === 0) {
|
|
83
|
-
delete state[PROXY_INPUT_REQUESTS_KEY];
|
|
84
|
-
return {
|
|
85
|
-
...session,
|
|
86
|
-
state: Object.keys(state).length > 0 ? state : undefined,
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
state[PROXY_INPUT_REQUESTS_KEY] = entries;
|
|
90
|
-
return { ...session, state };
|
|
91
|
-
}
|
|
1
|
+
var PROXY_INPUT_REQUESTS_KEY=`ash.runtime.proxyInputRequests`;function getProxyInputRequests(e){return new Map(Object.entries(readMap(e)))}function hasProxyInputRequests(e){for(let t of Object.keys(readMap(e)))return!0;return!1}function upsertProxyInputRequests(e){let t={};for(let[n,r]of Object.entries(readMap(e.session)))r!==e.forChildContinuationToken&&(t[n]=r);for(let[n,r]of e.entries)t[n]=r;return writeMap(e.session,t)}function clearProxyInputRequestsForChild(e,t){let n=readMap(e),r={},i=!1;for(let[e,a]of Object.entries(n)){if(a===t){i=!0;continue}r[e]=a}return i?writeMap(e,r):e}function toProxyInputRequestEntries(e){return e.event.requests.map(t=>[t.requestId,e.childContinuationToken])}function readMap(t){let n=t.state?.[PROXY_INPUT_REQUESTS_KEY];if(typeof n!=`object`||!n||Array.isArray(n))return{};let r={};for(let[e,t]of Object.entries(n))typeof t==`string`&&(r[e]=t);return r}function writeMap(t,n){let r={...t.state};return Object.keys(n).length===0?(delete r[PROXY_INPUT_REQUESTS_KEY],{...t,state:Object.keys(r).length>0?r:void 0}):(r[PROXY_INPUT_REQUESTS_KEY]=n,{...t,state:r})}export{clearProxyInputRequestsForChild,getProxyInputRequests,hasProxyInputRequests,toProxyInputRequestEntries,upsertProxyInputRequests};
|
|
@@ -1,321 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { getRuntimeActionRequestKey, getRuntimeActionResultKey } from "#runtime/actions/keys.js";
|
|
3
|
-
import { parseJsonObject } from "#shared/json.js";
|
|
4
|
-
import { clearProxyInputRequestsForChild } from "#harness/proxy-input-requests.js";
|
|
5
|
-
const PENDING_RUNTIME_ACTION_BATCH_KEY = "ash.runtime.pendingActionBatch";
|
|
6
|
-
/**
|
|
7
|
-
* Returns the pending runtime-action batch stored on the session, if any.
|
|
8
|
-
*/
|
|
9
|
-
export function getPendingRuntimeActionBatch(session) {
|
|
10
|
-
const value = session.state?.[PENDING_RUNTIME_ACTION_BATCH_KEY];
|
|
11
|
-
if (typeof value !== "object" || value === null) {
|
|
12
|
-
return undefined;
|
|
13
|
-
}
|
|
14
|
-
const batch = value;
|
|
15
|
-
if (!Array.isArray(batch.actions) ||
|
|
16
|
-
!Array.isArray(batch.responseMessages) ||
|
|
17
|
-
typeof batch.event !== "object" ||
|
|
18
|
-
batch.event === null) {
|
|
19
|
-
return undefined;
|
|
20
|
-
}
|
|
21
|
-
return batch;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Returns true when the session is parked on a pending runtime-action batch.
|
|
25
|
-
*/
|
|
26
|
-
export function hasPendingRuntimeActionBatch(session) {
|
|
27
|
-
return getPendingRuntimeActionBatch(session) !== undefined;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Stores one pending runtime-action batch on the session.
|
|
31
|
-
*/
|
|
32
|
-
export function setPendingRuntimeActionBatch(input) {
|
|
33
|
-
const state = { ...input.session.state };
|
|
34
|
-
state[PENDING_RUNTIME_ACTION_BATCH_KEY] = {
|
|
35
|
-
actions: [...input.actions],
|
|
36
|
-
event: input.event,
|
|
37
|
-
responseMessages: [...input.responseMessages],
|
|
38
|
-
};
|
|
39
|
-
return { ...input.session, state };
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Records the child continuation token minted for one dispatched
|
|
43
|
-
* subagent-call action onto the pending batch so {@link
|
|
44
|
-
* resolvePendingRuntimeActions} can clear the matching proxy-input
|
|
45
|
-
* entries when the child finishes.
|
|
46
|
-
*/
|
|
47
|
-
export function recordPendingSubagentChildToken(input) {
|
|
48
|
-
const batch = getPendingRuntimeActionBatch(input.session);
|
|
49
|
-
if (batch === undefined) {
|
|
50
|
-
return input.session;
|
|
51
|
-
}
|
|
52
|
-
const state = { ...input.session.state };
|
|
53
|
-
state[PENDING_RUNTIME_ACTION_BATCH_KEY] = {
|
|
54
|
-
...batch,
|
|
55
|
-
childContinuationTokens: {
|
|
56
|
-
...batch.childContinuationTokens,
|
|
57
|
-
[input.callId]: input.childContinuationToken,
|
|
58
|
-
},
|
|
59
|
-
};
|
|
60
|
-
return { ...input.session, state };
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Accumulates runtime-action results from a mixed stream of items until
|
|
64
|
-
* every pending action in the batch has a matching result.
|
|
65
|
-
*/
|
|
66
|
-
export async function accumulateRuntimeActionResults(input) {
|
|
67
|
-
const batch = getPendingRuntimeActionBatch(input.session);
|
|
68
|
-
const buffered = [...(input.initialResults ?? [])];
|
|
69
|
-
if (batch !== undefined && buffered.length > 0) {
|
|
70
|
-
const ready = resolveRuntimeActionResultsForBatch({ batch, results: buffered });
|
|
71
|
-
if (ready !== undefined) {
|
|
72
|
-
return ready;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
while (true) {
|
|
76
|
-
const item = await input.getNext();
|
|
77
|
-
if (item === null) {
|
|
78
|
-
return null;
|
|
79
|
-
}
|
|
80
|
-
if (item.kind === "deliver") {
|
|
81
|
-
input.bufferedDeliveries.push(item.value);
|
|
82
|
-
continue;
|
|
83
|
-
}
|
|
84
|
-
buffered.push(...item.results);
|
|
85
|
-
if (batch === undefined) {
|
|
86
|
-
// No pending batch at call time; there is nothing to resolve
|
|
87
|
-
// against. Keep draining results so the caller's stream state
|
|
88
|
-
// stays consistent, but never return a non-null result.
|
|
89
|
-
continue;
|
|
90
|
-
}
|
|
91
|
-
const ready = resolveRuntimeActionResultsForBatch({ batch, results: buffered });
|
|
92
|
-
if (ready !== undefined) {
|
|
93
|
-
return ready;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* Returns the stable ordered runtime-action results for the current pending
|
|
99
|
-
* batch when every action has a matching result. Unknown and duplicate results
|
|
100
|
-
* are ignored.
|
|
101
|
-
*/
|
|
102
|
-
function resolveReadyRuntimeActionResults(input) {
|
|
103
|
-
const batch = getPendingRuntimeActionBatch(input.session);
|
|
104
|
-
if (batch === undefined) {
|
|
105
|
-
return undefined;
|
|
106
|
-
}
|
|
107
|
-
return resolveRuntimeActionResultsForBatch({ batch, results: input.results });
|
|
108
|
-
}
|
|
109
|
-
function resolveRuntimeActionResultsForBatch(input) {
|
|
110
|
-
const { batch } = input;
|
|
111
|
-
const pendingKeys = new Set(batch.actions.map((action) => getRuntimeActionRequestKey(action)));
|
|
112
|
-
const resultsByKey = new Map();
|
|
113
|
-
for (const result of input.results) {
|
|
114
|
-
const key = getRuntimeActionResultKey(result);
|
|
115
|
-
if (!pendingKeys.has(key)) {
|
|
116
|
-
continue;
|
|
117
|
-
}
|
|
118
|
-
resultsByKey.set(key, result);
|
|
119
|
-
}
|
|
120
|
-
const orderedResults = [];
|
|
121
|
-
for (const action of batch.actions) {
|
|
122
|
-
const key = getRuntimeActionRequestKey(action);
|
|
123
|
-
const result = resultsByKey.get(key);
|
|
124
|
-
if (result === undefined) {
|
|
125
|
-
return undefined;
|
|
126
|
-
}
|
|
127
|
-
orderedResults.push(result);
|
|
128
|
-
}
|
|
129
|
-
return orderedResults;
|
|
130
|
-
}
|
|
131
|
-
/**
|
|
132
|
-
* Resolves one pending runtime-action batch back into model history.
|
|
133
|
-
*
|
|
134
|
-
* When all expected runtime action results are present, this appends the
|
|
135
|
-
* stored assistant tool-call messages plus synthesized tool-result messages to
|
|
136
|
-
* history, clears the pending batch, and emits `subagent.completed` and
|
|
137
|
-
* `action.result` events back onto the parent stream.
|
|
138
|
-
*/
|
|
139
|
-
export async function resolvePendingRuntimeActions(input) {
|
|
140
|
-
const batch = getPendingRuntimeActionBatch(input.session);
|
|
141
|
-
if (batch === undefined) {
|
|
142
|
-
return {
|
|
143
|
-
messages: [...input.session.history],
|
|
144
|
-
outcome: "continue",
|
|
145
|
-
session: input.session,
|
|
146
|
-
};
|
|
147
|
-
}
|
|
148
|
-
const readyResults = resolveReadyRuntimeActionResults({
|
|
149
|
-
results: input.stepInput?.runtimeActionResults ?? [],
|
|
150
|
-
session: input.session,
|
|
151
|
-
});
|
|
152
|
-
if (readyResults === undefined) {
|
|
153
|
-
return {
|
|
154
|
-
messages: [...input.session.history],
|
|
155
|
-
outcome: "unresolved",
|
|
156
|
-
session: input.session,
|
|
157
|
-
};
|
|
158
|
-
}
|
|
159
|
-
if (input.emit !== undefined) {
|
|
160
|
-
for (const result of readyResults) {
|
|
161
|
-
if (result.kind === "subagent-result" && result.isError !== true) {
|
|
162
|
-
await input.emit({
|
|
163
|
-
data: {
|
|
164
|
-
callId: result.callId,
|
|
165
|
-
output: typeof result.output === "string" ? result.output : JSON.stringify(result.output),
|
|
166
|
-
subagentName: result.subagentName,
|
|
167
|
-
},
|
|
168
|
-
type: "subagent.completed",
|
|
169
|
-
});
|
|
170
|
-
}
|
|
171
|
-
await input.emit(createActionResultEvent({
|
|
172
|
-
result,
|
|
173
|
-
sequence: batch.event.sequence,
|
|
174
|
-
stepIndex: batch.event.stepIndex,
|
|
175
|
-
turnId: batch.event.turnId,
|
|
176
|
-
}));
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
const state = { ...input.session.state };
|
|
180
|
-
delete state[PENDING_RUNTIME_ACTION_BATCH_KEY];
|
|
181
|
-
let nextSession = {
|
|
182
|
-
...input.session,
|
|
183
|
-
state: Object.keys(state).length > 0 ? state : undefined,
|
|
184
|
-
};
|
|
185
|
-
// Clear any proxy-input-request entries that belong to the completed
|
|
186
|
-
// children so future deliveries never route responses to a child
|
|
187
|
-
// that has already finished. The dispatch site recorded each child's
|
|
188
|
-
// continuation token on the batch via `recordPendingSubagentChildToken`
|
|
189
|
-
// so the harness never has to reach back into runtime/execution code
|
|
190
|
-
// to re-derive the token (AGENTS.md #14 — harness stays runtime-agnostic).
|
|
191
|
-
const childTokens = batch.childContinuationTokens;
|
|
192
|
-
if (childTokens !== undefined) {
|
|
193
|
-
for (const result of readyResults) {
|
|
194
|
-
if (result.kind !== "subagent-result") {
|
|
195
|
-
continue;
|
|
196
|
-
}
|
|
197
|
-
const childToken = childTokens[result.callId];
|
|
198
|
-
if (childToken !== undefined) {
|
|
199
|
-
nextSession = clearProxyInputRequestsForChild(nextSession, childToken);
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
const toolResults = readyResults.map((result) => {
|
|
204
|
-
switch (result.kind) {
|
|
205
|
-
case "load-skill-result":
|
|
206
|
-
return {
|
|
207
|
-
output: toToolResultOutput(result),
|
|
208
|
-
toolCallId: result.callId,
|
|
209
|
-
toolName: "load_skill",
|
|
210
|
-
type: "tool-result",
|
|
211
|
-
};
|
|
212
|
-
case "subagent-result":
|
|
213
|
-
return {
|
|
214
|
-
output: toToolResultOutput(result),
|
|
215
|
-
toolCallId: result.callId,
|
|
216
|
-
toolName: result.subagentName,
|
|
217
|
-
type: "tool-result",
|
|
218
|
-
};
|
|
219
|
-
case "tool-result":
|
|
220
|
-
return {
|
|
221
|
-
output: toToolResultOutput(result),
|
|
222
|
-
toolCallId: result.callId,
|
|
223
|
-
toolName: result.toolName,
|
|
224
|
-
type: "tool-result",
|
|
225
|
-
};
|
|
226
|
-
}
|
|
227
|
-
throw new Error(`Unsupported runtime action result kind "${String(result)}".`);
|
|
228
|
-
});
|
|
229
|
-
const messages = [...nextSession.history, ...batch.responseMessages];
|
|
230
|
-
if (toolResults.length > 0) {
|
|
231
|
-
messages.push({
|
|
232
|
-
content: toolResults,
|
|
233
|
-
role: "tool",
|
|
234
|
-
});
|
|
235
|
-
}
|
|
236
|
-
return {
|
|
237
|
-
messages,
|
|
238
|
-
outcome: "resolved",
|
|
239
|
-
session: nextSession,
|
|
240
|
-
};
|
|
241
|
-
}
|
|
242
|
-
/**
|
|
243
|
-
* Projects one AI SDK tool call into the Ash runtime-action contract.
|
|
244
|
-
*/
|
|
245
|
-
export function createRuntimeActionRequestFromToolCall(input) {
|
|
246
|
-
const definition = input.tools.get(input.toolCall.toolName);
|
|
247
|
-
if (definition?.runtimeAction?.kind === "subagent-call") {
|
|
248
|
-
return {
|
|
249
|
-
callId: input.toolCall.toolCallId,
|
|
250
|
-
description: definition.description,
|
|
251
|
-
input: resolveToolCallInputObject(input.toolCall.input),
|
|
252
|
-
kind: "subagent-call",
|
|
253
|
-
name: definition.name,
|
|
254
|
-
nodeId: definition.runtimeAction.nodeId,
|
|
255
|
-
subagentName: definition.runtimeAction.subagentName,
|
|
256
|
-
};
|
|
257
|
-
}
|
|
258
|
-
if (definition?.runtimeAction?.kind === "remote-agent-call") {
|
|
259
|
-
return {
|
|
260
|
-
callId: input.toolCall.toolCallId,
|
|
261
|
-
description: definition.description,
|
|
262
|
-
input: resolveToolCallInputObject(input.toolCall.input),
|
|
263
|
-
kind: "remote-agent-call",
|
|
264
|
-
name: definition.name,
|
|
265
|
-
nodeId: definition.runtimeAction.nodeId,
|
|
266
|
-
remoteAgentName: definition.runtimeAction.remoteAgentName ?? definition.name,
|
|
267
|
-
};
|
|
268
|
-
}
|
|
269
|
-
return {
|
|
270
|
-
callId: input.toolCall.toolCallId,
|
|
271
|
-
input: resolveToolCallInputObject(input.toolCall.input),
|
|
272
|
-
kind: "tool-call",
|
|
273
|
-
toolName: input.toolCall.toolName,
|
|
274
|
-
};
|
|
275
|
-
}
|
|
276
|
-
function resolveToolCallInputObject(value) {
|
|
277
|
-
if (value === undefined || value === null) {
|
|
278
|
-
return {};
|
|
279
|
-
}
|
|
280
|
-
return parseJsonObject(value);
|
|
281
|
-
}
|
|
282
|
-
function toToolResultOutput(result) {
|
|
283
|
-
if (typeof result.output === "string") {
|
|
284
|
-
if (result.isError === true) {
|
|
285
|
-
return {
|
|
286
|
-
type: "error-text",
|
|
287
|
-
value: result.output,
|
|
288
|
-
};
|
|
289
|
-
}
|
|
290
|
-
return {
|
|
291
|
-
type: "text",
|
|
292
|
-
value: result.output,
|
|
293
|
-
};
|
|
294
|
-
}
|
|
295
|
-
if (result.isError === true) {
|
|
296
|
-
return {
|
|
297
|
-
type: "error-json",
|
|
298
|
-
value: toMutableJsonValue(result.output),
|
|
299
|
-
};
|
|
300
|
-
}
|
|
301
|
-
return {
|
|
302
|
-
type: "json",
|
|
303
|
-
value: toMutableJsonValue(result.output),
|
|
304
|
-
};
|
|
305
|
-
}
|
|
306
|
-
function toMutableJsonValue(value) {
|
|
307
|
-
if (value === null ||
|
|
308
|
-
typeof value === "string" ||
|
|
309
|
-
typeof value === "number" ||
|
|
310
|
-
typeof value === "boolean") {
|
|
311
|
-
return value;
|
|
312
|
-
}
|
|
313
|
-
if (Array.isArray(value)) {
|
|
314
|
-
return value.map((item) => toMutableJsonValue(item));
|
|
315
|
-
}
|
|
316
|
-
const next = {};
|
|
317
|
-
for (const [key, item] of Object.entries(value)) {
|
|
318
|
-
next[key] = toMutableJsonValue(item);
|
|
319
|
-
}
|
|
320
|
-
return next;
|
|
321
|
-
}
|
|
1
|
+
import{createActionResultEvent}from"#protocol/message.js";import{parseJsonObject}from"#shared/json.js";import{clearProxyInputRequestsForChild}from"#harness/proxy-input-requests.js";import{getRuntimeActionRequestKey,getRuntimeActionResultKey}from"#runtime/actions/keys.js";var PENDING_RUNTIME_ACTION_BATCH_KEY=`ash.runtime.pendingActionBatch`;function getPendingRuntimeActionBatch(e){let t=e.state?.[PENDING_RUNTIME_ACTION_BATCH_KEY];if(typeof t!=`object`||!t)return;let n=t;if(!(!Array.isArray(n.actions)||!Array.isArray(n.responseMessages)||typeof n.event!=`object`||n.event===null))return n}function hasPendingRuntimeActionBatch(e){return getPendingRuntimeActionBatch(e)!==void 0}function setPendingRuntimeActionBatch(e){let t={...e.session.state};return t[PENDING_RUNTIME_ACTION_BATCH_KEY]={actions:[...e.actions],event:e.event,responseMessages:[...e.responseMessages]},{...e.session,state:t}}function recordPendingSubagentChildToken(e){let t=getPendingRuntimeActionBatch(e.session);if(t===void 0)return e.session;let n={...e.session.state};return n[PENDING_RUNTIME_ACTION_BATCH_KEY]={...t,childContinuationTokens:{...t.childContinuationTokens,[e.callId]:e.childContinuationToken}},{...e.session,state:n}}async function accumulateRuntimeActionResults(e){let t=getPendingRuntimeActionBatch(e.session),n=[...e.initialResults??[]];if(t!==void 0&&n.length>0){let e=resolveRuntimeActionResultsForBatch({batch:t,results:n});if(e!==void 0)return e}for(;;){let r=await e.getNext();if(r===null)return null;if(r.kind===`deliver`){e.bufferedDeliveries.push(r.value);continue}if(n.push(...r.results),t===void 0)continue;let i=resolveRuntimeActionResultsForBatch({batch:t,results:n});if(i!==void 0)return i}}function resolveReadyRuntimeActionResults(e){let t=getPendingRuntimeActionBatch(e.session);if(t!==void 0)return resolveRuntimeActionResultsForBatch({batch:t,results:e.results})}function resolveRuntimeActionResultsForBatch(e){let{batch:t}=e,n=new Set(t.actions.map(e=>getRuntimeActionRequestKey(e))),a=new Map;for(let t of e.results){let e=getRuntimeActionResultKey(t);n.has(e)&&a.set(e,t)}let o=[];for(let e of t.actions){let t=getRuntimeActionRequestKey(e),n=a.get(t);if(n===void 0)return;o.push(n)}return o}async function resolvePendingRuntimeActions(t){let r=getPendingRuntimeActionBatch(t.session);if(r===void 0)return{messages:[...t.session.history],outcome:`continue`,session:t.session};let i=resolveReadyRuntimeActionResults({results:t.stepInput?.runtimeActionResults??[],session:t.session});if(i===void 0)return{messages:[...t.session.history],outcome:`unresolved`,session:t.session};if(t.emit!==void 0)for(let n of i)n.kind===`subagent-result`&&n.isError!==!0&&await t.emit({data:{callId:n.callId,output:typeof n.output==`string`?n.output:JSON.stringify(n.output),subagentName:n.subagentName},type:`subagent.completed`}),await t.emit(createActionResultEvent({result:n,sequence:r.event.sequence,stepIndex:r.event.stepIndex,turnId:r.event.turnId}));let o={...t.session.state};delete o[PENDING_RUNTIME_ACTION_BATCH_KEY];let s={...t.session,state:Object.keys(o).length>0?o:void 0},c=r.childContinuationTokens;if(c!==void 0)for(let e of i){if(e.kind!==`subagent-result`)continue;let t=c[e.callId];t!==void 0&&(s=clearProxyInputRequestsForChild(s,t))}let l=i.map(e=>{switch(e.kind){case`load-skill-result`:return{output:toToolResultOutput(e),toolCallId:e.callId,toolName:`load_skill`,type:`tool-result`};case`subagent-result`:return{output:toToolResultOutput(e),toolCallId:e.callId,toolName:e.subagentName,type:`tool-result`};case`tool-result`:return{output:toToolResultOutput(e),toolCallId:e.callId,toolName:e.toolName,type:`tool-result`}}throw Error(`Unsupported runtime action result kind "${String(e)}".`)}),u=[...s.history,...r.responseMessages];return l.length>0&&u.push({content:l,role:`tool`}),{messages:u,outcome:`resolved`,session:s}}function createRuntimeActionRequestFromToolCall(e){let t=e.tools.get(e.toolCall.toolName);return t?.runtimeAction?.kind===`subagent-call`?{callId:e.toolCall.toolCallId,description:t.description,input:resolveToolCallInputObject(e.toolCall.input),kind:`subagent-call`,name:t.name,nodeId:t.runtimeAction.nodeId,subagentName:t.runtimeAction.subagentName}:t?.runtimeAction?.kind===`remote-agent-call`?{callId:e.toolCall.toolCallId,description:t.description,input:resolveToolCallInputObject(e.toolCall.input),kind:`remote-agent-call`,name:t.name,nodeId:t.runtimeAction.nodeId,remoteAgentName:t.runtimeAction.remoteAgentName??t.name}:{callId:e.toolCall.toolCallId,input:resolveToolCallInputObject(e.toolCall.input),kind:`tool-call`,toolName:e.toolCall.toolName}}function resolveToolCallInputObject(e){return e==null?{}:parseJsonObject(e)}function toToolResultOutput(e){return typeof e.output==`string`?e.isError===!0?{type:`error-text`,value:e.output}:{type:`text`,value:e.output}:e.isError===!0?{type:`error-json`,value:toMutableJsonValue(e.output)}:{type:`json`,value:toMutableJsonValue(e.output)}}function toMutableJsonValue(e){if(e===null||typeof e==`string`||typeof e==`number`||typeof e==`boolean`)return e;if(Array.isArray(e))return e.map(e=>toMutableJsonValue(e));let t={};for(let[n,r]of Object.entries(e))t[n]=toMutableJsonValue(r);return t}export{accumulateRuntimeActionResults,createRuntimeActionRequestFromToolCall,getPendingRuntimeActionBatch,hasPendingRuntimeActionBatch,recordPendingSubagentChildToken,resolvePendingRuntimeActions,setPendingRuntimeActionBatch};
|
|
@@ -1,192 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { createRuntimeToolResultFromMessagePart, createRuntimeToolResultFromStepResult, } from "#harness/action-result-helpers.js";
|
|
3
|
-
import { emitStepStarted, normalizeAssistantStepFinishReason } from "#harness/emission.js";
|
|
4
|
-
import { extractToolApprovalInputRequests } from "#harness/input-extraction.js";
|
|
5
|
-
import { applyConversationCacheControl, mergeGatewayAutoCaching, } from "#harness/prompt-cache.js";
|
|
6
|
-
import { mergeGatewayProviderPin } from "#harness/provider-tools.js";
|
|
7
|
-
import { createRuntimeActionRequestFromToolCall } from "#harness/runtime-actions.js";
|
|
8
|
-
// ---------------------------------------------------------------------------
|
|
9
|
-
// Builder
|
|
10
|
-
// ---------------------------------------------------------------------------
|
|
11
|
-
/**
|
|
12
|
-
* Builds composable `prepareStep` and `onStepFinish` closures that
|
|
13
|
-
* own all step-internal work: emission, compaction, and prompt caching.
|
|
14
|
-
*
|
|
15
|
-
* The harness passes these hooks to `ToolLoopAgent` and reads the
|
|
16
|
-
* results via `getSession()` and `stepResult` after the agent finishes.
|
|
17
|
-
*/
|
|
18
|
-
export function buildStepHooks(input) {
|
|
19
|
-
const session = input.session;
|
|
20
|
-
const emit = input.emit;
|
|
21
|
-
let resolveStep;
|
|
22
|
-
const stepResult = new Promise((resolve) => {
|
|
23
|
-
resolveStep = resolve;
|
|
24
|
-
});
|
|
25
|
-
// -------------------------------------------------------------------------
|
|
26
|
-
// prepareStep
|
|
27
|
-
//
|
|
28
|
-
// Only handles step.started emission and cache/provider metadata. Compaction
|
|
29
|
-
// runs in the tool-loop before `agent.stream()` so the compacted messages
|
|
30
|
-
// flow through the same `messages` variable the harness uses to rebuild
|
|
31
|
-
// session history — no prepareStep snapshot required.
|
|
32
|
-
// -------------------------------------------------------------------------
|
|
33
|
-
const prepareStep = async ({ messages }) => {
|
|
34
|
-
let processed = messages;
|
|
35
|
-
if (emit && input.emitStepStarted !== false) {
|
|
36
|
-
await emitStepStarted(emit, input.emissionState);
|
|
37
|
-
}
|
|
38
|
-
if (input.cachePath.kind === "anthropic-direct" && input.marker) {
|
|
39
|
-
processed = applyConversationCacheControl([...messages], input.marker);
|
|
40
|
-
}
|
|
41
|
-
const stepResult = {
|
|
42
|
-
messages: processed,
|
|
43
|
-
};
|
|
44
|
-
if (input.cachePath.kind === "gateway-auto") {
|
|
45
|
-
let providerOptions = mergeGatewayAutoCaching(session.agent.modelReference.providerOptions);
|
|
46
|
-
if (input.gatewayPinProvider !== undefined) {
|
|
47
|
-
providerOptions = mergeGatewayProviderPin(providerOptions, input.gatewayPinProvider);
|
|
48
|
-
}
|
|
49
|
-
stepResult.providerOptions = providerOptions;
|
|
50
|
-
}
|
|
51
|
-
return stepResult;
|
|
52
|
-
};
|
|
53
|
-
return {
|
|
54
|
-
onStepFinish: async (step) => {
|
|
55
|
-
resolveStep(step);
|
|
56
|
-
},
|
|
57
|
-
prepareStep,
|
|
58
|
-
stepResult,
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
// ---------------------------------------------------------------------------
|
|
62
|
-
// Step action emission
|
|
63
|
-
// ---------------------------------------------------------------------------
|
|
64
|
-
/**
|
|
65
|
-
* Emits `actions.requested`, `action.result`, and `step.completed` events
|
|
66
|
-
* from a captured step result.
|
|
67
|
-
*
|
|
68
|
-
* Tool calls and results that match `excludedActionToolNames`, belong to
|
|
69
|
-
* tool-approval requests, or are marked `invalid` by the AI SDK (e.g. the
|
|
70
|
-
* model emitted unparsable JSON) are filtered out of the emitted events.
|
|
71
|
-
* The AI SDK feeds the invalid-call error back to the model on the next
|
|
72
|
-
* step via `step.response.messages` so it can retry with well-formed
|
|
73
|
-
* arguments — the runtime event stream only sees successfully parsed
|
|
74
|
-
* tool calls.
|
|
75
|
-
*
|
|
76
|
-
* `inlineActionResultCallIds` lists tool-result call ids the stream
|
|
77
|
-
* already surfaced as `action.result` events (approval-resume path —
|
|
78
|
-
* see `emitStreamContent`). This skips them to avoid double-emission.
|
|
79
|
-
*/
|
|
80
|
-
export async function emitStepActions(emitFn, state, step, options) {
|
|
81
|
-
const excludedCallIds = new Set([
|
|
82
|
-
...extractToolApprovalInputRequests({
|
|
83
|
-
content: (step.content ?? []),
|
|
84
|
-
}).map((request) => request.action.callId),
|
|
85
|
-
...step.toolCalls
|
|
86
|
-
.filter(isInvalidToolCall)
|
|
87
|
-
.map((toolCall) => toolCall.toolCallId),
|
|
88
|
-
]);
|
|
89
|
-
const isExcluded = (toolCallId, toolName) => excludedCallIds.has(toolCallId) || options.excludedActionToolNames.has(toolName);
|
|
90
|
-
// actions.requested
|
|
91
|
-
const actions = step.toolCalls
|
|
92
|
-
.filter((tc) => !isExcluded(tc.toolCallId, tc.toolName))
|
|
93
|
-
.map((toolCall) => createRuntimeActionRequestFromToolCall({
|
|
94
|
-
toolCall,
|
|
95
|
-
tools: options.tools,
|
|
96
|
-
}));
|
|
97
|
-
if (actions.length > 0) {
|
|
98
|
-
await emitFn(createActionsRequestedEvent({
|
|
99
|
-
actions,
|
|
100
|
-
sequence: state.sequence,
|
|
101
|
-
stepIndex: state.stepIndex,
|
|
102
|
-
turnId: state.turnId,
|
|
103
|
-
}));
|
|
104
|
-
}
|
|
105
|
-
const inlineCallIds = options.inlineActionResultCallIds;
|
|
106
|
-
for (const result of reconcileToolResults(step)) {
|
|
107
|
-
if (isExcluded(result.callId, result.toolName)) {
|
|
108
|
-
continue;
|
|
109
|
-
}
|
|
110
|
-
if (inlineCallIds?.has(result.callId)) {
|
|
111
|
-
continue;
|
|
112
|
-
}
|
|
113
|
-
await emitFn(createActionResultEvent({
|
|
114
|
-
result,
|
|
115
|
-
sequence: state.sequence,
|
|
116
|
-
stepIndex: state.stepIndex,
|
|
117
|
-
turnId: state.turnId,
|
|
118
|
-
}));
|
|
119
|
-
}
|
|
120
|
-
// step.completed
|
|
121
|
-
await emitFn(createStepCompletedEvent({
|
|
122
|
-
finishReason: normalizeAssistantStepFinishReason(step.finishReason),
|
|
123
|
-
sequence: state.sequence,
|
|
124
|
-
stepIndex: state.stepIndex,
|
|
125
|
-
turnId: state.turnId,
|
|
126
|
-
usage: extractStepUsage(step.usage),
|
|
127
|
-
}));
|
|
128
|
-
}
|
|
129
|
-
// ---------------------------------------------------------------------------
|
|
130
|
-
// Helpers
|
|
131
|
-
// ---------------------------------------------------------------------------
|
|
132
|
-
/**
|
|
133
|
-
* Returns true when the AI SDK marked the tool call `invalid` (typically
|
|
134
|
-
* because the model emitted unparsable JSON or targeted an unknown tool).
|
|
135
|
-
*
|
|
136
|
-
* Invalid calls have a raw-string or partial `input` payload that cannot
|
|
137
|
-
* satisfy the runtime-action contract. The AI SDK synthesizes a tool-error
|
|
138
|
-
* result for the next model step automatically; callers must skip invalid
|
|
139
|
-
* calls when projecting to `RuntimeActionRequest` values or the harness
|
|
140
|
-
* will throw on the JSON-object invariant.
|
|
141
|
-
*/
|
|
142
|
-
export function isInvalidToolCall(toolCall) {
|
|
143
|
-
return toolCall.invalid === true;
|
|
144
|
-
}
|
|
145
|
-
function reconcileToolResults(step) {
|
|
146
|
-
const resultsByCallId = new Map();
|
|
147
|
-
for (const toolResult of step.toolResults) {
|
|
148
|
-
resultsByCallId.set(toolResult.toolCallId, createRuntimeToolResultFromStepResult(toolResult));
|
|
149
|
-
}
|
|
150
|
-
for (const part of extractToolResultParts(step.response.messages)) {
|
|
151
|
-
if (resultsByCallId.has(part.toolCallId)) {
|
|
152
|
-
continue;
|
|
153
|
-
}
|
|
154
|
-
resultsByCallId.set(part.toolCallId, createRuntimeToolResultFromMessagePart(part));
|
|
155
|
-
}
|
|
156
|
-
return [...resultsByCallId.values()];
|
|
157
|
-
}
|
|
158
|
-
function extractToolResultParts(messages) {
|
|
159
|
-
const parts = [];
|
|
160
|
-
for (const message of messages) {
|
|
161
|
-
if (message.role !== "tool" || !Array.isArray(message.content)) {
|
|
162
|
-
continue;
|
|
163
|
-
}
|
|
164
|
-
for (const part of message.content) {
|
|
165
|
-
if (part.type === "tool-result") {
|
|
166
|
-
parts.push(part);
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
return parts;
|
|
171
|
-
}
|
|
172
|
-
/**
|
|
173
|
-
* Projects the AI SDK's `LanguageModelUsage` into the flat `step.completed`
|
|
174
|
-
* event usage shape. Returns `undefined` when the SDK reports no usage.
|
|
175
|
-
*/
|
|
176
|
-
function extractStepUsage(usage) {
|
|
177
|
-
if (usage === undefined) {
|
|
178
|
-
return undefined;
|
|
179
|
-
}
|
|
180
|
-
const result = {};
|
|
181
|
-
if (usage.inputTokens !== undefined)
|
|
182
|
-
result.inputTokens = usage.inputTokens;
|
|
183
|
-
if (usage.outputTokens !== undefined)
|
|
184
|
-
result.outputTokens = usage.outputTokens;
|
|
185
|
-
if (usage.inputTokenDetails?.cacheReadTokens !== undefined) {
|
|
186
|
-
result.cacheReadTokens = usage.inputTokenDetails.cacheReadTokens;
|
|
187
|
-
}
|
|
188
|
-
if (usage.inputTokenDetails?.cacheWriteTokens !== undefined) {
|
|
189
|
-
result.cacheWriteTokens = usage.inputTokenDetails.cacheWriteTokens;
|
|
190
|
-
}
|
|
191
|
-
return Object.keys(result).length > 0 ? result : undefined;
|
|
192
|
-
}
|
|
1
|
+
import{createActionResultEvent,createActionsRequestedEvent,createStepCompletedEvent}from"#protocol/message.js";import{createRuntimeToolResultFromMessagePart,createRuntimeToolResultFromStepResult}from"#harness/action-result-helpers.js";import{emitStepStarted,normalizeAssistantStepFinishReason}from"#harness/emission.js";import{createRuntimeActionRequestFromToolCall}from"#harness/runtime-actions.js";import{extractToolApprovalInputRequests}from"#harness/input-extraction.js";import{applyConversationCacheControl,mergeGatewayAutoCaching}from"#harness/prompt-cache.js";import{mergeGatewayProviderPin}from"#harness/provider-tools.js";function buildStepHooks(e){let t=e.session,n=e.emit,r;return{onStepFinish:async e=>{r(e)},prepareStep:async({messages:r})=>{let i=r;n&&e.emitStepStarted!==!1&&await emitStepStarted(n,e.emissionState),e.cachePath.kind===`anthropic-direct`&&e.marker&&(i=applyConversationCacheControl([...r],e.marker));let o={messages:i};if(e.cachePath.kind===`gateway-auto`){let n=mergeGatewayAutoCaching(t.agent.modelReference.providerOptions);e.gatewayPinProvider!==void 0&&(n=mergeGatewayProviderPin(n,e.gatewayPinProvider)),o.providerOptions=n}return o},stepResult:new Promise(e=>{r=e})}}async function emitStepActions(r,i,a,s){let c=new Set([...extractToolApprovalInputRequests({content:a.content??[]}).map(e=>e.action.callId),...a.toolCalls.filter(isInvalidToolCall).map(e=>e.toolCallId)]),isExcluded=(e,t)=>c.has(e)||s.excludedActionToolNames.has(t),l=a.toolCalls.filter(e=>!isExcluded(e.toolCallId,e.toolName)).map(e=>createRuntimeActionRequestFromToolCall({toolCall:e,tools:s.tools}));l.length>0&&await r(createActionsRequestedEvent({actions:l,sequence:i.sequence,stepIndex:i.stepIndex,turnId:i.turnId}));let u=s.inlineActionResultCallIds;for(let t of reconcileToolResults(a))isExcluded(t.callId,t.toolName)||u?.has(t.callId)||await r(createActionResultEvent({result:t,sequence:i.sequence,stepIndex:i.stepIndex,turnId:i.turnId}));await r(createStepCompletedEvent({finishReason:normalizeAssistantStepFinishReason(a.finishReason),sequence:i.sequence,stepIndex:i.stepIndex,turnId:i.turnId,usage:extractStepUsage(a.usage)}))}function isInvalidToolCall(e){return e.invalid===!0}function reconcileToolResults(e){let t=new Map;for(let n of e.toolResults)t.set(n.toolCallId,createRuntimeToolResultFromStepResult(n));for(let n of extractToolResultParts(e.response.messages))t.has(n.toolCallId)||t.set(n.toolCallId,createRuntimeToolResultFromMessagePart(n));return[...t.values()]}function extractToolResultParts(e){let t=[];for(let n of e)if(!(n.role!==`tool`||!Array.isArray(n.content)))for(let e of n.content)e.type===`tool-result`&&t.push(e);return t}function extractStepUsage(e){if(e===void 0)return;let t={};return e.inputTokens!==void 0&&(t.inputTokens=e.inputTokens),e.outputTokens!==void 0&&(t.outputTokens=e.outputTokens),e.inputTokenDetails?.cacheReadTokens!==void 0&&(t.cacheReadTokens=e.inputTokenDetails.cacheReadTokens),e.inputTokenDetails?.cacheWriteTokens!==void 0&&(t.cacheWriteTokens=e.inputTokenDetails.cacheWriteTokens),Object.keys(t).length>0?t:void 0}export{buildStepHooks,emitStepActions,isInvalidToolCall};
|