eve 0.67.1 → 0.67.2
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 +10 -0
- package/dist/src/channel/channel-address.d.ts +2 -2
- package/dist/src/channel/compiled-channel.d.ts +3 -2
- package/dist/src/channel/cross-channel-receive.d.ts +1 -18
- package/dist/src/channel/cross-channel-receive.js +1 -1
- package/dist/src/channel/forwarded-principal.d.ts +3 -2
- package/dist/src/channel/resolve-text.d.ts +2 -1
- package/dist/src/channel/schedule.d.ts +2 -2
- package/dist/src/channel/session-callback.d.ts +2 -1
- package/dist/src/channel/types.d.ts +0 -7
- package/dist/src/cli/acp/command.d.ts +2 -1
- package/dist/src/cli/agent-command.d.ts +2 -1
- package/dist/src/cli/agent-detection.d.ts +0 -1
- package/dist/src/cli/agent-detection.js +1 -1
- package/dist/src/cli/application-command.d.ts +2 -1
- package/dist/src/cli/application-root.d.ts +3 -6
- package/dist/src/cli/application-root.js +1 -1
- package/dist/src/cli/commands/init-target.d.ts +1 -1
- package/dist/src/cli/commands/init-telemetry.d.ts +2 -1
- package/dist/src/cli/commands/registry-declared-setups.d.ts +2 -1
- package/dist/src/cli/commands/registry-install-transaction.d.ts +0 -13
- package/dist/src/cli/commands/registry-install-transaction.js +1 -1
- package/dist/src/cli/commands/registry-pnpm-build-policy-flow.d.ts +1 -1
- package/dist/src/cli/commands/registry-presentation.d.ts +0 -1
- package/dist/src/cli/commands/registry-presentation.js +1 -1
- package/dist/src/cli/commands/registry-project.d.ts +2 -1
- package/dist/src/cli/commands/registry.d.ts +0 -4
- package/dist/src/cli/commands/registry.js +1 -1
- package/dist/src/cli/commands/setup-headless.d.ts +2 -1
- package/dist/src/cli/commands/vercel-non-interactive.d.ts +2 -1
- package/dist/src/cli/dev/diagnostic-dump.d.ts +0 -2
- package/dist/src/cli/dev/diagnostic-dump.js +1 -1
- package/dist/src/cli/dev/diagnostic-sink.d.ts +3 -2
- package/dist/src/cli/dev/tui/agent-header.d.ts +2 -1
- package/dist/src/cli/dev/tui/argument-typeahead.d.ts +2 -1
- package/dist/src/cli/dev/tui/dev-rebuild-status.d.ts +2 -1
- package/dist/src/cli/dev/tui/diagnostic-presentation.d.ts +2 -1
- package/dist/src/cli/dev/tui/errors.d.ts +2 -7
- package/dist/src/cli/dev/tui/errors.js +1 -1
- package/dist/src/cli/dev/tui/flow-drawer.d.ts +2 -1
- package/dist/src/cli/dev/tui/line-editor.d.ts +1 -1
- package/dist/src/cli/dev/tui/mcp-connection-status.d.ts +2 -1
- package/dist/src/cli/dev/tui/message-queue.d.ts +4 -3
- package/dist/src/cli/dev/tui/prompt-command-handler.d.ts +2 -1
- package/dist/src/cli/dev/tui/provider-picker.d.ts +3 -2
- package/dist/src/cli/dev/tui/question-panel.d.ts +2 -1
- package/dist/src/cli/dev/tui/registry-result-message.d.ts +3 -4
- package/dist/src/cli/dev/tui/registry-result-message.js +1 -1
- package/dist/src/cli/dev/tui/remote-connection-probe.d.ts +3 -2
- package/dist/src/cli/dev/tui/setup-panel.d.ts +2 -2
- package/dist/src/cli/dev/tui/setup-selection-input.d.ts +2 -2
- package/dist/src/cli/dev/tui/status-line.d.ts +2 -1
- package/dist/src/cli/dev/tui/stream-format.d.ts +3 -2
- package/dist/src/cli/dev/tui/terminal-renderer.d.ts +3 -2
- package/dist/src/cli/dev/tui/theme.d.ts +1 -1
- package/dist/src/cli/dev/tui/tool-block-groups.d.ts +3 -2
- package/dist/src/cli/dev/tui/tool-presentation.d.ts +2 -1
- package/dist/src/cli/dev/tui/traces/trace-content.d.ts +0 -9
- package/dist/src/cli/dev/tui/traces/trace-content.js +1 -1
- package/dist/src/cli/dev/tui/traces/trace-view.d.ts +3 -2
- package/dist/src/cli/dev/tui/traces/trace-viewer-session.d.ts +2 -1
- package/dist/src/cli/dev/tui/traces/trace-viewer-state.d.ts +2 -3
- package/dist/src/cli/dev/tui/traces/trace-viewer-state.js +1 -1
- package/dist/src/cli/dev/ui-options.d.ts +3 -2
- package/dist/src/cli/dev/url-target.d.ts +2 -1
- package/dist/src/cli/invoke/command.d.ts +0 -11
- package/dist/src/cli/invoke/command.js +1 -1
- package/dist/src/cli/invoke/result.d.ts +1 -1
- package/dist/src/cli/telemetry/index.d.ts +0 -6
- package/dist/src/cli/telemetry/preference.d.ts +2 -1
- package/dist/src/cli/ui/alt-screen.d.ts +3 -2
- package/dist/src/cli/ui/live-region.d.ts +3 -2
- package/dist/src/cli/ui/output.d.ts +1 -1
- package/dist/src/client/eve-agent-store-helpers.d.ts +0 -1
- package/dist/src/client/eve-agent-store-helpers.js +1 -1
- package/dist/src/client/message-action-parts.d.ts +2 -1
- package/dist/src/client/session-utils.d.ts +3 -2
- package/dist/src/compiled/.vendor-stamp.json +6 -6
- package/dist/src/compiled/@workflow/core/index.js +2 -2
- package/dist/src/compiled/@workflow/core/private.js +1 -1
- package/dist/src/compiled/@workflow/core/runtime/constants.d.ts +4 -3
- package/dist/src/compiled/@workflow/core/runtime/helpers.d.ts +23 -0
- package/dist/src/compiled/@workflow/core/runtime/helpers.js +1 -1
- package/dist/src/compiled/@workflow/core/runtime/hook-wake.d.ts +69 -36
- package/dist/src/compiled/@workflow/core/runtime/lifecycle-hooks.d.ts +25 -22
- package/dist/src/compiled/@workflow/core/runtime/run-spec-version.d.ts +16 -0
- package/dist/src/compiled/@workflow/core/runtime/start.d.ts +59 -1
- package/dist/src/compiled/@workflow/core/runtime/step-latency.d.ts +3 -2
- package/dist/src/compiled/@workflow/core/runtime/suspension-handler.d.ts +34 -12
- package/dist/src/compiled/@workflow/core/runtime.js +4 -4
- package/dist/src/compiled/@workflow/core/serialization.d.ts +7 -2
- package/dist/src/compiled/@workflow/core/serialization.js +1 -1
- package/dist/src/compiled/@workflow/core/telemetry/semantic-conventions.d.ts +29 -0
- package/dist/src/compiled/@workflow/core/types.d.ts +1 -0
- package/dist/src/compiled/@workflow/core/version.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/workflow.js +1 -1
- package/dist/src/compiled/@workflow/errors/index.d.ts +13 -0
- package/dist/src/compiled/@workflow/errors/index.js +1 -1
- package/dist/src/compiled/@workflow/world/events.d.ts +14 -4
- package/dist/src/compiled/@workflow/world/index.d.ts +2 -2
- package/dist/src/compiled/@workflow/world/interfaces.d.ts +2 -1
- package/dist/src/compiled/@workflow/world/shared.d.ts +24 -0
- package/dist/src/compiled/@workflow/world/spec-version.d.ts +23 -0
- package/dist/src/compiled/@workflow/world-local/index.js +5 -5
- package/dist/src/compiled/@workflow/world-vercel/index.js +16 -16
- package/dist/src/compiled/_chunks/workflow/{attribute-changes-DzJovO_f.js → attribute-changes-D721NpZv.js} +3 -3
- package/dist/src/compiled/_chunks/workflow/{dist-BQSf8Hax.js → dist-BUFGAKRb.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/dist-CaNNONeg.js +3 -0
- package/dist/src/compiled/_chunks/workflow/{frames-qKc30rjg.js → frames-Dr9fHWdo.js} +2 -2
- package/dist/src/compiled/_chunks/workflow/{global-BQnKzRXo.js → global-DKbOgrts.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/helpers-DkKxg_yn.js +1 -0
- package/dist/src/compiled/_chunks/workflow/logger-D4GJNTk4.js +14 -0
- package/dist/src/compiled/_chunks/workflow/resume-hook-uTW-jBYz.js +1 -0
- package/dist/src/compiled/_chunks/workflow/run-5DmiMN9b.js +1 -0
- package/dist/src/compiled/_chunks/workflow/serialization-CNIYl1D3.js +3 -0
- package/dist/src/compiled/_chunks/workflow/sleep-DFKgN7UG.js +1 -0
- package/dist/src/compiled/_chunks/workflow/wait-until-3_1djUuL.js +1 -0
- package/dist/src/compiled/_chunks/workflow/{ws-transport-BrsMYqJg.js → ws-transport--rYOVIaf.js} +1 -1
- package/dist/src/compiler/artifacts.d.ts +4 -27
- package/dist/src/compiler/artifacts.js +1 -1
- package/dist/src/compiler/compile-agent.d.ts +2 -1
- package/dist/src/compiler/compile-agent.js +1 -1
- package/dist/src/compiler/diagnostics.d.ts +0 -11
- package/dist/src/compiler/diagnostics.js +1 -1
- package/dist/src/compiler/manifest.d.ts +0 -4
- package/dist/src/compiler/module-map.d.ts +1 -5
- package/dist/src/compiler/module-map.js +1 -1
- package/dist/src/compiler/normalize-agent-config.js +1 -1
- package/dist/src/compiler/normalize-connection.d.ts +2 -1
- package/dist/src/compiler/normalize-instructions.d.ts +2 -6
- package/dist/src/compiler/normalize-instructions.js +1 -1
- package/dist/src/compiler/normalize-manifest-helpers.d.ts +0 -1
- package/dist/src/compiler/normalize-manifest-helpers.js +1 -1
- package/dist/src/compiler/normalize-manifest.js +1 -1
- package/dist/src/compiler/normalize-skill.d.ts +2 -1
- package/dist/src/compiler/project-sources.d.ts +0 -14
- package/dist/src/compiler/project-sources.js +1 -1
- package/dist/src/compiler/resolve-workspace-subagent.js +1 -1
- package/dist/src/compiler/source-graph.d.ts +1 -2
- package/dist/src/compiler/source-graph.js +1 -1
- package/dist/src/context/build-base-tool-context.d.ts +2 -1
- package/dist/src/context/dynamic-tool-lifecycle.d.ts +0 -4
- package/dist/src/context/dynamic-tool-lifecycle.js +1 -1
- package/dist/src/context/dynamic-tool-metadata.d.ts +0 -1
- package/dist/src/context/dynamic-tool-metadata.js +1 -1
- package/dist/src/context/memory-lifecycle.d.ts +0 -8
- package/dist/src/context/memory-lifecycle.js +1 -1
- package/dist/src/discover/connections.d.ts +0 -15
- package/dist/src/discover/connections.js +1 -1
- package/dist/src/discover/diagnostics.d.ts +0 -8
- package/dist/src/discover/diagnostics.js +1 -1
- package/dist/src/discover/discover-agent.js +1 -1
- package/dist/src/discover/discover-subagent.d.ts +0 -1
- package/dist/src/discover/discover-subagent.js +1 -1
- package/dist/src/discover/extensions.d.ts +3 -10
- package/dist/src/discover/extensions.js +1 -1
- package/dist/src/discover/filesystem.d.ts +5 -9
- package/dist/src/discover/filesystem.js +1 -1
- package/dist/src/discover/grammar.d.ts +0 -46
- package/dist/src/discover/grammar.js +1 -1
- package/dist/src/discover/manifest.d.ts +5 -4
- package/dist/src/discover/memory.d.ts +0 -1
- package/dist/src/discover/memory.js +1 -1
- package/dist/src/discover/named-source-directory.js +1 -1
- package/dist/src/discover/project-source.d.ts +2 -1
- package/dist/src/discover/project.js +1 -1
- package/dist/src/discover/sandbox.js +1 -1
- package/dist/src/discover/skills.d.ts +0 -4
- package/dist/src/discover/skills.js +1 -1
- package/dist/src/evals/cli/eval-client.d.ts +2 -1
- package/dist/src/evals/judge.d.ts +2 -1
- package/dist/src/evals/runner/execute-task.d.ts +1 -1
- package/dist/src/evals/types.d.ts +1 -1
- package/dist/src/eve-channel/support.d.ts +1 -3
- package/dist/src/eve-channel/support.js +1 -1
- package/dist/src/execution/dynamic-workflow/schema.d.ts +2 -1
- package/dist/src/execution/dynamic-workflow/tool.js +1 -1
- package/dist/src/execution/effective-agent-config.d.ts +2 -1
- package/dist/src/execution/eve-workflow-attributes.d.ts +3 -5
- package/dist/src/execution/eve-workflow-attributes.js +1 -1
- package/dist/src/execution/history-view.d.ts +2 -1
- package/dist/src/execution/node-step.d.ts +3 -2
- package/dist/src/execution/sandbox/active-handles.d.ts +2 -4
- package/dist/src/execution/sandbox/active-handles.js +1 -1
- package/dist/src/execution/sandbox/bash.d.ts +2 -1
- package/dist/src/execution/sandbox/bindings/docker.js +1 -1
- package/dist/src/execution/sandbox/bindings/immutable-resources.d.ts +0 -6
- package/dist/src/execution/sandbox/bindings/immutable-resources.js +1 -1
- package/dist/src/execution/sandbox/bindings/local-provider-utils.d.ts +3 -2
- package/dist/src/execution/sandbox/bindings/microsandbox-lifecycle.d.ts +0 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-lifecycle.js +1 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-network.d.ts +1 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-options.d.ts +0 -3
- package/dist/src/execution/sandbox/bindings/microsandbox-options.js +1 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-templates.d.ts +0 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-templates.js +1 -1
- package/dist/src/execution/sandbox/bindings/vercel.d.ts +1 -1
- package/dist/src/execution/sandbox/dockerfile.d.ts +0 -1
- package/dist/src/execution/sandbox/dockerfile.js +1 -1
- package/dist/src/execution/sandbox/ensure.d.ts +2 -1
- package/dist/src/execution/sandbox/ensure.js +1 -1
- package/dist/src/execution/sandbox/prewarm.d.ts +1 -18
- package/dist/src/execution/sandbox/prewarm.js +1 -1
- package/dist/src/execution/sandbox/require-sandbox.d.ts +0 -11
- package/dist/src/execution/sandbox/require-sandbox.js +1 -1
- package/dist/src/execution/sandbox/truncate-output.d.ts +2 -5
- package/dist/src/execution/sandbox/truncate-output.js +2 -2
- package/dist/src/execution/session/admission.d.ts +3 -2
- package/dist/src/execution/session/event-sink.d.ts +2 -1
- package/dist/src/execution/session/finalization.d.ts +2 -1
- package/dist/src/execution/session/handoff.d.ts +3 -2
- package/dist/src/execution/session/route-selected-delivery.d.ts +2 -1
- package/dist/src/execution/session/timeout-control.d.ts +2 -1
- package/dist/src/execution/session-activity.d.ts +0 -3
- package/dist/src/execution/session-activity.js +1 -1
- package/dist/src/execution/session-inbox/protocol.d.ts +2 -1
- package/dist/src/execution/session.d.ts +3 -2
- package/dist/src/execution/stable-workflow-names.d.ts +0 -6
- package/dist/src/execution/stable-workflow-names.js +1 -1
- package/dist/src/execution/tools/agent-router-workflow.js +1 -1
- package/dist/src/execution/tools/ask-question-workflow.js +1 -1
- package/dist/src/execution/tools/connection-search.js +1 -1
- package/dist/src/execution/tools/sleep-workflow.js +1 -1
- package/dist/src/execution/tools/subagent/invoke-preparation.d.ts +2 -1
- package/dist/src/execution/tools/subagent/task-agent-requests.d.ts +4 -3
- package/dist/src/execution/tools/workflow/background.d.ts +2 -6
- package/dist/src/execution/tools/workflow/background.js +1 -1
- package/dist/src/execution/tools/workflow/owner-channels.d.ts +1 -1
- package/dist/src/execution/tools/workflow/workflow-owner-background.d.ts +2 -1
- package/dist/src/execution/web-fetch/execute.d.ts +2 -2
- package/dist/src/execution/web-fetch/request.d.ts +2 -1
- package/dist/src/extensions/code/extension/lib/computer-use-driver-source.d.ts +0 -2
- package/dist/src/extensions/code/extension/lib/computer-use-driver-source.js +57 -57
- package/dist/src/extensions/code/extension/lib/computer-use.d.ts +1 -1
- package/dist/src/extensions/code/extension/lib/generated-paths.d.ts +2 -1
- package/dist/src/extensions/code/extension/lib/grep-search.d.ts +5 -5
- package/dist/src/extensions/code/extension/lib/grep-search.js +2 -2
- package/dist/src/extensions/code/extension/lib/guidelines.d.ts +2 -1
- package/dist/src/extensions/code/extension/lib/patch.d.ts +3 -2
- package/dist/src/extensions/code/extension/lib/prwatch-github.d.ts +1 -2
- package/dist/src/extensions/code/extension/lib/prwatch-github.js +1 -1
- package/dist/src/extensions/code/extension/lib/prwatch-registry.d.ts +2 -1
- package/dist/src/framework/host-inventory.d.ts +3 -2
- package/dist/src/harness/approval-candidates.d.ts +4 -3
- package/dist/src/harness/approval-delivery-coordinator.d.ts +2 -1
- package/dist/src/harness/compaction-prompt.d.ts +2 -1
- package/dist/src/harness/coordination.d.ts +0 -4
- package/dist/src/harness/coordination.js +1 -1
- package/dist/src/harness/input-requests.d.ts +1 -10
- package/dist/src/harness/input-requests.js +1 -1
- package/dist/src/harness/pending-input-batches.d.ts +0 -5
- package/dist/src/harness/pending-input-batches.js +1 -1
- package/dist/src/harness/provider-tools.d.ts +2 -1
- package/dist/src/harness/session-limit-continuation.d.ts +0 -4
- package/dist/src/harness/session-limit-continuation.js +1 -1
- package/dist/src/harness/session-usage-limits.d.ts +2 -1
- package/dist/src/harness/tool-loop.js +1 -1
- package/dist/src/harness/tool-model-output.d.ts +2 -1
- package/dist/src/harness/turn-client-context.d.ts +2 -1
- package/dist/src/instrumentation/state.d.ts +2 -2
- package/dist/src/internal/agent-name.d.ts +0 -2
- package/dist/src/internal/agent-name.js +1 -1
- package/dist/src/internal/application/build-profile.d.ts +2 -2
- package/dist/src/internal/application/dev-environment.d.ts +2 -8
- package/dist/src/internal/application/dev-environment.js +1 -1
- package/dist/src/internal/application/output-publication.d.ts +1 -1
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/internal/application/paths.d.ts +0 -5
- package/dist/src/internal/application/paths.js +1 -1
- package/dist/src/internal/application/tsconfig-dependencies.d.ts +0 -16
- package/dist/src/internal/application/tsconfig-dependencies.js +1 -1
- package/dist/src/internal/authored-definition/schema-backed.js +1 -1
- package/dist/src/internal/authored-definition/source-identity.d.ts +1 -1
- package/dist/src/internal/authored-module-map-loader.js +1 -1
- package/dist/src/internal/bundler/extension-scope-plugin.d.ts +2 -1
- package/dist/src/internal/bundler/nitro-rolldown.d.ts +0 -11
- package/dist/src/internal/bundler/nitro-rolldown.js +1 -1
- package/dist/src/internal/eve-project-root.d.ts +0 -3
- package/dist/src/internal/eve-project-root.js +1 -1
- package/dist/src/internal/external-resources-snapshot.d.ts +1 -1
- package/dist/src/internal/external-resources.d.ts +0 -1
- package/dist/src/internal/external-resources.js +1 -1
- package/dist/src/internal/helpers/markdown.js +1 -1
- package/dist/src/internal/invocation/metadata.d.ts +1 -1
- package/dist/src/internal/materialized-authored-modules.d.ts +2 -1
- package/dist/src/internal/mcp/protected-resource.d.ts +2 -1
- package/dist/src/internal/mcp/streamable-http-server.d.ts +4 -5
- package/dist/src/internal/mcp/streamable-http-server.js +1 -1
- package/dist/src/internal/model-catalog.d.ts +2 -1
- package/dist/src/internal/nitro/dev-runtime-artifacts.d.ts +0 -4
- package/dist/src/internal/nitro/dev-runtime-artifacts.js +1 -1
- package/dist/src/internal/nitro/dev-runtime-source-snapshot.d.ts +0 -1
- package/dist/src/internal/nitro/dev-runtime-source-snapshot.js +1 -1
- package/dist/src/internal/nitro/development-generation.d.ts +0 -1
- package/dist/src/internal/nitro/development-generation.js +1 -1
- package/dist/src/internal/nitro/host/channel-routes.d.ts +1 -1
- package/dist/src/internal/nitro/host/dev-authored-rebuild-coordinator.d.ts +2 -1
- package/dist/src/internal/nitro/host/dev-host-candidate.d.ts +2 -1
- package/dist/src/internal/nitro/host/drained-nitro-dev-server.d.ts +1 -1
- package/dist/src/internal/nitro/host/extension-capability-requirements.js +1 -1
- package/dist/src/internal/nitro/host/schedule-task-routes.d.ts +1 -1
- package/dist/src/internal/nitro/host/workspace-extensions.js +1 -1
- package/dist/src/internal/nitro/routes/channel-request-instrumentation.d.ts +2 -1
- package/dist/src/internal/nitro/routes/channel-route-context.d.ts +1 -1
- package/dist/src/internal/nitro/routes/runtime-stack.d.ts +2 -1
- package/dist/src/internal/resolve-model-endpoint-status.d.ts +2 -1
- package/dist/src/internal/vercel/assemble-eve-services.d.ts +3 -2
- package/dist/src/internal/vercel/eve-service-contribution.d.ts +2 -3
- package/dist/src/internal/vercel/eve-service-contribution.js +1 -1
- package/dist/src/internal/vercel/project-link.d.ts +2 -1
- package/dist/src/internal/vercel/project-link.js +1 -1
- package/dist/src/internal/workflow/development-world-codec.d.ts +2 -1
- package/dist/src/internal/workflow/world-compatibility.d.ts +2 -1
- package/dist/src/internal/workflow-bundle/builder-support.d.ts +0 -9
- package/dist/src/internal/workflow-bundle/builder-support.js +2 -3
- package/dist/src/internal/workflow-bundle/dynamic-tool-transform.d.ts +0 -1
- package/dist/src/internal/workflow-bundle/dynamic-tool-transform.js +1 -1
- package/dist/src/protocol/activity.d.ts +3 -3
- package/dist/src/protocol/activity.js +1 -1
- package/dist/src/protocol/baggage.d.ts +2 -2
- package/dist/src/protocol/cancel-turn.d.ts +0 -2
- package/dist/src/protocol/event-dedupe.d.ts +2 -1
- package/dist/src/protocol/event-id.d.ts +0 -6
- package/dist/src/protocol/event-id.js +1 -1
- package/dist/src/protocol/traceparent.d.ts +2 -1
- package/dist/src/public/channels/chat-sdk/audience.d.ts +2 -4
- package/dist/src/public/channels/chat-sdk/audience.js +1 -1
- package/dist/src/public/channels/discord/discordChannel.d.ts +1 -1
- package/dist/src/public/channels/github/api.d.ts +2 -12
- package/dist/src/public/channels/github/api.js +1 -1
- package/dist/src/public/channels/github/auth.d.ts +0 -9
- package/dist/src/public/channels/github/auth.js +1 -1
- package/dist/src/public/channels/github/binding.d.ts +3 -2
- package/dist/src/public/channels/github/checkout.d.ts +3 -3
- package/dist/src/public/channels/github/defaults.d.ts +3 -2
- package/dist/src/public/channels/github/githubChannel.d.ts +1 -1
- package/dist/src/public/channels/github/limits.d.ts +0 -2
- package/dist/src/public/channels/github/limits.js +2 -2
- package/dist/src/public/channels/github/pr-context.d.ts +2 -3
- package/dist/src/public/channels/github/pr-context.js +1 -1
- package/dist/src/public/channels/github/state.d.ts +2 -1
- package/dist/src/public/channels/github/verify.d.ts +2 -1
- package/dist/src/public/channels/linear/defaults.d.ts +2 -1
- package/dist/src/public/channels/linear/inbound-images.d.ts +2 -1
- package/dist/src/public/channels/slack/app-manifest.d.ts +3 -4
- package/dist/src/public/channels/slack/app-manifest.js +1 -1
- package/dist/src/public/channels/slack/inbound.d.ts +2 -1
- package/dist/src/public/channels/slack/model-context.d.ts +0 -18
- package/dist/src/public/channels/slack/model-context.js +1 -1
- package/dist/src/public/channels/slack/privacy.d.ts +2 -1
- package/dist/src/public/channels/slack/verify.d.ts +1 -1
- package/dist/src/public/channels/teams/teamsChannel.d.ts +1 -1
- package/dist/src/public/channels/telegram/audience.d.ts +2 -3
- package/dist/src/public/channels/telegram/audience.js +1 -1
- package/dist/src/public/channels/telegram/telegramChannel.d.ts +1 -1
- package/dist/src/public/channels/twilio/defaults.d.ts +0 -7
- package/dist/src/public/channels/twilio/defaults.js +1 -1
- package/dist/src/public/channels/twilio/routing.d.ts +2 -1
- package/dist/src/public/channels/twilio/twilioChannel.d.ts +1 -1
- package/dist/src/public/definitions/channel.d.ts +1 -1
- package/dist/src/public/index.js +1 -1
- package/dist/src/public/memory/file/provider.js +1 -1
- package/dist/src/public/models/openai/chatgpt/model.d.ts +2 -1
- package/dist/src/public/models/openai/chatgpt/token-broker.d.ts +1 -1
- package/dist/src/public/nuxt/dev-server.d.ts +3 -2
- package/dist/src/public/skills/index.js +1 -1
- package/dist/src/public/sveltekit/dev-server.d.ts +3 -2
- package/dist/src/public/tools/index.js +1 -1
- package/dist/src/runtime/compiled-artifacts-source.d.ts +0 -4
- package/dist/src/runtime/compiled-artifacts-source.js +1 -1
- package/dist/src/runtime/connections/instance-identity.d.ts +0 -3
- package/dist/src/runtime/connections/instance-identity.js +1 -1
- package/dist/src/runtime/connections/mcp-tracing.d.ts +1 -6
- package/dist/src/runtime/connections/mcp-tracing.js +1 -1
- package/dist/src/runtime/connections/openapi-client.d.ts +1 -1
- package/dist/src/runtime/connections/scoped-authorization.d.ts +0 -9
- package/dist/src/runtime/connections/scoped-authorization.js +1 -1
- package/dist/src/runtime/hooks/registry.d.ts +0 -7
- package/dist/src/runtime/hooks/registry.js +1 -1
- package/dist/src/runtime/loaders/artifact-paths.d.ts +2 -1
- package/dist/src/runtime/loaders/bundled-artifacts.d.ts +0 -1
- package/dist/src/runtime/loaders/bundled-artifacts.js +1 -1
- package/dist/src/runtime/resolve-agent.d.ts +2 -2
- package/dist/src/runtime/resolve-agent.js +1 -1
- package/dist/src/runtime/resolve-dynamic-tool.d.ts +0 -16
- package/dist/src/runtime/resolve-dynamic-tool.js +1 -1
- package/dist/src/runtime/sandbox/prepared-artifacts.d.ts +1 -2
- package/dist/src/runtime/sandbox/prepared-artifacts.js +1 -1
- package/dist/src/runtime/schedules/register.d.ts +0 -4
- package/dist/src/runtime/schedules/register.js +1 -1
- package/dist/src/self-modification/credentials.d.ts +1 -4
- package/dist/src/self-modification/credentials.js +1 -1
- package/dist/src/self-modification/filesystem.d.ts +0 -1
- package/dist/src/self-modification/filesystem.js +1 -1
- package/dist/src/self-modification/git-workspace.d.ts +0 -3
- package/dist/src/self-modification/git-workspace.js +1 -1
- package/dist/src/self-modification/github-publisher.d.ts +2 -1
- package/dist/src/self-modification/migration.d.ts +0 -1
- package/dist/src/self-modification/migration.js +1 -1
- package/dist/src/self-modification/mode.d.ts +2 -1
- package/dist/src/self-modification/proposal.d.ts +0 -2
- package/dist/src/self-modification/proposal.js +2 -2
- package/dist/src/self-modification/setup.js +1 -1
- package/dist/src/services/dev-client/agent-info-probe.d.ts +2 -1
- package/dist/src/services/dev-client/request-headers.d.ts +1 -1
- package/dist/src/setup/ai-gateway-api-key.d.ts +2 -1
- package/dist/src/setup/append-env.d.ts +3 -2
- package/dist/src/setup/ask.d.ts +3 -3
- package/dist/src/setup/boxes/apply-ai-gateway-credential.d.ts +2 -1
- package/dist/src/setup/boxes/deploy-project.d.ts +4 -3
- package/dist/src/setup/boxes/link-project.d.ts +2 -1
- package/dist/src/setup/boxes/resolve-provisioning.d.ts +2 -1
- package/dist/src/setup/boxes/select-model.d.ts +0 -1
- package/dist/src/setup/boxes/select-model.js +1 -1
- package/dist/src/setup/cli/option-row.d.ts +1 -1
- package/dist/src/setup/cli/prompt-ui.d.ts +0 -10
- package/dist/src/setup/cli/prompt-ui.js +1 -1
- package/dist/src/setup/cli/rail-log.d.ts +0 -2
- package/dist/src/setup/cli/rail-log.js +2 -2
- package/dist/src/setup/connect-provisioning.d.ts +2 -1
- package/dist/src/setup/connection-connector.d.ts +2 -1
- package/dist/src/setup/flows/link.d.ts +2 -1
- package/dist/src/setup/flows/model-login.d.ts +1 -1
- package/dist/src/setup/flows/model-source-change.js +1 -1
- package/dist/src/setup/flows/registry-session.d.ts +3 -2
- package/dist/src/setup/integrations/discord/api.d.ts +2 -1
- package/dist/src/setup/integrations/discord/connect.d.ts +3 -3
- package/dist/src/setup/integrations/discord/connect.js +1 -1
- package/dist/src/setup/integrations/discord/setup.d.ts +2 -1
- package/dist/src/setup/integrations/file-memory/vercel.d.ts +1 -1
- package/dist/src/setup/integrations/github/connect.d.ts +3 -3
- package/dist/src/setup/integrations/github/connect.js +1 -1
- package/dist/src/setup/integrations/github/setup.d.ts +1 -1
- package/dist/src/setup/integrations/linear/connect.d.ts +2 -2
- package/dist/src/setup/integrations/linear/connect.js +1 -1
- package/dist/src/setup/integrations/linear/setup.d.ts +1 -1
- package/dist/src/setup/integrations/linq/connect.d.ts +3 -4
- package/dist/src/setup/integrations/linq/connect.js +1 -1
- package/dist/src/setup/integrations/linq/management.d.ts +2 -1
- package/dist/src/setup/integrations/linq/setup.d.ts +1 -9
- package/dist/src/setup/integrations/linq/setup.js +1 -1
- package/dist/src/setup/integrations/photon/connect.d.ts +5 -7
- package/dist/src/setup/integrations/photon/connect.js +1 -1
- package/dist/src/setup/integrations/photon/management.d.ts +5 -4
- package/dist/src/setup/integrations/photon/setup-flow.d.ts +2 -1
- package/dist/src/setup/integrations/registry.d.ts +0 -2
- package/dist/src/setup/integrations/registry.js +1 -1
- package/dist/src/setup/integrations/runner.d.ts +3 -2
- package/dist/src/setup/integrations/shared/scaffold.d.ts +2 -1
- package/dist/src/setup/integrations/shared/vercel-project.d.ts +2 -1
- package/dist/src/setup/integrations/shopify/setup.d.ts +2 -1
- package/dist/src/setup/integrations/teams/connect.d.ts +3 -3
- package/dist/src/setup/integrations/teams/connect.js +1 -1
- package/dist/src/setup/integrations/teams/setup.d.ts +2 -1
- package/dist/src/setup/integrations/web/setup.d.ts +2 -1
- package/dist/src/setup/primitives/pm/process-result.d.ts +2 -1
- package/dist/src/setup/primitives/pm/shared.d.ts +2 -1
- package/dist/src/setup/primitives/process-output.d.ts +2 -1
- package/dist/src/setup/quit-guard.d.ts +3 -2
- package/dist/src/setup/scaffold/create/add-to-project.d.ts +2 -1
- package/dist/src/setup/scaffold/create/project.js +1 -1
- package/dist/src/setup/scaffold/files.d.ts +2 -1
- package/dist/src/setup/scaffold/update/channels.d.ts +0 -1
- package/dist/src/setup/scaffold/workspace-glob.d.ts +0 -1
- package/dist/src/setup/scaffold/workspace-glob.js +1 -1
- package/dist/src/setup/scaffold/workspace-root.d.ts +2 -1
- package/dist/src/setup/slack-connect-create.d.ts +1 -1
- package/dist/src/setup/slack-connect-lifecycle.d.ts +5 -5
- package/dist/src/setup/slack-connect.d.ts +0 -4
- package/dist/src/setup/slack-connect.js +1 -1
- package/dist/src/setup/slackbot.d.ts +3 -3
- package/dist/src/setup/slackbot.js +1 -1
- package/dist/src/setup/vercel-project-api.d.ts +1 -1
- package/dist/src/setup/vercel-project.d.ts +3 -18
- package/dist/src/setup/vercel-project.js +0 -0
- package/dist/src/shared/action-types.d.ts +1 -58
- package/dist/src/shared/action-types.js +1 -1
- package/dist/src/shared/agent-definition.d.ts +0 -3
- package/dist/src/shared/agent-turn-outcome.d.ts +1 -3
- package/dist/src/shared/agent-turn-outcome.js +1 -1
- package/dist/src/shared/chatgpt-model.d.ts +0 -1
- package/dist/src/shared/chatgpt-model.js +1 -1
- package/dist/src/shared/conversation-context.d.ts +2 -1
- package/dist/src/shared/extension-package-contract.d.ts +2 -1
- package/dist/src/shared/forwarded-trace-policy.d.ts +3 -2
- package/dist/src/shared/gateway-service-tier.d.ts +2 -1
- package/dist/src/shared/memory-state.d.ts +0 -8
- package/dist/src/shared/memory-state.js +1 -1
- package/dist/src/shared/sandbox-environment.d.ts +0 -1
- package/dist/src/shared/sandbox-environment.js +1 -1
- package/dist/src/shared/skill-package.d.ts +0 -5
- package/dist/src/shared/skill-package.js +1 -1
- package/dist/src/shared/token-usage.d.ts +0 -7
- package/dist/src/shared/token-usage.js +1 -1
- package/dist/src/shared/ulid.d.ts +2 -8
- package/dist/src/shared/ulid.js +1 -1
- package/dist/src/shared/vercel-project.d.ts +2 -1
- package/dist/src/shared/vercel-services.d.ts +2 -2
- package/dist/src/shared/workflow-sandbox.d.ts +0 -7
- package/dist/src/source-change/agent-config-ast.d.ts +2 -1
- package/dist/src/source-change/agent-config-string-path.d.ts +2 -2
- package/dist/src/source-change/apply-agent-model-settings.d.ts +2 -1
- package/dist/src/source-change/apply-model-selection.d.ts +2 -1
- package/dist/src/source-change/static-source-change.d.ts +4 -3
- package/dist/src/subagents/invocation.d.ts +1 -1
- package/dist/src/subagents/tool.d.ts +2 -1
- package/dist/src/tools/definition.d.ts +0 -3
- package/dist/src/tools/durable-callbacks.d.ts +1 -2
- package/dist/src/tools/durable-callbacks.js +1 -1
- package/dist/src/tools/framework/agent.js +1 -1
- package/dist/src/tools/framework/task-cancel.d.ts +1 -1
- package/dist/src/tools/native-definition.d.ts +2 -1
- package/dist/src/tracing/agent-action-instrumentation.d.ts +2 -1
- package/dist/src/tracing/agent-memory-instrumentation.d.ts +2 -1
- package/dist/src/tracing/agent-otel-provider.d.ts +2 -1
- package/dist/src/tracing/agent-span-id-generator.d.ts +0 -1
- package/dist/src/tracing/agent-span-id-generator.js +1 -1
- package/dist/src/tracing/agent-tool-instrumentation.d.ts +2 -1
- package/dist/src/tracing/agent-tool-span-context.d.ts +3 -2
- package/dist/src/tracing/agent-trace-state.d.ts +0 -24
- package/dist/src/tracing/agent-trace-state.js +1 -1
- package/dist/src/tracing/batch-span-processor.d.ts +2 -1
- package/dist/src/tracing/local-trace-analysis.d.ts +4 -3
- package/dist/src/tracing/local-trace-discovery-index.d.ts +0 -2
- package/dist/src/tracing/local-trace-discovery-index.js +1 -1
- package/dist/src/tracing/local-trace-query.d.ts +2 -1
- package/dist/src/tracing/local-trace-retention.d.ts +4 -4
- package/dist/src/tracing/telemetry-budget.d.ts +0 -1
- package/dist/src/tracing/telemetry-budget.js +1 -1
- package/package.json +8 -8
- package/dist/src/cli/commands/channel-add-conflicts.d.ts +0 -21
- package/dist/src/cli/commands/channel-add-conflicts.js +0 -1
- package/dist/src/cli/commands/registry-search-presentation.d.ts +0 -16
- package/dist/src/cli/commands/registry-search-presentation.js +0 -6
- package/dist/src/compiled/_chunks/workflow/dist-BfMqXLK3.js +0 -3
- package/dist/src/compiled/_chunks/workflow/helpers-CNMO7zB1.js +0 -1
- package/dist/src/compiled/_chunks/workflow/logger-BCEj9caG.js +0 -14
- package/dist/src/compiled/_chunks/workflow/resume-hook-QS_cMwHn.js +0 -1
- package/dist/src/compiled/_chunks/workflow/run-CA5wWV2S.js +0 -1
- package/dist/src/compiled/_chunks/workflow/serialization-CJ265vSe.js +0 -3
- package/dist/src/compiled/_chunks/workflow/sleep-CBn94Ayv.js +0 -1
- package/dist/src/compiled/_chunks/workflow/wait-until-Bo2U6ON9.js +0 -1
- package/dist/src/compiler/compile-from-memory.d.ts +0 -44
- package/dist/src/compiler/compile-from-memory.js +0 -1
- package/dist/src/execution/connection-auth-tool-result.d.ts +0 -2
- package/dist/src/execution/connection-auth-tool-result.js +0 -1
- package/dist/src/internal/process/pnpm.d.ts +0 -28
- package/dist/src/internal/process/pnpm.js +0 -1
- package/dist/src/public/channels/slack/api-encoding.d.ts +0 -5
- package/dist/src/public/channels/slack/api-encoding.js +0 -1
- package/dist/src/public/definitions/instrumentation.d.ts +0 -1
- package/dist/src/public/definitions/instrumentation.js +0 -1
- package/dist/src/public/models/openai/chatgpt/unsigned-jwt.d.ts +0 -5
- package/dist/src/public/models/openai/chatgpt/unsigned-jwt.js +0 -1
- package/dist/src/sandbox/backends/probes.d.ts +0 -7
- package/dist/src/sandbox/backends/probes.js +0 -1
- package/dist/src/setup/channel-add-conflicts.d.ts +0 -28
- package/dist/src/setup/channel-add-conflicts.js +0 -1
- package/dist/src/setup/primitives/run-pnpm.d.ts +0 -1
- package/dist/src/setup/primitives/run-pnpm.js +0 -1
- package/dist/src/shared/dispatch-action.d.ts +0 -30
- package/dist/src/shared/dispatch-action.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HarnessSession, SessionStateMap } from "#harness/types.js";
|
|
2
|
-
|
|
2
|
+
interface TurnClientContextState {
|
|
3
3
|
/** Position of ephemeral client context in each model request for this turn. */
|
|
4
4
|
readonly insertionIndex: number;
|
|
5
5
|
readonly messages: readonly string[];
|
|
@@ -8,3 +8,4 @@ export interface TurnClientContextState {
|
|
|
8
8
|
export declare function getTurnClientContextState(state: SessionStateMap | undefined, turnId: string): TurnClientContextState | undefined;
|
|
9
9
|
export declare function setTurnClientContextState(session: HarnessSession, clientContext: TurnClientContextState): HarnessSession;
|
|
10
10
|
export declare function clearTurnClientContextState(session: HarnessSession): HarnessSession;
|
|
11
|
+
export {};
|
|
@@ -12,7 +12,7 @@ export interface InstrumentationStateSlot {
|
|
|
12
12
|
/** Stages a value; `undefined` releases the slot. */
|
|
13
13
|
set(value: JsonValue | undefined): void;
|
|
14
14
|
}
|
|
15
|
-
|
|
15
|
+
interface InstrumentationStateLease extends InstrumentationStateSlot {
|
|
16
16
|
/** Makes later reads empty and writes no-ops. */
|
|
17
17
|
revoke(): void;
|
|
18
18
|
}
|
|
@@ -38,7 +38,7 @@ export declare function rememberInstrumentationActionScope(idempotencyKey: strin
|
|
|
38
38
|
export declare function rememberInstrumentationInputScope(idempotencyKey: string, scope: InstrumentationAttemptScope): void;
|
|
39
39
|
/** Reads and releases one durable input request's originating scope. */
|
|
40
40
|
export declare function takeInstrumentationInputScope(idempotencyKey: string): InstrumentationAttemptScope | undefined;
|
|
41
|
-
|
|
41
|
+
interface InstrumentationActionCorrelation {
|
|
42
42
|
readonly idempotencyKey: string;
|
|
43
43
|
readonly scope: InstrumentationAttemptScope;
|
|
44
44
|
}
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
/** Whether a name is safe to expose as an eve public route segment. */
|
|
2
|
-
export declare function isValidPublicAgentName(name: string): boolean;
|
|
3
1
|
/** Assert that an authored agent name is safe to expose publicly. */
|
|
4
2
|
export declare function assertValidPublicAgentName(name: string, subject: string): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const PUBLIC_AGENT_NAME_PATTERN=/^[a-z0-9](?:[a-z0-9_-]*[a-z0-9])?$/;function isValidPublicAgentName(e){return PUBLIC_AGENT_NAME_PATTERN.test(e)}function assertValidPublicAgentName(e,t){if(!isValidPublicAgentName(e))throw Error(`${t} ${JSON.stringify(e)} is invalid. Use lowercase letters, numbers, hyphens, or underscores, beginning and ending with a letter or number.`)}export{assertValidPublicAgentName
|
|
1
|
+
const PUBLIC_AGENT_NAME_PATTERN=/^[a-z0-9](?:[a-z0-9_-]*[a-z0-9])?$/;function isValidPublicAgentName(e){return PUBLIC_AGENT_NAME_PATTERN.test(e)}function assertValidPublicAgentName(e,t){if(!isValidPublicAgentName(e))throw Error(`${t} ${JSON.stringify(e)} is invalid. Use lowercase letters, numbers, hyphens, or underscores, beginning and ending with a letter or number.`)}export{assertValidPublicAgentName};
|
|
@@ -8,7 +8,7 @@ export interface ApplicationBuildProfilePhase {
|
|
|
8
8
|
readonly name: string;
|
|
9
9
|
}
|
|
10
10
|
/** Size totals for one Vercel function directory in the published output. */
|
|
11
|
-
|
|
11
|
+
interface ApplicationBuildProfileFunctionBundle {
|
|
12
12
|
readonly files: number;
|
|
13
13
|
readonly gzipBytes: number;
|
|
14
14
|
readonly path: string;
|
|
@@ -22,7 +22,7 @@ export interface ApplicationBuildProfileOutput {
|
|
|
22
22
|
readonly rawBytes: number;
|
|
23
23
|
}
|
|
24
24
|
/** Timing data gathered while an application build runs. */
|
|
25
|
-
|
|
25
|
+
interface ApplicationBuildProfileTiming {
|
|
26
26
|
readonly durationMs: number;
|
|
27
27
|
readonly phases: readonly ApplicationBuildProfilePhase[];
|
|
28
28
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** Environment flag set for processes that belong to an `eve dev` session. */
|
|
2
2
|
export declare const EVE_DEV_ENV_FLAG = "EVE_DEV";
|
|
3
|
-
|
|
3
|
+
type InstrumentationEnvironment = "development" | "preview" | "production";
|
|
4
4
|
/** Reports whether this process belongs to an `eve dev` session. */
|
|
5
5
|
export declare function isEveDevEnvironment(): boolean;
|
|
6
6
|
/** Resolves the deployment environment used by setup hooks and trace policies. */
|
|
@@ -9,11 +9,5 @@ export declare function resolveInstrumentationEnvironment(): InstrumentationEnvi
|
|
|
9
9
|
export declare const EVE_EVALUATION_ENV_FLAG = "EVE_EVALUATION";
|
|
10
10
|
/** Stable identifier for the local eval run this server was started to serve. */
|
|
11
11
|
export declare const EVE_EVALUATION_RUN_ID_ENV = "EVE_EVALUATION_RUN_ID";
|
|
12
|
-
/**
|
|
13
|
-
* Reports whether this process exists to serve an eval run.
|
|
14
|
-
*
|
|
15
|
-
* False for a server that `eve eval --url` merely points at: that process was
|
|
16
|
-
* started to serve ordinary traffic and cannot know an eval is among it.
|
|
17
|
-
*/
|
|
18
|
-
export declare function isEveEvaluationEnvironment(): boolean;
|
|
19
12
|
export declare function resolveEveEvaluationRunId(): string | undefined;
|
|
13
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const EVE_DEV_ENV_FLAG=`EVE_DEV`;function isEveDevEnvironment(){return process.env[EVE_DEV_ENV_FLAG]===`1`}function resolveInstrumentationEnvironment(){return isEveDevEnvironment()||process.env.VERCEL_ENV===`development`?`development`:process.env.VERCEL_ENV===`preview`?`preview`:`production`}const EVE_EVALUATION_ENV_FLAG=`EVE_EVALUATION`,EVE_EVALUATION_RUN_ID_ENV=`EVE_EVALUATION_RUN_ID`;function isEveEvaluationEnvironment(){return process.env[EVE_EVALUATION_ENV_FLAG]===`1`}function resolveEveEvaluationRunId(){if(!isEveEvaluationEnvironment())return;let e=process.env[EVE_EVALUATION_RUN_ID_ENV];return e===void 0||e.length===0?void 0:e}export{EVE_DEV_ENV_FLAG,EVE_EVALUATION_ENV_FLAG,EVE_EVALUATION_RUN_ID_ENV,isEveDevEnvironment,
|
|
1
|
+
const EVE_DEV_ENV_FLAG=`EVE_DEV`;function isEveDevEnvironment(){return process.env[EVE_DEV_ENV_FLAG]===`1`}function resolveInstrumentationEnvironment(){return isEveDevEnvironment()||process.env.VERCEL_ENV===`development`?`development`:process.env.VERCEL_ENV===`preview`?`preview`:`production`}const EVE_EVALUATION_ENV_FLAG=`EVE_EVALUATION`,EVE_EVALUATION_RUN_ID_ENV=`EVE_EVALUATION_RUN_ID`;function isEveEvaluationEnvironment(){return process.env[EVE_EVALUATION_ENV_FLAG]===`1`}function resolveEveEvaluationRunId(){if(!isEveEvaluationEnvironment())return;let e=process.env[EVE_EVALUATION_RUN_ID_ENV];return e===void 0||e.length===0?void 0:e}export{EVE_DEV_ENV_FLAG,EVE_EVALUATION_ENV_FLAG,EVE_EVALUATION_RUN_ID_ENV,isEveDevEnvironment,resolveEveEvaluationRunId,resolveInstrumentationEnvironment};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { resolveOutputPublicationLockPath } from "#internal/application/output-publication-lock.js";
|
|
2
2
|
export { resolveOutputPublicationLockPath };
|
|
3
|
-
|
|
3
|
+
interface OutputPublicationInput {
|
|
4
4
|
readonly appRoot: string;
|
|
5
5
|
readonly finalOutputDir: string;
|
|
6
6
|
readonly finalSummaryPath: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createRequire}from"node:module";import{existsSync,readFileSync,realpathSync}from"node:fs";import{basename,dirname,join}from"node:path";import{fileURLToPath}from"node:url";import{EVE_PACKAGE_NAME}from"#internal/package-name.js";let cachedPackageInfo,cachedPackageLocation;const BUNDLED_FALLBACK_PACKAGE_VERSION=`0.67.
|
|
1
|
+
import{createRequire}from"node:module";import{existsSync,readFileSync,realpathSync}from"node:fs";import{basename,dirname,join}from"node:path";import{fileURLToPath}from"node:url";import{EVE_PACKAGE_NAME}from"#internal/package-name.js";let cachedPackageInfo,cachedPackageLocation;const BUNDLED_FALLBACK_PACKAGE_VERSION=`0.67.2`,WORKFLOW_MODULE_ALIASES={"workflow/errors":`src/compiled/@workflow/errors/index.js`,"workflow/internal/private":`src/compiled/@workflow/core/private.js`};function resolveFallbackPackageVersion(){return BUNDLED_FALLBACK_PACKAGE_VERSION.startsWith(`__`)?`0.0.0`:BUNDLED_FALLBACK_PACKAGE_VERSION}const FALLBACK_PACKAGE_INFO={name:EVE_PACKAGE_NAME,version:resolveFallbackPackageVersion()};function resolveCurrentModulePath(){return typeof __filename==`string`?__filename:resolveCurrentModulePathFromStack()}function resolveCurrentModulePathFromStack(){let e=Error.prepareStackTrace;try{Error.prepareStackTrace=(e,t)=>t;let e=Error().stack?.[0]?.getFileName();if(typeof e!=`string`||e.length===0)throw Error(`Failed to resolve the current module path from the stack trace.`);return e.startsWith(`file:`)?fileURLToPath(e):e}finally{Error.prepareStackTrace=e}}const require=createRequire(resolveCurrentModulePath());function tryResolveVerifiedPackageRoot(e){try{let t=realpathSync.native(e);return tryReadInstalledPackageInfo(t,EVE_PACKAGE_NAME)===void 0?void 0:dirname(t)}catch{return}}function findNearestVerifiedPackageRoot(e){let t=e;for(;;){let e=tryResolveVerifiedPackageRoot(join(t,`package.json`));if(e!==void 0)return e;let n=dirname(t);if(n===t)return;t=n}}function tryResolveDirectBuildLocation(e){let t=dirname(e);for(;;){if(basename(t)===`dist`){let e=tryResolveVerifiedPackageRoot(join(dirname(t),`package.json`));if(e!==void 0)return{packageBuildRoot:t,packageRoot:e}}let e=dirname(t);if(e===t)return;t=e}}function isSourceCheckout(e){return existsSync(join(e,`src`,`internal`,`application`,`package.ts`))}function tryCreatePackageLocation(e){if(isSourceCheckout(e))return{packageBuildRoot:null,packageRoot:e};let t=join(e,`dist`);if(existsSync(t))return{packageBuildRoot:t,packageRoot:e}}function resolveSelfPackageJsonPath(e){return createRequire(e).resolve(`${EVE_PACKAGE_NAME}/package.json`)}function resolvePackageLocationFromModulePath(e,t=resolveSelfPackageJsonPath){let n=realpathSync.native(e),r=tryResolveDirectBuildLocation(n);if(r!==void 0)return r;let i=findNearestVerifiedPackageRoot(dirname(n));if(i!==void 0&&isSourceCheckout(i))return{packageBuildRoot:null,packageRoot:i};try{let e=tryResolveVerifiedPackageRoot(t(n)),r=e===void 0?void 0:tryCreatePackageLocation(e);if(r!==void 0)return r}catch{}let a=i===void 0?void 0:tryCreatePackageLocation(i);if(a!==void 0)return a;throw Error(`Failed to resolve the eve package root from "${e}".`)}function resolvePackageLocation(){return cachedPackageLocation??=resolvePackageLocationFromModulePath(resolveCurrentModulePath()),cachedPackageLocation}function resolvePackageBuildRoot(){return resolvePackageLocation().packageBuildRoot}function resolvePackageRoot(){return resolvePackageLocation().packageRoot}function tryResolvePackageRoot(){try{return resolvePackageRoot()}catch{return}}function rewriteSourceFilePathForBuild(e){return e.replace(/\.[cm]?tsx?$/,`.js`)}function resolvePackageSourceFilePath(e){let t=resolvePackageBuildRoot();return t===null?join(resolvePackageRoot(),e):join(t,rewriteSourceFilePathForBuild(e))}function resolvePackageSourceDirectoryPath(e){let t=resolvePackageBuildRoot();return join(t===null?resolvePackageRoot():t,e)}function resolvePackageDependencyPath(e){try{return require.resolve(e)}catch(t){let n=tryResolvePackageRoot(),r=n===void 0||!isSourceCheckout(n)?void 0:resolveSourceCheckoutExport(n,e);if(r!==void 0)return r;throw t}}function resolveSourceCheckoutExport(e,t){if(t!==EVE_PACKAGE_NAME&&!t.startsWith(`${EVE_PACKAGE_NAME}/`))return;let n=t===EVE_PACKAGE_NAME?`.`:`.${t.slice(EVE_PACKAGE_NAME.length)}`;try{let t=JSON.parse(readFileSync(join(e,`package.json`),`utf8`)).exports?.[n],r=typeof t==`string`?t:t?.[`eve-source`]??t?.import??t?.default;if(r===void 0)return;let i=r.replace(/^\.\/dist\/src\//,`src/`).replace(/\.[cm]?js$/u,`.ts`),a=join(e,i);return existsSync(a)?a:void 0}catch{return}}function resolvePackageCompiledFilePath(e){let t=resolvePackageBuildRoot();return t===null?join(resolvePackageRoot(),`.generated`,`compiled`,e.replace(/^src\/compiled\//,``)):join(t,e)}function normalizeInstalledPackageInfo(e){let t=e;if(typeof t.name==`string`&&typeof t.version==`string`)return{name:t.name,version:t.version}}function tryReadInstalledPackageInfo(e,t){let n=normalizeInstalledPackageInfo(JSON.parse(readFileSync(e,`utf8`)));if(n?.name===t)return n}function resolveInstalledPackageInfo(){if(cachedPackageInfo)return cachedPackageInfo;let e=tryResolvePackageRoot(),t=e===void 0?void 0:tryReadInstalledPackageInfo(join(e,`package.json`),EVE_PACKAGE_NAME);if(t)return cachedPackageInfo=t,cachedPackageInfo;try{let e=tryReadInstalledPackageInfo(require.resolve(`${EVE_PACKAGE_NAME}/package.json`),EVE_PACKAGE_NAME);if(e)return cachedPackageInfo=e,cachedPackageInfo}catch{}return cachedPackageInfo={...FALLBACK_PACKAGE_INFO},cachedPackageInfo}function readWorkflowVersionFromManifest(e){let t=e;for(let e of[t.devDependencies,t.dependencies,t.peerDependencies]){let t=e?.[`@workflow/core`];if(typeof t==`string`&&t.trim().length>0)return t}}function resolveExpectedWorkflowVersion(){let e=tryResolvePackageRoot();if(e!==void 0)try{return readWorkflowVersionFromManifest(JSON.parse(readFileSync(join(e,`package.json`),`utf8`)))}catch{}try{return readWorkflowVersionFromManifest(JSON.parse(readFileSync(require.resolve(`${EVE_PACKAGE_NAME}/package.json`),`utf8`)))}catch{return}}function resolveWorkflowModulePath(e){if(e===`workflow`)return resolvePackageSourceFilePath(`src/internal/workflow/index.ts`);if(e===`workflow/api`||e===`workflow/runtime`)return resolvePackageSourceFilePath(`src/internal/workflow/runtime.ts`);if(e===`workflow/internal/builtins`)return resolvePackageSourceFilePath(`src/internal/workflow/builtins.ts`);let t=WORKFLOW_MODULE_ALIASES[e];return t===void 0?require.resolve(e):resolvePackageCompiledFilePath(t)}export{resolveExpectedWorkflowVersion,resolveInstalledPackageInfo,resolvePackageCompiledFilePath,resolvePackageDependencyPath,resolvePackageLocationFromModulePath,resolvePackageRoot,resolvePackageSourceDirectoryPath,resolvePackageSourceFilePath,resolveWorkflowModulePath};
|
|
@@ -16,11 +16,6 @@ export declare function resolveApplicationRoot(cwd?: string): string;
|
|
|
16
16
|
* this is the canonical signal for "managed by Vercel" versus self-hosted.
|
|
17
17
|
*/
|
|
18
18
|
export declare function isVercelBuildEnvironment(): boolean;
|
|
19
|
-
/**
|
|
20
|
-
* Resolves the programmatic Nitro build directory for an app.
|
|
21
|
-
*/
|
|
22
|
-
export declare function resolveNitroBuildDirectory(appRoot: string): string;
|
|
23
|
-
export declare function resolveApplicationHostArtifactsDirectory(appRoot: string): string;
|
|
24
19
|
/**
|
|
25
20
|
* Resolves the package-owned Workflow DevKit bundle directory for a target app.
|
|
26
21
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createHash}from"node:crypto";import{resolveInstalledPackageInfo,resolvePackageRoot,resolvePackageSourceDirectoryPath}from"#internal/application/package.js";import{existsSync,readFileSync,readdirSync,rmSync}from"node:fs";import{join,resolve}from"node:path";import{EVE_INTERNAL_BUILD_OUTPUT_DIRECTORY_ENV,EVE_INTERNAL_HOST_BUILD_OUTPUT_DIRECTORY_ENV}from"#internal/application/build-output-environment.js";import{workflowEntryReference}from"#execution/workflow-runtime.js";function resolveApplicationRoot(e=process.cwd()){return resolve(e)}function getWorkflowBuildCacheKey(e){return createHash(`sha256`).update(e).digest(`hex`).slice(0,12)}function isVercelBuildEnvironment(){return!!process.env.VERCEL}function
|
|
1
|
+
import{createHash}from"node:crypto";import{resolveInstalledPackageInfo,resolvePackageRoot,resolvePackageSourceDirectoryPath}from"#internal/application/package.js";import{existsSync,readFileSync,readdirSync,rmSync}from"node:fs";import{join,resolve}from"node:path";import{EVE_INTERNAL_BUILD_OUTPUT_DIRECTORY_ENV,EVE_INTERNAL_HOST_BUILD_OUTPUT_DIRECTORY_ENV}from"#internal/application/build-output-environment.js";import{workflowEntryReference}from"#execution/workflow-runtime.js";function resolveApplicationRoot(e=process.cwd()){return resolve(e)}function getWorkflowBuildCacheKey(e){return createHash(`sha256`).update(e).digest(`hex`).slice(0,12)}function isVercelBuildEnvironment(){return!!process.env.VERCEL}function resolveWorkflowBuildDirectory(e){let t=join(resolvePackageRoot(),`.eve`,`workflow-cache`);return pruneStaleWorkflowCacheSiblings(t),join(t,getWorkflowBuildCacheKey(e))}function pruneStaleWorkflowCacheSiblings(e){if(!existsSync(e))return;let t=resolveInstalledPackageInfo().version,n;try{n=readdirSync(e)}catch{return}for(let r of n){let n=join(e,r),i=join(n,`eve-cache.json`);if(existsSync(i))try{let e=JSON.parse(readFileSync(i,`utf8`));typeof e.eveVersion==`string`&&e.eveVersion!==t&&rmSync(n,{force:!0,recursive:!0})}catch{}}}function resolveSandboxCacheDirectory(e){return join(e,`.eve`,`sandbox-cache`)}function resolveOutputDirectory(e){return isVercelBuildEnvironment()?join(e,`.vercel`,`output`):join(e,`.output`)}function getApplicationInfo(e){return{appRoot:e,outputDir:resolveOutputDirectory(e),workflowId:workflowEntryReference.workflowId,workflowBuildDir:resolveWorkflowBuildDirectory(e),workflowSourceDir:resolvePackageSourceDirectoryPath(`src/execution`)}}export{EVE_INTERNAL_BUILD_OUTPUT_DIRECTORY_ENV,EVE_INTERNAL_HOST_BUILD_OUTPUT_DIRECTORY_ENV,getApplicationInfo,isVercelBuildEnvironment,resolveApplicationRoot,resolveOutputDirectory,resolveSandboxCacheDirectory,resolveWorkflowBuildDirectory};
|
|
@@ -3,21 +3,5 @@
|
|
|
3
3
|
* one package root: root configs plus their extends chain.
|
|
4
4
|
*/
|
|
5
5
|
export declare function resolveTsConfigDependencyPaths(appRoot: string): Promise<string[]>;
|
|
6
|
-
export declare function resolveRootTsConfigPaths(appRoot: string): Promise<string[]>;
|
|
7
|
-
export declare function collectTsConfigDependencyPaths(input: {
|
|
8
|
-
readonly configPath: string;
|
|
9
|
-
readonly resolvedConfigPaths: Set<string>;
|
|
10
|
-
readonly visitingConfigPaths: Set<string>;
|
|
11
|
-
}): Promise<void>;
|
|
12
6
|
export declare function readTextFileIfExists(path: string): Promise<string | undefined>;
|
|
13
7
|
export declare function parseTsConfigObject(source: string): Record<string, unknown> | undefined;
|
|
14
|
-
export declare function extractTsConfigExtendsSpecifiers(source: string): string[];
|
|
15
|
-
export declare function resolveTsConfigExtendsTargetPaths(input: {
|
|
16
|
-
readonly configPath: string;
|
|
17
|
-
readonly extendsSpecifier: string;
|
|
18
|
-
}): string[];
|
|
19
|
-
export declare function resolveFirstExistingTsConfigExtendsTarget(input: {
|
|
20
|
-
readonly configPath: string;
|
|
21
|
-
readonly extendsSpecifier: string;
|
|
22
|
-
}): string | undefined;
|
|
23
|
-
export declare function isTsConfigFilePath(specifier: string): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createRequire}from"node:module";import{readFile,readdir}from"node:fs/promises";import{
|
|
1
|
+
import{createRequire}from"node:module";import{readFile,readdir}from"node:fs/promises";import{dirname,isAbsolute,join,resolve}from"node:path";import{parse}from"#compiled/jsonc-parser/index.js";async function resolveTsConfigDependencyPaths(e){let t=await resolveRootTsConfigPaths(e),n=new Set,r=new Set;for(let e of t)await collectTsConfigDependencyPaths({configPath:e,resolvedConfigPaths:n,visitingConfigPaths:r});return[...n].sort((e,t)=>e.localeCompare(t))}async function resolveRootTsConfigPaths(e){let t=new Set([join(e,`tsconfig.json`),join(e,`jsconfig.json`)]);try{let n=await readdir(e,{withFileTypes:!0});for(let r of n)r.isFile()&&/^tsconfig\..+\.json$/i.test(r.name)&&t.add(join(e,r.name))}catch{}return[...t]}async function collectTsConfigDependencyPaths(e){let t=resolve(e.configPath);if(e.resolvedConfigPaths.has(t)||e.visitingConfigPaths.has(t))return;let n=await readTextFileIfExists(t);if(n!==void 0){e.resolvedConfigPaths.add(t),e.visitingConfigPaths.add(t);try{let r=extractTsConfigExtendsSpecifiers(n);for(let n of r)for(let r of resolveTsConfigExtendsTargetPaths({configPath:t,extendsSpecifier:n}))await collectTsConfigDependencyPaths({configPath:r,resolvedConfigPaths:e.resolvedConfigPaths,visitingConfigPaths:e.visitingConfigPaths})}finally{e.visitingConfigPaths.delete(t)}}}async function readTextFileIfExists(e){try{return await readFile(e,`utf8`)}catch{return}}function parseTsConfigObject(e){let t=[],n=parse(e,t,{allowTrailingComma:!0});if(!(t.length>0||typeof n!=`object`||!n||Array.isArray(n)))return n}function extractTsConfigExtendsSpecifiers(e){let t=parseTsConfigObject(e);if(t===void 0)return[];let n=t.extends;return typeof n==`string`?n.length>0?[n]:[]:Array.isArray(n)?n.filter(e=>typeof e==`string`&&e.length>0):[]}function resolveTsConfigExtendsTargetPaths(e){let t=new Set;if(isTsConfigFilePath(e.extendsSpecifier))for(let n of resolveFileExtendsCandidates({configPath:e.configPath,extendsSpecifier:e.extendsSpecifier}))t.add(n);else for(let n of resolvePackageExtendsCandidates({configPath:e.configPath,extendsSpecifier:e.extendsSpecifier}))t.add(n);return[...t]}function resolveFileExtendsCandidates(e){let t=resolve(dirname(e.configPath),e.extendsSpecifier),n=new Set;return n.add(t),t.endsWith(`.json`)||(n.add(`${t}.json`),n.add(join(t,`tsconfig.json`))),[...n]}function resolvePackageExtendsCandidates(e){let t=new Set([e.extendsSpecifier]);e.extendsSpecifier.endsWith(`.json`)||(t.add(`${e.extendsSpecifier}.json`),t.add(`${e.extendsSpecifier}/tsconfig.json`));let n=new Set,r=createRequire(e.configPath);for(let e of t)try{n.add(r.resolve(e))}catch{}return[...n]}function isTsConfigFilePath(e){return e.startsWith(`.`)||isAbsolute(e)?!0:/^[A-Za-z]:[\\/]/.test(e)}export{parseTsConfigObject,readTextFileIfExists,resolveTsConfigDependencyPaths};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{expectBoolean,expectFunction,expectObjectRecord,expectOnlyKnownKeys,expectString}from"#internal/authored-module.js";import{serializeInputSchema,serializeOutputSchema}from"#tools/schema.js";import{
|
|
1
|
+
import{expectBoolean,expectFunction,expectObjectRecord,expectOnlyKnownKeys,expectString}from"#internal/authored-module.js";import{serializeInputSchema,serializeOutputSchema}from"#tools/schema.js";import{readWorkflowFunctionId}from"#internal/workflow/reference.js";import{assertResolverOnlyDynamicSentinel,isDynamicSentinel}from"#dynamic/definition.js";import{isWorkflowToolDefinition}from"#tools/workflow-definition.js";import{shouldRebindDynamicCallbacks}from"#internal/dynamic-tool-rebind.js";import{isDisabledToolSentinel}from"#tools/definition.js";import{normalizeApproval}from"#internal/authored-definition/approval.js";import{isWebSearchToolDefinition}from"#tools/provided/web-search.js";import{readToolBehavior}from"#tools/behavior.js";import{readWorkflowProgramOptions}from"#tools/workflow-program-input.js";function normalizeToolDefinition(e,t){if(isDynamicSentinel(e))return assertResolverOnlyDynamicSentinel(e,t),{kind:`dynamic-tool`,eventNames:Object.keys(e.events),rebindMissingCallbacks:shouldRebindDynamicCallbacks(e)};if(isDisabledToolSentinel(e))return{kind:`disabled`};if(isWebSearchToolDefinition(e)){let n=expectObjectRecord(e,t);expectOnlyKnownKeys(n,[`kind`,`provider`],t);let r=expectString(n.provider,t);if(r!==`exa`&&r!==`parallel`)throw Error(`${t} Expected "provider" to be one of: exa, parallel.`);return{kind:`web-search-tool`,provider:r}}let n=expectObjectRecord(e,t),r=readWorkflowFunctionId(n.execute);if(isWorkflowToolDefinition(e)){if(r===void 0)throw Error(`${t} defineWorkflowTool() requires a compiled workflow executor. Start execute with "use workflow" and export defineWorkflowTool() as the default export of a static tool module.`)}else if(r!==void 0)throw Error(`${t} Workflow executors require defineWorkflowTool() from "eve/tools". Replace defineTool() or the bare tool object with defineWorkflowTool().`);expectOnlyKnownKeys(n,[`availableInSubagents`,`label`,`auth`,`description`,`execute`,`execution`,`inputSchema`,`approval`,`approvalKey`,`outputSchema`,`toModelOutput`],t);let i=n.inputSchema===void 0?null:serializeInputSchema(n.inputSchema),a=serializeOutputSchema(n.outputSchema),o=readToolBehavior(e),s=readWorkflowProgramOptions(e),c=n.execute!==void 0;!c&&o?.handling?.kind!==`dispatch`&&expectFunction(n.execute,t);let l={availableInSubagents:n.availableInSubagents===void 0?void 0:expectBoolean(n.availableInSubagents,t),description:expectString(n.description,t),hasApproval:n.approval!==void 0,hasExecute:c,hasModelOutputProjection:n.toModelOutput!==void 0,inputSchema:i};if(o!==void 0&&(l.behavior=o),s!==void 0&&(l.workflowProgram=s),c&&(l.execute=expectFunction(n.execute,t)),n.execution!==void 0){if(!c)throw Error(`${t} Execute-less native tools cannot use background execution.`);let e=expectString(n.execution,t);if(e!==`background`)throw Error(`${t} Expected "execution" to be "background".`);l.execution=e}if(a!==void 0&&(l.outputSchema=a),n.label!==void 0){let e=expectObjectRecord(n.label,t);expectOnlyKnownKeys(e,[`start`,`complete`,`delta`],t),expectFunction(e.start,t),e.complete!==void 0&&expectFunction(e.complete,t),e.delta!==void 0&&expectFunction(e.delta,t)}if(n.approval!==void 0&&normalizeApproval(n.approval,t),n.approvalKey!==void 0&&expectFunction(n.approvalKey,t),n.toModelOutput!==void 0&&expectFunction(n.toModelOutput,t),n.auth!==void 0){let e=expectObjectRecord(n.auth,t);expectFunction(e.getToken,t)}return{kind:`tool`,definition:l}}export{normalizeToolDefinition};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{join,relative,resolve}from"node:path";import{pathToFileURL}from"node:url";import{ROOT_COMPILED_AGENT_NODE_ID}from"#compiler/manifest.js";import{collectRuntimeModuleBindingsForManifest,compiledModuleMapSchema,resolveCompiledModuleExtensionScopeNamespace}from"#compiler/module-map.js";import{memoizeModuleNamespaceFactories}from"#compiler/source-graph.js";import{
|
|
1
|
+
import{join,relative,resolve}from"node:path";import{pathToFileURL}from"node:url";import{ROOT_COMPILED_AGENT_NODE_ID}from"#compiler/manifest.js";import{collectRuntimeModuleBindingsForManifest,compiledModuleMapSchema,resolveCompiledModuleExtensionScopeNamespace}from"#compiler/module-map.js";import{memoizeModuleNamespaceFactories}from"#compiler/source-graph.js";import{formatValidationError}from"#runtime/validation.js";import{loadAuthoredModuleNamespace}from"#internal/authored-module-loader.js";import{loadFrameworkProgrammaticModule}from"#framework/sources/registry.js";import{loadCompiledManifest}from"#runtime/loaders/manifest.js";import{readMaterializedAuthoredModuleIndex}from"#internal/materialized-authored-modules.js";const EXT_CONFIG_SCOPE=Symbol.for(`eve.ext-config-scope`);async function loadCompiledModuleMapFromAuthoredSource(e){return await hydrateCompiledModuleMapFromManifest(await loadCompiledManifest({compiledArtifactsSource:e.compiledArtifactsSource}),e.compiledArtifactsSource.appRoot,e.authoredAppRoot)}async function hydrateCompiledModuleMapFromManifest(e,t,n=e.appRoot){let r=await readMaterializedAuthoredModuleIndex(t);if(r!==void 0)return await loadMaterializedCompiledModuleMap({moduleMapPath:r.moduleMap,runtimeAppRoot:t});let i={},a=[{manifest:e,nodeId:ROOT_COMPILED_AGENT_NODE_ID},...[...e.subagents].sort((e,t)=>e.nodeId.localeCompare(t.nodeId)).map(e=>({manifest:e.agent,nodeId:e.nodeId}))];for(let t of a)i[t.nodeId]={modules:await hydrateCompiledNodeScope(t.manifest,t=>resolve(n,relative(e.appRoot,t)))};return{nodes:i}}async function hydrateCompiledNodeScope(e,t){let n=new Map(e.extensionMounts.map(e=>[e.mountSourceId,e.packageNamespace])),r=globalThis,i={};for(let{binding:a,sourceId:o}of collectRuntimeModuleBindingsForManifest(e)){let e=n.get(o);e!==void 0&&(r[EXT_CONFIG_SCOPE]=e);try{i[o]=a.backing.kind===`programmatic`?await loadFrameworkProgrammaticModule(a.backing,Object.fromEntries(Object.entries(a.backing.dependencies??{}).map(([e,t])=>[e,i[t]]))):memoizeModuleNamespaceFactories(await loadAuthoredModuleNamespace(t(a.backing.sourcePath),{externalDependencies:a.backing.externalDependencies,extensionScopeNamespace:resolveCompiledModuleExtensionScopeNamespace(a)}))}finally{e!==void 0&&(r[EXT_CONFIG_SCOPE]=void 0)}}return i}async function loadMaterializedCompiledModuleMap(e){let t=join(e.runtimeAppRoot,`.eve`,`compile`,e.moduleMapPath),n=await import(`${pathToFileURL(t).href}?generation=${encodeURIComponent(e.moduleMapPath)}`),r=compiledModuleMapSchema.safeParse(n.moduleMap??n.default);if(!r.success)throw Error(`Expected materialized authored module map "${t}" to export a valid compiled eve module map. ${formatValidationError(r.error)}`);return r.data}export{loadCompiledModuleMapFromAuthoredSource};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* One extension's on-disk source root paired with the namespace its durable
|
|
3
3
|
* state keys and config binding must be scoped to.
|
|
4
4
|
*/
|
|
5
|
-
|
|
5
|
+
interface ExtensionScope {
|
|
6
6
|
/** Absolute path to the extension's source root. */
|
|
7
7
|
readonly sourceRoot: string;
|
|
8
8
|
/** Package-derived namespace (e.g. `acme-crm`). */
|
|
@@ -35,3 +35,4 @@ export declare function createExtensionScopePlugin(scopes: readonly ExtensionSco
|
|
|
35
35
|
* filesystem path matching (which is unreliable under workspace symlinks).
|
|
36
36
|
*/
|
|
37
37
|
export declare function createFixedNamespaceScopePlugin(namespace: string): ExtensionScopeBundlerPlugin;
|
|
38
|
+
export {};
|
|
@@ -13,17 +13,6 @@ type RolldownOutputAsset = {
|
|
|
13
13
|
type RolldownOutput = {
|
|
14
14
|
readonly output: readonly [RolldownOutputChunk, ...(RolldownOutputChunk | RolldownOutputAsset)[]];
|
|
15
15
|
};
|
|
16
|
-
type RolldownParseAst = (sourceText: string, options?: Record<string, unknown> | null, filename?: string) => unknown;
|
|
17
|
-
export type RolldownParserLanguage = "js" | "jsx" | "ts" | "tsx";
|
|
18
|
-
type RolldownParseAstModule = {
|
|
19
|
-
readonly parseAst: RolldownParseAst;
|
|
20
|
-
};
|
|
21
|
-
/**
|
|
22
|
-
* Loads Rolldown's parser from Nitro's dependency tree so workflow directive
|
|
23
|
-
* transforms can use the same bundler dependency without exposing it publicly.
|
|
24
|
-
*/
|
|
25
|
-
export declare function loadNitroRolldownParseAst(): Promise<RolldownParseAstModule>;
|
|
26
|
-
export declare function inferRolldownParserLanguage(filename: string): RolldownParserLanguage;
|
|
27
16
|
export declare function parseWithNitroRolldownAst(filename: string, sourceText: string): Promise<unknown>;
|
|
28
17
|
/**
|
|
29
18
|
* Runs a raw Rolldown build. Prefer {@link buildSingleRolldownChunk} for any
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createRequire}from"node:module";import{pathToFileURL}from"node:url";import{onVendoredDependencyLog}from"#internal/bundler/vendored-dependency-log.js";let rolldownPromise,rolldownParseAstPromise;function loadNitroRolldown(){return rolldownPromise??=(async()=>{let e=createRequire(import.meta.url),t=createRequire(e.resolve(`nitro/package.json`)).resolve(`rolldown`);return await import(pathToFileURL(t).href)})(),rolldownPromise}function loadNitroRolldownParseAst(){return rolldownParseAstPromise??=(async()=>{let e=createRequire(import.meta.url),t=createRequire(e.resolve(`nitro/package.json`)).resolve(`rolldown/parseAst`);return await import(pathToFileURL(t).href)})(),rolldownParseAstPromise}function inferRolldownParserLanguage(e){return e.endsWith(`.tsx`)?`tsx`:e.endsWith(`.jsx`)?`jsx`:/\.[cm]?ts$/.test(e)?`ts`:`js`}async function parseWithNitroRolldownAst(e,t){let{parseAst:n}=await loadNitroRolldownParseAst();return n(t,{astType:`ts`,lang:inferRolldownParserLanguage(e),range:!0,sourceType:`module`},e)}async function buildWithNitroRolldown(e){assertCustomRolldownConditionNames(e);let{build:t}=await loadNitroRolldown();return await t({onLog:onRolldownBuildLog,...e})}function onRolldownBuildLog(e,t,n){if(e===`warn`&&t?.code===`UNRESOLVED_IMPORT`){n(e,t);return}onVendoredDependencyLog(e,t,n)}const ROLLDOWN_STANDARD_CONDITION_NAMES=new Set([`browser`,`default`,`import`,`node`,`require`]);function assertCustomRolldownConditionNames(e){let t=e.resolve;if(typeof t!=`object`||!t)return;let n=Reflect.get(t,`conditionNames`);if(Array.isArray(n)){for(let e of n)if(typeof e==`string`&&ROLLDOWN_STANDARD_CONDITION_NAMES.has(e))throw Error(`Rolldown resolves the standard condition ${JSON.stringify(e)} per import edge; conditionNames may contain only eve-specific additions.`)}}async function buildSingleRolldownChunk(e,t){return getSingleRolldownChunk(await buildWithNitroRolldown({...t,write:!1,output:{...t.output,codeSplitting:!1}}),e)}function getSingleRolldownChunk(e,t){let n=e.output.filter(e=>e.type===`chunk`),r=n[0];if(r===void 0||n.length!==1)throw Error(`Expected one bundled ${t}.`);return r}export{ROLLDOWN_STANDARD_CONDITION_NAMES,buildSingleRolldownChunk,buildWithNitroRolldown,
|
|
1
|
+
import{createRequire}from"node:module";import{pathToFileURL}from"node:url";import{onVendoredDependencyLog}from"#internal/bundler/vendored-dependency-log.js";let rolldownPromise,rolldownParseAstPromise;function loadNitroRolldown(){return rolldownPromise??=(async()=>{let e=createRequire(import.meta.url),t=createRequire(e.resolve(`nitro/package.json`)).resolve(`rolldown`);return await import(pathToFileURL(t).href)})(),rolldownPromise}function loadNitroRolldownParseAst(){return rolldownParseAstPromise??=(async()=>{let e=createRequire(import.meta.url),t=createRequire(e.resolve(`nitro/package.json`)).resolve(`rolldown/parseAst`);return await import(pathToFileURL(t).href)})(),rolldownParseAstPromise}function inferRolldownParserLanguage(e){return e.endsWith(`.tsx`)?`tsx`:e.endsWith(`.jsx`)?`jsx`:/\.[cm]?ts$/.test(e)?`ts`:`js`}async function parseWithNitroRolldownAst(e,t){let{parseAst:n}=await loadNitroRolldownParseAst();return n(t,{astType:`ts`,lang:inferRolldownParserLanguage(e),range:!0,sourceType:`module`},e)}async function buildWithNitroRolldown(e){assertCustomRolldownConditionNames(e);let{build:t}=await loadNitroRolldown();return await t({onLog:onRolldownBuildLog,...e})}function onRolldownBuildLog(e,t,n){if(e===`warn`&&t?.code===`UNRESOLVED_IMPORT`){n(e,t);return}onVendoredDependencyLog(e,t,n)}const ROLLDOWN_STANDARD_CONDITION_NAMES=new Set([`browser`,`default`,`import`,`node`,`require`]);function assertCustomRolldownConditionNames(e){let t=e.resolve;if(typeof t!=`object`||!t)return;let n=Reflect.get(t,`conditionNames`);if(Array.isArray(n)){for(let e of n)if(typeof e==`string`&&ROLLDOWN_STANDARD_CONDITION_NAMES.has(e))throw Error(`Rolldown resolves the standard condition ${JSON.stringify(e)} per import edge; conditionNames may contain only eve-specific additions.`)}}async function buildSingleRolldownChunk(e,t){return getSingleRolldownChunk(await buildWithNitroRolldown({...t,write:!1,output:{...t.output,codeSplitting:!1}}),e)}function getSingleRolldownChunk(e,t){let n=e.output.filter(e=>e.type===`chunk`),r=n[0];if(r===void 0||n.length!==1)throw Error(`Expected one bundled ${t}.`);return r}export{ROLLDOWN_STANDARD_CONDITION_NAMES,buildSingleRolldownChunk,buildWithNitroRolldown,parseWithNitroRolldownAst};
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import { type ProjectSource } from "#discover/project-source.js";
|
|
2
|
-
export declare function isEveProjectRoot(root: string, options?: {
|
|
3
|
-
readonly source?: ProjectSource;
|
|
4
|
-
}): Promise<boolean>;
|
|
5
2
|
/** Find the nearest package boundary and return it only when it owns an eve project. */
|
|
6
3
|
export declare function findEveProjectRoot(startPath: string, options?: {
|
|
7
4
|
readonly source?: ProjectSource;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{dirname,join,resolve}from"node:path";import{createDiskProjectSource}from"#discover/project-source.js";function isJsonObject(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}async function packageDeclaresEve(e,t){let n;try{n=JSON.parse(await t.readTextFile(e))}catch(t){throw Error(`The package.json at ${e} is not valid JSON.`,{cause:t})}if(!isJsonObject(n))return!1;let r=n.dependencies;return isJsonObject(r)&&typeof r.eve==`string`}async function
|
|
1
|
+
import{dirname,join,resolve}from"node:path";import{createDiskProjectSource}from"#discover/project-source.js";function isJsonObject(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}async function packageDeclaresEve(e,t){let n;try{n=JSON.parse(await t.readTextFile(e))}catch(t){throw Error(`The package.json at ${e} is not valid JSON.`,{cause:t})}if(!isJsonObject(n))return!1;let r=n.dependencies;return isJsonObject(r)&&typeof r.eve==`string`}async function findEveProjectRoot(e,t={}){let n=t.source??createDiskProjectSource(),r=resolve(e),i=await n.stat(r)===`directory`?r:dirname(r);for(;;){let e=join(i,`package.json`);if(await n.stat(e)===`file`)return await packageDeclaresEve(e,n)?i:void 0;let t=dirname(i);if(t===i)return;i=t}}export{findEveProjectRoot};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { JsonObject } from "#shared/json.js";
|
|
2
2
|
export declare const EXTERNAL_RESOURCES_SNAPSHOT_KIND = "eve-external-resources";
|
|
3
3
|
export declare const EXTERNAL_RESOURCES_SNAPSHOT_VERSION = 1;
|
|
4
|
-
|
|
4
|
+
interface ExternalCredentialRequirement {
|
|
5
5
|
readonly method?: string;
|
|
6
6
|
readonly reference: string;
|
|
7
7
|
readonly service: string;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { CompiledAgentManifest } from "#compiler/manifest.js";
|
|
2
2
|
import { type ExternalResourcesSnapshot } from "#internal/external-resources-snapshot.js";
|
|
3
3
|
import { type JsonObject } from "#shared/json.js";
|
|
4
|
-
export declare const CONNECT_MANIFEST_FILENAME = "vercel-connect-manifest.json";
|
|
5
4
|
export declare function buildExternalResourcesSnapshot(input: {
|
|
6
5
|
readonly generatorVersion: string;
|
|
7
6
|
readonly manifest: CompiledAgentManifest;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createRequire}from"node:module";import{mkdir,writeFile}from"node:fs/promises";import{join}from"node:path";import{pathToFileURL}from"node:url";import{parseJsonObject}from"#shared/json.js";import{createExternalResourcesSnapshot}from"#internal/external-resources-snapshot.js";
|
|
1
|
+
import{createRequire}from"node:module";import{mkdir,writeFile}from"node:fs/promises";import{join}from"node:path";import{pathToFileURL}from"node:url";import{parseJsonObject}from"#shared/json.js";import{createExternalResourcesSnapshot}from"#internal/external-resources-snapshot.js";function buildExternalResourcesSnapshot(e){let t=[],n=[e.manifest,...e.manifest.subagents.map(e=>e.agent)];for(let r of n)collectExternalResources(r,t,e.publicRoutePrefix);return createExternalResourcesSnapshot({generatorVersion:e.generatorVersion,resources:t})}function collectExternalResources(e,t,n){for(let n of e.connections){let e=n.vercelConnect?.requirement;if(e!==void 0){if(n.protocol===`openapi`&&n.url.length===0)throw Error(`Connect-backed OpenAPI connection "${n.connectionName}" must set baseUrl explicitly.`);t.push({credentials:e,kind:`connection`,logicalPath:n.logicalPath,name:n.connectionName,protocol:{type:n.protocol,url:n.url}})}}for(let r of e.channelRoutes.effective){let e=r.vercelConnect?.requirement;e!==void 0&&r.manifest!==void 0&&t.push({credentials:e,kind:`channel`,logicalPath:r.logicalPath,manifest:r.manifest,name:r.name,route:{path:`${n??``}${r.urlPath}`}})}}async function emitConnectManifest(e){let t=buildExternalResourcesSnapshot(e),n=await createConnectManifest({appRoot:e.appRoot,snapshot:t});n!==void 0&&(await mkdir(e.outputDirectory,{recursive:!0}),await writeFile(join(e.outputDirectory,`vercel-connect-manifest.json`),`${JSON.stringify(n,null,2)}\n`))}async function createConnectManifest(e){if(e.snapshot.resources.length===0)return;let t=createRequire(join(e.appRoot,`package.json`)),n;try{n=t.resolve(`@vercel/connect/manifest`)}catch{throw Error("Connect-backed resources require @vercel/connect with manifest compiler support. Install or update @vercel/connect, then rerun `eve build`.")}try{let t=await import(pathToFileURL(n).href);if(typeof t.experimental_createConnectManifestFromEveResources!=`function`)throw TypeError(`missing experimental_createConnectManifestFromEveResources export`);return parseJsonObject(t.experimental_createConnectManifestFromEveResources(e.snapshot))}catch(e){let t=e instanceof Error?e.message:String(e);throw Error(`Failed to create the Connect manifest: ${t}. Update @vercel/connect and rerun \`eve build\`.`)}}export{buildExternalResourcesSnapshot,createConnectManifest,emitConnectManifest};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{isObject}from"#shared/guards.js";import{
|
|
1
|
+
import{isObject}from"#shared/guards.js";import{normalizeInstructionsDefinition,normalizeScheduleDefinition,normalizeSkillDefinition}from"#internal/authored-definition/core.js";import{hasFrontmatter,parseFrontmatter}from"#internal/helpers/gray-matter.js";import{defineSchedule}from"#public/definitions/schedule.js";import{defineSkill}from"#public/definitions/skill.js";const CLOSED_FRONTMATTER_PATTERN=/^---\r?\n[\s\S]*?\r?\n---(?:\r?\n|$)/;function parseMarkdownDocument(e){if(!hasFrontmatter(e))return{hasFrontmatter:!1,frontmatter:{},markdown:e};let t;try{t=parseFrontmatter(e)}catch(t){throw startsWithFrontmatterFence(e)&&!hasClosedFrontmatterFence(e)?Error(`Markdown frontmatter is missing a closing delimiter.`):t}if(!isObject(t.data))throw Error(`Markdown frontmatter must parse to an object.`);return{hasFrontmatter:!0,frontmatter:t.data,markdown:normalizeFrontmatterMarkdownBody(t.content)}}function lowerInstructionsMarkdown(e){return normalizeInstructionsDefinition({content:e,role:`system`},`Expected authored instructions markdown to match the public eve shape.`)}function lowerScheduleMarkdown(e){let t=parseMarkdownDocument(e);if(!t.hasFrontmatter)throw Error(`Schedule markdown must start with YAML frontmatter declaring "cron".`);if(`run`in t.frontmatter)throw Error('Markdown-form schedules do not support the "run" frontmatter key. Use a TypeScript schedule (`<name>.ts`) to author a handler.');let n={...t.frontmatter,markdown:t.markdown};return defineSchedule(normalizeScheduleDefinition(n,`Expected authored schedule markdown to match the public eve shape.`))}function lowerSkillMarkdown(e,t={}){let n=parseMarkdownDocument(e),r=t.slug;if(r===void 0&&!n.hasFrontmatter)throw Error(`Skill markdown must start with YAML frontmatter.`);let i=n.frontmatter,a=toOptionalString(i.description,`description`),o={description:r===void 0?requireStringFrontmatter(i.description,`description`):a??t.description??deriveFlatSkillDescription(n.markdown,r),markdown:n.markdown};return applyOptionalSkillFrontmatter(o,i),defineSkill(normalizeSkillDefinition(o,`Expected authored skill markdown to match the public eve shape.`))}function startsWithFrontmatterFence(e){return e.startsWith(`---
|
|
2
2
|
`)||e.startsWith(`---\r
|
|
3
3
|
`)}function hasClosedFrontmatterFence(e){return CLOSED_FRONTMATTER_PATTERN.test(e)}function normalizeFrontmatterMarkdownBody(e){return e.replace(/^\r?\n/u,``)}function applyOptionalSkillFrontmatter(e,t){let n=toOptionalString(t.license,`license`);n!==void 0&&(e.license=n);let r=toOptionalStringRecord(t.metadata,`metadata`);r!==void 0&&(e.metadata=r)}function toOptionalString(e,t){if(e!=null){if(typeof e!=`string`)throw Error(`Expected "${t}" frontmatter to be a string.`);return e}}function requireStringFrontmatter(e,t){let n=toOptionalString(e,t);if(n===void 0)throw Error(`Missing required "${t}" frontmatter.`);return n}function toOptionalStringRecord(e,t){if(e==null)return;if(!isObject(e))throw Error(`Expected "${t}" frontmatter to be an object.`);let n=Object.entries(e).map(([e,n])=>{if(typeof n!=`string`)throw Error(`Expected "${t}.${e}" frontmatter to be a string.`);return[e,n]});return Object.fromEntries(n)}function deriveFlatSkillDescription(e,t){let n=e.split(/\r?\n/u).map(e=>e.trim()).find(e=>e!==``&&!e.startsWith("```"));return n===void 0?`Instructions for the ${t} skill.`:n.replace(/^[#>*\-\s]+/u,``).trim()||`Instructions for the ${t} skill.`}export{lowerInstructionsMarkdown,lowerScheduleMarkdown,lowerSkillMarkdown};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { RunInput, SessionAuthContext } from "#channel/types.js";
|
|
2
2
|
import { INVOCATION_OWNER_ATTRIBUTE, INVOCATION_TOKEN_ATTRIBUTE } from "#internal/invocation/attributes.js";
|
|
3
3
|
export { INVOCATION_OWNER_ATTRIBUTE, INVOCATION_TOKEN_ATTRIBUTE };
|
|
4
|
-
|
|
4
|
+
type ExternalInvocationMetadata = NonNullable<RunInput["externalInvocation"]>;
|
|
5
5
|
/** Batch-scoped request id exposed to MCP clients for one durable pending-input event. */
|
|
6
6
|
export declare function invocationInputRequestId(pendingBatchId: string, requestId: string): string;
|
|
7
7
|
/** Fixed-width fingerprint used to bind an invocation to its initiating principal. */
|
|
@@ -7,7 +7,7 @@ export interface MaterializedInstrumentation {
|
|
|
7
7
|
readonly kind: "directory";
|
|
8
8
|
readonly modulePathsBySlot: Readonly<Record<string, string>>;
|
|
9
9
|
}
|
|
10
|
-
|
|
10
|
+
interface MaterializedAuthoredModuleIndex {
|
|
11
11
|
readonly fingerprint: string;
|
|
12
12
|
readonly instrumentation?: MaterializedInstrumentation;
|
|
13
13
|
readonly moduleMap: string;
|
|
@@ -18,3 +18,4 @@ export declare function writeMaterializedAuthoredModules(input: {
|
|
|
18
18
|
readonly runtimeAppRoot: string;
|
|
19
19
|
}): Promise<MaterializedAuthoredModuleIndex>;
|
|
20
20
|
export declare function readMaterializedAuthoredModuleIndex(runtimeAppRoot: string): Promise<MaterializedAuthoredModuleIndex | undefined>;
|
|
21
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
interface McpProtectedResourceMetadataOptions {
|
|
2
2
|
readonly authorizationServers: readonly string[];
|
|
3
3
|
readonly resource: string;
|
|
4
4
|
readonly scopesSupported?: readonly string[];
|
|
@@ -7,3 +7,4 @@ export interface McpProtectedResourceMetadataOptions {
|
|
|
7
7
|
export declare function createMcpProtectedResourceMetadata(options: McpProtectedResourceMetadataOptions): Readonly<Record<string, unknown>>;
|
|
8
8
|
/** Creates the RFC 9728 bearer discovery challenge for an MCP resource. */
|
|
9
9
|
export declare function createMcpResourceChallenge(resourceMetadataUrl: string, scopes?: readonly string[]): string;
|
|
10
|
+
export {};
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { McpServer, type McpToolAnnotations, type StandardSchemaWithJSON } from "#compiled/@modelcontextprotocol/server/index.js";
|
|
2
2
|
import type { SessionAuthContext } from "#channel/types.js";
|
|
3
3
|
export declare const MCP_PROTOCOL_VERSION = "2026-07-28";
|
|
4
|
-
export declare const MCP_LEGACY_PROTOCOL_VERSION = "2025-11-25";
|
|
5
4
|
/**
|
|
6
5
|
* Upper bound for any MCP POST body. Tool arguments are small JSON; the
|
|
7
6
|
* largest legitimate payload is an `outputSchema`, itself capped at 64 KiB.
|
|
8
7
|
*/
|
|
9
8
|
export declare const MCP_REQUEST_BODY_MAX_BYTES: number;
|
|
10
|
-
|
|
9
|
+
interface McpToolDefinition<TInputSchema extends StandardSchemaWithJSON = StandardSchemaWithJSON> {
|
|
11
10
|
readonly name: string;
|
|
12
11
|
readonly description?: string;
|
|
13
12
|
readonly annotations?: McpToolAnnotations;
|
|
@@ -36,8 +35,8 @@ export type McpContent = {
|
|
|
36
35
|
* change or re-read something; `not_found` means stop; `internal` means the
|
|
37
36
|
* server failed and `errorId` correlates with its logs.
|
|
38
37
|
*/
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
type McpToolOperationErrorCode = "invalid_input" | "not_found" | "conflict" | "internal";
|
|
39
|
+
interface McpToolOperationErrorData {
|
|
41
40
|
readonly code: McpToolOperationErrorCode;
|
|
42
41
|
readonly errorId?: string;
|
|
43
42
|
readonly message: string;
|
|
@@ -61,7 +60,7 @@ export declare function defineMcpTool<const TInputSchema extends StandardSchemaW
|
|
|
61
60
|
readonly signal: AbortSignal;
|
|
62
61
|
}): Promise<McpCallToolResult<TStructured>>;
|
|
63
62
|
}): McpServerTool;
|
|
64
|
-
|
|
63
|
+
interface McpStreamableHttpServerOptions {
|
|
65
64
|
readonly name: string;
|
|
66
65
|
readonly version: string;
|
|
67
66
|
/** Server-level usage guidance returned from `initialize` and `server/discover`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createLogger,logError}from"#internal/logging.js";import{McpServer,createMcpHandler}from"#compiled/@modelcontextprotocol/server/index.js";const log=createLogger(`mcp.server`),MCP_PROTOCOL_VERSION=`2026-07-28`,
|
|
1
|
+
import{createLogger,logError}from"#internal/logging.js";import{McpServer,createMcpHandler}from"#compiled/@modelcontextprotocol/server/index.js";const log=createLogger(`mcp.server`),MCP_PROTOCOL_VERSION=`2026-07-28`,MCP_REQUEST_BODY_MAX_BYTES=1048576;var McpToolOperationError=class extends Error{code;constructor(e,t){super(t),this.name=`McpToolOperationError`,this.code=e}};const RETRYABLE_CODES=new Set([`conflict`]);function defineMcpTool(e){return{name:e.definition.name,register(t,n){t.registerTool(e.definition.name,{...e.definition.annotations===void 0?{}:{annotations:e.definition.annotations},...e.definition.description===void 0?{}:{description:e.definition.description},inputSchema:e.definition.inputSchema,...e.definition.outputSchema===void 0?{}:{outputSchema:e.definition.outputSchema}},async(t,r)=>await callTool(e.call,t,r.mcpReq.signal,n))}}}function createMcpStreamableHttpServer(e){let t=new Map(e.tools.map(e=>[e.name,e]));if(t.size!==e.tools.length)throw Error(`MCP tool names must be unique.`);return async n=>{let r=await e.authenticate(n);if(r instanceof Response)return r;let i=createMcpHandler(()=>createServer(e,t,r),{legacy:`stateless`});if(n.method.toUpperCase()!==`POST`)return await i.fetch(n);let a=await inspectRequestBody(n);if(a.tooLarge)return requestBodyTooLargeResponse();if(a.invalidJson)return invalidJsonResponse();let o=a.value;if(o===void 0)return await i.fetch(n);let s=await preflightModernRequest(n,o);return s===void 0?await i.fetch(n,{parsedBody:o}):s}}async function preflightModernRequest(e,t){return e.headers.has(`mcp-protocol-version`)||!claimsCurrentProtocolVersion(t)?void 0:await probeEarlierValidationFailure(e,t)??headerMismatchResponse(t)}async function inspectRequestBody(e){let t=e.body;if(t===null)return{tooLarge:!1};let n=Number(e.headers.get(`content-length`));if(Number.isFinite(n)&&n>1048576)return await t.cancel().catch(()=>{}),{tooLarge:!0};let r=t.getReader(),i=[],a=0;try{for(;;){let e=await r.read();if(e.done)break;if(a+=e.value.byteLength,a>1048576)return await r.cancel(),{tooLarge:!0};i.push(e.value)}let e=new Uint8Array(a),t=0;for(let n of i)e.set(n,t),t+=n.byteLength;return{tooLarge:!1,value:JSON.parse(new TextDecoder().decode(e))}}catch{return{invalidJson:!0,tooLarge:!1}}}function invalidJsonResponse(){return Response.json({error:{code:-32700,message:`Parse error`},id:null,jsonrpc:`2.0`},{status:400})}function requestBodyTooLargeResponse(){return Response.json({error:{code:-32e3,message:`Request body too large`},id:null,jsonrpc:`2.0`},{status:413,statusText:`Request Entity Too Large`})}function claimsCurrentProtocolVersion(e){return isPlainRecord(e)&&isPlainRecord(e.params)&&isPlainRecord(e.params._meta)&&e.params._meta[`io.modelcontextprotocol/protocolVersion`]===`2026-07-28`}function isPlainRecord(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}async function probeEarlierValidationFailure(e,t){let n=new Headers(e.headers);n.set(`mcp-protocol-version`,MCP_PROTOCOL_VERSION);let r=new Request(e.url,{body:JSON.stringify(t),headers:n,method:e.method}),i=createMcpHandler(()=>new McpServer({name:`eve-mcp-preflight`,version:`0`}),{legacy:`reject`});try{let e=await i.fetch(r,{parsedBody:t});if(e.status===406||e.status===415)return e;if(e.status===400){let t=await e.clone().json().catch(()=>void 0);if(t?.error?.code===-32700||t?.error?.code===-32600||t?.error?.code===-32602||t?.error?.code===-32022)return e}await e.body?.cancel();return}finally{await i.close().catch(()=>{})}}function headerMismatchResponse(e){let t=`the body carries a modern MCP envelope but the required MCP-Protocol-Version header is absent`;return Response.json({error:{code:-32020,data:{mismatch:{body:t,header:`(missing)`}},message:`Bad Request: the request headers and body disagree: ${t}`},id:readJsonRpcRequestId(e),jsonrpc:`2.0`},{status:400})}function readJsonRpcRequestId(e){if(typeof e!=`object`||!e||Array.isArray(e))return null;let t=Reflect.get(e,`id`);return typeof t==`string`||typeof t==`number`?t:null}function createServer(e,t,n){let r={capabilities:{tools:{listChanged:!1}}};e.instructions!==void 0&&(r.instructions=e.instructions);let i=new McpServer({name:e.name,version:e.version},r);for(let e of t.values())e.register(i,n);return i}async function callTool(e,t,n,r){try{return await e(t,{auth:r,signal:n})}catch(e){return e instanceof McpToolOperationError?toolError({code:e.code,message:e.message,retryable:RETRYABLE_CODES.has(e.code)}):toolError({code:`internal`,errorId:logError(log,`MCP tool call failed`,e),message:`The server could not complete this tool call.`,retryable:!1})}}function toolError(e){return{content:[{type:`text`,text:e.errorId===void 0?e.message:`${e.message} (errorId: ${e.errorId})`}],isError:!0,structuredContent:{error:e}}}export{MCP_PROTOCOL_VERSION,MCP_REQUEST_BODY_MAX_BYTES,McpToolOperationError,createMcpStreamableHttpServer,defineMcpTool};
|
|
@@ -28,7 +28,7 @@ export declare const modelCatalogResponseSchema: z.ZodObject<{
|
|
|
28
28
|
}, z.core.$loose>;
|
|
29
29
|
export type CatalogModelProvider = z.infer<typeof catalogModelProviderSchema>;
|
|
30
30
|
export type CatalogModel = z.infer<typeof catalogModelSchema>;
|
|
31
|
-
|
|
31
|
+
interface ModelCatalogLimits {
|
|
32
32
|
readonly contextWindowTokens: number;
|
|
33
33
|
readonly maxOutputTokens?: number;
|
|
34
34
|
}
|
|
@@ -44,3 +44,4 @@ export declare function findCatalogModelByProviderModelId(input: {
|
|
|
44
44
|
readonly provider: CatalogModelProvider;
|
|
45
45
|
} | null;
|
|
46
46
|
export declare function modelCatalogLimitsFromProvider(provider: CatalogModelProvider): ModelCatalogLimits | null;
|
|
47
|
+
export {};
|
|
@@ -29,10 +29,6 @@ export declare function stageDevelopmentRuntimeArtifactsSnapshot(compileResult:
|
|
|
29
29
|
/**
|
|
30
30
|
* Moves the dev runtime pointer so future sessions use a staged snapshot.
|
|
31
31
|
*/
|
|
32
|
-
export declare function activateDevelopmentRuntimeArtifactsSnapshot(input: {
|
|
33
|
-
readonly appRoot: string;
|
|
34
|
-
readonly snapshot: DevelopmentRuntimeArtifactsSnapshot;
|
|
35
|
-
}): Promise<void>;
|
|
36
32
|
export declare function activateDevelopmentRuntimeArtifactsSnapshotTransaction(input: {
|
|
37
33
|
readonly appRoot: string;
|
|
38
34
|
readonly snapshot: DevelopmentRuntimeArtifactsSnapshot;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{randomUUID}from"node:crypto";import{cp,mkdir,readFile,rm,symlink,writeFile}from"node:fs/promises";import{resolvePackageRoot}from"#internal/application/package.js";import{existsSync,readFileSync}from"node:fs";import{dirname,join,relative,resolve,sep}from"node:path";import{readMaterializedAuthoredModuleIndex}from"#internal/materialized-authored-modules.js";import{renameWithTransientBusyRetry}from"#shared/rename-with-retry.js";import{copyDevelopmentSourceSnapshot}from"#internal/nitro/dev-runtime-source-snapshot-copy.js";import{resolveExtensionExternalDependencyPaths}from"#internal/nitro/host/extension-external-dependency-plugin.js";import{createDevelopmentSourceSnapshotPlan,toDevelopmentSourceSnapshotPath}from"#internal/nitro/dev-runtime-source-snapshot.js";import{DEVELOPMENT_RUNTIME_ARTIFACTS_ACTIVATED_MARKER,pruneDevelopmentRuntimeArtifactsSnapshotDirectory,recordRetiredDevelopmentRuntimeArtifactsSnapshot}from"#internal/nitro/dev-runtime-artifacts-retention.js";const DEV_RUNTIME_ARTIFACTS_DIRECTORY=`dev-runtime`;function resolveDevelopmentRuntimeArtifactsPointerPath(e){return join(e,`.eve`,DEV_RUNTIME_ARTIFACTS_DIRECTORY,`current.json`)}function resolveDevelopmentRuntimeArtifactsSnapshotsDirectory(e){return join(e,`.eve`,DEV_RUNTIME_ARTIFACTS_DIRECTORY,`snapshots`)}function isDevelopmentRuntimeArtifactsSnapshotRoot(e,t){return dirname(resolve(t))===resolve(resolveDevelopmentRuntimeArtifactsSnapshotsDirectory(e))}async function stageDevelopmentRuntimeArtifactsSnapshot(e){let t=join(resolveDevelopmentRuntimeArtifactsSnapshotsDirectory(e.project.appRoot),`${Date.now().toString(36)}-${randomUUID()}`),n=await createDevelopmentSourceSnapshotPlan({appRoot:e.project.appRoot,authoredSourceRoots:collectExtensionMountSourceRoots(e.manifest),snapshotRoot:t});try{await copyDevelopmentSourceSnapshot(n),await mountFrameworkPackage(n.runtimeAppRoot),await mountExtensionExternalDependencies({manifest:e.manifest,runtimeAppRoot:n.runtimeAppRoot}),await cp(e.paths.compileDirectoryPath,join(n.runtimeAppRoot,`.eve`,`compile`),{recursive:!0}),await rewriteSnapshotCompiledManifest({appRoot:e.project.appRoot,extensionPackageRoots:(e.manifest?.subagents??[]).flatMap(e=>e.owner.kind===`extension`?[{sourceRoot:e.agent.appRoot,packageName:e.owner.packageName}]:[]),manifestPath:join(n.runtimeAppRoot,`.eve`,`compile`,`compiled-agent-manifest.json`),runtimeAppRoot:n.runtimeAppRoot,snapshotSourceRoot:n.snapshotSourceRoot,sourceRoot:n.sourceRoot}),await validateSnapshotCompiledManifestRoots({manifestPath:join(n.runtimeAppRoot,`.eve`,`compile`,`compiled-agent-manifest.json`),snapshotSourceRoot:n.snapshotSourceRoot}),await writeFile(join(t,`generation.json`),`${JSON.stringify({runtimeAppRoot:n.runtimeAppRoot})}\n`)}catch(e){throw await rm(t,{force:!0,recursive:!0}).catch(()=>{}),e}return{sourceWatchPaths:n.watchPaths,runtimeAppRoot:n.runtimeAppRoot,snapshotRoot:t,snapshotSourceRoot:n.snapshotSourceRoot,sourceRoot:n.sourceRoot}}async function mountFrameworkPackage(e){let t=join(e,`node_modules`,`eve`);await mkdir(dirname(t),{recursive:!0}),await rm(t,{force:!0,recursive:!0}),await symlink(resolvePackageRoot(),t,`junction`)}async function mountExtensionExternalDependencies(e){if(e.manifest===void 0)return;let t=[e.manifest,...(e.manifest.subagents??[]).map(e=>e.agent)].flatMap(e=>e.extensionMounts??[]).filter(e=>(e.externalDependencies??[]).length>0);for(let[n,r]of Object.entries(resolveExtensionExternalDependencyPaths(t))){let t=findPackageRoot(r,n),i=join(e.runtimeAppRoot,`node_modules`,...n.split(`/`));await mkdir(dirname(i),{recursive:!0}),await rm(i,{force:!0,recursive:!0}),await symlink(t,i,`junction`)}}function findPackageRoot(e,t){let n=dirname(e);for(;;){let e=join(n,`package.json`);if(existsSync(e))try{if(JSON.parse(readFileSync(e,`utf8`)).name===t)return n}catch{}let r=dirname(n);if(r===n)throw Error(`Cannot locate package root for extension external dependency "${t}".`);n=r}}async function activateDevelopmentRuntimeArtifactsSnapshot(e){(await activateDevelopmentRuntimeArtifactsSnapshotTransaction(e)).commit()}async function activateDevelopmentRuntimeArtifactsSnapshotTransaction(e){let t=await readMaterializedAuthoredModuleIndex(e.snapshot.runtimeAppRoot);if(t===void 0||!existsSync(join(e.snapshot.runtimeAppRoot,`.eve`,`compile`,t.moduleMap)))throw Error(`Cannot activate development runtime generation "${e.snapshot.snapshotRoot}" before its authored modules are materialized.`);let n=join(e.snapshot.snapshotRoot,DEVELOPMENT_RUNTIME_ARTIFACTS_ACTIVATED_MARKER),r=resolveDevelopmentRuntimeArtifactsPointerPath(e.appRoot),i=readDevelopmentRuntimeArtifactsPointer(r),a=await readOptionalFile(r);try{await writeFile(n,``),await writeDevelopmentRuntimeArtifactsPointer(e),i?.version===2&&i.snapshotRoot!==e.snapshot.snapshotRoot&&isDevelopmentRuntimeArtifactsSnapshotRoot(e.appRoot,i.snapshotRoot)&&await recordRetiredDevelopmentRuntimeArtifactsSnapshot(i.snapshotRoot).catch(e=>{console.warn(`[eve:dev] failed to record retired runtime generation "${i.snapshotRoot}": ${String(e)}`)})}catch(e){throw await rollbackFailedActivation({cause:e,markerPath:n,pointerPath:r,previousPointerSource:a})}let o=!1;return{commit(){o=!0},async rollback(){if(o)return;o=!0;let e=await restoreDevelopmentRuntimeArtifactsActivation({markerPath:n,pointerPath:r,previousPointerSource:a});if(e!==void 0)throw e}}}function readDevelopmentRuntimeArtifactsSnapshotRoot(e){let t=readDevelopmentRuntimeArtifactsPointer(e);if(t!==void 0)return t.version===1?t.appRoot:t.runtimeAppRoot}function readActiveDevelopmentRuntimeArtifactsSnapshot(e){let t=readDevelopmentRuntimeArtifactsPointer(resolveDevelopmentRuntimeArtifactsPointerPath(e));if(t!==void 0&&t.version!==1)return{runtimeAppRoot:t.runtimeAppRoot,snapshotRoot:t.snapshotRoot}}function readDevelopmentRuntimeArtifactsRevision(e){return{revision:readDevelopmentRuntimeArtifactsSnapshotRoot(resolveDevelopmentRuntimeArtifactsPointerPath(e))??e}}async function pruneDevelopmentRuntimeArtifactsSnapshots(e){let t=readDevelopmentRuntimeArtifactsPointer(resolveDevelopmentRuntimeArtifactsPointerPath(e.appRoot));await pruneDevelopmentRuntimeArtifactsSnapshotDirectory({activeSnapshotRoot:t?.version===2?t.snapshotRoot:void 0,gracePeriodMs:e.gracePeriodMs,now:e.now,protectAll:t?.version===1,retainCount:e.retainCount,snapshotsDirectory:resolveDevelopmentRuntimeArtifactsSnapshotsDirectory(e.appRoot)})}function collectExtensionMountSourceRoots(e){return e===void 0?[]:[e,...(e.subagents??[]).map(e=>e.agent)].flatMap(e=>(e.extensionMounts??[]).map(e=>e.sourceRoot))}function readDevelopmentRuntimeArtifactsPointer(e){if(e!==void 0&&existsSync(e))try{let t=JSON.parse(readFileSync(e,`utf8`));return t.kind!==`eve-dev-runtime-artifacts-pointer`||typeof t.version!=`number`?void 0:t.version===1&&typeof t.appRoot==`string`&&t.appRoot.length>0?{appRoot:t.appRoot,kind:`eve-dev-runtime-artifacts-pointer`,version:1}:t.version===2&&typeof t.appRoot==`string`&&typeof t.runtimeAppRoot==`string`&&t.runtimeAppRoot.length>0&&typeof t.snapshotRoot==`string`&&t.snapshotRoot.length>0?{appRoot:t.appRoot,kind:`eve-dev-runtime-artifacts-pointer`,runtimeAppRoot:t.runtimeAppRoot,snapshotRoot:t.snapshotRoot,version:2}:void 0}catch{return}}async function rewriteSnapshotCompiledManifest(e){let t=JSON.parse(await readFile(e.manifestPath,`utf8`)),n=rewriteManifestRoots({appRoot:e.appRoot,extensionPackageRoots:e.extensionPackageRoots,runtimeAppRoot:e.runtimeAppRoot,snapshotSourceRoot:e.snapshotSourceRoot,sourceRoot:e.sourceRoot,value:t});await writeFile(e.manifestPath,`${JSON.stringify(n,null,2)}\n`)}function rewriteManifestRoots(e){if(Array.isArray(e.value))return e.value.map(t=>rewriteManifestRoots({...e,value:t}));if(e.value===null||typeof e.value!=`object`)return e.value;let t={};for(let[n,r]of Object.entries(e.value)){if(typeof r==`string`&&(n===`appRoot`||n===`agentRoot`)){t[n]=isPathInsideOrEqual(r,e.appRoot)||e.extensionPackageRoots.some(e=>isPathInsideOrEqual(r,e.sourceRoot))?rewritePathWithinAppRoot({appRoot:e.appRoot,extensionPackageRoots:e.extensionPackageRoots,path:r,runtimeAppRoot:e.runtimeAppRoot}):rewritePathWithinSourceRoot({path:r,snapshotSourceRoot:e.snapshotSourceRoot,sourceRoot:e.sourceRoot});continue}if(typeof r==`string`&&n===`sourceRoot`){t[n]=rewritePathWithinSourceRoot({path:r,snapshotSourceRoot:e.snapshotSourceRoot,sourceRoot:e.sourceRoot});continue}t[n]=rewriteManifestRoots({appRoot:e.appRoot,extensionPackageRoots:e.extensionPackageRoots,runtimeAppRoot:e.runtimeAppRoot,snapshotSourceRoot:e.snapshotSourceRoot,sourceRoot:e.sourceRoot,value:r})}return t}function rewritePathWithinSourceRoot(e){return isPathInsideOrEqual(e.path,e.sourceRoot)?toDevelopmentSourceSnapshotPath({snapshotSourceRoot:e.snapshotSourceRoot,sourcePath:e.path,sourceRoot:e.sourceRoot}):e.path}function rewritePathWithinAppRoot(e){if(!isPathInsideOrEqual(e.path,e.appRoot)){let t=e.extensionPackageRoots.find(t=>isPathInsideOrEqual(e.path,t.sourceRoot));return t===void 0?e.path:join(e.runtimeAppRoot,`node_modules`,t.packageName,relative(t.sourceRoot,e.path))}let t=relative(e.appRoot,e.path);return t.length===0?e.runtimeAppRoot:join(e.runtimeAppRoot,t)}async function writeDevelopmentRuntimeArtifactsPointer(e){let t=resolveDevelopmentRuntimeArtifactsPointerPath(e.appRoot),n={appRoot:e.appRoot,kind:`eve-dev-runtime-artifacts-pointer`,runtimeAppRoot:e.snapshot.runtimeAppRoot,snapshotRoot:e.snapshot.snapshotRoot,version:2};await writeDevelopmentRuntimeArtifactsPointerSource(t,`${JSON.stringify(n,null,2)}\n`)}async function writeDevelopmentRuntimeArtifactsPointerSource(e,t){let n=`${e}.${randomUUID()}.tmp`;await mkdir(dirname(e),{recursive:!0}),await writeFile(n,t);try{await renameWithTransientBusyRetry(n,e)}catch(e){throw await rm(n,{force:!0}).catch(()=>{}),e}}async function readOptionalFile(e){try{return await readFile(e,`utf8`)}catch(e){if(e instanceof Error&&`code`in e&&e.code===`ENOENT`)return;throw e}}async function rollbackFailedActivation(e){let t=await restoreDevelopmentRuntimeArtifactsActivation(e);return t===void 0?e.cause:AggregateError([e.cause,t],`Development runtime activation and rollback failed.`,{cause:e.cause})}async function restoreDevelopmentRuntimeArtifactsActivation(e){let t=(await Promise.allSettled([e.previousPointerSource===void 0?rm(e.pointerPath,{force:!0}):writeDevelopmentRuntimeArtifactsPointerSource(e.pointerPath,e.previousPointerSource),rm(e.markerPath,{force:!0})])).flatMap(e=>e.status===`rejected`?[e.reason]:[]);if(t.length!==0)return AggregateError(t,`Failed to restore development runtime activation.`)}async function validateSnapshotCompiledManifestRoots(e){let t=collectManifestRootPaths(JSON.parse(await readFile(e.manifestPath,`utf8`)));for(let n of t)if(!isPathInsideOrEqual(n,e.snapshotSourceRoot))throw Error(`Development runtime snapshot manifest root "${n}" is outside runtime snapshot source root "${e.snapshotSourceRoot}".`)}function collectManifestRootPaths(e){if(Array.isArray(e))return e.flatMap(e=>collectManifestRootPaths(e));if(typeof e!=`object`||!e)return[];let t=[];for(let[n,r]of Object.entries(e)){if((n===`appRoot`||n===`agentRoot`)&&typeof r==`string`){t.push(r);continue}t.push(...collectManifestRootPaths(r))}return t}function isPathInsideOrEqual(e,t){let n=resolve(e),r=resolve(t);return n===r||n.startsWith(`${r}${sep}`)}export{activateDevelopmentRuntimeArtifactsSnapshot,activateDevelopmentRuntimeArtifactsSnapshotTransaction,pruneDevelopmentRuntimeArtifactsSnapshots,readActiveDevelopmentRuntimeArtifactsSnapshot,readDevelopmentRuntimeArtifactsRevision,readDevelopmentRuntimeArtifactsSnapshotRoot,resolveDevelopmentRuntimeArtifactsPointerPath,stageDevelopmentRuntimeArtifactsSnapshot};
|
|
1
|
+
import{randomUUID}from"node:crypto";import{cp,mkdir,readFile,rm,symlink,writeFile}from"node:fs/promises";import{resolvePackageRoot}from"#internal/application/package.js";import{existsSync,readFileSync}from"node:fs";import{dirname,join,relative,resolve,sep}from"node:path";import{readMaterializedAuthoredModuleIndex}from"#internal/materialized-authored-modules.js";import{renameWithTransientBusyRetry}from"#shared/rename-with-retry.js";import{copyDevelopmentSourceSnapshot}from"#internal/nitro/dev-runtime-source-snapshot-copy.js";import{resolveExtensionExternalDependencyPaths}from"#internal/nitro/host/extension-external-dependency-plugin.js";import{createDevelopmentSourceSnapshotPlan,toDevelopmentSourceSnapshotPath}from"#internal/nitro/dev-runtime-source-snapshot.js";import{DEVELOPMENT_RUNTIME_ARTIFACTS_ACTIVATED_MARKER,pruneDevelopmentRuntimeArtifactsSnapshotDirectory,recordRetiredDevelopmentRuntimeArtifactsSnapshot}from"#internal/nitro/dev-runtime-artifacts-retention.js";const DEV_RUNTIME_ARTIFACTS_DIRECTORY=`dev-runtime`;function resolveDevelopmentRuntimeArtifactsPointerPath(e){return join(e,`.eve`,DEV_RUNTIME_ARTIFACTS_DIRECTORY,`current.json`)}function resolveDevelopmentRuntimeArtifactsSnapshotsDirectory(e){return join(e,`.eve`,DEV_RUNTIME_ARTIFACTS_DIRECTORY,`snapshots`)}function isDevelopmentRuntimeArtifactsSnapshotRoot(e,t){return dirname(resolve(t))===resolve(resolveDevelopmentRuntimeArtifactsSnapshotsDirectory(e))}async function stageDevelopmentRuntimeArtifactsSnapshot(e){let t=join(resolveDevelopmentRuntimeArtifactsSnapshotsDirectory(e.project.appRoot),`${Date.now().toString(36)}-${randomUUID()}`),n=await createDevelopmentSourceSnapshotPlan({appRoot:e.project.appRoot,authoredSourceRoots:collectExtensionMountSourceRoots(e.manifest),snapshotRoot:t});try{await copyDevelopmentSourceSnapshot(n),await mountFrameworkPackage(n.runtimeAppRoot),await mountExtensionExternalDependencies({manifest:e.manifest,runtimeAppRoot:n.runtimeAppRoot}),await cp(e.paths.compileDirectoryPath,join(n.runtimeAppRoot,`.eve`,`compile`),{recursive:!0}),await rewriteSnapshotCompiledManifest({appRoot:e.project.appRoot,extensionPackageRoots:(e.manifest?.subagents??[]).flatMap(e=>e.owner.kind===`extension`?[{sourceRoot:e.agent.appRoot,packageName:e.owner.packageName}]:[]),manifestPath:join(n.runtimeAppRoot,`.eve`,`compile`,`compiled-agent-manifest.json`),runtimeAppRoot:n.runtimeAppRoot,snapshotSourceRoot:n.snapshotSourceRoot,sourceRoot:n.sourceRoot}),await validateSnapshotCompiledManifestRoots({manifestPath:join(n.runtimeAppRoot,`.eve`,`compile`,`compiled-agent-manifest.json`),snapshotSourceRoot:n.snapshotSourceRoot}),await writeFile(join(t,`generation.json`),`${JSON.stringify({runtimeAppRoot:n.runtimeAppRoot})}\n`)}catch(e){throw await rm(t,{force:!0,recursive:!0}).catch(()=>{}),e}return{sourceWatchPaths:n.watchPaths,runtimeAppRoot:n.runtimeAppRoot,snapshotRoot:t,snapshotSourceRoot:n.snapshotSourceRoot,sourceRoot:n.sourceRoot}}async function mountFrameworkPackage(e){let t=join(e,`node_modules`,`eve`);await mkdir(dirname(t),{recursive:!0}),await rm(t,{force:!0,recursive:!0}),await symlink(resolvePackageRoot(),t,`junction`)}async function mountExtensionExternalDependencies(e){if(e.manifest===void 0)return;let t=[e.manifest,...(e.manifest.subagents??[]).map(e=>e.agent)].flatMap(e=>e.extensionMounts??[]).filter(e=>(e.externalDependencies??[]).length>0);for(let[n,r]of Object.entries(resolveExtensionExternalDependencyPaths(t))){let t=findPackageRoot(r,n),i=join(e.runtimeAppRoot,`node_modules`,...n.split(`/`));await mkdir(dirname(i),{recursive:!0}),await rm(i,{force:!0,recursive:!0}),await symlink(t,i,`junction`)}}function findPackageRoot(e,t){let n=dirname(e);for(;;){let e=join(n,`package.json`);if(existsSync(e))try{if(JSON.parse(readFileSync(e,`utf8`)).name===t)return n}catch{}let r=dirname(n);if(r===n)throw Error(`Cannot locate package root for extension external dependency "${t}".`);n=r}}async function activateDevelopmentRuntimeArtifactsSnapshotTransaction(e){let t=await readMaterializedAuthoredModuleIndex(e.snapshot.runtimeAppRoot);if(t===void 0||!existsSync(join(e.snapshot.runtimeAppRoot,`.eve`,`compile`,t.moduleMap)))throw Error(`Cannot activate development runtime generation "${e.snapshot.snapshotRoot}" before its authored modules are materialized.`);let n=join(e.snapshot.snapshotRoot,DEVELOPMENT_RUNTIME_ARTIFACTS_ACTIVATED_MARKER),r=resolveDevelopmentRuntimeArtifactsPointerPath(e.appRoot),i=readDevelopmentRuntimeArtifactsPointer(r),a=await readOptionalFile(r);try{await writeFile(n,``),await writeDevelopmentRuntimeArtifactsPointer(e),i?.version===2&&i.snapshotRoot!==e.snapshot.snapshotRoot&&isDevelopmentRuntimeArtifactsSnapshotRoot(e.appRoot,i.snapshotRoot)&&await recordRetiredDevelopmentRuntimeArtifactsSnapshot(i.snapshotRoot).catch(e=>{console.warn(`[eve:dev] failed to record retired runtime generation "${i.snapshotRoot}": ${String(e)}`)})}catch(e){throw await rollbackFailedActivation({cause:e,markerPath:n,pointerPath:r,previousPointerSource:a})}let o=!1;return{commit(){o=!0},async rollback(){if(o)return;o=!0;let e=await restoreDevelopmentRuntimeArtifactsActivation({markerPath:n,pointerPath:r,previousPointerSource:a});if(e!==void 0)throw e}}}function readDevelopmentRuntimeArtifactsSnapshotRoot(e){let t=readDevelopmentRuntimeArtifactsPointer(e);if(t!==void 0)return t.version===1?t.appRoot:t.runtimeAppRoot}function readActiveDevelopmentRuntimeArtifactsSnapshot(e){let t=readDevelopmentRuntimeArtifactsPointer(resolveDevelopmentRuntimeArtifactsPointerPath(e));if(t!==void 0&&t.version!==1)return{runtimeAppRoot:t.runtimeAppRoot,snapshotRoot:t.snapshotRoot}}function readDevelopmentRuntimeArtifactsRevision(e){return{revision:readDevelopmentRuntimeArtifactsSnapshotRoot(resolveDevelopmentRuntimeArtifactsPointerPath(e))??e}}async function pruneDevelopmentRuntimeArtifactsSnapshots(e){let t=readDevelopmentRuntimeArtifactsPointer(resolveDevelopmentRuntimeArtifactsPointerPath(e.appRoot));await pruneDevelopmentRuntimeArtifactsSnapshotDirectory({activeSnapshotRoot:t?.version===2?t.snapshotRoot:void 0,gracePeriodMs:e.gracePeriodMs,now:e.now,protectAll:t?.version===1,retainCount:e.retainCount,snapshotsDirectory:resolveDevelopmentRuntimeArtifactsSnapshotsDirectory(e.appRoot)})}function collectExtensionMountSourceRoots(e){return e===void 0?[]:[e,...(e.subagents??[]).map(e=>e.agent)].flatMap(e=>(e.extensionMounts??[]).map(e=>e.sourceRoot))}function readDevelopmentRuntimeArtifactsPointer(e){if(e!==void 0&&existsSync(e))try{let t=JSON.parse(readFileSync(e,`utf8`));return t.kind!==`eve-dev-runtime-artifacts-pointer`||typeof t.version!=`number`?void 0:t.version===1&&typeof t.appRoot==`string`&&t.appRoot.length>0?{appRoot:t.appRoot,kind:`eve-dev-runtime-artifacts-pointer`,version:1}:t.version===2&&typeof t.appRoot==`string`&&typeof t.runtimeAppRoot==`string`&&t.runtimeAppRoot.length>0&&typeof t.snapshotRoot==`string`&&t.snapshotRoot.length>0?{appRoot:t.appRoot,kind:`eve-dev-runtime-artifacts-pointer`,runtimeAppRoot:t.runtimeAppRoot,snapshotRoot:t.snapshotRoot,version:2}:void 0}catch{return}}async function rewriteSnapshotCompiledManifest(e){let t=JSON.parse(await readFile(e.manifestPath,`utf8`)),n=rewriteManifestRoots({appRoot:e.appRoot,extensionPackageRoots:e.extensionPackageRoots,runtimeAppRoot:e.runtimeAppRoot,snapshotSourceRoot:e.snapshotSourceRoot,sourceRoot:e.sourceRoot,value:t});await writeFile(e.manifestPath,`${JSON.stringify(n,null,2)}\n`)}function rewriteManifestRoots(e){if(Array.isArray(e.value))return e.value.map(t=>rewriteManifestRoots({...e,value:t}));if(e.value===null||typeof e.value!=`object`)return e.value;let t={};for(let[n,r]of Object.entries(e.value)){if(typeof r==`string`&&(n===`appRoot`||n===`agentRoot`)){t[n]=isPathInsideOrEqual(r,e.appRoot)||e.extensionPackageRoots.some(e=>isPathInsideOrEqual(r,e.sourceRoot))?rewritePathWithinAppRoot({appRoot:e.appRoot,extensionPackageRoots:e.extensionPackageRoots,path:r,runtimeAppRoot:e.runtimeAppRoot}):rewritePathWithinSourceRoot({path:r,snapshotSourceRoot:e.snapshotSourceRoot,sourceRoot:e.sourceRoot});continue}if(typeof r==`string`&&n===`sourceRoot`){t[n]=rewritePathWithinSourceRoot({path:r,snapshotSourceRoot:e.snapshotSourceRoot,sourceRoot:e.sourceRoot});continue}t[n]=rewriteManifestRoots({appRoot:e.appRoot,extensionPackageRoots:e.extensionPackageRoots,runtimeAppRoot:e.runtimeAppRoot,snapshotSourceRoot:e.snapshotSourceRoot,sourceRoot:e.sourceRoot,value:r})}return t}function rewritePathWithinSourceRoot(e){return isPathInsideOrEqual(e.path,e.sourceRoot)?toDevelopmentSourceSnapshotPath({snapshotSourceRoot:e.snapshotSourceRoot,sourcePath:e.path,sourceRoot:e.sourceRoot}):e.path}function rewritePathWithinAppRoot(e){if(!isPathInsideOrEqual(e.path,e.appRoot)){let t=e.extensionPackageRoots.find(t=>isPathInsideOrEqual(e.path,t.sourceRoot));return t===void 0?e.path:join(e.runtimeAppRoot,`node_modules`,t.packageName,relative(t.sourceRoot,e.path))}let t=relative(e.appRoot,e.path);return t.length===0?e.runtimeAppRoot:join(e.runtimeAppRoot,t)}async function writeDevelopmentRuntimeArtifactsPointer(e){let t=resolveDevelopmentRuntimeArtifactsPointerPath(e.appRoot),n={appRoot:e.appRoot,kind:`eve-dev-runtime-artifacts-pointer`,runtimeAppRoot:e.snapshot.runtimeAppRoot,snapshotRoot:e.snapshot.snapshotRoot,version:2};await writeDevelopmentRuntimeArtifactsPointerSource(t,`${JSON.stringify(n,null,2)}\n`)}async function writeDevelopmentRuntimeArtifactsPointerSource(e,t){let n=`${e}.${randomUUID()}.tmp`;await mkdir(dirname(e),{recursive:!0}),await writeFile(n,t);try{await renameWithTransientBusyRetry(n,e)}catch(e){throw await rm(n,{force:!0}).catch(()=>{}),e}}async function readOptionalFile(e){try{return await readFile(e,`utf8`)}catch(e){if(e instanceof Error&&`code`in e&&e.code===`ENOENT`)return;throw e}}async function rollbackFailedActivation(e){let t=await restoreDevelopmentRuntimeArtifactsActivation(e);return t===void 0?e.cause:AggregateError([e.cause,t],`Development runtime activation and rollback failed.`,{cause:e.cause})}async function restoreDevelopmentRuntimeArtifactsActivation(e){let t=(await Promise.allSettled([e.previousPointerSource===void 0?rm(e.pointerPath,{force:!0}):writeDevelopmentRuntimeArtifactsPointerSource(e.pointerPath,e.previousPointerSource),rm(e.markerPath,{force:!0})])).flatMap(e=>e.status===`rejected`?[e.reason]:[]);if(t.length!==0)return AggregateError(t,`Failed to restore development runtime activation.`)}async function validateSnapshotCompiledManifestRoots(e){let t=collectManifestRootPaths(JSON.parse(await readFile(e.manifestPath,`utf8`)));for(let n of t)if(!isPathInsideOrEqual(n,e.snapshotSourceRoot))throw Error(`Development runtime snapshot manifest root "${n}" is outside runtime snapshot source root "${e.snapshotSourceRoot}".`)}function collectManifestRootPaths(e){if(Array.isArray(e))return e.flatMap(e=>collectManifestRootPaths(e));if(typeof e!=`object`||!e)return[];let t=[];for(let[n,r]of Object.entries(e)){if((n===`appRoot`||n===`agentRoot`)&&typeof r==`string`){t.push(r);continue}t.push(...collectManifestRootPaths(r))}return t}function isPathInsideOrEqual(e,t){let n=resolve(e),r=resolve(t);return n===r||n.startsWith(`${r}${sep}`)}export{activateDevelopmentRuntimeArtifactsSnapshotTransaction,pruneDevelopmentRuntimeArtifactsSnapshots,readActiveDevelopmentRuntimeArtifactsSnapshot,readDevelopmentRuntimeArtifactsRevision,readDevelopmentRuntimeArtifactsSnapshotRoot,resolveDevelopmentRuntimeArtifactsPointerPath,stageDevelopmentRuntimeArtifactsSnapshot};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export { isAuthoredSourcePath } from "#internal/nitro/dev-runtime-source-snapshot-local-roots.js";
|
|
2
|
-
export declare const DEV_RUNTIME_SOURCE_DIRECTORY = "source";
|
|
3
2
|
export declare class DevelopmentRuntimeSourceSnapshotError extends Error {
|
|
4
3
|
constructor(message: string);
|
|
5
4
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{lstat,readlink,realpath}from"node:fs/promises";import{existsSync,readFileSync}from"node:fs";import{dirname,join,relative,resolve}from"node:path";import{readTextFileIfExists,resolveTsConfigDependencyPaths}from"#internal/application/tsconfig-dependencies.js";import{isAuthoredSourcePath,isAuthoredSourcePath as isAuthoredSourcePath$1,isPathInsideOrEqual,resolveLocalTsConfigPathTargetRoots,resolveNearestPackageRoot}from"#internal/nitro/dev-runtime-source-snapshot-local-roots.js";const
|
|
1
|
+
import{lstat,readlink,realpath}from"node:fs/promises";import{existsSync,readFileSync}from"node:fs";import{dirname,join,relative,resolve}from"node:path";import{readTextFileIfExists,resolveTsConfigDependencyPaths}from"#internal/application/tsconfig-dependencies.js";import{isAuthoredSourcePath,isAuthoredSourcePath as isAuthoredSourcePath$1,isPathInsideOrEqual,resolveLocalTsConfigPathTargetRoots,resolveNearestPackageRoot}from"#internal/nitro/dev-runtime-source-snapshot-local-roots.js";const SOURCE_ROOT_MARKER_NAMES=[`.git`,`pnpm-workspace.yaml`],WORKSPACE_METADATA_FILE_NAMES=[`package.json`,`pnpm-workspace.yaml`,`pnpm-lock.yaml`,`package-lock.json`,`yarn.lock`,`bun.lock`,`bun.lockb`,`.npmrc`],PACKAGE_DEPENDENCY_FIELDS=[`dependencies`,`devDependencies`,`optionalDependencies`,`peerDependencies`];var DevelopmentRuntimeSourceSnapshotError=class extends Error{constructor(e){super(e),this.name=`DevelopmentRuntimeSourceSnapshotError`}};async function createDevelopmentSourceSnapshotPlan(e){let t=resolve(e.appRoot),n=resolve(e.snapshotRoot),r=resolveDevelopmentSourceRoot(t),i=join(n,`source`),a={appRoot:t,copyFiles:new Set,dependencyMountsByPath:new Map,localRootsToProcess:[t],processedLocalRoots:new Set,snapshotRoot:n,snapshotSourceRoot:i,sourceRoot:r,tsconfigPaths:new Set},o=join(t,`package.json`);for(existsSync(o)&&a.copyFiles.add(o),await addAuthoredSourceRoots(a,e.authoredSourceRoots??[]);a.localRootsToProcess.length>0;){let e=a.localRootsToProcess.shift();if(e===void 0)continue;let t=resolve(e);!a.processedLocalRoots.has(t)&&isAuthoredSourcePath$1(t,r)&&(a.processedLocalRoots.add(t),await addTsConfigDependenciesForRoot(a,t),await addDependencyMountsForRoot(a,t))}let s=[...a.copyFiles].filter(e=>isPathInsideOrEqual(e,r)).sort((e,t)=>e.localeCompare(t)),c=[...a.tsconfigPaths].filter(e=>isPathInsideOrEqual(e,r)).sort((e,t)=>e.localeCompare(t)),l=[...a.dependencyMountsByPath.values()].sort((e,t)=>e.mountPath.localeCompare(t.mountPath)),u=createWatchPaths({appRoot:t,copyFiles:s,dependencyMounts:l,localRoots:[...a.processedLocalRoots],sourceRoot:r,tsconfigPaths:c});return{appRoot:t,copyFiles:s,dependencyMounts:l,runtimeAppRoot:toSnapshotPath({sourcePath:t,sourceRoot:r,snapshotSourceRoot:i}),snapshotRoot:n,snapshotSourceRoot:i,sourceRoot:r,tsconfigPaths:c,watchPaths:u}}async function resolveDevelopmentSourceSnapshotWatchPaths(e){return[...(await createDevelopmentSourceSnapshotPlan({appRoot:e,snapshotRoot:join(resolve(e),`.eve`,`dev-runtime`,`__watch-plan__`)})).watchPaths]}function toDevelopmentSourceSnapshotPath(e){return toSnapshotPath(e)}function resolveDevelopmentSourceRoot(e){let t=resolve(e);for(;;){if(SOURCE_ROOT_MARKER_NAMES.some(e=>existsSync(join(t,e)))||isWorkspaceManifestRoot(t))return t;let n=dirname(t);if(n===t)return resolve(e);t=n}}async function addAuthoredSourceRoots(e,t){for(let n of t){let t=resolve(n);isAuthoredSourcePath$1(t,e.sourceRoot)&&enqueueLocalRoot(e,await resolveNearestPackageRoot(t,e.sourceRoot)??t)}}async function addTsConfigDependenciesForRoot(e,t){let n=await resolveTsConfigDependencyPaths(t);for(let t of n)if(isPathInsideOrEqual(t,e.sourceRoot)){e.tsconfigPaths.add(t);for(let n of await resolveLocalTsConfigPathTargetRoots({configPath:t,sourceRoot:e.sourceRoot}))enqueueLocalRoot(e,n)}}async function addDependencyMountsForRoot(e,t){let n=await readPackageDependencyNames(resolveDependencyDeclarationRoot(t,e.sourceRoot));for(let r of n)for(let n of listAncestorNodeModulesRoots(t,e.sourceRoot))await addDependencyMount(e,joinNodeModulesPackagePath(n,r))}function resolveDependencyDeclarationRoot(e,t){let n=resolve(e),r=resolve(t);for(;isPathInsideOrEqual(n,r);){if(existsSync(join(n,`package.json`)))return n;let e=dirname(n);if(e===n)break;n=e}return e}function listAncestorNodeModulesRoots(e,t){let n=resolve(t),r=new Set,i=resolve(e);for(;isPathInsideOrEqual(i,n);){r.add(i);let e=dirname(i);if(e===i)break;i=e}return r.add(resolve(e)),r.add(n),[...r]}function isWorkspaceManifestRoot(e){let t=join(e,`package.json`);if(!existsSync(t))return!1;try{let e=JSON.parse(readFileSync(t,`utf8`));return isObjectRecord(e)&&e.workspaces!==void 0}catch{return!1}}async function addDependencyMount(e,t){let n;try{n=await lstat(t)}catch{return}if(!n.isDirectory()&&!n.isSymbolicLink())return;let r=await resolveDependencySourcePathCandidates(t),i=r.find(t=>isAuthoredSourcePath$1(t,e.sourceRoot));if(i!==void 0){await addWorkspaceDependencyMount({mountPath:t,state:e,sourcePath:i});return}let a=r.find(e=>existsSync(e));a!==void 0&&e.dependencyMountsByPath.set(resolve(t),{mountPath:resolve(t),sourceKind:`installed`,sourcePath:a})}async function addWorkspaceDependencyMount(e){let t=await resolveNearestPackageRoot(e.sourcePath,e.state.sourceRoot);if(t===void 0||!isAuthoredSourcePath$1(t,e.state.sourceRoot))return;let{state:n}=e;enqueueLocalRoot(n,t),n.dependencyMountsByPath.set(resolve(e.mountPath),{mountPath:resolve(e.mountPath),sourceKind:`workspace`,sourcePath:t})}async function resolveDependencySourcePathCandidates(e){let t=new Set;try{let n=await readlink(e);t.add(resolve(dirname(e),n))}catch{}try{t.add(await realpath(e))}catch{}return[...t]}function enqueueLocalRoot(e,t){let n=resolve(t);e.processedLocalRoots.has(n)||e.localRootsToProcess.includes(n)||!isAuthoredSourcePath$1(n,e.sourceRoot)||e.localRootsToProcess.push(n)}async function readPackageDependencyNames(e){let t=join(e,`package.json`),n=await readTextFileIfExists(t);if(n===void 0)return[];let r;try{r=JSON.parse(n)}catch{return[]}if(!isObjectRecord(r))return[];let i=new Set;for(let e of PACKAGE_DEPENDENCY_FIELDS){let t=r[e];if(isObjectRecord(t))for(let e of Object.keys(t))i.add(e)}return[...i].sort((e,t)=>e.localeCompare(t))}function createWatchPaths(e){let t=new Set([join(e.appRoot,`package.json`),...e.copyFiles,...e.tsconfigPaths]);for(let n of e.localRoots)n!==e.appRoot&&t.add(n);for(let n of e.dependencyMounts)n.sourceKind===`workspace`&&n.sourcePath!==e.appRoot&&t.add(n.sourcePath);if(e.sourceRoot!==e.appRoot)for(let n of WORKSPACE_METADATA_FILE_NAMES){let r=join(e.sourceRoot,n);existsSync(r)&&t.add(r)}return[...t].sort((e,t)=>e.localeCompare(t))}function joinNodeModulesPackagePath(e,t){return join(e,`node_modules`,...t.split(`/`))}function toSnapshotPath(e){if(!isPathInsideOrEqual(e.sourcePath,e.sourceRoot))throw new DevelopmentRuntimeSourceSnapshotError(`Cannot map source path "${e.sourcePath}" into a development runtime snapshot because it is outside source root "${e.sourceRoot}".`);return join(e.snapshotSourceRoot,relative(e.sourceRoot,e.sourcePath))}function isObjectRecord(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}export{DevelopmentRuntimeSourceSnapshotError,createDevelopmentSourceSnapshotPlan,isAuthoredSourcePath,resolveDevelopmentSourceRoot,resolveDevelopmentSourceSnapshotWatchPaths,toDevelopmentSourceSnapshotPath};
|
|
@@ -8,7 +8,6 @@ export interface DevelopmentGeneration extends DevelopmentRuntimeArtifactsSnapsh
|
|
|
8
8
|
readonly workflowSourceFingerprint?: string;
|
|
9
9
|
}
|
|
10
10
|
export declare function stageDevelopmentGeneration(compileResult: CompileAgentResult): Promise<DevelopmentGeneration>;
|
|
11
|
-
export declare function publishDevelopmentGeneration(compileResult: CompileAgentResult): Promise<DevelopmentGeneration>;
|
|
12
11
|
export declare function activateDevelopmentGeneration(input: {
|
|
13
12
|
readonly appRoot: string;
|
|
14
13
|
readonly generation: DevelopmentGeneration;
|