eve 0.61.1 → 0.62.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 +16 -0
- package/dist/src/_virtual/_rolldown/runtime.js +1 -1
- package/dist/src/cli/banner.d.ts +1 -2
- package/dist/src/cli/commands/init-install.d.ts +8 -5
- package/dist/src/cli/commands/init-install.js +1 -1
- package/dist/src/cli/commands/init-project.d.ts +1 -2
- package/dist/src/cli/commands/init.js +1 -1
- package/dist/src/cli/dev/boot-progress.js +1 -1
- package/dist/src/cli/dev/command.js +1 -1
- package/dist/src/cli/dev/tui/agent-header.d.ts +1 -10
- package/dist/src/cli/dev/tui/agent-header.js +1 -1
- package/dist/src/cli/dev/tui/blocks.js +1 -1
- package/dist/src/cli/dev/tui/registry-result-message.js +2 -1
- package/dist/src/cli/dev/tui/runner.d.ts +2 -5
- package/dist/src/cli/dev/tui/runner.js +2 -2
- package/dist/src/cli/dev/tui/setup-panel.js +3 -3
- package/dist/src/cli/dev/tui/subagent-pump.d.ts +1 -1
- package/dist/src/cli/dev/tui/subagent-pump.js +1 -1
- package/dist/src/cli/dev/tui/terminal-renderer.d.ts +0 -3
- package/dist/src/cli/dev/tui/terminal-renderer.js +3 -3
- package/dist/src/cli/dev/tui/tui.d.ts +0 -1
- package/dist/src/cli/dev/tui/tui.js +1 -1
- package/dist/src/cli/run.js +1 -1
- package/dist/src/cli/ui/live-row.d.ts +4 -1
- package/dist/src/cli/ui/live-row.js +1 -1
- package/dist/src/compiled/.vendor-stamp.json +1 -1
- package/dist/src/compiler/extension-compatibility.d.ts +4 -2
- package/dist/src/compiler/extension-compatibility.js +1 -1
- package/dist/src/compiler/manifest.d.ts +0 -5
- package/dist/src/compiler/manifest.js +1 -1
- package/dist/src/compiler/normalize-agent-config.js +1 -1
- package/dist/src/compiler/normalize-manifest.js +1 -1
- package/dist/src/compiler/project-sources.d.ts +1 -1
- package/dist/src/compiler/project-sources.js +1 -1
- package/dist/src/compiler/source-graph.js +1 -1
- package/dist/src/compiler/validate-artifact.js +1 -1
- package/dist/src/discover/discover-agent.js +1 -1
- package/dist/src/discover/manifest.d.ts +0 -3
- package/dist/src/discover/manifest.js +1 -1
- package/dist/src/evals/abort.d.ts +2 -0
- package/dist/src/evals/abort.js +1 -0
- package/dist/src/evals/context.js +1 -1
- package/dist/src/evals/define-eval-config.d.ts +2 -2
- package/dist/src/evals/define-eval-config.js +1 -1
- package/dist/src/evals/define-eval.d.ts +3 -3
- package/dist/src/evals/define-eval.js +1 -1
- package/dist/src/evals/expect/index.js +1 -1
- package/dist/src/evals/expect/levenshtein.d.ts +2 -0
- package/dist/src/evals/expect/levenshtein.js +1 -0
- package/dist/src/evals/index.d.ts +1 -1
- package/dist/src/evals/judge.d.ts +3 -12
- package/dist/src/evals/judge.js +2 -2
- package/dist/src/evals/runner/discover.js +1 -1
- package/dist/src/evals/runner/execute-task.js +1 -1
- package/dist/src/evals/types.d.ts +52 -38
- package/dist/src/execution/dynamic-workflow/tool.js +1 -1
- package/dist/src/execution/tools/agent-router-workflow.js +1 -1
- package/dist/src/execution/tools/sleep-workflow.js +1 -1
- package/dist/src/instrumentation/dispatch.js +1 -1
- package/dist/src/instrumentation/lifecycle.d.ts +2 -4
- package/dist/src/instrumentation/provider.d.ts +8 -16
- package/dist/src/instrumentation/provider.js +1 -1
- package/dist/src/instrumentation/providers.js +1 -1
- package/dist/src/instrumentation/runtime-context.d.ts +2 -5
- package/dist/src/instrumentation/runtime-context.js +1 -1
- package/dist/src/instrumentation/runtime.d.ts +1 -4
- package/dist/src/instrumentation/runtime.js +1 -1
- package/dist/src/instrumentation/setup-context.d.ts +0 -5
- package/dist/src/internal/application/compiled-artifacts.d.ts +4 -7
- package/dist/src/internal/application/compiled-artifacts.js +2 -4
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/internal/authored-definition/core.js +1 -1
- package/dist/src/internal/authored-package-boundary.js +1 -1
- package/dist/src/internal/authored-runtime-modules.d.ts +1 -1
- package/dist/src/internal/authored-runtime-modules.js +1 -1
- package/dist/src/internal/instrumentation-layout.d.ts +6 -20
- package/dist/src/internal/instrumentation-layout.js +1 -1
- package/dist/src/internal/materialized-authored-modules.d.ts +2 -5
- package/dist/src/internal/materialized-authored-modules.js +1 -1
- package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
- package/dist/src/internal/nitro/host/dev-host-fingerprint.js +1 -1
- package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response.js +1 -1
- package/dist/src/internal/nitro/routes/channel-request-instrumentation.js +1 -1
- package/dist/src/public/instrumentation/index.d.ts +4 -102
- package/dist/src/public/instrumentation/index.js +1 -1
- package/dist/src/public/instrumentation/otel.d.ts +1 -2
- package/dist/src/runtime/resolve-agent.js +1 -1
- package/dist/src/sandbox/backends/default.d.ts +2 -11
- package/dist/src/sandbox/backends/default.js +1 -1
- package/dist/src/sandbox/backends/probes.d.ts +7 -0
- package/dist/src/sandbox/backends/probes.js +1 -0
- package/dist/src/self-modification/agent.d.ts +5 -12
- package/dist/src/self-modification/agent.js +1 -1
- package/dist/src/self-modification/extension/classify-registry-item.d.ts +1 -1
- package/dist/src/self-modification/extension/extension.d.ts +5 -0
- package/dist/src/self-modification/extension/extension.js +1 -1
- package/dist/src/self-modification/extension/subagents/agent/agent.d.ts +19 -0
- package/dist/src/self-modification/extension/subagents/agent/agent.js +1 -0
- package/dist/src/self-modification/extension/subagents/agent/instructions.js +37 -0
- package/dist/src/self-modification/extension/subagents/agent/sandbox.d.ts +26 -0
- package/dist/src/self-modification/extension/subagents/agent/sandbox.js +1 -0
- package/dist/src/self-modification/extension/{tools → subagents/agent/tools}/publish.d.ts +2 -2
- package/dist/src/self-modification/extension/subagents/agent/tools/publish.js +1 -0
- package/dist/src/self-modification/extension/{tools → subagents/agent/tools}/registry_add.d.ts +2 -2
- package/dist/src/self-modification/extension/subagents/agent/tools/registry_add.js +1 -0
- package/dist/src/self-modification/extension/{tools → subagents/agent/tools}/search_registry.js +1 -1
- package/dist/src/self-modification/git-workspace.d.ts +1 -1
- package/dist/src/self-modification/git-workspace.js +1 -1
- package/dist/src/self-modification/migration.d.ts +10 -0
- package/dist/src/self-modification/migration.js +28 -0
- package/dist/src/self-modification/proposal.d.ts +1 -1
- package/dist/src/self-modification/proposal.js +1 -1
- package/dist/src/self-modification/sandbox.d.ts +6 -20
- package/dist/src/self-modification/sandbox.js +1 -1
- package/dist/src/self-modification/setup.js +7 -6
- package/dist/src/setup/flows/registry.js +1 -2
- package/dist/src/setup/integrations/self-modification/setup.d.ts +6 -3
- package/dist/src/setup/integrations/self-modification/setup.js +1 -1
- package/dist/src/setup/scaffold/create/project.js +1 -1
- package/dist/src/setup/scaffold/index.d.ts +1 -0
- package/dist/src/setup/scaffold/index.js +1 -1
- package/dist/src/setup/scaffold/update/dependencies.d.ts +12 -0
- package/dist/src/setup/scaffold/update/dependencies.js +1 -0
- package/dist/src/setup/scaffold/version-tokens.d.ts +1 -0
- package/dist/src/setup/scaffold/version-tokens.js +1 -1
- package/dist/src/shared/agent-definition.d.ts +0 -9
- package/dist/src/shared/trace-policy.d.ts +0 -3
- package/dist/src/shared/trace-policy.js +1 -1
- package/dist/src/tracing/content-span-processor.js +1 -1
- package/dist/src/tracing/install-instrumentation-runtime.d.ts +2 -4
- package/dist/src/tracing/install-instrumentation-runtime.js +1 -1
- package/dist/src/tracing/otel-declaration.d.ts +5 -4
- package/dist/src/tracing/otel-declaration.js +1 -1
- package/dist/src/tracing/span-export-policy.d.ts +1 -3
- package/docs/agent-config.md +1 -1
- package/docs/concepts/security-model.md +4 -1
- package/docs/evals/assertions.mdx +1 -1
- package/docs/evals/cases.mdx +4 -6
- package/docs/evals/judge.mdx +99 -56
- package/docs/evals/overview.mdx +8 -6
- package/docs/evals/reporters.mdx +1 -1
- package/docs/guides/dev-tui.md +1 -1
- package/docs/guides/evaluate.md +4 -0
- package/docs/guides/hooks.md +1 -1
- package/docs/guides/instrumentation/{providers.mdx → instrumentation.mdx} +39 -43
- package/docs/guides/instrumentation/meta.json +1 -1
- package/docs/guides/instrumentation/migration.md +97 -0
- package/docs/guides/instrumentation/otel.mdx +95 -33
- package/docs/install-integrations.mdx +1 -1
- package/docs/reference/agent-files.md +2 -2
- package/docs/reference/cli.md +1 -1
- package/docs/reference/typescript-api.md +4 -2
- package/package.json +1 -2
- package/dist/src/compiler/instrumentation-layout-config.d.ts +0 -3
- package/dist/src/compiler/instrumentation-layout-config.js +0 -1
- package/dist/src/evals/autoevals-client.d.ts +0 -14
- package/dist/src/evals/autoevals-client.js +0 -2
- package/dist/src/instrumentation/config.d.ts +0 -13
- package/dist/src/instrumentation/config.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/ajv.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/code.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/index.js +0 -2
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/scope.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/errors.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/index.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/names.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/ref_error.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/resolve.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/rules.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/util.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/applicability.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/boolSchema.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/dataType.js +0 -4
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/defaults.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/index.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/keyword.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/subschema.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/core.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/data.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-draft-07.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/equal.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/ucs2length.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/uri.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/validation_error.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/allOf.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/anyOf.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/contains.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/dependencies.js +0 -4
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/if.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/index.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/items.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/items2020.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/not.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/oneOf.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/properties.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/thenElse.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/code.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/id.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/index.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/ref.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/discriminator/index.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/discriminator/types.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/draft7.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/format.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/index.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/metadata.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/const.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/enum.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/index.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitItems.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitLength.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitNumber.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/multipleOf.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/pattern.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/required.js +0 -1
- package/dist/src/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +0 -1
- package/dist/src/node_modules/.pnpm/autoevals@0.0.132_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0_/node_modules/autoevals/jsdist/index.js +0 -384
- package/dist/src/node_modules/.pnpm/compute-cosine-similarity@1.1.0/node_modules/compute-cosine-similarity/lib/index.js +0 -1
- package/dist/src/node_modules/.pnpm/compute-dot@1.1.0/node_modules/compute-dot/lib/index.js +0 -1
- package/dist/src/node_modules/.pnpm/compute-l2norm@1.1.0/node_modules/compute-l2norm/lib/index.js +0 -1
- package/dist/src/node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js +0 -1
- package/dist/src/node_modules/.pnpm/fast-uri@3.1.8/node_modules/fast-uri/index.js +0 -1
- package/dist/src/node_modules/.pnpm/fast-uri@3.1.8/node_modules/fast-uri/lib/schemes.js +0 -1
- package/dist/src/node_modules/.pnpm/fast-uri@3.1.8/node_modules/fast-uri/lib/utils.js +0 -1
- package/dist/src/node_modules/.pnpm/js-levenshtein@1.1.6/node_modules/js-levenshtein/index.js +0 -1
- package/dist/src/node_modules/.pnpm/js-yaml@4.3.2/node_modules/js-yaml/dist/js-yaml.js +0 -34
- package/dist/src/node_modules/.pnpm/json-schema-traverse@1.0.0/node_modules/json-schema-traverse/index.js +0 -1
- package/dist/src/node_modules/.pnpm/mustache@4.2.0/node_modules/mustache/mustache.js +0 -4
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/_vendor/partial-json-parser/parser.js +0 -2
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/auth/workload-identity-auth.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/azure.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/bedrock.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/client.js +0 -11
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/core/api-promise.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/core/error.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/core/pagination.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/core/resource.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/core/streaming.js +0 -3
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/core/uploads.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/error.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/index.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/internal/decoders/line.js +0 -3
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/internal/detect-platform.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/internal/errors.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/internal/headers.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/internal/parse.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/internal/provider.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/internal/qs/formats.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/internal/qs/stringify.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/internal/qs/utils.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/internal/request-options.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/internal/shims.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/internal/to-file.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/internal/tslib.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/internal/uploads.js +0 -2
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/internal/utils/base64.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/internal/utils/bytes.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/internal/utils/env.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/internal/utils/log.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/internal/utils/path.js +0 -2
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/internal/utils/query.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/internal/utils/sleep.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/internal/utils/uuid.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/internal/utils/values.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/internal/utils.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/lib/AbstractChatCompletionRunner.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/lib/AssistantStream.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/lib/ChatCompletionRunner.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/lib/ChatCompletionStream.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/lib/ChatCompletionStreamingRunner.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/lib/EventStream.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/lib/ResponsesParser.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/lib/RunnableFunction.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/lib/Util.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/lib/chatCompletionUtils.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/lib/parser.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/lib/responses/ResponseAccumulator.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/lib/responses/ResponseStream.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/admin/admin.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/admin/organization/admin-api-keys.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/admin/organization/audit-logs.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/admin/organization/certificates.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/admin/organization/data-retention.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/admin/organization/groups/groups.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/admin/organization/groups/roles.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/admin/organization/groups/users.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/admin/organization/invites.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/admin/organization/organization.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/admin/organization/projects/api-keys.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/admin/organization/projects/certificates.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/admin/organization/projects/data-retention.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/admin/organization/projects/groups/groups.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/admin/organization/projects/groups/roles.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/admin/organization/projects/hosted-tool-permissions.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/admin/organization/projects/model-permissions.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/admin/organization/projects/projects.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/admin/organization/projects/rate-limits.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/admin/organization/projects/roles.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/admin/organization/projects/service-accounts/api-keys.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/admin/organization/projects/service-accounts/service-accounts.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/admin/organization/projects/spend-alerts.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/admin/organization/projects/spend-limit.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/admin/organization/projects/users/roles.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/admin/organization/projects/users/users.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/admin/organization/roles.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/admin/organization/spend-alerts.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/admin/organization/spend-limit.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/admin/organization/usage.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/admin/organization/users/roles.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/admin/organization/users/users.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/audio/audio.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/audio/speech.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/audio/transcriptions.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/audio/translations.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/batches.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/beta/assistants.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/beta/beta.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/beta/chatkit/chatkit.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/beta/chatkit/sessions.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/beta/chatkit/threads.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/beta/realtime/realtime.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/beta/realtime/sessions.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/beta/realtime/transcription-sessions.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/beta/responses/input-items.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/beta/responses/input-tokens.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/beta/responses/responses.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/beta/threads/messages.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/beta/threads/runs/runs.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/beta/threads/runs/steps.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/beta/threads/threads.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/chat/chat.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/chat/completions/completions.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/chat/completions/index.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/chat/completions/messages.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/chat/index.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/completions.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/containers/containers.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/containers/files/content.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/containers/files/files.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/conversations/conversations.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/conversations/items.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/embeddings.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/evals/evals.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/evals/runs/output-items.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/evals/runs/runs.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/files.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/fine-tuning/alpha/alpha.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/fine-tuning/alpha/graders.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/fine-tuning/checkpoints/checkpoints.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/fine-tuning/checkpoints/permissions.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/fine-tuning/fine-tuning.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/fine-tuning/jobs/checkpoints.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/fine-tuning/jobs/jobs.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/fine-tuning/methods.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/graders/grader-models.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/graders/graders.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/images.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/index.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/models.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/moderations.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/realtime/calls.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/realtime/client-secrets.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/realtime/realtime.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/responses/input-items.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/responses/input-tokens.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/responses/responses.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/shared.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/skills/content.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/skills/skills.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/skills/versions/content.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/skills/versions/versions.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/uploads/parts.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/uploads/uploads.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/vector-stores/file-batches.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/vector-stores/files.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/vector-stores/vector-stores.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/videos.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/webhooks/index.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/webhooks/webhooks.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/resources/webhooks.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/streaming.js +0 -1
- package/dist/src/node_modules/.pnpm/openai@6.49.0_@smithy_signature-v4@5.7.3_ws@8.21.3_bufferutil@4.1.0__zod@3.25.76/node_modules/openai/version.js +0 -1
- package/dist/src/node_modules/.pnpm/validate.io-array@1.0.6/node_modules/validate.io-array/lib/index.js +0 -1
- package/dist/src/node_modules/.pnpm/validate.io-function@1.0.2/node_modules/validate.io-function/lib/index.js +0 -1
- 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 +0 -1
- 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 +0 -1
- 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 +0 -1
- 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 +0 -1
- 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 +0 -1
- 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 +0 -1
- 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 +0 -1
- 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 +0 -1
- 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 +0 -1
- 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 +0 -1
- 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 +0 -1
- 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 +0 -1
- 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 +0 -1
- 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 +0 -1
- 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 +0 -1
- 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 +0 -1
- 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 +0 -1
- 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 +0 -1
- 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 +0 -1
- 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 +0 -1
- 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 +0 -1
- 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 +0 -1
- 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 +0 -1
- 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 +0 -1
- 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 +0 -1
- 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 +0 -1
- 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 +0 -1
- 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 +0 -1
- 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 +0 -1
- 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 +0 -1
- 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 +0 -1
- 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 +0 -1
- 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 +0 -3
- 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 +0 -1
- 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 +0 -1
- 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 +0 -1
- 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 +0 -1
- 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 +0 -1
- 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 +0 -1
- package/dist/src/node_modules/.pnpm/zod@3.25.76/node_modules/zod/index.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/ZodError.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/errors.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/external.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/typeAliases.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/util.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/index.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/locales/en.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.js +0 -1
- package/dist/src/self-modification/extension/instructions.js +0 -37
- package/dist/src/self-modification/extension/tools/publish.js +0 -1
- package/dist/src/self-modification/extension/tools/registry_add.js +0 -1
- package/docs/guides/instrumentation/overview.md +0 -199
- /package/dist/src/self-modification/extension/{instructions.d.ts → subagents/agent/instructions.d.ts} +0 -0
- /package/dist/src/self-modification/extension/{tools → subagents/agent/tools}/edit_file.d.ts +0 -0
- /package/dist/src/self-modification/extension/{tools → subagents/agent/tools}/edit_file.js +0 -0
- /package/dist/src/self-modification/extension/{tools → subagents/agent/tools}/search_models.d.ts +0 -0
- /package/dist/src/self-modification/extension/{tools → subagents/agent/tools}/search_models.js +0 -0
- /package/dist/src/self-modification/extension/{tools → subagents/agent/tools}/search_registry.d.ts +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import{
|
|
2
|
-
`);if(this.#N){t!==this.#P&&(this.#P=t,this.#in({kind:`agent-header`,body:t,live:!1})),this.#Dn();return}this.#N=!0,this.#P=t,this.#n.flush(this.#Mn(),this.#Ln(this.#Kn()))}beginStartupDraft(e){this.#Lt({title:e.title}),this.#U=!0,this.#G=!0,this.#O=`starting`,this.#M={name:e.title
|
|
1
|
+
import{buildAgentHeader}from"./agent-header.js";import{detectMarkdownRendering}from"./markdown.js";import{PROMPT_COMMANDS,isPromptControlCommand,parsePromptCommand}from"./prompt-commands.js";import{renderAttentionRows,renderBlockLines}from"./blocks.js";import{copyTextToClipboard}from"./clipboard.js";import{dismissTypeahead,inlineCommandHint,isTypeaheadOpen,moveTypeaheadSelection,renderCommandSuggestions,selectedTypeaheadCommand,typeaheadCompletion,typeaheadFor}from"./command-typeahead.js";import{formatDevRebuildStatus,summarizeChangedFiles}from"./dev-rebuild-status.js";import{formatStoredDiagnostic,presentDiagnostic}from"./diagnostic-presentation.js";import{interruptedError}from"./errors.js";import{FileContentCache}from"./file-content-cache.js";import{EMPTY_LINE,PromptHistory,applyLineEditorKey,deleteForward,layoutPromptInput,lineOf,movePromptLine,visibleLine}from"./line-editor.js";import{nextLogDisplayMode}from"./log-display-mode.js";import{MessageQueue,renderMessageQueueRows}from"./message-queue.js";import{initialModelEditorState,transitionModelEditor}from"./model-editor.js";import{initialProviderPickerState,transitionProviderPicker}from"./provider-picker.js";import{renderQuestionPanel}from"./question-panel.js";import{enterBadge,flowMessageRows,renderAcknowledgeQuestion,renderFlowPanel,renderModelEditorQuestion,renderSelectQuestion,renderTextQuestion}from"./setup-panel.js";import{formatAssistantResponseStats,formatTokenFlow,formatTurnDuration,isIncompleteOsc,isIncompletePaste,nextKey,sanitizePastedText,stripPasteStart,stripPromptControlCharacters,takeUntil,typewriterText}from"./stream-format.js";import{TraceViewerSession}from"./traces/trace-viewer-session.js";import{buildStatusLine}from"./status-line.js";import{createTheme,detectUnicode}from"./theme.js";import{isPanelRoutedTool,presentPreparingTool,presentTool,readWriteFileInput,toolBaseName}from"./tool-presentation.js";import{groupToolBlocksForDisplay}from"./tool-block-groups.js";import{TurnClock}from"./turn-clock.js";import{allTodoItemsSettled,readTodoToolItems,renderFinishedTodoRows,renderTodoPanelRows}from"./todo-panel.js";import{reduceSetupSelectInput,setupSelectionIntent}from"./setup-selection-input.js";import{BACKGROUND_COLOR_QUERY,parseBackgroundColorReply}from"./terminal-background.js";import{inspectError}from"#internal/logging.js";import{eveVersionTag}from"#cli/banner.js";import{clipVisible,renderInputText,renderInputWithBlockCursor,stripAnsi,stripTerminalControls}from"#cli/ui/terminal-text.js";import{renderCursorRow}from"#setup/cli/option-row.js";import{initialSelectState,orderedSelection,reduceSelect,searchActionQuery,selectValueAtCursor}from"#setup/cli/select-state.js";import{toErrorMessage}from"#shared/errors.js";import{StringDecoder}from"node:string_decoder";import{summarizeKnownError}from"#harness/semantic-errors/index.js";import{parseDevRebuildLogLine}from"#internal/nitro/host/dev-watcher-log.js";import{LiveRegion}from"#cli/ui/live-region.js";import{AltScreen}from"#cli/ui/alt-screen.js";import{PROGRESS_PULSE_ASCII_GLYPH,PROGRESS_PULSE_GLYPH,isProgressPulseVisible}from"#cli/ui/progress-pulse.js";import{readGatewayServiceTier}from"#shared/gateway-service-tier.js";function isMultiSelectRequest(e){return e.kind===`multi`||e.kind===`searchable-multi`}function moveActionCursor(e,t,n){return n===0?void 0:e===void 0?t===`down`?0:n-1:(e+(t===`down`?1:-1)+n)%n}function completedTurnStatus(e){return e.interrupted?`Interrupted`:e.cancelled?`Cancelled`:e.continueSession?`Ready`:`Done`}const incompletePasteFlushMs=1e3,STATUS={processing:`Working…`,connectionAuth:`Waiting for connection authorization…`};var TerminalRenderer=class{#e;#t;#n;#r;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m;#h=[];#g=new Map;#_=new Set;#v=[];#y=new Set;#b=new Map;#x=0;#S=new Map;#C=new Set;#w=new Set;#T=new FileContentCache;#E=new Set;#D;#O;#k;#A;#j=0;#M;#N=!1;#P;#F=[];#I;#L=0;#R;#z;#B=``;#V=0;#H=new PromptHistory;#U=!1;#W;#G=!1;#K=!1;#q=new TurnClock;#J=EMPTY_LINE;#Y=!1;#X={kind:`idle`};#Z;#Q=STATUS.processing;#$;#ee=`eve`;#te=!1;#ne=!1;#re=!1;#ie=!1;#ae=!1;#oe=!1;#se=!1;#ce;#le=!0;#ue=0;#de=Date.now();#fe;#pe;#me;#he=!1;#ge;#_e=``;#ve=new StringDecoder(`utf8`);#ye;#be;#xe;#Se=!1;#Ce=!1;#we;#Te;#Ee;#De;#Oe;#ke;#Ae;#je=``;#Me=``;#Ne;#Pe;#Fe;#Ie=!1;#Le;#Re=0;#ze;#Be;#Ve;#He;#Ue;#We;#Ge;#Ke;#qe=new MessageQueue;#Je;#Ye;#Xe=!1;#Ze;#Qe;#$e=!1;#et;#tt;#nt;#rt;#it;setupFlow={begin:(e,t)=>this.#dt(e,t),setNavigation:e=>this.#ft(e),end:e=>this.#pt(e?.preserveDiagnostics??!0),readSelect:e=>this.#mt(e),readEditableSelect:e=>this.#gt(e),readProviderPicker:e=>this.#_t(e),readModelEditor:e=>this.#vt(e),readText:e=>this.#yt(e),readAcknowledge:e=>this.#bt(e),readChoice:e=>this.#ht(e),setStatus:e=>this.#Ot(e),renderLine:(e,t)=>this.#kt(e,t),replaceContent:e=>this.#At(e),renderOutput:e=>this.#jt(e),withInheritedStdio:e=>this.#Mt(e),withExclusiveTerminal:e=>this.#Mt(e),waitForInterrupt:e=>this.#Tt(e)};traceViewer={open:e=>this.#Pt(e)};constructor(e){this.#e=e?.input??process.stdin,this.#t=e?.output??process.stdout,this.#n=new LiveRegion(this.#t),this.#r=new AltScreen(this.#t),this.#i=createTheme({color:e?.color??!0,unicode:e?.unicode??detectUnicode()}),this.#a=e?.renderMarkdown??detectMarkdownRendering(),this.#o=e?.tools??`auto-collapsed`,this.#s=e?.reasoning??`auto-collapsed`,this.#c=e?.subagents??`auto-collapsed`,this.#l=e?.connectionAuth??`full`,this.#u=e?.assistantResponseStats??`tokensPerSecond`,this.#Ee=e?.contextSize,this.#d=e?.captureForeignOutput??this.#t===process.stdout,this.#f=e?.diagnostics,this.#ce=e?.onExitRequest,this.#m=e?.logs??`none`,this.#p=e?.availablePromptCommands??PROMPT_COMMANDS}setStartupPhase(e){this.#O=e,e===void 0?this.#en():this.#Qt(),this.#Dn()}renderAgentHeader(e){this.#M=void 0,this.#ee=e.name,(this.#D?.info?.agent.model.routing.kind!==`dynamic`||e.info?.agent.model.routing.kind!==`dynamic`)&&(this.#Ue=void 0),this.#D=e,this.#Lt();let t=this.#Mn().join(`
|
|
2
|
+
`);if(this.#N){t!==this.#P&&(this.#P=t,this.#in({kind:`agent-header`,body:t,live:!1})),this.#Dn();return}this.#N=!0,this.#P=t,this.#n.flush(this.#Mn(),this.#Ln(this.#Kn()))}beginStartupDraft(e){this.#Lt({title:e.title}),this.#U=!0,this.#G=!0,this.#O=`starting`,this.#M={name:e.title},this.#j=Date.now();let t=lineOf(stripPromptControlCharacters(e.initialDraft??``));this.#k=t,this.#ot(t),this.#Yt(),this.#Qt(),this.#Dn();let apply=e=>{t=e,this.#k=e,this.#Zt(),this.#ot(t),this.#Dn()};this.#A=e=>{if(e.type===`escape`&&this.#tt!==void 0){this.#tt(`escape`);return}if(e.type===`ctrl-c`&&this.#tt!==void 0){this.#Nt(),this.#tt(`ctrl-c`);return}let n=applyLineEditorKey(t,e,{multiline:!0});if(n!==void 0){apply(n);return}if(e.type===`enter`&&t.text.trim().length>0){this.#qe.enqueue(t.text)&&apply(EMPTY_LINE);return}e.type===`ctrl-c`&&this.#ce?.()},this.#at()}#at(){this.#k!==void 0&&this.#A!==void 0&&(this.#Kt(),this.#ot(this.#k),this.#U=!0,this.#ge=this.#A,this.#Bt())}finishStartupDraft(){let e={draft:this.#k?.text??this.#B,queuedPrompt:this.#qe.takePrompt()};return this.#k=void 0,this.#A=void 0,this.#Vt(),this.#Xt(),this.#U=!1,this.#G=!1,e}async readPrompt(e){this.#Lt(e),this.#rn(),this.#on(),this.#U=!0,this.#G=!0,this.#X={kind:`idle`},this.#Q=``,this.#oe=this.#se,this.#se=!1;let t=this.#qe.restoreDraft()?.split(`
|
|
3
3
|
`).map(stripPromptControlCharacters).join(`
|
|
4
4
|
`),n=stripPromptControlCharacters(e?.initialDraft??this.#J.text),r=t===void 0?n:n.length===0?t:`${t}\n\n${n}`,i=lineOf(r);return this.#J=EMPTY_LINE,this.#H.begin(i.text),this.#ot(i),this.#W=typeaheadFor(this.#p,i.text),this.#Yt(),this.#Dn(),await new Promise((e,t)=>{this.#Z=t;let apply=e=>{i=e,this.#Zt(),this.#ot(i),this.#W=typeaheadFor(this.#p,e.text,this.#W),this.#Dn()},recall=e=>{e!==void 0&&apply(lineOf(e))},interrupt=()=>{this.#W=void 0,this.#Xt(),this.#zt(),t(interruptedError())},suggestions=()=>this.#W!==void 0&&isTypeaheadOpen(this.#W)?this.#W:void 0,highlighted=()=>{let e=suggestions();return e===void 0?void 0:selectedTypeaheadCommand(e)};this.#ge=t=>{t.type!==`ctrl-c`&&this.#oe&&(this.#oe=!1,this.#Dn());let n=applyLineEditorKey(i,t,{multiline:!0});if(n!==void 0){apply(n);return}switch(t.type){case`up`:case`ctrl-p`:{let e=suggestions();if(e!==void 0){this.#W=moveTypeaheadSelection(e,-1),this.#Dn();break}let t=movePromptLine(i,`up`);t===void 0?recall(this.#H.previous(i.text)):apply(t);break}case`down`:case`ctrl-n`:{let e=suggestions();if(e!==void 0){this.#W=moveTypeaheadSelection(e,1),this.#Dn();break}let t=movePromptLine(i,`down`);t===void 0?recall(this.#H.next()):apply(t);break}case`tab`:{let e=highlighted();e!==void 0&&apply(lineOf(typeaheadCompletion(e)));break}case`escape`:{let e=suggestions();e!==void 0&&(this.#W=dismissTypeahead(e),this.#Dn());break}case`enter`:{let t=highlighted(),n=t!==void 0&&parsePromptCommand(i.text)===null?typeaheadCompletion(t).trimEnd():i.text;if(n.trim().length===0)break;this.#W=void 0,this.#H.add(n),this.#U=!1,this.#Xt(),this.#Q=STATUS.processing,isPromptControlCommand(n)?this.#in({kind:`command`,body:stripTerminalControls(n.trim()),live:!1}):(this.#$t(),this.#an(n),this.#ze=n,this.#q.arm()),this.#ot(EMPTY_LINE),this.#Dn(),this.#Vt(),e(n);break}case`ctrl-d`:i.text.length===0?(this.#Nt(),interrupt()):apply(deleteForward(i));break;case`ctrl-l`:this.#An();break;case`ctrl-r`:this.#Dn();break;case`ctrl-c`:if(this.#oe){this.#Nt(),interrupt();break}this.#oe=!0,apply(EMPTY_LINE)}},this.#Bt()})}#ot(e){this.#B=e.text,this.#V=e.cursor}takeQueuedPrompt(){let e=this.#qe.view().steering,t=this.#qe.takePrompt();return t!==void 0&&(this.#Qe=e?`steer`:`queue`),t}async renderStream(e,t){this.#Lt(t),this.#_.clear(),this.#U=!1,this.#X.kind!==`waiting`&&(this.#X={kind:`waiting`,startedAtMs:Date.now()}),this.#Q=this.#L>0?STATUS.connectionAuth:STATUS.processing,this.#sn(t?.submittedPrompt),t?.submittedPrompt!==void 0&&this.#f?.recordPrompt(),t?.submittedPrompt!==void 0&&!this.#q.armed&&this.#q.arm(),this.#ie=!1,this.#Xe=!1,this.#$e=!1,this.#et=t?.submittedPrompt,this.#qe.beginTurn(),this.#Je=e.cancel,this.#Ye=e.steer,this.#we=void 0,this.#Te=void 0,this.#De=void 0,this.#Oe=void 0,this.#ke=Date.now();let n={tools:t?.tools??this.#o,reasoning:t?.reasoning??this.#s,assistantResponseStats:t?.assistantResponseStats??this.#u};this.#Qt(),this.#Y=!0,this.#Dn();let r=new Promise(e=>{this.#xe=e});this.#ge=e=>this.#qt(e),this.#Bt();let i={text:new Map,reasoning:new Map,tools:new Map,cancelled:!1,restoreCancelledPrompt:!0};try{for await(let t of takeUntil(iterateTUIStream(e.events),r)){if(this.#ie)break;this.#hn(t,n,i)}}catch(e){let t=summarizeKnownError(e);t===null?this.#cn(`Error`,toErrorMessage(e),{detail:inspectError(e)}):this.#cn(t.name,t.message,{detail:inspectError(e),hint:t.hint})}finally{this.#xe=void 0,this.#ie&&e.abort?.(),this.#Je=void 0,this.#Ye=void 0,this.#Vt(),this.#Y=!1,this.#X.kind===`waiting`&&(this.#X={kind:`idle`}),this.#rn(),this.#Q=completedTurnStatus({interrupted:this.#ie,cancelled:this.#Xe,continueSession:t?.continueSession===!0}),this.#Sn(i),(this.#ie||i.cancelled)&&this.#xn(i),this.#mn(),this.#rn(),this.#f?.reportStats(),this.#Dn(),t?.continueSession||this.#zt()}}async renderIdleStream(e,t){let n={tools:t?.tools??this.#o,reasoning:t?.reasoning??this.#s,assistantResponseStats:t?.assistantResponseStats??this.#u},r={text:new Map,reasoning:new Map,tools:new Map,cancelled:!1,restoreCancelledPrompt:!1};try{for await(let t of iterateTUIStream(e.events))this.#hn(t,n,r)}catch(e){let t=summarizeKnownError(e);t===null?this.#cn(`Error`,toErrorMessage(e),{detail:inspectError(e)}):this.#cn(t.name,t.message,{detail:inspectError(e),hint:t.hint})}finally{this.#Sn(r),r.cancelled&&this.#xn(r),this.#mn(),this.#rn(),this.#f?.reportStats(),this.#Dn()}}async readToolApproval(e,t){return this.#Lt(t),this.#en(),this.#U=!1,this.#X={kind:`idle`},this.#Q=`Approve ${formatToolApprovalTitle(e)}? (y/n)`,this.#ie=!1,this.#Dn(),await new Promise((t,n)=>{this.#Z=n,this.#ge=r=>{switch(r.type){case`text`:{if(r.framing!==`unframed`)break;let n=r.value.toLowerCase();n===`y`?(this.#$t(),this.#Q=STATUS.processing,this.#Vt(),this.#Dn(),t({approved:!0})):n===`n`&&(this.#$t(),this.#Q=STATUS.processing,this.#ct(e.toolCallId),this.#Vt(),this.#Dn(),t({approved:!1,reason:`Denied by user.`}));break}case`ctrl-r`:this.#Dn();break;case`ctrl-c`:this.#ie=!0,this.#zt(),n(interruptedError())}},this.#Bt()})}async readInputQuestion(e,t){this.#Lt(t),this.#en(),this.#U=!1,this.#G=!1,this.#X={kind:`idle`},this.#ie=!1;let n=e.options??[],r=n.length>0,i=(e.allowFreeform===!0||!r)&&r,a=n.length+ +!!i,o=questionSectionId(e.requestId),s=r?`overlay`:`text`,c=0,l=EMPTY_LINE,isOnFreeformRow=()=>i&&c===n.length,overlayPanel=t=>renderQuestionPanel({prompt:stripTerminalControls(e.prompt),options:n,cursor:c,allowFreeform:i,editor:l,caretVisible:this.#le},this.#i,t),renderTextSection=()=>{this.#un({id:o,kind:`question`,title:stripTerminalControls(e.prompt),body:formatQuestionContent(e,void 0,this.#i),preformatted:!0,live:!0})},syncFreeformCaret=()=>{isOnFreeformRow()?this.#Yt():(this.#Xt(),this.#Zt())};s===`overlay`?(s=`overlay`,this.#U=!1,this.#fn(o),this.#Be=overlayPanel,this.#Q=``,syncFreeformCaret(),this.#Dn()):(s=`text`,this.#Be=void 0,renderTextSection(),this.#U=!0,this.#ot(l),this.#Q=``,this.#Yt(),this.#Dn());let finalize=t=>{this.#Be=void 0,this.#un({id:o,kind:`question`,title:stripTerminalControls(e.prompt),body:`${this.#i.colors.dim(this.#i.glyph.elbow)} ${stripTerminalControls(t.label)}`,preformatted:!0,live:!1}),this.#U=!1,this.#$t(),this.#Q=STATUS.processing,this.#Xt(),this.#Vt(),this.#Dn();let n={};return t.optionId!==void 0&&(n.optionId=t.optionId),t.text!==void 0&&(n.text=t.text),n},dismiss=()=>{this.#Be=void 0,this.#un({id:o,kind:`question`,title:stripTerminalControls(e.prompt),body:`${this.#i.colors.dim(this.#i.glyph.elbow)} ${this.#i.colors.dim(`Dismissed.`)}`,preformatted:!0,live:!1}),this.#U=!1,this.#Q=``,this.#Xt(),this.#Vt(),this.#Dn(),u(void 0)},moveCursor=e=>{a!==0&&(c=(c+e+a)%a,syncFreeformCaret(),this.#Dn())},selectOptionAt=e=>{let t=n[e];t&&u(finalize({optionId:t.id,label:t.label}))},u;return await new Promise((t,r)=>{this.#Z=r,u=t,this.#ge=t=>{if(t.type===`ctrl-c`){if((s===`text`||isOnFreeformRow())&&l.text.length>0){l=EMPTY_LINE,this.#Zt(),s===`text`&&this.#ot(l),this.#Dn();return}this.#ie=!0,this.#Be=void 0,this.#Xt(),this.#zt(),r(interruptedError());return}if(t.type===`ctrl-r`){this.#Dn();return}if(s===`overlay`){let r=setupSelectionIntent(t,{textNavigation:!isOnFreeformRow()});if(r?.kind===`move`){moveCursor(r.direction===`up`?-1:1);return}switch(t.type){case`up`:case`ctrl-p`:moveCursor(-1);break;case`down`:case`ctrl-n`:moveCursor(1);break;case`enter`:if(isOnFreeformRow()){let t=resolveQuestionText(l.text,e);t!==void 0&&u(finalize(t));break}selectOptionAt(c);break;case`escape`:if(isOnFreeformRow()&&l.text.length>0){l=EMPTY_LINE,this.#Zt(),this.#Dn();break}dismiss();break;default:if(isOnFreeformRow()){let e=applyLineEditorKey(l,t);e!==void 0&&(l=e,this.#Zt(),this.#Dn());break}if(t.type===`text`&&/^[1-9]$/u.test(t.value)){let e=Number(t.value)-1;e<n.length?selectOptionAt(e):e===n.length&&i&&(c=e,syncFreeformCaret(),this.#Dn())}}return}let a=applyLineEditorKey(l,t,{multiline:!0});if(a!==void 0){l=a,this.#Zt(),this.#ot(l),this.#Dn();return}switch(t.type){case`up`:case`down`:{let e=movePromptLine(l,t.type);e!==void 0&&(l=e,this.#Zt(),this.#ot(l),this.#Dn());break}case`enter`:{let t=resolveQuestionText(l.text,e);if(t===void 0)break;u(finalize(t));break}case`escape`:if(l.text.length>0){l=EMPTY_LINE,this.#Zt(),this.#ot(l),this.#Dn();break}dismiss()}},this.#Bt()})}upsertSubagentStep(e){if(this.#f?.recordSubagentDispatch(e.callId),this.#c===`hidden`)return;let t=stripTerminalControls(e.reasoning??``).trim(),n=stripTerminalControls(e.message??``).trim();if(t.length!==0||n.length!==0){if(this.#ln(e.callId,e.subagentName),this.#c===`collapsed`){this.#Dn();return}this.#dn({id:subagentStepSectionId(e.callId,e.sectionKey),kind:`subagent-step`,subagentCallId:e.callId,depth:1,reasoning:t,body:n,collapsed:this.#c!==`full`,live:!e.finalized}),this.#Dn()}}upsertSubagentTool(e){if(this.#f?.recordSubagentDispatch(e.callId),e.status===`failed`&&e.errorText!==void 0&&this.#f?.append({source:`tool`,summary:`${e.toolName} failed (subagent ${e.subagentName})`,detail:e.errorText}),this.#c===`hidden`)return;if(this.#ln(e.callId,e.subagentName),this.#c===`collapsed`){this.#Dn();return}let t=subagentToolStatus(e.status),n=e.status===`preparing`?presentPreparingTool(e.toolName):presentTool(e.toolName,e.input,this.#yn({input:e.input,output:e.output,toolCallId:e.childCallId,toolName:e.toolName})),r={id:subagentToolSectionId(e.callId,e.childCallId),kind:`subagent-tool`,subagentCallId:e.callId,depth:1,title:stripTerminalControls(n.title),subtitle:stripTerminalControls(n.subtitle),status:t,live:t===`running`||t===`approval`,expanded:this.#c===`full`,toolName:e.toolName,toolGroup:n.group,toolInput:e.input};n.doneTitle!==void 0&&(r.doneTitle=stripTerminalControls(n.doneTitle)),n.detail!==void 0&&(r.detailLines=n.detail,r.keepDetailWhenDone=n.keepDetailWhenDone===!0),e.output===void 0?e.errorText!==void 0&&(r.result=stripTerminalControls(e.errorText)):(r.result=n.summarizeResult(e.output),r.toolOutput=e.output),this.#dn(r),this.#st(e.callId),this.#Dn()}#st(e){applyCohortLiveness(this.#h.filter(t=>t.kind===`subagent-tool`&&t.subagentCallId===e).map(e=>({block:e,active:isActiveToolStatus(e.status)})))}removeSubagentTool(e){this.#fn(subagentToolSectionId(e.callId,e.childCallId)),this.#Dn()}subagents={begin:e=>this.beginSubagent(e),background:e=>this.backgroundSubagent(e),upsertStep:e=>this.upsertSubagentStep(e),upsertTool:e=>this.upsertSubagentTool(e),removeTool:e=>this.removeSubagentTool(e),complete:e=>this.completeSubagent(e),markChildToolCallId:e=>this.markChildToolCallId(e)};beginSubagent(e){if(this.#c===`hidden`)return;this.#ln(e.callId,e.name);let t=this.#g.get(subagentHeaderId(e.callId));t!==void 0&&(t.status===`done`&&delete t.status,t.live=!0),this.#w.delete(e.callId),this.#Dn()}backgroundSubagent(e){let t=this.#g.get(subagentHeaderId(e.callId));if(t===void 0||this.#_.has(subagentHeaderId(e.callId)))return;t.status=`running`,t.live=!0,t.updateSeq=++this.#x;let n=this.#C.has(e.callId);this.#C.add(e.callId),n||this.#pn(e.callId),this.#rn(),this.#Dn()}completeSubagent(e){let t=this.#g.get(subagentHeaderId(e.callId));if(t!==void 0){if(t.status=`done`,e.authoritative){this.#C.delete(e.callId),this.#w.delete(e.callId);for(let t of this.#h)t.subagentCallId===e.callId&&(t.live=!1)}else{this.#w.add(e.callId);for(let t of this.#h)t.subagentCallId===e.callId&&(t.live=!0)}this.#rn(),this.#Dn()}}markChildToolCallId(e){this.#y.add(e);let t=this.#b.get(e);t!==void 0&&(this.#fn(t),this.#b.delete(e),this.#Dn())}#ct(e){let t=this.#g.get(toolSectionId(e));t!==void 0&&(t.status=`denied`,t.live=!1)}upsertConnectionAuth(e){if(this.#l===`hidden`)return;let t=connectionAuthTerminalMessage(e.state);this.#un({id:connectionAuthSectionId(e.name),kind:`connection-auth`,title:`${stripTerminalControls(e.name)} · authorization · ${e.state}`,body:formatConnectionAuthContent(e,t),preformatted:!0,live:t===void 0}),this.#Dn()}setConnectionAuthPendingCount(e){let t=Math.max(0,e);if(t===this.#L)return;let n=this.#L>0;this.#L=t,t>0?(this.#Q=STATUS.connectionAuth,this.#Dn()):n&&(this.#Q=STATUS.processing,this.#Dn())}setVercelStatus(e){this.#R=e,this.#Dn()}setRemoteConnectionStatus(e){this.#z=e,this.#Dn()}reset(){this.#h=[],this.#g.clear(),this.#_.clear(),this.#I=void 0,this.#F.length=0,this.#v.length=0,this.#N=!1,this.#P=void 0,this.#lt(),this.#K=!1,this.#ze=void 0,this.#Pe=void 0,this.#L=0,this.#we=void 0,this.#Te=void 0,this.#De=void 0,this.#Oe=void 0,this.#ke=void 0,this.#te&&(this.#n.clearAll(),this.#Dn())}renderSessionBoundary(){this.#on(),this.#lt();let e=this.#i.colors,t=this.#i.glyph,n=e.dim(`${t.cornerOpen}${t.dash.repeat(2)} Session restarted, clear context.`);this.#in({kind:`session-boundary`,body:n,live:!1}),this.#Dn()}#lt(){this.#Ue=void 0,this.#We=void 0,this.#y.clear(),this.#b.clear(),this.#E.clear(),this.#C.clear(),this.#w.clear(),this.#S.clear(),this.#Ge=void 0,this.#Ke=void 0,this.#qe.reset(),this.#Qe=void 0,this.#T.clear(),this.#q.reset(),this.#rn()}renderNotice(e){let t=stripTerminalControls(e);t.trim().length!==0&&(this.#Lt(),this.#in({kind:`notice`,body:t,live:!1}),this.#Dn())}renderSandboxLog(e){let t=parseSandboxLogLine(stripTerminalControls(e));t!==void 0&&(this.#f?.append({source:`sandbox`,detail:t}),this.#Lt(),this.#in({kind:`sandbox`,body:t,live:!1}),this.#Dn())}renderSetupWarning(e){let t=stripTerminalControls(e);if(t.trim().length===0){this.#ut();return}this.#Lt(),this.#He=t,this.#Dn()}clearSetupWarning(){this.#ut()}#ut(){this.#He!==void 0&&(this.#He=void 0,this.#Dn())}renderCommandInvocation(e,t){let n=stripTerminalControls(e);if(n.trim().length===0)return;this.#Lt();let r={kind:`command`,body:n,live:!1};t===`failed`&&(r.status=`error`),this.#in(r),this.#Dn()}renderCommandResult(e,t){let n=stripAnsi(e);n.trim().length!==0&&(this.#Lt(),this.#in({kind:`result`,body:n,live:!1,status:t===`success`?`done`:void 0}),this.#Dn())}#dt(e,t=`spinner`){this.#Lt(),this.#k===void 0&&(this.#U=!1),this.#X={kind:`idle`},this.#Q=``;let n=t===`pulse`?{kind:`pulse`,startedAtMs:Date.now()}:{kind:`spinner`};this.#Ve={title:stripTerminalControls(e),indicator:n,lines:[],outputBuffer:[]},this.#Qt(),this.#Dn()}#ft(e){this.#Ve!==void 0&&(this.#Ve.navigation=e,this.#Dn())}#pt(e){this.#tt=void 0,this.#Dt();let t=this.#Ve;if(t!==void 0){if(this.#Ve=void 0,this.#k===void 0?this.#en():this.#at(),e){let e=[];for(let n of t.lines){if(n.evidence===!0){e.push(n.text);continue}(n.tone===`warning`||n.tone===`error`)&&(e.length>0&&this.#in({kind:`flow`,title:`info`,body:e.join(`
|
|
5
5
|
`),live:!1}),this.#in({kind:`flow`,title:n.tone,body:n.text,live:!1})),e=[]}}this.#Dn()}}async#mt(e){let t=this.#xt(e.message),n=isMultiSelectRequest(e),r=e.kind===`search`?e.searchAction:void 0,i=e.options,a=e.navigation?.kind===`planner`,o={options:i,searchAction:r,submitRow:n&&!a};`initialValue`in e&&e.initialValue!==void 0&&(o.defaultValue=e.initialValue),`initialValues`in e&&e.initialValues!==void 0&&(o.initialValues=e.initialValues);let s=initialSelectState(o),c,l=!1,u=0,isCurrentSearch=e=>e===u,clearSearch=()=>{u+=1,l=!1,s=reduceSelect(s,{type:`clear`},{options:i,searchAction:r,submitRow:n&&!a}),this.#Dn()},loadSearch=async(e,t)=>{l=!0,c=void 0;let o=++u;this.#Dn();try{let c=await t(e);if(!isCurrentSearch(o))return;let l=s.filter;i=c,s={...initialSelectState({options:c,searchAction:r,submitRow:n&&!a}),filter:l}}catch(e){isCurrentSearch(o)&&(c=toErrorMessage(e))}finally{isCurrentSearch(o)&&(l=!1,this.#Dn())}},d=e.notices;if(e.kind===`task-list`||e.kind===`search`&&e.layout===`task-list`){let n=t.taskListLineStart??t.lines.length,r=t.lines.slice(n).filter(e=>e.tone===`success`||e.tone===`warning`||e.tone===`error`).map(e=>({tone:e.tone,text:e.text}));d=e.notices??r,t.taskListLineStart=t.lines.length,t.hideLinesWhileQuestion=!0}let panelState=()=>{let t={...e,message:``,options:i,select:s};return d!==void 0&&d.length>0&&(t.notices=d),c!==void 0&&(t.error=c),l&&(t.loadingFrame=this.#Pn()),t};return t.question=e=>renderSelectQuestion(panelState(),this.#i,e),this.#Dn(),await this.#wt((t,o)=>{let close=e=>{u+=1,o(e)};if(l){t.type===`ctrl-c`?close(void 0):t.type===`escape`?clearSearch():t.type===`ctrl-r`&&this.#Dn();return}let d=e.navigation?.kind===`planner`?e.navigation:void 0,f=t.type===`left`&&(d?.activeStep??0)>(d?.firstNavigableStep??0)?`back`:t.type===`right`&&d!==void 0&&d.activeStep>=(d.firstNavigableStep??0)&&d.activeStep<d.steps.length-1?`forward`:void 0;if(f!==void 0){close({kind:`navigate`,direction:f,values:n?orderedSelection(i,s.selected):[]});return}let p={key:t,options:i,searchAction:r,select:s},m=reduceSetupSelectInput(n?{...p,kind:e.kind,required:e.required,plannerNavigation:a||void 0}:{...p,kind:e.kind});switch(m.kind){case`cancel`:close(void 0);return;case`repaint`:this.#Dn();return;case`update`:s=m.select,c=void 0,this.#Dn();return;case`submit`:{let e=searchActionQuery(m.values[0]??``),t=r?.load;if(e===void 0||t===void 0){close(m.values);return}loadSearch(e,t);return}case`error`:c=m.message,this.#Dn();return;case`ignore`:return}}).promise}#ht(e){this.#Lt();let t=this.#St();t.status={kind:`progress`,text:stripTerminalControls(e.status),startedAtMs:Date.now()};let n;t.question=t=>renderSelectQuestion({kind:`actions`,context:e.context,actions:e.actions,cursor:n},this.#i,t),this.#Dn();let r=this.#wt((t,r)=>{let i=setupSelectionIntent(t,{textNavigation:!0});switch(i?.kind){case`cancel`:r(void 0);return;case`move`:n=moveActionCursor(n,i.direction,e.actions.length),this.#Dn();return;case`repaint`:this.#Dn();return;case`submit`:n!==void 0&&r(e.actions[n].value);return;case void 0:return}},()=>{t.status=void 0});return{choice:r.promise,close:()=>r.settle(void 0)}}async#gt(e){let t=this.#xt(e.message),n={options:e.options};e.initialValue!==void 0&&(n.defaultValue=e.initialValue);let r=initialSelectState(n),i=lineOf(``),a;t.question=t=>{let n={kind:`inline-edit`,layout:`task-list`,message:``,options:e.options,select:r,edit:{optionValue:e.editable.value,caretVisible:this.#le,editor:{kind:`rename`,editor:i,defaultValue:e.editable.defaultValue,formatHint:e.editable.formatHint}}};return a!==void 0&&(n.error=a),renderSelectQuestion(n,this.#i,t)};let onEditableRow=()=>selectValueAtCursor([...e.options],r.cursor)===e.editable.value,syncEditableRow=()=>{onEditableRow()?this.#Yt():(i=lineOf(``),this.#Xt())};return syncEditableRow(),this.#Dn(),await this.#wt((t,n)=>{let applyEditor=e=>{i=e,a=void 0,this.#Zt(),this.#Dn()},applySelect=t=>{r=reduceSelect(r,t,{options:e.options}),a=void 0,syncEditableRow(),this.#Dn()},submit=()=>{let t=selectValueAtCursor([...e.options],r.cursor);if(t===void 0)return;if(t!==e.editable.value){n({kind:`selected`,value:t});return}let o=(i.text||e.editable.defaultValue).trim(),s=e.editable.validate?.(o);if(s!==void 0){a=s,this.#Dn();return}n(o===e.editable.defaultValue?{kind:`selected`,value:t}:{kind:`edited`,value:t,text:o})},o=setupSelectionIntent(t,{textNavigation:!onEditableRow()});switch(o?.kind){case`cancel`:n(void 0);return;case`move`:applySelect({type:o.direction});return;case`submit`:submit();return;case`repaint`:this.#Dn();return;case void 0:}if(!onEditableRow())return;let s=applyLineEditorKey(i,t);s!==void 0&&applyEditor(s)},()=>this.#Xt()).promise}async#_t(e){let t=this.#xt(e.message),n=initialProviderPickerState(e.options,e.initialValue),r,cursorBadge=()=>{if(n.phase.kind!==`inactive`)return;let t=selectValueAtCursor([...e.options],n.select.cursor),r=e.options.find(e=>e.value===t);if(r!==void 0)return enterBadge(this.#i,r.checked===!0?`change`:void 0)};t.question=t=>{let r=cursorBadge(),i={kind:`inline-edit`,layout:`stacked`,message:``,options:e.options,select:n.select,edit:{optionValue:`ai-gateway-key`,caretVisible:this.#le,editor:{kind:`key`,phase:n.phase}}};return r!==void 0&&(i.cursorBadge=r),renderSelectQuestion(i,this.#i,t)};let syncCaret=()=>{n.phase.kind===`editing`||n.phase.kind===`invalid`?this.#Yt():this.#Xt()};return syncCaret(),this.#Dn(),await this.#wt((t,i,a)=>{let dispatch=t=>{let o=transitionProviderPicker(n,t,e.options);switch(o.kind){case`ignore`:return;case`clear`:r?.abort(),r=void 0,n=o.state,syncCaret(),this.#Dn();return;case`cancel`:i(void 0);return;case`render`:n=o.state,syncCaret(),this.#Dn();return;case`validate`:{n=o.state,syncCaret(),this.#Dn();let t=new AbortController;r=t;let i;try{i=e.validateInlineKey(o.key,t.signal)}catch(e){a(e);return}i.then(e=>{r!==t||t.signal.aborted||(r=void 0,dispatch({type:`validated`,validation:e}))},e=>{r!==t||t.signal.aborted||(r=void 0,a(e))});return}case`settle`:i(o.result);return}},o=setupSelectionIntent(t,{textNavigation:n.phase.kind===`inactive`});switch(o?.kind){case`cancel`:dispatch({type:`cancel`});return;case`move`:dispatch({type:`move`,direction:o.direction});return;case`submit`:dispatch({type:`submit`});return;case`repaint`:this.#Dn();return;case void 0:}if(n.phase.kind!==`editing`&&n.phase.kind!==`invalid`)return;let s=applyLineEditorKey(n.phase.editor,t);s!==void 0&&(this.#Zt(),dispatch({type:`edit`,editor:s}))},()=>{r?.abort(),r=void 0,this.#Xt()}).promise}async#vt(e){let t=this.#xt(`Select the model`),n=initialModelEditorState(e);return t.question=t=>renderModelEditorQuestion({request:e,state:n},this.#i,t,``),this.#Dn(),await this.#wt((t,r)=>{let dispatch=t=>{let i=transitionModelEditor(n,t,e);switch(i.kind){case`ignore`:return;case`render`:n=i.state,this.#Dn();return;case`cancel`:r(void 0);return;case`settle`:r(i.result);return}},i=setupSelectionIntent(t);switch(i?.kind){case`cancel`:dispatch({type:`cancel`});return;case`move`:dispatch({type:`move`,direction:i.direction});return;case`submit`:dispatch({type:`submit`});return;case`repaint`:this.#Dn();return;case void 0:}if(t.type===`left`||t.type===`right`){dispatch({type:`adjust`,direction:t.type});return}if(t.type===`tab`){dispatch({type:`adjust`,direction:`right`});return}if(t.type===`backspace`){dispatch({type:`backspace`});return}if(t.type===`text`)for(let e of t.value.replaceAll(`
|
|
6
6
|
`,` `))e>=` `&&e!==``&&dispatch({type:`char`,char:e})}).promise}async#yt(e){let t=this.#xt(e.message),n=lineOf(``),r;return t.question=t=>{let i={message:``,editor:n,mask:e.mask===!0};return e.placeholder===void 0?e.defaultValue!==void 0&&(i.placeholder=e.defaultValue):i.placeholder=e.placeholder,e.notices!==void 0&&(i.notices=e.notices),r!==void 0&&(i.error=r),renderTextQuestion(i,this.#i,t,this.#le)},this.#Yt(),this.#Dn(),await this.#wt((t,i)=>{let apply=e=>{n=e,r=void 0,this.#Zt(),this.#Dn()},a=applyLineEditorKey(n,t);if(a!==void 0){apply(a);return}switch(t.type){case`ctrl-c`:case`escape`:i(void 0);return;case`ctrl-r`:this.#Dn();return;case`enter`:{let t=n.text.length>0?n.text:e.defaultValue??``,a=e.validate?.(t);if(a!==void 0){r=a,this.#Dn();return}i(t);return}default:return}},()=>this.#Xt()).promise}async#bt(e){let t=this.#xt(e.message);return t.question=t=>renderAcknowledgeQuestion({message:``,lines:e.lines},this.#i,t),this.#Dn(),await this.#wt((e,t)=>{switch(e.type){case`enter`:case`escape`:case`ctrl-c`:t();return;case`ctrl-r`:this.#Dn();return;default:return}}).promise}#xt(e){this.#Lt(),this.#U=!1,this.#X={kind:`idle`},this.#Q=``;let t=this.#St();return t.questionTitle=stripTerminalControls(e),t.status!==void 0&&(t.status=void 0,t.summary=void 0,t.preview=void 0),t}#St(){return this.#Ve===void 0&&(this.#Ve={title:``,indicator:{kind:`spinner`},lines:[],outputBuffer:[],implicit:!0}),this.#Ve}#Ct(){this.#Ve?.implicit===!0?this.#Ve=void 0:this.#Ve!==void 0&&(this.#Ve.question=void 0,this.#Ve.questionTitle=void 0,this.#Ve.hideLinesWhileQuestion=!1),this.#ge=void 0,this.#Vt(),this.#k===void 0?this.#Ve!==void 0&&this.#Et():this.#at(),this.#Ve===void 0&&this.#Dn()}#wt(e,t){let n=!1,r,i,a=new Promise((e,t)=>{r=e,i=t}),settle=e=>{n||(n=!0,t?.(),this.#Ct(),r(e))},reject=e=>{n||(n=!0,t?.(),this.#Ct(),i(e))};return this.#Kt(),this.#ge=t=>{t.type===`ctrl-c`&&this.#Nt(),e(t,settle,reject)},this.#Bt(),{promise:a,settle}}#Tt(e){let t,n=new Promise(e=>{t=e});return this.#tt=t,this.#Et(e?.interruptible??!0),{promise:n,dispose:()=>{this.#tt===t&&(this.#tt=void 0,this.#Dt())}}}#Et(e=!0){if(this.#k!==void 0){this.#at();return}if(this.#tt===void 0)return;let consumer=t=>{if(e&&(t.type===`ctrl-c`||t.type===`escape`)){t.type===`ctrl-c`&&this.#Nt();let e=this.#tt;this.#tt=void 0,this.#Dt(),e?.(t.type===`ctrl-c`?`ctrl-c`:`escape`);return}t.type===`ctrl-r`&&this.#Dn()};this.#nt=consumer,this.#Kt(),this.#ge=consumer,this.#Bt()}#Dt(){this.#nt!==void 0&&(this.#ge===this.#nt&&this.#Vt(),this.#nt=void 0)}#Ot(e){let t=e===void 0?void 0:typeof e==`string`?{kind:`progress`,text:stripTerminalControls(e),startedAtMs:Date.now()}:{kind:`external-action`,text:stripTerminalControls(e.text),emphasis:stripTerminalControls(e.emphasis),startedAtMs:Date.now()};if(this.#Ve!==void 0){this.#Ve.status=t,t===void 0&&(this.#Ve.preview=void 0),this.#Dn();return}if(!(this.#U||this.#Y)){if(t===void 0){this.#X={kind:`idle`},this.#$=void 0,this.#en(),this.#Dn();return}this.#Lt(),this.#$t(),this.#$=t.text,this.#Dn()}}#kt(e,t){let n=stripTerminalControls(e);if(n.trim().length===0)return;let r=this.#Ve;if(r!==void 0){if(r.preview=void 0,t===`warning`||t===`error`)for(let e of r.outputBuffer)r.lines.push({text:e,tone:`info`,evidence:!0});r.outputBuffer=[],r.lines.push({text:n,tone:t}),this.#Dn();return}this.#Lt(),this.#in({kind:`flow`,title:t,body:n,live:!1}),this.#Dn()}#At(e){let t=this.#Ve;t!==void 0&&(t.lines=[],t.outputBuffer=[],t.preview=void 0,t.status=void 0,t.summary=e===void 0?void 0:{headline:stripTerminalControls(e.headline),facts:e.facts.map(e=>({label:stripTerminalControls(e.label),value:stripTerminalControls(e.value)}))},this.#Dn())}#jt(e){let t=stripTerminalControls(e);if(t.trim().length===0)return;let n=this.#Ve;if(n===void 0){this.#kt(t,`info`);return}n.preview=t,n.outputBuffer.push(t),n.outputBuffer.length>40&&n.outputBuffer.shift(),this.#Dn()}async#Mt(e){this.#_e=``,this.#Kt(),this.#tt=void 0,this.#Dt(),this.#Vt(),this.#tn(),this.#n.clear(),this.#Yn(),this.#r.enter({cursor:`visible`,mouse:!1}),this.#e.isTTY&&this.#e.setRawMode?.(!1),this.#e.pause();try{return await e()}finally{this.#r.exit(),this.#e.isTTY&&this.#e.setRawMode?.(!0),this.#e.resume(),this.#_e=``,this.#Kt(),this.#n.hideCursor(),this.#Jn(),this.#Ve===void 0?this.#rn():(this.#Qt(),this.#Et()),this.#n.reset(),this.#Dn()}}setSessionId(e){this.#Ze=e}shutdown(){if(this.#zt(),this.#ne&&!this.#re){this.#re=!0;let e=this.#Ze===void 0?``:` ${this.#i.glyph.dot} session ${this.#Ze}`;this.#t.write(`${this.#i.colors.dim(`${eveVersionTag()}${e}`)}\n`)}}suspendPromptForInput(){this.#J={cursor:this.#V,text:this.#B},this.#zt()}requestInterrupt(){this.#ie=!0,this.#Ve!==void 0&&this.#ge?.({type:`ctrl-c`}),this.#xe?.(),this.#zt()}exitRequested(){return this.#ae}#Nt(){this.#ae=!0,this.#ce?.()}async#Pt(e){if(this.#rt!==void 0||!this.#te)return;let t=new TraceViewerSession({...e,theme:this.#i,dimensions:()=>({width:this.#Kn(),height:this.#qn()}),paint:e=>this.#r.paint(e,this.#qn()),tracingDisabled:process.env.EVE_TRACES===`off`,copyText:e=>copyTextToClipboard(e,e=>this.#r.writeRaw(e)),terminalBackground:this.#it});this.#rt=t,this.#r.enter(),this.#i.color&&this.#r.writeRaw(BACKGROUND_COLOR_QUERY),await new Promise(e=>{this.#It=e,this.#ge=e=>{t.handleKey(e)===`close`&&this.#Ft()},this.#Bt(),t.start()})}#Ft(){let e=this.#rt;if(e===void 0)return;this.#rt=void 0,e.dispose(),this.#Vt(),this.#r.exit(),this.#n.hideCursor(),this.#Dn(),this.#n.showCursor();let t=this.#It;this.#It=void 0,t?.()}#It;#Lt(e){this.#ee=e?.title??this.#ee,e?.contextSize!==void 0&&(this.#Ee=e.contextSize),!this.#te&&(this.#te=!0,this.#ne=!0,this.#n.reset(),this.#n.hideCursor(),this.#Jn(),this.#e.isTTY&&(this.#e.setRawMode?.(!0),this.#e.resume(),this.#n.emitBracketedPaste(!0)),this.#be=()=>this.#Dn(),this.#t.on(`resize`,this.#be),process.on(`exit`,this.#Rt))}#Rt=()=>{this.#te&&(this.#r.exit(),this.#e.isTTY&&(this.#n.emitBracketedPaste(!1),this.#e.setRawMode?.(!1)),this.#n.showCursor())};#zt(){this.#Ft();let e=this.#Z;if(this.#Z=void 0,e?.(interruptedError()),this.#Vt(),this.#Xt(),this.#tn(),this.#me!==void 0&&(clearTimeout(this.#me),this.#me=void 0),this.#he=!1,this.#rr(),this.#te){this.#ar();for(let e of this.#h)e.kind===`log`&&e.id===void 0&&(e.live=!1);this.#Dn(),this.#n.clear(),this.#n.showCursor(),this.#Yn(),this.#n.newline(),this.#e.isTTY&&(this.#n.emitBracketedPaste(!1),this.#e.setRawMode?.(!1),this.#e.pause()),this.#be&&=(this.#t.off(`resize`,this.#be),void 0),process.off(`exit`,this.#Rt),this.#te=!1}}#Bt(){this.#e.off(`data`,this.#Ht),this.#e.on(`data`,this.#Ht),this.#_e.length>0&&queueMicrotask(()=>{this.#ge!==void 0&&this.#_e.length>0&&(this.#Wt(),this.#Ut())})}#Vt(){this.#e.off(`data`,this.#Ht),this.#Kt(),this.#ge=void 0}#Ht=e=>{this.#Kt(),this.#_e+=this.#ve.write(e),this.#Wt(),this.#Ut()};#Ut(){if(this.#_e===`\x1B`){this.#ye=setTimeout(()=>{this.#_e===`\x1B`&&(this.#_e=``,this.#ge?.({type:`escape`}))},30),this.#ye.unref?.();return}if(isIncompletePaste(this.#_e)){let e=this.#_e;this.#ye=setTimeout(()=>{if(this.#_e!==e)return;let t=sanitizePastedText(stripPasteStart(e));this.#_e=``,t.length>0&&this.#ge?.({type:`text`,value:t,framing:`bracketed-paste`})},incompletePasteFlushMs),this.#ye.unref?.();return}if(isIncompleteOsc(this.#_e)){let e=this.#_e;this.#ye=setTimeout(()=>{this.#_e===e&&(this.#_e=``)},incompletePasteFlushMs),this.#ye.unref?.()}}#Wt(){for(;this.#_e.length>0;){let e=nextKey(this.#_e);if(e.incomplete)return;if(this.#_e=this.#_e.slice(e.consumed),e.key!==void 0&&e.key.type!==`ignore`){if(e.key.type===`osc`){this.#Gt(e.key.value);continue}this.#ge?.(e.key)}}}#Gt(e){let t=parseBackgroundColorReply(e);t!==void 0&&(this.#it=t,this.#rt?.setTerminalBackground(t))}#Kt(){this.#ye&&=(clearTimeout(this.#ye),void 0)}#qt(e){switch(e.type){case`ctrl-l`:case`ctrl-r`:this.#Dn();break;case`enter`:{let e=this.#J.text;if(e.trim().length===0)break;if(parsePromptCommand(e)?.type===`cancel`&&this.#Je!==void 0){this.#J=EMPTY_LINE,this.#qe.requestCancellation(),this.#$e=!0,this.renderCommandInvocation(e.trim()),this.renderCommandResult(`Turn cancellation requested.`),this.#Je(),this.#Dn();break}let t=this.#Ye;t!==void 0&&parsePromptCommand(e)===null?(this.#J=EMPTY_LINE,this.#Jt(e,t)):this.#qe.enqueue(e)&&(this.#J=EMPTY_LINE),this.#Dn();break}case`ctrl-c`:case`escape`:if(e.type===`ctrl-c`&&this.#qe.view().cancelling){this.#ie=!0,this.#se=!0,this.#X={kind:`idle`},this.#Q=`Interrupted`,this.#xe?.(),this.#Dn();break}if(this.#qe.idle&&this.#Je===void 0)break;if(this.#qe.handleEscape()===`steer`){let e=this.#Ye;if(e!==void 0){let t=this.#qe.takeSteering();this.#Jt(t,e)}}else this.#$e=!0,this.#Je?.();this.#Dn();break;default:{let t=applyLineEditorKey(this.#J,e,{multiline:!0});t!==void 0&&(this.#J=t,this.#Dn());break}}}#Jt(e,t){this.#Qe=`steer`,this.#sn(e),t(e).catch(t=>{this.#qe.restoreSteering(e),this.#cn(`Steering failed`,toErrorMessage(t)),this.#Dn()})}#Yt(){this.#Xt(),this.#Zt(),this.#fe=setInterval(()=>{this.#le=!this.#le,this.#Dn()},500),this.#fe.unref?.()}#Xt(){this.#fe&&=(clearInterval(this.#fe),void 0),this.#le=!0}#Zt(){this.#le=!0}#Qt(){this.#tn(),this.#pe=setInterval(()=>{this.#ue+=1,this.#Dn()},90),this.#pe.unref?.()}#$t(){let e=Date.now();this.#de=e,this.#X={kind:`waiting`,startedAtMs:e},this.#Qt()}#en(){this.#nn()||this.#tn()}#tn(){this.#pe&&=(clearInterval(this.#pe),void 0)}#nn(){return this.#h.some(e=>e.live&&e.subagentCallId!==void 0&&(this.#C.has(e.subagentCallId)||this.#w.has(e.subagentCallId)))}#rn(){this.#nn()?this.#Qt():!this.#Y&&this.#X.kind===`idle`&&this.#tn()}#in(e){e.id!==this.#Pe?.id&&this.#ar(),e.updateSeq=++this.#x;let t=e.subagentCallId!==void 0&&this.#C.has(e.subagentCallId)?-1:this.#h.findIndex(e=>e.subagentCallId!==void 0&&this.#C.has(e.subagentCallId));t<0?this.#h.push(e):this.#h.splice(t,0,e),e.id&&this.#g.set(e.id,e)}#an(e){this.#K=!0,this.#in({kind:`user`,body:stripTerminalControls(e),live:!1}),this.#Dn()}#on(){let e=this.#q.settle();if(e===void 0||e.elapsedMs<=1e4&&e.inputTokens<=2e4)return;let t=`Done in ${this.#zn(e.elapsedMs)}`,n=this.#Te??0;if(this.#Ee!==void 0&&this.#Ee>0&&n>0){let e=Math.round(n/this.#Ee*100);t+=` ${this.#i.glyph.dot} ${e}% context`}this.#in({kind:`turn-stats`,body:t,live:!1})}#sn(e){if(e==null)return;let t=this.#Qe;if(this.#Qe=void 0,this.#ze===e){this.#ze=void 0;return}let n={kind:`user`,body:stripTerminalControls(e),live:!1};t!==void 0&&(n.promptOrigin=t),this.#in(n)}#cn(e,t,n={}){let r=stripTerminalControls(e),i=stripTerminalControls(t),a=n.detail===void 0?void 0:stripTerminalControls(n.detail),o=n.hint===void 0?void 0:stripTerminalControls(n.hint),s={source:`workflow`,summary:`${r}: ${i}`,detail:a??i};this.#f?.append(o===void 0?s:{...s,hint:o});let c={kind:`error`,title:r,body:i,live:!1};o!==void 0&&(c.hint=o),a!==void 0&&(c.detail=this.#f===void 0?a:`details: ${this.#f.displayPath}`),this.#in(c),this.#Dn()}#ln(e,t){if(this.#E.has(e))return;this.#E.add(e);let n=stripTerminalControls(t),r=this.#S.get(n)??[];if(r.push(e),this.#S.set(n,r),r.length===2){let e=this.#g.get(subagentHeaderId(r[0]));e!==void 0&&(e.subtitle=`#1`)}let i={id:subagentHeaderId(e),kind:`subagent`,subagentCallId:e,title:n,live:!0};r.length>1&&(i.subtitle=`#${r.length}`),this.#in(i)}#un(e){if(e.id&&this.#_.has(e.id))return;let t=e.id?this.#g.get(e.id):void 0;if(t){Object.assign(t,e),t.updateSeq=++this.#x;return}this.#in(e)}#dn(e){if(e.id&&this.#_.has(e.id))return;let t=e.id?this.#g.get(e.id):void 0;if(t!==void 0){Object.assign(t,e),t.updateSeq=++this.#x;return}let n=e.subagentCallId;if(n===void 0){this.#in(e);return}e.id!==this.#Pe?.id&&this.#ar(),e.updateSeq=++this.#x;let r=-1;for(let e=0;e<this.#h.length;e+=1)this.#h[e]?.subagentCallId===n&&(r=e);this.#h.splice(r<0?this.#h.length:r+1,0,e),e.id!==void 0&&this.#g.set(e.id,e)}#fn(e){this.#h=this.#h.filter(t=>t.id!==e),this.#g.delete(e)}#pn(e){let t=this.#h.filter(t=>t.subagentCallId===e);t.length!==0&&(this.#h=this.#h.filter(t=>t.subagentCallId!==e),this.#h.push(...t))}#mn(){for(let e of this.#h)e.subagentCallId!==void 0&&this.#w.has(e.subagentCallId)||e.status===`approval`||e.status===`running`||e.kind===`connection-auth`&&e.live||(e.live=!1)}#hn(e,t,n){switch(e.type){case`turn-start`:e.turnId!==this.#We&&(this.#We=e.turnId,this.#Ue=void 0,this.#Dn());break;case`step-start`:this.#Ue=typeof e.modelId==`string`&&stripTerminalControls(e.modelId.slice(0,256)).replace(/\s+/gu,` `).trim()||void 0,this.#Dn();break;case`step-finish`:this.#f?.recordStepUsage(e.usage),e.usage!==void 0&&this.#q.addUsage(e.usage),this.#Sn(n),this.#En(e.usage),this.#Dn();break;case`assistant-delta`:{let t=(n.text.get(e.id)??``)+stripTerminalControls(e.delta);n.text.set(e.id,t),this.#gn(e.id,t,!0);break}case`assistant-complete`:{let t=n.text.get(e.id)??``,r=typeof e.text==`string`?stripTerminalControls(e.text):t;n.text.set(e.id,r),this.#gn(e.id,r,!1);break}case`reasoning-delta`:{if(t.reasoning===`hidden`)break;let r=(n.reasoning.get(e.id)??``)+stripTerminalControls(e.delta);if(n.reasoning.set(e.id,r),t.reasoning===`full`){this.#_n(e.id,r,!0,t);break}break}case`reasoning-complete`:{if(t.reasoning===`hidden`)break;let r=n.reasoning.get(e.id)??``;if(t.reasoning===`full`){this.#_n(e.id,r,!1,t);break}break}case`tool-call-preparing`:if(t.tools===`hidden`||isPanelRoutedTool(e.toolName))break;this.#vn({input:void 0,preparing:!0,status:`running`,toolCallId:e.toolCallId,toolName:e.toolName},t,n);break;case`tool-call`:if(this.#f?.recordToolCall(e.toolName),t.tools===`hidden`)break;this.#vn({input:e.input,status:`running`,toolCallId:e.toolCallId,toolName:e.toolName},t,n);break;case`tool-approval-request`:{if(t.tools===`hidden`)break;let r=n.tools.get(e.toolCallId);if(r===void 0)break;this.#vn({...r,status:`approval`},t,n);break}case`tool-result`:{if(t.tools===`hidden`)break;let r=this.#Tn(e.toolCallId,n);if(r===void 0)break;this.#vn({...r,output:e.output,status:`done`},t,n);break}case`tool-error`:{let r=this.#Tn(e.toolCallId,n);if(this.#f?.append({source:`tool`,summary:`${r?.toolName??e.toolCallId} failed`,detail:e.errorText}),t.tools===`hidden`||r===void 0)break;this.#vn({...r,errorText:e.errorText,status:`error`},t,n);break}case`tool-rejected`:{if(t.tools===`hidden`)break;let r=this.#Tn(e.toolCallId,n);if(r===void 0)break;this.#vn({...r,errorText:e.reason,status:`denied`},t,n);break}case`error`:this.#cn(`Error`,e.errorText,{detail:e.detail,hint:e.hint});break;case`turn-cancelled`:if(n.cancelled=!0,!n.restoreCancelledPrompt)break;this.#Xe=!0,!this.#$e&&this.#et!==void 0&&this.#J.text.length===0&&(this.#J=lineOf(this.#et),this.renderNotice(`The turn was cancelled from outside this prompt — the message was restored to the input.`));break;case`finish`:this.#En(e.usage),this.#Dn()}}#gn(e,t,n){let r=stripTerminalControls(t).trim();r.length!==0&&(this.#un({id:e,kind:`assistant`,body:r,live:n}),this.#Dn())}#_n(e,t,n,r){let i=stripTerminalControls(t).trim();i.length!==0&&(this.#un({id:e,kind:`reasoning`,body:i,collapsed:collapseReasoning(r.reasoning,n),live:n}),this.#Dn())}#vn(e,t,n){if(n.tools.set(e.toolCallId,e),this.#y.has(e.toolCallId)||this.#Cn(e)||toolBaseName(e.toolName)===`ask_question`)return;let r=toolSectionId(e.toolCallId);this.#b.set(e.toolCallId,r);let i=this.#yn(e);this.#un(renderNativeToolBlock(e,r,t.tools===`full`,i)),this.#wn(n),this.#Dn()}#yn(e){e.output!==void 0&&this.#T.observeRead(e.output);let t={};this.#bn(e.toolName)&&(t.isSubagent=!0);let n=readWriteFileInput(e.toolName,e.input);if(n===void 0)return t.isSubagent===!0?t:void 0;let r=this.#T.observeWrite({path:n.path,content:n.content,callId:e.toolCallId});r!==void 0&&(t.previousContent=r);let i=writeExistedFlag(e.output);return i!==void 0&&(t.existed=i),t}#bn(e){let t=this.#D?.info?.subagents.local;if(t===void 0||t.length===0)return!1;let n=toolBaseName(e);return t.some(e=>e.name===n)}#xn(e){for(let t of e.tools.keys()){if(this.#y.has(t))continue;let e=this.#b.get(t)??toolSectionId(t),n=this.#g.get(e);n?.kind===`tool`&&n.status===`running`&&(n.status=`error`,n.result=`interrupted`,n.live=!1)}}#Sn(e){for(let[t,n]of e.tools){if(n.preparing!==!0)continue;e.tools.delete(t);let r=this.#b.get(t)??toolSectionId(t);this.#fn(r),this.#b.delete(t)}}#Cn(e){let t=readTodoToolItems(e.toolName,e.input);if(t===void 0)return!1;if(t.length>0&&allTodoItemsSettled(t)){let e=JSON.stringify(t);this.#Ke!==e&&(this.#Ke=e,this.#in({kind:`todo-list`,body:renderFinishedTodoRows(t,this.#Kn(),this.#i).join(`
|
|
7
|
-
`),live:!1})),this.#Ge=void 0}else this.#Ge=t.length>0?t:void 0,this.#Ke=void 0;return this.#Dn(),!0}#wn(e){let t=[];for(let n of e.tools.values()){if(this.#y.has(n.toolCallId))continue;let e=this.#b.get(n.toolCallId)??toolSectionId(n.toolCallId),r=this.#g.get(e);r?.kind===`tool`&&t.push({block:r,active:isActiveToolStatus(n.status)})}applyCohortLiveness(t)}#Tn(e,t){let n=t.tools.get(e);if(n!==void 0)return n;let r=this.#b.get(e)??toolSectionId(e),i=this.#g.get(r);if(i!==void 0&&i.kind===`tool`)return{errorText:i.status===`error`&&typeof i.result==`string`?i.result:void 0,input:i.toolInput,output:i.toolOutput,status:i.status??`running`,toolCallId:e,toolName:i.toolName??i.title??`tool`}}#En(e){if(e===void 0)return;let{inputTokens:t,outputTokens:n}=e;if((t!=null||n!=null)&&(this.#we=(t??0)+(n??0)),this.#Te=t??this.#Te,this.#De=n??this.#De,this.#De!=null&&this.#ke!==void 0){let e=(Date.now()-this.#ke)/1e3;e>0&&(this.#Oe=this.#De/e)}}#Dn(){if(this.#te){if(this.#Se){this.#Ce=!0;return}this.#Se=!0;try{do this.#Ce=!1,this.#On();while(this.#Ce)}finally{this.#Se=!1}}}#On(){if(!this.#te)return;if(this.#rt!==void 0){this.#rt.repaint();return}let e=this.#Kn(),t=this.#Ln(e),n=this.#M===void 0?[]:this.#Mn(),r=Math.max(1,this.#qn()-n.length-t.length),i=[],a=this.#I,o=groupToolBlocksForDisplay(this.#h),s=0;for(;s<o.length&&o[s].display.live===!1;)s+=1;if(s>0){let e=new Set(o.slice(0,s).flatMap(e=>e.members));for(let t=this.#h.length-1;t>=0;--t)e.has(this.#h[t])&&this.#h.splice(t,1)}for(let t of o.slice(0,s)){for(let e of t.members)this.#v.push(e),e.id&&(this.#_.add(e.id),this.#g.delete(e.id));if(this.#sr(t.display))continue;let n=this.#Nn(t.display,e,a);a=previousBlockOf(t.display),this.#I=a,i.push(...n),this.#F.push(...n)}let c=[];for(let{display:t}of o.slice(s)){if(this.#sr(t))continue;let n=this.#Nn(t,e,a);a=previousBlockOf(t);for(let e=0;e<n.length;e+=1)c.push({block:t,row:n[e]})}let l=[...n,...clipLiveRows(c.map(e=>e.row),r,e,this.#i),...t];i.length>0?this.#n.flush(i,l):this.#n.update(l)}#kn(){if(!this.#te)return;let e=this.#Kn(),t=this.#Ln(e),n=Math.max(1,this.#qn()-t.length),r=this.#I,i=[];for(let{display:t}of groupToolBlocksForDisplay(this.#h)){if(this.#sr(t))continue;let n=this.#Nn(t,e,r);r=previousBlockOf(t),i.push(...n)}let a=[...clipLiveRows(i,n,e,this.#i),...t];this.#n.clearAll(),this.#n.flush([...this.#Mn(),...this.#F],a)}logDisplayMode(){return this.#m}setLogDisplayMode(e){e!==this.#m&&(this.#m=e,e===`all`&&this.flushDelayedDevBuildErrors(),this.#jn(),this.#te&&this.#kn())}flushDelayedDevBuildErrors(){let e=this.#Ne;e!==void 0&&(this.#Ne=void 0,this.#in({kind:`log`,title:`stderr`,body:e,live:!0}),this.#Dn())}#An(){this.#he=!0,this.#me!==void 0&&clearTimeout(this.#me),this.#me=setTimeout(()=>{this.#he=!1,this.#me=void 0,this.#Dn()},5e3),this.setLogDisplayMode(nextLogDisplayMode(this.#m)),this.#Dn()}#jn(){let e=this.#Kn();this.#F.length=0;let t;for(let{display:n}of groupToolBlocksForDisplay(this.#v,{logCoalescing:`runs`})){if(this.#sr(n))continue;let r=this.#Nn(n,e,t);t=previousBlockOf(n),this.#F.push(...r)}this.#I=t}#Mn(){let e=this.#D,t=this.#M;if(e===void 0&&t===void 0)return[];let n={name:e?.name??t?.name,theme:this.#i,width:this.#Kn()};e?.info!==void 0&&(n.info=e.info)
|
|
7
|
+
`),live:!1})),this.#Ge=void 0}else this.#Ge=t.length>0?t:void 0,this.#Ke=void 0;return this.#Dn(),!0}#wn(e){let t=[];for(let n of e.tools.values()){if(this.#y.has(n.toolCallId))continue;let e=this.#b.get(n.toolCallId)??toolSectionId(n.toolCallId),r=this.#g.get(e);r?.kind===`tool`&&t.push({block:r,active:isActiveToolStatus(n.status)})}applyCohortLiveness(t)}#Tn(e,t){let n=t.tools.get(e);if(n!==void 0)return n;let r=this.#b.get(e)??toolSectionId(e),i=this.#g.get(r);if(i!==void 0&&i.kind===`tool`)return{errorText:i.status===`error`&&typeof i.result==`string`?i.result:void 0,input:i.toolInput,output:i.toolOutput,status:i.status??`running`,toolCallId:e,toolName:i.toolName??i.title??`tool`}}#En(e){if(e===void 0)return;let{inputTokens:t,outputTokens:n}=e;if((t!=null||n!=null)&&(this.#we=(t??0)+(n??0)),this.#Te=t??this.#Te,this.#De=n??this.#De,this.#De!=null&&this.#ke!==void 0){let e=(Date.now()-this.#ke)/1e3;e>0&&(this.#Oe=this.#De/e)}}#Dn(){if(this.#te){if(this.#Se){this.#Ce=!0;return}this.#Se=!0;try{do this.#Ce=!1,this.#On();while(this.#Ce)}finally{this.#Se=!1}}}#On(){if(!this.#te)return;if(this.#rt!==void 0){this.#rt.repaint();return}let e=this.#Kn(),t=this.#Ln(e),n=this.#M===void 0?[]:this.#Mn(),r=Math.max(1,this.#qn()-n.length-t.length),i=[],a=this.#I,o=groupToolBlocksForDisplay(this.#h),s=0;for(;s<o.length&&o[s].display.live===!1;)s+=1;if(s>0){let e=new Set(o.slice(0,s).flatMap(e=>e.members));for(let t=this.#h.length-1;t>=0;--t)e.has(this.#h[t])&&this.#h.splice(t,1)}for(let t of o.slice(0,s)){for(let e of t.members)this.#v.push(e),e.id&&(this.#_.add(e.id),this.#g.delete(e.id));if(this.#sr(t.display))continue;let n=this.#Nn(t.display,e,a);a=previousBlockOf(t.display),this.#I=a,i.push(...n),this.#F.push(...n)}let c=[];for(let{display:t}of o.slice(s)){if(this.#sr(t))continue;let n=this.#Nn(t,e,a);a=previousBlockOf(t);for(let e=0;e<n.length;e+=1)c.push({block:t,row:n[e]})}let l=[...n,...clipLiveRows(c.map(e=>e.row),r,e,this.#i),...t];i.length>0?this.#n.flush(i,l):this.#n.update(l)}#kn(){if(!this.#te)return;let e=this.#Kn(),t=this.#Ln(e),n=Math.max(1,this.#qn()-t.length),r=this.#I,i=[];for(let{display:t}of groupToolBlocksForDisplay(this.#h)){if(this.#sr(t))continue;let n=this.#Nn(t,e,r);r=previousBlockOf(t),i.push(...n)}let a=[...clipLiveRows(i,n,e,this.#i),...t];this.#n.clearAll(),this.#n.flush([...this.#Mn(),...this.#F],a)}logDisplayMode(){return this.#m}setLogDisplayMode(e){e!==this.#m&&(this.#m=e,e===`all`&&this.flushDelayedDevBuildErrors(),this.#jn(),this.#te&&this.#kn())}flushDelayedDevBuildErrors(){let e=this.#Ne;e!==void 0&&(this.#Ne=void 0,this.#in({kind:`log`,title:`stderr`,body:e,live:!0}),this.#Dn())}#An(){this.#he=!0,this.#me!==void 0&&clearTimeout(this.#me),this.#me=setTimeout(()=>{this.#he=!1,this.#me=void 0,this.#Dn()},5e3),this.setLogDisplayMode(nextLogDisplayMode(this.#m)),this.#Dn()}#jn(){let e=this.#Kn();this.#F.length=0;let t;for(let{display:n}of groupToolBlocksForDisplay(this.#v,{logCoalescing:`runs`})){if(this.#sr(n))continue;let r=this.#Nn(n,e,t);t=previousBlockOf(n),this.#F.push(...r)}this.#I=t}#Mn(){let e=this.#D,t=this.#M;if(e===void 0&&t===void 0)return[];let n={name:e?.name??t?.name,theme:this.#i,width:this.#Kn()};return e?.info!==void 0&&(n.info=e.info),buildAgentHeader(n)}#Nn(e,t,n){let r={renderMarkdown:this.#a,activityPulse:this.#Fn(this.#de,this.#i.unicode?PROGRESS_PULSE_GLYPH:PROGRESS_PULSE_ASCII_GLYPH)};n!==void 0&&(r.previous=n);let i=renderBlockLines(e,t,this.#i,r);return(e.depth??0)===0&&leadsWithGap(e,n)?[``,...i]:i}#Pn(){return this.#i.spinner[this.#ue%this.#i.spinner.length]??``}#Fn(e,t){return isProgressPulseVisible(Date.now()-e)?t:` `}#In(e,t){return e.indicator.kind===`spinner`?{glyph:this.#Pn(),color:`yellow`}:{glyph:this.#Fn(e.indicator.startedAtMs,this.#i.unicode?PROGRESS_PULSE_GLYPH:PROGRESS_PULSE_ASCII_GLYPH),color:t?.kind===`external-action`?`yellow`:`green`}}#Ln(e){let t=this.#i.colors,n=[``];if(this.#Be!==void 0)return n.push(...this.#Be(e),``),this.#Un(n,e),n;let r=this.#Ve;if(r!==void 0&&(this.#k===void 0||r.question!==void 0)){let t=this.#In(r,r.status),i;if(r.status!==void 0){let{startedAtMs:e,...n}=r.status,a=Date.now()-e,o=a>=5e3?` ${formatTurnDuration(a)}`:``;i={...n,text:`${n.text}${o}`,indicator:t}}let a;if(r.question!==void 0){let t=r.question(e);a={kind:`question`,title:r.questionTitle,rows:t},i!==void 0&&(a={kind:`question`,title:r.questionTitle,rows:t,status:i})}else i===void 0?a=r.preview===void 0?{kind:`idle`,indicator:t}:{kind:`preview`,text:r.preview,indicator:t}:(a={kind:`status`,status:i},r.preview!==void 0&&(a={kind:`status`,status:i,preview:r.preview}));let o={title:r.title,navigation:r.navigation,lines:r.summary===void 0?r.hideLinesWhileQuestion===!0?[]:r.lines:[{text:r.summary.headline,tone:`success`},...r.summary.facts.map(e=>({text:`${e.label}: ${e.value}`,tone:`info`}))],content:a};return n.push(...renderFlowPanel(o,this.#i,e)),this.#Wn(n,e),n}r!==void 0&&n.push(...flowMessageRows(r.lines,this.#i).map(t=>t.length===0?``:clip(` ${t}`,e))),this.#O===void 0&&this.#He!==void 0&&n.push(...renderAttentionRows(this.#He,e,this.#i),``),this.#Ge!==void 0&&n.push(...renderTodoPanelRows({items:this.#Ge,width:e,theme:this.#i,working:this.#Y||this.#X.kind===`waiting`,pulse:this.#Fn(this.#de,this.#i.unicode?PROGRESS_PULSE_GLYPH:PROGRESS_PULSE_ASCII_GLYPH)}),``);let i=renderMessageQueueRows({view:this.#qe.view(),width:e,theme:this.#i,working:this.#Y});if(i.length>0&&n.push(...i,``),this.#U){let r=this.#W===void 0?void 0:inlineCommandHint(this.#W);r===void 0&&this.#W!==void 0&&isTypeaheadOpen(this.#W)&&n.push(...renderCommandSuggestions(this.#W,this.#i,e)),this.#oe&&n.push(clip(t.dim(`Press Ctrl+C again to exit`),e),``);let i=isPromptControlCommand(this.#B),a=r?t.dim(` ${r}`):``,o=[];this.#Un(o,e);let s=Math.max(1,this.#qn()-1-n.length-1-o.length),c={text:this.#B,cursor:this.#V,width:e,theme:this.#i,caretVisible:this.#le,isCommand:i,ghost:a,maxRows:s};return this.#G&&this.#B.length===0&&(c.placeholder=this.#k===void 0?this.#K?``:`Send a message…`:`Message · Enter to queue`),n.push(...promptInputRows(c)),n.push(...o),n}let a=this.#X.kind===`waiting`&&this.#$===void 0;if(this.#Y||a){n.push(this.#Rn(e)),this.#Vn(n,e);let t=[];return this.#Un(t,e),!this.#Y&&t.length>0&&n.push(``),n.push(...t),n}if(this.#J.text.length>0)return this.#Hn(n,e,{inert:!1}),this.#Un(n,e),n;let o=this.#$??(this.#Q.length>0?this.#Q:`Ready`),s=this.#Gn(),c=t.dim(this.#i.glyph.dot),l=s?`${c} ${o} ${t.dim(this.#i.glyph.dot)} ${s}`:`${c} ${o}`;return n.push(clip(l,e)),this.#Un(n,e),n}#Rn(e){let t=this.#i.colors,n=this.#Fn(this.#de,this.#i.unicode?PROGRESS_PULSE_GLYPH:PROGRESS_PULSE_ASCII_GLYPH),r=this.#X,i=this.#q.startedAtMs??this.#ke??(r.kind===`waiting`?r.startedAtMs:Date.now()),a=Date.now()-i,o=`${typewriterText(`Working for`,a,80)} ${this.#zn(a)}`;return clip(`${t.yellow(n)} ${t.dim(o)}`,e)}#zn(e){return`${formatTurnDuration(e)}${this.#Bn()}`}#Bn(){let{inputTokens:e,outputTokens:t}=this.#q.usage;return e===0&&t===0?``:` ${this.#i.glyph.dash.repeat(2)} ${formatTokenFlow({inputTokens:e,outputTokens:t},this.#i.glyph)}`}#Vn(e,t){this.#Y&&this.#Hn(e,t,{inert:!0})}#Hn(e,t,n){e.push(``);let r={text:this.#J.text,cursor:this.#J.cursor,width:t,theme:this.#i,caretVisible:!0,isCommand:!1,ghost:``,maxRows:4,inert:n.inert};n.inert&&this.#J.text.length===0&&(r.placeholder=``),e.push(...promptInputRows(r))}#Un(e,t){if(this.#O!==void 0){let n=this.#Ve?.status?.text??{starting:`Starting agent…`,connecting:`Reading saved connection…`,updating:`Loading selected model…`}[this.#O],r=this.#Fn(this.#j,this.#i.unicode?PROGRESS_PULSE_GLYPH:PROGRESS_PULSE_ASCII_GLYPH);e.push(clip(this.#i.colors.dim(`${r} ${n}`),t));return}let n=this.#z===void 0?``:` `,r=Math.max(1,t-n.length),i={theme:this.#i,width:r};this.#Ie&&this.#Fe!==void 0&&(i.devBuild=this.#Fe),this.#he&&(i.logLevel=this.#m);let a=this.#D?.info?.agent.model;a?.routing.kind===`dynamic`?i.model=this.#Ue===void 0?`dynamic model`:`dynamic model · ${this.#Ue}`:a?.id!==void 0&&(i.model=a.id),a?.reasoning!==void 0&&a.reasoning!==`provider-default`&&(i.reasoning=a.reasoning),readGatewayServiceTier(a?.providerOptions).kind===`priority`&&(i.fastMode=!0);let o=a?.endpoint;o!==void 0&&(i.endpoint=o),this.#R!==void 0&&(i.vercel=this.#R),this.#z!==void 0&&(i.remote=this.#z);let s=buildStatusLine(i);s!==void 0&&e.push(clip(`${n}${s}`,t))}#Wn(e,t){if(this.#z===void 0)return;let n=Math.max(1,t-2),r=buildStatusLine({remote:this.#z,theme:this.#i,width:n});r!==void 0&&e.push(``,clip(` ${r}`,t))}#Gn(){let e=this.#i.colors,t=[],n=formatAssistantResponseStats({totalTokens:this.#we,outputTokens:this.#De,tokensPerSecond:this.#Oe},this.#u);return n&&t.push(n),t.length>0?e.dim(t.join(` ${this.#i.glyph.dot} `)):``}#Kn(){return Math.max(20,this.#t.columns||80)}#qn(){return Math.max(8,this.#t.rows||24)}#Jn(){if(this.#Ae!==void 0||!this.#d)return;this.#je=``,this.#Me=``;let capture=(e,t)=>{let n=e.write.bind(e);return e.write=((e,n,r)=>{let i=typeof n==`string`?n:void 0,a=typeof n==`function`?n:r;return this.#Zn(t,chunkToString(e,i)),a?.(),!0}),()=>{e.write=n}},e=capture(process.stdout,`stdout`),t=capture(process.stderr,`stderr`);this.#f?.subscribeLogRecords(e=>this.#Xn(e)),this.#Ae=()=>{this.#f?.unsubscribeLogRecords(),e(),t()}}#Yn(){let e=this.#Ae;e!==void 0&&(this.#Ae=void 0,e(),this.#je.length>0&&(this.#f?.append({source:`stdout`,detail:this.#je}),this.#or(`stdout`)&&process.stdout.write(`${this.#je}\n`),this.#je=``),this.#Me.length>0&&(this.#f?.append({source:`stderr`,detail:this.#Me}),this.#or(`stderr`)&&process.stderr.write(`${this.#Me}\n`),this.#Me=``))}#Xn(e){let t=e.fields===void 0?``:` ${JSON.stringify(e.fields)}`;this.#$n(`[eve:${e.namespace}] ${e.message}${t}`),this.#Dn()}#Zn(e,t){let n=(e===`stdout`?this.#je:this.#Me)+t;if(e===`stdout`&&parseDevRebuildLogLine(n.trimEnd())!==void 0){this.#je=``,this.#f?.append({source:e,detail:n.trimEnd()}),this.#Qn(n.trimEnd()),this.#Dn();return}let r=n.lastIndexOf(`
|
|
8
8
|
`),i=r===-1?n:n.slice(r+1);if(e===`stdout`?this.#je=i:this.#Me=i,r===-1)return;let a=stripAnsi(n.slice(0,r)).replace(/\s+$/u,``);a.trim().length!==0&&(this.#f?.append({source:e,detail:a}),e===`stdout`?this.#Qn(a):this.#$n(a),this.#Dn())}#Qn(e){let t=[],flushPending=()=>{if(t.length===0)return;let e=t.join(`
|
|
9
9
|
`);t=[],e.trim().length!==0&&this.#in({kind:`log`,title:`stdout`,body:e,live:!0})};for(let n of e.split(`
|
|
10
10
|
`)){let e=parseSandboxLogLine(n.trimEnd());if(e!==void 0){flushPending(),this.#in({kind:`sandbox`,body:e,live:!1});continue}let r=parseDevRebuildLogLine(n.trimEnd());if(r===void 0){t.push(n);continue}flushPending(),this.#tr(r,n.trimEnd())}flushPending()}#$n(e){let t=e.split(`
|
|
@@ -28,7 +28,6 @@ export interface RunDevelopmentTuiInput extends TuiDisplayOptions {
|
|
|
28
28
|
}
|
|
29
29
|
export interface DevelopmentTuiStartup {
|
|
30
30
|
readonly diagnostics: DevDiagnostics | undefined;
|
|
31
|
-
readonly headerTip: string;
|
|
32
31
|
readonly renderer: TerminalRenderer;
|
|
33
32
|
finish(): {
|
|
34
33
|
draft: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{remoteHost}from"./target.js";import{createDevDiagnostics}from"../diagnostics.js";import{promptCommandsFor}from"./prompt-commands.js";import{
|
|
1
|
+
import{remoteHost}from"./target.js";import{createDevDiagnostics}from"../diagnostics.js";import{promptCommandsFor}from"./prompt-commands.js";import{probeMcpConnection}from"./mcp-connection-status.js";import{createPromptCommandHandler}from"./prompt-command-handler.js";import{formatRemoteAuthChallengeMessage}from"./remote-auth-result.js";import{TerminalRenderer}from"./terminal-renderer.js";import{EveTUIRunner}from"./runner.js";import{Client}from"#client/index.js";import{resolveInstalledPackageInfo}from"#internal/application/package.js";import{toErrorMessage}from"#shared/errors.js";import{resolveDevelopmentOidcToken,resolveLinkedDevelopmentOidcToken}from"#services/dev-client/request-headers.js";import{isVercelAuthChallenge}from"#services/dev-client/vercel-auth-error.js";import{resolveVercelDeployment}from"#setup/vercel-deployment.js";import{appendUserAgentProduct}from"#internal/user-agent.js";import{resolveLocalDevelopmentClientOptions,resolveRemoteDevelopmentClientOptions}from"#services/dev-client/client-options.js";import{createDevelopmentCredentialGate}from"#services/dev-client/credential-gate.js";async function startDevelopmentTuiStartup(e){let t=await createDevDiagnostics(e.appRoot).catch(()=>void 0),n=new TerminalRenderer({...e,diagnostics:t,onExitRequest:e.onExitRequest});return n.beginStartupDraft({initialDraft:e.initialInput,title:e.name??`eve`}),{diagnostics:t,renderer:n,finish:()=>n.finishStartupDraft(),async shutdown(){n.shutdown(),await t?.close()}}}function prepareRemoteTarget(e){return{target:e,credentials:createDevelopmentCredentialGate(e.serverUrl),resolveOidcToken:resolveDevelopmentOidcToken,resolveDeployment:t=>resolveVercelDeployment({workspaceRoot:e.workspaceRoot,host:remoteHost(e),signal:t})}}function prepareDevelopmentTarget(e){return e.kind===`local`?{kind:`local`,target:e}:{kind:`remote`,target:e,remote:prepareRemoteTarget(e)}}function withTuiUserAgent(e){let t=new Headers(e);return appendUserAgentProduct(t,`eve-tui/${resolveInstalledPackageInfo().version}`),Object.fromEntries(t.entries())}async function runDevelopmentTui(e){let{target:t,headers:n,initialInput:r,onboard:i,onOnboardingStep:a,onOnboardingTerminal:o,onBootProgress:s,lifecycle:c,startup:l,withExclusiveTerminal:u,...d}=e,f=prepareDevelopmentTarget(t),{serverUrl:p}=t,m={headers:withTuiUserAgent(n)},h=new Client(f.kind===`local`?resolveLocalDevelopmentClientOptions({...m,interactiveClient:!0,serverUrl:p,token:()=>resolveLinkedDevelopmentOidcToken(f.target.workspaceRoot)}):resolveRemoteDevelopmentClientOptions({...m,serverUrl:p,credentials:f.remote.credentials})),g={...d,client:h,serverUrl:p,promptCommandHandler:createPromptCommandHandler({target:t}),availablePromptCommands:promptCommandsFor(t.kind),formatTransportError:e=>isVercelAuthChallenge(e)?formatRemoteAuthChallengeMessage(p):toErrorMessage(e)};f.kind===`local`?(g.appRoot=f.target.workspaceRoot,g.probeMcpConnection=probeMcpConnection):g.remote=f.remote,r!==void 0&&(g.initialInput=r),l!==void 0&&(g.renderer=l.renderer,g.startup=l),i!==void 0&&(g.onboard=i),a!==void 0&&(g.onOnboardingStep=a),o!==void 0&&(g.onOnboardingTerminal=o),s!==void 0&&(g.onBootProgress=s),c!==void 0&&(g.lifecycle=c),u!==void 0&&(g.withExclusiveTerminal=u);let _=l?.diagnostics??(f.kind===`local`?await createDevDiagnostics(f.target.workspaceRoot).catch(()=>void 0):void 0);_!==void 0&&(g.diagnostics=_);try{await new EveTUIRunner(g).run()}finally{await _?.close()}}export{runDevelopmentTui,startDevelopmentTuiStartup};
|
package/dist/src/cli/run.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Command,CommanderError}from"#compiled/commander/index.js";import{agentCommand}from"#cli/agent-command.js";import{parseDevelopmentServerUrl}from"#cli/dev/url.js";import{waitForShutdownSignal}from"#cli/shutdown.js";import{resolveInstalledPackageInfo}from"#internal/application/package.js";import{createCliTheme,renderCliTaggedLine}from"#cli/ui/output.js";import{findEveProjectContext,resolveEveProjectContext}from"#internal/project-context.js";import{isCodingAgentLaunch}from"#cli/agent-detection.js";import{eveCliBanner}from"#cli/banner.js";import{registerBuildCommand}from"#cli/commands/build.js";import{resolveApplicationRoot}from"#internal/application/paths.js";import{findCliApplicationRoot,resolveCliApplicationProject}from"#cli/application-root.js";import{registerIntegrationCommands}from"#cli/commands/register-integration-commands.js";import{registerProjectCommands}from"#cli/commands/register-project-commands.js";import{registerRegistryCommands}from"#cli/commands/register-registry-commands.js";import{registerDevelopmentCommand}from"#cli/dev/command.js";import{resolveDevUiMode,resolveTuiDisplayOptions}from"#cli/dev/ui-options.js";import{registerAcpCommand}from"#cli/acp/command.js";import{registerRuntimeInvokeCommand}from"#cli/invoke/command.js";import{parseAgentNamesOption,parsePortOption,parseReasoningOption}from"#cli/option-parsers.js";import{registerEveTelemetryCommands}from"#cli/telemetry/command.js";import{canonicalCommand,createEveCliTelemetry}from"#cli/telemetry/index.js";async function loadPrintApplicationInfo(){return(await import(`#cli/commands/info.js`)).printApplicationInfo}async function loadRunEvalCommand(){return(await import(`#evals/cli/eval.js`)).runEvalCommand}async function loadStartProductionHost(){return(await import(`#internal/nitro/host.js`)).startProductionServer}function createCliProgram(e,t,n,r){let i=resolveInstalledPackageInfo().version,a=new Command,o=createCliTheme();a.name(`eve`).description(`Build and run an eve application.`).version(i).showHelpAfterError().exitOverride().hook(`preAction`,(t,n)=>{let{json:r}=n.opts()
|
|
1
|
+
import{Command,CommanderError}from"#compiled/commander/index.js";import{agentCommand}from"#cli/agent-command.js";import{parseDevelopmentServerUrl}from"#cli/dev/url.js";import{waitForShutdownSignal}from"#cli/shutdown.js";import{resolveInstalledPackageInfo}from"#internal/application/package.js";import{createCliTheme,renderCliTaggedLine}from"#cli/ui/output.js";import{findEveProjectContext,resolveEveProjectContext}from"#internal/project-context.js";import{isCodingAgentLaunch}from"#cli/agent-detection.js";import{eveCliBanner}from"#cli/banner.js";import{registerBuildCommand}from"#cli/commands/build.js";import{resolveApplicationRoot}from"#internal/application/paths.js";import{findCliApplicationRoot,resolveCliApplicationProject}from"#cli/application-root.js";import{registerIntegrationCommands}from"#cli/commands/register-integration-commands.js";import{registerProjectCommands}from"#cli/commands/register-project-commands.js";import{registerRegistryCommands}from"#cli/commands/register-registry-commands.js";import{registerDevelopmentCommand}from"#cli/dev/command.js";import{resolveDevUiMode,resolveTuiDisplayOptions}from"#cli/dev/ui-options.js";import{registerAcpCommand}from"#cli/acp/command.js";import{registerRuntimeInvokeCommand}from"#cli/invoke/command.js";import{parseAgentNamesOption,parsePortOption,parseReasoningOption}from"#cli/option-parsers.js";import{registerEveTelemetryCommands}from"#cli/telemetry/command.js";import{canonicalCommand,createEveCliTelemetry}from"#cli/telemetry/index.js";async function loadPrintApplicationInfo(){return(await import(`#cli/commands/info.js`)).printApplicationInfo}async function loadRunEvalCommand(){return(await import(`#evals/cli/eval.js`)).runEvalCommand}async function loadStartProductionHost(){return(await import(`#internal/nitro/host.js`)).startProductionServer}function createCliProgram(e,t,n,r){let i=resolveInstalledPackageInfo().version,a=new Command,o=createCliTheme();a.name(`eve`).description(`Build and run an eve application.`).version(i).showHelpAfterError().exitOverride().hook(`preAction`,(t,n)=>{let{json:r}=n.opts();!r&&(n.name()===`info`||n.name()===`init`&&n.parent!==a)&&e.log(eveCliBanner())}).configureOutput({writeErr:t=>{e.error(t.trimEnd())},writeOut:t=>{e.log(t.trimEnd())}}),agentCommand(a.command(`channels`).description(`Manage user-authored channels in the current project.`).command(`list`),n).description(`List user-authored channels in the current project.`).option(`--json`,`Output as JSON`).action(async t=>{let{runChannelsListCommand:r}=await import(`#cli/commands/channels.js`);await r(e,n.project,t)}),registerEveTelemetryCommands(a,e),registerIntegrationCommands({program:a,logger:e,applicationContext:n});let s=a.command(`extension`).description(`Create and build reusable eve extension packages.`);s.command(`init [target]`).description(`Create a new eve extension package.`).option(`-y, --yes`,`Accepted for compatibility; has no effect`).action(async(t,i)=>{i.yes&&e.error(`warning: --yes has no effect for eve extension init.`);let{runExtensionInitCommand:a}=await import(`#cli/commands/extension-init.js`);await a(e,n.root,t,void 0,e=>{r.trackSetupStep({flow:`extension_init`,step:e})})}),s.command(`build`).description(`Build the current package as an eve extension.`).action(async()=>{let{loadDevelopmentEnvironmentFiles:t}=await import(`#cli/dev/environment.js`);await t(n.root);let{runExtensionBuildCommand:r}=await import(`#cli/commands/extension-build.js`);await r(e,n.root)}),registerRegistryCommands({program:a,logger:e,applicationContext:n}),a.command(`init [target]`).description(`Create a new eve agent, or add one to an existing project directory.`).option(`--channel-web-nextjs`,`Add the Web Chat application (Next.js)`).option(`--agents <names>`,`Create an agents/ workspace with comma-separated agent names`,parseAgentNamesOption).option(`--model <model>`,`Set the agent model (provider/model-id)`).option(`--reasoning <effort>`,`Set reasoning (provider-default|none|minimal|low|medium|high|xhigh)`,parseReasoningOption).option(`-y, --yes`,`Accepted for compatibility; has no effect`).action(async(t,i)=>{i.yes&&e.error(`warning: --yes has no effect for eve init.`);let{runInitCommand:a}=await import(`#cli/commands/init.js`);await a(e,n.root,t,{agents:i.agents,channelWebNextjs:i.channelWebNextjs,model:i.model,reasoning:i.reasoning},void 0,e=>{r.trackSetupStep({flow:`init`,step:e})},(e,t,n)=>{r.trackSetupTerminal({flow:`init`,step:e,result:t,failureCode:n})})}),agentCommand(a.command(`set`),n).description(`Change root agent model settings.`).option(`--model <model>`,`Set the agent model (provider/model-id)`).option(`--reasoning <effort>`,`Set reasoning (provider-default|none|minimal|low|medium|high|xhigh)`,parseReasoningOption).action(async t=>{let{runSetCommand:r}=await import(`#cli/commands/set.js`);await r(e,n.root,t)}),registerProjectCommands({program:a,logger:e,applicationContext:n}),registerBuildCommand({applicationContext:n,buildHost:t.buildHost,logger:e,program:a}),agentCommand(a.command(`start`),n).description(`Start a built eve application.`).option(`--host <host>`,`Host interface to bind`).option(`--port <port>`,`Port to listen on (defaults to $PORT, then 3000)`,parsePortOption).action(async r=>{let{loadDevelopmentEnvironmentFiles:i}=await import(`#cli/dev/environment.js`);await i(n.root);let a=await(t.startProductionHost??await loadStartProductionHost())(n.root,{host:r.host,port:r.port});e.log(renderCliTaggedLine(o,{message:`server listening at ${a.url}`,tag:`start`,tone:`success`})),await waitForShutdownSignal({close:()=>a.close(),wait:()=>a.wait()})}),registerRuntimeInvokeCommand({applicationContext:n,logger:e,program:a,runtime:t}),registerAcpCommand({applicationContext:n,eveVersion:i,program:a,resolveVerifiedRemoteDevelopmentClient:t.resolveVerifiedRemoteDevelopmentClient,runAcpServer:t.runAcpServer,startHost:t.startHost}),registerDevelopmentCommand({applicationContext:n,logger:e,program:a,runtime:t,telemetry:r});let c=a.command(`logs`).description("Inspect local `eve dev` diagnostic logs (.eve/logs).");return agentCommand(c.command(`show [logid]`,{isDefault:!0}),n).description(`Print a diagnostic log (the most recent when logid is omitted).`).option(`--dump`,`Prepend the log's environment dump (.dump sibling)`).option(`--events`,`Interleave session events from the local workflow store`).action(async(t,r)=>{let{runLogsShowCommand:i}=await import(`#cli/commands/logs.js`);await i(e,n.root,t,r)}),agentCommand(c.command(`ls`),n).description(`List diagnostic logs, most recent first.`).option(`--json`,`Output as JSON`).action(async t=>{let{runLogsListCommand:r}=await import(`#cli/commands/logs.js`);await r(e,n.root,t)}),agentCommand(a.command(`traces [trace]`),n).usage(`[options] [trace]
|
|
2
2
|
eve traces ls [options]`).description("Show a local `eve dev` trace (the most recent when trace is omitted).").option(`--verbose`,`Expand every span with all attributes and events`).option(`--json`,`Output as JSON`).action(async(t,r)=>{let{runTraceShowCommand:i}=await import(`#cli/commands/trace.js`);await i(e,n.root,t,r)}).command(`ls`).description(`List local traces, most recent first.`).option(`--json`,`Output as JSON`).action(async t=>{let{runTraceListCommand:r}=await import(`#cli/commands/trace.js`);await r(e,n.root,t)}),agentCommand(a.command(`info`),n).description(`Print resolved application information.`).option(`--json`,`Output as JSON`).action(async r=>{await(t.printApplicationInfo??await loadPrintApplicationInfo())(e,n.root,r)}),agentCommand(a.command(`eval`),n,e=>e.opts().url===void 0).description(`Run evals against an eve agent.`).argument(`[evalIds...]`,`Eval ids (or directory prefixes) to run (all discovered evals when omitted)`).option(`--url <url>`,`Remote agent URL (skip local host startup)`,parseDevelopmentServerUrl).option(`--tag <tag...>`,`Run only evals carrying a tag`).option(`--exclude-tag <tag...>`,`Skip evals carrying a tag`).option(`--strict`,`Fail the exit code when any score falls below its threshold`).option(`--list`,`Print discovered evals without running them`).option(`--timeout <ms>`,`Per-eval timeout in milliseconds`).option(`--max-concurrency <n>`,`Max concurrent eval executions`).option(`--json`,`Output results as JSON`).option(`--junit <path>`,`Write JUnit XML results to a file`).option(`--skip-report`,`Skip eval-defined reporters (e.g. Braintrust)`).option(`--verbose`,`Stream per-eval logs and workflow run IDs to stdout`).action(async(r,i)=>{await(t.runEvalCommand??await loadRunEvalCommand())(r,i,e,n.root)}),a}async function runCli(e=process.argv.slice(2),t=console,n={}){let r={root:resolveApplicationRoot(),async resolve(){let e=await(n.resolveApplicationProject??resolveCliApplicationProject)(r.root);r.project=e,r.root=e.appRoot},async resolveAgent(){return resolveEveProjectContext(r.root)}},i=createEveCliTelemetry(resolveInstalledPackageInfo().version),a=createCliProgram(t,n,r,i),o=e;if(o.length===0){let e=await(n.findApplicationRoot??findCliApplicationRoot)(r.root);e===void 0?o=(await findEveProjectContext(r.root))?.kind===`workspace`?[`dev`]:[`init`]:(r.root=e,o=[`dev`])}let s=canonicalCommand(o);i.trackCommand(s),s!==`telemetry`&&await i.notify(t);try{await a.parseAsync(o,{from:`user`}),i.trackOutcome(`success`)}catch(e){if(e instanceof CommanderError&&e.exitCode===0){i.trackOutcome(`success`);return}if(i.trackOutcome(e instanceof CommanderError?`usage_error`:`error`),e instanceof CommanderError){let r=await(n.isCodingAgentLaunch??isCodingAgentLaunch)();if(o[0]===`init`&&r){let{initAgentInstructions:e}=await import(`#cli/commands/agent-instructions.js`);t.log(e())}throw Error(e.message)}throw e}finally{await i.flush()}}export{createCliProgram,resolveDevUiMode,resolveTuiDisplayOptions,runCli};
|
|
@@ -13,7 +13,10 @@ interface CliLiveRowOutput {
|
|
|
13
13
|
interface CliLiveRowOptions {
|
|
14
14
|
readonly output?: CliLiveRowOutput;
|
|
15
15
|
readonly pulseSequence?: string;
|
|
16
|
+
readonly animate?: boolean;
|
|
17
|
+
readonly elapsed?: boolean;
|
|
18
|
+
readonly logPhases?: boolean;
|
|
16
19
|
}
|
|
17
|
-
/** Starts one transient
|
|
20
|
+
/** Starts one transient row, falling back to phase logs when repainting is unavailable. */
|
|
18
21
|
export declare function startCliLiveRow(logger: CliLiveRowLogger, options?: CliLiveRowOptions): CliLiveRow;
|
|
19
22
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isLogLevelEnabled}from"#internal/logging.js";import pc from"#compiled/picocolors/index.js";import{sanitizeForTerminal}from"#cli/ui/output.js";import{sliceVisible,visibleLength}from"#cli/ui/terminal-text.js";import{LiveRegion}from"#cli/ui/live-region.js";import{PROGRESS_PULSE_DURATION_MS,PROGRESS_PULSE_GLYPH,PROGRESS_PULSE_SEQUENCE}from"#cli/ui/progress-pulse.js";function validatePulseSequence(e){if(e.length!==8&&e.length!==16)throw RangeError(`Pulse sequence must contain 8 or 16 steps.`);if(/[^01]/u.test(e))throw RangeError(`Pulse sequence steps must be "0" or "1".`)}function pulseStepDurationMs(e,t){let n=Math.round(e*PROGRESS_PULSE_DURATION_MS/t);return Math.round((e+1)*PROGRESS_PULSE_DURATION_MS/t)-n}function sanitizeProgressText(e){return sanitizeForTerminal(e).replaceAll(/\s+/gu,` `).trim()}function fitProgressText(e,t){return t<=0?``:visibleLength(e)<=t?e:t===1?`…`:`${sliceVisible(e,t-1)}…`}function renderProgressRow(e,t,n,r){let i=n!==``,a=`${e} ${t}${i?``:`...`}`,o=Math.max(0,(r??80)-1),s=visibleLength(a);if(s>=o){let t=fitProgressText(a,o);return t.startsWith(e)?`${pc.green(e)}${t.slice(e.length)}`:t}let c=i?fitProgressText(` ${n}`,o-s):``,l=c===``?``:pc.dim(c);return`${pc.green(e)}${a.slice(e.length)}${l}`}function startCliLiveRow(e,t={}){let n=t.output??process.stdout,r=t.pulseSequence??PROGRESS_PULSE_SEQUENCE;validatePulseSequence(r);let i=n.isTTY===!0&&!isLogLevelEnabled(`debug`),a=i?new LiveRegion({write:e=>(n.write(e),!0)}):void 0,o=0,s=r[0]===`1`,c,l=!1,u=!1,d=!1,
|
|
1
|
+
import{isLogLevelEnabled}from"#internal/logging.js";import pc from"#compiled/picocolors/index.js";import{sanitizeForTerminal}from"#cli/ui/output.js";import{sliceVisible,visibleLength}from"#cli/ui/terminal-text.js";import{LiveRegion}from"#cli/ui/live-region.js";import{PROGRESS_PULSE_DURATION_MS,PROGRESS_PULSE_GLYPH,PROGRESS_PULSE_SEQUENCE}from"#cli/ui/progress-pulse.js";function validatePulseSequence(e){if(e.length!==8&&e.length!==16)throw RangeError(`Pulse sequence must contain 8 or 16 steps.`);if(/[^01]/u.test(e))throw RangeError(`Pulse sequence steps must be "0" or "1".`)}function pulseStepDurationMs(e,t){let n=Math.round(e*PROGRESS_PULSE_DURATION_MS/t);return Math.round((e+1)*PROGRESS_PULSE_DURATION_MS/t)-n}function sanitizeProgressText(e){return sanitizeForTerminal(e).replaceAll(/\s+/gu,` `).trim()}function fitProgressText(e,t){return t<=0?``:visibleLength(e)<=t?e:t===1?`…`:`${sliceVisible(e,t-1)}…`}function renderProgressRow(e,t,n,r){let i=n!==``,a=`${e} ${t}${i?``:`...`}`,o=Math.max(0,(r??80)-1),s=visibleLength(a);if(s>=o){let t=fitProgressText(a,o);return t.startsWith(e)?`${pc.green(e)}${t.slice(e.length)}`:t}let c=i?fitProgressText(` ${n}`,o-s):``,l=c===``?``:pc.dim(c);return`${pc.green(e)}${a.slice(e.length)}${l}`}function startCliLiveRow(e,t={}){let n=t.output??process.stdout,r=t.pulseSequence??PROGRESS_PULSE_SEQUENCE;validatePulseSequence(r);let i=t.animate!==!1&&n.isTTY===!0&&!isLogLevelEnabled(`debug`),a=i?new LiveRegion({write:e=>(n.write(e),!0)}):void 0,o=0,s=r[0]===`1`,c,l=!1,u=!1,d,f=Date.now(),p=0,m=!1,h,paint=()=>{if(c===void 0||a===void 0)return;let e=renderProgressRow(s?PROGRESS_PULSE_GLYPH:` `,c.message,t.elapsed?[c.detail,`${p}s`].filter(Boolean).join(` · `):c.detail,n.columns);a.update([e]),l=!0},schedulePulseStep=()=>{h=setTimeout(()=>{if(m)return;o=(o+1)%r.length;let e=r[o]===`1`,n=Math.floor((Date.now()-f)/1e3);(e!==s||t.elapsed&&n!==p)&&(s=e,p=n,paint()),schedulePulseStep()},pulseStepDurationMs(o,r.length)),h.unref?.()};return{update(n,r=``){if(m)return;let a=sanitizeProgressText(n);if(c?.message!==a&&(f=Date.now(),p=0),c={detail:sanitizeProgressText(r),message:a},!i){(!u||t.logPhases&&d!==c.message)&&(e.log(`${c.message}...`),u=!0,d=c.message);return}paint(),h===void 0&&schedulePulseStep()},stop(){m||(m=!0,h!==void 0&&clearTimeout(h),a!==void 0&&l&&a.clear())}}}export{startCliLiveRow};
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"zod": "4.5.4",
|
|
56
56
|
"zod-validation-error": "5.0.0"
|
|
57
57
|
},
|
|
58
|
-
"scriptHash": "
|
|
58
|
+
"scriptHash": "6b84ed18f3330bf86e88891ca0c2dfc368dbbbc9b9f5adc6391b8430b184b21d",
|
|
59
59
|
"toolVersions": {
|
|
60
60
|
"rolldown": "1.2.8",
|
|
61
61
|
"typescript": "7.0.2"
|
|
@@ -85,12 +85,14 @@ declare const EXTENSION_CAPABILITY_CONTRACTS: {
|
|
|
85
85
|
};
|
|
86
86
|
};
|
|
87
87
|
readonly subagent: {
|
|
88
|
-
readonly current:
|
|
89
|
-
readonly supported: readonly [3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
|
|
88
|
+
readonly current: 19;
|
|
89
|
+
readonly supported: readonly [3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 19];
|
|
90
90
|
readonly dropped: {
|
|
91
91
|
readonly 1: "Persistent subagent sessions are now the default and the experimental opt-in was removed";
|
|
92
92
|
readonly 2: "Persistent subagent sessions are now the default and the experimental opt-in was removed";
|
|
93
93
|
readonly 5: "Message and reasoning append events now expose deltas instead of cumulative snapshots.";
|
|
94
|
+
readonly 17: "Removed experimental.instrumentationProviders; instrumentation is now always enabled for root agents.";
|
|
95
|
+
readonly 18: "Removed experimental.instrumentationProviders; instrumentation is now always enabled for root agents.";
|
|
94
96
|
};
|
|
95
97
|
};
|
|
96
98
|
readonly connection: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{readFile,writeFile}from"node:fs/promises";import{z}from"#compiled/zod/index.js";import{join}from"node:path";import{formatValidationError}from"#runtime/validation.js";const EXTENSION_COMPATIBILITY_MANIFEST_KIND=`eve-extension`,EXTENSION_COMPATIBILITY_MANIFEST_FORMAT_VERSION=2,EXTENSION_COMPATIBILITY_MANIFEST_FILENAME=`_manifest.json`,EXTENSION_CAPABILITY_CONTRACTS={extension:{current:1,supported:[1],dropped:{}},tool:{current:52,supported:[1,2,3,4,5,6,7,8,9,10,11,12,13,28,29,30,31,32,34,35,44,45,46,49,50,51,52],dropped:{14:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,15:`TaskExec replaces stageEffect with send`,16:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,17:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,18:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,19:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,20:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,21:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,22:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,23:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,24:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,25:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,26:`Background tools now use task yield descriptors`,27:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,33:`ctx.agent now accepts the subagent name as its first argument, derives invocation identity internally, and infers structured output types`,36:`experimental_workflow and eve/tools/workflow were removed; migrate to the workflow factory from eve/tools/workflow`,37:`experimental_workflow and eve/tools/workflow were removed; migrate to the workflow factory from eve/tools/workflow`,38:`experimental_workflow and eve/tools/workflow were removed; migrate to the workflow factory from eve/tools/workflow`,39:`experimental_workflow and eve/tools/workflow were removed; migrate to the workflow factory from eve/tools/workflow`,40:`runWorkflowProgram was made internal; use the workflow factory from eve/tools/workflow`,41:`workflow no longer accepts agents and its options argument is optional; use workflow() or workflow({ maxSubagents })`,42:`Legacy session history migration was removed; user-role messages require current provenance kinds.`,43:`Legacy session history migration was removed; user-role messages require current provenance kinds.`,47:`eve/experimental/evaluate was removed; import evaluate from eve/ai`,48:`eve/experimental/evaluate was removed; import evaluate from eve/ai`}},dynamicTool:{current:50,supported:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,22,28,29,30,31,32,33,41,48,49,50],dropped:{21:`Message and reasoning append events now expose deltas instead of cumulative snapshots.`,23:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,24:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,25:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,26:`Background tools now use task yield descriptors`,27:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,34:`Legacy session history migration was removed; user-role messages require current provenance kinds.`,35:`workflowMaxSubagents was removed with experimental_workflow; configure generated-program limits with the workflow factory`,36:`workflowMaxSubagents was removed with experimental_workflow; configure generated-program limits with the workflow factory`,37:`workflowMaxSubagents was removed with experimental_workflow; configure generated-program limits with the workflow factory`,38:`workflowMaxSubagents was removed with experimental_workflow; configure generated-program limits with the workflow factory`,39:`Legacy session history migration was removed; user-role messages require current provenance kinds.`,40:`Legacy session history migration was removed; user-role messages require current provenance kinds.`,42:`autoModel and eve/experimental/evaluate were removed; import auto from eve/models`,43:`autoModel and eve/experimental/evaluate were removed; import auto from eve/models`,44:`autoModel and eve/experimental/evaluate were removed; import auto from eve/models`,45:`autoModel and eve/experimental/evaluate were removed; import auto from eve/models`,46:`autoModel and eve/experimental/evaluate were removed; import auto from eve/models`,47:`autoModel and eve/experimental/evaluate were removed; import auto from eve/models`}},channel:{current:26,supported:[1,2,3,4,5,6,7,8,9,10,11,13,14,15,16,17,18,23,24,25,26],dropped:{12:`Message and reasoning append events now expose deltas instead of cumulative snapshots.`,19:`Continuation rekey was removed; channel extensions must use additive continuation.alias instead.`,20:`Continuation rekey was removed; channel extensions must use additive continuation.alias instead.`,21:`Continuation rekey was removed; channel extensions must use additive continuation.alias instead.`,22:`Continuation rekey was removed; channel extensions must use additive continuation.alias instead.`}},schedule:{current:14,supported:[1,2,3,4,6,7,8,9,10,11,12,13,14],dropped:{5:`Message and reasoning append events now expose deltas instead of cumulative snapshots.`}},subagent:{current:18,supported:[3,4,6,7,8,9,10,11,12,13,14,15,16,17,18],dropped:{1:`Persistent subagent sessions are now the default and the experimental opt-in was removed`,2:`Persistent subagent sessions are now the default and the experimental opt-in was removed`,5:`Message and reasoning append events now expose deltas instead of cumulative snapshots.`}},connection:{current:23,supported:[1,2,3,4,5,6,7,8,11,12,13,14,15,16,17,18,19,20,21,22,23],dropped:{9:`Dynamic connection resolvers no longer receive conversation or channel continuation data`,10:`Message and reasoning append events now expose deltas instead of cumulative snapshots.`}},hook:{current:24,supported:[10,11,12,13,14,15,17,18,19,20,21,22,23,24],dropped:{1:`Model identity moved from session.started runtime metadata to step.started call attribution.`,2:`Model identity moved from session.started runtime metadata to step.started call attribution.`,3:`Model identity moved from session.started runtime metadata to step.started call attribution.`,4:`Model identity moved from session.started runtime metadata to step.started call attribution.`,5:`Model identity moved from session.started runtime metadata to step.started call attribution.`,6:`Model identity moved from session.started runtime metadata to step.started call attribution.`,7:`Model identity moved from session.started runtime metadata to step.started call attribution.`,8:`Model identity moved from session.started runtime metadata to step.started call attribution.`,9:`Model identity moved from session.started runtime metadata to step.started call attribution.`,16:`Message and reasoning append events now expose deltas instead of cumulative snapshots.`}},skill:{current:1,supported:[1],dropped:{}},dynamicSkill:{current:21,supported:[1,2,3,4,5,6,7,8,9,10,11,12,14,15,16,17,18,19,20,21],dropped:{13:`Message and reasoning append events now expose deltas instead of cumulative snapshots.`}},instructions:{current:2,supported:[1,2],dropped:{}},dynamicInstructions:{current:22,supported:[1,2,3,4,5,6,7,8,9,10,11,12,13,15,16,17,18,19,20,21,22],dropped:{14:`Message and reasoning append events now expose deltas instead of cumulative snapshots.`}},config:{current:1,supported:[1],dropped:{}},state:{current:6,supported:[1,2,3,4,5,6],dropped:{}}},EXTENSION_CAPABILITY_VERSIONS=Object.fromEntries(Object.entries(EXTENSION_CAPABILITY_CONTRACTS).map(([e,t])=>[e,t.current])),EXTENSION_CAPABILITY_SUPPORT=Object.keys(EXTENSION_CAPABILITY_CONTRACTS).reduce((e,t)=>(e[t]=EXTENSION_CAPABILITY_CONTRACTS[t].supported,e),{}),extensionCompatibilityManifestV1Schema=z.object({kind:z.literal(EXTENSION_COMPATIBILITY_MANIFEST_KIND),formatVersion:z.literal(1),builtWithEve:z.string().min(1),requires:z.record(z.string(),z.number().int().positive())}).strict(),extensionCompatibilityManifestV2Schema=extensionCompatibilityManifestV1Schema.extend({formatVersion:z.literal(2),build:z.object({externalDependencies:z.array(z.string().min(1)).readonly()}).strict().optional()}),extensionCompatibilityManifestSchema=z.union([extensionCompatibilityManifestV1Schema,extensionCompatibilityManifestV2Schema]);function serializeExtensionCompatibilityManifest(e){return`${JSON.stringify(e,null,2)}\n`}function parseExtensionCompatibilityManifest(e,t){let n;try{n=JSON.parse(e)}catch(e){throw Error(`Extension compatibility manifest "${t}" is not valid JSON: ${e instanceof Error?e.message:String(e)}`)}let r=extensionCompatibilityManifestSchema.safeParse(n);if(!r.success)throw Error(`Extension compatibility manifest "${t}" is invalid. ${formatValidationError(r.error)}`);return r.data}async function readExtensionCompatibilityManifest(e){return parseExtensionCompatibilityManifest(await readFile(e,`utf8`),e)}async function writeExtensionCompatibilityManifest(e,t){await writeFile(join(e,EXTENSION_COMPATIBILITY_MANIFEST_FILENAME),serializeExtensionCompatibilityManifest(t),`utf8`)}function findUnsupportedExtensionCapabilities(e,t=EXTENSION_CAPABILITY_SUPPORT){return Object.entries(e.requires).flatMap(([e,n])=>{let r=Object.hasOwn(t,e)?t[e]??[]:[];return r.includes(n)?[]:[{capability:e,requiredVersion:n,supportedVersions:r}]}).sort((e,t)=>e.capability.localeCompare(t.capability))}export{EXTENSION_CAPABILITY_SUPPORT,EXTENSION_CAPABILITY_VERSIONS,EXTENSION_COMPATIBILITY_MANIFEST_FILENAME,EXTENSION_COMPATIBILITY_MANIFEST_FORMAT_VERSION,EXTENSION_COMPATIBILITY_MANIFEST_KIND,findUnsupportedExtensionCapabilities,parseExtensionCompatibilityManifest,readExtensionCompatibilityManifest,serializeExtensionCompatibilityManifest,writeExtensionCompatibilityManifest};
|
|
1
|
+
import{readFile,writeFile}from"node:fs/promises";import{z}from"#compiled/zod/index.js";import{join}from"node:path";import{formatValidationError}from"#runtime/validation.js";const EXTENSION_COMPATIBILITY_MANIFEST_KIND=`eve-extension`,EXTENSION_COMPATIBILITY_MANIFEST_FORMAT_VERSION=2,EXTENSION_COMPATIBILITY_MANIFEST_FILENAME=`_manifest.json`,EXTENSION_CAPABILITY_CONTRACTS={extension:{current:1,supported:[1],dropped:{}},tool:{current:52,supported:[1,2,3,4,5,6,7,8,9,10,11,12,13,28,29,30,31,32,34,35,44,45,46,49,50,51,52],dropped:{14:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,15:`TaskExec replaces stageEffect with send`,16:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,17:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,18:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,19:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,20:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,21:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,22:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,23:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,24:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,25:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,26:`Background tools now use task yield descriptors`,27:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,33:`ctx.agent now accepts the subagent name as its first argument, derives invocation identity internally, and infers structured output types`,36:`experimental_workflow and eve/tools/workflow were removed; migrate to the workflow factory from eve/tools/workflow`,37:`experimental_workflow and eve/tools/workflow were removed; migrate to the workflow factory from eve/tools/workflow`,38:`experimental_workflow and eve/tools/workflow were removed; migrate to the workflow factory from eve/tools/workflow`,39:`experimental_workflow and eve/tools/workflow were removed; migrate to the workflow factory from eve/tools/workflow`,40:`runWorkflowProgram was made internal; use the workflow factory from eve/tools/workflow`,41:`workflow no longer accepts agents and its options argument is optional; use workflow() or workflow({ maxSubagents })`,42:`Legacy session history migration was removed; user-role messages require current provenance kinds.`,43:`Legacy session history migration was removed; user-role messages require current provenance kinds.`,47:`eve/experimental/evaluate was removed; import evaluate from eve/ai`,48:`eve/experimental/evaluate was removed; import evaluate from eve/ai`}},dynamicTool:{current:50,supported:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,22,28,29,30,31,32,33,41,48,49,50],dropped:{21:`Message and reasoning append events now expose deltas instead of cumulative snapshots.`,23:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,24:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,25:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,26:`Background tools now use task yield descriptors`,27:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,34:`Legacy session history migration was removed; user-role messages require current provenance kinds.`,35:`workflowMaxSubagents was removed with experimental_workflow; configure generated-program limits with the workflow factory`,36:`workflowMaxSubagents was removed with experimental_workflow; configure generated-program limits with the workflow factory`,37:`workflowMaxSubagents was removed with experimental_workflow; configure generated-program limits with the workflow factory`,38:`workflowMaxSubagents was removed with experimental_workflow; configure generated-program limits with the workflow factory`,39:`Legacy session history migration was removed; user-role messages require current provenance kinds.`,40:`Legacy session history migration was removed; user-role messages require current provenance kinds.`,42:`autoModel and eve/experimental/evaluate were removed; import auto from eve/models`,43:`autoModel and eve/experimental/evaluate were removed; import auto from eve/models`,44:`autoModel and eve/experimental/evaluate were removed; import auto from eve/models`,45:`autoModel and eve/experimental/evaluate were removed; import auto from eve/models`,46:`autoModel and eve/experimental/evaluate were removed; import auto from eve/models`,47:`autoModel and eve/experimental/evaluate were removed; import auto from eve/models`}},channel:{current:26,supported:[1,2,3,4,5,6,7,8,9,10,11,13,14,15,16,17,18,23,24,25,26],dropped:{12:`Message and reasoning append events now expose deltas instead of cumulative snapshots.`,19:`Continuation rekey was removed; channel extensions must use additive continuation.alias instead.`,20:`Continuation rekey was removed; channel extensions must use additive continuation.alias instead.`,21:`Continuation rekey was removed; channel extensions must use additive continuation.alias instead.`,22:`Continuation rekey was removed; channel extensions must use additive continuation.alias instead.`}},schedule:{current:14,supported:[1,2,3,4,6,7,8,9,10,11,12,13,14],dropped:{5:`Message and reasoning append events now expose deltas instead of cumulative snapshots.`}},subagent:{current:19,supported:[3,4,6,7,8,9,10,11,12,13,14,15,16,19],dropped:{1:`Persistent subagent sessions are now the default and the experimental opt-in was removed`,2:`Persistent subagent sessions are now the default and the experimental opt-in was removed`,5:`Message and reasoning append events now expose deltas instead of cumulative snapshots.`,17:`Removed experimental.instrumentationProviders; instrumentation is now always enabled for root agents.`,18:`Removed experimental.instrumentationProviders; instrumentation is now always enabled for root agents.`}},connection:{current:23,supported:[1,2,3,4,5,6,7,8,11,12,13,14,15,16,17,18,19,20,21,22,23],dropped:{9:`Dynamic connection resolvers no longer receive conversation or channel continuation data`,10:`Message and reasoning append events now expose deltas instead of cumulative snapshots.`}},hook:{current:24,supported:[10,11,12,13,14,15,17,18,19,20,21,22,23,24],dropped:{1:`Model identity moved from session.started runtime metadata to step.started call attribution.`,2:`Model identity moved from session.started runtime metadata to step.started call attribution.`,3:`Model identity moved from session.started runtime metadata to step.started call attribution.`,4:`Model identity moved from session.started runtime metadata to step.started call attribution.`,5:`Model identity moved from session.started runtime metadata to step.started call attribution.`,6:`Model identity moved from session.started runtime metadata to step.started call attribution.`,7:`Model identity moved from session.started runtime metadata to step.started call attribution.`,8:`Model identity moved from session.started runtime metadata to step.started call attribution.`,9:`Model identity moved from session.started runtime metadata to step.started call attribution.`,16:`Message and reasoning append events now expose deltas instead of cumulative snapshots.`}},skill:{current:1,supported:[1],dropped:{}},dynamicSkill:{current:21,supported:[1,2,3,4,5,6,7,8,9,10,11,12,14,15,16,17,18,19,20,21],dropped:{13:`Message and reasoning append events now expose deltas instead of cumulative snapshots.`}},instructions:{current:2,supported:[1,2],dropped:{}},dynamicInstructions:{current:22,supported:[1,2,3,4,5,6,7,8,9,10,11,12,13,15,16,17,18,19,20,21,22],dropped:{14:`Message and reasoning append events now expose deltas instead of cumulative snapshots.`}},config:{current:1,supported:[1],dropped:{}},state:{current:6,supported:[1,2,3,4,5,6],dropped:{}}},EXTENSION_CAPABILITY_VERSIONS=Object.fromEntries(Object.entries(EXTENSION_CAPABILITY_CONTRACTS).map(([e,t])=>[e,t.current])),EXTENSION_CAPABILITY_SUPPORT=Object.keys(EXTENSION_CAPABILITY_CONTRACTS).reduce((e,t)=>(e[t]=EXTENSION_CAPABILITY_CONTRACTS[t].supported,e),{}),extensionCompatibilityManifestV1Schema=z.object({kind:z.literal(EXTENSION_COMPATIBILITY_MANIFEST_KIND),formatVersion:z.literal(1),builtWithEve:z.string().min(1),requires:z.record(z.string(),z.number().int().positive())}).strict(),extensionCompatibilityManifestV2Schema=extensionCompatibilityManifestV1Schema.extend({formatVersion:z.literal(2),build:z.object({externalDependencies:z.array(z.string().min(1)).readonly()}).strict().optional()}),extensionCompatibilityManifestSchema=z.union([extensionCompatibilityManifestV1Schema,extensionCompatibilityManifestV2Schema]);function serializeExtensionCompatibilityManifest(e){return`${JSON.stringify(e,null,2)}\n`}function parseExtensionCompatibilityManifest(e,t){let n;try{n=JSON.parse(e)}catch(e){throw Error(`Extension compatibility manifest "${t}" is not valid JSON: ${e instanceof Error?e.message:String(e)}`)}let r=extensionCompatibilityManifestSchema.safeParse(n);if(!r.success)throw Error(`Extension compatibility manifest "${t}" is invalid. ${formatValidationError(r.error)}`);return r.data}async function readExtensionCompatibilityManifest(e){return parseExtensionCompatibilityManifest(await readFile(e,`utf8`),e)}async function writeExtensionCompatibilityManifest(e,t){await writeFile(join(e,EXTENSION_COMPATIBILITY_MANIFEST_FILENAME),serializeExtensionCompatibilityManifest(t),`utf8`)}function findUnsupportedExtensionCapabilities(e,t=EXTENSION_CAPABILITY_SUPPORT){return Object.entries(e.requires).flatMap(([e,n])=>{let r=Object.hasOwn(t,e)?t[e]??[]:[];return r.includes(n)?[]:[{capability:e,requiredVersion:n,supportedVersions:r}]}).sort((e,t)=>e.capability.localeCompare(t.capability))}export{EXTENSION_CAPABILITY_SUPPORT,EXTENSION_CAPABILITY_VERSIONS,EXTENSION_COMPATIBILITY_MANIFEST_FILENAME,EXTENSION_COMPATIBILITY_MANIFEST_FORMAT_VERSION,EXTENSION_COMPATIBILITY_MANIFEST_KIND,findUnsupportedExtensionCapabilities,parseExtensionCompatibilityManifest,readExtensionCompatibilityManifest,serializeExtensionCompatibilityManifest,writeExtensionCompatibilityManifest};
|
|
@@ -422,7 +422,6 @@ declare const compiledAgentResourcesSchema: z.ZodObject<{
|
|
|
422
422
|
}>, unknown>>>;
|
|
423
423
|
skills: z.ZodReadonly<z.ZodArray<z.ZodType<CompiledSkillDefinition, unknown, z.core.$ZodTypeInternals<CompiledSkillDefinition, unknown>>>>;
|
|
424
424
|
instructions: z.ZodDefault<z.ZodReadonly<z.ZodArray<z.ZodType<CompiledInstructionsDefinition, unknown, z.core.$ZodTypeInternals<CompiledInstructionsDefinition, unknown>>>>>;
|
|
425
|
-
instrumentation: z.ZodOptional<z.ZodType<ModuleSourceRef, unknown, z.core.$ZodTypeInternals<ModuleSourceRef, unknown>>>;
|
|
426
425
|
tools: z.ZodArray<z.ZodObject<{
|
|
427
426
|
availableInSubagents: z.ZodOptional<z.ZodBoolean>;
|
|
428
427
|
behavior: z.ZodOptional<z.ZodType<CompiledToolBehavior, unknown, z.core.$ZodTypeInternals<CompiledToolBehavior, unknown>>>;
|
|
@@ -551,7 +550,6 @@ declare const compiledAgentNodeManifestSchema: z.ZodObject<{
|
|
|
551
550
|
}>, unknown>>>;
|
|
552
551
|
skills: z.ZodReadonly<z.ZodArray<z.ZodType<CompiledSkillDefinition, unknown, z.core.$ZodTypeInternals<CompiledSkillDefinition, unknown>>>>;
|
|
553
552
|
instructions: z.ZodDefault<z.ZodReadonly<z.ZodArray<z.ZodType<CompiledInstructionsDefinition, unknown, z.core.$ZodTypeInternals<CompiledInstructionsDefinition, unknown>>>>>;
|
|
554
|
-
instrumentation: z.ZodOptional<z.ZodType<ModuleSourceRef, unknown, z.core.$ZodTypeInternals<ModuleSourceRef, unknown>>>;
|
|
555
553
|
tools: z.ZodArray<z.ZodObject<{
|
|
556
554
|
availableInSubagents: z.ZodOptional<z.ZodBoolean>;
|
|
557
555
|
behavior: z.ZodOptional<z.ZodType<CompiledToolBehavior, unknown, z.core.$ZodTypeInternals<CompiledToolBehavior, unknown>>>;
|
|
@@ -713,7 +711,6 @@ export declare const compiledAgentManifestSchema: z.ZodObject<{
|
|
|
713
711
|
skills: z.ZodReadonly<z.ZodArray<z.ZodType<CompiledSkillDefinition, unknown, z.core.$ZodTypeInternals<CompiledSkillDefinition, unknown>>>>;
|
|
714
712
|
subagents: z.ZodArray<z.ZodType<CompiledSubagentNode, unknown, z.core.$ZodTypeInternals<CompiledSubagentNode, unknown>>>;
|
|
715
713
|
instructions: z.ZodDefault<z.ZodReadonly<z.ZodArray<z.ZodType<CompiledInstructionsDefinition, unknown, z.core.$ZodTypeInternals<CompiledInstructionsDefinition, unknown>>>>>;
|
|
716
|
-
instrumentation: z.ZodOptional<z.ZodType<ModuleSourceRef, unknown, z.core.$ZodTypeInternals<ModuleSourceRef, unknown>>>;
|
|
717
714
|
tools: z.ZodArray<z.ZodObject<{
|
|
718
715
|
availableInSubagents: z.ZodOptional<z.ZodBoolean>;
|
|
719
716
|
behavior: z.ZodOptional<z.ZodType<CompiledToolBehavior, unknown, z.core.$ZodTypeInternals<CompiledToolBehavior, unknown>>>;
|
|
@@ -761,7 +758,6 @@ export interface CreateCompiledAgentResourcesInput {
|
|
|
761
758
|
readonly schedules?: readonly CompiledScheduleDefinition[];
|
|
762
759
|
readonly skills?: readonly CompiledSkillDefinition[];
|
|
763
760
|
readonly instructions?: readonly CompiledInstructionsDefinition[];
|
|
764
|
-
readonly instrumentation?: ModuleSourceRef;
|
|
765
761
|
readonly tools?: readonly CompiledToolDefinition[];
|
|
766
762
|
readonly workspaceResourceRoot?: CompiledWorkspaceResourceRoot;
|
|
767
763
|
}
|
|
@@ -812,7 +808,6 @@ export declare function createCompiledAgentManifest(input: {
|
|
|
812
808
|
readonly skills?: readonly CompiledSkillDefinition[];
|
|
813
809
|
readonly subagents?: readonly CompiledSubagentNode[];
|
|
814
810
|
readonly instructions?: readonly CompiledInstructionsDefinition[];
|
|
815
|
-
readonly instrumentation?: ModuleSourceRef;
|
|
816
811
|
readonly tools?: readonly CompiledToolDefinition[];
|
|
817
812
|
readonly extensionMounts?: readonly CompiledExtensionMount[];
|
|
818
813
|
readonly workspaceResourceRoot?: CompiledWorkspaceResourceRoot;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z}from"#compiled/zod/index.js";import{discoverDiagnosticsSummarySchema}from"#discover/diagnostics.js";import{compiledRemoteAgentNodeSchema}from"#compiler/remote-agent-node.js";import{jsonObjectSchema}from"#shared/json-schemas.js";import{AGENT_WORKFLOW_RETENTION_VALUES}from"#shared/agent-definition.js";import{validateCompiledAgentManifest,validateCompiledAgentResources}from"#compiler/validate-artifact.js";const COMPILED_AGENT_MANIFEST_KIND=`eve-agent-compiled-manifest`,ROOT_COMPILED_AGENT_NODE_ID=`__root__`,COMPILED_AGENT_MANIFEST_VERSION=50,agentSourceOwnerSchema=z.discriminatedUnion(`kind`,[z.object({kind:z.literal(`application`)}).strict(),z.object({feature:z.string().min(1),kind:z.literal(`framework`)}).strict(),z.object({kind:z.literal(`extension`),namespace:z.string().min(1),packageName:z.string().min(1)}).strict()]),moduleSourceRefSchema=z.object({exportName:z.string().optional(),sourceKind:z.literal(`module`),logicalPath:z.string(),sourceId:z.string()}).strict(),filesystemModuleBackingSchema=z.object({externalDependencies:z.array(z.string()).readonly(),extensionScope:z.object({namespace:z.string(),sourceRoot:z.string()}).strict().optional(),kind:z.literal(`filesystem`),sourcePath:z.string()}).strict(),programmaticModuleBackingSchema=z.object({dependencies:z.record(z.string(),z.string()).readonly().optional(),kind:z.literal(`programmatic`),moduleId:z.string(),parameters:jsonObjectSchema.optional(),registryId:z.string(),revision:z.string(),semanticRevision:z.string().optional()}).strict(),resourceSourceBackingSchema=z.object({kind:z.literal(`resource`),sourcePath:z.string()}).strict(),agentModuleBackingSchema=z.discriminatedUnion(`kind`,[filesystemModuleBackingSchema,programmaticModuleBackingSchema]),compiledModuleBindingSchema=z.object({backing:agentModuleBackingSchema,logicalPath:z.string(),owner:agentSourceOwnerSchema,usage:z.object({compile:z.boolean(),runtimeEntry:z.boolean()}).strict()}).strict(),agentSourceDescriptorSchema=z.object({backing:z.discriminatedUnion(`kind`,[filesystemModuleBackingSchema,programmaticModuleBackingSchema,resourceSourceBackingSchema]),form:z.enum([`derived`,`direct`]),layer:z.enum([`framework-default`,`extension-package`,`extension-override`,`application`]),logicalPath:z.string(),owner:agentSourceOwnerSchema,sourceId:z.string()}).strict(),agentSourceCompositionSchema=z.object({entries:z.array(z.discriminatedUnion(`kind`,[z.object({kind:z.literal(`shadowed`),source:agentSourceDescriptorSchema,winnerSourceId:z.string()}).strict(),z.object({kind:z.literal(`disabled`),source:agentSourceDescriptorSchema}).strict()])).readonly()}).strict(),compiledDynamicModelDefinitionSchema=z.object({eventNames:z.array(z.string()).readonly(),exportName:z.string().optional(),sourceKind:z.literal(`module`),logicalPath:z.string(),sourceId:z.string()}).strict(),channelMethodSchema=z.union([z.literal(`GET`),z.literal(`HEAD`),z.literal(`POST`),z.literal(`PUT`),z.literal(`PATCH`),z.literal(`DELETE`),z.literal(`OPTIONS`),z.literal(`WEBSOCKET`)]),compiledChannelCorsSchema=z.object({origin:z.union([z.literal(`*`),z.literal(`null`),z.array(z.string())]).optional(),methods:z.union([z.literal(`*`),z.array(z.string())]).optional(),allowHeaders:z.union([z.literal(`*`),z.array(z.string())]).optional(),exposeHeaders:z.union([z.literal(`*`),z.array(z.string())]).optional(),credentials:z.boolean().optional(),maxAge:z.union([z.string(),z.literal(!1)]).optional(),preflight:z.object({statusCode:z.number().int().min(100).max(599).optional()}).strict().optional()}).strict(),compiledChannelDefinitionSchema=z.object({kind:z.literal(`channel`),name:z.string(),logicalPath:z.string(),method:channelMethodSchema,urlPath:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`),exportName:z.string().optional(),adapterKind:z.string().optional(),cors:compiledChannelCorsSchema.optional()}).strict(),compiledChannelPreflightDefinitionSchema=z.object({cors:compiledChannelCorsSchema,method:z.literal(`OPTIONS`),sourceIds:z.array(z.string()).readonly(),urlPath:z.string()}).strict(),compiledShadowedChannelRouteSchema=z.object({method:channelMethodSchema,source:agentSourceDescriptorSchema,urlPath:z.string(),winnerSourceId:z.string()}).strict(),compiledChannelRoutePlanSchema=z.object({effective:z.array(compiledChannelDefinitionSchema).readonly(),preflight:z.array(compiledChannelPreflightDefinitionSchema).readonly(),shadowed:z.array(compiledShadowedChannelRouteSchema).readonly()}).strict(),modelRoutingSchema=z.union([z.object({kind:z.literal(`gateway`),target:z.string(),byok:z.string().optional()}).strict(),z.object({kind:z.literal(`external`),provider:z.string()}).strict()]),compiledRuntimeModelReferenceSchema=z.object({contextWindowTokens:z.number().int().positive().optional(),id:z.string(),maxOutputTokens:z.number().int().positive().optional(),source:moduleSourceRefSchema.optional(),providerOptions:z.record(z.string(),jsonObjectSchema).optional(),routing:modelRoutingSchema}).strict(),compiledAgentBuildDefinitionSchema=z.object({externalDependencies:z.array(z.string()).optional()}).strict(),compiledAgentWorkflowWorldDefinitionSchema=z.string(),compiledAgentWorkflowDefinitionSchema=z.object({modelCallsPerStep:z.number().int().positive().optional(),retention:z.literal(AGENT_WORKFLOW_RETENTION_VALUES).optional(),world:compiledAgentWorkflowWorldDefinitionSchema.optional()}).strict(),compiledAgentCompactionDefinitionSchema=z.object({model:compiledRuntimeModelReferenceSchema.optional(),thresholdPercent:z.number().finite().min(0).max(1).optional()}).strict(),sessionTokenLimitSchema=z.union([z.number().int().positive(),z.literal(!1)]),sessionTokenCostLimitSchema=z.union([z.number().finite().positive(),z.literal(!1)]),sessionTimeoutSchema=z.union([z.number().int().positive(),z.literal(!1)]),compiledAgentLimitsDefinitionSchema=z.object({maxInputTokensPerSession:sessionTokenLimitSchema.optional(),maxOutputTokensPerSession:sessionTokenLimitSchema.optional(),maxTokenCostUsdPerSession:sessionTokenCostLimitSchema.optional(),sessionTimeoutMs:sessionTimeoutSchema.optional()}).strict(),compiledAgentConfigBaseFields={build:compiledAgentBuildDefinitionSchema.optional(),compaction:compiledAgentCompactionDefinitionSchema.optional(),defaultTools:z.boolean().optional(),description:z.string().optional(),experimental:z.object({instrumentationProviders:z.boolean().optional(),workflow:compiledAgentWorkflowDefinitionSchema.optional()}).strict().optional(),name:z.string(),outputSchema:jsonObjectSchema.optional(),reasoning:z.enum([`provider-default`,`none`,`minimal`,`low`,`medium`,`high`,`xhigh`]).optional(),source:moduleSourceRefSchema,tool:z.boolean().optional(),limits:compiledAgentLimitsDefinitionSchema.optional()},compiledAgentConfigSchema=z.union([z.object({...compiledAgentConfigBaseFields,model:compiledRuntimeModelReferenceSchema}).strict(),z.object({...compiledAgentConfigBaseFields,dynamicModel:compiledDynamicModelDefinitionSchema}).strict()]),compiledInstructionsBaseFields={content:z.string(),name:z.string(),logicalPath:z.string(),role:z.enum([`system`,`user`]),sourceId:z.string()},compiledInstructionsSchema=z.discriminatedUnion(`sourceKind`,[z.object({...compiledInstructionsBaseFields,owner:agentSourceOwnerSchema,sourceKind:z.literal(`markdown`)}).strict(),z.object({...compiledInstructionsBaseFields,sourceKind:z.literal(`module`)}).strict()]),compiledSkillBaseFields={name:z.string(),description:z.string(),license:z.string().optional(),markdown:z.string(),metadata:z.record(z.string(),z.string()).optional(),sourceId:z.string(),logicalPath:z.string()},compiledSkillSourceSchema=z.discriminatedUnion(`sourceKind`,[z.object({...compiledSkillBaseFields,owner:agentSourceOwnerSchema,sourceKind:z.literal(`markdown`)}).strict(),z.object({...compiledSkillBaseFields,sourceKind:z.literal(`module`),exportName:z.string().optional()}).strict(),z.object({...compiledSkillBaseFields,owner:agentSourceOwnerSchema,sourceKind:z.literal(`skill-package`),skillId:z.string(),skillFilePath:z.string(),rootPath:z.string(),assetsPath:z.string().optional(),referencesPath:z.string().optional(),scriptsPath:z.string().optional()}).strict()]),compiledScheduleBaseFields={cron:z.string(),hasRun:z.boolean(),name:z.string(),logicalPath:z.string(),markdown:z.string().optional(),sourceId:z.string()},compiledScheduleDefinitionSchema=z.discriminatedUnion(`sourceKind`,[z.object({...compiledScheduleBaseFields,owner:agentSourceOwnerSchema,sourceKind:z.literal(`markdown`)}).strict(),z.object({...compiledScheduleBaseFields,sourceKind:z.literal(`module`)}).strict()]),compiledSandboxDefinitionSchema=z.object({backendName:z.string().optional(),description:z.string().optional(),inheritsParent:z.boolean().optional(),exportName:z.string().optional(),logicalPath:z.string(),revalidationKey:z.string().optional(),sourceHash:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`)}).strict(),compiledSandboxWorkspaceSchema=z.object({logicalPath:z.string(),rootEntries:z.array(z.string()).readonly(),sourceId:z.string(),sourcePath:z.string()}).strict(),compiledWorkspaceResourceRootSchema=z.object({contentHash:z.string().optional(),logicalPath:z.string(),rootEntries:z.array(z.string()).readonly()}).strict(),compiledConnectionDefinitionSchema=z.object({connectionName:z.string(),description:z.string(),exportName:z.string().optional(),logicalPath:z.string(),protocol:z.enum([`mcp`,`openapi`]).default(`mcp`),sourceId:z.string(),sourceKind:z.literal(`module`),url:z.string(),vercelConnect:z.object({connector:z.string()}).strict().optional()}).strict(),compiledDynamicConnectionDefinitionSchema=z.object({eventNames:z.array(z.string()).readonly(),exportName:z.string().optional(),extensionNamespace:z.string().optional(),logicalPath:z.string(),slug:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`)}).strict(),compiledToolBehaviorSchema=z.object({availability:z.array(z.enum([`delegated-task-child`,`requires-request-input`,`root-session`])).readonly(),handling:z.discriminatedUnion(`kind`,[z.object({action:z.enum([`self-agent`,`task-cancel`]),kind:z.literal(`dispatch`)}).strict(),z.object({kind:z.literal(`provider-tool`),provider:z.enum([`exa`,`parallel`])}).strict(),z.object({kind:z.literal(`request-input`),request:z.literal(`question`)}).strict(),z.object({kind:z.literal(`workflow-tool`),workflowId:z.string()}).strict()]).optional(),presentation:z.literal(`load-skill`).optional(),shape:z.object({lifetime:z.enum([`step`,`task`]),suspend:z.enum([`none`,`workflow`])}).strict().optional()}).strict(),compiledToolDefinitionSchema=z.object({availableInSubagents:z.boolean().optional(),behavior:compiledToolBehaviorSchema.optional(),description:z.string(),execution:z.literal(`background`).optional(),exportName:z.string().optional(),hasExecute:z.boolean(),hasModelOutputProjection:z.boolean(),inputSchema:jsonObjectSchema.nullable(),logicalPath:z.string(),name:z.string(),outputSchema:jsonObjectSchema.optional(),requiresApproval:z.boolean(),sourceId:z.string(),sourceKind:z.literal(`module`),workflowProgram:z.object({maxSubagents:z.number().int().positive()}).strict().optional()}).strict(),compiledDynamicToolDefinitionSchema=z.object({eventNames:z.array(z.string()).readonly(),exportName:z.string().optional(),extensionNamespace:z.string().optional(),logicalPath:z.string(),rebindMissingCallbacks:z.boolean().optional(),slug:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`)}).strict(),compiledMemoryDefinitionSchema=z.object({description:z.string().optional(),exportName:z.string().optional(),logicalPath:z.string(),slot:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`),visibility:z.enum([`scope`,`session`])}).strict(),compiledDynamicSkillDefinitionSchema=z.object({eventNames:z.array(z.string()).readonly(),exportName:z.string().optional(),extensionNamespace:z.string().optional(),logicalPath:z.string(),slug:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`)}).strict(),compiledDynamicInstructionsDefinitionSchema=z.object({eventNames:z.array(z.string()).readonly(),exportName:z.string().optional(),logicalPath:z.string(),slug:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`)}).strict(),compiledHookDefinitionSchema=z.object({eventNames:z.array(z.string()).readonly(),exportName:z.string().optional(),logicalPath:z.string(),slug:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`)}).strict(),compiledExtensionMountSchema=z.object({externalDependencies:z.array(z.string()).readonly(),namespace:z.string(),packageName:z.string(),packageNamespace:z.string(),sourceRoot:z.string(),mountSourceId:z.string(),mountLogicalPath:z.string()}).strict(),compiledAgentResourceFields={agentRoot:z.string(),appRoot:z.string(),bindings:z.record(z.string(),compiledModuleBindingSchema),channelRoutes:compiledChannelRoutePlanSchema,connections:z.array(compiledConnectionDefinitionSchema),dynamicConnections:z.array(compiledDynamicConnectionDefinitionSchema).default([]),diagnosticsSummary:discoverDiagnosticsSummarySchema,sourceComposition:agentSourceCompositionSchema,dynamicInstructions:z.array(compiledDynamicInstructionsDefinitionSchema).default([]),dynamicSkills:z.array(compiledDynamicSkillDefinitionSchema).default([]),dynamicTools:z.array(compiledDynamicToolDefinitionSchema).default([]),extensionMounts:z.array(compiledExtensionMountSchema).default([]),hooks:z.array(compiledHookDefinitionSchema),memories:z.array(compiledMemoryDefinitionSchema).default([]),sandbox:compiledSandboxDefinitionSchema,sandboxWorkspaces:z.array(compiledSandboxWorkspaceSchema),schedules:z.array(compiledScheduleDefinitionSchema),remoteAgents:z.array(compiledRemoteAgentNodeSchema),skills:z.array(compiledSkillSourceSchema).readonly(),instructions:z.array(compiledInstructionsSchema).readonly().default([]),instrumentation:moduleSourceRefSchema.optional(),tools:z.array(compiledToolDefinitionSchema),workspaceResourceRoot:compiledWorkspaceResourceRootSchema},compiledAgentResourcesSchema=z.object(compiledAgentResourceFields).strict(),compiledAgentNodeManifestSchema=z.object({...compiledAgentResourceFields,config:compiledAgentConfigSchema}).strict(),compiledSubagentNodeBaseFields={backing:resourceSourceBackingSchema,entryPath:z.string(),logicalPath:z.string(),name:z.string(),nodeId:z.string(),owner:agentSourceOwnerSchema,parentNodeId:z.string(),rootPath:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`),exportName:z.string().optional()},compiledDynamicSubagentDefinitionSchema=z.object({build:compiledAgentBuildDefinitionSchema.optional(),eventNames:z.array(z.string()).readonly(),exportName:z.string().optional(),logicalPath:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`)}).strict(),compiledSubagentNodeSchema=z.union([z.object({...compiledSubagentNodeBaseFields,agent:compiledAgentNodeManifestSchema,description:z.string()}).strict(),z.object({...compiledSubagentNodeBaseFields,agent:compiledAgentResourcesSchema,configResolver:compiledDynamicSubagentDefinitionSchema}).strict()]),compiledAgentManifestSchema=z.object({agentRoot:z.string(),appRoot:z.string(),bindings:z.record(z.string(),compiledModuleBindingSchema),extensionMounts:z.array(compiledExtensionMountSchema).default([]),channelRoutes:compiledChannelRoutePlanSchema,config:compiledAgentConfigSchema,connections:z.array(compiledConnectionDefinitionSchema),dynamicConnections:z.array(compiledDynamicConnectionDefinitionSchema).default([]),diagnosticsSummary:discoverDiagnosticsSummarySchema,sourceComposition:agentSourceCompositionSchema,dynamicInstructions:z.array(compiledDynamicInstructionsDefinitionSchema).default([]),dynamicSkills:z.array(compiledDynamicSkillDefinitionSchema).default([]),dynamicTools:z.array(compiledDynamicToolDefinitionSchema).default([]),hooks:z.array(compiledHookDefinitionSchema),memories:z.array(compiledMemoryDefinitionSchema).default([]),kind:z.literal(COMPILED_AGENT_MANIFEST_KIND),remoteAgents:z.array(compiledRemoteAgentNodeSchema),sandbox:compiledSandboxDefinitionSchema,sandboxWorkspaces:z.array(compiledSandboxWorkspaceSchema),schedules:z.array(compiledScheduleDefinitionSchema),skills:z.array(compiledSkillSourceSchema).readonly(),subagents:z.array(compiledSubagentNodeSchema),instructions:z.array(compiledInstructionsSchema).readonly().default([]),instrumentation:moduleSourceRefSchema.optional(),tools:z.array(compiledToolDefinitionSchema),version:z.literal(50),workspaceResourceRoot:compiledWorkspaceResourceRootSchema}).strict();function createCompiledAgentResources(e){return{agentRoot:e.agentRoot,appRoot:e.appRoot,bindings:{...e.bindings},channelRoutes:{effective:[...e.channelRoutes.effective],preflight:[...e.channelRoutes.preflight],shadowed:[...e.channelRoutes.shadowed]},connections:[...e.connections??[]],dynamicConnections:[...e.dynamicConnections??[]],diagnosticsSummary:e.diagnosticsSummary??{errors:0,warnings:0},sourceComposition:{entries:[...e.sourceComposition.entries]},dynamicInstructions:[...e.dynamicInstructions??[]],dynamicSkills:[...e.dynamicSkills??[]],dynamicTools:[...e.dynamicTools??[]],extensionMounts:[...e.extensionMounts??[]],hooks:[...e.hooks??[]],memories:[...e.memories??[]],instructions:[...e.instructions??[]],instrumentation:e.instrumentation===void 0?void 0:{...e.instrumentation},remoteAgents:[...e.remoteAgents??[]],sandbox:e.sandbox,sandboxWorkspaces:[...e.sandboxWorkspaces??[]],schedules:[...e.schedules??[]],skills:[...e.skills??[]],tools:[...e.tools??[]],workspaceResourceRoot:e.workspaceResourceRoot??{logicalPath:``,rootEntries:deriveResourceRootEntries({sandboxWorkspaces:e.sandboxWorkspaces,skills:e.skills})}}}function createCompiledAgentNodeManifest(e){let t={...createCompiledAgentResources(e),config:cloneCompiledAgentDefinition(e.config)};return validateCompiledAgentResources(t,{allowUnknownResourceWinners:!0}),t}function cloneCompiledAgentDefinition(e){let t={build:e.build===void 0?void 0:{externalDependencies:e.build.externalDependencies===void 0?void 0:[...e.build.externalDependencies]},compaction:{model:e.compaction?.model===void 0?void 0:cloneCompiledRuntimeModelReference(e.compaction.model),thresholdPercent:e.compaction?.thresholdPercent},defaultTools:e.defaultTools,description:e.description,experimental:e.experimental===void 0?void 0:{instrumentationProviders:e.experimental.instrumentationProviders,workflow:e.experimental.workflow===void 0?void 0:{modelCallsPerStep:e.experimental.workflow.modelCallsPerStep,retention:e.experimental.workflow.retention,world:e.experimental.workflow.world}},name:e.name,outputSchema:e.outputSchema,reasoning:e.reasoning,limits:e.limits===void 0?void 0:{maxInputTokensPerSession:e.limits.maxInputTokensPerSession,maxOutputTokensPerSession:e.limits.maxOutputTokensPerSession,maxTokenCostUsdPerSession:e.limits.maxTokenCostUsdPerSession,sessionTimeoutMs:e.limits.sessionTimeoutMs},source:{...e.source},tool:e.tool};return e.dynamicModel===void 0?{...t,model:cloneCompiledRuntimeModelReference(e.model)}:{...t,dynamicModel:{...e.dynamicModel}}}function deriveResourceRootEntries(e){let t=new Set;for(let n of e.sandboxWorkspaces??[])for(let e of n.rootEntries)t.add(e);return[...t].sort((e,t)=>e.localeCompare(t))}function createCompiledSubagentNodeId(e,t){return e===`__root__`?t:`${e}::${t}`}function createCompiledAgentManifest(e){let t={...createCompiledAgentNodeManifest(e),kind:COMPILED_AGENT_MANIFEST_KIND,extensionMounts:[...e.extensionMounts??[]],subagents:[...e.subagents??[]],version:50};return validateCompiledAgentManifest(t),t}function cloneCompiledRuntimeModelReference(e){let t={id:e.id,routing:cloneModelRouting(e.routing)};return e.contextWindowTokens!==void 0&&(t.contextWindowTokens=e.contextWindowTokens),e.maxOutputTokens!==void 0&&(t.maxOutputTokens=e.maxOutputTokens),e.providerOptions!==void 0&&(t.providerOptions={...e.providerOptions}),e.source!==void 0&&(t.source={...e.source}),t}function cloneModelRouting(e){return e.kind===`external`?{kind:`external`,provider:e.provider}:e.byok===void 0?{kind:`gateway`,target:e.target}:{kind:`gateway`,target:e.target,byok:e.byok}}export{COMPILED_AGENT_MANIFEST_KIND,COMPILED_AGENT_MANIFEST_VERSION,ROOT_COMPILED_AGENT_NODE_ID,compiledAgentManifestSchema,createCompiledAgentManifest,createCompiledAgentNodeManifest,createCompiledAgentResources,createCompiledSubagentNodeId,deriveResourceRootEntries};
|
|
1
|
+
import{z}from"#compiled/zod/index.js";import{discoverDiagnosticsSummarySchema}from"#discover/diagnostics.js";import{compiledRemoteAgentNodeSchema}from"#compiler/remote-agent-node.js";import{jsonObjectSchema}from"#shared/json-schemas.js";import{AGENT_WORKFLOW_RETENTION_VALUES}from"#shared/agent-definition.js";import{validateCompiledAgentManifest,validateCompiledAgentResources}from"#compiler/validate-artifact.js";const COMPILED_AGENT_MANIFEST_KIND=`eve-agent-compiled-manifest`,ROOT_COMPILED_AGENT_NODE_ID=`__root__`,COMPILED_AGENT_MANIFEST_VERSION=50,agentSourceOwnerSchema=z.discriminatedUnion(`kind`,[z.object({kind:z.literal(`application`)}).strict(),z.object({feature:z.string().min(1),kind:z.literal(`framework`)}).strict(),z.object({kind:z.literal(`extension`),namespace:z.string().min(1),packageName:z.string().min(1)}).strict()]),moduleSourceRefSchema=z.object({exportName:z.string().optional(),sourceKind:z.literal(`module`),logicalPath:z.string(),sourceId:z.string()}).strict(),filesystemModuleBackingSchema=z.object({externalDependencies:z.array(z.string()).readonly(),extensionScope:z.object({namespace:z.string(),sourceRoot:z.string()}).strict().optional(),kind:z.literal(`filesystem`),sourcePath:z.string()}).strict(),programmaticModuleBackingSchema=z.object({dependencies:z.record(z.string(),z.string()).readonly().optional(),kind:z.literal(`programmatic`),moduleId:z.string(),parameters:jsonObjectSchema.optional(),registryId:z.string(),revision:z.string(),semanticRevision:z.string().optional()}).strict(),resourceSourceBackingSchema=z.object({kind:z.literal(`resource`),sourcePath:z.string()}).strict(),agentModuleBackingSchema=z.discriminatedUnion(`kind`,[filesystemModuleBackingSchema,programmaticModuleBackingSchema]),compiledModuleBindingSchema=z.object({backing:agentModuleBackingSchema,logicalPath:z.string(),owner:agentSourceOwnerSchema,usage:z.object({compile:z.boolean(),runtimeEntry:z.boolean()}).strict()}).strict(),agentSourceDescriptorSchema=z.object({backing:z.discriminatedUnion(`kind`,[filesystemModuleBackingSchema,programmaticModuleBackingSchema,resourceSourceBackingSchema]),form:z.enum([`derived`,`direct`]),layer:z.enum([`framework-default`,`extension-package`,`extension-override`,`application`]),logicalPath:z.string(),owner:agentSourceOwnerSchema,sourceId:z.string()}).strict(),agentSourceCompositionSchema=z.object({entries:z.array(z.discriminatedUnion(`kind`,[z.object({kind:z.literal(`shadowed`),source:agentSourceDescriptorSchema,winnerSourceId:z.string()}).strict(),z.object({kind:z.literal(`disabled`),source:agentSourceDescriptorSchema}).strict()])).readonly()}).strict(),compiledDynamicModelDefinitionSchema=z.object({eventNames:z.array(z.string()).readonly(),exportName:z.string().optional(),sourceKind:z.literal(`module`),logicalPath:z.string(),sourceId:z.string()}).strict(),channelMethodSchema=z.union([z.literal(`GET`),z.literal(`HEAD`),z.literal(`POST`),z.literal(`PUT`),z.literal(`PATCH`),z.literal(`DELETE`),z.literal(`OPTIONS`),z.literal(`WEBSOCKET`)]),compiledChannelCorsSchema=z.object({origin:z.union([z.literal(`*`),z.literal(`null`),z.array(z.string())]).optional(),methods:z.union([z.literal(`*`),z.array(z.string())]).optional(),allowHeaders:z.union([z.literal(`*`),z.array(z.string())]).optional(),exposeHeaders:z.union([z.literal(`*`),z.array(z.string())]).optional(),credentials:z.boolean().optional(),maxAge:z.union([z.string(),z.literal(!1)]).optional(),preflight:z.object({statusCode:z.number().int().min(100).max(599).optional()}).strict().optional()}).strict(),compiledChannelDefinitionSchema=z.object({kind:z.literal(`channel`),name:z.string(),logicalPath:z.string(),method:channelMethodSchema,urlPath:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`),exportName:z.string().optional(),adapterKind:z.string().optional(),cors:compiledChannelCorsSchema.optional()}).strict(),compiledChannelPreflightDefinitionSchema=z.object({cors:compiledChannelCorsSchema,method:z.literal(`OPTIONS`),sourceIds:z.array(z.string()).readonly(),urlPath:z.string()}).strict(),compiledShadowedChannelRouteSchema=z.object({method:channelMethodSchema,source:agentSourceDescriptorSchema,urlPath:z.string(),winnerSourceId:z.string()}).strict(),compiledChannelRoutePlanSchema=z.object({effective:z.array(compiledChannelDefinitionSchema).readonly(),preflight:z.array(compiledChannelPreflightDefinitionSchema).readonly(),shadowed:z.array(compiledShadowedChannelRouteSchema).readonly()}).strict(),modelRoutingSchema=z.union([z.object({kind:z.literal(`gateway`),target:z.string(),byok:z.string().optional()}).strict(),z.object({kind:z.literal(`external`),provider:z.string()}).strict()]),compiledRuntimeModelReferenceSchema=z.object({contextWindowTokens:z.number().int().positive().optional(),id:z.string(),maxOutputTokens:z.number().int().positive().optional(),source:moduleSourceRefSchema.optional(),providerOptions:z.record(z.string(),jsonObjectSchema).optional(),routing:modelRoutingSchema}).strict(),compiledAgentBuildDefinitionSchema=z.object({externalDependencies:z.array(z.string()).optional()}).strict(),compiledAgentWorkflowWorldDefinitionSchema=z.string(),compiledAgentWorkflowDefinitionSchema=z.object({modelCallsPerStep:z.number().int().positive().optional(),retention:z.literal(AGENT_WORKFLOW_RETENTION_VALUES).optional(),world:compiledAgentWorkflowWorldDefinitionSchema.optional()}).strict(),compiledAgentCompactionDefinitionSchema=z.object({model:compiledRuntimeModelReferenceSchema.optional(),thresholdPercent:z.number().finite().min(0).max(1).optional()}).strict(),sessionTokenLimitSchema=z.union([z.number().int().positive(),z.literal(!1)]),sessionTokenCostLimitSchema=z.union([z.number().finite().positive(),z.literal(!1)]),sessionTimeoutSchema=z.union([z.number().int().positive(),z.literal(!1)]),compiledAgentLimitsDefinitionSchema=z.object({maxInputTokensPerSession:sessionTokenLimitSchema.optional(),maxOutputTokensPerSession:sessionTokenLimitSchema.optional(),maxTokenCostUsdPerSession:sessionTokenCostLimitSchema.optional(),sessionTimeoutMs:sessionTimeoutSchema.optional()}).strict(),compiledAgentConfigBaseFields={build:compiledAgentBuildDefinitionSchema.optional(),compaction:compiledAgentCompactionDefinitionSchema.optional(),defaultTools:z.boolean().optional(),description:z.string().optional(),experimental:z.object({workflow:compiledAgentWorkflowDefinitionSchema.optional()}).strict().optional(),name:z.string(),outputSchema:jsonObjectSchema.optional(),reasoning:z.enum([`provider-default`,`none`,`minimal`,`low`,`medium`,`high`,`xhigh`]).optional(),source:moduleSourceRefSchema,tool:z.boolean().optional(),limits:compiledAgentLimitsDefinitionSchema.optional()},compiledAgentConfigSchema=z.union([z.object({...compiledAgentConfigBaseFields,model:compiledRuntimeModelReferenceSchema}).strict(),z.object({...compiledAgentConfigBaseFields,dynamicModel:compiledDynamicModelDefinitionSchema}).strict()]),compiledInstructionsBaseFields={content:z.string(),name:z.string(),logicalPath:z.string(),role:z.enum([`system`,`user`]),sourceId:z.string()},compiledInstructionsSchema=z.discriminatedUnion(`sourceKind`,[z.object({...compiledInstructionsBaseFields,owner:agentSourceOwnerSchema,sourceKind:z.literal(`markdown`)}).strict(),z.object({...compiledInstructionsBaseFields,sourceKind:z.literal(`module`)}).strict()]),compiledSkillBaseFields={name:z.string(),description:z.string(),license:z.string().optional(),markdown:z.string(),metadata:z.record(z.string(),z.string()).optional(),sourceId:z.string(),logicalPath:z.string()},compiledSkillSourceSchema=z.discriminatedUnion(`sourceKind`,[z.object({...compiledSkillBaseFields,owner:agentSourceOwnerSchema,sourceKind:z.literal(`markdown`)}).strict(),z.object({...compiledSkillBaseFields,sourceKind:z.literal(`module`),exportName:z.string().optional()}).strict(),z.object({...compiledSkillBaseFields,owner:agentSourceOwnerSchema,sourceKind:z.literal(`skill-package`),skillId:z.string(),skillFilePath:z.string(),rootPath:z.string(),assetsPath:z.string().optional(),referencesPath:z.string().optional(),scriptsPath:z.string().optional()}).strict()]),compiledScheduleBaseFields={cron:z.string(),hasRun:z.boolean(),name:z.string(),logicalPath:z.string(),markdown:z.string().optional(),sourceId:z.string()},compiledScheduleDefinitionSchema=z.discriminatedUnion(`sourceKind`,[z.object({...compiledScheduleBaseFields,owner:agentSourceOwnerSchema,sourceKind:z.literal(`markdown`)}).strict(),z.object({...compiledScheduleBaseFields,sourceKind:z.literal(`module`)}).strict()]),compiledSandboxDefinitionSchema=z.object({backendName:z.string().optional(),description:z.string().optional(),inheritsParent:z.boolean().optional(),exportName:z.string().optional(),logicalPath:z.string(),revalidationKey:z.string().optional(),sourceHash:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`)}).strict(),compiledSandboxWorkspaceSchema=z.object({logicalPath:z.string(),rootEntries:z.array(z.string()).readonly(),sourceId:z.string(),sourcePath:z.string()}).strict(),compiledWorkspaceResourceRootSchema=z.object({contentHash:z.string().optional(),logicalPath:z.string(),rootEntries:z.array(z.string()).readonly()}).strict(),compiledConnectionDefinitionSchema=z.object({connectionName:z.string(),description:z.string(),exportName:z.string().optional(),logicalPath:z.string(),protocol:z.enum([`mcp`,`openapi`]).default(`mcp`),sourceId:z.string(),sourceKind:z.literal(`module`),url:z.string(),vercelConnect:z.object({connector:z.string()}).strict().optional()}).strict(),compiledDynamicConnectionDefinitionSchema=z.object({eventNames:z.array(z.string()).readonly(),exportName:z.string().optional(),extensionNamespace:z.string().optional(),logicalPath:z.string(),slug:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`)}).strict(),compiledToolBehaviorSchema=z.object({availability:z.array(z.enum([`delegated-task-child`,`requires-request-input`,`root-session`])).readonly(),handling:z.discriminatedUnion(`kind`,[z.object({action:z.enum([`self-agent`,`task-cancel`]),kind:z.literal(`dispatch`)}).strict(),z.object({kind:z.literal(`provider-tool`),provider:z.enum([`exa`,`parallel`])}).strict(),z.object({kind:z.literal(`request-input`),request:z.literal(`question`)}).strict(),z.object({kind:z.literal(`workflow-tool`),workflowId:z.string()}).strict()]).optional(),presentation:z.literal(`load-skill`).optional(),shape:z.object({lifetime:z.enum([`step`,`task`]),suspend:z.enum([`none`,`workflow`])}).strict().optional()}).strict(),compiledToolDefinitionSchema=z.object({availableInSubagents:z.boolean().optional(),behavior:compiledToolBehaviorSchema.optional(),description:z.string(),execution:z.literal(`background`).optional(),exportName:z.string().optional(),hasExecute:z.boolean(),hasModelOutputProjection:z.boolean(),inputSchema:jsonObjectSchema.nullable(),logicalPath:z.string(),name:z.string(),outputSchema:jsonObjectSchema.optional(),requiresApproval:z.boolean(),sourceId:z.string(),sourceKind:z.literal(`module`),workflowProgram:z.object({maxSubagents:z.number().int().positive()}).strict().optional()}).strict(),compiledDynamicToolDefinitionSchema=z.object({eventNames:z.array(z.string()).readonly(),exportName:z.string().optional(),extensionNamespace:z.string().optional(),logicalPath:z.string(),rebindMissingCallbacks:z.boolean().optional(),slug:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`)}).strict(),compiledMemoryDefinitionSchema=z.object({description:z.string().optional(),exportName:z.string().optional(),logicalPath:z.string(),slot:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`),visibility:z.enum([`scope`,`session`])}).strict(),compiledDynamicSkillDefinitionSchema=z.object({eventNames:z.array(z.string()).readonly(),exportName:z.string().optional(),extensionNamespace:z.string().optional(),logicalPath:z.string(),slug:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`)}).strict(),compiledDynamicInstructionsDefinitionSchema=z.object({eventNames:z.array(z.string()).readonly(),exportName:z.string().optional(),logicalPath:z.string(),slug:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`)}).strict(),compiledHookDefinitionSchema=z.object({eventNames:z.array(z.string()).readonly(),exportName:z.string().optional(),logicalPath:z.string(),slug:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`)}).strict(),compiledExtensionMountSchema=z.object({externalDependencies:z.array(z.string()).readonly(),namespace:z.string(),packageName:z.string(),packageNamespace:z.string(),sourceRoot:z.string(),mountSourceId:z.string(),mountLogicalPath:z.string()}).strict(),compiledAgentResourceFields={agentRoot:z.string(),appRoot:z.string(),bindings:z.record(z.string(),compiledModuleBindingSchema),channelRoutes:compiledChannelRoutePlanSchema,connections:z.array(compiledConnectionDefinitionSchema),dynamicConnections:z.array(compiledDynamicConnectionDefinitionSchema).default([]),diagnosticsSummary:discoverDiagnosticsSummarySchema,sourceComposition:agentSourceCompositionSchema,dynamicInstructions:z.array(compiledDynamicInstructionsDefinitionSchema).default([]),dynamicSkills:z.array(compiledDynamicSkillDefinitionSchema).default([]),dynamicTools:z.array(compiledDynamicToolDefinitionSchema).default([]),extensionMounts:z.array(compiledExtensionMountSchema).default([]),hooks:z.array(compiledHookDefinitionSchema),memories:z.array(compiledMemoryDefinitionSchema).default([]),sandbox:compiledSandboxDefinitionSchema,sandboxWorkspaces:z.array(compiledSandboxWorkspaceSchema),schedules:z.array(compiledScheduleDefinitionSchema),remoteAgents:z.array(compiledRemoteAgentNodeSchema),skills:z.array(compiledSkillSourceSchema).readonly(),instructions:z.array(compiledInstructionsSchema).readonly().default([]),tools:z.array(compiledToolDefinitionSchema),workspaceResourceRoot:compiledWorkspaceResourceRootSchema},compiledAgentResourcesSchema=z.object(compiledAgentResourceFields).strict(),compiledAgentNodeManifestSchema=z.object({...compiledAgentResourceFields,config:compiledAgentConfigSchema}).strict(),compiledSubagentNodeBaseFields={backing:resourceSourceBackingSchema,entryPath:z.string(),logicalPath:z.string(),name:z.string(),nodeId:z.string(),owner:agentSourceOwnerSchema,parentNodeId:z.string(),rootPath:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`),exportName:z.string().optional()},compiledDynamicSubagentDefinitionSchema=z.object({build:compiledAgentBuildDefinitionSchema.optional(),eventNames:z.array(z.string()).readonly(),exportName:z.string().optional(),logicalPath:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`)}).strict(),compiledSubagentNodeSchema=z.union([z.object({...compiledSubagentNodeBaseFields,agent:compiledAgentNodeManifestSchema,description:z.string()}).strict(),z.object({...compiledSubagentNodeBaseFields,agent:compiledAgentResourcesSchema,configResolver:compiledDynamicSubagentDefinitionSchema}).strict()]),compiledAgentManifestSchema=z.object({agentRoot:z.string(),appRoot:z.string(),bindings:z.record(z.string(),compiledModuleBindingSchema),extensionMounts:z.array(compiledExtensionMountSchema).default([]),channelRoutes:compiledChannelRoutePlanSchema,config:compiledAgentConfigSchema,connections:z.array(compiledConnectionDefinitionSchema),dynamicConnections:z.array(compiledDynamicConnectionDefinitionSchema).default([]),diagnosticsSummary:discoverDiagnosticsSummarySchema,sourceComposition:agentSourceCompositionSchema,dynamicInstructions:z.array(compiledDynamicInstructionsDefinitionSchema).default([]),dynamicSkills:z.array(compiledDynamicSkillDefinitionSchema).default([]),dynamicTools:z.array(compiledDynamicToolDefinitionSchema).default([]),hooks:z.array(compiledHookDefinitionSchema),memories:z.array(compiledMemoryDefinitionSchema).default([]),kind:z.literal(COMPILED_AGENT_MANIFEST_KIND),remoteAgents:z.array(compiledRemoteAgentNodeSchema),sandbox:compiledSandboxDefinitionSchema,sandboxWorkspaces:z.array(compiledSandboxWorkspaceSchema),schedules:z.array(compiledScheduleDefinitionSchema),skills:z.array(compiledSkillSourceSchema).readonly(),subagents:z.array(compiledSubagentNodeSchema),instructions:z.array(compiledInstructionsSchema).readonly().default([]),tools:z.array(compiledToolDefinitionSchema),version:z.literal(50),workspaceResourceRoot:compiledWorkspaceResourceRootSchema}).strict();function createCompiledAgentResources(e){return{agentRoot:e.agentRoot,appRoot:e.appRoot,bindings:{...e.bindings},channelRoutes:{effective:[...e.channelRoutes.effective],preflight:[...e.channelRoutes.preflight],shadowed:[...e.channelRoutes.shadowed]},connections:[...e.connections??[]],dynamicConnections:[...e.dynamicConnections??[]],diagnosticsSummary:e.diagnosticsSummary??{errors:0,warnings:0},sourceComposition:{entries:[...e.sourceComposition.entries]},dynamicInstructions:[...e.dynamicInstructions??[]],dynamicSkills:[...e.dynamicSkills??[]],dynamicTools:[...e.dynamicTools??[]],extensionMounts:[...e.extensionMounts??[]],hooks:[...e.hooks??[]],memories:[...e.memories??[]],instructions:[...e.instructions??[]],remoteAgents:[...e.remoteAgents??[]],sandbox:e.sandbox,sandboxWorkspaces:[...e.sandboxWorkspaces??[]],schedules:[...e.schedules??[]],skills:[...e.skills??[]],tools:[...e.tools??[]],workspaceResourceRoot:e.workspaceResourceRoot??{logicalPath:``,rootEntries:deriveResourceRootEntries({sandboxWorkspaces:e.sandboxWorkspaces,skills:e.skills})}}}function createCompiledAgentNodeManifest(e){let t={...createCompiledAgentResources(e),config:cloneCompiledAgentDefinition(e.config)};return validateCompiledAgentResources(t,{allowUnknownResourceWinners:!0}),t}function cloneCompiledAgentDefinition(e){let t={build:e.build===void 0?void 0:{externalDependencies:e.build.externalDependencies===void 0?void 0:[...e.build.externalDependencies]},compaction:{model:e.compaction?.model===void 0?void 0:cloneCompiledRuntimeModelReference(e.compaction.model),thresholdPercent:e.compaction?.thresholdPercent},defaultTools:e.defaultTools,description:e.description,experimental:e.experimental===void 0?void 0:{workflow:e.experimental.workflow===void 0?void 0:{modelCallsPerStep:e.experimental.workflow.modelCallsPerStep,retention:e.experimental.workflow.retention,world:e.experimental.workflow.world}},name:e.name,outputSchema:e.outputSchema,reasoning:e.reasoning,limits:e.limits===void 0?void 0:{maxInputTokensPerSession:e.limits.maxInputTokensPerSession,maxOutputTokensPerSession:e.limits.maxOutputTokensPerSession,maxTokenCostUsdPerSession:e.limits.maxTokenCostUsdPerSession,sessionTimeoutMs:e.limits.sessionTimeoutMs},source:{...e.source},tool:e.tool};return e.dynamicModel===void 0?{...t,model:cloneCompiledRuntimeModelReference(e.model)}:{...t,dynamicModel:{...e.dynamicModel}}}function deriveResourceRootEntries(e){let t=new Set;for(let n of e.sandboxWorkspaces??[])for(let e of n.rootEntries)t.add(e);return[...t].sort((e,t)=>e.localeCompare(t))}function createCompiledSubagentNodeId(e,t){return e===`__root__`?t:`${e}::${t}`}function createCompiledAgentManifest(e){let t={...createCompiledAgentNodeManifest(e),kind:COMPILED_AGENT_MANIFEST_KIND,extensionMounts:[...e.extensionMounts??[]],subagents:[...e.subagents??[]],version:50};return validateCompiledAgentManifest(t),t}function cloneCompiledRuntimeModelReference(e){let t={id:e.id,routing:cloneModelRouting(e.routing)};return e.contextWindowTokens!==void 0&&(t.contextWindowTokens=e.contextWindowTokens),e.maxOutputTokens!==void 0&&(t.maxOutputTokens=e.maxOutputTokens),e.providerOptions!==void 0&&(t.providerOptions={...e.providerOptions}),e.source!==void 0&&(t.source={...e.source}),t}function cloneModelRouting(e){return e.kind===`external`?{kind:`external`,provider:e.provider}:e.byok===void 0?{kind:`gateway`,target:e.target}:{kind:`gateway`,target:e.target,byok:e.byok}}export{COMPILED_AGENT_MANIFEST_KIND,COMPILED_AGENT_MANIFEST_VERSION,ROOT_COMPILED_AGENT_NODE_ID,compiledAgentManifestSchema,createCompiledAgentManifest,createCompiledAgentNodeManifest,createCompiledAgentResources,createCompiledSubagentNodeId,deriveResourceRootEntries};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isAbsolute,relative,resolve}from"node:path";import{createCompiledBindingNamespaceLoader}from"#compiler/load-binding-namespace.js";import{normalizeLogicalPath}from"#discover/filesystem.js";import{toErrorMessage}from"#shared/errors.js";import{serializeOutputSchema}from"#tools/schema.js";import{isDynamicModelDefinition}from"#shared/agent-definition.js";import{normalizeAgentDefinition}from"#internal/authored-definition/core.js";import{formatLanguageModelGatewayId}from"#internal/runtime-model.js";import{classifyModelRouting}from"#internal/classify-model-routing.js";import{isChatGptModelRouting}from"#shared/chatgpt-model.js";import{parseJsonObject}from"#shared/json.js";import{loadModuleBackedDefinition}from"#compiler/normalize-helpers.js";async function compileAgentConfig(e,t,n){let r=n.source,i=formatAgentConfigModulePath(e,r,n.binding),a=normalizeAgentDefinition(Object.hasOwn(n,`definition`)?n.definition:await loadModuleBackedDefinition({binding:n.binding,displayPath:i,kind:`agent config`,loadNamespace:createCompiledBindingNamespaceLoader({bindings:{[r.sourceId]:n.binding},registries:t.registries}),source:r}),`Expected the agent config export "${r.exportName??`default`}" from "${i}" to match the public eve shape.`),o=isDynamicModelDefinition(a.model)?a.model:void 0,s=o===void 0?await normalizeAuthoredModelReference({modelCatalog:t.modelCatalog,purpose:`the primary compaction trigger model`,contextWindowTokens:a.modelContextWindowTokens,providerOptions:a.modelOptions?.providerOptions,source:r,sourcePath:i,value:a.model}):void 0,c={},l={compaction:c,name:e.agentId,source:{...r}};a.defaultTools!==void 0&&(l.defaultTools=a.defaultTools),a.description!==void 0&&(l.description=a.description);let u;o!==void 0&&(u={eventNames:Object.keys(o.events),exportName:r.exportName,sourceKind:`module`,logicalPath:r.logicalPath,sourceId:r.sourceId});let d=normalizeExperimentalDefinition(a.experimental);if(d!==void 0&&(l.experimental=d),a.build!==void 0&&(l.build={externalDependencies:a.build.externalDependencies===void 0?void 0:[...a.build.externalDependencies]}),a.outputSchema!==void 0&&(l.outputSchema=serializeOutputSchema(a.outputSchema)),a.reasoning!==void 0&&(l.reasoning=a.reasoning),a.tool!==void 0&&(l.tool=a.tool),a.limits!==void 0&&(l.limits={maxInputTokensPerSession:a.limits.maxInputTokensPerSession,maxOutputTokensPerSession:a.limits.maxOutputTokensPerSession,maxTokenCostUsdPerSession:a.limits.maxTokenCostUsdPerSession,sessionTimeoutMs:a.limits.sessionTimeoutMs}),a.compaction?.model!==void 0&&(c.model=await normalizeAuthoredModelReference({modelCatalog:t.modelCatalog,purpose:`the compaction summary model`,contextWindowTokens:a.compaction.modelContextWindowTokens,providerOptions:a.modelOptions?.providerOptions,source:r,sourcePath:i,value:a.compaction.model})),a.compaction?.thresholdPercent!==void 0&&(c.thresholdPercent=a.compaction.thresholdPercent),u!==void 0)return{...l,dynamicModel:u};if(s===void 0)throw Error(`Expected a static agent model to compile to a concrete model reference.`);return{...l,model:s}}function normalizeExperimentalDefinition(e){if(e===void 0)return;let t={};return e.
|
|
1
|
+
import{isAbsolute,relative,resolve}from"node:path";import{createCompiledBindingNamespaceLoader}from"#compiler/load-binding-namespace.js";import{normalizeLogicalPath}from"#discover/filesystem.js";import{toErrorMessage}from"#shared/errors.js";import{serializeOutputSchema}from"#tools/schema.js";import{isDynamicModelDefinition}from"#shared/agent-definition.js";import{normalizeAgentDefinition}from"#internal/authored-definition/core.js";import{formatLanguageModelGatewayId}from"#internal/runtime-model.js";import{classifyModelRouting}from"#internal/classify-model-routing.js";import{isChatGptModelRouting}from"#shared/chatgpt-model.js";import{parseJsonObject}from"#shared/json.js";import{loadModuleBackedDefinition}from"#compiler/normalize-helpers.js";async function compileAgentConfig(e,t,n){let r=n.source,i=formatAgentConfigModulePath(e,r,n.binding),a=normalizeAgentDefinition(Object.hasOwn(n,`definition`)?n.definition:await loadModuleBackedDefinition({binding:n.binding,displayPath:i,kind:`agent config`,loadNamespace:createCompiledBindingNamespaceLoader({bindings:{[r.sourceId]:n.binding},registries:t.registries}),source:r}),`Expected the agent config export "${r.exportName??`default`}" from "${i}" to match the public eve shape.`),o=isDynamicModelDefinition(a.model)?a.model:void 0,s=o===void 0?await normalizeAuthoredModelReference({modelCatalog:t.modelCatalog,purpose:`the primary compaction trigger model`,contextWindowTokens:a.modelContextWindowTokens,providerOptions:a.modelOptions?.providerOptions,source:r,sourcePath:i,value:a.model}):void 0,c={},l={compaction:c,name:e.agentId,source:{...r}};a.defaultTools!==void 0&&(l.defaultTools=a.defaultTools),a.description!==void 0&&(l.description=a.description);let u;o!==void 0&&(u={eventNames:Object.keys(o.events),exportName:r.exportName,sourceKind:`module`,logicalPath:r.logicalPath,sourceId:r.sourceId});let d=normalizeExperimentalDefinition(a.experimental);if(d!==void 0&&(l.experimental=d),a.build!==void 0&&(l.build={externalDependencies:a.build.externalDependencies===void 0?void 0:[...a.build.externalDependencies]}),a.outputSchema!==void 0&&(l.outputSchema=serializeOutputSchema(a.outputSchema)),a.reasoning!==void 0&&(l.reasoning=a.reasoning),a.tool!==void 0&&(l.tool=a.tool),a.limits!==void 0&&(l.limits={maxInputTokensPerSession:a.limits.maxInputTokensPerSession,maxOutputTokensPerSession:a.limits.maxOutputTokensPerSession,maxTokenCostUsdPerSession:a.limits.maxTokenCostUsdPerSession,sessionTimeoutMs:a.limits.sessionTimeoutMs}),a.compaction?.model!==void 0&&(c.model=await normalizeAuthoredModelReference({modelCatalog:t.modelCatalog,purpose:`the compaction summary model`,contextWindowTokens:a.compaction.modelContextWindowTokens,providerOptions:a.modelOptions?.providerOptions,source:r,sourcePath:i,value:a.compaction.model})),a.compaction?.thresholdPercent!==void 0&&(c.thresholdPercent=a.compaction.thresholdPercent),u!==void 0)return{...l,dynamicModel:u};if(s===void 0)throw Error(`Expected a static agent model to compile to a concrete model reference.`);return{...l,model:s}}function normalizeExperimentalDefinition(e){if(e===void 0)return;let t={};return e.workflow!==void 0&&(t.workflow={modelCallsPerStep:e.workflow.modelCallsPerStep,retention:e.workflow.retention,world:e.workflow.world}),t}async function normalizeAuthoredModelReference(e){if(typeof e.value==`string`)return await withCompiledRuntimeModelLimits({id:formatLanguageModelGatewayId(e.value),providerOptions:parseProviderOptionsRecord(e.providerOptions),routing:classifyModelRouting(e.value,e.providerOptions)},e);let t=e.source;if(t===void 0)throw Error(`Expected ${e.purpose} to provide a valid AI SDK language model reference.`);let n=e.value,r=n.specificationVersion;if(r!==`v2`&&r!==`v3`&&r!==`v4`||typeof n.provider!=`string`||typeof n.modelId!=`string`||typeof n.doGenerate!=`function`||typeof n.doStream!=`function`)throw Error(`Expected the authored agent config export "${t.exportName??`default`}" from "${e.sourcePath??t.logicalPath}" to provide a valid AI SDK language model.`);let i={id:formatLanguageModelGatewayId(n),source:{exportName:t.exportName,sourceKind:`module`,logicalPath:t.logicalPath,sourceId:t.sourceId},providerOptions:parseProviderOptionsRecord(e.providerOptions),routing:classifyModelRouting(n,e.providerOptions)};if(e.contextWindowTokens===void 0){if(isChatGptModelRouting(i.routing))return{...i,contextWindowTokens:2e5};try{let t=await e.modelCatalog.getByProviderModelId(n.provider,n.modelId);if(t)return{...i,id:t.slug,contextWindowTokens:t.limits.contextWindowTokens,maxOutputTokens:t.limits.maxOutputTokens}}catch{}}return await withCompiledRuntimeModelLimits(i,e)}function formatAgentConfigModulePath(e,t,n){return n.backing.kind===`programmatic`?t.logicalPath:normalizeLogicalPath(relative(resolveTopLevelAgentRoot(e),n.backing.sourcePath))}function resolveTopLevelAgentRoot(e){let t=resolve(e.appRoot),n=resolve(t,`agent`);return isPathInsideOrEqual(n,resolve(e.agentRoot))?n:t}function isPathInsideOrEqual(e,t){let n=relative(e,t);return n===``||!n.startsWith(`..`)&&!isAbsolute(n)}async function withCompiledRuntimeModelLimits(e,t){if(t.contextWindowTokens!==void 0)return{...e,contextWindowTokens:t.contextWindowTokens};let n;try{n=await t.modelCatalog.getModelLimits(e.id)}catch(n){throw Error(`Failed to load AI Gateway model metadata for ${t.purpose} "${e.id}". ${toErrorMessage(n)}`)}if(n===null)throw Error(`Cannot compile agent compaction because ${t.purpose} "${e.id}" does not have known AI Gateway context window metadata.`);return{...e,contextWindowTokens:n.contextWindowTokens,maxOutputTokens:n.maxOutputTokens}}function parseProviderOptionsRecord(e){if(e===void 0)return;let t={};for(let[n,r]of Object.entries(e))t[n]=parseJsonObject(r);return t}export{compileAgentConfig};
|