eve 0.31.3 → 0.33.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 +36 -1
- package/README.md +8 -4
- package/dist/src/channel/channel-address.d.ts +4 -1
- package/dist/src/channel/channel-address.js +1 -1
- package/dist/src/channel/channel-operations.d.ts +3 -1
- package/dist/src/channel/compiled-channel.d.ts +2 -1
- package/dist/src/channel/cross-channel-receive.d.ts +5 -2
- package/dist/src/channel/cross-channel-receive.js +1 -1
- package/dist/src/channel/session.d.ts +6 -2
- package/dist/src/channel/session.js +1 -1
- package/dist/src/channel/types.d.ts +6 -0
- package/dist/src/channel/types.js +1 -1
- package/dist/src/chunks/{use-eve-agent-CF5D6jSV.js → use-eve-agent-3oBnxzhV.js} +57 -22
- package/dist/src/chunks/{use-eve-agent-DbYZLG0h.js → use-eve-agent-B-Hky2f4.js} +57 -22
- package/dist/src/cli/commands/agent-prompt/collect-intent.md +3 -0
- package/dist/src/cli/commands/agent-prompt/scaffold.md +4 -2
- package/dist/src/cli/commands/info.js +1 -1
- package/dist/src/cli/commands/init-repl.d.ts +1 -1
- package/dist/src/cli/commands/init-repl.js +1 -1
- package/dist/src/cli/commands/init.d.ts +7 -0
- package/dist/src/cli/commands/init.js +1 -1
- package/dist/src/cli/commands/integration-connect.d.ts +4 -3
- package/dist/src/cli/commands/integration-connect.js +1 -1
- package/dist/src/cli/commands/integration-setup.d.ts +4 -0
- package/dist/src/cli/commands/integration-setup.js +1 -1
- package/dist/src/cli/commands/register-integration-commands.js +1 -1
- package/dist/src/cli/commands/register-registry-commands.js +1 -1
- package/dist/src/cli/commands/registry-declared-setups.d.ts +23 -0
- package/dist/src/cli/commands/registry-declared-setups.js +1 -0
- package/dist/src/cli/commands/registry-metadata.d.ts +69 -0
- package/dist/src/cli/commands/registry-metadata.js +1 -1
- package/dist/src/cli/commands/registry-package.d.ts +3 -3
- package/dist/src/cli/commands/registry-package.js +1 -1
- package/dist/src/cli/commands/registry-presentation.d.ts +20 -0
- package/dist/src/cli/commands/registry-presentation.js +7 -0
- package/dist/src/cli/commands/registry-search-presentation.d.ts +16 -0
- package/dist/src/cli/commands/registry-search-presentation.js +6 -0
- package/dist/src/cli/commands/registry-setup-command.d.ts +5 -2
- package/dist/src/cli/commands/registry-setup-command.js +1 -2
- package/dist/src/cli/commands/registry.d.ts +16 -7
- package/dist/src/cli/commands/registry.js +1 -6
- package/dist/src/cli/commands/set.d.ts +20 -0
- package/dist/src/cli/commands/set.js +1 -0
- package/dist/src/cli/commands/setup-answers.d.ts +2 -0
- package/dist/src/cli/commands/setup-answers.js +1 -0
- package/dist/src/cli/commands/setup-headless.d.ts +79 -0
- package/dist/src/cli/commands/setup-headless.js +1 -0
- package/dist/src/cli/dev/tui/runner.js +1 -1
- package/dist/src/cli/dev/tui/setup-commands.js +3 -3
- package/dist/src/cli/dev/tui/setup-flow.d.ts +8 -1
- package/dist/src/cli/dev/tui/setup-issues.js +1 -1
- package/dist/src/cli/dev/tui/terminal-renderer.js +12 -12
- package/dist/src/cli/dev/tui/traces/trace-conversation.d.ts +1 -1
- package/dist/src/cli/dev/tui/tui-prompter.js +1 -1
- package/dist/src/cli/option-parsers.d.ts +3 -0
- package/dist/src/cli/option-parsers.js +1 -1
- package/dist/src/cli/run.js +1 -1
- package/dist/src/client/agent-info-schema.d.ts +28 -5
- package/dist/src/client/agent-info-schema.js +1 -1
- package/dist/src/client/session.js +1 -1
- package/dist/src/client/types.d.ts +3 -0
- package/dist/src/client/url.d.ts +5 -0
- package/dist/src/client/url.js +1 -1
- package/dist/src/compiled/.vendor-stamp.json +8 -8
- package/dist/src/compiled/@ai-sdk/anthropic/index.d.ts +33 -13
- package/dist/src/compiled/@ai-sdk/anthropic/index.js +4 -2
- package/dist/src/compiled/@ai-sdk/google/index.d.ts +50 -3
- package/dist/src/compiled/@ai-sdk/google/index.js +7 -7
- package/dist/src/compiled/@ai-sdk/mcp/index.d.ts +33 -3
- package/dist/src/compiled/@ai-sdk/mcp/index.js +1 -1
- package/dist/src/compiled/@ai-sdk/openai/index.d.ts +140 -9
- package/dist/src/compiled/@ai-sdk/openai/index.js +9 -6
- package/dist/src/compiled/@ai-sdk/otel/index.js +1 -1
- package/dist/src/compiled/@ai-sdk/provider/index.d.ts +300 -6
- package/dist/src/compiled/@ai-sdk/provider-utils/index.d.ts +70 -20
- package/dist/src/compiled/@opentelemetry/api/index.d.ts +2 -1
- package/dist/src/compiled/@photon-ai/chat-adapter-imessage/index.js +1 -1
- package/dist/src/compiled/@vercel/otel/index.d.ts +6 -0
- package/dist/src/compiled/@vercel/sandbox/index.js +1 -1
- package/dist/src/compiled/_chunks/node/undici-CUIybhQ2.js +95 -0
- package/dist/src/compiled/_chunks/workflow/dist-eUxFublw.js +77 -0
- package/dist/src/compiled/shadcn-registry/index.js +309 -215
- package/dist/src/compiler/extension-compatibility.d.ts +25 -15
- package/dist/src/compiler/extension-compatibility.js +1 -1
- package/dist/src/compiler/manifest.d.ts +119 -19
- package/dist/src/compiler/manifest.js +1 -1
- package/dist/src/compiler/model-catalog.d.ts +2 -30
- package/dist/src/compiler/model-catalog.js +1 -1
- package/dist/src/compiler/module-map.d.ts +2 -2
- package/dist/src/compiler/module-map.js +2 -2
- package/dist/src/compiler/normalize-agent-config.js +1 -1
- package/dist/src/compiler/normalize-instructions.js +1 -1
- package/dist/src/compiler/normalize-manifest.js +2 -2
- package/dist/src/compiler/normalize-skill.js +1 -1
- package/dist/src/compiler/normalize-subagent.d.ts +5 -1
- package/dist/src/compiler/normalize-subagent.js +1 -1
- package/dist/src/compiler/remote-agent-node.d.ts +4 -1
- package/dist/src/compiler/workspace-resources.js +1 -1
- package/dist/src/context/build-callback-context.js +1 -1
- package/dist/src/context/dynamic-model-lifecycle.d.ts +7 -2
- package/dist/src/context/dynamic-model-lifecycle.js +1 -1
- package/dist/src/context/dynamic-subagent-lifecycle.js +1 -1
- package/dist/src/context/hook-lifecycle.js +1 -1
- package/dist/src/context/keys.d.ts +8 -0
- package/dist/src/context/keys.js +1 -1
- package/dist/src/evals/session.js +1 -1
- package/dist/src/execution/authorization-callback-match.d.ts +14 -0
- package/dist/src/execution/authorization-callback-match.js +1 -0
- package/dist/src/execution/dispatch-runtime-actions-step.js +1 -1
- package/dist/src/execution/effective-agent-config.js +1 -1
- package/dist/src/execution/next-driver-action.d.ts +1 -0
- package/dist/src/execution/node-step.js +1 -1
- package/dist/src/execution/parked-delivery-wait.d.ts +16 -1
- package/dist/src/execution/parked-delivery-wait.js +1 -1
- package/dist/src/execution/sandbox/abort-bound-session.d.ts +1 -1
- package/dist/src/execution/sandbox/bindings/docker.js +1 -1
- package/dist/src/execution/sandbox/bindings/just-bash-runtime.js +1 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-lifecycle.js +1 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-runtime.d.ts +1 -0
- package/dist/src/execution/sandbox/bindings/microsandbox-runtime.js +1 -1
- package/dist/src/execution/sandbox/bindings/vercel.js +1 -1
- package/dist/src/execution/sandbox/ensure.js +1 -1
- package/dist/src/execution/session-command-inbox.d.ts +26 -1
- package/dist/src/execution/session-command-inbox.js +1 -1
- package/dist/src/execution/session-command-wire.js +1 -1
- package/dist/src/execution/session.d.ts +2 -0
- package/dist/src/execution/session.js +2 -2
- package/dist/src/execution/settle-cancelled-turn-step.js +1 -1
- package/dist/src/execution/turn-control-receiver.d.ts +2 -0
- package/dist/src/execution/turn-control-receiver.js +1 -1
- package/dist/src/execution/turn-execution-cursor.d.ts +1 -0
- package/dist/src/execution/turn-workflow.js +1 -1
- package/dist/src/execution/workflow-entry.js +1 -1
- package/dist/src/execution/workflow-steps.d.ts +3 -4
- package/dist/src/execution/workflow-steps.js +1 -1
- package/dist/src/harness/authorization.d.ts +24 -11
- package/dist/src/harness/authorization.js +1 -1
- package/dist/src/harness/emission.d.ts +1 -1
- package/dist/src/harness/emission.js +1 -1
- package/dist/src/harness/input-extraction.js +1 -1
- package/dist/src/harness/input-requests.js +1 -1
- package/dist/src/harness/provider-tools.d.ts +1 -1
- package/dist/src/harness/provider-tools.js +1 -1
- package/dist/src/harness/step-hooks.d.ts +1 -1
- package/dist/src/harness/step-hooks.js +1 -1
- package/dist/src/harness/tool-loop.d.ts +1 -1
- package/dist/src/harness/tool-loop.js +2 -2
- package/dist/src/harness/types.d.ts +11 -5
- package/dist/src/harness/types.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-definition/schema-backed.js +1 -1
- package/dist/src/internal/authored-module-loader.js +1 -1
- package/dist/src/internal/authored-module-map-loader.js +1 -1
- package/dist/src/internal/model-catalog.d.ts +46 -0
- package/dist/src/internal/model-catalog.js +1 -0
- package/dist/src/internal/nitro/host/build-vercel-agent-summary.js +1 -1
- package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
- package/dist/src/internal/nitro/host/dev-host-fingerprint.js +1 -1
- package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response-from-manifest.js +1 -1
- package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response.d.ts +20 -10
- package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response.js +1 -1
- package/dist/src/internal/nitro/routes/channel-dispatch.js +1 -1
- package/dist/src/internal/nitro/routes/info.js +1 -1
- package/dist/src/internal/vercel-agent-summary.d.ts +12 -3
- package/dist/src/internal/vercel-agent-summary.js +1 -1
- package/dist/src/packages/eve-catalog/src/index.js +1 -1
- package/dist/src/protocol/message.d.ts +2 -2
- package/dist/src/protocol/message.js +1 -1
- package/dist/src/protocol/routes.d.ts +8 -6
- package/dist/src/protocol/routes.js +1 -1
- package/dist/src/public/channels/chat-sdk/chatSdkChannel.d.ts +5 -5
- package/dist/src/public/channels/chat-sdk/chatSdkChannel.js +2 -2
- package/dist/src/public/channels/discord/discordChannel.d.ts +3 -1
- package/dist/src/public/channels/discord/discordChannel.js +1 -1
- package/dist/src/public/channels/eve.d.ts +3 -1
- package/dist/src/public/channels/eve.js +1 -1
- package/dist/src/public/channels/github/githubChannel.d.ts +3 -1
- package/dist/src/public/channels/github/githubChannel.js +1 -1
- package/dist/src/public/channels/index.d.ts +1 -1
- package/dist/src/public/channels/linear/linearChannel.d.ts +3 -1
- package/dist/src/public/channels/linear/linearChannel.js +1 -1
- package/dist/src/public/channels/photon/photonIMessageChannel.d.ts +3 -1
- package/dist/src/public/channels/photon/photonIMessageChannel.js +1 -1
- package/dist/src/public/channels/slack/attachments.js +1 -1
- package/dist/src/public/channels/slack/defaults.js +1 -1
- package/dist/src/public/channels/slack/hitl.d.ts +14 -1
- package/dist/src/public/channels/slack/hitl.js +2 -2
- package/dist/src/public/channels/slack/slackChannel.d.ts +3 -1
- package/dist/src/public/channels/slack/slackChannel.js +1 -1
- package/dist/src/public/channels/teams/teamsChannel.d.ts +3 -1
- package/dist/src/public/channels/teams/teamsChannel.js +1 -1
- package/dist/src/public/channels/telegram/telegramChannel.d.ts +3 -1
- package/dist/src/public/channels/telegram/telegramChannel.js +1 -1
- package/dist/src/public/channels/twilio/twilioChannel.d.ts +3 -1
- package/dist/src/public/channels/twilio/twilioChannel.js +1 -1
- package/dist/src/public/definitions/agent.d.ts +5 -7
- package/dist/src/public/definitions/agent.js +1 -1
- package/dist/src/public/definitions/callback-context.d.ts +2 -2
- package/dist/src/public/definitions/channel.d.ts +3 -1
- package/dist/src/public/definitions/channel.js +1 -1
- package/dist/src/public/definitions/sandbox.d.ts +1 -1
- package/dist/src/public/definitions/tool.d.ts +10 -14
- package/dist/src/public/definitions/tool.js +1 -1
- package/dist/src/public/index.d.ts +1 -1
- package/dist/src/public/sandbox/index.d.ts +1 -1
- package/dist/src/public/tools/web-search.d.ts +2 -2
- package/dist/src/runtime/agent/bootstrap.d.ts +19 -6
- package/dist/src/runtime/agent/bootstrap.js +1 -1
- package/dist/src/runtime/agent/model-catalog.d.ts +10 -0
- package/dist/src/runtime/agent/model-catalog.js +1 -0
- package/dist/src/runtime/agent/resolve-model.d.ts +8 -4
- package/dist/src/runtime/agent/resolve-model.js +1 -1
- package/dist/src/runtime/connections/callback-route.d.ts +4 -5
- package/dist/src/runtime/connections/callback-route.js +1 -1
- package/dist/src/runtime/connections/scoped-authorization.js +1 -1
- package/dist/src/runtime/framework-channels/index.js +1 -1
- package/dist/src/runtime/framework-tools/connection-search-dynamic.js +2 -2
- package/dist/src/runtime/framework-tools/todo.js +1 -1
- package/dist/src/runtime/input/types.d.ts +1 -4
- package/dist/src/runtime/resolve-agent-graph.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-channel.js +1 -1
- package/dist/src/runtime/resolve-dynamic-subagent.d.ts +2 -5
- package/dist/src/runtime/subagents/dynamic-agent-config.d.ts +8 -7
- package/dist/src/runtime/subagents/dynamic-agent-config.js +1 -1
- package/dist/src/runtime/types.d.ts +11 -4
- package/dist/src/sandbox/state.d.ts +1 -0
- package/dist/src/setup/ask-editable.d.ts +22 -0
- package/dist/src/setup/ask-editable.js +1 -0
- package/dist/src/setup/ask-signals.d.ts +23 -0
- package/dist/src/setup/ask-signals.js +1 -0
- package/dist/src/setup/ask.d.ts +24 -25
- package/dist/src/setup/ask.js +1 -1
- package/dist/src/setup/boxes/deploy-project.js +1 -1
- package/dist/src/setup/boxes/resolve-provisioning.js +1 -1
- package/dist/src/setup/connection-connector.js +3 -2
- package/dist/src/setup/flows/deploy.d.ts +5 -3
- package/dist/src/setup/flows/deploy.js +1 -1
- package/dist/src/setup/flows/ensure-vercel-project.d.ts +5 -1
- package/dist/src/setup/flows/ensure-vercel-project.js +1 -1
- package/dist/src/setup/flows/model-source-change.d.ts +1 -0
- package/dist/src/setup/flows/model-source-change.js +1 -1
- package/dist/src/setup/flows/registry-session.d.ts +33 -0
- package/dist/src/setup/flows/registry-session.js +1 -0
- package/dist/src/setup/flows/registry.d.ts +16 -0
- package/dist/src/setup/flows/registry.js +1 -1
- package/dist/src/setup/index.js +1 -1
- package/dist/src/setup/integrations/discord/setup.d.ts +19 -7
- package/dist/src/setup/integrations/discord/setup.js +4 -3
- package/dist/src/setup/integrations/github/setup.d.ts +36 -7
- package/dist/src/setup/integrations/github/setup.js +2 -2
- package/dist/src/setup/integrations/linear/setup.d.ts +21 -9
- package/dist/src/setup/integrations/linear/setup.js +2 -2
- package/dist/src/setup/integrations/photon/management.d.ts +8 -1
- package/dist/src/setup/integrations/photon/management.js +1 -1
- package/dist/src/setup/integrations/photon/setup-flow.d.ts +28 -24
- package/dist/src/setup/integrations/photon/setup-flow.js +3 -3
- package/dist/src/setup/integrations/photon/setup.d.ts +1 -3
- package/dist/src/setup/integrations/photon/setup.js +1 -1
- package/dist/src/setup/integrations/registry.d.ts +1 -1
- package/dist/src/setup/integrations/registry.js +1 -1
- package/dist/src/setup/integrations/runner.d.ts +14 -11
- package/dist/src/setup/integrations/runner.js +1 -1
- package/dist/src/setup/integrations/shared/prerequisite.d.ts +17 -0
- package/dist/src/setup/integrations/shared/prerequisite.js +1 -0
- package/dist/src/setup/integrations/shared/ui.d.ts +22 -15
- package/dist/src/setup/integrations/shared/ui.js +2 -2
- package/dist/src/setup/integrations/shared/vercel-project.d.ts +11 -0
- package/dist/src/setup/integrations/shared/vercel-project.js +1 -0
- package/dist/src/setup/integrations/slack/setup.d.ts +25 -10
- package/dist/src/setup/integrations/slack/setup.js +1 -1
- package/dist/src/setup/integrations/types.d.ts +43 -13
- package/dist/src/setup/integrations/types.js +1 -1
- package/dist/src/setup/integrations/web/setup.d.ts +22 -3
- package/dist/src/setup/integrations/web/setup.js +1 -1
- package/dist/src/setup/prompter.d.ts +8 -0
- package/dist/src/setup/question-options.d.ts +15 -0
- package/dist/src/setup/question-options.js +1 -0
- package/dist/src/setup/registry-setup-client.d.ts +3 -4
- package/dist/src/setup/registry-setup-client.js +2 -2
- package/dist/src/setup/registry-setup-completion.d.ts +3 -0
- package/dist/src/setup/registry-setup-completion.js +1 -0
- package/dist/src/setup/registry-setup-protocol.d.ts +22 -3
- package/dist/src/setup/registry-setup-protocol.js +1 -1
- package/dist/src/setup/scaffold/create/add-to-project.d.ts +2 -0
- package/dist/src/setup/scaffold/create/add-to-project.js +1 -1
- package/dist/src/setup/scaffold/create/project.d.ts +3 -1
- package/dist/src/setup/scaffold/create/project.js +57 -5
- package/dist/src/setup/scaffold/update/channels.js +1 -1
- package/dist/src/setup/setup-question-wire.d.ts +48 -0
- package/dist/src/setup/setup-question-wire.js +1 -0
- package/dist/src/setup/slackbot.d.ts +5 -1
- package/dist/src/setup/slackbot.js +1 -1
- package/dist/src/setup/state.d.ts +2 -2
- package/dist/src/shared/agent-definition.d.ts +23 -23
- package/dist/src/shared/agent-definition.js +1 -1
- package/dist/src/shared/channel-definition.d.ts +3 -1
- package/dist/src/shared/dynamic-tool-definition.d.ts +4 -10
- package/dist/src/shared/dynamic-tool-definition.js +1 -1
- package/dist/src/shared/sandbox-backend.d.ts +6 -0
- package/dist/src/shared/sandbox-session.d.ts +15 -0
- package/dist/src/shared/tool-definition.d.ts +2 -2
- package/dist/src/shared/tool-schema.d.ts +5 -4
- package/dist/src/shared/tool-schema.js +1 -1
- package/dist/src/svelte/index.js +1 -1
- package/dist/src/svelte/use-eve-agent.js +1 -1
- package/dist/src/tracing/agent-otel-provider.d.ts +5 -38
- package/dist/src/tracing/agent-otel-provider.js +2 -2
- package/dist/src/tracing/agent-span-id-generator.d.ts +15 -0
- package/dist/src/tracing/agent-span-id-generator.js +1 -0
- package/dist/src/tracing/agent-trace-context-store.d.ts +1 -1
- package/dist/src/tracing/agent-trace-context-store.js +1 -1
- package/dist/src/tracing/agent-trace-state.d.ts +41 -0
- package/dist/src/tracing/agent-trace-state.js +1 -0
- package/dist/src/tracing/local-instrumentation-runtime.js +1 -1
- package/dist/src/vue/index.js +1 -1
- package/dist/src/vue/use-eve-agent.js +1 -1
- package/docs/agent-config.md +30 -19
- package/docs/channels/chat-sdk.mdx +6 -6
- package/docs/channels/custom.mdx +20 -0
- package/docs/channels/discord.mdx +1 -0
- package/docs/channels/eve.mdx +2 -0
- package/docs/channels/github.mdx +1 -1
- package/docs/channels/linear.mdx +1 -1
- package/docs/channels/overview.mdx +21 -2
- package/docs/channels/photon.mdx +5 -2
- package/docs/channels/slack.mdx +158 -50
- package/docs/concepts/default-harness.md +3 -3
- package/docs/concepts/execution-model-and-durability.mdx +5 -8
- package/docs/concepts/sessions-runs-and-streaming.md +3 -3
- package/docs/connections/mcp.mdx +6 -0
- package/docs/guides/dev-tui.md +58 -142
- package/docs/guides/dynamic-capabilities.md +24 -20
- package/docs/guides/dynamic-workflows.md +2 -0
- package/docs/guides/frontend/overview.mdx +4 -2
- package/docs/guides/hooks.md +25 -3
- package/docs/guides/session-context.md +18 -0
- package/docs/install-integrations.mdx +2 -0
- package/docs/installation.mdx +7 -1
- package/docs/reference/cli.md +37 -10
- package/docs/reference/typescript-api.md +1 -1
- package/docs/sandbox.mdx +25 -5
- package/docs/skills.mdx +12 -1
- package/docs/subagents.mdx +1 -1
- package/docs/tools/human-in-the-loop.md +1 -1
- package/docs/tutorial/ship-it.mdx +1 -1
- package/package.json +10 -10
- package/dist/src/compiled/_chunks/node/undici-DWL_MYmT.js +0 -95
- package/dist/src/compiled/_chunks/workflow/dist-CZxNEvEs.js +0 -79
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
# eve
|
|
2
2
|
|
|
3
|
+
## 0.33.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- ccaa596: Dynamic models and subagents now resolve without compiled fallbacks or placeholder configs. `defineDynamic` accepts only `events`; dynamic model handlers must return a concrete selection, while runtime model metadata is normalized and cached when the selection becomes active.
|
|
8
|
+
- 2dd193b: Channel message sends now use `turnPolicy: "steer"` by default, so accepted messages replace active turns through cancellation-backed steering without a separate cancel request. Set `turnPolicy: "queue"` on a channel or individual send to preserve the previous wait-for-completion behavior.
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- 672c054: Add `eve set` with `--model` and `--reasoning` options for changing an existing agent's model settings, and add the same model settings to `eve init` for scaffolding.
|
|
13
|
+
- 1ee27be: Interactive setup now offers an explicit exit after `eve init` and runs Vercel login and project linking in place whenever Vercel-backed integration setup or deployment needs them.
|
|
14
|
+
|
|
15
|
+
## 0.32.0
|
|
16
|
+
|
|
17
|
+
### Minor Changes
|
|
18
|
+
|
|
19
|
+
- 1702f91: Tool approval responses now use `cancel` instead of `deny`, while retaining `approve` for the positive response, aligning the public protocol with the user-facing flow-control semantics.
|
|
20
|
+
- cbe7105: Allow authored hooks, tools, and channel callbacks to stop their active sandbox through `ctx.getSandbox().stop()`. Every built-in backend preserves the durable session for a later callback, and custom sandbox backend handles must now implement `stop()`.
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- ea530ec: Update `eve add` to better support agent-based invocation of guided setup flows. Interactive setup links a Vercel project when needed; after each deployable setup, `/add` offers to add more by default, deploy to production, or finish.
|
|
25
|
+
- a29cc8e: Update the bundled AI SDK to 7.0.58 and the `@ai-sdk/*` providers to their latest minors.
|
|
26
|
+
- 39c76ca: AI Gateway models now use Exa by default for the built-in `web_search` tool. Agents can continue to select Parallel explicitly with `webSearch({ provider: "parallel" })`.
|
|
27
|
+
- 261af74: Photon setup now shows an existing project's dedicated number when available, rather than allocating and showing a shared fallback number.
|
|
28
|
+
- 55b5cc7: Teach newly scaffolded coding agents to discover integrations and follow the structured `eve add --headless` setup flow through completion.
|
|
29
|
+
- 91cca9a: Slack now posts tool input previews separately from approval controls so large inputs no longer inflate button callbacks and approvals remain responsive.
|
|
30
|
+
- 50f2d96: Conversation sessions no longer stall while an interactive authorization challenge is open: ordinary messages run as normal turns, while tasks defer unrelated input until their blocked authorization completes. Callbacks are bound to the exact challenge attempt and initiating connection principal, remain live across parked activity, and start a valid callback turn after the authorization park closes its boundary. Session timeouts are also honored during an open challenge, and `client.fetch` preserves query strings embedded in the request path.
|
|
31
|
+
- 7449917: Stop completed and cancelled todo lists from being re-injected as user messages after compaction. Lists that still contain active work continue to be preserved in full.
|
|
32
|
+
- 63a76f0: Local traces now record `agent.turn` with the turn's real duration instead of a zero-duration marker, and the separate `agent.turn.terminal` marker span is gone — terminal and transition events land on the turn span itself. `agent.session` window roots remain zero-duration markers because an idle session never closes.
|
|
33
|
+
- a159596: Export telemetry for every step of multi-step turns when an OpenTelemetry consumer groups spans by completed local segments.
|
|
34
|
+
- e1080e0: Reject HTML sign-in pages returned by Slack private file downloads and explain how to restore attachment access.
|
|
35
|
+
- 52000dd: Build tool input schemas authored with Zod 3 instead of crashing during JSON Schema conversion.
|
|
36
|
+
- f06e12e: Add a structured `eve add --non-interactive` flow with stable setup answers, component selection, and resumable setup blockers for coding agents.
|
|
37
|
+
|
|
3
38
|
## 0.31.3
|
|
4
39
|
|
|
5
40
|
### Patch Changes
|
|
@@ -166,7 +201,7 @@
|
|
|
166
201
|
### Patch Changes
|
|
167
202
|
|
|
168
203
|
- 22bfa02: Add guided Photon setup through `eve add channel/photon-imessage`, including project creation, phone registration, Vercel Connect or portable credentials, and channel scaffolding.
|
|
169
|
-
- 0c0de19: Add an opt-in
|
|
204
|
+
- 0c0de19: Add an opt-in steering policy to Chat SDK sends that cancels an active turn before delivering its replacement message.
|
|
170
205
|
- b00a79d: Add `photonIMessageChannel`, a first-class Photon iMessage channel with lazy credentials, Vercel OIDC webhook verification, and automatic eve session routing.
|
|
171
206
|
- 495e93b: Resolve leading `$HOME` paths in the built-in `read_file`, `write_file`, `glob`, and `grep` tools so agents can directly access packaged skill references advertised in their prompt.
|
|
172
207
|
- bf01952: Local trace spans now capture model and tool payloads: the system prompt, prompt messages, and response text/reasoning/tool calls on model spans, and call arguments/results on tool spans, each capped at 32 KB with provider transport metadata stripped. Set `EVE_TRACES_CONTENT=off` to keep payloads out of the spool.
|
package/README.md
CHANGED
|
@@ -122,10 +122,13 @@ export default defineAgent({
|
|
|
122
122
|
npx eve@latest init my-agent
|
|
123
123
|
```
|
|
124
124
|
|
|
125
|
-
`eve init` writes a new agent with eve's default model. Pass `--
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
125
|
+
`eve init` writes a new agent with eve's default model. Pass `--model
|
|
126
|
+
openai/gpt-5.5` to choose another AI Gateway model, `--reasoning high` to set a
|
|
127
|
+
reasoning effort, or `--channel-web-nextjs` to add the Web Chat application. It
|
|
128
|
+
installs dependencies, initializes Git, and starts the development server. When
|
|
129
|
+
it finds a supported coding-agent REPL, the handoff menu can open that REPL
|
|
130
|
+
instead or exit. Targeting an existing project directory (`eve init .`) adds the
|
|
131
|
+
agent files and missing dependencies instead. It does not create a Vercel
|
|
129
132
|
project or deploy the agent.
|
|
130
133
|
|
|
131
134
|
CLI commands:
|
|
@@ -135,6 +138,7 @@ CLI commands:
|
|
|
135
138
|
- `eve build` — compile `.eve/` and build the host output
|
|
136
139
|
- `eve start` — serve the built `.output/` app
|
|
137
140
|
- `eve dev` — start the local runtime and REPL
|
|
141
|
+
- `eve set [--model <model-id>] [--reasoning <effort>]` — change root model settings
|
|
138
142
|
- `eve extension init <name>` — create a new extension package
|
|
139
143
|
- `eve extension build` — build an extension package
|
|
140
144
|
|
|
@@ -2,7 +2,7 @@ import type { UserContent } from "ai";
|
|
|
2
2
|
import type { ChannelAdapter } from "#channel/adapter.js";
|
|
3
3
|
import type { SendPayload } from "#channel/routes.js";
|
|
4
4
|
import { type Session } from "#channel/session.js";
|
|
5
|
-
import type { CancelTurnResult, ClearSessionResult, CompactSessionResult, ResetSessionResult, Runtime, SessionAuthContext, SessionCallback } from "#channel/types.js";
|
|
5
|
+
import type { CancelTurnResult, ClearSessionResult, CompactSessionResult, ResetSessionResult, Runtime, SessionAuthContext, SessionCallback, TurnPolicy } from "#channel/types.js";
|
|
6
6
|
import type { RunMode } from "#shared/run-mode.js";
|
|
7
7
|
interface BaseChannelAddressDeliveryOptions {
|
|
8
8
|
readonly auth: SessionAuthContext | null;
|
|
@@ -10,6 +10,7 @@ interface BaseChannelAddressDeliveryOptions {
|
|
|
10
10
|
readonly initiatorAuth?: SessionAuthContext | null;
|
|
11
11
|
readonly mode?: RunMode;
|
|
12
12
|
readonly title?: string;
|
|
13
|
+
readonly turnPolicy?: TurnPolicy;
|
|
13
14
|
}
|
|
14
15
|
/** Delivery options for a channel address whose continuation token is already bound. */
|
|
15
16
|
export type ChannelAddressDeliveryOptions<TState = undefined> = [TState] extends [undefined] ? BaseChannelAddressDeliveryOptions : BaseChannelAddressDeliveryOptions & {
|
|
@@ -45,6 +46,7 @@ export declare function createChannelAddress<TState = undefined>(input: {
|
|
|
45
46
|
readonly requestId?: string;
|
|
46
47
|
};
|
|
47
48
|
readonly runtime: Runtime;
|
|
49
|
+
readonly turnPolicy?: TurnPolicy;
|
|
48
50
|
}): ChannelAddress<TState>;
|
|
49
51
|
/** Builds a request-scoped factory for channel addresses on one authored channel. */
|
|
50
52
|
export declare function createChannelAddressFn<TState = undefined>(input: {
|
|
@@ -54,5 +56,6 @@ export declare function createChannelAddressFn<TState = undefined>(input: {
|
|
|
54
56
|
readonly requestId?: string;
|
|
55
57
|
};
|
|
56
58
|
readonly runtime: Runtime;
|
|
59
|
+
readonly turnPolicy?: TurnPolicy;
|
|
57
60
|
}): ChannelAddressFn<TState>;
|
|
58
61
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createSession,sessionCallbackToTurnCaller}from"#channel/session.js";import{normalizeSendInput,serializeUrlFilePartsInMessage}from"#channel/send-input.js";import{isRuntimeSessionOwnershipConflictError}from"#execution/runtime-errors.js";import{isReservedSessionCommandToken}from"#execution/session-command-token.js";function createChannelAddress(r){let i=r.metadata??{},a=`${r.channelName}:${r.continuationToken}`;if(isReservedSessionCommandToken(a))throw Error(`Channel address "${a}" uses eve's reserved session namespace.`);return{continuationToken:r.continuationToken,async deliver(n,o){let s=normalizeSendInput(n),c=sessionCallbackToTurnCaller(o.callback),l={auth:o.auth,kind:`send`,payload:{...s,message:serializeUrlFilePartsInMessage(s.message)},requestId:i.requestId},u=c===void 0?l:{...l,caller:c},dispatch=async()=>{let t=await r.runtime.dispatchContinuation({command:u,continuationToken:a});return t.status===`accepted`?createSession(t.sessionId,r.runtime,i):void 0},d=await dispatch();if(d!==void 0)return d;if(s.inputResponses&&s.inputResponses.length>0)throw Error(`Cannot deliver inputResponses — the target session was not found via continuation token.`);let f=o.state,p={adapter:f===void 0?r.adapter:{...r.adapter,state:{...r.adapter.state,...f}},auth:o.auth,capabilities:o.mode===`task`?void 0:{requestInput:!0},callback:o.callback,channelName:r.channelName,continuationToken:a,initiatorAuth:o.initiatorAuth,input:{context:s.context,message:serializeUrlFilePartsInMessage(s.message)??``,outputSchema:s.outputSchema},mode:o.mode??`conversation`,requestId:i.requestId,title:o.title};try{return createSession((await r.runtime.createSession(p)).sessionId,r.runtime,i)}catch(e){if(!isRuntimeSessionOwnershipConflictError(e))throw e;let t=await dispatch();if(t!==void 0)return t;throw e}},async send(e,t){return await this.deliver({message:e},t)},async respond(e,t){if(e===void 0||e.length===0)throw Error(`respond() requires at least one input response.`);return await this.deliver({inputResponses:e},t)},async cancel(e){return await r.runtime.dispatchContinuation({command:{kind:`cancel`,turnId:e?.turnId},continuationToken:a})},async compact(){return await r.runtime.dispatchContinuation({command:{kind:`compact`},continuationToken:a})},async clear(){return await r.runtime.dispatchContinuation({command:{kind:`clear`},continuationToken:a})},async reset(e){return await r.runtime.dispatchContinuation({command:{kind:`reset`,reason:e?.reason},continuationToken:a})},async resolveSession(){let t=await r.runtime.resolveContinuation(a);return t===void 0?void 0:createSession(t.sessionId,r.runtime,i)}}}function createChannelAddressFn(e){return t=>createChannelAddress({...e,continuationToken:t})}export{createChannelAddress,createChannelAddressFn};
|
|
1
|
+
import{createSession,sessionCallbackToTurnCaller}from"#channel/session.js";import{normalizeSendInput,serializeUrlFilePartsInMessage}from"#channel/send-input.js";import{DEFAULT_TURN_POLICY}from"#channel/types.js";import{isRuntimeSessionOwnershipConflictError}from"#execution/runtime-errors.js";import{isReservedSessionCommandToken}from"#execution/session-command-token.js";function createChannelAddress(r){let i=r.metadata??{},a=`${r.channelName}:${r.continuationToken}`;if(isReservedSessionCommandToken(a))throw Error(`Channel address "${a}" uses eve's reserved session namespace.`);return{continuationToken:r.continuationToken,async deliver(n,o){let s=normalizeSendInput(n),c=sessionCallbackToTurnCaller(o.callback),l={auth:o.auth,kind:`send`,payload:{...s,message:serializeUrlFilePartsInMessage(s.message)},requestId:i.requestId,turnPolicy:s.message===void 0?void 0:o.turnPolicy??r.turnPolicy??DEFAULT_TURN_POLICY},u=c===void 0?l:{...l,caller:c},dispatch=async()=>{let t=await r.runtime.dispatchContinuation({command:u,continuationToken:a});return t.status===`accepted`?createSession(t.sessionId,r.runtime,{...i,turnPolicy:r.turnPolicy}):void 0},d=await dispatch();if(d!==void 0)return d;if(s.inputResponses&&s.inputResponses.length>0)throw Error(`Cannot deliver inputResponses — the target session was not found via continuation token.`);let f=o.state,p={adapter:f===void 0?r.adapter:{...r.adapter,state:{...r.adapter.state,...f}},auth:o.auth,capabilities:o.mode===`task`?void 0:{requestInput:!0},callback:o.callback,channelName:r.channelName,continuationToken:a,initiatorAuth:o.initiatorAuth,input:{context:s.context,message:serializeUrlFilePartsInMessage(s.message)??``,outputSchema:s.outputSchema},mode:o.mode??`conversation`,requestId:i.requestId,title:o.title};try{return createSession((await r.runtime.createSession(p)).sessionId,r.runtime,{...i,turnPolicy:r.turnPolicy})}catch(e){if(!isRuntimeSessionOwnershipConflictError(e))throw e;let t=await dispatch();if(t!==void 0)return t;throw e}},async send(e,t){return await this.deliver({message:e},t)},async respond(e,t){if(e===void 0||e.length===0)throw Error(`respond() requires at least one input response.`);return await this.deliver({inputResponses:e},t)},async cancel(e){return await r.runtime.dispatchContinuation({command:{kind:`cancel`,turnId:e?.turnId},continuationToken:a})},async compact(){return await r.runtime.dispatchContinuation({command:{kind:`compact`},continuationToken:a})},async clear(){return await r.runtime.dispatchContinuation({command:{kind:`clear`},continuationToken:a})},async reset(e){return await r.runtime.dispatchContinuation({command:{kind:`reset`,reason:e?.reason},continuationToken:a})},async resolveSession(){let t=await r.runtime.resolveContinuation(a);return t===void 0?void 0:createSession(t.sessionId,r.runtime,{...i,turnPolicy:r.turnPolicy})}}}function createChannelAddressFn(e){return t=>createChannelAddress({...e,continuationToken:t})}export{createChannelAddress,createChannelAddressFn};
|
|
@@ -3,7 +3,7 @@ import type { ChannelAdapter } from "#channel/adapter.js";
|
|
|
3
3
|
import { type ChannelAddressDeliveryOptions } from "#channel/channel-address.js";
|
|
4
4
|
import type { SendPayload } from "#channel/routes.js";
|
|
5
5
|
import type { Session } from "#channel/session.js";
|
|
6
|
-
import type { CancelTurnResult, ClearSessionResult, CompactSessionResult, ResetSessionResult, Runtime, SessionAuthContext, SessionCallback } from "#channel/types.js";
|
|
6
|
+
import type { CancelTurnResult, ClearSessionResult, CompactSessionResult, ResetSessionResult, Runtime, SessionAuthContext, SessionCallback, TurnPolicy } from "#channel/types.js";
|
|
7
7
|
import type { InputResponse } from "#runtime/input/types.js";
|
|
8
8
|
import type { JsonObject } from "#shared/json.js";
|
|
9
9
|
import type { RunMode } from "#shared/run-mode.js";
|
|
@@ -15,6 +15,7 @@ interface BaseChannelSendOptions {
|
|
|
15
15
|
readonly mode?: RunMode;
|
|
16
16
|
readonly outputSchema?: JsonObject;
|
|
17
17
|
readonly title?: string;
|
|
18
|
+
readonly turnPolicy?: TurnPolicy;
|
|
18
19
|
}
|
|
19
20
|
/** Options for sending a message from a channel-local continuation address. */
|
|
20
21
|
export type ChannelSendOptions<TState = undefined> = [TState] extends [undefined] ? BaseChannelSendOptions : BaseChannelSendOptions & {
|
|
@@ -68,5 +69,6 @@ export declare function createChannelOperations<TState = undefined>(input: {
|
|
|
68
69
|
readonly requestId?: string;
|
|
69
70
|
};
|
|
70
71
|
readonly runtime: Runtime;
|
|
72
|
+
readonly turnPolicy?: TurnPolicy;
|
|
71
73
|
}): ChannelReceiveContext<TState>;
|
|
72
74
|
export {};
|
|
@@ -5,7 +5,7 @@ import type { NormalizedChannelCorsOptions } from "#channel/cors.js";
|
|
|
5
5
|
import type { TypedReceiveTarget } from "#channel/receive-target.js";
|
|
6
6
|
import type { RouteDefinition } from "#channel/routes.js";
|
|
7
7
|
import type { Session } from "#channel/session.js";
|
|
8
|
-
import type { SessionAuthContext } from "#channel/types.js";
|
|
8
|
+
import type { SessionAuthContext, TurnPolicy } from "#channel/types.js";
|
|
9
9
|
export declare const CHANNEL_SENTINEL: "eve:channel";
|
|
10
10
|
/** Structural identity shared by public authored channels and compiled channels. */
|
|
11
11
|
export interface ChannelReference<TReceiveTarget = Record<string, unknown>> extends TypedReceiveTarget<TReceiveTarget> {
|
|
@@ -21,6 +21,7 @@ export interface CompiledChannel<TState = undefined, TReceiveTarget = Record<str
|
|
|
21
21
|
readonly target: Readonly<TReceiveTarget>;
|
|
22
22
|
readonly auth: SessionAuthContext | null;
|
|
23
23
|
}, ctx: ChannelReceiveContext<TState>) => Promise<Session>;
|
|
24
|
+
readonly turnPolicy?: TurnPolicy;
|
|
24
25
|
}
|
|
25
26
|
export declare function isCompiledChannel(value: unknown): value is CompiledChannel;
|
|
26
27
|
export declare function getChannelInstrumentationKind(value: unknown): string | undefined;
|
|
@@ -3,13 +3,14 @@ import type { ChannelAdapter } from "#channel/adapter.js";
|
|
|
3
3
|
import { type ChannelReference, type CompiledChannel } from "#channel/compiled-channel.js";
|
|
4
4
|
import type { InferReceiveTarget } from "#channel/receive-target.js";
|
|
5
5
|
import type { Session } from "#channel/session.js";
|
|
6
|
-
import type { Runtime, SessionAuthContext } from "#channel/types.js";
|
|
6
|
+
import type { Runtime, SessionAuthContext, TurnPolicy } from "#channel/types.js";
|
|
7
7
|
import type { ResolvedChannelDefinition } from "#runtime/types.js";
|
|
8
8
|
/**
|
|
9
9
|
* Options for sending a message to a channel selected with `ctx.to(...)`.
|
|
10
10
|
*/
|
|
11
11
|
export interface CrossChannelSendOptions {
|
|
12
12
|
readonly auth: SessionAuthContext | null;
|
|
13
|
+
readonly turnPolicy?: TurnPolicy;
|
|
13
14
|
}
|
|
14
15
|
/** Message delivery bound to one channel-specific proactive target. */
|
|
15
16
|
export interface CrossChannelTargetHandle {
|
|
@@ -27,6 +28,7 @@ export interface CrossChannelTarget {
|
|
|
27
28
|
readonly definition: CompiledChannel;
|
|
28
29
|
readonly receive?: CompiledChannel["receive"];
|
|
29
30
|
readonly adapter?: ChannelAdapter;
|
|
31
|
+
readonly turnPolicy?: CompiledChannel["turnPolicy"];
|
|
30
32
|
}
|
|
31
33
|
/**
|
|
32
34
|
* Projects an agent's resolved channels into the receiver-input shape.
|
|
@@ -42,12 +44,13 @@ export declare function toCrossChannelTargets(channels: readonly ResolvedChannel
|
|
|
42
44
|
export declare function createCrossChannelToFn(runtime: Runtime, channels: readonly CrossChannelTarget[]): CrossChannelToFn;
|
|
43
45
|
interface InvokeChannelReceiveInput {
|
|
44
46
|
readonly runtime: Runtime;
|
|
45
|
-
readonly target: Pick<CrossChannelTarget, "name" | "receive" | "adapter">;
|
|
47
|
+
readonly target: Pick<CrossChannelTarget, "name" | "receive" | "adapter" | "turnPolicy">;
|
|
46
48
|
readonly input: {
|
|
47
49
|
readonly message: string | UserContent;
|
|
48
50
|
readonly target: Readonly<Record<string, unknown>>;
|
|
49
51
|
readonly auth: SessionAuthContext | null;
|
|
50
52
|
};
|
|
53
|
+
readonly turnPolicy?: TurnPolicy;
|
|
51
54
|
readonly describeMissingReceive: () => string;
|
|
52
55
|
readonly describeMissingAdapter: () => string;
|
|
53
56
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createChannelOperations}from"#channel/channel-operations.js";import{isCompiledChannel}from"#channel/compiled-channel.js";function toCrossChannelTargets(e){return e.flatMap(e=>e.definition===void 0?[]:[{name:e.name,definition:e.definition,receive:e.receive,adapter:e.adapter}])}function createCrossChannelToFn(e,t){return(n,r)=>{let i=resolveTargetByReference(n,t);return{async send(t,n){return await invokeChannelReceive({runtime:e,target:i,input:{message:t,target:r,auth:n.auth},describeMissingReceive:()=>`ctx.to(): channel "${i.name}" does not implement receive(). Declare a receive hook on the channel to accept cross-channel sessions.`,describeMissingAdapter:()=>`ctx.to(): channel "${i.name}" has no adapter — cannot build ctx.from().`})}}}}async function invokeChannelReceive(t){if(!t.target.receive)throw Error(t.describeMissingReceive());if(!t.target.adapter)throw Error(t.describeMissingAdapter());let n=createChannelOperations({adapter:t.target.adapter,channelName:t.target.name,runtime:t.runtime});return await t.target.receive(t.input,n)}function resolveTargetByReference(e,t){for(let n of t)if(n.definition===e)return n;let n=resolveTargetByRouteFingerprint(e,t);if(n!==null)return n;throw Error(`ctx.to(): the channel passed as the first argument is not registered in this agent's channels/. Import the channel module's default export from agent/channels/<name>.ts and pass that value.`)}function resolveTargetByRouteFingerprint(e,n){if(!isCompiledChannel(e))return null;let r=createRouteFingerprint(e);if(r===null)return null;let i=new Map;for(let e of n)createRouteFingerprint(e.definition)===r&&i.set(e.name,e);if(i.size===1)return[...i.values()][0];if(i.size>1)throw Error(`ctx.to(): the channel passed as the first argument matches multiple registered channels by route shape. Import a channel with a unique route set from agent/channels/<name>.ts before passing it to ctx.to().`);return null}function createRouteFingerprint(e){return e.routes.length===0?null:e.routes.map(e=>`${e.method.toUpperCase()} ${e.path}`).sort().join(`
|
|
1
|
+
import{createChannelOperations}from"#channel/channel-operations.js";import{isCompiledChannel}from"#channel/compiled-channel.js";function toCrossChannelTargets(e){return e.flatMap(e=>e.definition===void 0?[]:[{name:e.name,definition:e.definition,receive:e.receive,adapter:e.adapter,turnPolicy:e.turnPolicy}])}function createCrossChannelToFn(e,t){return(n,r)=>{let i=resolveTargetByReference(n,t);return{async send(t,n){return await invokeChannelReceive({runtime:e,target:i,input:{message:t,target:r,auth:n.auth},turnPolicy:n.turnPolicy,describeMissingReceive:()=>`ctx.to(): channel "${i.name}" does not implement receive(). Declare a receive hook on the channel to accept cross-channel sessions.`,describeMissingAdapter:()=>`ctx.to(): channel "${i.name}" has no adapter — cannot build ctx.from().`})}}}}async function invokeChannelReceive(t){if(!t.target.receive)throw Error(t.describeMissingReceive());if(!t.target.adapter)throw Error(t.describeMissingAdapter());let n=createChannelOperations({adapter:t.target.adapter,channelName:t.target.name,runtime:t.runtime,turnPolicy:t.turnPolicy??t.target.turnPolicy});return await t.target.receive(t.input,n)}function resolveTargetByReference(e,t){for(let n of t)if(n.definition===e)return n;let n=resolveTargetByRouteFingerprint(e,t);if(n!==null)return n;throw Error(`ctx.to(): the channel passed as the first argument is not registered in this agent's channels/. Import the channel module's default export from agent/channels/<name>.ts and pass that value.`)}function resolveTargetByRouteFingerprint(e,n){if(!isCompiledChannel(e))return null;let r=createRouteFingerprint(e);if(r===null)return null;let i=new Map;for(let e of n)createRouteFingerprint(e.definition)===r&&i.set(e.name,e);if(i.size===1)return[...i.values()][0];if(i.size>1)throw Error(`ctx.to(): the channel passed as the first argument matches multiple registered channels by route shape. Import a channel with a unique route set from agent/channels/<name>.ts before passing it to ctx.to().`);return null}function createRouteFingerprint(e){return e.routes.length===0?null:e.routes.map(e=>`${e.method.toUpperCase()} ${e.path}`).sort().join(`
|
|
2
2
|
`)}export{createCrossChannelToFn,invokeChannelReceive,toCrossChannelTargets};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ContextAccessor } from "#context/key.js";
|
|
2
2
|
import type { MessageStreamEvent } from "#protocol/message.js";
|
|
3
3
|
import type { UserContent } from "ai";
|
|
4
|
-
import type { CancelTurnResult, ClearSessionResult, CompactSessionResult, ResetSessionResult, Runtime, SessionAuthContext, SessionCallback, SessionSendCommandResult, TurnCaller } from "#channel/types.js";
|
|
4
|
+
import type { CancelTurnResult, ClearSessionResult, CompactSessionResult, ResetSessionResult, Runtime, SessionAuthContext, SessionCallback, SessionSendCommandResult, TurnPolicy, TurnCaller } from "#channel/types.js";
|
|
5
5
|
import type { SessionAuth } from "#context/keys.js";
|
|
6
6
|
import type { InputResponse } from "#runtime/input/types.js";
|
|
7
7
|
import type { JsonObject } from "#shared/json.js";
|
|
@@ -37,7 +37,9 @@ interface SessionDeliveryOptions {
|
|
|
37
37
|
readonly outputSchema?: JsonObject;
|
|
38
38
|
}
|
|
39
39
|
/** Options for sending a message through a fixed session handle. */
|
|
40
|
-
export type SessionSendOptions = SessionDeliveryOptions
|
|
40
|
+
export type SessionSendOptions = SessionDeliveryOptions & {
|
|
41
|
+
readonly turnPolicy?: TurnPolicy;
|
|
42
|
+
};
|
|
41
43
|
/** Options for answering pending input requests through a fixed session handle. */
|
|
42
44
|
export type SessionRespondOptions = SessionDeliveryOptions;
|
|
43
45
|
/**
|
|
@@ -57,10 +59,12 @@ export interface SessionHandle {
|
|
|
57
59
|
}
|
|
58
60
|
export declare function createSession(id: string, runtime: Runtime, metadata?: {
|
|
59
61
|
readonly requestId?: string;
|
|
62
|
+
readonly turnPolicy?: TurnPolicy;
|
|
60
63
|
}): Session;
|
|
61
64
|
/** Builds an I/O-free factory for fixed session-ID handles. */
|
|
62
65
|
export declare function createAttachSessionFn(runtime: Runtime, metadata?: {
|
|
63
66
|
readonly requestId?: string;
|
|
67
|
+
readonly turnPolicy?: TurnPolicy;
|
|
64
68
|
}): (sessionId: string) => Session;
|
|
65
69
|
/**
|
|
66
70
|
* Builds a live {@link SessionHandle} backed by the active context
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{serializeUrlFilePartsInMessage}from"#channel/send-input.js";import{AuthKey,ContinuationTokenKey,InitiatorAuthKey,SessionIdKey}from"#context/keys.js";import{toChannelLocalContinuationToken}from"#shared/continuation-token.js";function createSession(
|
|
1
|
+
import{serializeUrlFilePartsInMessage}from"#channel/send-input.js";import{DEFAULT_TURN_POLICY}from"#channel/types.js";import{AuthKey,ContinuationTokenKey,InitiatorAuthKey,SessionIdKey}from"#context/keys.js";import{toChannelLocalContinuationToken}from"#shared/continuation-token.js";function createSession(n,r,i={}){return{id:n,async send(a,o){let s=sessionCallbackToTurnCaller(o.callback),c={message:serializeUrlFilePartsInMessage(a)};o.context!==void 0&&(c.context=o.context),o.outputSchema!==void 0&&(c.outputSchema=o.outputSchema);let l={auth:o.auth,kind:`send`,payload:c,requestId:i.requestId,turnPolicy:o.turnPolicy??i.turnPolicy??DEFAULT_TURN_POLICY};return await r.dispatchSession({command:s===void 0?l:{...l,caller:s},sessionId:n})},async respond(e,t){if(e.length===0)throw Error(`respond() requires at least one input response.`);let a=sessionCallbackToTurnCaller(t.callback),o={inputResponses:e};t.context!==void 0&&(o.context=t.context),t.outputSchema!==void 0&&(o.outputSchema=t.outputSchema);let s={auth:t.auth,kind:`send`,payload:o,requestId:i.requestId};return await r.dispatchSession({command:a===void 0?s:{...s,caller:a},sessionId:n})},async cancel(e){return await r.dispatchSession({command:{kind:`cancel`,turnId:e?.turnId},sessionId:n})},async compact(){return await r.dispatchSession({command:{kind:`compact`},sessionId:n})},async clear(){return await r.dispatchSession({command:{kind:`clear`},sessionId:n})},async reset(e){return await r.dispatchSession({command:{kind:`reset`,reason:e?.reason},sessionId:n})},async getEventStream(e){return r.getEventStream(n,e)},async getStreamTailIndex(){return r.getStreamTailIndex(n)}}}function createAttachSessionFn(e,t={}){return n=>createSession(n,e,t)}function buildSessionHandle(e){return{get id(){return e.get(SessionIdKey)??``},get auth(){return{current:e.get(AuthKey)??null,initiator:e.get(InitiatorAuthKey)??null}},get continuation(){let t=e.get(ContinuationTokenKey);if(!(t===void 0||t.length===0))return{token:toChannelLocalContinuationToken(t),rekey(n){let i=namespaceContinuationToken(t,n);t!==i&&e.set(ContinuationTokenKey,i)}}}}}function namespaceContinuationToken(e,t){let n=e.indexOf(`:`);if(n<=0)throw Error(`Cannot set session continuation token without an existing namespaced continuation token. Start the session with a placeholder continuationToken.`);return`${e.slice(0,n+1)}${t}`}function sessionCallbackToTurnCaller(e){return e===void 0?void 0:{callId:e.callId,replyTo:{kind:`callback`,url:e.url},subagentName:e.subagentName}}export{buildSessionHandle,createAttachSessionFn,createSession,sessionCallbackToTurnCaller};
|
|
@@ -125,6 +125,10 @@ export interface DeliverPayload {
|
|
|
125
125
|
readonly outputSchema?: JsonObject;
|
|
126
126
|
readonly [key: string]: unknown;
|
|
127
127
|
}
|
|
128
|
+
/** Controls how a channel message interacts with an active turn. */
|
|
129
|
+
export type TurnPolicy = "steer" | "queue";
|
|
130
|
+
/** Default policy for message sends produced by current channel surfaces. */
|
|
131
|
+
export declare const DEFAULT_TURN_POLICY: TurnPolicy;
|
|
128
132
|
/** One command accepted by a durable session inbox. */
|
|
129
133
|
export type SessionCommand = {
|
|
130
134
|
readonly auth?: SessionAuthContext | null;
|
|
@@ -132,6 +136,7 @@ export type SessionCommand = {
|
|
|
132
136
|
readonly kind: "send";
|
|
133
137
|
readonly payload: DeliverPayload;
|
|
134
138
|
readonly requestId?: string;
|
|
139
|
+
readonly turnPolicy?: TurnPolicy;
|
|
135
140
|
} | {
|
|
136
141
|
readonly kind: "cancel";
|
|
137
142
|
readonly turnId?: string;
|
|
@@ -187,6 +192,7 @@ export interface DeliverHookPayload {
|
|
|
187
192
|
readonly requestId?: string;
|
|
188
193
|
readonly kind: "deliver";
|
|
189
194
|
readonly payloads: readonly DeliverPayload[];
|
|
195
|
+
readonly turnPolicy?: TurnPolicy;
|
|
190
196
|
}
|
|
191
197
|
/** Internal deadline signal sent through the stable session command inbox. */
|
|
192
198
|
export interface SessionTimeoutHookPayload {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{};
|
|
1
|
+
const DEFAULT_TURN_POLICY=`steer`;export{DEFAULT_TURN_POLICY};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { computed, onScopeDispose, shallowRef } from "vue";
|
|
2
2
|
import { z } from "#compiled/zod/index.js";
|
|
3
|
+
import { asSchema } from "ai";
|
|
3
4
|
|
|
4
5
|
//#region src/protocol/routes.ts
|
|
5
6
|
const EVE_ROUTE_PREFIX = "/eve/v1";
|
|
@@ -17,7 +18,8 @@ const EVE_DEV_RUNTIME_ARTIFACTS_ROUTE_PATH = `${EVE_ROUTE_PREFIX}/dev/runtime-ar
|
|
|
17
18
|
const EVE_DEV_RUNTIME_ARTIFACTS_REBUILD_ROUTE_PATH = `${EVE_DEV_RUNTIME_ARTIFACTS_ROUTE_PATH}/rebuild`;
|
|
18
19
|
const EVE_DEV_RUNTIME_ARTIFACTS_SUSPEND_ROUTE_PATH = `${EVE_DEV_RUNTIME_ARTIFACTS_ROUTE_PATH}/suspend`;
|
|
19
20
|
const EVE_DEV_RUNTIME_ARTIFACTS_RESUME_ROUTE_PATH = `${EVE_DEV_RUNTIME_ARTIFACTS_ROUTE_PATH}/resume`;
|
|
20
|
-
const EVE_CONNECTION_CALLBACK_ROUTE_PATTERN = `${EVE_ROUTE_PREFIX}/connections/:name/callback/:token`;
|
|
21
|
+
const EVE_CONNECTION_CALLBACK_ROUTE_PATTERN = `${EVE_ROUTE_PREFIX}/connections/:name/callback/:attemptId/:token`;
|
|
22
|
+
const EVE_LEGACY_CONNECTION_CALLBACK_ROUTE_PATTERN = `${EVE_ROUTE_PREFIX}/connections/:name/callback/:token`;
|
|
21
23
|
const EVE_CALLBACK_ROUTE_PATTERN = `${EVE_ROUTE_PREFIX}/callback/:token`;
|
|
22
24
|
function createEveSessionRoutePath(sessionId) {
|
|
23
25
|
return `${EVE_SESSION_ROUTE_PATH}/${encodeURIComponent(sessionId)}`;
|
|
@@ -90,6 +92,31 @@ const modelEndpoint = z.union([
|
|
|
90
92
|
connected: z.literal(false)
|
|
91
93
|
})
|
|
92
94
|
]);
|
|
95
|
+
const agentModelBaseFields = {
|
|
96
|
+
contextWindowTokens: z.number().optional(),
|
|
97
|
+
providerOptions: z.unknown().optional(),
|
|
98
|
+
reasoning: z.enum([
|
|
99
|
+
"provider-default",
|
|
100
|
+
"none",
|
|
101
|
+
"minimal",
|
|
102
|
+
"low",
|
|
103
|
+
"medium",
|
|
104
|
+
"high",
|
|
105
|
+
"xhigh"
|
|
106
|
+
]).optional().catch(void 0),
|
|
107
|
+
source: source.optional()
|
|
108
|
+
};
|
|
109
|
+
const agentModel = z.union([z.object({
|
|
110
|
+
...agentModelBaseFields,
|
|
111
|
+
id: z.string(),
|
|
112
|
+
routing: modelRouting,
|
|
113
|
+
endpoint: modelEndpoint.optional()
|
|
114
|
+
}).strict(), z.object({
|
|
115
|
+
...agentModelBaseFields,
|
|
116
|
+
endpoint: z.never().optional(),
|
|
117
|
+
id: z.never().optional(),
|
|
118
|
+
routing: z.object({ kind: z.literal("dynamic") }).strict()
|
|
119
|
+
}).strict()]);
|
|
93
120
|
const tool = entry.extend({
|
|
94
121
|
description: z.string(),
|
|
95
122
|
hasAuth: z.boolean(),
|
|
@@ -186,23 +213,7 @@ const AgentInfoResultSchema = z.object({
|
|
|
186
213
|
appRoot: z.string(),
|
|
187
214
|
configSource: source.optional(),
|
|
188
215
|
description: z.string().optional(),
|
|
189
|
-
model:
|
|
190
|
-
contextWindowTokens: z.number().optional(),
|
|
191
|
-
id: z.string(),
|
|
192
|
-
providerOptions: z.unknown().optional(),
|
|
193
|
-
reasoning: z.enum([
|
|
194
|
-
"provider-default",
|
|
195
|
-
"none",
|
|
196
|
-
"minimal",
|
|
197
|
-
"low",
|
|
198
|
-
"medium",
|
|
199
|
-
"high",
|
|
200
|
-
"xhigh"
|
|
201
|
-
]).optional().catch(void 0),
|
|
202
|
-
source: source.optional(),
|
|
203
|
-
routing: modelRouting.optional(),
|
|
204
|
-
endpoint: modelEndpoint.optional()
|
|
205
|
-
}),
|
|
216
|
+
model: agentModel,
|
|
206
217
|
name: z.string(),
|
|
207
218
|
outputSchema: z.unknown().optional()
|
|
208
219
|
}),
|
|
@@ -503,19 +514,28 @@ async function* readNdjsonStream(body) {
|
|
|
503
514
|
//#endregion
|
|
504
515
|
//#region src/client/url.ts
|
|
505
516
|
function createClientUrl(host, routePath, searchParams) {
|
|
506
|
-
const
|
|
517
|
+
const queryIndex = routePath.indexOf("?");
|
|
518
|
+
const pathOnly = queryIndex === -1 ? routePath : routePath.slice(0, queryIndex);
|
|
519
|
+
const embeddedQuery = queryIndex === -1 ? "" : routePath.slice(queryIndex + 1);
|
|
520
|
+
const normalizedRoute = pathOnly.startsWith("/") ? pathOnly : `/${pathOnly}`;
|
|
507
521
|
if (isAbsoluteUrl(host)) {
|
|
508
522
|
const url = new URL(host);
|
|
509
523
|
url.pathname = `${trimTrailingSlash(url.pathname)}${normalizedRoute}`;
|
|
524
|
+
mergeEmbeddedQuery(url.searchParams, embeddedQuery);
|
|
510
525
|
mergeSearchParams(url.searchParams, searchParams);
|
|
511
526
|
url.hash = "";
|
|
512
527
|
return url.toString();
|
|
513
528
|
}
|
|
514
529
|
const url = new URL(host, "http://eve.local");
|
|
515
530
|
const basePath = trimTrailingSlash(url.pathname);
|
|
531
|
+
mergeEmbeddedQuery(url.searchParams, embeddedQuery);
|
|
516
532
|
mergeSearchParams(url.searchParams, searchParams);
|
|
517
533
|
return `${basePath}${normalizedRoute}${formatSearch(url.searchParams)}`;
|
|
518
534
|
}
|
|
535
|
+
function mergeEmbeddedQuery(target, embeddedQuery) {
|
|
536
|
+
if (embeddedQuery.length === 0) return;
|
|
537
|
+
for (const [name, value] of new URLSearchParams(embeddedQuery)) target.append(name, value);
|
|
538
|
+
}
|
|
519
539
|
function isAbsoluteUrl(value) {
|
|
520
540
|
return /^[a-z][a-z\d+\-.]*:/i.test(value);
|
|
521
541
|
}
|
|
@@ -888,11 +908,25 @@ function serializeSchema(source, direction) {
|
|
|
888
908
|
return toJsonObject(source, direction);
|
|
889
909
|
}
|
|
890
910
|
function toJsonObject(source, direction) {
|
|
891
|
-
const
|
|
911
|
+
const standard = getStandardSchemaProperties(source);
|
|
912
|
+
const jsonSchema = standard?.jsonSchema;
|
|
913
|
+
const emit = typeof jsonSchema === "object" && jsonSchema !== null ? jsonSchema[direction] : void 0;
|
|
914
|
+
const vendor = typeof standard?.vendor === "string" ? standard.vendor : "unknown";
|
|
915
|
+
if (standard !== void 0 && typeof emit !== "function" && vendor === "zod") {
|
|
916
|
+
if (direction === "input") {
|
|
917
|
+
const { $schema: _schemaVersion, ...canonical } = parseJsonObject(asSchema(source).jsonSchema);
|
|
918
|
+
return canonical;
|
|
919
|
+
}
|
|
920
|
+
throw new Error("Zod 3 cannot emit an output JSON Schema. Upgrade to Zod 4 or provide a plain JSON Schema object.");
|
|
921
|
+
}
|
|
922
|
+
if (standard !== void 0 && typeof emit !== "function") throw new Error(`Standard Schema vendor "${vendor}" does not support JSON Schema conversion. Provide a Standard Schema implementation with JSON Schema conversion or a plain JSON Schema object.`);
|
|
923
|
+
const { $schema: _schemaVersion, ...canonical } = standard === void 0 ? parseJsonObject(source) : parseJsonObject(emit({ target: JSON_SCHEMA_TARGET }));
|
|
892
924
|
return canonical;
|
|
893
925
|
}
|
|
894
|
-
function
|
|
895
|
-
|
|
926
|
+
function getStandardSchemaProperties(value) {
|
|
927
|
+
if (typeof value !== "object" || value === null || !("~standard" in value)) return void 0;
|
|
928
|
+
const standard = value["~standard"];
|
|
929
|
+
return typeof standard === "object" && standard !== null ? standard : void 0;
|
|
896
930
|
}
|
|
897
931
|
|
|
898
932
|
//#endregion
|
|
@@ -1073,6 +1107,7 @@ function createMessageBody(input, requireMessage) {
|
|
|
1073
1107
|
const body = {};
|
|
1074
1108
|
if (input.message !== void 0) body.message = input.message;
|
|
1075
1109
|
if (input.inputResponses !== void 0 && input.inputResponses.length > 0) body.inputResponses = input.inputResponses;
|
|
1110
|
+
if (!requireMessage && input.message !== void 0 && input.turnPolicy !== void 0) body.turnPolicy = input.turnPolicy;
|
|
1076
1111
|
if (input.clientContext !== void 0) body.clientContext = input.clientContext;
|
|
1077
1112
|
const outputSchema = serializeOutputSchema(input.outputSchema);
|
|
1078
1113
|
if (outputSchema !== void 0) body.outputSchema = outputSchema;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createSubscriber } from "svelte/reactivity";
|
|
2
2
|
import { z } from "#compiled/zod/index.js";
|
|
3
|
+
import { asSchema } from "ai";
|
|
3
4
|
|
|
4
5
|
//#region src/protocol/routes.ts
|
|
5
6
|
const EVE_ROUTE_PREFIX = "/eve/v1";
|
|
@@ -17,7 +18,8 @@ const EVE_DEV_RUNTIME_ARTIFACTS_ROUTE_PATH = `${EVE_ROUTE_PREFIX}/dev/runtime-ar
|
|
|
17
18
|
const EVE_DEV_RUNTIME_ARTIFACTS_REBUILD_ROUTE_PATH = `${EVE_DEV_RUNTIME_ARTIFACTS_ROUTE_PATH}/rebuild`;
|
|
18
19
|
const EVE_DEV_RUNTIME_ARTIFACTS_SUSPEND_ROUTE_PATH = `${EVE_DEV_RUNTIME_ARTIFACTS_ROUTE_PATH}/suspend`;
|
|
19
20
|
const EVE_DEV_RUNTIME_ARTIFACTS_RESUME_ROUTE_PATH = `${EVE_DEV_RUNTIME_ARTIFACTS_ROUTE_PATH}/resume`;
|
|
20
|
-
const EVE_CONNECTION_CALLBACK_ROUTE_PATTERN = `${EVE_ROUTE_PREFIX}/connections/:name/callback/:token`;
|
|
21
|
+
const EVE_CONNECTION_CALLBACK_ROUTE_PATTERN = `${EVE_ROUTE_PREFIX}/connections/:name/callback/:attemptId/:token`;
|
|
22
|
+
const EVE_LEGACY_CONNECTION_CALLBACK_ROUTE_PATTERN = `${EVE_ROUTE_PREFIX}/connections/:name/callback/:token`;
|
|
21
23
|
const EVE_CALLBACK_ROUTE_PATTERN = `${EVE_ROUTE_PREFIX}/callback/:token`;
|
|
22
24
|
function createEveSessionRoutePath(sessionId) {
|
|
23
25
|
return `${EVE_SESSION_ROUTE_PATH}/${encodeURIComponent(sessionId)}`;
|
|
@@ -90,6 +92,31 @@ const modelEndpoint = z.union([
|
|
|
90
92
|
connected: z.literal(false)
|
|
91
93
|
})
|
|
92
94
|
]);
|
|
95
|
+
const agentModelBaseFields = {
|
|
96
|
+
contextWindowTokens: z.number().optional(),
|
|
97
|
+
providerOptions: z.unknown().optional(),
|
|
98
|
+
reasoning: z.enum([
|
|
99
|
+
"provider-default",
|
|
100
|
+
"none",
|
|
101
|
+
"minimal",
|
|
102
|
+
"low",
|
|
103
|
+
"medium",
|
|
104
|
+
"high",
|
|
105
|
+
"xhigh"
|
|
106
|
+
]).optional().catch(void 0),
|
|
107
|
+
source: source.optional()
|
|
108
|
+
};
|
|
109
|
+
const agentModel = z.union([z.object({
|
|
110
|
+
...agentModelBaseFields,
|
|
111
|
+
id: z.string(),
|
|
112
|
+
routing: modelRouting,
|
|
113
|
+
endpoint: modelEndpoint.optional()
|
|
114
|
+
}).strict(), z.object({
|
|
115
|
+
...agentModelBaseFields,
|
|
116
|
+
endpoint: z.never().optional(),
|
|
117
|
+
id: z.never().optional(),
|
|
118
|
+
routing: z.object({ kind: z.literal("dynamic") }).strict()
|
|
119
|
+
}).strict()]);
|
|
93
120
|
const tool = entry.extend({
|
|
94
121
|
description: z.string(),
|
|
95
122
|
hasAuth: z.boolean(),
|
|
@@ -186,23 +213,7 @@ const AgentInfoResultSchema = z.object({
|
|
|
186
213
|
appRoot: z.string(),
|
|
187
214
|
configSource: source.optional(),
|
|
188
215
|
description: z.string().optional(),
|
|
189
|
-
model:
|
|
190
|
-
contextWindowTokens: z.number().optional(),
|
|
191
|
-
id: z.string(),
|
|
192
|
-
providerOptions: z.unknown().optional(),
|
|
193
|
-
reasoning: z.enum([
|
|
194
|
-
"provider-default",
|
|
195
|
-
"none",
|
|
196
|
-
"minimal",
|
|
197
|
-
"low",
|
|
198
|
-
"medium",
|
|
199
|
-
"high",
|
|
200
|
-
"xhigh"
|
|
201
|
-
]).optional().catch(void 0),
|
|
202
|
-
source: source.optional(),
|
|
203
|
-
routing: modelRouting.optional(),
|
|
204
|
-
endpoint: modelEndpoint.optional()
|
|
205
|
-
}),
|
|
216
|
+
model: agentModel,
|
|
206
217
|
name: z.string(),
|
|
207
218
|
outputSchema: z.unknown().optional()
|
|
208
219
|
}),
|
|
@@ -503,19 +514,28 @@ async function* readNdjsonStream(body) {
|
|
|
503
514
|
//#endregion
|
|
504
515
|
//#region src/client/url.ts
|
|
505
516
|
function createClientUrl(host, routePath, searchParams) {
|
|
506
|
-
const
|
|
517
|
+
const queryIndex = routePath.indexOf("?");
|
|
518
|
+
const pathOnly = queryIndex === -1 ? routePath : routePath.slice(0, queryIndex);
|
|
519
|
+
const embeddedQuery = queryIndex === -1 ? "" : routePath.slice(queryIndex + 1);
|
|
520
|
+
const normalizedRoute = pathOnly.startsWith("/") ? pathOnly : `/${pathOnly}`;
|
|
507
521
|
if (isAbsoluteUrl(host)) {
|
|
508
522
|
const url = new URL(host);
|
|
509
523
|
url.pathname = `${trimTrailingSlash(url.pathname)}${normalizedRoute}`;
|
|
524
|
+
mergeEmbeddedQuery(url.searchParams, embeddedQuery);
|
|
510
525
|
mergeSearchParams(url.searchParams, searchParams);
|
|
511
526
|
url.hash = "";
|
|
512
527
|
return url.toString();
|
|
513
528
|
}
|
|
514
529
|
const url = new URL(host, "http://eve.local");
|
|
515
530
|
const basePath = trimTrailingSlash(url.pathname);
|
|
531
|
+
mergeEmbeddedQuery(url.searchParams, embeddedQuery);
|
|
516
532
|
mergeSearchParams(url.searchParams, searchParams);
|
|
517
533
|
return `${basePath}${normalizedRoute}${formatSearch(url.searchParams)}`;
|
|
518
534
|
}
|
|
535
|
+
function mergeEmbeddedQuery(target, embeddedQuery) {
|
|
536
|
+
if (embeddedQuery.length === 0) return;
|
|
537
|
+
for (const [name, value] of new URLSearchParams(embeddedQuery)) target.append(name, value);
|
|
538
|
+
}
|
|
519
539
|
function isAbsoluteUrl(value) {
|
|
520
540
|
return /^[a-z][a-z\d+\-.]*:/i.test(value);
|
|
521
541
|
}
|
|
@@ -888,11 +908,25 @@ function serializeSchema(source, direction) {
|
|
|
888
908
|
return toJsonObject(source, direction);
|
|
889
909
|
}
|
|
890
910
|
function toJsonObject(source, direction) {
|
|
891
|
-
const
|
|
911
|
+
const standard = getStandardSchemaProperties(source);
|
|
912
|
+
const jsonSchema = standard?.jsonSchema;
|
|
913
|
+
const emit = typeof jsonSchema === "object" && jsonSchema !== null ? jsonSchema[direction] : void 0;
|
|
914
|
+
const vendor = typeof standard?.vendor === "string" ? standard.vendor : "unknown";
|
|
915
|
+
if (standard !== void 0 && typeof emit !== "function" && vendor === "zod") {
|
|
916
|
+
if (direction === "input") {
|
|
917
|
+
const { $schema: _schemaVersion, ...canonical } = parseJsonObject(asSchema(source).jsonSchema);
|
|
918
|
+
return canonical;
|
|
919
|
+
}
|
|
920
|
+
throw new Error("Zod 3 cannot emit an output JSON Schema. Upgrade to Zod 4 or provide a plain JSON Schema object.");
|
|
921
|
+
}
|
|
922
|
+
if (standard !== void 0 && typeof emit !== "function") throw new Error(`Standard Schema vendor "${vendor}" does not support JSON Schema conversion. Provide a Standard Schema implementation with JSON Schema conversion or a plain JSON Schema object.`);
|
|
923
|
+
const { $schema: _schemaVersion, ...canonical } = standard === void 0 ? parseJsonObject(source) : parseJsonObject(emit({ target: JSON_SCHEMA_TARGET }));
|
|
892
924
|
return canonical;
|
|
893
925
|
}
|
|
894
|
-
function
|
|
895
|
-
|
|
926
|
+
function getStandardSchemaProperties(value) {
|
|
927
|
+
if (typeof value !== "object" || value === null || !("~standard" in value)) return void 0;
|
|
928
|
+
const standard = value["~standard"];
|
|
929
|
+
return typeof standard === "object" && standard !== null ? standard : void 0;
|
|
896
930
|
}
|
|
897
931
|
|
|
898
932
|
//#endregion
|
|
@@ -1073,6 +1107,7 @@ function createMessageBody(input, requireMessage) {
|
|
|
1073
1107
|
const body = {};
|
|
1074
1108
|
if (input.message !== void 0) body.message = input.message;
|
|
1075
1109
|
if (input.inputResponses !== void 0 && input.inputResponses.length > 0) body.inputResponses = input.inputResponses;
|
|
1110
|
+
if (!requireMessage && input.message !== void 0 && input.turnPolicy !== void 0) body.turnPolicy = input.turnPolicy;
|
|
1076
1111
|
if (input.clientContext !== void 0) body.clientContext = input.clientContext;
|
|
1077
1112
|
const outputSchema = serializeOutputSchema(input.outputSchema);
|
|
1078
1113
|
if (outputSchema !== void 0) body.outputSchema = outputSchema;
|
|
@@ -16,3 +16,6 @@ the coding harness's prompt tools when available, and do not guess.
|
|
|
16
16
|
under `agent/connections/`. When a system needs every end-user to sign in, wire
|
|
17
17
|
its auth through **Vercel Connect** (`connect()` from `@vercel/connect/eve`),
|
|
18
18
|
which handles consent, encrypted token storage, and refresh.
|
|
19
|
+
4. Does the user want a specific AI Gateway model or reasoning effort? If so,
|
|
20
|
+
pass its `provider/model-id` to `eve init --model` and its reasoning effort to
|
|
21
|
+
`--reasoning`; otherwise, use eve's defaults.
|
|
@@ -4,7 +4,7 @@ First settle the target: a new project, or the agent added to an existing
|
|
|
4
4
|
directory? For a new project, propose a name and ask the user to confirm it; for
|
|
5
5
|
an existing one, ask for the directory.
|
|
6
6
|
|
|
7
|
-
For a new project, run (
|
|
7
|
+
For a new project, run (`--channel-web-nextjs` is only for users who want Web
|
|
8
8
|
Chat):
|
|
9
9
|
|
|
10
10
|
npx eve@latest init <name>
|
|
@@ -18,5 +18,7 @@ If the user wants a reusable extension package instead of an agent, run
|
|
|
18
18
|
|
|
19
19
|
For an existing app, run `npx eve@latest init .` from its directory. This adds the
|
|
20
20
|
agent and missing dependencies while leaving the existing Git repository and app
|
|
21
|
-
scripts alone.
|
|
21
|
+
scripts alone. Append `--model provider/model-id` or `--reasoning effort` to
|
|
22
|
+
either init command when the user chose those settings. If init cannot be used,
|
|
23
|
+
install by hand with
|
|
22
24
|
`npm install eve@latest ai zod`; manual installation does not add package scripts.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createCliTheme,renderCliBanner,renderCliSection}from"#cli/ui/output.js";import{inspectApplication}from"#services/inspect-application.js";function buildApplicationInfoJson(e){let{application:t,compiledState:n,messaging:r}=e;return{appRoot:t.appRoot,agentRoot:n?.project.agentRoot??null,layout:n?.project.layout??null,status:n?.metadata.status??`unavailable`,diagnostics:n?{errors:n.metadata.discovery.summary.errors,warnings:n.metadata.discovery.summary.warnings}:null,model:n?.manifest.config.model
|
|
1
|
+
import{createCliTheme,renderCliBanner,renderCliSection}from"#cli/ui/output.js";import{inspectApplication}from"#services/inspect-application.js";function buildApplicationInfoJson(e){let{application:t,compiledState:n,messaging:r}=e;return{appRoot:t.appRoot,agentRoot:n?.project.agentRoot??null,layout:n?.project.layout??null,status:n?.metadata.status??`unavailable`,diagnostics:n?{errors:n.metadata.discovery.summary.errors,warnings:n.metadata.discovery.summary.warnings}:null,model:n?.manifest.config.model?.id??null,instructions:n?.manifest.instructions?.logicalPath??null,skills:(n?.manifest.skills??[]).map(e=>e.name),tools:(n?.manifest.tools??[]).map(e=>e.name),subagents:(n?.manifest.subagents??[]).map(e=>e.name),schedules:(n?.manifest.schedules??[]).map(e=>e.name),channels:(n?.manifest.channels??[]).map(e=>e.kind===`channel`?{name:e.name,kind:e.adapterKind??null,method:e.method,urlPath:e.urlPath}:{name:e.name,kind:`disabled`,method:null,urlPath:null}),messaging:{create:r.createSessionRoutePath,messages:r.sessionMessagesRoutePattern,stream:r.streamRoutePattern},artifacts:n?{compiledManifest:n.paths.compiledManifestPath,discoveryManifest:n.paths.discoveryManifestPath,diagnostics:n.paths.diagnosticsPath,moduleMap:n.paths.moduleMapPath,metadata:n.paths.compileMetadataPath}:null}}function pluralize(e,t){return`${e} ${t}${e===1?``:`s`}`}function formatDiscoverySummary(e,t){return`${pluralize(e,`error`)}, ${pluralize(t,`warning`)}`}function resolveCompileTone(e){switch(e){case`ready`:return`success`;case`failed`:return`danger`;default:return`warning`}}async function printApplicationInfo(i,a,o={}){let s=await inspectApplication(a);if(o.json){i.log(JSON.stringify(buildApplicationInfoJson(s),null,2));return}let c=s.compiledState,l=s.application,u=createCliTheme(),d=[{label:`App Root`,value:l.appRoot}],f=[{label:`Workflow Build`,value:l.workflowBuildDir},{label:`Output`,value:l.outputDir}],p=[];c===null?d.push({label:`Compile`,tone:`warning`,value:`unavailable`}):(d.push({label:`Agent Root`,value:c.project.agentRoot},{label:`Layout`,value:c.project.layout},{label:`Compile`,tone:resolveCompileTone(c.metadata.status),value:c.metadata.status},{label:`Diagnostics`,tone:c.metadata.discovery.summary.errors>0?`danger`:c.metadata.discovery.summary.warnings>0?`warning`:`success`,value:formatDiscoverySummary(c.metadata.discovery.summary.errors,c.metadata.discovery.summary.warnings)},{label:`Instructions`,value:c.manifest.instructions?.logicalPath??`none`},{label:`Skills`,value:pluralize(c.manifest.skills.length,`skill`)},{label:`Tools`,value:pluralize(c.manifest.tools.length,`tool`)},{label:`Subagents`,value:pluralize(c.manifest.subagents.length,`subagent`)},{label:`Schedules`,value:pluralize(c.manifest.schedules.length,`schedule`)}),f.unshift({label:`Compiled Manifest`,value:c.paths.compiledManifestPath},{label:`Discovery Manifest`,value:c.paths.discoveryManifestPath},{label:`Diagnostics`,value:c.paths.diagnosticsPath},{label:`Module Map`,value:c.paths.moduleMapPath},{label:`Metadata`,value:c.paths.compileMetadataPath}),p.push(c.manifest.instructions===void 0?{label:`Instructions`,value:`No instructions prompt discovered.`}:{label:`Instructions`,value:c.manifest.instructions.logicalPath})),i.log([renderCliBanner(u,{subtitle:`Resolved application paths and the active message contract.`,title:`eve Info`}),``,renderCliSection(u,{rows:d,title:`Application`}),``,renderCliSection(u,{rows:f,title:`Artifacts`}),...c===null?[]:[``,renderCliSection(u,{rows:p,title:`Instructions`})],``,renderCliSection(u,{rows:[{label:`Workflow ID`,value:l.workflowId},{label:`Source Dir`,value:l.workflowSourceDir},{label:`Create`,tone:`info`,value:`POST ${s.messaging.createSessionRoutePath}`},{label:`Messages`,tone:`info`,value:`POST ${s.messaging.sessionMessagesRoutePattern}`},{label:`Stream`,tone:`info`,value:`GET ${s.messaging.streamRoutePattern}`}],title:`Messaging`})].join(`
|
|
2
2
|
`))}export{buildApplicationInfoJson,printApplicationInfo};
|