eve 0.66.3 → 0.67.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +28 -0
- package/dist/src/channel/channel-address.d.ts +0 -2
- package/dist/src/channel/channel-address.js +1 -1
- package/dist/src/channel/channel-operations.d.ts +0 -5
- package/dist/src/channel/channel-operations.js +1 -1
- package/dist/src/channel/compiled-channel.d.ts +8 -0
- package/dist/src/channel/compiled-channel.js +2 -2
- package/dist/src/channel/conversation-context.js +1 -1
- package/dist/src/channel/routes.d.ts +1 -2
- package/dist/src/channel/schedule.d.ts +2 -2
- package/dist/src/channel/schedule.js +1 -1
- package/dist/src/channel/types.d.ts +8 -13
- package/dist/src/chunks/{use-eve-agent-PbSMyJ6e.js → use-eve-agent-DzdyI97Z.js} +0 -5
- package/dist/src/chunks/{use-eve-agent-Di1u2zKu.js → use-eve-agent-OCHP4s0z.js} +0 -5
- package/dist/src/cli/acp/command.js +3 -3
- package/dist/src/cli/commands/logs.d.ts +3 -3
- package/dist/src/cli/commands/logs.js +1 -1
- package/dist/src/cli/commands/register-integration-commands.js +1 -1
- package/dist/src/cli/commands/trace.js +1 -1
- package/dist/src/cli/dev/command.d.ts +9 -5
- package/dist/src/cli/dev/command.js +1 -3
- package/dist/src/cli/dev/run-interactive-ui.d.ts +0 -1
- package/dist/src/cli/dev/run-interactive-ui.js +1 -1
- package/dist/src/cli/dev/tui/blocks.js +1 -1
- package/dist/src/cli/dev/tui/prompt-command-handler.js +1 -1
- package/dist/src/cli/dev/tui/question-panel.d.ts +4 -4
- package/dist/src/cli/dev/tui/question-panel.js +1 -1
- package/dist/src/cli/dev/tui/runner.js +2 -2
- package/dist/src/cli/dev/tui/terminal-renderer.js +8 -9
- package/dist/src/cli/dev/tui/theme.d.ts +1 -1
- package/dist/src/cli/dev/url-target.js +1 -1
- package/dist/src/cli/invoke/command.d.ts +2 -5
- package/dist/src/cli/invoke/command.js +1 -1
- package/dist/src/cli/invoke/invoke.d.ts +2 -2
- package/dist/src/cli/invoke/invoke.js +1 -1
- package/dist/src/cli/invoke/result.d.ts +14 -194
- package/dist/src/cli/invoke/result.js +1 -1
- package/dist/src/cli/run.d.ts +0 -4
- package/dist/src/cli/run.js +2 -2
- package/dist/src/cli/telemetry/index.js +1 -1
- package/dist/src/client/message-reducer.js +1 -1
- package/dist/src/compiled/.vendor-stamp.json +1 -1
- package/dist/src/compiler/compile-from-memory.d.ts +0 -1
- package/dist/src/compiler/compile-from-memory.js +1 -1
- package/dist/src/compiler/extension-compatibility.d.ts +25 -18
- package/dist/src/compiler/extension-compatibility.js +1 -1
- package/dist/src/compiler/manifest.d.ts +48 -14
- package/dist/src/compiler/manifest.js +1 -1
- package/dist/src/compiler/normalize-agent-config.js +1 -1
- package/dist/src/compiler/normalize-channel.js +1 -1
- package/dist/src/compiler/normalize-connection.js +1 -1
- package/dist/src/compiler/normalize-manifest-helpers.js +1 -1
- package/dist/src/compiler/normalize-subagent.d.ts +0 -2
- package/dist/src/compiler/normalize-subagent.js +1 -1
- package/dist/src/compiler/remote-agent-node.d.ts +0 -2
- package/dist/src/compiler/remote-agent-node.js +1 -1
- package/dist/src/compiler/workspace-resources.js +1 -1
- package/dist/src/context/dynamic-subagent-lifecycle.js +1 -1
- package/dist/src/context/keys.d.ts +0 -3
- package/dist/src/context/keys.js +1 -1
- package/dist/src/context/memory-lifecycle.d.ts +1 -0
- package/dist/src/context/memory-lifecycle.js +1 -1
- package/dist/src/discover/project.js +1 -1
- package/dist/src/eve-channel/create-request.d.ts +0 -3
- package/dist/src/eve-channel/create-request.js +1 -1
- package/dist/src/eve-channel/index.js +1 -1
- package/dist/src/eve-channel/request.js +1 -1
- package/dist/src/eve-channel/types.d.ts +1 -1
- package/dist/src/execution/delegated-session-context.d.ts +2 -0
- package/dist/src/execution/delegated-session-context.js +1 -0
- package/dist/src/execution/dynamic-connections.d.ts +4 -1
- package/dist/src/execution/dynamic-connections.js +1 -1
- package/dist/src/execution/dynamic-workflow/tool.js +1 -1
- package/dist/src/execution/effective-agent-config.js +1 -1
- package/dist/src/execution/legacy-session/input.d.ts +0 -2
- package/dist/src/execution/legacy-session/input.js +1 -1
- package/dist/src/execution/legacy-session/prepare-step.d.ts +0 -1
- package/dist/src/execution/legacy-session/turn-workflow.js +1 -1
- package/dist/src/execution/node-step.d.ts +4 -2
- package/dist/src/execution/node-step.js +1 -1
- package/dist/src/execution/proxied-deliver-step.js +1 -1
- package/dist/src/execution/publish-channel-event.d.ts +23 -0
- package/dist/src/execution/publish-channel-event.js +1 -0
- package/dist/src/execution/runtime-context.js +1 -1
- package/dist/src/execution/session/entry.js +1 -1
- package/dist/src/execution/session/event-sink.d.ts +1 -1
- package/dist/src/execution/session/event-sink.js +1 -1
- package/dist/src/execution/session/finalization.d.ts +1 -4
- package/dist/src/execution/session/finalization.js +1 -1
- package/dist/src/execution/session/handoff.d.ts +1 -3
- package/dist/src/execution/session/handoff.js +1 -1
- package/dist/src/execution/session/input-queue.d.ts +0 -1
- package/dist/src/execution/session/input-queue.js +1 -1
- package/dist/src/execution/session/next-input.d.ts +0 -1
- package/dist/src/execution/session/next-input.js +1 -1
- package/dist/src/execution/session/program.d.ts +0 -3
- package/dist/src/execution/session/program.js +1 -1
- package/dist/src/execution/session/turn-step-result.d.ts +1 -2
- package/dist/src/execution/session/turn-step-result.js +1 -1
- package/dist/src/execution/session/turn-step.js +1 -1
- package/dist/src/execution/session/turn.d.ts +2 -2
- package/dist/src/execution/session/turn.js +1 -1
- package/dist/src/execution/settle-cancelled-turn-step.js +1 -1
- package/dist/src/execution/tasks/parent/hitl-proxy-steps.js +1 -1
- package/dist/src/execution/tools/agent-router-workflow.js +1 -1
- package/dist/src/execution/tools/agent-router.d.ts +0 -2
- package/dist/src/execution/tools/agent-router.js +1 -1
- package/dist/src/execution/tools/ask-question-workflow.js +1 -1
- package/dist/src/execution/tools/connection-search.d.ts +1 -0
- 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.js +1 -1
- package/dist/src/extensions/code/extension/lib/connect-authentication.js +1 -1
- package/dist/src/extensions/code/extension/lib/github-shell.js +1 -1
- package/dist/src/extensions/code/extension/lib/prwatch-github.js +1 -1
- package/dist/src/framework/sources/registry.js +1 -1
- package/dist/src/harness/approval-delivery-coordinator.d.ts +3 -13
- package/dist/src/harness/approval-delivery-coordinator.js +1 -1
- package/dist/src/harness/emission.d.ts +2 -3
- package/dist/src/harness/emission.js +1 -1
- package/dist/src/harness/input-request-resolution.d.ts +2 -0
- package/dist/src/harness/input-request-resolution.js +1 -1
- package/dist/src/harness/input-requests.d.ts +3 -3
- package/dist/src/harness/input-requests.js +1 -1
- package/dist/src/harness/pending-input-batches.d.ts +3 -3
- package/dist/src/harness/pending-input-batches.js +1 -1
- package/dist/src/harness/proxy-input-requests.d.ts +2 -0
- package/dist/src/harness/proxy-input-requests.js +1 -1
- package/dist/src/harness/session-limit-enforcement.d.ts +2 -3
- package/dist/src/harness/session-limit-enforcement.js +1 -1
- package/dist/src/harness/tool-loop.js +2 -2
- package/dist/src/harness/tools.js +1 -1
- package/dist/src/harness/types.d.ts +11 -13
- package/dist/src/instrumentation/session-context.js +1 -1
- package/dist/src/instrumentation/session-init.js +1 -1
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/internal/authored-definition/core.js +1 -1
- package/dist/src/internal/authored-module-loader.js +1 -2
- package/dist/src/internal/authored-package-boundary.d.ts +0 -1
- package/dist/src/internal/authored-package-boundary.js +1 -1
- package/dist/src/internal/authored-relative-extension-resolver.js +1 -1
- package/dist/src/internal/external-resources-snapshot.d.ts +46 -0
- package/dist/src/internal/external-resources-snapshot.js +1 -0
- package/dist/src/internal/external-resources.d.ts +20 -0
- package/dist/src/internal/external-resources.js +1 -0
- package/dist/src/internal/invocation/workflow-execution.d.ts +0 -2
- package/dist/src/internal/invocation/workflow-execution.js +1 -1
- package/dist/src/internal/nitro/host/build-application.js +1 -1
- package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
- package/dist/src/internal/nitro/host/instrumentation-entry.d.ts +3 -0
- package/dist/src/internal/nitro/host/instrumentation-entry.js +2 -0
- package/dist/src/internal/nitro/host/start-development-server.d.ts +0 -8
- package/dist/src/internal/nitro/host/start-development-server.js +2 -2
- package/dist/src/internal/nitro/host.d.ts +1 -1
- package/dist/src/internal/nitro/host.js +1 -1
- package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response.js +1 -1
- package/dist/src/internal/nitro/routes/index.js +72 -3
- package/dist/src/node_modules/.pnpm/{@vercel_cli-config@0.2.7 → @vercel_cli-config@0.3.0}/node_modules/@vercel/cli-config/dist/index.js +1 -1
- package/dist/src/node_modules/.pnpm/{@vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_3fe44d656b2dcd93a04011e80966afff → @vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494}/node_modules/@vercel/connect/dist/authorization.js +1 -1
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/connector.js +1 -0
- package/dist/src/node_modules/.pnpm/{@vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_3fe44d656b2dcd93a04011e80966afff → @vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494}/node_modules/@vercel/connect/dist/installation.js +1 -1
- package/dist/src/node_modules/.pnpm/{@vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_3fe44d656b2dcd93a04011e80966afff → @vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494}/node_modules/@vercel/connect/dist/token.js +1 -1
- package/dist/src/node_modules/.pnpm/{@vercel_oidc@3.8.8 → @vercel_oidc@3.8.9}/node_modules/@vercel/oidc/dist/token-util.js +1 -1
- package/dist/src/node_modules/.pnpm/{@vercel_oidc@3.8.8 → @vercel_oidc@3.8.9}/node_modules/@vercel/oidc/dist/token.js +1 -1
- package/dist/src/node_modules/.pnpm/{@vercel_oidc@3.8.8 → @vercel_oidc@3.8.9}/node_modules/@vercel/oidc/dist/version.js +1 -1
- package/dist/src/protocol/message.d.ts +4 -0
- package/dist/src/protocol/message.js +1 -1
- package/dist/src/public/channels/chat-sdk/chatSdkChannel.d.ts +0 -1
- package/dist/src/public/channels/chat-sdk/chatSdkChannel.js +1 -1
- package/dist/src/public/channels/mcp.js +1 -1
- package/dist/src/public/channels/slack/app-manifest.d.ts +9 -0
- package/dist/src/public/channels/slack/app-manifest.js +1 -0
- package/dist/src/public/channels/slack/inbound-content.js +6 -3
- package/dist/src/public/channels/slack/slackChannel.d.ts +4 -1
- package/dist/src/public/channels/slack/slackChannel.js +1 -1
- package/dist/src/public/definitions/remote-agent.d.ts +0 -9
- package/dist/src/public/definitions/workspace-agent.d.ts +0 -3
- package/dist/src/public/definitions/workspace-agent.js +1 -1
- package/dist/src/runtime/agent/bootstrap.d.ts +0 -1
- package/dist/src/runtime/agent/bootstrap.js +1 -1
- package/dist/src/runtime/connections/mcp-client.js +1 -1
- package/dist/src/runtime/connections/mcp-tracing.d.ts +27 -0
- package/dist/src/runtime/connections/mcp-tracing.js +1 -0
- package/dist/src/runtime/resolve-agent-graph.js +1 -1
- package/dist/src/runtime/resolve-agent.js +1 -1
- package/dist/src/runtime/subagents/dynamic-agent-config.d.ts +0 -2
- package/dist/src/runtime/subagents/dynamic-agent-config.js +1 -1
- package/dist/src/runtime/subagents/dynamic-remote-agent-config.d.ts +0 -2
- package/dist/src/runtime/subagents/dynamic-remote-agent-config.js +1 -1
- package/dist/src/runtime/types.d.ts +1 -2
- package/dist/src/services/dev-client/vercel-auth-error.d.ts +1 -1
- package/dist/src/setup/scaffold/create/project.js +1 -1
- package/dist/src/setup/verified-remote-agent.d.ts +1 -0
- package/dist/src/setup/verified-remote-agent.js +1 -1
- package/dist/src/shared/action-types.d.ts +2 -2
- package/dist/src/shared/agent-definition.d.ts +0 -9
- package/dist/src/shared/agent-turn-outcome.d.ts +1 -1
- package/dist/src/shared/channel-definition.d.ts +2 -2
- package/dist/src/shared/conversation-context.d.ts +0 -4
- package/dist/src/shared/conversation-context.js +1 -1
- package/dist/src/shared/validate-authorization.js +1 -1
- package/dist/src/shared/vercel-connect-metadata.d.ts +12 -0
- package/dist/src/shared/vercel-connect-metadata.js +1 -0
- package/dist/src/subagents/agent-handle-errors.d.ts +0 -4
- package/dist/src/subagents/agent-handle-errors.js +1 -1
- package/dist/src/subagents/callback-route.js +1 -1
- package/dist/src/subagents/callback-step.d.ts +0 -22
- package/dist/src/subagents/callback-step.js +1 -1
- package/dist/src/subagents/event-proxy-step.js +1 -1
- package/dist/src/subagents/hitl-proxy.d.ts +3 -5
- package/dist/src/subagents/hitl-proxy.js +1 -1
- package/dist/src/subagents/invocation.d.ts +5 -6
- package/dist/src/subagents/parent-notification.d.ts +1 -18
- package/dist/src/subagents/parent-notification.js +1 -1
- package/dist/src/subagents/remote-dispatch.js +1 -1
- package/dist/src/subagents/tool.d.ts +0 -3
- package/dist/src/subagents/tool.js +1 -1
- package/dist/src/svelte/index.js +1 -1
- package/dist/src/svelte/use-eve-agent.js +1 -1
- package/dist/src/tools/framework/agent-contract.d.ts +0 -2
- package/dist/src/tools/framework/agent-contract.js +1 -1
- package/dist/src/tracing/agent-action-instrumentation.js +1 -1
- package/dist/src/tracing/agent-approval-instrumentation.js +1 -1
- package/dist/src/tracing/agent-memory-instrumentation.js +1 -1
- package/dist/src/tracing/agent-otel-provider.js +2 -2
- package/dist/src/tracing/agent-otel-session-context.js +1 -1
- package/dist/src/tracing/agent-tool-instrumentation.js +1 -1
- package/dist/src/tracing/agent-tool-span-context.d.ts +15 -0
- package/dist/src/tracing/agent-tool-span-context.js +1 -0
- package/dist/src/tracing/otel-declaration.d.ts +4 -9
- package/dist/src/vue/index.js +1 -1
- package/dist/src/vue/use-eve-agent.js +1 -1
- package/docs/agent-config.md +12 -13
- package/docs/channels/chat-sdk.mdx +1 -1
- package/docs/channels/custom.mdx +1 -1
- package/docs/channels/eve.mdx +4 -4
- package/docs/channels/mcp.mdx +10 -10
- package/docs/channels/slack.mdx +1 -1
- package/docs/concepts/sessions-runs-and-streaming.md +5 -6
- package/docs/connections/overview.mdx +22 -0
- package/docs/guides/deployment/overview.md +1 -1
- package/docs/guides/deployment/self-hosting.md +1 -1
- package/docs/guides/deployment/vercel.mdx +2 -2
- package/docs/guides/dev-tui.md +6 -6
- package/docs/guides/dynamic-capabilities.md +2 -2
- package/docs/guides/frontend/overview.mdx +5 -3
- package/docs/guides/hooks.md +4 -2
- package/docs/guides/instrumentation/agent-runs.mdx +7 -7
- package/docs/guides/instrumentation/instrumentation.mdx +22 -5
- package/docs/guides/instrumentation/otel.mdx +30 -0
- package/docs/guides/remote-agents.md +3 -4
- package/docs/guides/self-modification.md +1 -1
- package/docs/memory/custom-provider.md +1 -1
- package/docs/protocols/acp.md +1 -1
- package/docs/reference/cli.md +91 -97
- package/docs/schedules.mdx +4 -5
- package/docs/subagents/index.mdx +5 -7
- package/docs/tools/human-in-the-loop.md +4 -0
- package/docs/tools/overview.mdx +2 -0
- package/docs/tools/workflows.mdx +1 -1
- package/docs/tutorial/remember-definitions.mdx +1 -1
- package/docs/tutorial/ship-it.mdx +1 -1
- package/package.json +3 -2
- package/dist/src/cli/commands/channels.d.ts +0 -9
- package/dist/src/cli/commands/channels.js +0 -1
- package/dist/src/execution/effective-output-schema.d.ts +0 -22
- package/dist/src/execution/effective-output-schema.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_3fe44d656b2dcd93a04011e80966afff/node_modules/@vercel/connect/dist/connector.js +0 -1
- package/dist/src/shared/run-mode.d.ts +0 -7
- package/dist/src/shared/run-mode.js +0 -1
- package/dist/src/subagents/parent-result.d.ts +0 -14
- package/dist/src/subagents/parent-result.js +0 -1
- /package/dist/src/node_modules/.pnpm/{@vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_3fe44d656b2dcd93a04011e80966afff → @vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494}/node_modules/@vercel/connect/dist/index.js +0 -0
- /package/dist/src/node_modules/.pnpm/{@vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_3fe44d656b2dcd93a04011e80966afff → @vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494}/node_modules/@vercel/connect/dist/internal/base-url.js +0 -0
- /package/dist/src/node_modules/.pnpm/{@vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_3fe44d656b2dcd93a04011e80966afff → @vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494}/node_modules/@vercel/connect/dist/internal/default-scopes.js +0 -0
- /package/dist/src/node_modules/.pnpm/{@vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_3fe44d656b2dcd93a04011e80966afff → @vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494}/node_modules/@vercel/connect/dist/internal/env.js +0 -0
- /package/dist/src/node_modules/.pnpm/{@vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_3fe44d656b2dcd93a04011e80966afff → @vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494}/node_modules/@vercel/connect/dist/internal/url-validation.js +0 -0
- /package/dist/src/node_modules/.pnpm/{@vercel_oidc@3.8.8 → @vercel_oidc@3.8.9}/node_modules/@vercel/oidc/dist/auth-errors.js +0 -0
- /package/dist/src/node_modules/.pnpm/{@vercel_oidc@3.8.8 → @vercel_oidc@3.8.9}/node_modules/@vercel/oidc/dist/exchange-vercel-oidc-token.js +0 -0
- /package/dist/src/node_modules/.pnpm/{@vercel_oidc@3.8.8 → @vercel_oidc@3.8.9}/node_modules/@vercel/oidc/dist/get-context.js +0 -0
- /package/dist/src/node_modules/.pnpm/{@vercel_oidc@3.8.8 → @vercel_oidc@3.8.9}/node_modules/@vercel/oidc/dist/get-vercel-oidc-token-sync.js +0 -0
- /package/dist/src/node_modules/.pnpm/{@vercel_oidc@3.8.8 → @vercel_oidc@3.8.9}/node_modules/@vercel/oidc/dist/get-vercel-oidc-token-with-refresh.js +0 -0
- /package/dist/src/node_modules/.pnpm/{@vercel_oidc@3.8.8 → @vercel_oidc@3.8.9}/node_modules/@vercel/oidc/dist/index.js +0 -0
- /package/dist/src/node_modules/.pnpm/{@vercel_oidc@3.8.8 → @vercel_oidc@3.8.9}/node_modules/@vercel/oidc/dist/oauth.js +0 -0
- /package/dist/src/node_modules/.pnpm/{@vercel_oidc@3.8.8 → @vercel_oidc@3.8.9}/node_modules/@vercel/oidc/dist/token-error.js +0 -0
- /package/dist/src/node_modules/.pnpm/{@vercel_oidc@3.8.8 → @vercel_oidc@3.8.9}/node_modules/@vercel/oidc/dist/token-io.js +0 -0
- /package/dist/src/node_modules/.pnpm/{@vercel_oidc@3.8.8 → @vercel_oidc@3.8.9}/node_modules/@vercel/oidc/dist/verify-vercel-oidc-token.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{projectInvocationInputRequest}from"./result.js";import{Client,ClientError}from"#client/index.js";import{
|
|
1
|
+
import{projectInvocationInputRequest}from"./result.js";import{Client,ClientError}from"#client/index.js";import{formatVercelTrustedSourcesFailure,isVercelAuthChallenge,vercelTrustedSourcesErrorCode}from"#services/dev-client/vercel-auth-error.js";import{collectTurnEvents,summarizeTurnEvents}from"#client/session-utils.js";import{resolveVerifiedRemoteDevelopmentClient}from"#setup/verified-remote-client.js";async function runInvoke(e){let{client:t,deploymentResolution:n}=await createInvokeClient(e),r=e.operation.resume;if(e.operation.kind===`follow`){let i=t.sessions.attach(r.session.sessionId,{streamIndex:r.session.streamIndex});return observeSafely(e,i,i.stream({signal:e.signal}),n)}let i,a;try{let n={...e.operation.payload,signal:e.signal};if(r===void 0){if(n.message===void 0)throw Error(`Cannot answer an input request before the session starts.`);let e=await t.sessions.create({...n,message:n.message});a=e.session,i=e.response}else{a=t.sessions.attach(r.session.sessionId,{streamIndex:r.session.streamIndex});let{inputResponses:e,message:o,...s}=n;i=e===void 0?await a.send(o,s):await a.respond(e,s)}}catch(e){let t=authenticationFailure(e,void 0,n);if(t!==void 0)return t;throw e}return observeSafely(e,a,i,n)}function resolveInvokeOperation(e){let t=e.prompt?.trim(),n=e.previous;if(n===void 0){if(!t)throw Error(`eve remote invoke requires a prompt unless --resume is provided.`);return{kind:`send`,payload:{message:t}}}if(n.status===`input-required`){if(!t)throw Error(`This invocation is waiting for an input response.`);return{kind:`send`,payload:{message:t},resume:n.resume}}if(n.status===`running`||n.status===`authorization-required`||n.status===`authentication-required`){if(t)throw Error(n.status===`running`?`A running invocation cannot accept a follow-up prompt.`:`Complete the requested authorization, then resume without a prompt.`);return{kind:`follow`,resume:n.resume}}if(n.status!==`ready`)throw Error(`A terminal ${n.status} invocation cannot be resumed.`);if(!t)throw Error(`A ready invocation requires a follow-up prompt.`);return{kind:`send`,payload:{message:t},resume:n.resume}}async function createInvokeClient(e){let{deploymentResolution:t,options:n}=await resolveVerifiedRemoteDevelopmentClient({headers:e.headers,serverUrl:e.target.serverUrl,signal:e.signal,vercelScope:e.vercelScope,workspaceRoot:e.target.workspaceRoot});return{client:new Client(n),deploymentResolution:t}}async function observeSafely(e,t,n,r){try{return await observeInvocation(e.target,t,n)}catch(n){if(e.signal?.aborted===!0)return runningResult(e.target,t.state);let i=authenticationFailure(n,createResume(e.target,t.state),r);if(i!==void 0)return i;throw n}}async function observeInvocation(e,t,n){let r=summarizeTurnEvents(await collectTurnEvents(n));if(r.boundary===void 0)return runningResult(e,t.state);if(r.boundary.type===`session.failed`)return{status:`failed`,message:r.boundary.data.message};let i=createResume(e,t.state);if(r.failure?.type===`turn.failed`)return{status:`ready`,outcome:{status:`failed`,message:r.failure.data.message},resume:i};if(r.inputRequests.length>0)return{status:`input-required`,requests:r.inputRequests.map(projectInvocationInputRequest),resume:i};let a=r.pendingAuthorizations;return a.length>0?{status:`authorization-required`,authorizations:a,resume:i}:{status:`ready`,outcome:r.message===void 0?{status:`completed`}:{status:`completed`,message:r.message},resume:i}}function runningResult(e,t){return{status:`running`,resume:createResume(e,t)}}function createResume(e,t){return{session:t,target:{kind:`remote`,serverUrl:e.serverUrl}}}function authenticationFailure(e,t,n){let r,i;if(n?.kind===`not-found`?r=`Vercel could not resolve this deployment in the selected scope. Retry with the owning team's slug via --scope <team-slug>, or provide an explicit Authorization header with -H.`:isVercelAuthChallenge(e)?r=`Vercel Deployment Protection rejected the available credentials. Configure Trusted Sources or set VERCEL_AUTOMATION_BYPASS_SECRET, then retry.`:e instanceof ClientError&&(i=vercelTrustedSourcesErrorCode(e.message),e.status===403&&i===`TRUSTED_SOURCES_ENVIRONMENT_MISMATCH`?r=formatVercelTrustedSourcesFailure(e.message):isEveAuthorizationError(e)&&(r=`The deployment rejected the available credentials. Confirm its eve channel authorization and that your account can access the owning project.`)),r!==void 0)return t===void 0?i===void 0?{status:`authentication-required`,message:r}:{status:`authentication-required`,code:i,message:r}:i===void 0?{status:`authentication-required`,message:r,resume:t}:{status:`authentication-required`,code:i,message:r,resume:t}}function isEveAuthorizationError(e){if(e.status!==401)return!1;try{let t=JSON.parse(e.body);return t.ok===!1&&t.code===`unauthorized`}catch{return!1}}export{resolveInvokeOperation,runInvoke};
|
|
@@ -6,12 +6,10 @@ declare const invokeResumeSchema: z.ZodObject<{
|
|
|
6
6
|
sessionId: z.ZodString;
|
|
7
7
|
streamIndex: z.ZodNumber;
|
|
8
8
|
}, z.core.$strict>;
|
|
9
|
-
target: z.
|
|
10
|
-
kind: z.ZodLiteral<"local">;
|
|
11
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
9
|
+
target: z.ZodObject<{
|
|
12
10
|
kind: z.ZodLiteral<"remote">;
|
|
13
11
|
serverUrl: z.ZodURL;
|
|
14
|
-
}, z.core.$strict
|
|
12
|
+
}, z.core.$strict>;
|
|
15
13
|
}, z.core.$strict>;
|
|
16
14
|
declare const invocationInputRequestSchema: z.ZodObject<{
|
|
17
15
|
allowFreeform: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -34,12 +32,10 @@ declare const invokeResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
34
32
|
sessionId: z.ZodString;
|
|
35
33
|
streamIndex: z.ZodNumber;
|
|
36
34
|
}, z.core.$strict>;
|
|
37
|
-
target: z.
|
|
38
|
-
kind: z.ZodLiteral<"local">;
|
|
39
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
35
|
+
target: z.ZodObject<{
|
|
40
36
|
kind: z.ZodLiteral<"remote">;
|
|
41
37
|
serverUrl: z.ZodURL;
|
|
42
|
-
}, z.core.$strict
|
|
38
|
+
}, z.core.$strict>;
|
|
43
39
|
}, z.core.$strict>;
|
|
44
40
|
status: z.ZodLiteral<"running">;
|
|
45
41
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -63,12 +59,10 @@ declare const invokeResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
63
59
|
sessionId: z.ZodString;
|
|
64
60
|
streamIndex: z.ZodNumber;
|
|
65
61
|
}, z.core.$strict>;
|
|
66
|
-
target: z.
|
|
67
|
-
kind: z.ZodLiteral<"local">;
|
|
68
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
62
|
+
target: z.ZodObject<{
|
|
69
63
|
kind: z.ZodLiteral<"remote">;
|
|
70
64
|
serverUrl: z.ZodURL;
|
|
71
|
-
}, z.core.$strict
|
|
65
|
+
}, z.core.$strict>;
|
|
72
66
|
}, z.core.$strict>;
|
|
73
67
|
status: z.ZodLiteral<"input-required">;
|
|
74
68
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -83,12 +77,10 @@ declare const invokeResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
83
77
|
sessionId: z.ZodString;
|
|
84
78
|
streamIndex: z.ZodNumber;
|
|
85
79
|
}, z.core.$strict>;
|
|
86
|
-
target: z.
|
|
87
|
-
kind: z.ZodLiteral<"local">;
|
|
88
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
80
|
+
target: z.ZodObject<{
|
|
89
81
|
kind: z.ZodLiteral<"remote">;
|
|
90
82
|
serverUrl: z.ZodURL;
|
|
91
|
-
}, z.core.$strict
|
|
83
|
+
}, z.core.$strict>;
|
|
92
84
|
}, z.core.$strict>;
|
|
93
85
|
status: z.ZodLiteral<"authorization-required">;
|
|
94
86
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -104,12 +96,10 @@ declare const invokeResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
104
96
|
sessionId: z.ZodString;
|
|
105
97
|
streamIndex: z.ZodNumber;
|
|
106
98
|
}, z.core.$strict>;
|
|
107
|
-
target: z.
|
|
108
|
-
kind: z.ZodLiteral<"local">;
|
|
109
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
99
|
+
target: z.ZodObject<{
|
|
110
100
|
kind: z.ZodLiteral<"remote">;
|
|
111
101
|
serverUrl: z.ZodURL;
|
|
112
|
-
}, z.core.$strict
|
|
102
|
+
}, z.core.$strict>;
|
|
113
103
|
}, z.core.$strict>;
|
|
114
104
|
status: z.ZodLiteral<"ready">;
|
|
115
105
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -123,16 +113,14 @@ declare const invokeResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
123
113
|
sessionId: z.ZodString;
|
|
124
114
|
streamIndex: z.ZodNumber;
|
|
125
115
|
}, z.core.$strict>;
|
|
126
|
-
target: z.
|
|
127
|
-
kind: z.ZodLiteral<"local">;
|
|
128
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
116
|
+
target: z.ZodObject<{
|
|
129
117
|
kind: z.ZodLiteral<"remote">;
|
|
130
118
|
serverUrl: z.ZodURL;
|
|
131
|
-
}, z.core.$strict
|
|
119
|
+
}, z.core.$strict>;
|
|
132
120
|
}, z.core.$strict>>;
|
|
133
121
|
status: z.ZodLiteral<"authentication-required">;
|
|
134
122
|
}, z.core.$strict>], "status">;
|
|
135
|
-
/** Durable session coordinates emitted by `eve invoke`. Credentials are deliberately excluded. */
|
|
123
|
+
/** Durable session coordinates emitted by `eve remote invoke`. Credentials are deliberately excluded. */
|
|
136
124
|
export type InvokeResume = z.infer<typeof invokeResumeSchema>;
|
|
137
125
|
export type InvocationInputRequest = z.infer<typeof invocationInputRequestSchema>;
|
|
138
126
|
/** Result emitted by one non-interactive agent invocation. */
|
|
@@ -142,176 +130,8 @@ export type InvokeAuthenticationFailure = Extract<InvokeResult, {
|
|
|
142
130
|
}>;
|
|
143
131
|
/** Projects a runtime input request to the stable invocation-facing contract. */
|
|
144
132
|
export declare function projectInvocationInputRequest(request: InputRequest): InvocationInputRequest;
|
|
145
|
-
/** Parses a complete, resumable result from a previous `eve invoke` command. */
|
|
133
|
+
/** Parses a complete, resumable result from a previous `eve remote invoke` command. */
|
|
146
134
|
export declare function parseInvokeResumeInput(value: unknown): InvokeResult & {
|
|
147
135
|
resume: InvokeResume;
|
|
148
136
|
};
|
|
149
|
-
/** JSON Schema generated from the canonical invoke result runtime schema. */
|
|
150
|
-
export declare const invokeResultJsonSchema: {
|
|
151
|
-
$schema?: "https://json-schema.org/draft/2020-12/schema" | "http://json-schema.org/draft-07/schema#" | "http://json-schema.org/draft-04/schema#";
|
|
152
|
-
$anchor?: string;
|
|
153
|
-
$ref?: string;
|
|
154
|
-
$dynamicRef?: string;
|
|
155
|
-
$dynamicAnchor?: string;
|
|
156
|
-
$vocabulary?: Record<string, boolean>;
|
|
157
|
-
$comment?: string;
|
|
158
|
-
$defs?: Record<string, z.core.JSONSchema.JSONSchema>;
|
|
159
|
-
type?: z.core.JSONSchema.SchemaType | z.core.JSONSchema.SchemaType[];
|
|
160
|
-
additionalItems?: z.core.JSONSchema._JSONSchema;
|
|
161
|
-
unevaluatedItems?: z.core.JSONSchema._JSONSchema;
|
|
162
|
-
prefixItems?: z.core.JSONSchema._JSONSchema[];
|
|
163
|
-
items?: z.core.JSONSchema._JSONSchema | z.core.JSONSchema._JSONSchema[];
|
|
164
|
-
contains?: z.core.JSONSchema._JSONSchema;
|
|
165
|
-
additionalProperties?: z.core.JSONSchema._JSONSchema;
|
|
166
|
-
unevaluatedProperties?: z.core.JSONSchema._JSONSchema;
|
|
167
|
-
properties?: Record<string, z.core.JSONSchema._JSONSchema>;
|
|
168
|
-
patternProperties?: Record<string, z.core.JSONSchema._JSONSchema>;
|
|
169
|
-
dependentSchemas?: Record<string, z.core.JSONSchema._JSONSchema>;
|
|
170
|
-
propertyNames?: z.core.JSONSchema._JSONSchema;
|
|
171
|
-
if?: z.core.JSONSchema._JSONSchema;
|
|
172
|
-
then?: z.core.JSONSchema._JSONSchema;
|
|
173
|
-
else?: z.core.JSONSchema._JSONSchema;
|
|
174
|
-
allOf?: z.core.JSONSchema.JSONSchema[];
|
|
175
|
-
anyOf?: z.core.JSONSchema.JSONSchema[];
|
|
176
|
-
oneOf?: z.core.JSONSchema.JSONSchema[];
|
|
177
|
-
not?: z.core.JSONSchema._JSONSchema;
|
|
178
|
-
multipleOf?: number;
|
|
179
|
-
maximum?: number;
|
|
180
|
-
exclusiveMaximum?: number | boolean;
|
|
181
|
-
minimum?: number;
|
|
182
|
-
exclusiveMinimum?: number | boolean;
|
|
183
|
-
maxLength?: number;
|
|
184
|
-
minLength?: number;
|
|
185
|
-
pattern?: string;
|
|
186
|
-
maxItems?: number;
|
|
187
|
-
minItems?: number;
|
|
188
|
-
uniqueItems?: boolean;
|
|
189
|
-
maxContains?: number;
|
|
190
|
-
minContains?: number;
|
|
191
|
-
maxProperties?: number;
|
|
192
|
-
minProperties?: number;
|
|
193
|
-
required?: string[];
|
|
194
|
-
dependentRequired?: Record<string, string[]>;
|
|
195
|
-
enum?: Array<string | number | boolean | null>;
|
|
196
|
-
const?: string | number | boolean | null;
|
|
197
|
-
id?: string;
|
|
198
|
-
description?: string;
|
|
199
|
-
default?: unknown;
|
|
200
|
-
deprecated?: boolean;
|
|
201
|
-
readOnly?: boolean;
|
|
202
|
-
writeOnly?: boolean;
|
|
203
|
-
nullable?: boolean;
|
|
204
|
-
examples?: unknown[];
|
|
205
|
-
format?: string;
|
|
206
|
-
contentMediaType?: string;
|
|
207
|
-
contentEncoding?: string;
|
|
208
|
-
contentSchema?: z.core.JSONSchema.JSONSchema;
|
|
209
|
-
_prefault?: unknown;
|
|
210
|
-
"~standard": z.core.ZodStandardSchemaWithJSON<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
211
|
-
resume: z.ZodObject<{
|
|
212
|
-
session: z.ZodObject<{
|
|
213
|
-
sessionId: z.ZodString;
|
|
214
|
-
streamIndex: z.ZodNumber;
|
|
215
|
-
}, z.core.$strict>;
|
|
216
|
-
target: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
217
|
-
kind: z.ZodLiteral<"local">;
|
|
218
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
219
|
-
kind: z.ZodLiteral<"remote">;
|
|
220
|
-
serverUrl: z.ZodURL;
|
|
221
|
-
}, z.core.$strict>], "kind">;
|
|
222
|
-
}, z.core.$strict>;
|
|
223
|
-
status: z.ZodLiteral<"running">;
|
|
224
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
225
|
-
requests: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
226
|
-
allowFreeform: z.ZodOptional<z.ZodBoolean>;
|
|
227
|
-
kind: z.ZodEnum<{
|
|
228
|
-
question: "question";
|
|
229
|
-
"session-limit": "session-limit";
|
|
230
|
-
"tool-approval": "tool-approval";
|
|
231
|
-
}>;
|
|
232
|
-
prompt: z.ZodString;
|
|
233
|
-
requestId: z.ZodString;
|
|
234
|
-
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
235
|
-
description: z.ZodOptional<z.ZodString>;
|
|
236
|
-
id: z.ZodString;
|
|
237
|
-
label: z.ZodString;
|
|
238
|
-
}, z.core.$strict>>>;
|
|
239
|
-
}, z.core.$strict>>>;
|
|
240
|
-
resume: z.ZodObject<{
|
|
241
|
-
session: z.ZodObject<{
|
|
242
|
-
sessionId: z.ZodString;
|
|
243
|
-
streamIndex: z.ZodNumber;
|
|
244
|
-
}, z.core.$strict>;
|
|
245
|
-
target: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
246
|
-
kind: z.ZodLiteral<"local">;
|
|
247
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
248
|
-
kind: z.ZodLiteral<"remote">;
|
|
249
|
-
serverUrl: z.ZodURL;
|
|
250
|
-
}, z.core.$strict>], "kind">;
|
|
251
|
-
}, z.core.$strict>;
|
|
252
|
-
status: z.ZodLiteral<"input-required">;
|
|
253
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
254
|
-
authorizations: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
255
|
-
authorization: z.ZodOptional<z.ZodType<ConnectionAuthorizationChallenge, unknown, z.core.$ZodTypeInternals<ConnectionAuthorizationChallenge, unknown>>>;
|
|
256
|
-
description: z.ZodString;
|
|
257
|
-
name: z.ZodString;
|
|
258
|
-
webhookUrl: z.ZodOptional<z.ZodString>;
|
|
259
|
-
}, z.core.$strict>>>;
|
|
260
|
-
resume: z.ZodObject<{
|
|
261
|
-
session: z.ZodObject<{
|
|
262
|
-
sessionId: z.ZodString;
|
|
263
|
-
streamIndex: z.ZodNumber;
|
|
264
|
-
}, z.core.$strict>;
|
|
265
|
-
target: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
266
|
-
kind: z.ZodLiteral<"local">;
|
|
267
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
268
|
-
kind: z.ZodLiteral<"remote">;
|
|
269
|
-
serverUrl: z.ZodURL;
|
|
270
|
-
}, z.core.$strict>], "kind">;
|
|
271
|
-
}, z.core.$strict>;
|
|
272
|
-
status: z.ZodLiteral<"authorization-required">;
|
|
273
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
274
|
-
outcome: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
275
|
-
message: z.ZodOptional<z.ZodString>;
|
|
276
|
-
status: z.ZodLiteral<"completed">;
|
|
277
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
278
|
-
message: z.ZodString;
|
|
279
|
-
status: z.ZodLiteral<"failed">;
|
|
280
|
-
}, z.core.$strict>], "status">;
|
|
281
|
-
resume: z.ZodObject<{
|
|
282
|
-
session: z.ZodObject<{
|
|
283
|
-
sessionId: z.ZodString;
|
|
284
|
-
streamIndex: z.ZodNumber;
|
|
285
|
-
}, z.core.$strict>;
|
|
286
|
-
target: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
287
|
-
kind: z.ZodLiteral<"local">;
|
|
288
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
289
|
-
kind: z.ZodLiteral<"remote">;
|
|
290
|
-
serverUrl: z.ZodURL;
|
|
291
|
-
}, z.core.$strict>], "kind">;
|
|
292
|
-
}, z.core.$strict>;
|
|
293
|
-
status: z.ZodLiteral<"ready">;
|
|
294
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
295
|
-
message: z.ZodString;
|
|
296
|
-
status: z.ZodLiteral<"failed">;
|
|
297
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
298
|
-
code: z.ZodOptional<z.ZodString>;
|
|
299
|
-
message: z.ZodString;
|
|
300
|
-
resume: z.ZodOptional<z.ZodObject<{
|
|
301
|
-
session: z.ZodObject<{
|
|
302
|
-
sessionId: z.ZodString;
|
|
303
|
-
streamIndex: z.ZodNumber;
|
|
304
|
-
}, z.core.$strict>;
|
|
305
|
-
target: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
306
|
-
kind: z.ZodLiteral<"local">;
|
|
307
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
308
|
-
kind: z.ZodLiteral<"remote">;
|
|
309
|
-
serverUrl: z.ZodURL;
|
|
310
|
-
}, z.core.$strict>], "kind">;
|
|
311
|
-
}, z.core.$strict>>;
|
|
312
|
-
status: z.ZodLiteral<"authentication-required">;
|
|
313
|
-
}, z.core.$strict>], "status">>;
|
|
314
|
-
$id: string;
|
|
315
|
-
title: string;
|
|
316
|
-
};
|
|
317
137
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z}from"#compiled/zod/index.js";import{inputOptionSchema,inputRequestSchema}from"#shared/input.js";const sessionCursorSchema=z.object({sessionId:z.string().min(1),streamIndex:z.number().int().nonnegative()}).strict(),targetSchema=z.
|
|
1
|
+
import{z}from"#compiled/zod/index.js";import{inputOptionSchema,inputRequestSchema}from"#shared/input.js";const sessionCursorSchema=z.object({sessionId:z.string().min(1),streamIndex:z.number().int().nonnegative()}).strict(),targetSchema=z.object({kind:z.literal(`remote`),serverUrl:z.url()}).strict(),invokeResumeSchema=z.object({session:sessionCursorSchema,target:targetSchema}).strict(),invocationInputRequestSchema=inputRequestSchema.omit({action:!0,display:!0,options:!0}).extend({options:z.array(inputOptionSchema.omit({style:!0})).optional()}),authorizationChallengeSchema=z.object({displayName:z.string().optional(),expiresAt:z.string().optional(),instructions:z.string().optional(),url:z.string().optional(),userCode:z.string().optional()}).strict(),authorizationInterruptSchema=z.object({authorization:authorizationChallengeSchema.optional(),description:z.string(),name:z.string(),webhookUrl:z.string().optional()}).strict(),turnOutcomeSchema=z.discriminatedUnion(`status`,[z.object({message:z.string().optional(),status:z.literal(`completed`)}).strict(),z.object({message:z.string(),status:z.literal(`failed`)}).strict()]),invokeResultSchema=z.discriminatedUnion(`status`,[z.object({resume:invokeResumeSchema,status:z.literal(`running`)}).strict(),z.object({requests:z.array(invocationInputRequestSchema).readonly(),resume:invokeResumeSchema,status:z.literal(`input-required`)}).strict(),z.object({authorizations:z.array(authorizationInterruptSchema).min(1).readonly(),resume:invokeResumeSchema,status:z.literal(`authorization-required`)}).strict(),z.object({outcome:turnOutcomeSchema,resume:invokeResumeSchema,status:z.literal(`ready`)}).strict(),z.object({message:z.string(),status:z.literal(`failed`)}).strict(),z.object({code:z.string().optional(),message:z.string(),resume:invokeResumeSchema.optional(),status:z.literal(`authentication-required`)}).strict()]);function projectInvocationInputRequest(e){let{allowFreeform:t,kind:n,options:r,prompt:i,requestId:a}=e;return{allowFreeform:t,kind:n,options:r?.map(({description:e,id:t,label:n})=>({description:e,id:t,label:n})),prompt:i,requestId:a}}function parseInvokeResumeInput(e){let t=invokeResultSchema.safeParse(e);if(t.success&&`resume`in t.data&&t.data.resume!==void 0)return t.data;throw Error(`Resume JSON is not a valid resumable eve remote invoke result.`)}export{parseInvokeResumeInput,projectInvocationInputRequest};
|
package/dist/src/cli/run.d.ts
CHANGED
|
@@ -17,10 +17,6 @@ interface CliLogger {
|
|
|
17
17
|
interface CliRuntimeDependencies {
|
|
18
18
|
isCodingAgentLaunch(): Promise<boolean>;
|
|
19
19
|
findApplicationRoot(cwd: string): Promise<string | undefined>;
|
|
20
|
-
isActiveDevelopmentServerForApp(input: {
|
|
21
|
-
readonly appRoot: string;
|
|
22
|
-
readonly serverUrl: string;
|
|
23
|
-
}): Promise<boolean>;
|
|
24
20
|
buildHost: BuildHost;
|
|
25
21
|
resolveVerifiedRemoteDevelopmentClient: ResolveVerifiedRemoteDevelopmentClient;
|
|
26
22
|
runAcpServer: RunAcpServer;
|
package/dist/src/cli/run.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Command,CommanderError}from"#compiled/commander/index.js";import{agentCommand}from"#cli/agent-command.js";import{parseDevelopmentServerUrl}from"#cli/dev/url.js";import{waitForShutdownSignal}from"#cli/shutdown.js";import{resolveInstalledPackageInfo}from"#internal/application/package.js";import{createCliTheme,renderCliTaggedLine}from"#cli/ui/output.js";import{findEveProjectContext,resolveEveProjectContext}from"#internal/project-context.js";import{isCodingAgentLaunch}from"#cli/agent-detection.js";import{eveCliBanner}from"#cli/banner.js";import{registerBuildCommand}from"#cli/commands/build.js";import{resolveApplicationRoot}from"#internal/application/paths.js";import{findCliApplicationRoot,resolveCliApplicationProject}from"#cli/application-root.js";import{registerIntegrationCommands}from"#cli/commands/register-integration-commands.js";import{registerProjectCommands}from"#cli/commands/register-project-commands.js";import{registerRegistryCommands}from"#cli/commands/register-registry-commands.js";import{registerDevelopmentCommand}from"#cli/dev/command.js";import{resolveDevUiMode,resolveTuiDisplayOptions}from"#cli/dev/ui-options.js";import{registerAcpCommand}from"#cli/acp/command.js";import{registerRuntimeInvokeCommand}from"#cli/invoke/command.js";import{parseAgentNamesOption,parsePortOption,parseReasoningOption}from"#cli/option-parsers.js";import{registerEveTelemetryCommands}from"#cli/telemetry/command.js";import{canonicalCommand,createEveCliTelemetry}from"#cli/telemetry/index.js";async function loadPrintApplicationInfo(){return(await import(`#cli/commands/info.js`)).printApplicationInfo}async function loadRunEvalCommand(){return(await import(`#evals/cli/eval.js`)).runEvalCommand}async function loadStartProductionHost(){return(await import(`#internal/nitro/host.js`)).startProductionServer}function createCliProgram(e,t,n,r){let i=resolveInstalledPackageInfo().version,a=new Command,o=createCliTheme();a.name(`eve`).description(`Build and run an eve application.`).version(i).showHelpAfterError().exitOverride().hook(`preAction`,(t,n)=>{let{json:r}=n.opts();!r&&(n.name()===`info`||n.name()===`init`&&n.parent!==a)&&e.log(eveCliBanner())}).configureOutput({writeErr:t=>{e.error(t.trimEnd())},writeOut:t=>{e.log(t.trimEnd())}}),
|
|
2
|
-
eve traces
|
|
1
|
+
import{Command,CommanderError}from"#compiled/commander/index.js";import{agentCommand}from"#cli/agent-command.js";import{parseDevelopmentServerUrl}from"#cli/dev/url.js";import{waitForShutdownSignal}from"#cli/shutdown.js";import{resolveInstalledPackageInfo}from"#internal/application/package.js";import{createCliTheme,renderCliTaggedLine}from"#cli/ui/output.js";import{findEveProjectContext,resolveEveProjectContext}from"#internal/project-context.js";import{isCodingAgentLaunch}from"#cli/agent-detection.js";import{eveCliBanner}from"#cli/banner.js";import{registerBuildCommand}from"#cli/commands/build.js";import{resolveApplicationRoot}from"#internal/application/paths.js";import{findCliApplicationRoot,resolveCliApplicationProject}from"#cli/application-root.js";import{registerIntegrationCommands}from"#cli/commands/register-integration-commands.js";import{registerProjectCommands}from"#cli/commands/register-project-commands.js";import{registerRegistryCommands}from"#cli/commands/register-registry-commands.js";import{registerDevelopmentCommand,registerRemoteCommands}from"#cli/dev/command.js";import{resolveDevUiMode,resolveTuiDisplayOptions}from"#cli/dev/ui-options.js";import{registerAcpCommand}from"#cli/acp/command.js";import{registerRuntimeInvokeCommand}from"#cli/invoke/command.js";import{parseAgentNamesOption,parsePortOption,parseReasoningOption}from"#cli/option-parsers.js";import{registerEveTelemetryCommands}from"#cli/telemetry/command.js";import{canonicalCommand,createEveCliTelemetry}from"#cli/telemetry/index.js";async function loadPrintApplicationInfo(){return(await import(`#cli/commands/info.js`)).printApplicationInfo}async function loadRunEvalCommand(){return(await import(`#evals/cli/eval.js`)).runEvalCommand}async function loadStartProductionHost(){return(await import(`#internal/nitro/host.js`)).startProductionServer}function createCliProgram(e,t,n,r){let i=resolveInstalledPackageInfo().version,a=new Command,o=createCliTheme();a.name(`eve`).description(`Build and run an eve application.`).version(i).showHelpAfterError().exitOverride().hook(`preAction`,(t,n)=>{let{json:r}=n.opts();!r&&(n.name()===`info`||n.name()===`init`&&n.parent!==a)&&e.log(eveCliBanner())}).configureOutput({writeErr:t=>{e.error(t.trimEnd())},writeOut:t=>{e.log(t.trimEnd())}}),registerEveTelemetryCommands(a,e),registerIntegrationCommands({program:a,logger:e,applicationContext:n});let s=a.command(`extension`).description(`Create and build reusable eve extension packages.`);s.command(`init [target]`).description(`Create a new eve extension package.`).option(`-y, --yes`,`Accepted for compatibility; has no effect`).action(async(t,i)=>{i.yes&&e.error(`warning: --yes has no effect for eve extension init.`);let{runExtensionInitCommand:a}=await import(`#cli/commands/extension-init.js`);await a(e,n.root,t,void 0,e=>{r.trackSetupStep({flow:`extension_init`,step:e})})}),s.command(`build`).description(`Build the current package as an eve extension.`).action(async()=>{let{loadDevelopmentEnvironmentFiles:t}=await import(`#cli/dev/environment.js`);await t(n.root);let{runExtensionBuildCommand:r}=await import(`#cli/commands/extension-build.js`);await r(e,n.root)}),registerRegistryCommands({program:a,logger:e,applicationContext:n}),a.command(`init [target]`).description(`Create a new eve agent, or add one to an existing project directory.`).option(`--channel-web-nextjs`,`Add the Web Chat application (Next.js)`).option(`--agents <names>`,`Create an agents/ workspace with comma-separated agent names`,parseAgentNamesOption).option(`--model <model>`,`Set the agent model (provider/model-id)`).option(`-n, --non-interactive`,`Scaffold the agent without starting development`).option(`--reasoning <effort>`,`Set reasoning (provider-default|none|minimal|low|medium|high|xhigh)`,parseReasoningOption).option(`-y, --yes`,`Accepted for compatibility; has no effect`).action(async(t,i)=>{i.yes&&e.error(`warning: --yes has no effect for eve init.`);let{runInitCommand:a}=await import(`#cli/commands/init.js`);await a(e,n.root,t,{agents:i.agents,channelWebNextjs:i.channelWebNextjs,model:i.model,reasoning:i.reasoning,nonInteractive:i.nonInteractive},void 0,e=>{r.trackSetupStep({flow:`init`,step:e})},(e,t,n)=>{r.trackSetupTerminal({flow:`init`,step:e,result:t,failureCode:n})})});let c=a.command(`set`).description(`Change root agent model settings.`);agentCommand(c.command(`model [model]`),n).description(`Set the agent model and reasoning effort.`).option(`--reasoning <effort>`,`Set reasoning (provider-default|none|minimal|low|medium|high|xhigh)`,parseReasoningOption).action(async(t,r)=>{let{runSetCommand:i}=await import(`#cli/commands/set.js`);await i(e,n.root,{model:t,reasoning:r.reasoning})}),registerProjectCommands({program:a,logger:e,applicationContext:n}),registerBuildCommand({applicationContext:n,buildHost:t.buildHost,logger:e,program:a}),agentCommand(a.command(`start`),n).description(`Start a built eve application.`).option(`--host <host>`,`Host interface to bind`).option(`--port <port>`,`Port to listen on (defaults to $PORT, then 3000)`,parsePortOption).action(async r=>{let{loadDevelopmentEnvironmentFiles:i}=await import(`#cli/dev/environment.js`);await i(n.root);let a=await(t.startProductionHost??await loadStartProductionHost())(n.root,{host:r.host,port:r.port});e.log(renderCliTaggedLine(o,{message:`server listening at ${a.url}`,tag:`start`,tone:`success`})),await waitForShutdownSignal({close:()=>a.close(),wait:()=>a.wait()})});let l=a.command(`remote`).description(`Connect to an existing eve agent.`);registerRemoteCommands({applicationContext:n,logger:e,program:l,runtime:t,telemetry:r}),registerRuntimeInvokeCommand({applicationContext:n,logger:e,program:l,runtime:t}),registerAcpCommand({applicationContext:n,eveVersion:i,program:a,resolveVerifiedRemoteDevelopmentClient:t.resolveVerifiedRemoteDevelopmentClient,runAcpServer:t.runAcpServer,startHost:t.startHost}),registerDevelopmentCommand({applicationContext:n,logger:e,program:a,runtime:t,telemetry:r});let u=a.command(`logs`).description("Inspect local `eve dev` diagnostic logs (.eve/logs).");agentCommand(u.command(`show [logid]`,{isDefault:!0}),n).description(`Print a diagnostic log (the most recent when logid is omitted).`).option(`--dump`,`Prepend the log's environment dump (.dump sibling)`).option(`--events`,`Interleave session events from the local workflow store`).action(async(t,r)=>{let{runLogsShowCommand:i}=await import(`#cli/commands/logs.js`);await i(e,n.root,t,r)}),agentCommand(u.command(`list`).alias(`ls`),n).description(`List diagnostic logs, most recent first.`).option(`--json`,`Output as JSON`).action(async t=>{let{runLogsListCommand:r}=await import(`#cli/commands/logs.js`);await r(e,n.root,t)});let d=a.command(`traces`).usage(`[options] [trace]
|
|
2
|
+
eve traces list [options]`).description("Inspect local `eve dev` traces.");return agentCommand(d.command(`show [trace]`,{isDefault:!0}),n).description(`Show a local trace (the most recent when trace is omitted).`).option(`--verbose`,`Expand every span with all attributes and events`).option(`--json`,`Output as JSON`).action(async(t,r)=>{let{runTraceShowCommand:i}=await import(`#cli/commands/trace.js`);await i(e,n.root,t,r)}),agentCommand(d.command(`list`).alias(`ls`),n).description(`List local traces, most recent first.`).option(`--json`,`Output as JSON`).action(async t=>{let{runTraceListCommand:r}=await import(`#cli/commands/trace.js`);await r(e,n.root,t)}),agentCommand(a.command(`info`),n).description(`Print resolved application information.`).option(`--json`,`Output as JSON`).action(async r=>{await(t.printApplicationInfo??await loadPrintApplicationInfo())(e,n.root,r)}),agentCommand(a.command(`eval`),n,e=>e.opts().url===void 0).description(`Run evals against an eve agent.`).argument(`[evalIds...]`,`Eval ids (or directory prefixes) to run (all discovered evals when omitted)`).option(`--url <url>`,`Remote agent URL (skip local host startup)`,parseDevelopmentServerUrl).option(`--tag <tag...>`,`Run only evals carrying a tag`).option(`--exclude-tag <tag...>`,`Skip evals carrying a tag`).option(`--strict`,`Fail the exit code when any score falls below its threshold`).option(`--list`,`Print discovered evals without running them`).option(`--timeout <ms>`,`Per-eval timeout in milliseconds`).option(`--max-concurrency <n>`,`Max concurrent eval executions`).option(`--json`,`Output results as JSON`).option(`--junit <path>`,`Write JUnit XML results to a file`).option(`--skip-report`,`Skip eval-defined reporters (e.g. Braintrust)`).option(`--verbose`,`Stream per-eval logs and workflow run IDs to stdout`).action(async(r,i)=>{await(t.runEvalCommand??await loadRunEvalCommand())(r,i,e,n.root)}),a}async function runCli(e=process.argv.slice(2),t=console,n={}){let r={root:resolveApplicationRoot(),async resolve(){let e=await(n.resolveApplicationProject??resolveCliApplicationProject)(r.root);r.project=e,r.root=e.appRoot},async resolveAgent(){return resolveEveProjectContext(r.root)}},i=createEveCliTelemetry(resolveInstalledPackageInfo().version),a=createCliProgram(t,n,r,i),o=e;if(o.length===0){let e=await(n.findApplicationRoot??findCliApplicationRoot)(r.root);e===void 0?o=(await findEveProjectContext(r.root))?.kind===`workspace`?[`dev`]:[`init`]:(r.root=e,o=[`dev`])}let s=canonicalCommand(o);i.trackCommand(s),s!==`telemetry`&&await i.notify(t);try{await a.parseAsync(o,{from:`user`}),i.trackOutcome(`success`)}catch(e){if(e instanceof CommanderError&&e.exitCode===0){i.trackOutcome(`success`);return}if(i.trackOutcome(e instanceof CommanderError?`usage_error`:`error`),e instanceof CommanderError){let r=await(n.isCodingAgentLaunch??isCodingAgentLaunch)();if(o[0]===`init`&&r){let{initAgentInstructions:e}=await import(`#cli/commands/agent-instructions.js`);t.log(e())}throw Error(e.message)}throw e}finally{await i.flush()}}export{createCliProgram,resolveDevUiMode,resolveTuiDisplayOptions,runCli};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{randomUUID}from"node:crypto";import{spawn}from"node:child_process";import{markEveTelemetryNotified,readEveTelemetryPreference,readOrCreateEveTelemetryIdentity}from"#cli/telemetry/preference.js";import os from"node:os";import{createEveTelemetryIdentity,isEphemeralEveTelemetryEnvironment,resolveEveTelemetryProjectId}from"#cli/telemetry/identity.js";async function isEnabled(){return process.env.NODE_ENV!==`test`&&!process.env.EVE_TELEMETRY_DISABLED&&(await readEveTelemetryPreference()).enabled}function event(e,t){return{id:randomUUID(),event_time:Date.now(),key:e,value:t}}function setupFailureCode(e){switch(e){case`resolve_target`:return`target_resolution`;case`scaffold`:return`scaffolding`;case`install_dependencies`:case`registry_install`:return`dependency_installation`;case`initialize_git`:return`git_initialization`;case`handoff`:return`handoff`;case`connection_ready`:case`first_response`:case`model_provider`:case`model_settings`:case`registry_channels`:case`registry_integrations`:case`registry_review`:return`onboarding`}}const CLI_TELEMETRY_COMMANDS=new Map([[`acp`,`acp`],[`add`,`add`],[`build`,`build`],[`
|
|
1
|
+
import{randomUUID}from"node:crypto";import{spawn}from"node:child_process";import{markEveTelemetryNotified,readEveTelemetryPreference,readOrCreateEveTelemetryIdentity}from"#cli/telemetry/preference.js";import os from"node:os";import{createEveTelemetryIdentity,isEphemeralEveTelemetryEnvironment,resolveEveTelemetryProjectId}from"#cli/telemetry/identity.js";async function isEnabled(){return process.env.NODE_ENV!==`test`&&!process.env.EVE_TELEMETRY_DISABLED&&(await readEveTelemetryPreference()).enabled}function event(e,t){return{id:randomUUID(),event_time:Date.now(),key:e,value:t}}function setupFailureCode(e){switch(e){case`resolve_target`:return`target_resolution`;case`scaffold`:return`scaffolding`;case`install_dependencies`:case`registry_install`:return`dependency_installation`;case`initialize_git`:return`git_initialization`;case`handoff`:return`handoff`;case`connection_ready`:case`first_response`:case`model_provider`:case`model_settings`:case`registry_channels`:case`registry_integrations`:case`registry_review`:return`onboarding`}}const CLI_TELEMETRY_COMMANDS=new Map([[`acp`,`acp`],[`add`,`add`],[`build`,`build`],[`deploy`,`deploy`],[`dev`,`dev`],[`eval`,`eval`],[`extension`,`extension`],[`extension:build`,`extension:build`],[`extension:init`,`extension:init`],[`info`,`info`],[`init`,`init`],[`integration`,`integration`],[`integration:connect`,`integration:connect`],[`integration:setup`,`integration:setup`],[`remote`,`remote`],[`remote:connect`,`remote:connect`],[`remote:info`,`remote:info`],[`remote:invoke`,`remote:invoke`],[`link`,`link`],[`logs`,`logs:show`],[`logs:list`,`logs:list`],[`logs:show`,`logs:show`],[`registry`,`registry`],[`registry:add`,`registry:add`],[`registry:list`,`registry:list`],[`registry:search`,`registry:search`],[`registry:view`,`registry:view`],[`set`,`set`],[`set:model`,`set:model`],[`start`,`start`],[`telemetry`,`telemetry`],[`telemetry:disable`,`telemetry:disable`],[`telemetry:enable`,`telemetry:enable`],[`telemetry:status`,`telemetry:status`],[`traces`,`traces`],[`traces:list`,`traces:list`],[`traces:show`,`traces:show`]]),cliTelemetryCommandPaths=new Set(CLI_TELEMETRY_COMMANDS.keys()),internalCliCommandPaths=new Set([`telemetry:flush`]);function canonicalCommand(e){let t=e[0];if(t===`--help`||t===`-h`)return`help`;if(t===`--version`||t===`-V`)return`version`;let n=e.findIndex(e=>!e.startsWith(`-`)),r=e[n];if(r===void 0||/^https?:\/\//.test(r))return`dev`;let i=e.slice(n+1).find(e=>!e.startsWith(`-`));if(i!==void 0){let e=i===`ls`?`list`:i,t=CLI_TELEMETRY_COMMANDS.get(`${r}:${e}`);if(t!==void 0)return t}return r===`logs`||r===`traces`?`${r}:show`:CLI_TELEMETRY_COMMANDS.get(r)??`unknown`}function createEveCliTelemetry(e){let t=[event(`version`,e),event(`platform`,os.platform()),event(`arch`,os.arch()),event(`stdin_is_tty`,process.stdin.isTTY?`true`:`false`)],n=randomUUID(),r=[],i,a=!1;return{trackCommand(e){t.push(event(`command`,e))},trackDevContext(e){t.push(event(`target`,e.target),event(`ui`,e.ui))},trackSetupStep(e){i={flow:e.flow,step:e.step},r.push(event(`setup_flow`,e.flow),event(`setup_step`,e.step)),e.registrySelectedCount!==void 0&&r.push(event(`registry_selected_count`,String(e.registrySelectedCount)))},trackSetupTerminal(e){a=!0,r.push(event(`setup_flow`,e.flow),event(`setup_terminal_step`,e.step),event(`setup_terminal_result`,e.result)),e.result===`error`&&r.push(event(`setup_failure_code`,e.failureCode??setupFailureCode(e.step)))},trackOutcome(e){i!==void 0&&!a&&this.trackSetupTerminal({...i,result:e===`success`?`completed`:`error`}),t.push(event(`outcome`,e))},async notify(e){let t=await readEveTelemetryPreference();if(process.env.NODE_ENV!==`test`&&!process.env.EVE_TELEMETRY_DISABLED&&t.enabled&&!t.notified&&process.stderr.isTTY){e.error(`Attention: eve collects CLI telemetry to improve the command-line interface.
|
|
2
2
|
Disable it with \`eve telemetry disable\`, or for one command set EVE_TELEMETRY_DISABLED=1.
|
|
3
3
|
Learn more: https://eve.dev/docs/reference/telemetry`);try{await markEveTelemetryNotified()}catch{}}},async flush(){if(await isEnabled()&&t.length!==0){try{let e=isEphemeralEveTelemetryEnvironment(),n=e?createEveTelemetryIdentity():await readOrCreateEveTelemetryIdentity();t.push(event(`identity_kind`,e?`ephemeral`:`persistent`),event(`installation_id`,n.installationId),event(`project_id`,await resolveEveTelemetryProjectId({identity:n}))),t.push(...r)}catch{return}if(process.env.EVE_TELEMETRY_DEBUG){process.stderr.write(`[eve telemetry] ${JSON.stringify(t)}\n`);return}try{let e=spawn(process.execPath,[process.argv[1]??``,`telemetry`,`flush`,JSON.stringify({events:t,sessionId:n})],{detached:!0,env:{...process.env,EVE_TELEMETRY_DISABLED:`1`},stdio:`ignore`,windowsHide:!0});e.on(`error`,()=>{}),e.unref()}catch{}}}}}export{canonicalCommand,cliTelemetryCommandPaths,createEveCliTelemetry,internalCliCommandPaths};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createAuthorizationCompletedPart,createAuthorizationRequiredPart}from"#client/authorization-message-parts.js";import{approvedApproval,createToolMetadata,mergeToolMetadata,normalizeActionRequest,normalizeActionResult,stringifyUnknown,toMessageInputRequest}from"#client/message-action-parts.js";import{optimisticUserMessageId,partKey,projectReceivedParts,removeStreamingToolPartsForTurn,upsertMessage}from"#client/message-reducer-primitives.js";import{messageRun}from"#client/message-run-parts.js";function receivedMessageEventId(e){return e.meta.id??`${e.data.turnId}:${e.data.sequence}`}function defaultMessageReducer(){return{initial(){return{messages:[]}},reduce(e,t){return reduceMessageData(e,t)}}}function reduceMessageData(e,t){switch(t.type){case`client.message.submitted`:return upsertMessage(e,{id:optimisticUserMessageId(t.data.submissionId),metadata:{optimistic:!0,status:`submitted`},parts:[{type:`text`,text:t.data.message}],role:`user`});case`client.message.failed`:return upsertMessage(e,{id:optimisticUserMessageId(t.data.submissionId),metadata:{optimistic:!0,status:`failed`},parts:[{type:`text`,text:t.data.message}],role:`user`});case`client.input.responded`:{let n=e;for(let e of t.data.responses)n=respondToInputRequest(n,e);return n}case`input.resolved`:{let n=e;for(let e of t.data.resolutions)n=resolveInputRequest(n,e);return n}case`message.received`:return t.data.kind===`execution.background_task`?e:upsertMessage(e,{id:`${receivedMessageEventId(t)}:user`,metadata:{status:`complete`,turnId:t.data.turnId},parts:projectReceivedParts(t.data.parts,t.data.message),role:`user`});case`step.started`:return updateAssistantMessage(e,t.data.turnId,e=>ensureStepStartPart(e,t.data.stepIndex));case`reasoning.appended`:return updateAssistantMessage(e,t.data.turnId,e=>messageRun.append(ensureStepStartPart(e,t.data.stepIndex),{delta:t.data.reasoningDelta,stepIndex:t.data.stepIndex,type:`reasoning`}));case`reasoning.completed`:return updateAssistantMessage(e,t.data.turnId,e=>messageRun.upsert(ensureStepStartPart(e,t.data.stepIndex),{state:`done`,stepIndex:t.data.stepIndex,text:t.data.reasoning,type:`reasoning`}));case`action.input.appended`:{let n=findToolPart(e,t.data.callId);if(n!==void 0&&n.state!==`input-streaming`)return e;let r={input:void 0,inputText:(n?.state===`input-streaming`?n.inputText:``)+t.data.inputTextDelta,state:`input-streaming`,stepIndex:t.data.stepIndex,toolCallId:t.data.callId,toolMetadata:n?.toolMetadata??{eve:{kind:`unknown`,name:t.data.toolName}},toolName:t.data.toolName,type:`dynamic-tool`};return n===void 0?updateAssistantMessage(e,t.data.turnId,e=>upsertPart(ensureStepStartPart(e,t.data.stepIndex),r)):updateToolPart(e,t.data.callId,r)}case`actions.requested`:{let n=e;for(let e of t.data.actions){let r=normalizeActionRequest(e);n=updateAssistantMessage(n,t.data.turnId,n=>upsertPart(ensureStepStartPart(n,t.data.stepIndex),{input:`input`in e?e.input:void 0,state:`input-available`,stepIndex:t.data.stepIndex,toolCallId:e.callId,toolMetadata:createToolMetadata(r),toolName:r.toolName,type:`dynamic-tool`}))}return n}case`input.requested`:{let n=e;for(let e of t.data.requests){let r=normalizeActionRequest(e.action);n=updateAssistantMessage(n,t.data.turnId,n=>upsertPart(ensureStepStartPart(n,t.data.stepIndex),{approval:{id:e.requestId},input:e.action.input,state:`approval-requested`,stepIndex:t.data.stepIndex,toolCallId:e.action.callId,toolMetadata:createToolMetadata(r,{inputRequest:toMessageInputRequest(e)}),toolName:r.toolName,type:`dynamic-tool`}))}return n}case`approval.candidate`:return e;case`approval.settled`:{let n=findToolPartByApprovalId(e,t.data.requestId);return n===void 0?e:t.data.outcome===`approved`?updateToolPart(e,n.toolCallId,{approval:{approved:!0,id:t.data.requestId,reason:void 0},input:n.input,state:`approval-responded`,stepIndex:n.stepIndex,toolCallId:n.toolCallId,toolMetadata:n.toolMetadata,toolName:n.toolName,type:`dynamic-tool`}):updateToolPart(e,n.toolCallId,{approval:{approved:!1,id:t.data.requestId,reason:`Tool execution was cancelled.`},input:n.input,state:`output-denied`,stepIndex:n.stepIndex,toolCallId:n.toolCallId,toolMetadata:n.toolMetadata,toolName:n.toolName,type:`dynamic-tool`})}case`action.result`:{let n=normalizeActionResult(t.data.result),r=findToolPart(e,t.data.result.callId),i=t.data.error?.code===`TOOL_EXECUTION_DENIED`,a=t.data.status===`failed`&&!i,o=r?.approval?.id??t.data.result.callId,s=mergeToolMetadata(r?.toolMetadata,createToolMetadata(n)),c={input:r?.input,stepIndex:t.data.stepIndex,toolCallId:t.data.result.callId,toolMetadata:s,toolName:r?.toolName??n.toolName,type:`dynamic-tool`},l;return l=i?{...c,approval:{approved:!1,id:o,reason:t.data.error?.message},state:`output-denied`}:a?{...c,approval:approvedApproval(r),errorText:t.data.error?.message??stringifyUnknown(t.data.result.output),state:`output-error`}:{...c,approval:approvedApproval(r),output:t.data.result.output,state:`output-available`},r===void 0?updateAssistantMessage(e,t.data.turnId,e=>upsertPart(ensureStepStartPart(e,t.data.stepIndex),l)):updateToolPart(e,t.data.result.callId,l)}case`action.partial`:{let n=findToolPart(e,t.data.result.callId);if(n!==void 0&&isSettledToolPart(n))return e;let r=normalizeActionResult(t.data.result),i={approval:approvedApproval(n),input:n?.input,output:t.data.result.output,partial:!0,state:`output-available`,stepIndex:t.data.stepIndex,toolCallId:t.data.result.callId,toolMetadata:mergeToolMetadata(n?.toolMetadata,createToolMetadata(r)),toolName:n?.toolName??r.toolName,type:`dynamic-tool`};return n===void 0?updateAssistantMessage(e,t.data.turnId,e=>upsertPart(ensureStepStartPart(e,t.data.stepIndex),i)):updateToolPart(e,t.data.result.callId,i)}case`authorization.required`:return updateAssistantMessage(e,t.data.turnId,e=>upsertPart(ensureStepStartPart(e,t.data.stepIndex),createAuthorizationRequiredPart(t)));case`authorization.completed`:return completeAuthorization(e,t);case`message.appended`:return updateAssistantMessage(e,t.data.turnId,e=>messageRun.append(ensureStepStartPart(e,t.data.stepIndex),{delta:t.data.messageDelta,stepIndex:t.data.stepIndex,type:`text`}));case`message.completed`:return updateAssistantMessage(e,t.data.turnId,e=>t.data.message===null?removeTextPart(e,t.data.stepIndex):messageRun.upsert(ensureStepStartPart(e,t.data.stepIndex),{state:`done`,stepIndex:t.data.stepIndex,text:t.data.message,type:`text`}));case`result.completed`:return updateAssistantMetadata(e,t.data.turnId,{result:t.data.result});case`turn.completed`:return updateAssistantMessage(e,t.data.turnId,e=>({...e,metadata:{...e.metadata,status:`complete`},parts:removeStreamingToolParts(e.parts)}));case`turn.cancelled`:return updateAssistantMessage(e,t.data.turnId,e=>({...e,metadata:{...e.metadata,status:`complete`},parts:removeStreamingToolParts(e.parts.map(e=>(e.type===`text`||e.type===`reasoning`)&&e.state===`streaming`?{...e,state:`done`}:e))}));case`turn.failed`:return removeStreamingToolPartsForTurn(e,t.data.turnId);case`session.failed`:return e;default:return e}}function removeStreamingToolParts(e){return e.filter(e=>e.type!==`dynamic-tool`||e.state!==`input-streaming`)}function respondToInputRequest(e,t){let n=findToolPartByApprovalId(e,t.requestId);if(!n)return e;let r={id:t.requestId};return t.text!==void 0&&(r.reason=t.text),updateToolPart(e,n.toolCallId,{approval:r,input:n.input,state:`approval-responded`,stepIndex:n.stepIndex,toolCallId:n.toolCallId,toolMetadata:mergeToolMetadata(n.toolMetadata,{eve:{inputResponse:t,kind:n.toolMetadata?.eve?.kind??`unknown`,name:n.toolMetadata?.eve?.name??n.toolName}}),toolName:n.toolName,type:`dynamic-tool`})}function resolveInputRequest(e,t){if(t.response!==void 0)return respondToInputRequest(e,t.response);let n=findToolPartByApprovalId(e,t.requestId);return n?updateToolPart(e,n.toolCallId,{input:n.input,output:{status:t.outcome},state:`output-available`,stepIndex:n.stepIndex,toolCallId:n.toolCallId,toolMetadata:n.toolMetadata,toolName:n.toolName,type:`dynamic-tool`}):e}function updateAssistantMessage(e,t,n){let r=e.messages.find(e=>e.role===`assistant`&&e.metadata?.turnId===t)??createAssistantMessage(t);return upsertMessage(e,n(r))}function updateAssistantMetadata(e,t,n){return updateAssistantMessage(e,t,e=>({...e,metadata:{...e.metadata,...n}}))}function createAssistantMessage(e){return{id:`${e}:assistant`,metadata:{status:`streaming`,turnId:e},parts:[],role:`assistant`}}function ensureStepStartPart(e,t){let n=e.parts.filter(e=>e.type===`step-start`).length;if(n>t)return e;let r=t-n+1;return{...e,parts:[...e.parts,...Array.from({length:r},()=>({type:`step-start`}))]}}function upsertPart(e,t){let n=e.parts.findIndex(e=>partKey(e)===partKey(t)),r=n===-1?[...e.parts,t]:[...e.parts.slice(0,n),t,...e.parts.slice(n+1)];return{...e,metadata:{...e.metadata,status:t.type===`text`&&t.state===`done`?`complete`:`streaming`},parts:r}}function removeTextPart(e,t){let n=e.parts.filter(e=>e.type!==`text`||e.stepIndex!==t);return n.length===e.parts.length?e:{...e,metadata:{...e.metadata,status:`complete`},parts:n}}function updateToolPart(e,t,n){let r=e.messages.find(e=>e.role===`assistant`&&e.parts.some(e=>e.type===`dynamic-tool`&&e.toolCallId===t));return r?upsertMessage(e,upsertPart(r,n)):e}function completeAuthorization(e,t){let n=findLatestPendingAuthorizationPart(e,t.data.name),r=createAuthorizationCompletedPart(t,n);return n===void 0?updateAssistantMessage(e,t.data.turnId,e=>upsertPart(ensureStepStartPart(e,t.data.stepIndex),r)):updateAuthorizationPart(e,n,r)}function updateAuthorizationPart(e,t,n){let r=e.messages.find(e=>e.role===`assistant`&&e.parts.some(e=>e===t));return r?upsertMessage(e,upsertPart(r,n)):e}function findToolPart(e,t){for(let n of e.messages)for(let e of n.parts)if(e.type===`dynamic-tool`&&e.toolCallId===t)return e}function isSettledToolPart(e){return e.state===`output-denied`||e.state===`output-error`||e.state===`output-available`&&e.partial!==!0}function findLatestPendingAuthorizationPart(e,t){for(let n=e.messages.length-1;n>=0;--n){let r=e.messages[n];if(r?.role===`assistant`)for(let e=r.parts.length-1;e>=0;--e){let n=r.parts[e];if(n?.type===`authorization`&&n.state===`required`&&n.name===t)return n}}}function findToolPartByApprovalId(e,t){for(let n of e.messages)for(let e of n.parts)if(e.type===`dynamic-tool`&&e.approval?.id===t)return e}export{defaultMessageReducer};
|
|
1
|
+
import{createAuthorizationCompletedPart,createAuthorizationRequiredPart}from"#client/authorization-message-parts.js";import{approvedApproval,createToolMetadata,mergeToolMetadata,normalizeActionRequest,normalizeActionResult,stringifyUnknown,toMessageInputRequest}from"#client/message-action-parts.js";import{optimisticUserMessageId,partKey,projectReceivedParts,removeStreamingToolPartsForTurn,upsertMessage}from"#client/message-reducer-primitives.js";import{messageRun}from"#client/message-run-parts.js";function receivedMessageEventId(e){return e.meta.id??`${e.data.turnId}:${e.data.sequence}`}function defaultMessageReducer(){return{initial(){return{messages:[]}},reduce(e,t){return reduceMessageData(e,t)}}}function reduceMessageData(e,t){switch(t.type){case`client.message.submitted`:return upsertMessage(e,{id:optimisticUserMessageId(t.data.submissionId),metadata:{optimistic:!0,status:`submitted`},parts:[{type:`text`,text:t.data.message}],role:`user`});case`client.message.failed`:return upsertMessage(e,{id:optimisticUserMessageId(t.data.submissionId),metadata:{optimistic:!0,status:`failed`},parts:[{type:`text`,text:t.data.message}],role:`user`});case`input.resolved`:{let n=e;for(let e of t.data.resolutions)n=resolveInputRequest(n,e);return n}case`message.received`:return t.data.kind===`execution.background_task`?e:upsertMessage(e,{id:`${receivedMessageEventId(t)}:user`,metadata:{status:`complete`,turnId:t.data.turnId},parts:projectReceivedParts(t.data.parts,t.data.message),role:`user`});case`step.started`:return updateAssistantMessage(e,t.data.turnId,e=>ensureStepStartPart(e,t.data.stepIndex));case`reasoning.appended`:return updateAssistantMessage(e,t.data.turnId,e=>messageRun.append(ensureStepStartPart(e,t.data.stepIndex),{delta:t.data.reasoningDelta,stepIndex:t.data.stepIndex,type:`reasoning`}));case`reasoning.completed`:return updateAssistantMessage(e,t.data.turnId,e=>messageRun.upsert(ensureStepStartPart(e,t.data.stepIndex),{state:`done`,stepIndex:t.data.stepIndex,text:t.data.reasoning,type:`reasoning`}));case`action.input.appended`:{let n=findToolPart(e,t.data.callId);if(n!==void 0&&n.state!==`input-streaming`)return e;let r={input:void 0,inputText:(n?.state===`input-streaming`?n.inputText:``)+t.data.inputTextDelta,state:`input-streaming`,stepIndex:t.data.stepIndex,toolCallId:t.data.callId,toolMetadata:n?.toolMetadata??{eve:{kind:`unknown`,name:t.data.toolName}},toolName:t.data.toolName,type:`dynamic-tool`};return n===void 0?updateAssistantMessage(e,t.data.turnId,e=>upsertPart(ensureStepStartPart(e,t.data.stepIndex),r)):updateToolPart(e,t.data.callId,r)}case`actions.requested`:{let n=e;for(let e of t.data.actions){let r=normalizeActionRequest(e);n=updateAssistantMessage(n,t.data.turnId,n=>upsertPart(ensureStepStartPart(n,t.data.stepIndex),{input:`input`in e?e.input:void 0,state:`input-available`,stepIndex:t.data.stepIndex,toolCallId:e.callId,toolMetadata:createToolMetadata(r),toolName:r.toolName,type:`dynamic-tool`}))}return n}case`input.requested`:{let n=e;for(let e of t.data.requests){let r=normalizeActionRequest(e.action);n=updateAssistantMessage(n,t.data.turnId,n=>upsertPart(ensureStepStartPart(n,t.data.stepIndex),{approval:{id:e.requestId},input:e.action.input,state:`approval-requested`,stepIndex:t.data.stepIndex,toolCallId:e.action.callId,toolMetadata:createToolMetadata(r,{inputRequest:toMessageInputRequest(e)}),toolName:r.toolName,type:`dynamic-tool`}))}return n}case`approval.candidate`:return e;case`approval.settled`:{let n=findToolPartByApprovalId(e,t.data.requestId);return n===void 0?e:t.data.outcome===`approved`?updateToolPart(e,n.toolCallId,{approval:{approved:!0,id:t.data.requestId,reason:void 0},input:n.input,state:`approval-responded`,stepIndex:n.stepIndex,toolCallId:n.toolCallId,toolMetadata:n.toolMetadata,toolName:n.toolName,type:`dynamic-tool`}):updateToolPart(e,n.toolCallId,{approval:{approved:!1,id:t.data.requestId,reason:`Tool execution was cancelled.`},input:n.input,state:`output-denied`,stepIndex:n.stepIndex,toolCallId:n.toolCallId,toolMetadata:n.toolMetadata,toolName:n.toolName,type:`dynamic-tool`})}case`action.result`:{let n=normalizeActionResult(t.data.result),r=findToolPart(e,t.data.result.callId),i=t.data.error?.code===`TOOL_EXECUTION_DENIED`,a=t.data.status===`failed`&&!i,o=r?.approval?.id??t.data.result.callId,s=mergeToolMetadata(r?.toolMetadata,createToolMetadata(n)),c={input:r?.input,stepIndex:t.data.stepIndex,toolCallId:t.data.result.callId,toolMetadata:s,toolName:r?.toolName??n.toolName,type:`dynamic-tool`},l;return l=i?{...c,approval:{approved:!1,id:o,reason:t.data.error?.message},state:`output-denied`}:a?{...c,approval:approvedApproval(r),errorText:t.data.error?.message??stringifyUnknown(t.data.result.output),state:`output-error`}:{...c,approval:approvedApproval(r),output:t.data.result.output,state:`output-available`},r===void 0?updateAssistantMessage(e,t.data.turnId,e=>upsertPart(ensureStepStartPart(e,t.data.stepIndex),l)):updateToolPart(e,t.data.result.callId,l)}case`action.partial`:{let n=findToolPart(e,t.data.result.callId);if(n!==void 0&&isSettledToolPart(n))return e;let r=normalizeActionResult(t.data.result),i={approval:approvedApproval(n),input:n?.input,output:t.data.result.output,partial:!0,state:`output-available`,stepIndex:t.data.stepIndex,toolCallId:t.data.result.callId,toolMetadata:mergeToolMetadata(n?.toolMetadata,createToolMetadata(r)),toolName:n?.toolName??r.toolName,type:`dynamic-tool`};return n===void 0?updateAssistantMessage(e,t.data.turnId,e=>upsertPart(ensureStepStartPart(e,t.data.stepIndex),i)):updateToolPart(e,t.data.result.callId,i)}case`authorization.required`:return updateAssistantMessage(e,t.data.turnId,e=>upsertPart(ensureStepStartPart(e,t.data.stepIndex),createAuthorizationRequiredPart(t)));case`authorization.completed`:return completeAuthorization(e,t);case`message.appended`:return updateAssistantMessage(e,t.data.turnId,e=>messageRun.append(ensureStepStartPart(e,t.data.stepIndex),{delta:t.data.messageDelta,stepIndex:t.data.stepIndex,type:`text`}));case`message.completed`:return updateAssistantMessage(e,t.data.turnId,e=>t.data.message===null?removeTextPart(e,t.data.stepIndex):messageRun.upsert(ensureStepStartPart(e,t.data.stepIndex),{state:`done`,stepIndex:t.data.stepIndex,text:t.data.message,type:`text`}));case`result.completed`:return updateAssistantMetadata(e,t.data.turnId,{result:t.data.result});case`turn.completed`:return updateAssistantMessage(e,t.data.turnId,e=>({...e,metadata:{...e.metadata,status:`complete`},parts:removeStreamingToolParts(e.parts)}));case`turn.cancelled`:return updateAssistantMessage(e,t.data.turnId,e=>({...e,metadata:{...e.metadata,status:`complete`},parts:removeStreamingToolParts(e.parts.map(e=>(e.type===`text`||e.type===`reasoning`)&&e.state===`streaming`?{...e,state:`done`}:e))}));case`turn.failed`:return removeStreamingToolPartsForTurn(e,t.data.turnId);case`session.failed`:return e;default:return e}}function removeStreamingToolParts(e){return e.filter(e=>e.type!==`dynamic-tool`||e.state!==`input-streaming`)}function respondToInputRequest(e,t){let n=findToolPartByApprovalId(e,t.requestId);if(!n)return e;let r={id:t.requestId};return t.text!==void 0&&(r.reason=t.text),updateToolPart(e,n.toolCallId,{approval:r,input:n.input,state:`approval-responded`,stepIndex:n.stepIndex,toolCallId:n.toolCallId,toolMetadata:mergeToolMetadata(n.toolMetadata,{eve:{inputResponse:t,kind:n.toolMetadata?.eve?.kind??`unknown`,name:n.toolMetadata?.eve?.name??n.toolName}}),toolName:n.toolName,type:`dynamic-tool`})}function resolveInputRequest(e,t){if(t.response!==void 0)return respondToInputRequest(e,t.response);let n=findToolPartByApprovalId(e,t.requestId);return n?updateToolPart(e,n.toolCallId,{input:n.input,output:{status:t.outcome},state:`output-available`,stepIndex:n.stepIndex,toolCallId:n.toolCallId,toolMetadata:n.toolMetadata,toolName:n.toolName,type:`dynamic-tool`}):e}function updateAssistantMessage(e,t,n){let r=e.messages.find(e=>e.role===`assistant`&&e.metadata?.turnId===t)??createAssistantMessage(t);return upsertMessage(e,n(r))}function updateAssistantMetadata(e,t,n){return updateAssistantMessage(e,t,e=>({...e,metadata:{...e.metadata,...n}}))}function createAssistantMessage(e){return{id:`${e}:assistant`,metadata:{status:`streaming`,turnId:e},parts:[],role:`assistant`}}function ensureStepStartPart(e,t){let n=e.parts.filter(e=>e.type===`step-start`).length;if(n>t)return e;let r=t-n+1;return{...e,parts:[...e.parts,...Array.from({length:r},()=>({type:`step-start`}))]}}function upsertPart(e,t){let n=e.parts.findIndex(e=>partKey(e)===partKey(t)),r=n===-1?[...e.parts,t]:[...e.parts.slice(0,n),t,...e.parts.slice(n+1)];return{...e,metadata:{...e.metadata,status:t.type===`text`&&t.state===`done`?`complete`:`streaming`},parts:r}}function removeTextPart(e,t){let n=e.parts.filter(e=>e.type!==`text`||e.stepIndex!==t);return n.length===e.parts.length?e:{...e,metadata:{...e.metadata,status:`complete`},parts:n}}function updateToolPart(e,t,n){let r=e.messages.find(e=>e.role===`assistant`&&e.parts.some(e=>e.type===`dynamic-tool`&&e.toolCallId===t));return r?upsertMessage(e,upsertPart(r,n)):e}function completeAuthorization(e,t){let n=findLatestPendingAuthorizationPart(e,t.data.name),r=createAuthorizationCompletedPart(t,n);return n===void 0?updateAssistantMessage(e,t.data.turnId,e=>upsertPart(ensureStepStartPart(e,t.data.stepIndex),r)):updateAuthorizationPart(e,n,r)}function updateAuthorizationPart(e,t,n){let r=e.messages.find(e=>e.role===`assistant`&&e.parts.some(e=>e===t));return r?upsertMessage(e,upsertPart(r,n)):e}function findToolPart(e,t){for(let n of e.messages)for(let e of n.parts)if(e.type===`dynamic-tool`&&e.toolCallId===t)return e}function isSettledToolPart(e){return e.state===`output-denied`||e.state===`output-error`||e.state===`output-available`&&e.partial!==!0}function findLatestPendingAuthorizationPart(e,t){for(let n=e.messages.length-1;n>=0;--n){let r=e.messages[n];if(r?.role===`assistant`)for(let e=r.parts.length-1;e>=0;--e){let n=r.parts[e];if(n?.type===`authorization`&&n.state===`required`&&n.name===t)return n}}}function findToolPartByApprovalId(e,t){for(let n of e.messages)for(let e of n.parts)if(e.type===`dynamic-tool`&&e.approval?.id===t)return e}export{defaultMessageReducer};
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"zod": "4.5.4",
|
|
57
57
|
"zod-validation-error": "5.0.0"
|
|
58
58
|
},
|
|
59
|
-
"scriptHash": "
|
|
59
|
+
"scriptHash": "7e3ab76d59e8c04280eeabfdbd3bb4c256c023e57a5092af734b947546841a3a",
|
|
60
60
|
"toolVersions": {
|
|
61
61
|
"rolldown": "1.2.9",
|
|
62
62
|
"typescript": "7.0.2"
|
|
@@ -16,7 +16,6 @@ export interface CompileFromMemoryInput {
|
|
|
16
16
|
readonly maxTokenCostUsdPerSession?: number | false;
|
|
17
17
|
readonly sessionTimeoutMs?: number | false;
|
|
18
18
|
};
|
|
19
|
-
readonly outputSchema?: JsonObject;
|
|
20
19
|
readonly revision?: string;
|
|
21
20
|
readonly modules?: readonly ProgrammaticAgentModule[];
|
|
22
21
|
readonly tools?: readonly CompileFromMemoryToolInput[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{randomUUID}from"node:crypto";import{createProgrammaticCompiledModuleMap}from"#compiler/module-map.js";import{compileAgentManifest}from"#compiler/normalize-manifest.js";import{createAgentSourceRegistry,defineProgrammaticAgentSource}from"#compiler/source-graph.js";import{createAgentSourceManifest}from"#discover/manifest.js";import{defineAgent}from"#public/definitions/agent.js";import{defineSkill}from"#public/definitions/skill.js";import{defineTool}from"#tools/definition.js";import{frameworkAgentSourceRegistry}from"#framework/sources/registry.js";async function compileFromMemory(e){let t=e.appRoot??`/virtual/eve-memory-app`,n=e.agentRoot??`${t}/agent`,r=`memory:${e.name??`memory-agent`}`,i=defineAgent(e.agent??{limits:e.limits,model:e.model
|
|
1
|
+
import{randomUUID}from"node:crypto";import{createProgrammaticCompiledModuleMap}from"#compiler/module-map.js";import{compileAgentManifest}from"#compiler/normalize-manifest.js";import{createAgentSourceRegistry,defineProgrammaticAgentSource}from"#compiler/source-graph.js";import{createAgentSourceManifest}from"#discover/manifest.js";import{defineAgent}from"#public/definitions/agent.js";import{defineSkill}from"#public/definitions/skill.js";import{defineTool}from"#tools/definition.js";import{frameworkAgentSourceRegistry}from"#framework/sources/registry.js";async function compileFromMemory(e){let t=e.appRoot??`/virtual/eve-memory-app`,n=e.agentRoot??`${t}/agent`,r=`memory:${e.name??`memory-agent`}`,i=defineAgent(e.agent??{limits:e.limits,model:e.model}),a=[{loadNamespace:async()=>({default:i}),logicalPath:`agent.ts`},...e.modules??[],...(e.tools??[]).map(e=>({loadNamespace:async()=>({default:createMemoryToolDefinition(e)}),logicalPath:`tools/${e.name}.ts`})),...(e.skills??[]).map(e=>({loadNamespace:async()=>({default:defineSkill({description:e.description,markdown:e.markdown??`# ${e.name}\n`})}),logicalPath:`skills/${e.name}.ts`}))],o=createAgentSourceRegistry([{applyTo:`root`,source:defineProgrammaticAgentSource({id:r,modules:a,revision:e.revision??`memory-generation:${randomUUID()}`})}]),s=createAgentSourceManifest({agentId:e.name??`memory-agent`,agentRoot:n,appRoot:t}),c=await compileAgentManifest(s,{sourceRegistries:[o]});return{manifest:c,moduleMap:await createProgrammaticCompiledModuleMap(c,[frameworkAgentSourceRegistry,o])}}function createMemoryToolDefinition(e){return defineTool({label:e.label,approval:e.approval,description:e.description??`${e.name} test tool.`,execute:e.execute??(()=>{throw Error(`Memory tool "${e.name}" has no installed executor.`)}),inputSchema:e.inputSchema??{additionalProperties:!0,type:`object`},outputSchema:e.outputSchema,toModelOutput:e.toModelOutput})}export{compileFromMemory};
|
|
@@ -11,8 +11,8 @@ declare const EXTENSION_CAPABILITY_CONTRACTS: {
|
|
|
11
11
|
readonly dropped: {};
|
|
12
12
|
};
|
|
13
13
|
readonly tool: {
|
|
14
|
-
readonly current:
|
|
15
|
-
readonly supported: readonly [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 29, 30, 31, 32, 34, 35, 54, 55,
|
|
14
|
+
readonly current: 58;
|
|
15
|
+
readonly supported: readonly [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 29, 30, 31, 32, 34, 35, 54, 55, 58];
|
|
16
16
|
readonly dropped: {
|
|
17
17
|
readonly 14: "TaskExec.delegated was removed; migrate to workflow-backed background tools";
|
|
18
18
|
readonly 15: "TaskExec replaces stageEffect with send";
|
|
@@ -49,11 +49,12 @@ declare const EXTENSION_CAPABILITY_CONTRACTS: {
|
|
|
49
49
|
readonly 52: "Background defineTool and TaskExec were removed; use defineWorkflowTool for durable background work.";
|
|
50
50
|
readonly 53: "Sandbox sessions no longer expose core identity and mutable networking is provider-specific.";
|
|
51
51
|
readonly 56: "SandboxSession no longer exposes setNetworkPolicy; pass the configured environment to ctx.getSandbox(environment) to access network policy capabilities";
|
|
52
|
+
readonly 57: "agentRouter() no longer accepts a model-facing outputSchema; structured subagent output is requested only through ctx.agent().";
|
|
52
53
|
};
|
|
53
54
|
};
|
|
54
55
|
readonly dynamicTool: {
|
|
55
|
-
readonly current:
|
|
56
|
-
readonly supported: readonly [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 31, 32, 33, 52, 54];
|
|
56
|
+
readonly current: 56;
|
|
57
|
+
readonly supported: readonly [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 31, 32, 33, 52, 54, 56];
|
|
57
58
|
readonly dropped: {
|
|
58
59
|
readonly 21: "Message and reasoning append events now expose deltas instead of cumulative snapshots.";
|
|
59
60
|
readonly 23: "TaskExec.delegated was removed; migrate to workflow-backed background tools";
|
|
@@ -83,11 +84,12 @@ declare const EXTENSION_CAPABILITY_CONTRACTS: {
|
|
|
83
84
|
readonly 50: "Background dynamic tools were removed; use a static defineWorkflowTool for durable background work.";
|
|
84
85
|
readonly 51: "Sandbox sessions no longer expose core identity and mutable networking is provider-specific.";
|
|
85
86
|
readonly 53: "SandboxSession no longer exposes setNetworkPolicy; pass the configured environment to ctx.getSandbox(environment) to access network policy capabilities";
|
|
87
|
+
readonly 55: "Run mode was removed; sessions always park and ConversationContext no longer carries mode.";
|
|
86
88
|
};
|
|
87
89
|
};
|
|
88
90
|
readonly channel: {
|
|
89
|
-
readonly current:
|
|
90
|
-
readonly supported: readonly [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 29, 31];
|
|
91
|
+
readonly current: 33;
|
|
92
|
+
readonly supported: readonly [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 29, 31, 33];
|
|
91
93
|
readonly dropped: {
|
|
92
94
|
readonly 12: "Message and reasoning append events now expose deltas instead of cumulative snapshots.";
|
|
93
95
|
readonly 19: "Continuation rekey was removed; channel extensions must use additive continuation.alias instead.";
|
|
@@ -101,39 +103,42 @@ declare const EXTENSION_CAPABILITY_CONTRACTS: {
|
|
|
101
103
|
readonly 27: "Sandbox sessions no longer expose core identity and mutable networking is provider-specific.";
|
|
102
104
|
readonly 28: "Sandbox sessions no longer expose core identity and mutable networking is provider-specific.";
|
|
103
105
|
readonly 30: "SandboxSession no longer exposes setNetworkPolicy; pass the configured environment to ctx.getSandbox(environment) to access network policy capabilities";
|
|
106
|
+
readonly 32: "Run mode and caller-supplied output schemas were removed from channel operations; sessions always park, and send options, audience inputs, and ConversationContext no longer carry mode, while from().send() and from().respond() no longer accept outputSchema.";
|
|
104
107
|
};
|
|
105
108
|
};
|
|
106
109
|
readonly schedule: {
|
|
107
|
-
readonly current:
|
|
108
|
-
readonly supported: readonly [1, 2, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15];
|
|
110
|
+
readonly current: 16;
|
|
111
|
+
readonly supported: readonly [1, 2, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16];
|
|
109
112
|
readonly dropped: {
|
|
110
113
|
readonly 5: "Message and reasoning append events now expose deltas instead of cumulative snapshots.";
|
|
111
114
|
};
|
|
112
115
|
};
|
|
113
116
|
readonly subagent: {
|
|
114
|
-
readonly current:
|
|
115
|
-
readonly supported: readonly [3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 19];
|
|
117
|
+
readonly current: 21;
|
|
118
|
+
readonly supported: readonly [3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 19, 21];
|
|
116
119
|
readonly dropped: {
|
|
117
120
|
readonly 1: "Persistent subagent sessions are now the default and the experimental opt-in was removed";
|
|
118
121
|
readonly 2: "Persistent subagent sessions are now the default and the experimental opt-in was removed";
|
|
119
122
|
readonly 5: "Message and reasoning append events now expose deltas instead of cumulative snapshots.";
|
|
120
123
|
readonly 17: "Removed experimental.instrumentationProviders; instrumentation is now always enabled for root agents.";
|
|
121
124
|
readonly 18: "Removed experimental.instrumentationProviders; instrumentation is now always enabled for root agents.";
|
|
125
|
+
readonly 20: "Run mode was removed and agent definitions no longer declare outputSchema; sessions always park, ConversationContext no longer carries mode, and structured output is requested per turn.";
|
|
122
126
|
};
|
|
123
127
|
};
|
|
124
128
|
readonly connection: {
|
|
125
|
-
readonly current:
|
|
126
|
-
readonly supported: readonly [1, 2, 3, 4, 5, 6, 7, 8, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 24, 26];
|
|
129
|
+
readonly current: 28;
|
|
130
|
+
readonly supported: readonly [1, 2, 3, 4, 5, 6, 7, 8, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 24, 26, 28];
|
|
127
131
|
readonly dropped: {
|
|
128
132
|
readonly 9: "Dynamic connection resolvers no longer receive conversation or channel continuation data";
|
|
129
133
|
readonly 10: "Message and reasoning append events now expose deltas instead of cumulative snapshots.";
|
|
130
134
|
readonly 23: "Sandbox sessions no longer expose core identity and mutable networking is provider-specific.";
|
|
131
135
|
readonly 25: "SandboxSession no longer exposes setNetworkPolicy; pass the configured environment to ctx.getSandbox(environment) to access network policy capabilities";
|
|
136
|
+
readonly 27: "Run mode was removed; sessions always park and ConversationContext no longer carries mode.";
|
|
132
137
|
};
|
|
133
138
|
};
|
|
134
139
|
readonly hook: {
|
|
135
|
-
readonly current:
|
|
136
|
-
readonly supported: readonly [10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25, 27];
|
|
140
|
+
readonly current: 28;
|
|
141
|
+
readonly supported: readonly [10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25, 27, 28];
|
|
137
142
|
readonly dropped: {
|
|
138
143
|
readonly 1: "Model identity moved from session.started runtime metadata to step.started call attribution.";
|
|
139
144
|
readonly 2: "Model identity moved from session.started runtime metadata to step.started call attribution.";
|
|
@@ -155,10 +160,11 @@ declare const EXTENSION_CAPABILITY_CONTRACTS: {
|
|
|
155
160
|
readonly dropped: {};
|
|
156
161
|
};
|
|
157
162
|
readonly dynamicSkill: {
|
|
158
|
-
readonly current:
|
|
159
|
-
readonly supported: readonly [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 17, 18, 19, 20, 21];
|
|
163
|
+
readonly current: 23;
|
|
164
|
+
readonly supported: readonly [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 17, 18, 19, 20, 21, 23];
|
|
160
165
|
readonly dropped: {
|
|
161
166
|
readonly 13: "Message and reasoning append events now expose deltas instead of cumulative snapshots.";
|
|
167
|
+
readonly 22: "Run mode was removed; sessions always park and ConversationContext no longer carries mode.";
|
|
162
168
|
};
|
|
163
169
|
};
|
|
164
170
|
readonly instructions: {
|
|
@@ -167,10 +173,11 @@ declare const EXTENSION_CAPABILITY_CONTRACTS: {
|
|
|
167
173
|
readonly dropped: {};
|
|
168
174
|
};
|
|
169
175
|
readonly dynamicInstructions: {
|
|
170
|
-
readonly current:
|
|
171
|
-
readonly supported: readonly [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22];
|
|
176
|
+
readonly current: 24;
|
|
177
|
+
readonly supported: readonly [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 24];
|
|
172
178
|
readonly dropped: {
|
|
173
179
|
readonly 14: "Message and reasoning append events now expose deltas instead of cumulative snapshots.";
|
|
180
|
+
readonly 23: "Run mode was removed; sessions always park and ConversationContext no longer carries mode.";
|
|
174
181
|
};
|
|
175
182
|
};
|
|
176
183
|
readonly config: {
|