experimental-ash 0.26.0 → 0.28.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 +14 -0
- package/dist/docs/public/channels/README.md +50 -2
- package/dist/docs/public/channels/discord.md +15 -7
- package/dist/docs/public/channels/teams.md +121 -0
- package/dist/docs/public/channels/telegram.md +201 -0
- package/dist/docs/public/subagents.md +38 -0
- package/dist/docs/public/typescript-api.md +41 -1
- 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.js +3 -9
- 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.js +1 -50
- 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.js +2 -167
- package/dist/src/public/channels/discord/defaults.js +3 -74
- package/dist/src/public/channels/discord/discordChannel.js +1 -402
- package/dist/src/public/channels/discord/hitl.js +1 -194
- package/dist/src/public/channels/discord/inbound.js +2 -238
- package/dist/src/public/channels/discord/index.js +1 -6
- package/dist/src/public/channels/discord/responses.js +1 -40
- package/dist/src/public/channels/discord/verify.js +1 -72
- package/dist/src/public/channels/discord/verifyInbound.js +1 -19
- 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.js +1 -7
- 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 -251
- 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/teams/api.d.ts +140 -0
- package/dist/src/public/channels/teams/api.js +4 -0
- package/dist/src/public/channels/teams/attachments.d.ts +25 -0
- package/dist/src/public/channels/teams/attachments.js +1 -0
- package/dist/src/public/channels/teams/defaults.d.ts +24 -0
- package/dist/src/public/channels/teams/defaults.js +3 -0
- package/dist/src/public/channels/teams/hitl.d.ts +36 -0
- package/dist/src/public/channels/teams/hitl.js +1 -0
- package/dist/src/public/channels/teams/inbound.d.ts +80 -0
- package/dist/src/public/channels/teams/inbound.js +3 -0
- package/dist/src/public/channels/teams/index.d.ts +8 -0
- package/dist/src/public/channels/teams/index.js +1 -0
- package/dist/src/public/channels/teams/limits.d.ts +8 -0
- package/dist/src/public/channels/teams/limits.js +1 -0
- package/dist/src/public/channels/teams/teamsChannel.d.ts +162 -0
- package/dist/src/public/channels/teams/teamsChannel.js +1 -0
- package/dist/src/public/channels/teams/verify.d.ts +43 -0
- package/dist/src/public/channels/teams/verify.js +1 -0
- package/dist/src/public/channels/telegram/api.d.ts +107 -0
- package/dist/src/public/channels/telegram/api.js +2 -0
- package/dist/src/public/channels/telegram/attachments.d.ts +23 -0
- package/dist/src/public/channels/telegram/attachments.js +1 -0
- package/dist/src/public/channels/telegram/defaults.d.ts +9 -0
- package/dist/src/public/channels/telegram/defaults.js +3 -0
- package/dist/src/public/channels/telegram/hitl.d.ts +44 -0
- package/dist/src/public/channels/telegram/hitl.js +1 -0
- package/dist/src/public/channels/telegram/inbound.d.ts +88 -0
- package/dist/src/public/channels/telegram/inbound.js +2 -0
- package/dist/src/public/channels/telegram/index.d.ts +8 -0
- package/dist/src/public/channels/telegram/index.js +1 -0
- package/dist/src/public/channels/telegram/telegramChannel.d.ts +126 -0
- package/dist/src/public/channels/telegram/telegramChannel.js +1 -0
- package/dist/src/public/channels/telegram/verify.d.ts +30 -0
- package/dist/src/public/channels/telegram/verify.js +1 -0
- 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 +14 -4
- 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-DrIyb818.js +0 -5
- package/dist/src/chunks/dev-authored-source-watcher-C1WUVv9F.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-CwAcCrg7.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-CWZN-XRX.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,70 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DSjMdhoD.js";import{A as t,C as n,D as r,E as i,M as a,O as o,S as s,T as c,_ as l,a as u,c as d,d as f,f as p,g as m,h as ee,i as te,j as h,k as ne,l as re,m as ie,o as ae,r as oe,u as se,v as ce,w as le,x as ue}from"./paths-CWZN-XRX.js";import{a as de,i as fe,n as pe,r as me,t as he}from"./authored-module-loader-DcCfCiBm.js";import{n as ge}from"./compile-agent-DrIyb818.js";import{t as _e}from"./errors-HYWjHxV6.js";import{g,m as ve,p as ye}from"./types-BJSR0JNV.js";import{loadDevelopmentEnvironmentFiles as be}from"../cli/dev/environment.js";import{builtinModules as xe}from"node:module";import{dirname as _,extname as Se,isAbsolute as Ce,join as v,posix as we,relative as y,resolve as b,sep as Te}from"node:path";import{cp as x,mkdir as S,readFile as C,readdir as w,realpath as T,rename as E,rm as D,symlink as Ee,writeFile as O}from"node:fs/promises";import{createHash as De,randomUUID as Oe}from"node:crypto";import{existsSync as k,readFileSync as ke}from"node:fs";import{fileURLToPath as Ae}from"node:url";import{Buffer as je}from"node:buffer";import{build as Me,copyPublicAssets as Ne,createDevServer as Pe,createNitro as Fe,prepare as Ie,prerender as Le}from"nitro/builder";const Re=`ash-cache.json`;async function ze(e){let t=await Be(e),n=r().version;t!==null&&t===n||await D(e,{force:!0,recursive:!0})}async function A(e){await S(e,{recursive:!0}),await O(v(e,Re),`${JSON.stringify({ashVersion:r().version},null,2)}\n`)}async function Be(e){try{let t=JSON.parse(await C(v(e,Re),`utf8`));return typeof t.ashVersion==`string`?t.ashVersion:null}catch(e){return e instanceof Error&&`code`in e&&e.code,null}}const Ve=new Set([`__builtin_response_array_buffer`,`__builtin_response_json`,`__builtin_response_text`]);async function He(e){if(e.mode===!1)return{code:e.source,workflowManifest:{}};let t=await Ue(e.filename,e.source),n=Ge(t);if(n.length===0)return{code:e.source,workflowManifest:{}};let r=e.moduleSpecifier??`./${ot(e.filename)}`,i=e.stableModuleSpecifier??r,a={},o=[],s=[],c=!1;for(let t of n){if(t.directive===`use step`){let n=st(r,t.name);a.steps??={};let i=a.steps[e.filename]??={};if(i[t.name]={stepId:n},e.mode===`workflow`){let e=t.exportPrefix.length>0?`export `:``;o.push({end:t.rangeEnd,start:t.rangeStart,text:`${e}var ${t.name} = globalThis[Symbol.for("WORKFLOW_USE_STEP")](${JSON.stringify(n)});`})}else o.push({end:t.directiveEnd,start:t.directiveStart,text:``}),e.mode===`step`?(c=!0,s.push(`registerStepFunction(${JSON.stringify(n)}, ${t.name});`)):s.push(`${t.name}.stepId = ${JSON.stringify(n)};`);continue}let n=`workflow//${e.stableWorkflowNames?.has(t.name)===!0?i:r}//${t.name}`;a.workflows??={};let l=a.workflows[e.filename]??={};l[t.name]={workflowId:n},e.mode===`workflow`?(o.push({end:t.directiveEnd,start:t.directiveStart,text:``}),s.push(`${t.name}.workflowId = ${JSON.stringify(n)};`),s.push(`globalThis.__private_workflows.set(${JSON.stringify(n)}, ${t.name});`)):(o.push({end:t.directiveEnd,start:t.directiveStart,text:`throw new Error(${JSON.stringify(`You attempted to execute workflow ${t.name} function directly. To start a workflow, use start(${t.name}) from workflow/api`)});`}),s.push(`${t.name}.workflowId = ${JSON.stringify(n)};`))}let l=`/**__internal_workflows${JSON.stringify(a)}*/;`,u=n.some(e=>e.directive===`use workflow`);if(e.mode===`workflow`&&!u)return{code:`${l}\n${We(e.source,t,n,r)}`,workflowManifest:a};let d=Xe(e.source,o),f=e.mode===`workflow`?await Ze(e.filename,d):d;return{code:`${c?`import { registerStepFunction } from "workflow/internal/private";\n${l}\n`:`${l}\n`}${f}${s.length>0?`\n${s.join(`
|
|
2
|
-
`)}\n`:``}`,workflowManifest:a}}async function Ue(e,t){let{parseAst:n}=await de();return n(t,{astType:`ts`,lang:at(e),range:!0,sourceType:`module`},e)}function We(e,t,n,r){let i=Qe(e,t),a=n.filter(e=>e.directive===`use step`).map(e=>{let t=e.exportPrefix.length>0?`export `:``,n=st(r,e.name);return`${t}var ${e.name} = globalThis[Symbol.for("WORKFLOW_USE_STEP")](${JSON.stringify(n)});`}),o=[...i,...a];return o.length>0?`${o.join(`
|
|
3
|
-
`)}\n`:``}function Ge(e){let t=[];for(let n of e.body??[]){let e=Ke(n);if(e===null)continue;let r=e.fn,i=r.id?.name,a=Je(r.body);if(r.async!==!0||i===void 0||a===void 0)continue;let o=Ye(a[0]);o!==null&&t.push({directive:o.value,directiveEnd:o.end,directiveStart:o.start,exportPrefix:e.exported?`export `:``,name:i,rangeEnd:e.end,rangeStart:e.start})}return t}function Ke(e){return e.type===`FunctionDeclaration`?qe(e,!1,e):e.type!==`ExportNamedDeclaration`||e.declaration?.type!==`FunctionDeclaration`?null:qe(e.declaration,!0,e)}function qe(e,t,n){return e.start===void 0||e.end===void 0||n.start===void 0||n.end===void 0?null:{end:n.end,exported:t,fn:e,start:n.start}}function Je(e){return e===void 0||Array.isArray(e)?e:e.body}function Ye(e){let t=e?.directive??(e?.type===`ExpressionStatement`&&e.expression?.type===`Literal`?e.expression.value:void 0);return t!==`use workflow`&&t!==`use step`||e?.start===void 0||e.end===void 0?null:{end:e.end,start:e.start,value:t}}function Xe(e,t){let n=``,r=0;for(let i of[...t].sort((e,t)=>e.start-t.start))n+=e.slice(r,i.start),n+=i.text,r=i.end;return n+e.slice(r)}async function Ze(e,t){let n=await Ue(e,t),r=nt(n),i=[];for(let e of n.body??[]){if(e.type!==`ImportDeclaration`||e.start===void 0||e.end===void 0)continue;let n=tt(e);n.length>0&&n.every(e=>!r.has(e))&&i.push({end:it(t,e.end),start:e.start,text:``})}return i.length>0?Xe(t,i):t}function Qe(e,t){let n=[];for(let r of t.body??[])r.type===`ExportNamedDeclaration`&&r.declaration?.type===`VariableDeclaration`&&r.declaration.kind===`const`&&r.start!==void 0&&r.end!==void 0&&(r.declaration.declarations??[]).every($e)&&n.push(e.slice(r.start,r.end).trim());return n}function $e(e){return et(e.init)}function et(e){return e==null?!1:e.type===`Literal`?e.value===null||typeof e.value==`boolean`||typeof e.value==`number`||typeof e.value==`string`:e.type===`TSAsExpression`||e.type===`TSSatisfiesExpression`||e.type===`TSNonNullExpression`||e.type===`TSTypeAssertion`?et(e.expression):e.type===`UnaryExpression`&&e.argument?.type===`Literal`?typeof e.argument.value==`number`:!1}function tt(e){return e.importKind===`type`?[]:(e.specifiers??[]).filter(e=>e.importKind!==`type`).map(e=>e.local?.name).filter(e=>e!==void 0)}function nt(e){let t=new Set;return j(e,e=>{e.type===`Identifier`&&typeof e.name==`string`&&t.add(e.name)}),t}function j(e,t){if(!(e.type===`ImportDeclaration`||e.type?.startsWith(`TS`))){t(e);for(let n of Object.values(e))if(Array.isArray(n))for(let e of n)rt(e)&&j(e,t);else rt(n)&&j(n,t)}}function rt(e){return typeof e==`object`&&!!e&&typeof e.type==`string`}function it(e,t){let n=t;for(;n<e.length&&(e[n]===` `||e[n]===` `);)n+=1;return e[n]===`\r`&&e[n+1]===`
|
|
4
|
-
`?n+2:e[n]===`
|
|
5
|
-
`?n+1:n}function at(e){return e.endsWith(`.tsx`)?`tsx`:e.endsWith(`.jsx`)?`jsx`:/\.[cm]?ts$/.test(e)?`ts`:`js`}function ot(e){return e.replace(/\.(?:[cm]?[jt]sx?)$/,``)}function st(e,t){return Ve.has(t)?t:`step//${e}//${t}`}const ct={type:`queue/v2beta`,topic:`__wkf_workflow_*`,consumer:`default`,retryAfterSeconds:5,initialDelaySeconds:0},M=new Map,lt=new Map;async function N(e,t,n,r,i,a=ae){let o=i??process.cwd(),{moduleSpecifier:s,stableModuleSpecifier:c}=ft(r===void 0?Ce(e)?e:v(o,e):r,o);return He({filename:e,mode:n,moduleSpecifier:s,source:t,stableModuleSpecifier:c,stableWorkflowNames:a})}function ut(e){return{hasSerde:e.includes(`workflow.serde`)||e.includes(`@serde`)||e.includes(`workflowSerde`)||e.includes(`__workflow_serde`),hasUseStep:/["']use step["']/.test(e),hasUseWorkflow:/["']use workflow["']/.test(e)}}function dt(e,t){let n=I(e),r=!n&>(e,t);if(n||r){let n=P(e);if(n!==null){let i=ht(t).has(n.name);if(!(r||i))return{importPath:L(e,t),isPackage:!1};let a=pt(e,n);return a?{importPath:`${n.name}${a}`,isPackage:!0}:yt(e,n)?{importPath:n.name,isPackage:!0}:{importPath:L(e,t),isPackage:!1}}}return{importPath:L(e,t),isPackage:!1}}function ft(e,t){let n=I(e),r=!n&>(e,t);if(!n&&!r)return{moduleSpecifier:void 0,stableModuleSpecifier:void 0};let i=P(e);if(i===null)return{moduleSpecifier:void 0,stableModuleSpecifier:void 0};let a=pt(e,i),o=a?`${i.name}${a}`:i.name;return{moduleSpecifier:`${o}@${i.version}`,stableModuleSpecifier:o}}function P(e){let t=_(e),n=[];for(;t!==_(t);){let e=M.get(t);if(e!==void 0){for(let t of n)M.set(t,e);return e}n.push(t);let r=v(t,`package.json`);if(k(r))try{let e=JSON.parse(ke(r,`utf8`));if(typeof e.name==`string`&&typeof e.version==`string`){let r={dir:t,exports:e.exports,main:e.main,module:e.module,name:e.name,version:e.version};M.set(t,r);for(let e of n)M.set(e,r);return r}}catch{}t=_(t)}for(let e of n)M.set(e,null);return null}function pt(e,t){if(t.exports===null||typeof t.exports!=`object`||Array.isArray(t.exports))return``;let n=e.replace(/\\/g,`/`),r=t.dir.replace(/\\/g,`/`),i=n.startsWith(`${r}/`)?`./${n.substring(r.length+1)}`:null;if(i===null)return``;for(let[e,n]of Object.entries(t.exports)){let t=F(n);if(t!==null&&mt(t)===i)return e===`.`?``:e.substring(1)}return``}function F(e){if(typeof e==`string`)return e;if(Array.isArray(e)){for(let t of e){let e=F(t);if(e!==null)return e}return null}if(typeof e==`object`&&e)for(let t of[`workflow`,`default`,`require`,`import`,`node`]){let n=e[t],r=F(n);if(r!==null)return r}return null}function mt(e){return e.startsWith(`./`)?e:`./${e}`}function I(e){return e.split(Te).join(`/`).includes(`/node_modules/`)}function ht(e){let t=lt.get(e);if(t!==void 0)return t;let n=new Set,r=v(e,`package.json`);if(k(r))try{let e=JSON.parse(ke(r,`utf8`));for(let t of[`dependencies`,`devDependencies`,`peerDependencies`,`optionalDependencies`]){let r=e[t];if(typeof r==`object`&&r&&!Array.isArray(r))for(let e of Object.keys(r))n.add(e)}}catch{}return lt.set(e,n),n}function gt(e,t){if(I(e))return!1;let n=P(e);return n===null||b(n.dir)===b(t)?!1:ht(t).has(n.name)}function L(e,t){let n=t.replace(/\\/g,`/`),r=e.replace(/\\/g,`/`),i=r.startsWith(`${n}/`)?r.substring(n.length+1):y(t,e).replace(/\\/g,`/`);return i.startsWith(`.`)||(i=`./${i}`),i}function _t(e){if(typeof e==`string`||Array.isArray(e))return!0;if(typeof e!=`object`||!e)return!1;let t=Object.keys(e);return t.length>0&&t.every(e=>!e.startsWith(`.`))?!0:`.`in e}function vt(e){let t=e.replace(/\\/g,`/`);return t.startsWith(`./`)?t.substring(2):t.startsWith(`/`)?t.substring(1):t}function yt(e,t){let n=e.replace(/\\/g,`/`),r=t.dir.replace(/\\/g,`/`);if(!n.startsWith(`${r}/`))return!1;let i=n.substring(r.length+1);if(t.exports!==void 0){let e;if(t.exports!==null&&typeof t.exports==`object`&&`.`in t.exports)e=t.exports[`.`];else if(_t(t.exports))e=t.exports;else return!1;let n=F(e);return n!==null&&vt(n)===i}return[t.module,t.main,`index.js`,`index.mjs`,`index.cjs`,`index.ts`,`index.mts`,`index.cts`].flatMap(e=>typeof e==`string`?[vt(e)]:[]).includes(i)}const bt=`\0ash-workflow-entry`,xt=new Set([`server-only`,`client-only`,`next/dist/compiled/server-only`,`next/dist/compiled/client-only`]);new Set([...xe,...xe.map(e=>`node:${e}`)]);const St=new Set([`.ts`,`.tsx`,`.mts`,`.cts`,`.js`,`.jsx`,`.mjs`,`.cjs`]),Ct=new Set([`node_modules`,`.git`,`.next`,`.nuxt`,`.output`,`.vercel`,`.workflow-data`,`.workflow-vitest`,`.well-known`,`.svelte-kit`,`.turbo`,`.cache`,`.yarn`,`.pnpm-store`]);async function wt(e){let t=[];async function n(e){let r;try{r=await w(e,{withFileTypes:!0})}catch(e){if(e instanceof Error&&`code`in e&&e.code===`ENOENT`)return;throw e}for(let i of r){if(i.isDirectory()){Ct.has(i.name)||await n(v(e,i.name));continue}if(!i.isFile())continue;let r=i.name.match(/\.[^.]+$/)?.[0];r!==void 0&&St.has(r)&&t.push(v(e,i.name))}}return await n(e),t}function Tt(e,t){let{importPath:n,isPackage:r}=dt(e,t);return r?`import ${JSON.stringify(n)};`:`import ${JSON.stringify(Pt(t,e))};`}function Et(e){return{name:`ash-workflow-virtual-entry`,resolveId(e){if(e===`\0ash-workflow-entry`)return{id:e}},load(t){if(t===`\0ash-workflow-entry`)return{code:e,moduleSideEffects:!0,moduleType:`js`}}}}function Dt(){return{name:`ash-workflow-pseudo-packages`,resolveId(e){if(xt.has(e))return{id:`\0ash-workflow-pseudo-package:${e}`}},load(e){if(e.startsWith(`\0ash-workflow-pseudo-package:`))return{code:``,moduleType:`js`}}}}function Ot(e,t={}){return{name:`ash-package-imports`,resolveId(n){let r=n.match(/^#compiled\/(.+)$/)?.[1];if(r!==void 0)return t.workflowCondition===!0&&r===`@workflow/core/index.js`?R([v(e,`src`,`internal`,`workflow-bundle`,`workflow-core-shim.ts`),v(e,`dist`,`src`,`internal`,`workflow-bundle`,`workflow-core-shim.js`)]):R([v(e,`.generated`,`compiled`,r),v(e,`dist`,`src`,`compiled`,r)]);let i=n.match(/^#(.+)\.js$/)?.[1];if(i!==void 0)return R([`.ts`,`.tsx`,`.mts`,`.cts`,`.js`,`.jsx`,`.mjs`,`.cjs`].flatMap(t=>[v(e,`src`,`${i}${t}`),v(e,`dist`,`src`,`${i}${t}`)]))}}}function kt(e){let t=new Set(e.sideEffectFiles?.map(e=>e.replaceAll(`\\`,`/`))??[]);return{name:`ash-workflow-transform`,async load(n){if(!Rt(n))return;let r=await C(n,`utf8`),i=await N(Lt(e.workingDir,n),r.replace(/require\(\s*(['"])server-only\1\s*\)/g,`void 0`).replace(/require\(\s*(['"])client-only\1\s*\)/g,`void 0`),e.mode??`workflow`,n,e.projectRoot);return It(e.manifest,i.workflowManifest),{code:i.code,map:null,moduleSideEffects:t.has(n.replaceAll(`\\`,`/`))||void 0}}}}async function At(e){let t=`// biome-ignore-all lint: generated file
|
|
6
|
-
/* eslint-disable */
|
|
7
|
-
import { workflowEntrypoint } from 'workflow/runtime';
|
|
8
|
-
|
|
9
|
-
const workflowCode = \`${(e.code.endsWith(`
|
|
10
|
-
`)?e.code:`${e.code}\n`).replace(/[\\`$]/g,`\\$&`)}\`;
|
|
11
|
-
|
|
12
|
-
export const POST = workflowEntrypoint(workflowCode);`;if(!e.bundleFinalOutput){await Ft(e.outfile,t);return}let n=fe(await me({cwd:e.workingDir,input:bt,external:e=>e===`@aws-sdk/credential-provider-web-identity`,platform:`node`,plugins:[Et(t)],write:!1,output:{comments:!1,format:e.format,sourcemap:!1}}),`final workflow bundle for "${e.outfile}"`);await Ft(e.outfile,n.code)}function jt(e){let t={};for(let[n,r]of Object.entries(e??{})){t[n]={};for(let[e,i]of Object.entries(r))t[n][e]={stepId:i.stepId}}return t}function Mt(e){let t={};for(let[n,r]of Object.entries(e??{})){t[n]={};for(let[e,i]of Object.entries(r))t[n][e]={graph:{edges:[],nodes:[]},workflowId:i.workflowId}}return t}function Nt(e){let t={};for(let[n,r]of Object.entries(e??{})){t[n]={};for(let[e,i]of Object.entries(r))t[n][e]={classId:i.classId}}return t}function Pt(e,t){let n=y(e,t).replaceAll(`\\`,`/`);return n.startsWith(`./`)||n.startsWith(`../`)?n:`./${n}`}function R(e){for(let t of e)if(k(t))return{id:b(t)}}async function Ft(e,t){await S(_(e),{recursive:!0});let n=`${e}.${process.pid}.${Date.now()}.tmp`;await O(n,t),await E(n,e)}function It(e,t){e.steps=z(e.steps,t.steps),e.workflows=z(e.workflows,t.workflows),e.classes=z(e.classes,t.classes)}function z(e,t){if(t===void 0)return e;let n={...e};for(let[e,r]of Object.entries(t))n[e]={...n[e],...r};return n}function Lt(e,t){let n=t.replaceAll(`\\`,`/`),r=y(e.replaceAll(`\\`,`/`),n).replaceAll(`\\`,`/`);return r.startsWith(`../`)&&(r=r.split(`/`).filter(e=>e!==`..`).join(`/`)),r}function Rt(e){return/\.(?:[cm]?[jt]sx?)$/.test(e)}async function B(e,t){let n=`${e}.tmp-${process.pid}-${Date.now().toString(36)}`;await O(n,t),await E(n,e)}async function zt(e){let t=[...e.discoveredEntries.discoveredSteps].sort(),n=new Set(t),r=[...e.discoveredEntries.discoveredSerdeFiles].sort().filter(e=>!n.has(e)),i=await Vt({projectRoot:e.projectRoot,stepFiles:t,serdeOnlyFiles:r,workingDir:e.workingDir}),a=_(e.outfile),o=[`// Generated by Ash. Do not edit by hand.`,...Bt({builtinsImportSpecifier:e.builtinsPath===void 0?`workflow/internal/builtins`:V({outfileDirectory:a,preferAbsoluteFileImports:e.preferAbsoluteFileImports??!1,targetPath:e.builtinsPath}),outfileDirectory:a,preferAbsoluteFileImports:e.preferAbsoluteFileImports??!1,serdeOnlyFiles:r,stepFiles:t}),`export const __steps_registered = true;`,``].join(`
|
|
13
|
-
`);return await S(a,{recursive:!0}),await Gt(e.outfile)!==o&&await O(e.outfile,o),i}function Bt(e){return[e.builtinsImportSpecifier,...e.stepFiles.map(t=>V({outfileDirectory:e.outfileDirectory,preferAbsoluteFileImports:e.preferAbsoluteFileImports,targetPath:t})),...e.serdeOnlyFiles.map(t=>V({outfileDirectory:e.outfileDirectory,preferAbsoluteFileImports:e.preferAbsoluteFileImports,targetPath:t}))].map(e=>`import ${JSON.stringify(e)};`)}function V(e){return e.preferAbsoluteFileImports?n(e.targetPath):Wt(e.outfileDirectory,e.targetPath)}async function Vt(e){let t={},n=[...e.stepFiles,...e.serdeOnlyFiles];for(let r of n){let n=await C(r,`utf8`);Ht(t,(await N(Ut(e.workingDir,r),n,`step`,r,e.projectRoot)).workflowManifest)}return t}function Ht(e,t){e.steps=H(e.steps,t.steps),e.workflows=H(e.workflows,t.workflows),e.classes=H(e.classes,t.classes)}function H(e,t){if(t===void 0)return e;let n={...e};for(let[e,r]of Object.entries(t))n[e]={...n[e],...r};return n}function Ut(e,t){let n=t.replaceAll(`\\`,`/`),r=y(e.replaceAll(`\\`,`/`),n).replaceAll(`\\`,`/`);return r.startsWith(`../`)&&(r=r.split(`/`).filter(e=>e!==`..`).join(`/`)),r}function Wt(e,t){let n=y(e,t).replaceAll(`\\`,`/`);return n.startsWith(`.`)?n:`./${n}`}async function Gt(e){try{return await C(e,`utf8`)}catch(e){if(e instanceof Error&&`code`in e&&e.code===`ENOENT`)return null;throw e}}const Kt=`index.__ash_service_route_prefix.mjs`,qt=[`ash/`,`.well-known/workflow/`];function Jt(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Yt(e){return qt.some(t=>e.startsWith(t))}function Xt(e,t){return e.filter(Zt).map(e=>en(e,t))}function Zt(e){if(!Jt(e)||`handle`in e)return!0;let t=typeof e.src==`string`?e.src:``,n=typeof e.dest==`string`?e.dest:``;return Qt(t)||Qt(n)}function Qt(e){return e.includes(`/ash/v1`)||e.includes(`/.well-known/workflow/`)}function $t(e){return e.includes(`/ash/v1`)}function en(e,t){if(!Jt(e)||`handle`in e||typeof e.src!=`string`)return e;let n=$t(e.src)||typeof e.dest==`string`&&$t(e.dest),r={...e,src:tn(e.src,t)};return n&&(r.dest=`/ash/__server`),r}function tn(e,t){if(t===void 0||t===`/`||!Qt(e)||e.includes(t))return e;let n=t.endsWith(`/`)?t.slice(0,-1):t,r=n.replaceAll(`/`,`\\/`);return e.includes(r)?e:e.startsWith(`^(?:/`)?`^(?:${n}${e.slice(4)}`:e.startsWith(`^/`)?`^${n}${e.slice(1)}`:e.startsWith(`/`)?`${n}${e}`:e}async function nn(e,t){let n=v(e,`.vc-config.json`),r=v(e,Kt),i=JSON.parse(await C(n,`utf8`)),a=Jt(i)?i:{};await O(r,rn(t)),await O(n,`${JSON.stringify({...a,handler:Kt},null,2)}\n`)}function rn(e){return`
|
|
14
|
-
import { Server } from "node:http";
|
|
15
|
-
|
|
16
|
-
const SERVICE_PREFIX = ${JSON.stringify(an(e))};
|
|
17
|
-
const PATCH_SYMBOL = Symbol.for("ash.service.route-prefix-strip.patch");
|
|
18
|
-
|
|
19
|
-
function stripServiceRoutePrefix(requestUrl) {
|
|
20
|
-
if (typeof requestUrl !== "string" || requestUrl === "*") {
|
|
21
|
-
return requestUrl;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const queryIndex = requestUrl.indexOf("?");
|
|
25
|
-
const rawPath = queryIndex === -1 ? requestUrl : requestUrl.slice(0, queryIndex);
|
|
26
|
-
const query = queryIndex === -1 ? "" : requestUrl.slice(queryIndex);
|
|
27
|
-
const path = rawPath.startsWith("/") ? rawPath : \`/\${rawPath}\`;
|
|
28
|
-
|
|
29
|
-
if (path === SERVICE_PREFIX) {
|
|
30
|
-
return \`/\${query}\`;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
if (path.startsWith(\`\${SERVICE_PREFIX}/\`)) {
|
|
34
|
-
return path.slice(SERVICE_PREFIX.length) + query;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
return path + query;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
if (!globalThis[PATCH_SYMBOL]) {
|
|
41
|
-
globalThis[PATCH_SYMBOL] = true;
|
|
42
|
-
const originalEmit = Server.prototype.emit;
|
|
43
|
-
Server.prototype.emit = function patchedEmit(event, request, ...args) {
|
|
44
|
-
if (event === "request" && request && typeof request.url === "string") {
|
|
45
|
-
request.url = stripServiceRoutePrefix(request.url);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
return originalEmit.call(this, event, request, ...args);
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
const originalModule = await import("./index.mjs");
|
|
53
|
-
const entrypoint = originalModule?.default ?? originalModule;
|
|
54
|
-
|
|
55
|
-
export default entrypoint;
|
|
56
|
-
`.trimStart()}function an(e){let t=(e.startsWith(`/`)?e:`/${e}`).replace(/\/+$/,``);return t.length===0?`/`:t}const on=[`@mongodb-js/zstd`,`node-liblzma`],sn=[`@chat-adapter/slack`,`chat`];function cn(e){let t={};return ln(e)&&Object.assign(t,e),t.NODE_OPTIONS=`--experimental-require-module`,t}function ln(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}async function un(e){await D(e,{force:!0,recursive:!0}),await S(e,{recursive:!0})}async function dn(e){try{return await T(e.sourcePath)}catch{return await T(e.fallbackPath)}}async function fn(e){let t=await dn({fallbackPath:e.fallbackPath,sourcePath:e.sourcePath});await un(e.targetPath),await x(t,e.targetPath,{dereference:!0,recursive:!0})}async function pn(e,t={}){let n=v(e,`functions`),r=await mn(n);r!==null&&(t.servicePrefix!==void 0&&await nn(r,t.servicePrefix),await hn(n,r)),await _n(n,n),await vn(e,t.servicePrefix)}async function mn(e){let t=v(e,`__server.func`),n=v(e,`ash/__server.func`),r;try{r=await T(t)}catch(e){if(e instanceof Error&&`code`in e&&e.code===`ENOENT`)return null;throw e}let i=`${n}.ash-staging`;return await S(_(n),{recursive:!0}),await D(i,{force:!0,recursive:!0}),await x(r,i,{dereference:!0,recursive:!0}),await D(n,{force:!0,recursive:!0}),await E(i,n),n}async function hn(e,t,n=e){let r;try{r=await w(e,{withFileTypes:!0})}catch(e){if(e instanceof Error&&`code`in e&&e.code===`ENOENT`)return;throw e}await Promise.all(r.map(async r=>{let i=v(e,r.name),a=yn(y(n,i));if(r.isSymbolicLink()){r.name.endsWith(`.func`)&&Yt(a)&&await gn(i,t);return}r.isDirectory()&&!r.name.endsWith(`.func`)&&await hn(i,t,n)}))}async function gn(e,t){await D(e,{force:!0,recursive:!0}),await Ee(yn(y(_(e),t)),e,`dir`)}async function _n(e,t){let n;try{n=await w(t,{withFileTypes:!0})}catch(e){if(e instanceof Error&&`code`in e&&e.code===`ENOENT`)return;throw e}await Promise.all(n.map(async n=>{let r=v(t,n.name),i=yn(y(e,r));if(n.name.endsWith(`.func`)){Yt(i)||await D(r,{force:!0,recursive:!0});return}n.isDirectory()&&await _n(e,r)}))}async function vn(e,t){let n=v(e,`config.json`),r;try{r=JSON.parse(await C(n,`utf8`))}catch(e){if(e instanceof Error&&`code`in e&&e.code===`ENOENT`)return;throw e}!ln(r)||!Array.isArray(r.routes)||(r.routes=Xt(r.routes,t),await O(n,`${JSON.stringify(r,null,2)}\n`))}function yn(e){return e.replaceAll(`\\`,`/`)}function bn(e){let t=y(e.fromDirectoryPath,e.toFilePath).replaceAll(`\\`,`/`);return t.startsWith(`.`)?t:`./${t}`}function xn(e){return[`import nitroHandler from ${JSON.stringify(e.delegateImportPath)};`,``,`function invokeNitroHandler(request, context) {`,` if (typeof nitroHandler === "function") {`,` return nitroHandler(request, context);`,` }`,``,` if (nitroHandler !== null && typeof nitroHandler === "object" && "fetch" in nitroHandler) {`,` const fetch = nitroHandler.fetch;`,` if (typeof fetch === "function") {`,` return fetch.call(nitroHandler, request, context);`,` }`,` }`,``,` throw new TypeError("Expected Nitro handler to export a function or an object with fetch(request, context).");`,`}`,``,`const workflowRoutePath = ${JSON.stringify(e.workflowRoutePath)};`,``,`function rewriteRequestToWorkflowRoute(request) {`,` const sourceUrl = new URL(request.url);`,` const routedUrl = new URL(workflowRoutePath, sourceUrl);`,` routedUrl.search = sourceUrl.search;`,` return new Request(routedUrl, request);`,`}`,``,`export default {`,` fetch(request, context) {`,` return invokeNitroHandler(rewriteRequestToWorkflowRoute(request), context);`,` },`,`};`,``].join(`
|
|
57
|
-
`)}async function Sn(e){try{let t=JSON.parse(await C(v(e,`.vc-config.json`),`utf8`));if(typeof t.handler==`string`&&t.handler.length>0)return t.handler}catch{}return`index.mjs`}async function Cn(e){let t=await Sn(e.functionDirectoryPath),n=v(e.functionDirectoryPath,t),r=_(n),i=Se(t),a=v(r,`__ash_nitro_handler__${i.length>0?i:`.mjs`}`),o=bn({fromDirectoryPath:r,toFilePath:a});await E(n,a),await O(n,xn({delegateImportPath:o,workflowRoutePath:e.workflowRoutePath}))}const wn=new Map;var Tn=class{#e;#t;config;#n=new WeakMap;constructor(e){this.config={buildTarget:`standalone`,dirs:[ne(`src/execution`)],externalPackages:[...on,...sn],projectRoot:e.appRoot,watch:e.watch,workingDir:e.rootDir},this.#e=e.compiledArtifactsBootstrapPath,this.#t=e.outDir}async build(e={}){let t=(wn.get(this.#t)??Promise.resolve()).then(()=>this.#r(e));wn.set(this.#t,t.catch(()=>{})),await t}async#r(e){await ze(this.#t);let t=await this.#i();if(t.length===0)throw Error(`Expected the execution workflow source file under "${ne(`src/execution`)}".`);let n=await this.findTsConfigPath();await S(this.#t,{recursive:!0});let r=await this.discoverEntries(t,this.#t,n),i=v(this.#t,`workflows.mjs`),{manifest:a}=await this.createWorkflowsBundle({discoveredEntries:r,keepInterimBundleContext:!1,outfile:i,bundleFinalOutput:!1,format:`esm`,inputFiles:t,tsconfigPath:n}),o=v(this.#t,`steps.mjs`),s=await zt({builtinsPath:h(`workflow/internal/builtins`),discoveredEntries:r,outfile:o,preferAbsoluteFileImports:!0,projectRoot:this.config.projectRoot??this.config.workingDir,workingDir:this.config.workingDir}),c=e.nitroStepOutfile;c!==void 0&&c!==o&&await zt({builtinsPath:h(`workflow/internal/builtins`),discoveredEntries:r,outfile:c,preferAbsoluteFileImports:!0,projectRoot:this.config.projectRoot??this.config.workingDir,workingDir:this.config.workingDir}),await En(i,o),await Dn(i),await On(i);let l=e.nitroWorkflowOutfile;l!==void 0&&l!==i&&(await S(_(l),{recursive:!0}),await In(i,l),c!==void 0&&(await En(l,c),await Dn(l),await On(l))),await this.createManifest({workflowBundlePath:v(this.#t,`workflows.mjs`),manifestDir:this.#t,manifest:{steps:{...s.steps,...a.steps},workflows:{...s.workflows,...a.workflows},classes:{...s.classes,...a.classes}}}),await A(this.#t)}get transformProjectRoot(){return this.config.projectRoot??this.config.workingDir}async findTsConfigPath(){let e=this.config.workingDir;for(;;){for(let t of[`tsconfig.json`,`jsconfig.json`]){let n=v(e,t);try{return await C(n),n}catch(e){if(!(e instanceof Error&&`code`in e&&e.code===`ENOENT`))throw e}}let t=_(e);if(t===e)return;e=t}}async getInputFiles(){let e=this.config.dirs.map(e=>b(this.config.workingDir,e));return(await Promise.all(e.map(e=>wt(e)))).flat()}async discoverEntries(e,t,n){let r=this.#n.get(e);if(r!==void 0)return r;let i={discoveredSerdeFiles:[],discoveredSteps:[],discoveredWorkflows:[]};for(let t of e){let e=ut(await C(t,`utf8`));e.hasUseStep&&i.discoveredSteps.push(t),e.hasUseWorkflow&&i.discoveredWorkflows.push(t),e.hasSerde&&i.discoveredSerdeFiles.push(t)}return this.#n.set(e,i),i}async createWorkflowsBundle({bundleFinalOutput:e=!0,discoveredEntries:t,format:n=`cjs`,inputFiles:r,keepInterimBundleContext:i=this.config.watch,outfile:a,tsconfigPath:o}){let s=t??await this.discoverEntries(r,_(a),o),c=[...s.discoveredWorkflows].sort(),l=new Set(c),u=[...s.discoveredSerdeFiles].sort().filter(e=>!l.has(e)),d={},f=[...c.map(e=>Tt(e,this.config.workingDir)),...u.map(e=>Tt(e,this.config.workingDir))].join(`
|
|
58
|
-
`);return await At({bundleFinalOutput:e,code:fe(await me({cwd:this.config.workingDir,input:bt,platform:`neutral`,plugins:[Et(f),Dt(),Ot(this.config.workingDir,{workflowCondition:!0}),kt({manifest:d,projectRoot:this.transformProjectRoot,sideEffectFiles:[...c,...u],workingDir:this.config.workingDir})],resolve:{conditionNames:[`ash-source`,`workflow`,`node`,`import`,`default`],extensions:[`.ts`,`.tsx`,`.mts`,`.cts`,`.js`,`.jsx`,`.mjs`,`.cjs`],mainFields:[`module`,`main`]},tsconfig:o??!1,write:!1,output:{banner:`globalThis.__private_workflows = new Map();`,codeSplitting:!1,comments:!1,format:`cjs`,sourcemap:`inline`}}),`intermediate workflow bundle for "${a}"`).code,format:n,outfile:a,workingDir:this.config.workingDir}),i?{bundleFinal:async t=>{await At({bundleFinalOutput:e,code:t,format:n,outfile:a,workingDir:this.config.workingDir})},interimBundleCtx:void 0,manifest:d}:{manifest:d}}async createManifest({manifest:e,manifestDir:t}){let n={version:`1.0.0`,steps:jt(e.steps),workflows:Mt(e.workflows),classes:Nt(e.classes)},r=JSON.stringify(n,null,2);return await S(t,{recursive:!0}),await O(v(t,`manifest.json`),r),r}async buildVercelOutput(e){await this.build();let t=v(this.#t,`vercel-build-output`,`functions`,`.well-known`,`workflow`,`v1`),n=v(t,`flow.func`),r=v(e.outputDir,`functions`,`.well-known`,`workflow`,`v1`),i=v(e.flowNitroOutputDir,`functions`,`__server.func`),a=v(e.flowNitroOutputDir,`functions`,`.well-known`,`workflow`,`v1`,`flow.func`),o=v(r,`flow.func`),s=v(r,`step.func`),c=v(r,`webhook`,`[token].func`);await fn({fallbackPath:i,sourcePath:a,targetPath:n}),await Promise.all([this.#a(n,{experimentalTriggers:Array.from([ct]),maxDuration:`max`,runtime:e.runtime??null,shouldAddHelpers:!1}),x(v(this.#t,`manifest.json`),v(t,`manifest.json`))]),await Cn({functionDirectoryPath:n,workflowRoutePath:`/.well-known/workflow/v1/flow`}),await Promise.all([D(o,{force:!0,recursive:!0}),D(s,{force:!0,recursive:!0}),D(c,{force:!0,recursive:!0})]),await S(r,{recursive:!0}),await Promise.all([x(n,o,{recursive:!0}),x(v(t,`manifest.json`),v(r,`manifest.json`))])}async#i(){return[...await this.getInputFiles(),this.#e]}async#a(e,t){let n=v(e,`.vc-config.json`),r=await this.#o(n),i={...r};i.environment=cn(r.environment),t.runtime!==null&&(i.runtime=t.runtime),t.maxDuration!==void 0&&(i.maxDuration=t.maxDuration),t.shouldAddHelpers!==void 0&&(i.shouldAddHelpers=t.shouldAddHelpers),t.shouldAddSourcemapSupport!==void 0&&(i.shouldAddSourcemapSupport=t.shouldAddSourcemapSupport),t.experimentalTriggers!==void 0&&(i.experimentalTriggers=[...t.experimentalTriggers]),await O(n,`${JSON.stringify(i,null,2)}\n`)}async#o(e){try{let t=JSON.parse(await C(e,`utf8`));if(typeof t==`object`&&t)return t}catch{}return{}}};async function En(e,t){let n=await Pn(e);if(n===null||n.includes(`__ashWorkflowStepsRegistered`))return;let r=Nn(_(e),t),i=[`import { __steps_registered as __ashWorkflowStepsRegistered } from ${JSON.stringify(r)};`,`void __ashWorkflowStepsRegistered;`,``].join(`
|
|
59
|
-
`),a=n.match(/^import\s.+?;\n/m);if(a===null||a.index===void 0){await B(e,`${i}${n}`);return}let o=a.index+a[0].length;await B(e,`${n.slice(0,o)}${i}${n.slice(o)}`)}async function Dn(e){let t=await Pn(e);if(t===null)return;let n=t;for(let e of[`workflow`,`workflow/api`,`workflow/internal/builtins`,`workflow/internal/private`,`workflow/runtime`]){let t=Mn(h(e));n=jn(n,e,t)}n!==t&&await B(e,n)}async function On(e){let t=await Pn(e);if(t===null)return;let n=t.indexOf(`const workflowCode = `),r=t.lastIndexOf(`;
|
|
60
|
-
|
|
61
|
-
export const POST = workflowEntrypoint(workflowCode);`);if(n===-1||r===-1||r<=n)return;let i=n+21,a=t.slice(i,r);if(!a.trimStart().startsWith("`"))return;let o=An(a,e),s=`${t.slice(0,i)}${kn(o)}${t.slice(r)}`;s!==t&&await B(e,s)}function kn(e){let t=je.from(e,`utf8`).toString(`base64`).match(/.{1,16384}/g)??[``];return`Buffer.from(${JSON.stringify(t)}.join(""), "base64").toString("utf8")`}function An(e,t){let n=e.trim();if(!n.startsWith("`")||!n.endsWith("`"))throw Error(`Expected generated workflow code literal in "${t}" to be a template.`);let r=n.slice(1,-1),i=``;for(let e=0;e<r.length;e+=1){let t=r[e];if(t!==`\\`){i+=t;continue}let n=r[e+1];if(n===`\\`||n==="`"||n===`$`){i+=n,e+=1;continue}i+=t}return i}function jn(e,t,n){return e.replaceAll(JSON.stringify(t),JSON.stringify(n)).replaceAll(`'${t}'`,JSON.stringify(n))}function Mn(e){return n(e)}function Nn(e,t){let n=y(e,t).replaceAll(`\\`,`/`);return n.startsWith(`.`)?n:`./${n}`}async function Pn(e){try{return await C(e,`utf8`)}catch(e){if(e instanceof Error&&`code`in e&&e.code===`ENOENT`)return null;throw e}}async function Fn(e){try{return await C(e)}catch(e){if(e instanceof Error&&`code`in e&&e.code===`ENOENT`)return null;throw e}}async function In(e,t){let n=await C(e),r=await Fn(t);r!==null&&r.equals(n)||await B(t,n)}function Ln(e){return e.dev?{appRoot:e.appRoot,dev:e.dev,moduleMapLoaderPath:t(`src/internal/authored-module-map-loader.ts`)}:{appRoot:e.appRoot,dev:e.dev}}const Rn=`\0ash-pruned-local-sandbox-backend`,zn=/[/\\]bindings[/\\]local\.js$/;function Bn(){return{name:`ash-hosted-sandbox-backend-prune`,load(e){return e===Rn?[`export function createLocalSandboxBackend() {`,` throw new Error("The local sandbox backend is pruned from hosted server bundles.");`,`}`,``].join(`
|
|
62
|
-
`):null},resolveId(e){return zn.test(e)?Rn:null}}}const Vn=`${g}/runs`,Hn=`${g}/runs/:runId`,Un=`${g}/runs/:runId/steps`,Wn=`${g}/runs/:runId/events`,Gn=`#ash-channel/`;function Kn(e){let t=e.compileResult.manifest.channels,n=new Set,r=[],i=new Set,a=re();for(let e of t){if(e.kind===`disabled`){if(!a.has(e.name))throw Error(`agent/channels/${e.name}.ts exports disableRoute() but "${e.name}" is not a framework channel. Rename the file to one of: ${[...a].sort().join(`, `)}.`);i.add(e.name);continue}n.add(e.name),r.push({method:e.method,route:e.urlPath})}let o=se().filter(e=>!n.has(e.name)&&!i.has(e.name)).map(e=>({method:e.method,route:e.urlPath})),s=new Set,c=[];for(let e of[...o,...r]){let t=Yn(e);s.has(t)||(s.add(t),c.push(e))}return c}function qn(e,t){for(let n of t.registrations)Xn(e,{artifactsConfig:t.artifactsConfig,method:n.method,route:n.route})}function Jn(e,t){return $n(t.previous,t.next)?!1:(Zn(e),qn(e,{artifactsConfig:t.artifactsConfig,registrations:t.next}),e.routing.sync(),!0)}function Yn(e){return`${e.method.toUpperCase()} ${e.route}`}function Xn(e,n){let r=Yn(n),i=`${Gn}${r}`,a=c(t(`src/internal/nitro/routes/channel-dispatch.ts`));e.options.handlers.push({handler:i,method:n.method,route:n.route}),e.options.virtual[i]=[`import { dispatchChannelRequest } from ${a};`,`const config = ${JSON.stringify(n.artifactsConfig)};`,`export default (event) => dispatchChannelRequest(event, ${JSON.stringify(r)}, config);`].join(`
|
|
63
|
-
`)}function Zn(e){for(let t=e.options.handlers.length-1;t>=0;--t){let n=e.options.handlers[t];n!==void 0&&Qn(n)&&e.options.handlers.splice(t,1)}for(let t of Object.keys(e.options.virtual))t.startsWith(Gn)&&delete e.options.virtual[t]}function Qn(e){return e.handler.startsWith(Gn)}function $n(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1){let r=e[n],i=t[n];if(r===void 0||i===void 0||r.method!==i.method||r.route!==i.route)return!1}return!0}function er(e){return e===`all`||e===`app`}function tr(e){return U(e)}function U(e){return e===`all`||e===`flow`}function W(e,t){let n=`#ash-route-handler/${t.method??`ALL`} ${t.route}`,r=c(t.handlerPath);e.options.handlers.push({handler:n,method:t.method,route:t.route}),e.options.virtual[n]=[`import handler from ${r};`,`export default handler;`].join(`
|
|
64
|
-
`)}function G(e){return v(e.options.buildDir,`workflow`)}function nr(e,t){let n=y(e,t).replaceAll(`\\`,`/`);return n.startsWith(`.`)?n:`./${n}`}async function rr(e,t){let n=v(G(e),`${t.bundleName}-handler.mjs`),r=_(n),i=nr(r,t.bundlePath),a=(t.directHandlers??[]).map(e=>{let t=nr(r,e.bundlePath);return{importSpecifier:t,isOwnBundle:t===i,queuePrefix:e.queuePrefix}});await S(r,{recursive:!0}),await O(n,ir({bundlePath:i,directHandlers:a,runtimeImportSpecifier:t.runtimeImportSpecifier})),e.options.handlers.push({handler:n,route:t.route})}function ir(e){let t=[`// Generated by Ash. Do not edit by hand.`,`import { POST } from ${JSON.stringify(e.bundlePath)};`];if(e.directHandlers.length>0&&e.runtimeImportSpecifier!==void 0){let n=0,r=e.directHandlers.map(e=>{if(e.isOwnBundle)return{...e,binding:`POST`};let t=`__ashWorkflowDirectHandler${n}`;return n+=1,{...e,binding:t}});for(let e of r)e.isOwnBundle||t.push(`import { POST as ${e.binding} } from ${JSON.stringify(e.importSpecifier)};`);t.push(`import { getWorld as __ashGetWorkflowWorld } from ${JSON.stringify(e.runtimeImportSpecifier)};`,``,`try {`,` const __ashWorkflowWorld = await __ashGetWorkflowWorld();`,` if (typeof __ashWorkflowWorld?.registerHandler === "function") {`);for(let e of r)t.push(` __ashWorkflowWorld.registerHandler(${JSON.stringify(e.queuePrefix)}, ${e.binding});`);t.push(` }`,`} catch (err) {`,` console.warn("[ash] Failed to register direct workflow queue handlers:", err);`,`}`)}return t.push(``,`export default async ({ req }) => {`,` return await POST(req);`,`};`,``),t.join(`
|
|
65
|
-
`)}function ar(e,t){let n=`#ash-route${t.route}`,r=c(t.modulePath);e.options.handlers.push({handler:n,method:t.method,route:t.route}),e.options.virtual[n]=[`import { ${t.handlerExport} } from ${r};`,`export default async (event) => ${t.handlerExport}(${t.args}, event.req);`].join(`
|
|
66
|
-
`)}async function or(e,r,i){if(tr(i.surface)){let t=o(),n=new Tn({appRoot:r.appRoot,compiledArtifactsBootstrapPath:r.compiledArtifacts.bootstrapPath,outDir:r.workflowBuildDir,rootDir:t,watch:e.options.dev}),a=Promise.resolve(),s=async()=>{await n.build({nitroStepOutfile:U(i.surface)?v(G(e),`steps.mjs`):void 0,nitroWorkflowOutfile:e.options.dev&&U(i.surface)?v(G(e),`workflows.mjs`):void 0})},c=async()=>{let e=a.then(s);a=e.catch(()=>{}),await e},l=!0;await c(),e.hooks.hook(`build:before`,async()=>{if(l){l=!1;return}await c()}),e.options.dev&&e.hooks.hook(`dev:reload`,async()=>{await c()})}let a=Ln({appRoot:r.appRoot,dev:e.options.dev});er(i.surface)&&(W(e,{handlerPath:t(`src/internal/nitro/routes/index.ts`),method:`GET`,route:`/`}),W(e,{handlerPath:t(`src/internal/nitro/routes/health.ts`),method:`GET`,route:ye}),ar(e,{args:JSON.stringify({appRoot:a.appRoot}),handlerExport:`handleAgentInfoRequest`,method:`GET`,modulePath:t(`src/internal/nitro/routes/info.ts`),route:ve}),W(e,{handlerPath:t(`src/internal/nitro/routes/workflow-runs.ts`),method:`GET`,route:Vn}),W(e,{handlerPath:t(`src/internal/nitro/routes/workflow-run.ts`),method:`GET`,route:Hn}),W(e,{handlerPath:t(`src/internal/nitro/routes/workflow-run-steps.ts`),method:`GET`,route:Un}),W(e,{handlerPath:t(`src/internal/nitro/routes/workflow-run-events.ts`),method:`GET`,route:Wn}),qn(e,{artifactsConfig:a,registrations:Kn(r)}));let s=G(e),c=U(i.surface)?e.options.dev?v(s,`workflows.mjs`):v(r.workflowBuildDir,`workflows.mjs`):void 0,l=e.options.dev&&c!==void 0?[{bundlePath:c,queuePrefix:`__wkf_workflow_`}]:[],u=l.length>0?n(h(`workflow/runtime`)):void 0;c&&await rr(e,{bundleName:`workflows`,bundlePath:c,directHandlers:l,route:`/.well-known/workflow/v1/flow`,runtimeImportSpecifier:u}),e.routing.sync()}function sr(){return`${g}/cron/${Oe()}`}function cr(e){e.options.vercel!==void 0&&(e.options.vercel.cronHandlerRoute=sr())}function lr(e){return{plugins:[pe(),...e]}}function ur(e){e.hooks.hook(`rollup:before`,(e,t)=>{Array.isArray(t.plugins)&&t.plugins.unshift({name:`ash:nitro-routing-import-specifiers`,transform(e,t){if(t!==`#nitro/virtual/routing`&&t!==`#nitro/virtual/routing-meta`)return null;let n=le(e);return n===e?null:{code:n,map:null}}})})}const dr=`ash.schedule.`;var fr=class extends Error{scheduleId;sourceId;taskName;constructor(e,t={}){super(e),this.name=`ScheduleRegistrationError`,t.scheduleId!==void 0&&(this.scheduleId=t.scheduleId),t.sourceId!==void 0&&(this.sourceId=t.sourceId),t.taskName!==void 0&&(this.taskName=t.taskName)}};function pr(e){let t=e.map(e=>({cron:e.cron,description:`Run Ash schedule "${e.name}" from "${e.logicalPath}".`,logicalPath:e.logicalPath,scheduleId:e.name,sourceId:e.sourceId,taskName:hr(e.sourceId)})).sort((e,t)=>e.sourceId.localeCompare(t.sourceId));return mr(t),t}function mr(e){let t=new Map;for(let n of e){let e=t.get(n.scheduleId);if(e===void 0){t.set(n.scheduleId,n);continue}throw new fr(`Duplicate authored schedule id "${n.scheduleId}" found in "${e.logicalPath}" and "${n.logicalPath}".`,{scheduleId:n.scheduleId,sourceId:n.sourceId,taskName:n.taskName})}}function hr(e){return`${dr}${Buffer.from(e,`utf8`).toString(`base64url`)}`}const gr=`#ash-schedule-task/`;function _r(e,t){if(t.registrations.length!==0){e.options.experimental.tasks=!0;for(let n of t.registrations)br(e,{artifactsConfig:t.artifactsConfig,dispatchModulePath:t.dispatchModulePath,registration:n})}}function vr(e,t){let n=!Cr(t.previous,t.next);return yr(e),_r(e,{artifactsConfig:t.artifactsConfig,dispatchModulePath:t.dispatchModulePath,registrations:t.next}),n}function yr(e){for(let t of Object.keys(e.options.tasks))t.startsWith(`ash.schedule.`)&&delete e.options.tasks[t];for(let t of Object.keys(e.options.virtual))t.startsWith(gr)&&delete e.options.virtual[t];for(let[t,n]of Object.entries(e.options.scheduledTasks)){let r=Sr(n).filter(e=>!e.startsWith(dr));if(r.length===0){delete e.options.scheduledTasks[t];continue}if(r.length===1){let[n]=r;n!==void 0&&(e.options.scheduledTasks[t]=n);continue}e.options.scheduledTasks[t]=r}}function br(e,t){let n=`${gr}${t.registration.taskName}`,r=c(t.dispatchModulePath);e.options.tasks[t.registration.taskName]={description:t.registration.description,handler:n},e.options.virtual[n]=[`import { dispatchScheduleTask } from ${r};`,`const config = ${JSON.stringify(t.artifactsConfig)};`,`export default {`,` meta: { description: ${JSON.stringify(t.registration.description)} },`,` async run(event) {`,` return { result: await dispatchScheduleTask(event.name, config) };`,` },`,`};`].join(`
|
|
67
|
-
`),xr(e,t.registration.cron,t.registration.taskName)}function xr(e,t,n){let r=e.options.scheduledTasks[t];if(r===void 0){e.options.scheduledTasks[t]=n;return}if(typeof r==`string`){e.options.scheduledTasks[t]=[r,n];return}r.includes(n)||r.push(n)}function Sr(e){return typeof e==`string`?[e]:[...e]}function Cr(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1){let r=e[n],i=t[n];if(r===void 0||i===void 0||r.cron!==i.cron||r.description!==i.description||r.logicalPath!==i.logicalPath||r.scheduleId!==i.scheduleId||r.sourceId!==i.sourceId||r.taskName!==i.taskName)return!1}return!0}const wr=`@alinea/generated.@appsignal/nodejs.@aws-sdk/client-s3.@aws-sdk/s3-presigned-post.@blockfrost/blockfrost-js.@highlight-run/node.@huggingface/transformers.@jpg-store/lucid-cardano.@libsql/client.@mikro-orm/core.@mikro-orm/knex.@node-rs/argon2.@node-rs/bcrypt.@prisma/client.@react-pdf/renderer.@sentry/profiling-node.@sparticuz/chromium.@sparticuz/chromium-min.@statsig/statsig-node-core.@swc/core.@xenova/transformers.@zenstackhq/runtime.argon2.autoprefixer.aws-crt.bcrypt.better-sqlite3.canvas.chromadb-default-embed.config.cpu-features.cypress.dd-trace.eslint.express.firebase-admin.htmlrewriter.import-in-the-middle.isolated-vm.jest.jsdom.keyv.libsql.mdx-bundler.mongodb.mongoose.newrelic.next-mdx-remote.next-seo.node-cron.node-pty.node-web-audio-api.onnxruntime-node.oslo.pg.pino.pino-pretty.pino-roll.playwright.playwright-core.postcss.prettier.prisma.puppeteer.puppeteer-core.ravendb.require-in-the-middle.rimraf.sharp.shiki.sqlite3.thread-stream.ts-morph.ts-node.typescript.vscode-oniguruma.webpack.websocket.zeromq`.split(`.`);function Tr(e){if(e)return{config:{version:3,framework:{version:r().version}}}}const Er=[`workflow`,`workflow/api`,`workflow/errors`,`workflow/internal/builtins`,`workflow/internal/private`,`workflow/runtime`],Dr=Symbol(`ash.workflow-transform-patched`),Or=[`@napi-rs/keyring`];function kr(){let e={};for(let t of Er)e[t]=h(t);return e}function Ar(e){if(!e&&process.env.VERCEL)return`vercel`}function jr(e){return e===`all`||e===`app`}function Mr(e){return e===`all`||e===`flow`}function Nr(e){return Mr(e)}function Pr(e,t){return e.options.dev?v(e.options.buildDir,`workflow`,`steps.mjs`):v(t.workflowBuildDir,`steps.mjs`)}function Fr(e){let t=e.compileResult.manifest.config.build;return[...new Set([...Or,...wr,...t?.externalDependencies??[]])].filter(e=>e!==a)}function K(e){return e.replaceAll(`\\`,`/`)}function Ir(e){let t=e.indexOf(`?`),n=e.indexOf(`#`),r=t===-1?n:n===-1?t:Math.min(t,n);return r===-1?e:e.slice(0,r)}function Lr(e){return e.startsWith(`/@fs/`)?e.slice(4):e}function q(e,t){return t.startsWith(`file://`)?K(Lr(Ir(Ae(t)))):Ce(t)?K(Lr(Ir(t))):K(Lr(Ir(b(e,t))))}function Rr(e,t){let n=K(e);return n.startsWith(t)||n.includes(`/.ash/workflow-cache/`)}function zr(e){let t=K(e);return process.platform===`win32`?t.toLowerCase():t}function Br(e){let t=/^\s*import\s+(?:.+?\s+from\s+)?["']([^"']+)["'];?\s*$/gm,n=[];for(let r of e.matchAll(t)){let e=r[1];e!==void 0&&n.push(e)}return n}function Vr(e,t,n){return t.startsWith(`workflow`)?h(t):t.startsWith(`.`)||t.startsWith(`/`)||t.startsWith(`file://`)?q(n===void 0?e:_(q(e,n)),t):null}async function Hr(e,t){let n=await C(e,`utf8`),r=new Set;for(let i of Br(n)){let n=Vr(t,i,e);n!==null&&r.add(zr(n))}return r}async function Ur(e,t){if(e.options.noExternals===!0)return;let n;try{n=await Hr(t,e.options.rootDir)}catch(e){if(e instanceof Error&&`code`in e&&e.code===`ENOENT`)return;throw e}let r=Array.isArray(e.options.noExternals)?[...e.options.noExternals]:[];e.options.noExternals=[...new Set([...r,...n])]}function Wr(e,t){let n=K(e).replace(/\/$/,``),r=K(t),i=n.toLowerCase(),a=r.toLowerCase();if(a.startsWith(`${i}/`))return r.slice(n.length+1);if(a===i)return`.`;let o=y(n,r).replaceAll(`\\`,`/`);if(o.startsWith(`../`)&&(o=o.split(`/`).filter(e=>e!==`..`).join(`/`)),o.includes(`:`)||o.startsWith(`/`)){let e=r.split(`/`).pop();return e===void 0||e.length===0?`unknown.ts`:e}return o}function Gr(e,t){let n=[t,v(e.options.buildDir,`workflow`)].map(t=>q(e.options.rootDir,t));e.hooks.hook(`rollup:before`,(t,r)=>{Array.isArray(r.plugins)&&r.plugins.unshift({name:`ash:workflow-module-side-effects`,resolveId(t,r){let i=Vr(e.options.rootDir,t,r)??q(e.options.rootDir,t);return n.some(e=>Rr(i,e))?{id:i,moduleSideEffects:`no-treeshake`}:null}})})}function Kr(e,t){let n=null,r=async()=>(n===null&&(n=await Hr(t.stepEntrypointPath,e.options.rootDir)),n);e.hooks.hook(`build:before`,()=>{n=null}),e.options.dev&&e.hooks.hook(`dev:reload`,()=>{n=null}),e.hooks.hook(`rollup:before`,(t,n)=>{Array.isArray(n.plugins)&&n.plugins.unshift({name:`ash:workflow-step-module-side-effects`,async resolveId(t,n){let i=Vr(e.options.rootDir,t,n);return i===null||!(await r()).has(zr(i))?null:{id:i,moduleSideEffects:`no-treeshake`}}})})}function qr(e,t){let n=null,r=async()=>(n===null&&(n=await Hr(t.stepEntrypointPath,e.options.rootDir)),n);e.hooks.hook(`build:before`,()=>{n=null}),e.options.dev&&e.hooks.hook(`dev:reload`,()=>{n=null}),e.hooks.hook(`rollup:before`,(t,n)=>{Array.isArray(n.plugins)&&n.plugins.unshift({async transform(t,n){let i=await r(),a=q(e.options.rootDir,n);return i.has(zr(a))?{code:(await N(Wr(e.options.rootDir,a),t,`step`,a,e.options.rootDir)).code,map:null}:null},name:`ash:workflow-step-transform`})})}function Jr(e,t){let n=K(t);e.hooks.hook(`rollup:before`,(e,t)=>{Array.isArray(t.plugins)&&t.plugins.unshift({name:`ash:instrumentation-module-side-effects`,resolveId(e){return K(e)===n?{id:e,moduleSideEffects:`no-treeshake`}:null}})})}function Yr(e,t){let n=K(t);e.hooks.hook(`rollup:before`,(e,t)=>{if(Array.isArray(t.plugins))for(let e of t.plugins){if(typeof e!=`object`||!e)continue;let t=e;if(t.name!==`workflow:transform`||t[Dr]===!0||typeof t.transform!=`function`)continue;let r=t.transform;t.transform=function(e,t,...i){return Rr(t,n)?null:r.call(this,e,t,...i)},t[Dr]=!0}})}async function J(e,n,r={}){let i=r.surface??`all`,a=(!n||r.schedules===!0)&&jr(i)&&e.scheduleRegistrations.length>0,o=Ar(n),s=o===`vercel`?Bn():null,c=s===null?[]:[s],l=lr(c),u=lr(c),d=Fr(e),f=oe(e.appRoot,i),p=e.compiledArtifacts.instrumentationPluginPath===void 0?[e.compiledArtifacts.bootstrapPath]:[e.compiledArtifacts.instrumentationPluginPath,e.compiledArtifacts.bootstrapPath];await ze(f);let m=await Fe({_cli:{command:n?`dev`:`build`},buildDir:f,dev:n,logLevel:n?1:void 0,output:r.outputDir===void 0?void 0:{dir:r.outputDir},preset:o,plugins:p,publicAssets:[],scanDirs:Nr(i)?[ne(`src/execution`)]:void 0,rolldownConfig:l,rollupConfig:u,rootDir:e.appRoot,serverDir:!1,traceDeps:d,vercel:Tr(o===`vercel`&&jr(i))},n?{watch:!0}:void 0);if(await A(f),ur(m),Mr(i)){let t=kr();for(let[e,n]of Object.entries(t))m.options.alias[e]=n;Gr(m,e.workflowBuildDir),Yr(m,e.workflowBuildDir)}if(Nr(i)){let t=Pr(m,e);Kr(m,{stepEntrypointPath:t}),qr(m,{stepEntrypointPath:t})}if(e.compiledArtifacts.instrumentationSourcePath!==void 0&&Jr(m,e.compiledArtifacts.instrumentationSourcePath),n&&Mr(i)){let t=e.workflowBuildDir,n=new Set([K(v(t,`workflows.mjs`))]);m.hooks.hook(`rollup:before`,(e,t)=>{let r=t.external;t.external=(e,...t)=>{if(n.has(K(e)))return!0;if(typeof r==`function`)return r(e,...t)}})}return a&&(cr(m),_r(m,{artifactsConfig:Ln({appRoot:e.appRoot,dev:m.options.dev}),dispatchModulePath:t(`src/internal/nitro/routes/schedule-task.ts`),registrations:e.scheduleRegistrations})),await or(m,e,{surface:i}),Nr(i)&&await Ur(m,Pr(m,e)),m}function Xr(e){if(typeof e!=`string`||e.length===0)return`unknown`;let t=e.toLowerCase();return t===`slack`||t.includes(`slack`)?`slack`:t===`http`?`http`:t.includes(`webhook`)?`webhook`:`unknown`}function Zr(e){let{manifest:t}=e;return{kind:`vercel-ash-agent-summary`,schemaVersion:2,generatorVersion:e.generatorVersion??r().version,agent:{name:t.config.name,description:t.config.description,modelId:t.config.model.id},instructions:t.instructions?ei(t.instructions):null,schedules:t.schedules.map(ti),tools:t.tools.map(ni),skills:t.skills.map(ri),connections:t.connections.map(ii),channels:t.channels.filter($r).map(ai),sandbox:t.sandbox===null?null:{logicalPath:t.sandbox.logicalPath},subagents:t.subagents.map(oi),diagnostics:{errors:t.diagnosticsSummary.errors,warnings:t.diagnosticsSummary.warnings}}}async function Qr(e){let t=Zr({generatorVersion:e.generatorVersion,manifest:e.manifest}),n=v(e.appRoot,`.ash/agent-summary.json`);return await S(_(n),{recursive:!0}),await O(n,`${JSON.stringify(t,null,2)}\n`),n}function $r(e){return e.kind===`channel`}function ei(e){return{logicalPath:e.logicalPath,sourceKind:e.sourceKind,markdown:e.markdown}}function ti(e){return{name:e.name,cron:e.cron,logicalPath:e.logicalPath}}function ni(e){return{name:e.name,description:e.description,logicalPath:e.logicalPath}}function ri(e){return{name:e.name,description:e.description,logicalPath:e.logicalPath,sourceKind:e.sourceKind}}function ii(e){let t={name:e.connectionName,description:e.description,url:e.url,logicalPath:e.logicalPath,type:`mcp`};return e.vercelConnect===void 0?t:{...t,vercelConnect:{connector:e.vercelConnect.connector}}}function ai(e){let t={name:e.name,method:e.method,urlPath:e.urlPath,type:Xr(e.adapterKind),logicalPath:e.logicalPath};return e.adapterKind===void 0?t:{...t,adapterKind:e.adapterKind}}function oi(e){return{name:e.name,description:e.description,logicalPath:e.logicalPath}}async function si(e){return[...e.manifest.schedules].map(e=>{let t={cron:e.cron,hasRun:e.hasRun,logicalPath:e.logicalPath,name:e.name,sourceId:e.sourceId,sourceKind:e.sourceKind};return e.markdown===void 0?t:{...t,markdown:e.markdown}})}async function ci(e){return await si({manifest:await p({compiledArtifactsSource:e.compiledArtifactsSource})})}async function li(e){let n=v(e.outDir,`compiled-artifacts-bootstrap.mjs`),r=v(e.outDir,`compiled-artifacts-instrumentation.mjs`),i=di(e.compileResult.manifest.agentRoot);await S(e.outDir,{recursive:!0}),await O(n,await pi({compileResult:e.compileResult,installModulePath:t(`src/runtime/loaders/bundled-artifacts.ts`),moduleMapPath:n,metadata:e.compileResult.metadata})),i!==void 0&&await O(r,mi({agentName:e.compileResult.manifest.config.name,instrumentationPath:i,registerConfigPath:t(`src/harness/instrumentation-config.ts`)}));let a={bootstrapPath:n};return i!==void 0&&(a.instrumentationPluginPath=r,a.instrumentationSourcePath=i),a}const ui=[`.ts`,`.mts`,`.js`,`.mjs`];function di(e){for(let t of ui){let n=v(e,`instrumentation${t}`);if(k(n))return n}}function fi(e){return e.replace(/^export const moduleMap = /m,`const moduleMap = `).replace(/\nexport default moduleMap;\n?$/,`
|
|
68
|
-
`)}async function pi(e){let t=fi(s({importSpecifierStyle:`absolute`,manifest:e.compileResult.manifest,moduleMapPath:e.moduleMapPath})).trim();return[`// Generated by Ash. Do not edit by hand.`,`import { installBundledCompiledArtifacts } from ${c(e.installModulePath)};`,``,t,``,`const metadata = ${JSON.stringify(e.metadata,null,2)};`,``,`const manifest = ${JSON.stringify(e.compileResult.manifest,null,2)};`,``,`export function installCompiledArtifactsBootstrap() {`,` installBundledCompiledArtifacts({`,` manifest,`,` metadata,`,` moduleMap,`,` });`,`}`,``,`installCompiledArtifactsBootstrap();`,``,`// Default export satisfies the Nitro plugin contract so this file`,`// can be used directly as a Nitro plugin without a separate wrapper.`,`export default function installCompiledArtifactsPlugin() {`,` // Already installed on import above.`,`}`,``,`export async function __ashInstallCompiledArtifactsStep() {`,` "use step";`,` return null;`,`}`,``].join(`
|
|
69
|
-
`)}function mi(e){return[`// Generated by Ash. Do not edit by hand.`,`import * as instrumentationModule from ${c(e.instrumentationPath)};`,`import { registerInstrumentationConfig } from ${c(e.registerConfigPath)};`,``,`if (instrumentationModule.default != null) {`,` registerInstrumentationConfig(instrumentationModule.default, { agentName: ${JSON.stringify(e.agentName)} });`,`}`,``,`// Default export satisfies the Nitro plugin contract so this file`,`// can be used directly as a Nitro plugin without a separate wrapper.`,`export default function installInstrumentationPlugin() {}`,``].join(`
|
|
70
|
-
`)}function hi(e){return m(e,{moduleMapLoaderPath:t(`src/internal/authored-module-map-loader.ts`)})}async function gi(e){let t=await ge({startPath:e}),n=await ci({compiledArtifactsSource:hi(t.project.appRoot)}),r=pr(n),i=u(t.project.appRoot),a=await li({compileResult:t,outDir:t.paths.compileDirectoryPath});return{appRoot:t.project.appRoot,compileResult:t,compiledArtifacts:a,scheduleRegistrations:r,schedules:n,workflowBuildDir:i}}async function _i(e){return await vi(await p({compiledArtifactsSource:e.compiledArtifactsSource}))}async function vi(e){let t={},n=[{agentRoot:e.agentRoot,manifest:e,nodeId:i},...[...e.subagents].sort((e,t)=>e.nodeId.localeCompare(t.nodeId)).map(e=>({agentRoot:e.agent.agentRoot,manifest:e.agent,nodeId:e.nodeId}))];for(let e of n)t[e.nodeId]={modules:await yi({agentRoot:e.agentRoot,manifest:e.manifest})};return{nodes:t}}async function yi(e){let t=ue(e.manifest).sort((e,t)=>e.sourceId.localeCompare(t.sourceId)),n={};for(let r of t){let t=v(e.agentRoot,r.logicalPath);n[r.sourceId]=await he(t)}return n}async function bi(e){let t=await xi(e.backendName,e.compiledArtifactsSource),n=await Si({compiledArtifactsSource:e.compiledArtifactsSource,nodeId:e.nodeId,sourceId:e.sourceId}),i=Y(`${r().version}:2:${n}`).slice(0,20);return Ci(`ash-sbx-tpl-${e.backendName}-${t}-${i}`)}async function xi(e,t){if(e===`vercel`){let e=process.env.VERCEL_DEPLOYMENT_ID?.trim();if(e!==void 0&&e.length>0)return Y(e).slice(0,16)}let n=l(t);return n===void 0?Y(ce(t)).slice(0,16):Y(await T(n)).slice(0,16)}async function Si(e){return Y(`${(await ie({compiledArtifactsSource:e.compiledArtifactsSource}))?.discovery.sourceGraphHash??ce(e.compiledArtifactsSource)}:${e.nodeId}:${e.sourceId}`)}function Y(e){return De(`sha256`).update(e).digest(`hex`)}function Ci(e){return e.replaceAll(/[^a-zA-Z0-9._-]+/g,`-`).slice(0,120)}async function wi(e){let t=[];return await Ti({files:t,logicalDirectoryPath:`.`,sourceDirectoryPath:e}),t.sort((e,t)=>e.path.localeCompare(t.path)),t}async function Ti(e){let t=await w(e.sourceDirectoryPath,{withFileTypes:!0});for(let n of t){if(!n.isDirectory()&&!n.isFile())continue;let t=v(e.sourceDirectoryPath,n.name),r=we.join(e.logicalDirectoryPath,n.name);if(n.isDirectory()){await Ti({files:e.files,logicalDirectoryPath:r,sourceDirectoryPath:t});continue}e.files.push({content:await C(t),path:we.join(f,r)})}}async function Ei(e){let t=await Di(e);if(t.length===0)return;e.log?.(`Ash: initializing ${t.length} sandbox ${ji(t.length,`template`)}...`);let n=e.dispatch??(async({backend:e,input:t})=>{await e.prewarm(t)});await Promise.all(t.map(async({backend:t,label:r,input:i})=>{e.log?.(`Ash: initializing sandbox template "${r}"...`);try{await n({backend:t,input:i})}catch(n){throw e.log?.(`Ash: failed to initialize sandbox template "${r}" on backend "${t.name}": ${_e(n)}`),n}e.log?.(`Ash: sandbox template "${r}" initialized.`)})),e.log?.(`Ash: initialized ${t.length} sandbox ${ji(t.length,`template`)}.`)}async function X(e){let t=hi(e.appRoot),n=await(e.loadAgentGraph??ki)({compiledArtifactsSource:t});await Ei({compiledArtifactsSource:t,dispatch:e.dispatch,graph:n,log:e.log})}async function Di(e){let t=ee(e.compiledArtifactsSource.appRoot).compileDirectoryPath,n={appRoot:e.compiledArtifactsSource.appRoot};return[...await Promise.all(Ai(e.graph).map(async({definition:r,nodeId:i,workspaceResourceRoot:a})=>{let o=await bi({backendName:r.backend.name,compiledArtifactsSource:e.compiledArtifactsSource,nodeId:i,sourceId:r.sourceId});return{backend:r.backend,label:Mi(i),input:{bootstrap:r.bootstrap,seedFiles:await Oi({compileDirectoryPath:t,workspaceResourceRoot:a}),runtimeContext:n,templateKey:o}}}))].sort((e,t)=>e.label.localeCompare(t.label))}async function Oi(e){return e.workspaceResourceRoot.rootEntries.length===0?[]:(await wi(`${e.compileDirectoryPath}/${e.workspaceResourceRoot.logicalPath}`)).map(e=>({content:e.content,path:e.path}))}async function ki(e){let[t,n]=await Promise.all([p({compiledArtifactsSource:e.compiledArtifactsSource}),_i({compiledArtifactsSource:e.compiledArtifactsSource})]);return await d({manifest:t,moduleMap:n})}function Ai(e){return[...e.nodesByNodeId.entries()].flatMap(([e,t])=>{let n=t.sandboxRegistry.sandbox;return n===null?[]:[{...n,nodeId:e}]})}function ji(e,t){return e===1?t:`${t}s`}function Mi(e){return e===`__root__`?`root`:e}function Ni(){let e=process.env.VERCEL?.trim(),t=process.env.VERCEL_DEPLOYMENT_ID?.trim();return typeof e==`string`&&e.length>0&&typeof t==`string`&&t.length>0}async function Pi(e){return Ni()?(await X(e),!0):!1}function Fi(e){return e.replace(/[\\/]+$/,``)}function Ii(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Li(e,t){return typeof t!=`string`||t.trim().length===0?null:b(e,t)}function Ri(e){if(!Ii(e.config)||!Ii(e.config.experimentalServices))return;let t=!1,n;for(let r of Object.values(e.config.experimentalServices)){if(!Ii(r))continue;if(r.framework===`nextjs`){t=!0;continue}if(r.framework!==`ash`)continue;let i=Li(e.configRoot,r.entrypoint),a=typeof r.routePrefix==`string`?r.routePrefix.trim():``;i===e.appRoot&&a.length>0&&a!==`/`&&(n=a)}return t?n:void 0}async function zi(e){let t=e;for(;;){try{let n=v(t,`vercel.json`),r=JSON.parse(await C(n,`utf8`)),i=Ri({appRoot:e,configRoot:t,config:r});if(i!==void 0)return i}catch(e){if(!(e instanceof Error&&`code`in e&&e.code===`ENOENT`))throw e}let n=_(t);if(n===t)return;t=n}}async function Bi(e){try{return JSON.parse(await C(v(e,`functions`,`__server.func`,`.vc-config.json`),`utf8`)).runtime}catch{return}}async function Vi(e){let t=new Tn({appRoot:e.appRoot,compiledArtifactsBootstrapPath:e.compiledArtifactsBootstrapPath,outDir:e.workflowBuildDir,rootDir:o(),watch:!1}),n=await Bi(e.outputDir);await t.buildVercelOutput({flowNitroOutputDir:e.flowNitroOutputDir,outputDir:e.outputDir,runtime:n})}async function Hi(e){let t=Fi(e.options.output.dir);return await ze(t),await Ie(e),await Ne(e),await Le(e),await Me(e),await A(t),t}async function Ui(e,t){let n=await J(e,!1,{outputDir:te(e.appRoot,t),surface:t});try{return await Hi(n)}finally{await n.close()}}async function Wi(e){let t=await gi(e);if(!process.env.VERCEL){let e=await J(t,!1);try{let n=await Hi(e);return await Qr({manifest:t.compileResult.manifest,appRoot:t.appRoot}),n}finally{await e.close()}}let n=await J(t,!1,{surface:`app`});try{let e=await Hi(n);await Pi({appRoot:t.appRoot,log(e){console.log(e)}});let r=await Ui(t,`flow`);await Vi({appRoot:t.appRoot,compiledArtifactsBootstrapPath:t.compiledArtifacts.bootstrapPath,flowNitroOutputDir:r,outputDir:e,workflowBuildDir:t.workflowBuildDir});let i=await zi(t.appRoot);return i!==void 0&&await pn(e,{servicePrefix:i}),await Qr({manifest:t.compileResult.manifest,appRoot:t.appRoot}),e}finally{await n.close()}}const Z=65535,Q=`WORKFLOW_LOCAL_BASE_URL`,$=`PORT`,Gi=new Set([`[::]`,`::`,`0.0.0.0`]);function Ki(e){let t=new URL(e);return Gi.has(t.hostname)?(t.hostname=`127.0.0.1`,t.toString()):e}function qi(e){return e instanceof Error&&`code`in e&&e.code===`EADDRINUSE`}function Ji(e){let t=typeof e==`string`?Number(e):e??3e3;if(!Number.isInteger(t)||t<0||t>Z)throw Error(`Invalid development server port "${String(e)}". Expected an integer between 0 and ${Z}.`);return t}function Yi(){let e=process.env[$];if(e===void 0||e.trim()===``)return;let t=Number(e);if(!Number.isInteger(t)||t<0||t>Z)throw Error(`Invalid ${$} environment variable "${e}". Expected an integer between 0 and ${Z}.`);return t}function Xi(e){let t=Ji(e.port);if(t===0||!e.retryOnAddressInUse)return[t];let n=[];for(let e=0;e<10;e+=1){let r=t+e;if(r>65535)break;n.push(r)}return n}function Zi(e){let t=process.env[Q],n=process.env[$],r=new URL(Ki(e));return process.env[Q]=r.origin,r.port&&(process.env[$]=r.port),()=>{t===void 0?delete process.env[Q]:process.env[Q]=t,n===void 0?delete process.env[$]:process.env[$]=n}}function Qi(e){let t=()=>{};return e.once(`error`,t),()=>{e.off(`error`,t)}}function $i(e){let t=e.upgrade.bind(e);e.upgrade=async(e,n,r)=>{let i=Qi(n);try{await t(e,n,r)}catch{n.destroyed||n.destroy()}finally{i()}}}async function ea(e){let t=Xi({port:e.port,retryOnAddressInUse:e.retryOnAddressInUse}),n;for(let r of t){let t=e.devServer.listen({hostname:e.host,port:r,silent:!0});try{return await t.ready(),t}catch(r){if(n=r,await t.close().catch(()=>{}),!qi(r)||!e.retryOnAddressInUse)throw r}}throw Error(`Failed to start Nitro dev server after ${t.length} attempts. Tried ports ${t.join(`, `)}.`,{cause:n})}async function ta(e,t={}){let n=t.schedules===!0;be(e);let r=await gi(e);await X({appRoot:r.appRoot,log:e=>console.log(e)});let i=await J(r,!0,{schedules:n}),a=Pe(i);$i(a);let o=t.host??i.options.devServer.hostname,s=t.port??Yi(),c=s??i.options.devServer.port,l=s===void 0,u;try{let e=await ea({devServer:a,host:o,port:c,retryOnAddressInUse:l});if(!e.url)throw Error(`Nitro dev server did not expose a URL.`);u=Zi(e.url),await Ie(i),await Me(i);let{startAuthoredSourceWatcher:t}=await import(`./dev-authored-source-watcher-C1WUVv9F.js`),s=await t({nitro:i,preparedHost:r,schedulesEnabled:n}),d=u;if(d===void 0)throw Error(`Workflow local queue environment was not initialized.`);return{async close(){try{await s.close(),await a.close(),await i.close()}finally{d()}},url:Ki(e.url)}}catch(e){throw u?.(),await a.close().catch(()=>{}),await i.close().catch(()=>{}),e}}var na=e({buildApplication:()=>Wi,startDevelopmentServer:()=>ta});export{vr as a,Ln as c,gi as i,ta as n,Kn as o,X as r,Jn as s,na as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{renderCliTaggedLine as e}from"../cli/ui/output.js";function t(e,t){let r=e.trim();if(r.length===0)return;let i=r.toLowerCase();if(t.options!==void 0&&t.options.length>0){let e=n(i,t.options);if(e!==void 0)return{requestId:t.requestId,optionId:e.id}}if((t.allowFreeform===!0||t.options===void 0||t.options.length===0)&&r.length>0)return{requestId:t.requestId,text:r}}function n(e,t){let n=t.find(t=>t.id.toLowerCase()===e);if(n!==void 0)return n;let r=t.find(t=>t.label.toLowerCase()===e);if(r!==void 0)return r;let i=Number(e);if(Number.isInteger(i)&&i>0&&i<=t.length)return t[i-1]}const r=Symbol(`ash.cli.runtime-input.escaped`);function i(e){for(let t=e.length-1;t>=0;--t){let n=e[t];if(n?.type===`input.requested`)return n.data.requests}return[]}async function a(t){let n=[];t.print(e(t.theme,{message:`pending input request${t.requests.length===1?``:`s`}: reply now, press Escape, or type "skip" to return to the normal prompt`,tag:`input`,tone:`info`}));for(let e of t.requests){let r=await s({ask:t.ask,print:t.print,request:e,theme:t.theme});if(r.kind!==`submitted`)return r;n.push(r.inputResponse)}return{inputResponses:n,kind:`submitted`}}function o(e){return e.display===`confirmation`}async function s(e){return o(e.request)?await c({ask:e.ask,print:e.print,request:e.request,theme:e.theme}):await l({ask:e.ask,print:e.print,request:e.request,theme:e.theme})}async function c(t){for(t.print(e(t.theme,{message:`approve tool "${t.request.action.toolName}"? (yes/no)`,tag:`approval`,tone:`warning`})),t.print(e(t.theme,{message:JSON.stringify(t.request.action.input,null,2),tag:`tool`,tone:`muted`}));;){let n=await t.ask(`approval> `);if(n===void 0)return{kind:`aborted`};if(n===r)return{kind:`deferred`};let i=n.trim().toLowerCase();if(i===`skip`||i===`/skip`)return{kind:`deferred`};if(i===`a`||i===`approve`||i===`y`||i===`yes`)return{inputResponse:{optionId:`approve`,requestId:t.request.requestId},kind:`submitted`};if(i===`d`||i===`deny`||i===`n`||i===`no`)return{inputResponse:{optionId:`deny`,requestId:t.request.requestId},kind:`submitted`};t.print(e(t.theme,{message:`enter "yes" to approve, "no" to deny, press Escape, or type "skip" to return to the normal prompt`,tag:`input`,tone:`warning`}))}}async function l(n){n.print(e(n.theme,{message:n.request.prompt,tag:`question`,tone:`info`}));for(let[t,r]of(n.request.options??[]).entries())n.print(e(n.theme,{message:`${t+1}. ${r.label}${r.description===void 0?``:` - ${r.description}`}`,tag:`option`,tone:`muted`}));let i=n.request.allowFreeform===!0||(n.request.options?.length??0)===0;for(;;){let a=await n.ask(`answer> `);if(a===void 0)return{kind:`aborted`};if(a===r)return{kind:`deferred`};let o=a.trim();if(o===`skip`||o===`/skip`)return{kind:`deferred`};let s=t(o,n.request);if(s!==void 0)return{inputResponse:s,kind:`submitted`};n.print(e(n.theme,{message:n.request.options===void 0||n.request.options.length===0?`enter a response, press Escape, or type "skip" to return to the normal prompt`:i?`enter an option number/id, freeform text, press Escape, or type "skip" to return to the normal prompt`:`enter an option number/id, press Escape, or type "skip" to return to the normal prompt`,tag:`input`,tone:`warning`}))}}export{i as n,a as r,r as t};
|