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
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import{resolveSelfModificationConfig}from"../../../config.js";import extension_default from"../../extension.js";import{resolveSelfModificationMode}from"../../../mode.js";import{defineDynamic,defineInstructions}from"eve/instructions";function packagedSubagentGuidance(e){return e.data?.invocation?.kind===`subagent`?`This self-modification subagent is implemented by the eve package, not an authored directory under /source. Configure its model, reasoning, and policy in /source/extensions/self-modification/extension.ts; do not search for or edit a child implementation directory.`:``}function readTrace(e){return e.data?.trace}function localTraceGuidance(e){let t=readTrace(e);return t===void 0?``:`The invoking trace has ID ${t.traceId}. ${(t.traceFlags&1)==1?`If local segments were captured,`:`This trace was not sampled, so local segments may be absent. If any are present,`} inspect them at /traces/${t.traceId}.`}function renderInstructions(e){return e.filter(e=>e.length>0).join(`
|
|
2
|
+
|
|
3
|
+
`)}var instructions_default=defineDynamic({events:{"session.started":e=>{let t=resolveSelfModificationMode(resolveSelfModificationConfig(extension_default.config));return t!==`local`&&t!==`deployed`?null:defineInstructions({markdown:renderInstructions([`## Role
|
|
4
|
+
|
|
5
|
+
You are an expert coding assistant operating inside of an eve agent. You help users by reading files, editing code, and writing new files that shape the behavior of the agent itself.`,`## Source workspace
|
|
6
|
+
|
|
7
|
+
The source code of the eve agent is mounted read-write at /source. /source is the authored agent directory. Locate source files with bash. Read source contents with read_file, not shell commands. Before generating an overwrite, ensure read_file has succeeded for that path. Shell reads do not satisfy write_file's read-before-write requirement. edit_file instead validates exact matches against current contents. Never modify source files with bash, sed, awk, redirection, or scripting.
|
|
8
|
+
|
|
9
|
+
Resolve named tools by filename under /source/tools before searching contents. Tool identifiers derive from filenames and may not occur in the implementation.`,packagedSubagentGuidance(e),`## Implement changes
|
|
10
|
+
|
|
11
|
+
Use edit_file for localized changes; include only the unique matching text. For a complete rewrite, use read_file then write_file; do not encode the whole old file as one replacement. If tool arguments fail argument parsing, retry the same tool with corrected encoding.
|
|
12
|
+
|
|
13
|
+
Once paths are known, batch independent file reads and edits to different files. Never edit the same file concurrently.`,`## Add model-callable actions
|
|
14
|
+
|
|
15
|
+
When the requester wants this agent to gain a reusable action or capability that it can invoke in future turns, implement it as an authored eve tool under /source/tools. This applies even when the request describes the action without using the word “tool.” Follow the path-derived naming and defineTool conventions in the mounted eve tools documentation and existing source.
|
|
16
|
+
|
|
17
|
+
Do not substitute a loose Python, shell, or JavaScript file for a model-callable tool. A support script is acceptable only when an authored eve tool invokes it as an implementation detail, or when the requester explicitly asks for a standalone script instead of an agent capability.`,`## Add integrations
|
|
18
|
+
|
|
19
|
+
Before adding a new eve-managed channel, connection, extension, instrumentation, or memory integration, call search_registry alongside source discovery. If an item fulfills the requirement, install it with registry_add using its exact address. If no matching item fulfills the requirement, or if the developer asks for a custom implementation, write the integration yourself.
|
|
20
|
+
|
|
21
|
+
Modifying the behavior of an existing skill or tool does not require a registry search. Registry search blocks implementation, not source inspection. Serialize registry installation and dependent edits. Run registry_add separately from file edits and other registry installations.
|
|
22
|
+
|
|
23
|
+
Registry installation is outside the source sandbox.`,`## Consult documentation
|
|
24
|
+
|
|
25
|
+
The eve framework documentation is mounted read-only at /eve-docs. Prefer source and existing local patterns. Before reading docs, identify the specific unresolved API question. Search the relevant file for its heading or term, then read only the bounded surrounding section. Do not concatenate wildcard files or read a full page when a section answers the question. Stop when the question is resolved.`,t===`local`?"## Local environment\n\nThe registry_add tool will complete installation for items that need no setup. In the local dev TUI, a `needs-terminal` result from the tool call automatically opens the existing setup panel for the user to complete setup there. In headless development, if a `needs-terminal` result includes `nextCommand`, present that exact value as the only shell command in your response. Never infer, construct, or rewrite a command: installing an item uses `eve add <item>`; `eve registry add` configures registry namespace mappings and does not install items.\n\nLocal eve dev logs are available read-only at /logs.\nLocal trace segments are mounted read-only at /traces when available. Inspect other traces only when the user asks about another session or broader behavior.\n\nThe application package.json is not mounted. Do not search outside /source for application files. You cannot run host binaries such as git, node, pnpm, or tsc. Use existing imports and registry_add for supported registry installations.":"## Deployed environment\n\nThe registry_add tool may return `completed`, `input-required`, `external-action-required`, `cancelled`, or `failed`. Supply only non-secret structured answers when continuing an `input-required` setup; set `installed: true` so the continuation does not reinstall source. Never request, accept, or repeat secret values. External authorization and secret binding are incomplete follow-up boundaries, not evidence that an integration is active.\n\nThe configured target branch is checked out as a disposable workspace under /workspace/repository. Make ordinary changes through /source, which is the writable view of the configured application's agent/ directory. Publication validates the final repository snapshot, including registry, manifest, and lockfile changes. Never modify Git refs, access GitHub directly, or use shell commands to write files. The sandbox has no reusable GitHub credential after checkout.\n\nComplete all edits and registry installations before publication, and call publish by itself. Before publication, review and summarize the complete intended scope. Call publish once with a concise title and summary. A successful result is only a draft pull request. Return its URL and changed paths, and state that merge and deployment have not occurred.",t===`local`?localTraceGuidance(e):``,`## Work efficiently
|
|
26
|
+
|
|
27
|
+
Skip task lists for simple work - only use them for complex actions. Never spend a turn only reporting status or updating the task list - batch them with other calls.
|
|
28
|
+
|
|
29
|
+
Treat a successful file-edit tool result as confirmation; do not reread a file solely to verify that the edit succeeded. Do not approximate unavailable build or test commands with broad source searches.`,t===`local`?`## Report results
|
|
30
|
+
|
|
31
|
+
For source-modification tasks, return a concise handoff to the caller. Use at most four short bullets covering changed paths and behavior, and any required setup or unresolved issues.
|
|
32
|
+
|
|
33
|
+
For investigation tasks, report the findings and supporting evidence requested by the caller.`:`## Report results
|
|
34
|
+
|
|
35
|
+
For source-modification tasks, return a concise handoff to the caller. Use at most four short bullets covering changed paths and behavior, and any required setup or unresolved issues. Include the draft pull request URL if one was published.
|
|
36
|
+
|
|
37
|
+
For investigation tasks, report the findings and supporting evidence requested by the caller.`])})}}});export{instructions_default as default};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type DefaultSandboxProbes } from "#sandbox/backends/probes.js";
|
|
2
|
+
import { type SandboxBackend, type SandboxDefinition } from "eve/sandbox";
|
|
3
|
+
import { type SelfModificationConfig } from "../../../config.js";
|
|
4
|
+
export interface SelfModificationSandboxOptions {
|
|
5
|
+
/**
|
|
6
|
+
* Production backend. Deployed self-modification owns an allow-all network
|
|
7
|
+
* policy and temporarily adds a credential transform while checking out its
|
|
8
|
+
* source. When omitted, eve selects Vercel Sandbox on Vercel or microsandbox
|
|
9
|
+
* on a supported self-hosted system.
|
|
10
|
+
*/
|
|
11
|
+
readonly backend?: SandboxBackend;
|
|
12
|
+
/** Policy shared with the agent and extension mount. */
|
|
13
|
+
readonly config?: SelfModificationConfig;
|
|
14
|
+
}
|
|
15
|
+
type SelfModificationSandboxProbes = Pick<DefaultSandboxProbes, "isDeployedOnVercel" | "isMicrosandboxSupported">;
|
|
16
|
+
/** Defines the local source mount or isolated production proposal workspace. */
|
|
17
|
+
export declare function defineSelfModificationSandbox(options?: SelfModificationSandboxOptions): SandboxDefinition;
|
|
18
|
+
/**
|
|
19
|
+
* Deployed self-modification deliberately selects a backend that can inject
|
|
20
|
+
* GitHub auth at the network boundary, keeping the credential outside the
|
|
21
|
+
* sandbox and agent. Docker and just-bash do not provide that separation.
|
|
22
|
+
* Internal—exported for tests, which inject availability probes.
|
|
23
|
+
*/
|
|
24
|
+
export declare function selectDeployedSelfModificationBackend(configured: SandboxBackend | undefined, probes: SelfModificationSandboxProbes): SandboxBackend;
|
|
25
|
+
declare const _default: SandboxDefinition;
|
|
26
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{resolveSelfModificationConfig}from"../../../config.js";import{createGitHubCredentialProvider}from"../../../credentials.js";import extension_default from"../../extension.js";import{SELF_MODIFICATION_BASELINE_NETWORK_POLICY}from"../../../network-policy.js";import{resolveSelfModificationMode}from"../../../mode.js";import{createSelfModificationFilesystem}from"../../../filesystem.js";import{REPOSITORY_PATH,prepareSelfModificationWorkspace}from"../../../git-workspace.js";import{shellQuote}from"#shared/shell-quote.js";import{SANDBOX_BACKEND_PROBES}from"#sandbox/backends/probes.js";import{defaultBackend,defineSandbox}from"eve/sandbox";import{justbash}from"eve/sandbox/just-bash";import{microsandbox}from"eve/sandbox/microsandbox";import{vercel}from"eve/sandbox/vercel";function defineSelfModificationSandbox(e={}){let t=resolveSelfModificationConfig(e.config??extension_default.config);return defineSandbox({backend:()=>{let n=resolveSelfModificationMode(t);return n===`local`?justbash({filesystem:createSelfModificationFilesystem}):n===`disabled`?e.backend??defaultBackend():selectDeployedSelfModificationBackend(e.backend,SANDBOX_BACKEND_PROBES)},async onSession({ctx:e,use:n}){if(resolveSelfModificationMode(t)!==`deployed`||t.deployed===void 0)return;if(e.session.parent===void 0)throw Error(`Production self-modification workspaces require a delegated child session.`);let r=t.deployed,i=await n();await i.setNetworkPolicy(SELF_MODIFICATION_BASELINE_NETWORK_POLICY);let a=await createGitHubCredentialProvider(r.credentials).resolve({capability:`checkout`,repository:r.repository});await prepareSelfModificationWorkspace({directory:r.directory,repository:r.repository,sandbox:i,targetBranch:r.targetBranch,token:a});let o=r.directory===`.`?REPOSITORY_PATH:`${REPOSITORY_PATH}/${r.directory}`;if((await i.run({command:`rm -rf /source && ln -s ${shellQuote(`${o}/agent`)} /source`})).exitCode!==0)throw Error(`Self-modification could not mount the production agent source.`)}})}function selectDeployedSelfModificationBackend(e,t){if(e!==void 0){if(e.name===`vercel`||e.name===`microsandbox`)return e;throw unsupportedBackend(e.name)}if(t.isDeployedOnVercel())return vercel({networkPolicy:SELF_MODIFICATION_BASELINE_NETWORK_POLICY});if(t.isMicrosandboxSupported())return microsandbox({networkPolicy:SELF_MODIFICATION_BASELINE_NETWORK_POLICY});throw unsupportedBackend()}function unsupportedBackend(e){let t=e===void 0?`No supported backend is available.`:`The configured ${e} backend does not support them.`;return Error(`Deployed self-modification requires runtime credential transforms. ${t} Use vercel() on Vercel or microsandbox() on a supported self-hosted system.`)}var sandbox_default=defineSelfModificationSandbox();export{sandbox_default as default,defineSelfModificationSandbox,selectDeployedSelfModificationBackend};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ToolContext } from "eve/tools";
|
|
2
2
|
/** Derives replay identity only from eve's verified delegation lineage. */
|
|
3
3
|
export declare function publicationOperationId(ctx: Pick<ToolContext, "session">): string;
|
|
4
|
-
declare const _default: import("eve/tools").DynamicSentinel<(import("eve/tools").ToolDefinition<Record<string, unknown>, import("
|
|
5
|
-
execute(input: Record<string, unknown>, ctx: ToolContext): Promise<import("
|
|
4
|
+
declare const _default: import("eve/tools").DynamicSentinel<(import("eve/tools").ToolDefinition<Record<string, unknown>, import("../../../../github-publisher.js").PublishedSelfModificationProposal> & {
|
|
5
|
+
execute(input: Record<string, unknown>, ctx: ToolContext): Promise<import("../../../../github-publisher.js").PublishedSelfModificationProposal>;
|
|
6
6
|
}) | null>;
|
|
7
7
|
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{resolveSelfModificationConfig}from"../../../../config.js";import{createGitHubCredentialProvider}from"../../../../credentials.js";import extension_default from"../../../extension.js";import{resolveSelfModificationMode}from"../../../../mode.js";import{readPreparedSelfModificationWorkspace}from"../../../../git-workspace.js";import{publishGitHubDraftPullRequest}from"../../../../github-publisher.js";import{withSelfModificationWorkspaceLock}from"../../../../workspace-lock.js";import{defineDynamic,defineTool}from"eve/tools";const inputSchema={type:`object`,additionalProperties:!1,properties:{summary:{type:`string`,minLength:1,maxLength:1e4,description:`Concise description of the proposed agent source change.`},title:{type:`string`,minLength:1,maxLength:256,description:`Concise draft pull request title.`}},required:[`summary`,`title`]},outputSchema={type:`object`,additionalProperties:!1,properties:{branch:{type:`string`},changedPaths:{type:`array`,items:{type:`string`}},commitSha:{type:`string`},deployed:{type:`boolean`,const:!1},draft:{type:`boolean`,const:!0},merged:{type:`boolean`,const:!1},pullRequestUrl:{type:`string`},repository:{type:`string`},targetBranch:{type:`string`}},required:[`branch`,`changedPaths`,`commitSha`,`deployed`,`draft`,`merged`,`pullRequestUrl`,`repository`,`targetBranch`]};function resolveTool(){let e=resolveSelfModificationConfig(extension_default.config);return resolveSelfModificationMode(e)!==`deployed`||e.deployed===void 0?null:defineTool({description:`Publish the complete validated agent source change as one draft pull request. Merge and deployment do not occur.`,inputSchema,outputSchema,execute:publish})}async function publish(e,t){if(typeof e!=`object`||!e||!(`summary`in e)||typeof e.summary!=`string`||e.summary.trim().length===0||!(`title`in e)||typeof e.title!=`string`||e.title.trim().length===0)throw Error(`Production publication requires a valid title and summary.`);let n=resolveSelfModificationConfig(extension_default.config);if(resolveSelfModificationMode(n)!==`deployed`||n.deployed===void 0)throw Error(`Production publication requires deployed self-modification configuration.`);let r=n.deployed,i=e.summary,a=e.title,o=publicationOperationId(t),s=await t.getSandbox();return await withSelfModificationWorkspaceLock(`sandbox:${s.id}`,async()=>{let e=await readPreparedSelfModificationWorkspace({...r,sandbox:s});return await publishGitHubDraftPullRequest({credentialProvider:createGitHubCredentialProvider(r.credentials),description:i,operationId:o,sandbox:s,title:a,workspace:e})})}function publicationOperationId(e){let t=e.session.parent;if(t===void 0)throw Error(`Production publication requires a delegated child session.`);return`${t.rootSessionId}:${t.sessionId}:${t.turn.id}:${t.callId}:${e.session.id}`}var publish_default=defineDynamic({events:{"session.started":resolveTool}});export{publish_default as default,publicationOperationId};
|
package/dist/src/self-modification/extension/{tools → subagents/agent/tools}/registry_add.d.ts
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type LocalDevCapability } from "eve/local-dev";
|
|
2
2
|
import { type ToolContext } from "eve/tools";
|
|
3
|
-
import { type ResolvedSelfModificationConfig } from "
|
|
4
|
-
import { type SpawnLike } from "
|
|
3
|
+
import { type ResolvedSelfModificationConfig } from "../../../../config.js";
|
|
4
|
+
import { type SpawnLike } from "../../../eve-add.js";
|
|
5
5
|
import { type CatalogEntry } from "./search_registry.js";
|
|
6
6
|
interface RegistryAddDependencies {
|
|
7
7
|
readonly getCapability?: () => LocalDevCapability | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{resolveSelfModificationConfig}from"../../../../config.js";import{classifyCatalogEntry}from"../../../classify-registry-item.js";import{runEveAdd}from"../../../eve-add.js";import extension_default from"../../../extension.js";import{assertOfficialRegistryAddress,installProductionRegistryItem}from"../../../production-registry-add.js";import{resolveSelfModificationMode}from"../../../../mode.js";import{readPreparedSelfModificationWorkspace}from"../../../../git-workspace.js";import{withSelfModificationWorkspaceLock}from"../../../../workspace-lock.js";import{loadRegistryIndex,officialRegistryIndexUrl,resolveRegistryIndexUrl}from"./search_registry.js";import{defineDynamic,defineTool}from"eve/tools";import{getLocalDevCapability}from"eve/local-dev";import{once}from"eve/tools/approval";const localInputSchema={type:`object`,additionalProperties:!1,properties:{address:{type:`string`,minLength:1,maxLength:200,description:"Exact address of an item in the configured eve registry, for example `channel/slack` or `extension/browserbase`."}},required:[`address`]},localOutputSchema={type:`object`,additionalProperties:!1,properties:{status:{type:`string`,enum:[`installed`,`needs-terminal`,`failed`]},address:{type:`string`},title:{type:`string`},envVars:{type:`array`,items:{type:`string`},description:`Environment variables the item needs that are not set. The item is installed but will not work until the developer sets them. Never ask for or repeat their values.`},reason:{type:`string`,description:`Why the item was not installed here.`},changed:{type:`array`,items:{type:`string`},description:`Project-relative paths a failed install could not restore.`},nextCommand:{type:`string`,description:"The command that completes a `needs-terminal` item."},message:{type:`string`,description:`One-line summary to relay to the developer.`}},required:[`status`,`address`,`message`]},productionInputSchema={type:`object`,additionalProperties:!1,properties:{address:{type:`string`,minLength:1,maxLength:200,description:"Exact official eve registry address, for example `channel/slack` or `extension/browserbase`."},answers:{type:`object`,additionalProperties:!0,description:`Non-secret answers to the setup question returned by the previous call.`},installed:{type:`boolean`,description:`Set to true with answers when the previous input-required result installed the source.`}},required:[`address`]},productionOutputSchema={type:`object`,additionalProperties:!1,properties:{status:{type:`string`,enum:[`completed`,`input-required`,`external-action-required`,`failed`,`cancelled`]},address:{type:`string`},changedPaths:{type:`array`,items:{type:`string`},description:`Repository-relative paths installed into the proposal.`},completedItems:{type:`array`,items:{type:`string`}},deploymentRequired:{type:`boolean`},installed:{type:`boolean`,description:`Whether source installation completed before setup paused.`},question:{type:`object`,additionalProperties:!0,description:`The current setup question. Supply only its non-secret answer on the next call.`},message:{type:`string`},url:{type:`string`,description:`External authorization URL the developer must open.`},userCode:{type:`string`}},required:[`status`,`address`]};function unsetEnvVars(e,t=process.env){return(e.envVars??[]).filter(e=>{let n=t[e];return n===void 0||n===``})}function handoffMessage(e){if(e.interactiveClient)return{message:`${e.title} was not installed by this tool. ${e.reason} Continue in the setup panel that opens here; do not ask the developer to run another command.`};let t=`eve add ${e.address}`;return{message:`${e.title} was not installed. ${e.reason} Run \`${t}\` in a terminal to finish it.`,nextCommand:t}}async function addLocalRegistryItem(e,t={}){let n=(t.getCapability??getLocalDevCapability)();if(n===void 0)throw Error("Registry items can only be installed while `eve dev` is running. Report the item address to the developer instead of installing it.");let r=(await loadRegistryIndex({nowMs:Date.now(),signal:t.signal,url:resolveRegistryIndexUrl()})).find(t=>t.address===e);if(r===void 0)throw Error(`No item in the configured eve registry is published at "${e}". Check the address before trying again.`);let i=classifyCatalogEntry(r);if(i.kind===`needs-terminal`){let t=handoffMessage({address:e,interactiveClient:n.interactiveClient,reason:i.reason,title:r.title});return{address:e,reason:i.reason,status:`needs-terminal`,title:r.title,...t}}let a=await withSelfModificationWorkspaceLock(`local:${n.appRoot}`,async()=>n.withSuspendedSource(()=>runEveAdd({address:e,appRoot:n.appRoot,signal:t.signal,spawn:t.spawn})));if(a.kind===`blocked`){let t=handoffMessage({address:e,interactiveClient:n.interactiveClient,reason:a.message,title:r.title});return{address:e,reason:a.message,status:`needs-terminal`,title:r.title,...t}}if(a.kind===`failed`)return a.changed===void 0?{address:e,status:`failed`,title:r.title,reason:a.message,message:a.message}:{address:e,status:`failed`,title:r.title,reason:a.message,message:a.message,changed:a.changed};let o=unsetEnvVars(r);return{address:e,envVars:[...o],message:o.length===0?`Installed ${r.title}.`:`Installed ${r.title}. It will not work until ${o.join(`, `)} ${o.length===1?`is`:`are`} set.`,status:`installed`,title:r.title}}async function addProductionRegistryItem(e,t,n,r){if(assertOfficialRegistryAddress(e),(await loadRegistryIndex({nowMs:Date.now(),signal:t.abortSignal,url:officialRegistryIndexUrl()})).find(t=>t.address===e)===void 0)throw Error(`No official eve registry item is published at "${e}".`);let i=await t.getSandbox(),a=await withSelfModificationWorkspaceLock(`sandbox:${i.id}`,async()=>{let a=await readPreparedSelfModificationWorkspace({...n,sandbox:i});return await installProductionRegistryItem({address:e,answers:r.answers,installed:r.installed,sandbox:i,signal:t.abortSignal,workspace:a})});return a.kind===`completed`?{address:e,...a,status:`completed`}:a.kind===`input-required`?{address:e,...a,status:`input-required`}:a.kind===`external-action-required`?{address:e,...a,status:`external-action-required`}:{address:e,...a,status:a.kind}}function localRegistryAddTool(){return defineTool({approval:once(),description:`Install an item from the configured eve registry into this project. Items that need setup are handed to the local setup flow instead. Search first, then call this with the exact item address.`,inputSchema:localInputSchema,outputSchema:localOutputSchema,async execute(e,t){let{address:n}=e;if(typeof n!=`string`||n.length===0)throw Error(`address must be an exact item address from the configured eve registry.`);return await addLocalRegistryItem(n,{signal:t.abortSignal})}})}function productionRegistryAddTool(e){return defineTool({approval:once(),description:`Install an exact item from the official eve registry into the current production change proposal. If setup pauses, call this tool again with the non-secret answers and the installed state from its result. External authorization and secret binding must be completed by the developer.`,inputSchema:productionInputSchema,outputSchema:productionOutputSchema,async execute(t,n){let{address:r}=t;if(typeof r!=`string`||r.length===0)throw Error(`address must be an exact item address from the official eve registry.`);return await addProductionRegistryItem(r,n,e,{answers:`answers`in t&&typeof t.answers==`object`&&t.answers!==null&&!Array.isArray(t.answers)?t.answers:void 0,installed:`installed`in t&&t.installed===!0})}})}function resolveRegistryAddTool(e){let t=resolveSelfModificationMode(e);return t===`local`?localRegistryAddTool():t===`deployed`&&e.deployed!==void 0?productionRegistryAddTool(e.deployed):null}var registry_add_default=defineDynamic({events:{"session.started":()=>resolveRegistryAddTool(resolveSelfModificationConfig(extension_default.config))}});export{addLocalRegistryItem,registry_add_default as default,handoffMessage,resolveRegistryAddTool,unsetEnvVars};
|
package/dist/src/self-modification/extension/{tools → subagents/agent/tools}/search_registry.js
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineTool}from"eve/tools";const CATEGORIES=[`channel`,`connection`,`extension`,`instrumentation`,`memory`],INDEX_PATH=`/registry.json`,FETCH_TIMEOUT_MS=1e4,inputSchema={type:`object`,additionalProperties:!1,properties:{query:{type:`string`,maxLength:200,description:`Free-text match against integration names, titles, and descriptions.`},category:{type:`string`,enum:[...CATEGORIES],description:`Restrict results to one registry category.`},limit:{type:`integer`,minimum:1,maximum:25,description:`Maximum number of items to return (default 10, maximum 25).`},offset:{type:`integer`,minimum:0,description:`Number of matching items to skip. Use nextOffset from a prior result to retrieve the next page.`}}},outputSchema={type:`object`,additionalProperties:!1,properties:{items:{type:`array`,items:{type:`object`,additionalProperties:!1,properties:{address:{type:`string`},title:{type:`string`},description:{type:`string`},category:{type:`string`},requires:{type:`string`},installed:{type:`boolean`}},required:[`address`,`title`]}},errors:{type:`array`,items:{type:`object`,additionalProperties:!1,properties:{registry:{type:`string`},message:{type:`string`}},required:[`registry`,`message`]}},total:{type:`integer`},hasMore:{type:`boolean`},nextOffset:{type:`integer`}},required:[`items`,`errors`,`total`,`hasMore`]};function isRecord(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function optionalString(e){return typeof e==`string`&&e.length>0?e:void 0}function isCategory(e){return CATEGORIES.includes(e)}function categoryOf(e){let t=e.split(`/`)[0];return t!==void 0&&e.includes(`/`)&&isCategory(t)?t:void 0}function titleFromAddress(e){return(e.split(`/`).at(-1)??e).split(`-`).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `)}function eveMetadata(e){let t=e.meta;if(!isRecord(t))return{};let n=t.eve;return isRecord(n)?n:{}}function authoredTargetOf(e){let t=e.files;if(Array.isArray(t))for(let e of t){if(!isRecord(e))continue;let t=optionalString(e.target);if(t?.startsWith(`agent/`)===!0)return t}}function declaredEnvVars(e){let t=e.envVars;return isRecord(t)?Object.keys(t):[]}function parseRegistryIndex(e){if(!isRecord(e)||!Array.isArray(e.items))return[];let t=[];for(let n of e.items){if(!isRecord(n))continue;let e=optionalString(n.name);if(e===void 0)continue;let r=eveMetadata(n);if(r.hidden===!0)continue;let i={address:e,title:optionalString(n.title)??titleFromAddress(e)},a=categoryOf(e);a!==void 0&&(i.category=a);let o=optionalString(n.description);o!==void 0&&(i.description=o);let s=optionalString(r.requires);s!==void 0&&(i.requires=s);let c=authoredTargetOf(n);c!==void 0&&(i.authoredTarget=c),r.setup!==void 0&&r.setup!==null&&(i.declaresSetup=!0);let l=declaredEnvVars(n);l.length>0&&(i.envVars=l),t.push(i)}return t}function selectIntegrations(e){return selectIntegrationPage(e).items}function selectIntegrationPage(e){let t=Math.min(Math.max(e.limit??10,1),25),n=Math.max(e.offset??0,0),r=(e.query??``).toLowerCase().split(/\s+/u).filter(e=>e.length>0),i=e.entries.map((e,t)=>{let n=`${e.address} ${e.title}`.toLowerCase();return{entry:e,haystack:[n,e.description??``].join(` `).toLowerCase(),index:t,primaryTerms:n}}),a=new Map(r.map(e=>{let t=i.filter(({haystack:t})=>t.includes(e)).length;return[e,Math.log((i.length+1)/(t+1))+1]})),o=i.map(({entry:t,haystack:n,index:i,primaryTerms:o})=>{if(e.category!==void 0&&!matchesCategory(t,e.category))return;if(r.length===0)return{entry:t,index:i,score:0};let s=r.reduce((e,t)=>{let r=a.get(t)??0;return o.includes(t)?e+2*r:n.includes(t)?e+r:e},0);return s>0?{entry:t,index:i,score:s}:void 0}).filter(e=>e!==void 0).sort((e,t)=>t.score-e.score||e.index-t.index),s=(o[0]?.score??0)*.4,c=o.filter(({score:e})=>e>=s),l=c.slice(n,n+t).map(({entry:e})=>{let t={address:e.address,title:e.title};return e.category!==void 0&&(t.category=e.category),e.description!==void 0&&(t.description=e.description),e.requires!==void 0&&(t.requires=e.requires),t}),u=n+l.length,d={hasMore:u<c.length,items:l,total:c.length};return u<c.length&&(d.nextOffset=u),d}function matchesCategory(e,t){return e.category===t}function officialRegistryIndexUrl(){return`https://eve.dev/r${INDEX_PATH}`}function resolveRegistryIndexUrl(e=process.env.EVE_DEV_OFFICIAL_REGISTRY_URL){if(e===void 0)return officialRegistryIndexUrl();let t;try{t=new URL(e)}catch{throw Error(`EVE_DEV_OFFICIAL_REGISTRY_URL must be an HTTP(S) URL.`)}if(t.protocol!==`http:`&&t.protocol!==`https:`)throw Error(`EVE_DEV_OFFICIAL_REGISTRY_URL must be an HTTP(S) URL.`);if(t.username!==``||t.password!==``)throw Error(`EVE_DEV_OFFICIAL_REGISTRY_URL must not include credentials.`);if(t.search!==``||t.hash!==``)throw Error(`EVE_DEV_OFFICIAL_REGISTRY_URL must not include a query or fragment.`);return t.pathname=`${t.pathname.replace(/\/+$/u,``)}${INDEX_PATH}`,t.toString()}let cache;function clearRegistryIndexCache(){cache=void 0}async function loadRegistryIndex(e){if(cache!==void 0&&cache.url===e.url&&e.nowMs-cache.fetchedAtMs<3e5)return cache.entries;let t=await fetch(e.url,{headers:{accept:`application/json`},signal:AbortSignal.any(e.signal===void 0?[AbortSignal.timeout(FETCH_TIMEOUT_MS)]:[e.signal,AbortSignal.timeout(FETCH_TIMEOUT_MS)])});if(!t.ok)throw Error(`Could not read the eve registry (${t.status}).`);let n=parseRegistryIndex(await t.json());return cache={entries:n,fetchedAtMs:e.nowMs,url:e.url},n}async function annotateInstalled(e){let t=new Map(e.entries.flatMap(e=>e.authoredTarget===void 0?[]:[[e.address,e.authoredTarget]]));if(e.rows.every(e=>t.get(e.address)===void 0))return e.rows;let n;try{n=await e.ctx.getSandbox()}catch{return e.rows}return await Promise.all(e.rows.map(async e=>{let r=t.get(e.address);if(r===void 0)return e;let i=`/source/${r.slice(6)}`;try{let t=await n.readTextFile({path:i});return{...e,installed:t!==null}}catch{return e}}))}var search_registry_default=defineTool({description:"Search the eve registry for integrations this project can add: channels, MCP connections, extensions, memory providers, and observability. Read-only — it installs nothing. Call it before writing an integration by hand, then pass an exact item address (for example `channel/slack`) to
|
|
1
|
+
import{defineTool}from"eve/tools";const CATEGORIES=[`channel`,`connection`,`extension`,`instrumentation`,`memory`],INDEX_PATH=`/registry.json`,FETCH_TIMEOUT_MS=1e4,inputSchema={type:`object`,additionalProperties:!1,properties:{query:{type:`string`,maxLength:200,description:`Free-text match against integration names, titles, and descriptions.`},category:{type:`string`,enum:[...CATEGORIES],description:`Restrict results to one registry category.`},limit:{type:`integer`,minimum:1,maximum:25,description:`Maximum number of items to return (default 10, maximum 25).`},offset:{type:`integer`,minimum:0,description:`Number of matching items to skip. Use nextOffset from a prior result to retrieve the next page.`}}},outputSchema={type:`object`,additionalProperties:!1,properties:{items:{type:`array`,items:{type:`object`,additionalProperties:!1,properties:{address:{type:`string`},title:{type:`string`},description:{type:`string`},category:{type:`string`},requires:{type:`string`},installed:{type:`boolean`}},required:[`address`,`title`]}},errors:{type:`array`,items:{type:`object`,additionalProperties:!1,properties:{registry:{type:`string`},message:{type:`string`}},required:[`registry`,`message`]}},total:{type:`integer`},hasMore:{type:`boolean`},nextOffset:{type:`integer`}},required:[`items`,`errors`,`total`,`hasMore`]};function isRecord(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function optionalString(e){return typeof e==`string`&&e.length>0?e:void 0}function isCategory(e){return CATEGORIES.includes(e)}function categoryOf(e){let t=e.split(`/`)[0];return t!==void 0&&e.includes(`/`)&&isCategory(t)?t:void 0}function titleFromAddress(e){return(e.split(`/`).at(-1)??e).split(`-`).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `)}function eveMetadata(e){let t=e.meta;if(!isRecord(t))return{};let n=t.eve;return isRecord(n)?n:{}}function authoredTargetOf(e){let t=e.files;if(Array.isArray(t))for(let e of t){if(!isRecord(e))continue;let t=optionalString(e.target);if(t?.startsWith(`agent/`)===!0)return t}}function declaredEnvVars(e){let t=e.envVars;return isRecord(t)?Object.keys(t):[]}function parseRegistryIndex(e){if(!isRecord(e)||!Array.isArray(e.items))return[];let t=[];for(let n of e.items){if(!isRecord(n))continue;let e=optionalString(n.name);if(e===void 0)continue;let r=eveMetadata(n);if(r.hidden===!0)continue;let i={address:e,title:optionalString(n.title)??titleFromAddress(e)},a=categoryOf(e);a!==void 0&&(i.category=a);let o=optionalString(n.description);o!==void 0&&(i.description=o);let s=optionalString(r.requires);s!==void 0&&(i.requires=s);let c=authoredTargetOf(n);c!==void 0&&(i.authoredTarget=c),r.setup!==void 0&&r.setup!==null&&(i.declaresSetup=!0);let l=declaredEnvVars(n);l.length>0&&(i.envVars=l),t.push(i)}return t}function selectIntegrations(e){return selectIntegrationPage(e).items}function selectIntegrationPage(e){let t=Math.min(Math.max(e.limit??10,1),25),n=Math.max(e.offset??0,0),r=(e.query??``).toLowerCase().split(/\s+/u).filter(e=>e.length>0),i=e.entries.map((e,t)=>{let n=`${e.address} ${e.title}`.toLowerCase();return{entry:e,haystack:[n,e.description??``].join(` `).toLowerCase(),index:t,primaryTerms:n}}),a=new Map(r.map(e=>{let t=i.filter(({haystack:t})=>t.includes(e)).length;return[e,Math.log((i.length+1)/(t+1))+1]})),o=i.map(({entry:t,haystack:n,index:i,primaryTerms:o})=>{if(e.category!==void 0&&!matchesCategory(t,e.category))return;if(r.length===0)return{entry:t,index:i,score:0};let s=r.reduce((e,t)=>{let r=a.get(t)??0;return o.includes(t)?e+2*r:n.includes(t)?e+r:e},0);return s>0?{entry:t,index:i,score:s}:void 0}).filter(e=>e!==void 0).sort((e,t)=>t.score-e.score||e.index-t.index),s=(o[0]?.score??0)*.4,c=o.filter(({score:e})=>e>=s),l=c.slice(n,n+t).map(({entry:e})=>{let t={address:e.address,title:e.title};return e.category!==void 0&&(t.category=e.category),e.description!==void 0&&(t.description=e.description),e.requires!==void 0&&(t.requires=e.requires),t}),u=n+l.length,d={hasMore:u<c.length,items:l,total:c.length};return u<c.length&&(d.nextOffset=u),d}function matchesCategory(e,t){return e.category===t}function officialRegistryIndexUrl(){return`https://eve.dev/r${INDEX_PATH}`}function resolveRegistryIndexUrl(e=process.env.EVE_DEV_OFFICIAL_REGISTRY_URL){if(e===void 0)return officialRegistryIndexUrl();let t;try{t=new URL(e)}catch{throw Error(`EVE_DEV_OFFICIAL_REGISTRY_URL must be an HTTP(S) URL.`)}if(t.protocol!==`http:`&&t.protocol!==`https:`)throw Error(`EVE_DEV_OFFICIAL_REGISTRY_URL must be an HTTP(S) URL.`);if(t.username!==``||t.password!==``)throw Error(`EVE_DEV_OFFICIAL_REGISTRY_URL must not include credentials.`);if(t.search!==``||t.hash!==``)throw Error(`EVE_DEV_OFFICIAL_REGISTRY_URL must not include a query or fragment.`);return t.pathname=`${t.pathname.replace(/\/+$/u,``)}${INDEX_PATH}`,t.toString()}let cache;function clearRegistryIndexCache(){cache=void 0}async function loadRegistryIndex(e){if(cache!==void 0&&cache.url===e.url&&e.nowMs-cache.fetchedAtMs<3e5)return cache.entries;let t=await fetch(e.url,{headers:{accept:`application/json`},signal:AbortSignal.any(e.signal===void 0?[AbortSignal.timeout(FETCH_TIMEOUT_MS)]:[e.signal,AbortSignal.timeout(FETCH_TIMEOUT_MS)])});if(!t.ok)throw Error(`Could not read the eve registry (${t.status}).`);let n=parseRegistryIndex(await t.json());return cache={entries:n,fetchedAtMs:e.nowMs,url:e.url},n}async function annotateInstalled(e){let t=new Map(e.entries.flatMap(e=>e.authoredTarget===void 0?[]:[[e.address,e.authoredTarget]]));if(e.rows.every(e=>t.get(e.address)===void 0))return e.rows;let n;try{n=await e.ctx.getSandbox()}catch{return e.rows}return await Promise.all(e.rows.map(async e=>{let r=t.get(e.address);if(r===void 0)return e;let i=`/source/${r.slice(6)}`;try{let t=await n.readTextFile({path:i});return{...e,installed:t!==null}}catch{return e}}))}var search_registry_default=defineTool({description:"Search the eve registry for integrations this project can add: channels, MCP connections, extensions, memory providers, and observability. Read-only — it installs nothing. Call it before writing an integration by hand, then pass an exact item address (for example `channel/slack`) to registry_add.",inputSchema,outputSchema,async execute(e,t){let n=[],r;try{r=resolveRegistryIndexUrl()}catch(e){return{errors:[{message:errorMessage(e),registry:`eve`}],hasMore:!1,items:[],total:0}}let i=[];try{i=await loadRegistryIndex({nowMs:Date.now(),signal:t.abortSignal,url:r})}catch(e){n.push({message:errorMessage(e),registry:r})}let a={entries:i},o=typeof e.category==`string`?e.category:void 0;o!==void 0&&isCategory(o)&&(a.category=o),typeof e.limit==`number`&&(a.limit=e.limit),typeof e.offset==`number`&&(a.offset=e.offset),typeof e.query==`string`&&(a.query=e.query);let s=selectIntegrationPage(a),c={errors:n,hasMore:s.hasMore,items:await annotateInstalled({ctx:t,entries:i,rows:s.items}),total:s.total};return s.nextOffset!==void 0&&(c.nextOffset=s.nextOffset),c}});function errorMessage(e){return e instanceof Error?e.message:String(e)}export{clearRegistryIndexCache,search_registry_default as default,loadRegistryIndex,officialRegistryIndexUrl,parseRegistryIndex,resolveRegistryIndexUrl,selectIntegrationPage,selectIntegrations};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SandboxSession } from "eve/sandbox";
|
|
2
2
|
import type { GitHubRepository } from "./config.js";
|
|
3
|
-
export declare const SELF_MODIFICATION_CONFIG_PATH = "agent/
|
|
3
|
+
export declare const SELF_MODIFICATION_CONFIG_PATH = "agent/extensions/self-modification/extension.ts";
|
|
4
4
|
export declare const WORKSPACE_PATH = "/workspace";
|
|
5
5
|
export declare const REPOSITORY_PATH = "/workspace/repository";
|
|
6
6
|
export declare const BASE_REF = "refs/eve-self-modification/base";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{assertFullSha,assertGitRef}from"./identifiers.js";import{gitOutput,runGitCommand,withBrokeredGitHubCredential}from"./git.js";import{shellQuote}from"#shared/shell-quote.js";import{gitHubRemoteUrl}from"#shared/git.js";const SELF_MODIFICATION_CONFIG_PATH=`agent/
|
|
1
|
+
import{assertFullSha,assertGitRef}from"./identifiers.js";import{gitOutput,runGitCommand,withBrokeredGitHubCredential}from"./git.js";import{shellQuote}from"#shared/shell-quote.js";import{gitHubRemoteUrl}from"#shared/git.js";const SELF_MODIFICATION_CONFIG_PATH=`agent/extensions/self-modification/extension.ts`,WORKSPACE_PATH=`/workspace`,REPOSITORY_PATH=`${WORKSPACE_PATH}/repository`,BASE_REF=`refs/eve-self-modification/base`;async function prepareSelfModificationWorkspace(e){assertGitRef(e.targetBranch,`target branch`);let t=gitHubRemoteUrl(e.repository);await withBrokeredGitHubCredential(e.sandbox,e.token,async()=>{await run(e.sandbox,`rm -rf ${quote(REPOSITORY_PATH)} && mkdir -p ${quote(REPOSITORY_PATH)}`),await run(e.sandbox,`git -C ${quote(REPOSITORY_PATH)} init`),await run(e.sandbox,`git -C ${quote(REPOSITORY_PATH)} remote add origin ${quote(t)}`),await run(e.sandbox,`GIT_CONFIG_NOSYSTEM=1 GIT_CONFIG_GLOBAL=/dev/null GIT_LFS_SKIP_SMUDGE=1 GIT_TERMINAL_PROMPT=0 git -C ${quote(REPOSITORY_PATH)} fetch --no-tags origin ${quote(`refs/heads/${e.targetBranch}`)}`),await run(e.sandbox,`git -C ${quote(REPOSITORY_PATH)} update-ref ${BASE_REF} FETCH_HEAD`),await run(e.sandbox,`git -C ${quote(REPOSITORY_PATH)} checkout --detach ${BASE_REF}`)});let n=await gitOutput(e.sandbox,`git -C ${quote(REPOSITORY_PATH)} rev-parse ${BASE_REF}`);return assertFullSha(n,`target branch revision`),await verifyApplicationRoot(e.sandbox,e.directory),{baseSha:n,directory:e.directory,repository:e.repository,repositoryPath:REPOSITORY_PATH,targetBranch:e.targetBranch}}async function readPreparedSelfModificationWorkspace(e){let t=await gitOutput(e.sandbox,`git -C ${quote(REPOSITORY_PATH)} rev-parse ${BASE_REF}`);return assertFullSha(t,`target branch revision`),await verifyApplicationRoot(e.sandbox,e.directory),{baseSha:t,directory:e.directory,repository:e.repository,repositoryPath:REPOSITORY_PATH,targetBranch:e.targetBranch}}async function verifyApplicationRoot(e,t){let n=t===`.`?REPOSITORY_PATH:`${REPOSITORY_PATH}/${t}`;if((await e.run({command:`test -d ${quote(`${n}/agent`)}`})).exitCode!==0)throw Error(`Self-modification source directory does not contain agent/: ${t}`)}function quote(e){return shellQuote(e)}async function run(e,t){await runGitCommand(e,t)}export{BASE_REF,REPOSITORY_PATH,SELF_MODIFICATION_CONFIG_PATH,WORKSPACE_PATH,prepareSelfModificationWorkspace,readPreparedSelfModificationWorkspace,verifyApplicationRoot};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const LEGACY_SELF_MODIFICATION_ROOT = "agent/subagents/self-modification";
|
|
2
|
+
export interface LegacySelfModificationScaffold {
|
|
3
|
+
readonly root: string;
|
|
4
|
+
readonly paths: readonly string[];
|
|
5
|
+
readonly customized: boolean;
|
|
6
|
+
readonly signature: string;
|
|
7
|
+
}
|
|
8
|
+
/** Reads only the bounded legacy scaffold; consumer modules are never imported or executed. */
|
|
9
|
+
export declare function detectLegacySelfModificationScaffold(appRoot: string): Promise<LegacySelfModificationScaffold | undefined>;
|
|
10
|
+
export declare function removeLegacySelfModificationScaffold(appRoot: string, scaffold: LegacySelfModificationScaffold): Promise<void>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import{readFile,readdir,rm}from"node:fs/promises";import{join,relative}from"node:path";const LEGACY_SELF_MODIFICATION_ROOT=`agent/subagents/self-modification`,LEGACY_FILES=[`agent.ts`,`config.ts`,`sandbox.ts`,`extensions/selfmod.ts`],LEGACY_DEFAULTS={"agent.ts":[`import { defineSelfModificationAgent } from "eve/self-modification/agent";
|
|
2
|
+
|
|
3
|
+
import config from "./config";
|
|
4
|
+
|
|
5
|
+
export default defineSelfModificationAgent({
|
|
6
|
+
config,
|
|
7
|
+
|
|
8
|
+
// To use a specific model instead of eve's default, add:
|
|
9
|
+
// model: "provider/model",
|
|
10
|
+
});
|
|
11
|
+
`],"sandbox.ts":[`import { defineSelfModificationSandbox } from "eve/self-modification/sandbox";
|
|
12
|
+
|
|
13
|
+
import config from "./config";
|
|
14
|
+
|
|
15
|
+
export default defineSelfModificationSandbox({ config });
|
|
16
|
+
`],"config.ts":[`import { defineSelfModificationConfig } from "eve/self-modification/config";
|
|
17
|
+
|
|
18
|
+
export default defineSelfModificationConfig({});
|
|
19
|
+
`,`import { defineSelfModificationConfig } from "eve/self-modification/config";
|
|
20
|
+
|
|
21
|
+
export default defineSelfModificationConfig({
|
|
22
|
+
local: { enabled: true },
|
|
23
|
+
});
|
|
24
|
+
`],"extensions/selfmod.ts":[`import selfModification from "eve/self-modification";
|
|
25
|
+
import config from "../config";
|
|
26
|
+
|
|
27
|
+
export default selfModification(config);
|
|
28
|
+
`]};async function detectLegacySelfModificationScaffold(e){let t=join(e,LEGACY_SELF_MODIFICATION_ROOT),n=await listFiles(t);if(!n.includes(`agent.ts`))return;let r=await readText(join(t,`agent.ts`));if(r===void 0||!r.includes(`defineSelfModificationAgent`))return;let i=new Set(LEGACY_FILES),a=JSON.stringify(await Promise.all(n.map(async e=>[e,await readText(join(t,e))]))),o=n.some(e=>!i.has(e))||(await Promise.all(Object.entries(LEGACY_DEFAULTS).map(async([e,n])=>{let r=await readText(join(t,e));return r===void 0||!n.includes(r)}))).some(Boolean)||!r.includes(`from "eve/self-modification/agent"`)||(await readText(join(t,`sandbox.ts`)))?.includes(`from "eve/self-modification/sandbox"`)!==!0;return{root:t,paths:n.map(e=>join(LEGACY_SELF_MODIFICATION_ROOT,e)),customized:o,signature:a}}async function removeLegacySelfModificationScaffold(e,t){let n=await detectLegacySelfModificationScaffold(e);if(n===void 0||n.root!==t.root||n.customized!==t.customized||n.signature!==t.signature)throw Error(`The self-modification scaffold changed while setup was waiting for cleanup approval.`);await rm(t.root,{recursive:!0,force:!0})}async function listFiles(e){try{return(await readdir(e,{recursive:!0,withFileTypes:!0})).filter(e=>e.isFile()).map(t=>relative(e,join(t.parentPath,t.name)).replaceAll(`\\`,`/`)).sort()}catch(e){if(e.code===`ENOENT`)return[];throw e}}async function readText(e){try{return await readFile(e,`utf8`)}catch(e){if(e.code===`ENOENT`)return;throw e}}export{LEGACY_SELF_MODIFICATION_ROOT,detectLegacySelfModificationScaffold,removeLegacySelfModificationScaffold};
|
|
@@ -35,5 +35,5 @@ interface RawChange {
|
|
|
35
35
|
readonly status: "A" | "D" | "M";
|
|
36
36
|
}
|
|
37
37
|
export declare function parseRawDiff(raw: string): readonly RawChange[];
|
|
38
|
-
export declare function assertAllowedChange(change: Pick<ProposalChange, "mode" | "objectId" | "path">, directory: string): void;
|
|
38
|
+
export declare function assertAllowedChange(change: Pick<ProposalChange, "mode" | "objectId" | "path">, directory: string, protectedMounts?: readonly string[]): void;
|
|
39
39
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{assertFullSha}from"./identifiers.js";import{gitOutput,runGitCommand}from"./git.js";import{createHash}from"node:crypto";import{shellQuote}from"#shared/shell-quote.js";const MAX_PROPOSAL_CHANGED_BYTES=1e6,MAX_PROPOSAL_CHANGED_FILES=100;async function captureSelfModificationProposal(e){let t=quote(e.workspace.repositoryPath);assertFullSha(e.workspace.baseSha,`proposal base revision`),await runGitCommand(e.sandbox,`git -C ${t} add -A -- .`);let n=await gitOutput(e.sandbox,`git -C ${t} write-tree`),r=await gitOutput(e.sandbox,`git -C ${t} rev-parse ${quote(`${e.workspace.baseSha}^{tree}`)}`);assertFullSha(n,`proposal tree`),assertFullSha(r,`proposal base tree`);let i=parseRawDiff(await gitOutput(e.sandbox,`git -C ${t} diff-tree -r --no-commit-id --raw -z --no-renames ${quote(e.workspace.baseSha)} ${quote(n)}`,!1));if(i.length===0)throw Error(`Self-modification proposal contains no changes.`);if(i.length>100)throw Error(`Self-modification proposal changes ${i.length} files; limit is 100.`);let a=[],
|
|
1
|
+
import{assertFullSha}from"./identifiers.js";import{gitOutput,runGitCommand}from"./git.js";import{createHash}from"node:crypto";import{shellQuote}from"#shared/shell-quote.js";const MAX_PROPOSAL_CHANGED_BYTES=1e6,MAX_PROPOSAL_CHANGED_FILES=100;async function captureSelfModificationProposal(e){let t=quote(e.workspace.repositoryPath);assertFullSha(e.workspace.baseSha,`proposal base revision`),await runGitCommand(e.sandbox,`git -C ${t} add -A -- .`);let n=await gitOutput(e.sandbox,`git -C ${t} write-tree`),r=await gitOutput(e.sandbox,`git -C ${t} rev-parse ${quote(`${e.workspace.baseSha}^{tree}`)}`);assertFullSha(n,`proposal tree`),assertFullSha(r,`proposal base tree`);let i=parseRawDiff(await gitOutput(e.sandbox,`git -C ${t} diff-tree -r --no-commit-id --raw -z --no-renames ${quote(e.workspace.baseSha)} ${quote(n)}`,!1));if(i.length===0)throw Error(`Self-modification proposal contains no changes.`);if(i.length>100)throw Error(`Self-modification proposal changes ${i.length} files; limit is 100.`);let a=await selfModificationMountPaths({directory:e.workspace.directory,repositoryPath:e.workspace.repositoryPath,sandbox:e.sandbox,tree:e.workspace.baseSha}),o=await selfModificationMountPaths({directory:e.workspace.directory,repositoryPath:e.workspace.repositoryPath,sandbox:e.sandbox,tree:n}),s=[...new Set([...a,...o])],c=[],l=0;for(let t of i){let n=t.status===`D`?null:proposalMode(t.newMode,t.path),r=t.status===`D`?null:t.newObjectId;assertAllowedChange({mode:n,objectId:r,path:t.path},e.workspace.directory,s);let i=r===null?0:await blobSize(e.sandbox,e.workspace.repositoryPath,r);if(l+=i,l>1e6)throw Error(`Self-modification proposal changes more than ${MAX_PROPOSAL_CHANGED_BYTES} bytes.`);c.push({bytes:i,kind:t.status===`A`?`add`:t.status===`D`?`delete`:`modify`,mode:n,objectId:r,path:t.path})}return{baseSha:e.workspace.baseSha,baseTreeSha:r,changedBytes:l,changes:c,proposedTreeSha:n}}async function readProposalBlob(e){if(e.change.objectId===null)throw Error(`Cannot read a deleted proposal blob.`);let t=await gitOutput(e.sandbox,`git -C ${quote(e.workspace.repositoryPath)} cat-file blob ${quote(e.change.objectId)} | base64 | tr -d '\\n'`),n=Buffer.from(t,`base64`),r=createHash(`sha1`).update(`blob ${n.byteLength}\0`).update(n).digest(`hex`);if(n.byteLength!==e.change.bytes||r!==e.change.objectId.toLowerCase())throw Error(`Self-modification proposal blob changed after validation: ${JSON.stringify(e.change.path)}.`);return t}function parseRawDiff(e){if(e.length===0)return[];let t=e.split(`\0`);if(t.at(-1)===``&&t.pop(),t.length%2!=0)throw Error(`Git returned malformed raw diff output.`);let n=[];for(let e=0;e<t.length;e+=2){let r=t[e],i=t[e+1],a=r===void 0?null:/^:[0-7]{6} ([0-7]{6}) [a-f0-9]{40} ([a-f0-9]{40}) ([ADM])$/u.exec(r);if(a===null||i===void 0||!isSafePath(i))throw Error(`Git returned malformed raw diff output.`);n.push({newMode:a[1],newObjectId:a[2],path:i,status:a[3]})}return n}function assertAllowedChange(e,t,n=[]){let r=e.path,i=t===`.`?``:`${t}/`,a=`${i}agent/`,o=r.split(`/`),s=o.at(-1)??``;if(!isSafePath(r)||o.includes(`.git`)||s===`.env`||s===`.envrc`||s.startsWith(`.env.`)||o.some(e=>[`node_modules`,`dist`,`build`,`.next`,`.output`,`.turbo`,`.vercel`,`coverage`,`out`].includes(e))||r.startsWith(`.github/workflows/`)||r.startsWith(`${a}subagents/self-modification/`)||r.startsWith(`${a}extensions/self-modification/`)||r===`${i}agent/extensions/self-modification.ts`||n.some(e=>r===e||r.startsWith(`${e}/`))||r===`${i}agent/extensions/selfmod.ts`||r===`${i}agent/self-modification.config.ts`)throw Error(`Self-modification proposal changes a protected path: ${JSON.stringify(r)}.`)}async function selfModificationMountPaths(e){let t=`${e.directory===`.`?``:`${e.directory}/`}agent/extensions`,n=await gitOutput(e.sandbox,`git -C ${quote(e.repositoryPath)} grep -l -z -F -- "eve/self-modification" ${quote(e.tree)} -- ${quote(t)}`,!1).catch(e=>{if(e instanceof Error&&e.message.includes(`failed with exit 1:`))return``;throw e});return[...new Set(n.split(`\0`).filter(Boolean).flatMap(e=>{let n=e.slice(e.indexOf(`:`)+1);if(!n.startsWith(`${t}/`))return[];let r=n.slice(t.length+1);return r.endsWith(`/extension.ts`)?[`${t}/${r.slice(0,-13)}`]:r.includes(`/`)?[`${t}/${r.split(`/`)[0]}`]:[n]}))]}function isSafePath(e){return e.length>0&&!e.startsWith(`/`)&&!e.includes(`\\`)&&!e.includes(`
|
|
2
2
|
`)&&!e.includes(`\r`)&&!e.split(`/`).some(e=>e===``||e===`.`||e===`..`)}function proposalMode(e,t){if(e===`100644`||e===`100755`)return e;throw Error(`Self-modification proposal uses unsafe Git mode ${e}: ${JSON.stringify(t)}.`)}async function blobSize(e,t,n){assertFullSha(n,`proposal blob`);let r=await gitOutput(e,`git -C ${quote(t)} cat-file -s ${quote(n)}`);if(!/^\d+$/u.test(r)||!Number.isSafeInteger(Number(r)))throw Error(`Git returned an invalid blob size.`);return Number(r)}function quote(e){return shellQuote(e)}export{MAX_PROPOSAL_CHANGED_BYTES,MAX_PROPOSAL_CHANGED_FILES,assertAllowedChange,captureSelfModificationProposal,parseRawDiff,readProposalBlob};
|
|
@@ -1,26 +1,12 @@
|
|
|
1
|
-
import { type DefaultSandboxProbes } from "#sandbox/backends/default.js";
|
|
2
1
|
import { type SandboxBackend, type SandboxDefinition } from "#public/sandbox/index.js";
|
|
3
|
-
|
|
2
|
+
/** Options retained for source compatibility with the retired scaffold. */
|
|
4
3
|
export interface SelfModificationSandboxOptions {
|
|
5
|
-
/**
|
|
6
|
-
* Production backend. Deployed self-modification owns an allow-all network
|
|
7
|
-
* policy and temporarily adds a credential transform while checking out its
|
|
8
|
-
* source. When omitted, eve selects Vercel Sandbox on Vercel or microsandbox
|
|
9
|
-
* on a supported self-hosted system.
|
|
10
|
-
*/
|
|
11
4
|
readonly backend?: SandboxBackend;
|
|
12
|
-
|
|
13
|
-
readonly config?: SelfModificationConfig;
|
|
5
|
+
readonly config?: unknown;
|
|
14
6
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
export declare function defineSelfModificationSandbox(
|
|
18
|
-
/**
|
|
19
|
-
* Deployed self-modification deliberately selects a backend that can inject
|
|
20
|
-
* GitHub auth at the network boundary, keeping the credential outside the
|
|
21
|
-
* sandbox and agent. Docker and just-bash do not provide that separation.
|
|
22
|
-
* Internal—exported for tests, which inject availability probes.
|
|
23
|
-
*/
|
|
24
|
-
export declare function selectDeployedSelfModificationBackend(configured: SandboxBackend | undefined, probes: SelfModificationSandboxProbes): SandboxBackend;
|
|
7
|
+
/** @deprecated The scaffolded sandbox is inert; use the packaged extension. */
|
|
8
|
+
export declare function selectDeployedSelfModificationBackend(configured: SandboxBackend | undefined, _probes: unknown): SandboxBackend;
|
|
9
|
+
export declare function defineSelfModificationSandbox(_options?: SelfModificationSandboxOptions): SandboxDefinition;
|
|
10
|
+
/** @deprecated The scaffolded sandbox is inert; use the packaged extension. */
|
|
25
11
|
declare const _default: SandboxDefinition;
|
|
26
12
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{defineSandbox}from"#public/sandbox/index.js";function selectDeployedSelfModificationBackend(e,t){if(e!==void 0)return e;throw Error(`Deployed self-modification is disabled in the retired scaffold.`)}function defineSelfModificationSandbox(e={}){return defineSandbox({})}var sandbox_default=defineSelfModificationSandbox();export{sandbox_default as default,defineSelfModificationSandbox,selectDeployedSelfModificationBackend};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import{SELF_MODIFICATION_CONFIG_PATH}from"./git-workspace.js";import{createHash}from"node:crypto";import{readFile,writeFile}from"node:fs/promises";import{join,relative}from"node:path";import{discoverAgent}from"#discover/discover-agent.js";import{execFile}from"node:child_process";import{promisify}from"node:util";import{stripLogicalPathExtension}from"#discover/filesystem.js";import{captureVercel,runVercelCaptureStdout}from"#setup/primitives/run-vercel.js";const runFile=promisify(execFile),defaultDependencies={captureVercel,runVercelCaptureStdout};function connectorName(e,t){return`selfmod-${e}-${t}`.toLowerCase().replaceAll(/[^a-z0-9-]/gu,`-`)}function renderSelfModificationConfig(e){if(e===void 0)return`import
|
|
1
|
+
import{SELF_MODIFICATION_CONFIG_PATH}from"./git-workspace.js";import{createHash}from"node:crypto";import{mkdir,readFile,writeFile}from"node:fs/promises";import{join,relative}from"node:path";import{discoverAgent}from"#discover/discover-agent.js";import{execFile}from"node:child_process";import{promisify}from"node:util";import{stripLogicalPathExtension}from"#discover/filesystem.js";import{captureVercel,runVercelCaptureStdout}from"#setup/primitives/run-vercel.js";const runFile=promisify(execFile),defaultDependencies={captureVercel,runVercelCaptureStdout};function connectorName(e,t){return`selfmod-${e}-${t}`.toLowerCase().replaceAll(/[^a-z0-9-]/gu,`-`)}function renderSelfModificationConfig(e){if(e===void 0)return`import selfModification from "eve/self-modification";
|
|
2
2
|
|
|
3
|
-
export default
|
|
4
|
-
|
|
3
|
+
export default selfModification({
|
|
4
|
+
// model: "provider/model",
|
|
5
|
+
// reasoning: "high",
|
|
5
6
|
});
|
|
6
7
|
`;let t=[...new Set(e.channelNames)].filter(e=>e!==`eve`).sort(),n=(e.vercelBackend?t:[]).map(e=>` case ${JSON.stringify(`channel:${e}`)}:
|
|
7
8
|
// Authorize trusted principals for this channel before returning true.
|
|
@@ -18,9 +19,9 @@ export default defineSelfModificationConfig({
|
|
|
18
19
|
);
|
|
19
20
|
}
|
|
20
21
|
`:``}${n}`,i=`Self-modification could not obtain a GitHub credential from Vercel Connect for ${e.connector}. Install and attach the configured GitHub connector to this Vercel project, install the managed GitHub App for the configured repository, then retry.`,a=`import { getToken } from "@vercel/connect";
|
|
21
|
-
import
|
|
22
|
+
import selfModification from "eve/self-modification";
|
|
22
23
|
|
|
23
|
-
export default
|
|
24
|
+
export default selfModification({
|
|
24
25
|
deployed: {
|
|
25
26
|
source: {
|
|
26
27
|
git: {
|
|
@@ -64,4 +65,4 @@ ${r} default:
|
|
|
64
65
|
export default defineSelfModificationConfig({});
|
|
65
66
|
`)return`local`;let[t,...n]=e.split(`
|
|
66
67
|
`);return/^\/\/ eve-self-modification: generated-v1 digest:([a-f0-9]{64})$/u.exec(t??``)?.[1]===createHash(`sha256`).update(n.join(`
|
|
67
|
-
`)).digest(`hex`)?`generated`:`authored`}function parseGitHubRemote(e){let t=e.trim().match(/^(?:https?:\/\/github\.com\/|git@github\.com:|ssh:\/\/git@github\.com\/)([^/]+)\/([^/]+?)(?:\.git)?$/u);return t?.[1]===void 0||t[2]===void 0?void 0:{owner:t[1],repo:t[2]}}function defaultSelfModificationSetupOperations(e,t=defaultDependencies,n=e){let r=join(e,SELF_MODIFICATION_CONFIG_PATH);return{async detectChannelNames(){return(await discoverAgent({appRoot:e,agentRoot:join(e,`agent`)})).manifest.channels.map(e=>stripLogicalPathExtension(e.logicalPath).replace(/^channels\//,``))},async detectGitRepository(){let t=await gitOutput(e,[`config`,`--get`,`remote.origin.url`]),n=t===void 0?void 0:parseGitHubRemote(t),r=await gitOutput(e,[`symbolic-ref`,`--quiet`,`--short`,`refs/remotes/origin/HEAD`]),i=await gitOutput(e,[`rev-parse`,`--show-toplevel`]);return{...n,branch:r?.replace(/^origin\//u,``),directory:i===void 0?void 0:repositoryRelativeDirectory(i,e),remoteKind:t===void 0?`missing`:n===void 0?`other`:`github`}},async readConfig(){try{return await readFile(r,`utf8`)}catch(e){if(e.code===`ENOENT`)return;throw e}},writeConfig
|
|
68
|
+
`)).digest(`hex`)?`generated`:`authored`}function parseGitHubRemote(e){let t=e.trim().match(/^(?:https?:\/\/github\.com\/|git@github\.com:|ssh:\/\/git@github\.com\/)([^/]+)\/([^/]+?)(?:\.git)?$/u);return t?.[1]===void 0||t[2]===void 0?void 0:{owner:t[1],repo:t[2]}}function defaultSelfModificationSetupOperations(e,t=defaultDependencies,n=e){let r=join(e,SELF_MODIFICATION_CONFIG_PATH);return{async detectChannelNames(){return(await discoverAgent({appRoot:e,agentRoot:join(e,`agent`)})).manifest.channels.map(e=>stripLogicalPathExtension(e.logicalPath).replace(/^channels\//,``))},async detectGitRepository(){let t=await gitOutput(e,[`config`,`--get`,`remote.origin.url`]),n=t===void 0?void 0:parseGitHubRemote(t),r=await gitOutput(e,[`symbolic-ref`,`--quiet`,`--short`,`refs/remotes/origin/HEAD`]),i=await gitOutput(e,[`rev-parse`,`--show-toplevel`]);return{...n,branch:r?.replace(/^origin\//u,``),directory:i===void 0?void 0:repositoryRelativeDirectory(i,e),remoteKind:t===void 0?`missing`:n===void 0?`other`:`github`}},async readConfig(){try{return await readFile(r,`utf8`)}catch(e){if(e.code===`ENOENT`)return;throw e}},async writeConfig(e){await mkdir(join(r,`..`),{recursive:!0}),await writeFile(r,e,`utf8`)},async findOrCreateConnector(e,r){let i=await listGitHubConnectors(n,r,t.captureVercel),a=`github/${e}`,o=i.find(e=>e.uid===a);if(o!==void 0){if(o.type!==`github`)throw Error(`The existing connector ${a} is not a GitHub connector.`);return o.uid}let s=await t.runVercelCaptureStdout([`connect`,`create`,`github`,`--name`,e,`-F`,`json`,`--scope`,r.orgId],{cwd:n}),c=s.ok?parseCreatedConnector(s.stdout):void 0;if(c===void 0||!c.startsWith(`github/`))throw Error(`Could not create a GitHub Vercel Connect connector.`);return c},async attachConnector(e,r){if(!(await t.runVercelCaptureStdout([`connect`,`attach`,e,`--project`,r.projectId,`--environment`,`production`,`--yes`,`--scope`,r.orgId],{cwd:n})).ok)throw Error(`Could not attach ${e} to the selected Vercel project for Production.`)}}}function parseCreatedConnector(e){try{let t=JSON.parse(e);return typeof t.uid==`string`?t.uid:void 0}catch{return}}function parseConnectorListPage(e){try{let t=JSON.parse(e);if(!Array.isArray(t.connectors))return;let n=t.connectors.flatMap(e=>typeof e==`object`&&e&&typeof e.uid==`string`&&typeof e.type==`string`?[{uid:e.uid,type:e.type}]:[]);return typeof t.cursor==`string`?{connectors:n,cursor:t.cursor}:{connectors:n}}catch{return}}async function listGitHubConnectors(e,t,n){let r=[],i=new Set,a;do{let o=[`connect`,`list`,`--all-projects`,`--service`,`github`,`-F`,`json`,`--scope`,t.orgId];a!==void 0&&o.push(`--next`,a);let s=await n(o,{cwd:e});if(!s.ok)throw Error(`Could not list GitHub connectors for the selected Vercel project. ${s.failure.message}`);let c=parseConnectorListPage(s.stdout);if(c===void 0)throw Error(`Vercel returned an invalid GitHub connector list for the selected project.`);if(r.push(...c.connectors),c.cursor!==void 0&&i.has(c.cursor))throw Error(`The GitHub connector list repeated cursor ${c.cursor}.`);c.cursor!==void 0&&i.add(c.cursor),a=c.cursor}while(a!==void 0);return r}function repositoryRelativeDirectory(e,t,n=relative){return n(e,t).replaceAll(`\\`,`/`)||`.`}function repositoryPartError(e){return/^[A-Za-z0-9_.-]+$/u.test(e)?void 0:`Enter a valid GitHub owner or repository name.`}function directoryError(e){return e===`.`||e.length>0&&!e.startsWith(`/`)&&!e.includes(`\\`)&&e.split(`/`).every(e=>e!==``&&e!==`.`&&e!==`..`)?void 0:`Enter a safe repository-relative directory or ".".`}function gitRefError(e){return/^[A-Za-z0-9][A-Za-z0-9._/-]*$/u.test(e)&&!e.endsWith(`.`)&&!e.endsWith(`/`)&&!e.includes(`..`)&&!e.includes(`//`)&&!e.includes(`@{`)?void 0:`Enter a valid branch name.`}async function gitOutput(e,t){try{return(await runFile(`git`,t,{cwd:e})).stdout.trim()||void 0}catch{return}}export{classifySelfModificationConfig,connectorName,defaultSelfModificationSetupOperations,directoryError,gitRefError,parseGitHubRemote,renderSelfModificationConfig,repositoryPartError,repositoryRelativeDirectory};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import{createRegistrySession}from"./registry-session.js";import{WizardCancelledError}from"#setup/step.js";import{HumanActionRequiredError}from"#setup/human-action.js";import{withSpinner}from"#setup/with-spinner.js";function label(e){return e.name}var RegistryFlowFailedError=class extends Error{completed;constructor(e,t){super(e instanceof Error?e.message:String(e),{cause:e}),this.name=`RegistryFlowFailedError`,this.completed=t}};function hasSettledOutcomes(e){return e!==void 0&&(e.items.length>0||e.failures.length>0||e.outcomes!==void 0)}async function runRegistryFlow(e){let t;try{let n=e.initialAddress?.trim(),r;if(n!==void 0&&n!==``)r=[{address:n,name:n,source:`Registry`}];else{let t=e.deps?.browseRegistryCatalog??(await import(`#cli/commands/registry.js`)).browseRegistryCatalog,n=await withSpinner(e.prompter,`Loading registry…`,()=>t(e.appRoot)),i=[...n.items],a=await e.prompter.select({message:`Add to your agent`,search:!0,options:i.map(e=>({value:e.address,label:e.name,hint:e.address,keywords:[e.title??``,e.description??``]})),notices:n.errors.map(e=>({tone:`warning`,text:`${e.registry}: ${e.message}`}))}),o=i.find(e=>e.address===a);if(o===void 0)throw Error(`That registry item is no longer available. Run /add to try again.`);r=[o]}let i=e.deps?.installRegistryItem??(await import(`#cli/commands/registry.js`)).installRegistryItem,a=e.installRoot??e.appRoot,o=e.deps?.detectDeployment??(await import(`#setup/project-resolution.js`)).detectDeployment,s=e.deps?.runDeployFlow??(await import(`./deploy.js`)).runDeployFlow;t=createRegistrySession({detectDeployment:o,runDeployFlow:s}),e.onScreen?.({screen:`registry_install`});let c=t;for(let[t,n]of r.entries()){e.signal?.throwIfAborted(),e.onItemStart?.(n,t,r.length);try{let install=(t=e.signal)=>i(a,n.address,{silent:!0,prompter:e.prompter,signal:t}),run=()=>e.runItem===void 0?install():e.runItem(install),t=await(e.prompter.withExclusiveTerminal?.(run)??run());c.add(label(n),t.output,t.setup)}catch(t){if(e.signal?.throwIfAborted(),t instanceof WizardCancelledError){c.addCancellation(label(n));continue}if(t instanceof HumanActionRequiredError)throw t;let r=(t instanceof Error?t.message:String(t)).trim()||`Installation failed
|
|
2
|
-
`).find(e=>e.trim()!==``);c.addFailure(label(n),r);let a={message:`Couldn't add ${label(n)}`,options:[{value:`skip`,label:`Skip ${label(n)}`},{value:`cancel`,label:`Cancel setup`}]};if(i!==void 0&&(a.description=i),await e.prompter.select(a)===`cancel`)return{kind:`done`,result:{...c.result(),cancelled:!0}}}}return{kind:`done`,result:await c.continueAfterInstall({appRoot:e.appRoot,prompter:e.prompter,signal:e.signal})}}catch(e){if(e instanceof WizardCancelledError){let e=t?.result();return hasSettledOutcomes(e)?{kind:`done`,result:{...e,cancelled:!0}}:{kind:`cancelled`}}let n=t?.result();throw hasSettledOutcomes(n)?new RegistryFlowFailedError(e,n):e}}export{RegistryFlowFailedError,runRegistryFlow};
|
|
1
|
+
import{createRegistrySession}from"./registry-session.js";import{WizardCancelledError}from"#setup/step.js";import{HumanActionRequiredError}from"#setup/human-action.js";import{withSpinner}from"#setup/with-spinner.js";function label(e){return e.name}var RegistryFlowFailedError=class extends Error{completed;constructor(e,t){super(e instanceof Error?e.message:String(e),{cause:e}),this.name=`RegistryFlowFailedError`,this.completed=t}};function hasSettledOutcomes(e){return e!==void 0&&(e.items.length>0||e.failures.length>0||e.outcomes!==void 0)}async function runRegistryFlow(e){let t;try{let n=e.initialAddress?.trim(),r;if(n!==void 0&&n!==``)r=[{address:n,name:n,source:`Registry`}];else{let t=e.deps?.browseRegistryCatalog??(await import(`#cli/commands/registry.js`)).browseRegistryCatalog,n=await withSpinner(e.prompter,`Loading registry…`,()=>t(e.appRoot)),i=[...n.items],a=await e.prompter.select({message:`Add to your agent`,search:!0,options:i.map(e=>({value:e.address,label:e.name,hint:e.address,keywords:[e.title??``,e.description??``]})),notices:n.errors.map(e=>({tone:`warning`,text:`${e.registry}: ${e.message}`}))}),o=i.find(e=>e.address===a);if(o===void 0)throw Error(`That registry item is no longer available. Run /add to try again.`);r=[o]}let i=e.deps?.installRegistryItem??(await import(`#cli/commands/registry.js`)).installRegistryItem,a=e.installRoot??e.appRoot,o=e.deps?.detectDeployment??(await import(`#setup/project-resolution.js`)).detectDeployment,s=e.deps?.runDeployFlow??(await import(`./deploy.js`)).runDeployFlow;t=createRegistrySession({detectDeployment:o,runDeployFlow:s}),e.onScreen?.({screen:`registry_install`});let c=t;for(let[t,n]of r.entries()){e.signal?.throwIfAborted(),e.onItemStart?.(n,t,r.length);try{let install=(t=e.signal)=>i(a,n.address,{silent:!0,prompter:e.prompter,signal:t}),run=()=>e.runItem===void 0?install():e.runItem(install),t=await(e.prompter.withExclusiveTerminal?.(run)??run());c.add(label(n),t.output,t.setup)}catch(t){if(e.signal?.throwIfAborted(),t instanceof WizardCancelledError){c.addCancellation(label(n));continue}if(t instanceof HumanActionRequiredError)throw t;let r=(t instanceof Error?t.message:String(t)).trim()||`Installation failed.`;c.addFailure(label(n),r)}}return{kind:`done`,result:await c.continueAfterInstall({appRoot:e.appRoot,prompter:e.prompter,signal:e.signal})}}catch(e){if(e instanceof WizardCancelledError){let e=t?.result();return hasSettledOutcomes(e)?{kind:`done`,result:{...e,cancelled:!0}}:{kind:`cancelled`}}let n=t?.result();throw hasSettledOutcomes(n)?new RegistryFlowFailedError(e,n):e}}export{RegistryFlowFailedError,runRegistryFlow};
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { type SelfModificationSetupOperations, type SelfModificationSetupValues } from "#self-modification/setup.js";
|
|
2
|
+
import { type LegacySelfModificationScaffold } from "#self-modification/migration.js";
|
|
2
3
|
import type { VercelProjectReference } from "#setup/project-resolution.js";
|
|
3
|
-
import {
|
|
4
|
+
import { ensurePackageDependencies } from "#setup/scaffold/index.js";
|
|
4
5
|
import { installScaffoldDependencies } from "../shared/scaffold.js";
|
|
5
6
|
import { type SetupApplyContext, type SetupPrepareContext } from "../types.js";
|
|
6
7
|
export interface SelfModificationApplyDependencies {
|
|
7
|
-
|
|
8
|
+
ensurePackageDependencies: typeof ensurePackageDependencies;
|
|
8
9
|
installScaffoldDependencies: typeof installScaffoldDependencies;
|
|
9
10
|
}
|
|
10
|
-
type SelfModificationSetupPlan = {
|
|
11
|
+
type SelfModificationSetupPlan = ({
|
|
11
12
|
readonly kind: "authored";
|
|
12
13
|
} | {
|
|
13
14
|
readonly kind: "local";
|
|
@@ -16,6 +17,8 @@ type SelfModificationSetupPlan = {
|
|
|
16
17
|
readonly connectorName: string;
|
|
17
18
|
readonly project: VercelProjectReference;
|
|
18
19
|
readonly values: SelfModificationSetupValues;
|
|
20
|
+
}) & {
|
|
21
|
+
readonly legacyScaffold?: LegacySelfModificationScaffold;
|
|
19
22
|
};
|
|
20
23
|
export declare function prepareSelfModificationSetup(context: SetupPrepareContext, operations?: SelfModificationSetupOperations): Promise<SelfModificationSetupPlan>;
|
|
21
24
|
export declare function applySelfModificationSetup(plan: SelfModificationSetupPlan, context: SetupApplyContext, operations?: SelfModificationSetupOperations, deps?: SelfModificationApplyDependencies): Promise<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineSetupIntegration}from"../types.js";import{describeIntegrationSetupEnvironment}from"../shared/environment.js";import{installScaffoldDependencies}from"../shared/scaffold.js";import{
|
|
1
|
+
import{defineSetupIntegration}from"../types.js";import{describeIntegrationSetupEnvironment}from"../shared/environment.js";import{installScaffoldDependencies}from"../shared/scaffold.js";import{relative}from"node:path";import{ensurePackageDependencies}from"#setup/scaffold/index.js";import{confirm,select,text}from"#setup/ask.js";import{classifySelfModificationConfig,connectorName,defaultSelfModificationSetupOperations,directoryError,gitRefError,renderSelfModificationConfig,repositoryPartError}from"#self-modification/setup.js";import{SELF_MODIFICATION_CONFIG_PATH}from"#self-modification/git-workspace.js";import{detectLegacySelfModificationScaffold,removeLegacySelfModificationScaffold}from"#self-modification/migration.js";import{DEFAULT_CONNECT_PACKAGE_VERSION,DEFAULT_MICROSANDBOX_PACKAGE_VERSION}from"#setup/scaffold/version-tokens.js";const defaultApplyDependencies={ensurePackageDependencies,installScaffoldDependencies},SELF_MODIFICATION_PRODUCTION_DEPENDENCIES={"@vercel/connect":DEFAULT_CONNECT_PACKAGE_VERSION,microsandbox:DEFAULT_MICROSANDBOX_PACKAGE_VERSION};function validationResult(e){return e??null}async function prepareLegacyScaffoldCleanup(e){let t=await detectLegacySelfModificationScaffold(e.appRoot);return t===void 0?void 0:await e.asker.ask(confirm({key:`self-modification-cleanup`,message:`A legacy self-modification scaffold was found at ${relative(e.appRoot,t.root)}. This scaffold format is no longer supported. Do you want to remove it?`,recommended:!0,required:!0}))?t:void 0}function withLegacyScaffold(e,t){return t===void 0?e:{...e,legacyScaffold:t}}async function prepareSelfModificationSetup(e,t=defaultSelfModificationSetupOperations(e.appRoot,void 0,e.projectRoot)){let n=await prepareLegacyScaffoldCleanup(e),r=await t.readConfig();if(classifySelfModificationConfig(r)===`authored`)return e.presenter.note(`The existing ${SELF_MODIFICATION_CONFIG_PATH} contains authored configuration and was not overwritten.`,`Manual update required`,{tone:`warning`}),withLegacyScaffold({kind:`authored`},n);if(await e.asker.ask(select({key:`self-modification-mode`,message:`How should self-modification be enabled?`,options:[{id:`deployed`,value:`deployed`,label:`Enable for deployed`,hint:`Let deployed agents propose source changes through draft pull requests`},{id:`local`,value:`local`,label:`Keep local`,hint:`Only enable source editing during local development`}],recommended:`local`,required:!0}))===`local`)return withLegacyScaffold({kind:`local`},n);let[i,a,o]=await Promise.all([e.resolveVercelProject(`self-modification`),t.detectGitRepository(),t.detectChannelNames()]),s=await e.asker.ask(text({key:`self-modification-repository-owner`,message:`GitHub repository owner`,detected:a.owner,required:!0,validate:e=>validationResult(repositoryPartError(e))})),c=await e.asker.ask(text({key:`self-modification-repository-name`,message:`GitHub repository name`,detected:a.repo,required:!0,validate:e=>validationResult(repositoryPartError(e))})),l=await e.asker.ask(text({key:`self-modification-repository-directory`,message:`Application directory relative to the repository root`,detected:a.directory??`.`,required:!0,validate:e=>validationResult(directoryError(e))})),u=await e.asker.ask(text({key:`self-modification-target-branch`,message:`Target branch`,detected:a.branch??`main`,required:!0,validate:e=>validationResult(gitRefError(e))})),d=connectorName(s,c),f={branch:u,channelNames:o,connector:`github/${d}`,directory:l,repository:`github.com/${s}/${c}`,vercelBackend:!0};return e.presenter.note(renderSelfModificationConfig(f),`Generated ${SELF_MODIFICATION_CONFIG_PATH}`),e.presenter.note(`Vercel Connect will issue short-lived GitHub App credentials restricted to this repository. Install the managed GitHub App and select only this repository. Review, merge, and deployment remain separate operator boundaries.`,`Security summary`),withLegacyScaffold(await e.asker.ask(confirm({key:`self-modification-confirm`,message:`Create or attach this GitHub connector and write this configuration?`,recommended:!1,required:!0}))?{kind:`deployed`,connectorName:d,project:i,values:f}:{kind:`local`},n)}async function applySelfModificationSetup(e,t,n=defaultSelfModificationSetupOperations(t.appRoot,void 0,t.projectRoot),r=defaultApplyDependencies){if(e.legacyScaffold!==void 0&&(await removeLegacySelfModificationScaffold(t.appRoot,e.legacyScaffold),t.presenter.log.success(`Removed the retired self-modification scaffold.`)),e.kind===`authored`)return{facts:[{label:`Self-modification`,value:`manual configuration update required`}]};if(e.kind===`local`)return{facts:[]};let i=await n.findOrCreateConnector(e.connectorName,e.project);await n.attachConnector(i,e.project);let a=await r.ensurePackageDependencies({dependencies:SELF_MODIFICATION_PRODUCTION_DEPENDENCIES,projectRoot:t.appRoot});return await r.installScaffoldDependencies({changed:a.length>0,log:t.presenter.log,projectPath:t.appRoot,signal:t.signal}),await n.writeConfig(renderSelfModificationConfig({...e.values,connector:i})),t.presenter.log.success(`Updated ${SELF_MODIFICATION_CONFIG_PATH}.`),t.presenter.nextSteps([`Install the managed GitHub App for the configured repository, then deploy or redeploy.`,e.values.vercelBackend?"After deployment, try self-modification by running `eve dev <deployment-url>` from this linked project. The generated policy admits its Vercel OIDC identity over HTTP; configured channels remain denied until you update `agent/extensions/self-modification/extension.ts`.":"Before deployment, configure `deployed.authorize` in `agent/extensions/self-modification/extension.ts` to admit a trusted principal for your deployment's channel. After deployment, use that channel to try self-modification."]),{deploymentRequired:!0,facts:[{label:`Repository`,value:e.values.repository},{label:`Application directory`,value:e.values.directory},{label:`Target branch`,value:e.values.branch},{label:`Credential`,value:i}]}}async function prepareLocalSelfModificationSetup(e,t=defaultSelfModificationSetupOperations(e.appRoot,void 0,e.projectRoot)){let n=await prepareLegacyScaffoldCleanup(e),r=await t.readConfig();return classifySelfModificationConfig(r)===`authored`?(e.presenter.note(`The existing ${SELF_MODIFICATION_CONFIG_PATH} contains authored configuration and was not overwritten.`,`Manual update required`,{tone:`warning`}),withLegacyScaffold({kind:`authored`},n)):withLegacyScaffold({kind:`local`},n)}function describeEnvironment(e){if(e.vercel.kind===`available`)return describeIntegrationSetupEnvironment(e);switch(e.vercel.reason){case`logged-out`:return`No authenticated Vercel account found. Local editing remains available; deployed proposals require Vercel Connect.`;case`cli-missing`:return`Vercel CLI not found. Local editing remains available; deployed proposals require Vercel Connect.`;case`unavailable`:return`Could not verify the Vercel account. Local editing remains available; deployed proposals require Vercel Connect.`}}const SELF_MODIFICATION_SETUP=defineSetupIntegration({kind:`self-modification`,label:`Self-modification`,hint:`Local source editing is enabled`,describeEnvironment,prepare:prepareLocalSelfModificationSetup,apply:applySelfModificationSetup}),SELF_MODIFICATION_PRODUCTION_SETUP=defineSetupIntegration({kind:`self-modification-production`,label:`Self-modification production`,hint:`Configure deployed draft pull requests`,describeEnvironment,prepare:prepareSelfModificationSetup,apply:applySelfModificationSetup});export{SELF_MODIFICATION_PRODUCTION_SETUP,SELF_MODIFICATION_SETUP,applySelfModificationSetup,prepareLocalSelfModificationSetup,prepareSelfModificationSetup};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{pinnedNodeEngineMajor}from"../../node-engine.js";import{parseChatGptModelSelection}from"../../../shared/chatgpt-model.js";import{SUPPORTED_AUTHORED_MODULE_FILE_EXTENSIONS}from"../update/module-files.js";import{pathExists,writeTextFile}from"../files.js";import{blockingCreateInPlaceEntries}from"../create-in-place.js";import{DEFAULT_CONNECT_PACKAGE_VERSION,resolveVersionToken}from"../version-tokens.js";import{applyPackageManagerWorkspaceConfiguration,isPackageManagerWorkspaceMember,patchWorkspaceRootPackageJson}from"../workspace-root.js";import{WEB_APP_TEMPLATE_FILES}from"./web-template.js";import{mkdir,readdir,stat}from"node:fs/promises";import{basename,join,resolve}from"node:path";const CURRENT_DIRECTORY_PROJECT_NAME=`.`,DEFAULT_AI_PACKAGE_VERSION=`^7.0.105`,DEFAULT_ZOD_PACKAGE_VERSION=`4.5.4`,DEFAULT_EVE_PACKAGE_CONTRACT={version:`0.
|
|
1
|
+
import{pinnedNodeEngineMajor}from"../../node-engine.js";import{parseChatGptModelSelection}from"../../../shared/chatgpt-model.js";import{SUPPORTED_AUTHORED_MODULE_FILE_EXTENSIONS}from"../update/module-files.js";import{pathExists,writeTextFile}from"../files.js";import{blockingCreateInPlaceEntries}from"../create-in-place.js";import{DEFAULT_CONNECT_PACKAGE_VERSION,resolveVersionToken}from"../version-tokens.js";import{applyPackageManagerWorkspaceConfiguration,isPackageManagerWorkspaceMember,patchWorkspaceRootPackageJson}from"../workspace-root.js";import{WEB_APP_TEMPLATE_FILES}from"./web-template.js";import{mkdir,readdir,stat}from"node:fs/promises";import{basename,join,resolve}from"node:path";const CURRENT_DIRECTORY_PROJECT_NAME=`.`,DEFAULT_AI_PACKAGE_VERSION=`^7.0.105`,DEFAULT_ZOD_PACKAGE_VERSION=`4.5.4`,DEFAULT_EVE_PACKAGE_CONTRACT={version:`0.62.0`,nodeEngine:`>=24`};function resolveEvePackageContract(e=DEFAULT_EVE_PACKAGE_CONTRACT){return{version:resolveVersionToken(`evePackage.version`,e.version),nodeEngine:resolveVersionToken(`evePackage.nodeEngine`,e.nodeEngine)}}function modelProviderSlug(e){let t=(e.split(`/`)[0]??``).replaceAll(/[^A-Za-z0-9._-]/gu,``);return t.length>0?t:`anthropic`}function byokProviderEnvVar(e){let t=modelProviderSlug(e).toUpperCase().replaceAll(/[^A-Z0-9]/gu,`_`);return`${/^[0-9]/.test(t)?`_`:``}${t}_API_KEY`}function agentTemplateFiles(e,t){return{"agent/agent.ts":renderAgentTemplate(e,t),"agent/channels/eve.ts":WEB_APP_TEMPLATE_FILES[`agent/channels/eve.ts`],"agent/instructions.md":AGENT_INSTRUCTIONS_TEMPLATE}}function renderAgentTemplate(e,t){let n=parseChatGptModelSelection(e);return n===void 0?BASE_AGENT_TEMPLATE.replaceAll(`__EVE_INIT_MODEL__`,e).replaceAll(`__EVE_INIT_REASONING__`,reasoningTemplateLine(t)):`import { defineAgent } from "eve";\nimport { chatgpt } from "eve/models/openai";\n\nexport default defineAgent({\n model: chatgpt(${JSON.stringify(n)}),\n${reasoningTemplateLine(t)}});\n`}function reasoningTemplateLine(e){return e===void 0||e===`provider-default`?``:` reasoning: "${e}",\n`}function renderTemplate(e,t){return e===BASE_AGENT_TEMPLATE&&parseChatGptModelSelection(t.model)!==void 0?renderAgentTemplate(t.model,t.reasoning):e.replaceAll(`__EVE_INIT_APP_NAME__`,t.appName).replaceAll(`__EVE_INIT_MODEL__`,t.model).replaceAll(`__EVE_INIT_REASONING__`,reasoningTemplateLine(t.reasoning)).replaceAll(`__EVE_INIT_BYOK_PROVIDER__`,modelProviderSlug(t.model)).replaceAll(`__EVE_INIT_BYOK_ENV_VAR__`,byokProviderEnvVar(t.model)).replaceAll(`__EVE_INIT_PACKAGE_VERSION__`,formatEveDependencySpecifier(t.eveVersion)).replaceAll(`__EVE_INIT_AI_SDK_VERSION__`,t.aiPackageVersion).replaceAll(`__EVE_INIT_CONNECT_VERSION__`,t.connectPackageVersion).replaceAll(`__EVE_INIT_ZOD_VERSION__`,t.zodPackageVersion).replaceAll(`__EVE_INIT_TYPESCRIPT_VERSION__`,t.typescriptPackageVersion).replaceAll(`__EVE_INIT_TYPES_NODE_VERSION__`,t.nodeTypesVersion).replaceAll(`__EVE_INIT_NODE_ENGINE__`,t.nodeEngine)}function formatEveDependencySpecifier(e){return/^\d+\.\d+\.\d+(?:[-+][0-9A-Za-z-.]+)?$/.test(e)?`^${e}`:e}const BASE_AGENT_TEMPLATE=`import { defineAgent } from "eve";
|
|
2
2
|
|
|
3
3
|
export default defineAgent({
|
|
4
4
|
model: "__EVE_INIT_MODEL__",
|
|
@@ -4,5 +4,6 @@ export { DEFAULT_SLACK_CONNECTOR_SLUG, SLACK_CHANNEL_DEFAULT_ROUTE, deriveSlackC
|
|
|
4
4
|
export { SCAFFOLDABLE_CHANNELS, type ScaffoldableChannel } from "./channels-catalog.js";
|
|
5
5
|
export { ensureConnection, ensureConnectionDependencies, listAuthoredConnections, type ConnectionInput, type ConnectionMutationAction, type ConnectionMutationResult, type EnsureConnectionOptions, type EnsureConnectionDependenciesOptions, } from "./update/connections.js";
|
|
6
6
|
export { catalogSlugs, CONNECTION_CATALOG, CUSTOM_CONNECTION_SLUG, effectiveProtocols, endpointForProtocol, getCatalogEntry, isValidConnectionSlug, SUPPORTED_PROTOCOLS, type ConnectionAuthSpec, type ConnectionCatalogEntry, type ConnectionProtocol, type CustomConnectionInput, type EnvHeader, type McpEndpoint, type OpenApiEndpoint, } from "./connections/catalog.js";
|
|
7
|
+
export { ensurePackageDependencies, type EnsurePackageDependenciesOptions, type PackageDependencyMutation, } from "./update/dependencies.js";
|
|
7
8
|
export { WriteFileExistsError } from "./files.js";
|
|
8
9
|
export { HumanActionRequiredError, type HumanAction } from "../human-action.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{WriteFileExistsError}from"./files.js";import{CURRENT_DIRECTORY_PROJECT_NAME,byokProviderEnvVar,isEveProject,scaffoldBaseProject}from"./create/project.js";import{scaffoldExtensionProject}from"./create/extension.js";import{DEFAULT_SLACK_CONNECTOR_SLUG,SLACK_CHANNEL_DEFAULT_ROUTE,deriveSlackConnectorSlug,ensureChannel,hasVercelHostFramework,isNextJsProject,listAuthoredChannels,normalizeSlackConnectorSlug,resolveVercelHostFrameworkPreset}from"./update/channels.js";import{SCAFFOLDABLE_CHANNELS}from"./channels-catalog.js";import{CONNECTION_CATALOG,CUSTOM_CONNECTION_SLUG,SUPPORTED_PROTOCOLS,catalogSlugs,effectiveProtocols,endpointForProtocol,getCatalogEntry,isValidConnectionSlug}from"./connections/catalog.js";import{ensureConnection,ensureConnectionDependencies,listAuthoredConnections}from"./update/connections.js";import{HumanActionRequiredError}from"../human-action.js";export{CONNECTION_CATALOG,CURRENT_DIRECTORY_PROJECT_NAME,CUSTOM_CONNECTION_SLUG,DEFAULT_SLACK_CONNECTOR_SLUG,HumanActionRequiredError,SCAFFOLDABLE_CHANNELS,SLACK_CHANNEL_DEFAULT_ROUTE,SUPPORTED_PROTOCOLS,WriteFileExistsError,byokProviderEnvVar,catalogSlugs,deriveSlackConnectorSlug,effectiveProtocols,endpointForProtocol,ensureChannel,ensureConnection,ensureConnectionDependencies,getCatalogEntry,hasVercelHostFramework,isEveProject,isNextJsProject,isValidConnectionSlug,listAuthoredChannels,listAuthoredConnections,normalizeSlackConnectorSlug,resolveVercelHostFrameworkPreset,scaffoldBaseProject,scaffoldExtensionProject};
|
|
1
|
+
import{WriteFileExistsError}from"./files.js";import{CURRENT_DIRECTORY_PROJECT_NAME,byokProviderEnvVar,isEveProject,scaffoldBaseProject}from"./create/project.js";import{scaffoldExtensionProject}from"./create/extension.js";import{DEFAULT_SLACK_CONNECTOR_SLUG,SLACK_CHANNEL_DEFAULT_ROUTE,deriveSlackConnectorSlug,ensureChannel,hasVercelHostFramework,isNextJsProject,listAuthoredChannels,normalizeSlackConnectorSlug,resolveVercelHostFrameworkPreset}from"./update/channels.js";import{SCAFFOLDABLE_CHANNELS}from"./channels-catalog.js";import{CONNECTION_CATALOG,CUSTOM_CONNECTION_SLUG,SUPPORTED_PROTOCOLS,catalogSlugs,effectiveProtocols,endpointForProtocol,getCatalogEntry,isValidConnectionSlug}from"./connections/catalog.js";import{ensureConnection,ensureConnectionDependencies,listAuthoredConnections}from"./update/connections.js";import{ensurePackageDependencies}from"./update/dependencies.js";import{HumanActionRequiredError}from"../human-action.js";export{CONNECTION_CATALOG,CURRENT_DIRECTORY_PROJECT_NAME,CUSTOM_CONNECTION_SLUG,DEFAULT_SLACK_CONNECTOR_SLUG,HumanActionRequiredError,SCAFFOLDABLE_CHANNELS,SLACK_CHANNEL_DEFAULT_ROUTE,SUPPORTED_PROTOCOLS,WriteFileExistsError,byokProviderEnvVar,catalogSlugs,deriveSlackConnectorSlug,effectiveProtocols,endpointForProtocol,ensureChannel,ensureConnection,ensureConnectionDependencies,ensurePackageDependencies,getCatalogEntry,hasVercelHostFramework,isEveProject,isNextJsProject,isValidConnectionSlug,listAuthoredChannels,listAuthoredConnections,normalizeSlackConnectorSlug,resolveVercelHostFrameworkPreset,scaffoldBaseProject,scaffoldExtensionProject};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface EnsurePackageDependenciesOptions {
|
|
2
|
+
readonly dependencies: Readonly<Record<string, string>>;
|
|
3
|
+
readonly projectRoot: string;
|
|
4
|
+
}
|
|
5
|
+
export interface PackageDependencyMutation {
|
|
6
|
+
readonly dependencies: readonly string[];
|
|
7
|
+
readonly devDependencies: readonly string[];
|
|
8
|
+
readonly path: string;
|
|
9
|
+
readonly scripts: readonly string[];
|
|
10
|
+
}
|
|
11
|
+
/** Adds missing or outdated runtime dependencies to an existing package.json. */
|
|
12
|
+
export declare function ensurePackageDependencies(options: EnsurePackageDependenciesOptions): Promise<readonly PackageDependencyMutation[]>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{patchPackageJson}from"./package-json.js";import{readFile}from"node:fs/promises";import{join}from"node:path";async function ensurePackageDependencies(e){let t=join(e.projectRoot,`package.json`),n;try{n=JSON.parse(await readFile(t,`utf8`))}catch(e){if(e.code===`ENOENT`)return[];throw e}let r=isRecord(n)&&isRecord(n.dependencies)?n.dependencies:{},i=Object.fromEntries(Object.entries(e.dependencies).filter(([e,t])=>r[e]!==t)),a=Object.keys(i);return a.length===0?[]:(await patchPackageJson(t,{dependencies:i}),[{dependencies:a,devDependencies:[],path:t,scripts:[]}])}function isRecord(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}export{ensurePackageDependencies};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export declare const DEFAULT_CONNECT_PACKAGE_VERSION = "2.2.0";
|
|
2
|
+
export declare const DEFAULT_MICROSANDBOX_PACKAGE_VERSION = "0.5.5";
|
|
2
3
|
/**
|
|
3
4
|
* Returns a scaffold version value, resolving a build-stamp token at the point
|
|
4
5
|
* of need when the running code is unstamped. The published package is stamped
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{dirname,join}from"node:path";import{existsSync,readFileSync,realpathSync}from"node:fs";import{fileURLToPath}from"node:url";function versionToken(e){return`__${e}_VERSION__`}function bareToken(e){return`__${e}__`}const NODE_ENGINE_TOKEN=bareToken(`NODE_ENGINE`),DEFAULT_CONNECT_PACKAGE_VERSION=`2.2.0`,TOKEN_SOURCES={[versionToken(`EVE_PACKAGE`)]:{kind:`eve-version`},[versionToken(`EVE_PACKAGE_DEPENDENCY`)]:{kind:`eve-version`},[NODE_ENGINE_TOKEN]:{kind:`eve-node-engine`},[versionToken(`AI_SDK`)]:{kind:`catalog`,packageName:`ai`},[versionToken(`NEXT`)]:{kind:`catalog`,packageName:`next`},[versionToken(`REACT`)]:{kind:`catalog`,packageName:`react`},[versionToken(`REACT_DOM`)]:{kind:`catalog`,packageName:`react-dom`},[versionToken(`STREAMDOWN`)]:{kind:`catalog`,packageName:`streamdown`},[versionToken(`ZOD`)]:{kind:`catalog`,packageName:`zod`},[versionToken(`TYPESCRIPT`)]:{kind:`catalog`,packageName:`typescript`},[versionToken(`TYPES_REACT`)]:{kind:`catalog`,packageName:`@types/react`},[versionToken(`TYPES_REACT_DOM`)]:{kind:`catalog`,packageName:`@types/react-dom`}},resolvedTokens=new Map;function findEvePackageRoot(){let e=dirname(realpathSync(fileURLToPath(import.meta.url)));for(;;){let t=join(e,`package.json`);if(existsSync(t)&&JSON.parse(readFileSync(t,`utf8`)).name===`eve`)return e;let n=dirname(e);if(n===e)return;e=n}}function findWorkspaceManifest(e){let t=e;for(;;){let e=join(t,`pnpm-workspace.yaml`);if(existsSync(e))return e;let n=dirname(t);if(n===t)return;t=n}}function readCatalogVersion(e,t){let n=readFileSync(e,`utf8`).split(/\r?\n/),r=!1;for(let e of n){if(/^catalog:\s*$/.test(e)){r=!0;continue}if(!r)continue;if(/^\S/.test(e))break;let n=e.match(/^\s+(?:"([^"]+)"|([\w@/.-]+)):\s*"([^"]+)"/);if(n&&(n[1]??n[2])===t)return n[3]}}function resolveTokenFromDevTree(e){let t=TOKEN_SOURCES[e];if(t!==void 0)try{let e=findEvePackageRoot();if(e===void 0||!existsSync(join(e,`scripts/stamp-version-tokens.mjs`)))return;if(t.kind===`eve-version`){let t=JSON.parse(readFileSync(join(e,`package.json`),`utf8`));return typeof t.version==`string`?t.version:void 0}if(t.kind===`eve-node-engine`){let t=JSON.parse(readFileSync(join(e,`package.json`),`utf8`)).engines?.node;return typeof t==`string`?t:void 0}let n=findWorkspaceManifest(e);return n===void 0?void 0:readCatalogVersion(n,t.packageName)}catch{return}}function resolveVersionToken(e,t){if(!t.startsWith(`__`))return t;let n=resolvedTokens.get(t);if(n!==void 0)return n;let r=resolveTokenFromDevTree(t);if(r===void 0)throw Error(`Scaffold received unstamped version token (${e}=${t}). Build eve before using its dist entrypoint.`);return resolvedTokens.set(t,r),r}export{DEFAULT_CONNECT_PACKAGE_VERSION,resolveVersionToken};
|
|
1
|
+
import{dirname,join}from"node:path";import{existsSync,readFileSync,realpathSync}from"node:fs";import{fileURLToPath}from"node:url";function versionToken(e){return`__${e}_VERSION__`}function bareToken(e){return`__${e}__`}const NODE_ENGINE_TOKEN=bareToken(`NODE_ENGINE`),DEFAULT_CONNECT_PACKAGE_VERSION=`2.2.0`,DEFAULT_MICROSANDBOX_PACKAGE_VERSION=`0.5.5`,TOKEN_SOURCES={[versionToken(`EVE_PACKAGE`)]:{kind:`eve-version`},[versionToken(`EVE_PACKAGE_DEPENDENCY`)]:{kind:`eve-version`},[NODE_ENGINE_TOKEN]:{kind:`eve-node-engine`},[versionToken(`AI_SDK`)]:{kind:`catalog`,packageName:`ai`},[versionToken(`NEXT`)]:{kind:`catalog`,packageName:`next`},[versionToken(`REACT`)]:{kind:`catalog`,packageName:`react`},[versionToken(`REACT_DOM`)]:{kind:`catalog`,packageName:`react-dom`},[versionToken(`STREAMDOWN`)]:{kind:`catalog`,packageName:`streamdown`},[versionToken(`ZOD`)]:{kind:`catalog`,packageName:`zod`},[versionToken(`TYPESCRIPT`)]:{kind:`catalog`,packageName:`typescript`},[versionToken(`TYPES_REACT`)]:{kind:`catalog`,packageName:`@types/react`},[versionToken(`TYPES_REACT_DOM`)]:{kind:`catalog`,packageName:`@types/react-dom`}},resolvedTokens=new Map;function findEvePackageRoot(){let e=dirname(realpathSync(fileURLToPath(import.meta.url)));for(;;){let t=join(e,`package.json`);if(existsSync(t)&&JSON.parse(readFileSync(t,`utf8`)).name===`eve`)return e;let n=dirname(e);if(n===e)return;e=n}}function findWorkspaceManifest(e){let t=e;for(;;){let e=join(t,`pnpm-workspace.yaml`);if(existsSync(e))return e;let n=dirname(t);if(n===t)return;t=n}}function readCatalogVersion(e,t){let n=readFileSync(e,`utf8`).split(/\r?\n/),r=!1;for(let e of n){if(/^catalog:\s*$/.test(e)){r=!0;continue}if(!r)continue;if(/^\S/.test(e))break;let n=e.match(/^\s+(?:"([^"]+)"|([\w@/.-]+)):\s*"([^"]+)"/);if(n&&(n[1]??n[2])===t)return n[3]}}function resolveTokenFromDevTree(e){let t=TOKEN_SOURCES[e];if(t!==void 0)try{let e=findEvePackageRoot();if(e===void 0||!existsSync(join(e,`scripts/stamp-version-tokens.mjs`)))return;if(t.kind===`eve-version`){let t=JSON.parse(readFileSync(join(e,`package.json`),`utf8`));return typeof t.version==`string`?t.version:void 0}if(t.kind===`eve-node-engine`){let t=JSON.parse(readFileSync(join(e,`package.json`),`utf8`)).engines?.node;return typeof t==`string`?t:void 0}let n=findWorkspaceManifest(e);return n===void 0?void 0:readCatalogVersion(n,t.packageName)}catch{return}}function resolveVersionToken(e,t){if(!t.startsWith(`__`))return t;let n=resolvedTokens.get(t);if(n!==void 0)return n;let r=resolveTokenFromDevTree(t);if(r===void 0)throw Error(`Scaffold received unstamped version token (${e}=${t}). Build eve before using its dist entrypoint.`);return resolvedTokens.set(t,r),r}export{DEFAULT_CONNECT_PACKAGE_VERSION,DEFAULT_MICROSANDBOX_PACKAGE_VERSION,resolveVersionToken};
|
|
@@ -180,15 +180,6 @@ export interface AgentLimitsDefinition {
|
|
|
180
180
|
* These options are unstable and may change or be removed in any release.
|
|
181
181
|
*/
|
|
182
182
|
export interface AgentExperimentalDefinition {
|
|
183
|
-
/**
|
|
184
|
-
* Reads instrumentation from an `instrumentation/` directory of providers
|
|
185
|
-
* rather than a single `agent/instrumentation.ts` config object.
|
|
186
|
-
*
|
|
187
|
-
* The two layouts are mutually exclusive: with this on, an
|
|
188
|
-
* `agent/instrumentation.ts` is a build error, and with it off, an
|
|
189
|
-
* `instrumentation/` directory is.
|
|
190
|
-
*/
|
|
191
|
-
readonly instrumentationProviders?: boolean;
|
|
192
183
|
/**
|
|
193
184
|
* Runs this agent's delegated subagent calls as durable background tasks.
|
|
194
185
|
* The originating tool call returns a task receipt immediately and the
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import type { ConversationContext } from "#shared/conversation-context.js";
|
|
2
2
|
import { type InstrumentationDecision } from "#shared/instrumentation-decision.js";
|
|
3
|
-
/** @deprecated Use `TraceCapturePolicy` to select directional content. */
|
|
4
|
-
export type InstrumentationCapture = "content" | "metadata";
|
|
5
3
|
export type TraceCaptureContext = {
|
|
6
4
|
readonly agentName: string;
|
|
7
5
|
} & ConversationContext;
|
|
@@ -13,7 +11,6 @@ export type TracePolicyDecision = {
|
|
|
13
11
|
readonly recordOutputs: boolean;
|
|
14
12
|
};
|
|
15
13
|
export type TraceCapturePolicy = (trace: TraceCaptureContext) => TracePolicyDecision | boolean;
|
|
16
|
-
export declare function legacyCaptureTracePolicy(capture: InstrumentationCapture | undefined): TraceCapturePolicy | undefined;
|
|
17
14
|
export declare function resolveTracePolicy(policy: TraceCapturePolicy | undefined, trace: TraceCaptureContext, onError?: (error: unknown) => void): InstrumentationDecision;
|
|
18
15
|
export declare function resolveTracePolicyDecision(decision: TracePolicyDecision | boolean, context: {
|
|
19
16
|
readonly audience: TraceCaptureContext["audience"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{shouldCaptureInstrumentationContent}from"#shared/instrumentation-content.js";import{DROP_INSTRUMENTATION}from"#shared/instrumentation-decision.js";function
|
|
1
|
+
import{shouldCaptureInstrumentationContent}from"#shared/instrumentation-content.js";import{DROP_INSTRUMENTATION}from"#shared/instrumentation-decision.js";function resolveTracePolicy(e,t,n){try{let n=e?.(t);return resolveTracePolicyDecision(n??{emit:!0,recordInputs:t.audience===`public`||t.environment===`development`,recordOutputs:t.audience===`public`||t.environment===`development`},t)}catch(e){try{n?.(e)}catch{}return DROP_INSTRUMENTATION}}function resolveTracePolicyDecision(e,t){if(e===!1)return DROP_INSTRUMENTATION;if(e===!0){let e=shouldCaptureInstrumentationContent(t);return{action:`record`,recordInputs:e,recordOutputs:e}}return e.emit?{action:`record`,recordInputs:e.recordInputs,recordOutputs:e.recordOutputs}:DROP_INSTRUMENTATION}export{resolveTracePolicy,resolveTracePolicyDecision};
|