eve 0.6.0-beta.8 → 0.7.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 +278 -0
- package/README.md +9 -6
- package/dist/docs/public/README.md +1 -1
- package/dist/docs/public/advanced/auth-and-route-protection.md +3 -1
- package/dist/docs/public/advanced/default-harness.md +2 -2
- package/dist/docs/public/advanced/dev-tui.md +9 -11
- package/dist/docs/public/advanced/instrumentation.md +1 -1
- package/dist/docs/public/advanced/meta.json +0 -1
- package/dist/docs/public/advanced/security-model.md +1 -1
- package/dist/docs/public/advanced/session-context.md +1 -1
- package/dist/docs/public/agent-config.md +6 -3
- package/dist/docs/public/channels/eve.mdx +1 -1
- package/dist/docs/public/channels/slack.mdx +14 -2
- package/dist/docs/public/connections.mdx +3 -1
- package/dist/docs/public/evals/assertions.mdx +108 -0
- package/dist/docs/public/evals/cases.mdx +143 -0
- package/dist/docs/public/evals/judge.mdx +94 -0
- package/dist/docs/public/evals/meta.json +4 -0
- package/dist/docs/public/evals/overview.mdx +118 -0
- package/dist/docs/public/evals/reporters.mdx +62 -0
- package/dist/docs/public/evals/running.mdx +63 -0
- package/dist/docs/public/evals/targets.mdx +54 -0
- package/dist/docs/public/frontend/nextjs.mdx +13 -4
- package/dist/docs/public/frontend/nuxt.mdx +4 -4
- package/dist/docs/public/frontend/sveltekit.mdx +2 -2
- package/dist/docs/public/getting-started.mdx +25 -13
- package/dist/docs/public/meta.json +1 -0
- package/dist/docs/public/reference/cli.md +31 -9
- package/dist/docs/public/reference/typescript-api.md +6 -2
- package/dist/docs/public/sandbox.mdx +3 -1
- package/dist/docs/public/tools.mdx +0 -4
- package/dist/docs/public/tutorial/connect-a-warehouse.mdx +1 -1
- package/dist/docs/public/tutorial/first-agent.mdx +5 -2
- package/dist/src/chunks/{use-eve-agent-DCZbkLG7.js → use-eve-agent-DErQj5hs.js} +125 -37
- package/dist/src/chunks/{use-eve-agent-DoheC4_o.js → use-eve-agent-DoR8C4i6.js} +125 -37
- package/dist/src/cli/banner.d.ts +7 -0
- package/dist/src/cli/banner.js +1 -0
- package/dist/src/cli/commands/channel-add-conflicts.d.ts +1 -1
- package/dist/src/cli/commands/channels.d.ts +9 -6
- package/dist/src/cli/commands/channels.js +1 -1
- package/dist/src/cli/commands/deploy.d.ts +21 -0
- package/dist/src/cli/commands/deploy.js +1 -0
- package/dist/src/cli/commands/init-git.d.ts +15 -0
- package/dist/src/cli/commands/init-git.js +1 -0
- package/dist/src/cli/commands/init.d.ts +29 -0
- package/dist/src/cli/commands/init.js +1 -0
- package/dist/src/cli/commands/link.d.ts +21 -0
- package/dist/src/cli/commands/link.js +1 -0
- package/dist/src/cli/commands/preconditions.d.ts +7 -0
- package/dist/src/cli/commands/preconditions.js +1 -0
- package/dist/src/cli/commands/register-project-commands.d.ts +12 -0
- package/dist/src/cli/commands/register-project-commands.js +1 -0
- package/dist/src/cli/dev/tui/agent-header.d.ts +15 -9
- package/dist/src/cli/dev/tui/agent-header.js +1 -1
- package/dist/src/cli/dev/tui/blocks.d.ts +1 -1
- package/dist/src/cli/dev/tui/blocks.js +3 -2
- package/dist/src/cli/dev/tui/command-typeahead.d.ts +47 -0
- package/dist/src/cli/dev/tui/command-typeahead.js +1 -0
- package/dist/src/cli/dev/tui/dev-rebuild-status.d.ts +21 -0
- package/dist/src/cli/dev/tui/dev-rebuild-status.js +1 -0
- package/dist/src/cli/dev/tui/errors.d.ts +18 -0
- package/dist/src/cli/dev/tui/errors.js +1 -1
- package/dist/src/cli/dev/tui/prompt-command-handler.d.ts +14 -0
- package/dist/src/cli/dev/tui/prompt-command-handler.js +1 -0
- package/dist/src/cli/dev/tui/prompt-commands.d.ts +54 -0
- package/dist/src/cli/dev/tui/prompt-commands.js +2 -0
- package/dist/src/cli/dev/tui/runner.d.ts +62 -5
- package/dist/src/cli/dev/tui/runner.js +1 -1
- package/dist/src/cli/dev/tui/setup-commands.d.ts +48 -0
- package/dist/src/cli/dev/tui/setup-commands.js +2 -0
- package/dist/src/cli/dev/tui/setup-flow.d.ts +35 -0
- package/dist/src/cli/dev/tui/setup-issues.d.ts +40 -0
- package/dist/src/cli/dev/tui/setup-issues.js +1 -0
- package/dist/src/cli/dev/tui/setup-panel.d.ts +103 -0
- package/dist/src/cli/dev/tui/setup-panel.js +1 -0
- package/dist/src/cli/dev/tui/status-line.d.ts +25 -0
- package/dist/src/cli/dev/tui/status-line.js +1 -0
- package/dist/src/cli/dev/tui/stream-format.d.ts +16 -1
- package/dist/src/cli/dev/tui/stream-format.js +1 -1
- package/dist/src/cli/dev/tui/terminal-renderer.d.ts +32 -3
- package/dist/src/cli/dev/tui/terminal-renderer.js +5 -2
- package/dist/src/cli/dev/tui/test/index.d.ts +3 -1
- package/dist/src/cli/dev/tui/test/index.js +1 -1
- package/dist/src/cli/dev/tui/test/mock-terminal.d.ts +1 -0
- package/dist/src/cli/dev/tui/test/mock-terminal.js +1 -1
- package/dist/src/cli/dev/tui/theme.d.ts +10 -0
- package/dist/src/cli/dev/tui/theme.js +1 -1
- package/dist/src/cli/dev/tui/tui-prompter.d.ts +20 -0
- package/dist/src/cli/dev/tui/tui-prompter.js +1 -0
- package/dist/src/cli/dev/tui/tui.d.ts +6 -8
- package/dist/src/cli/dev/tui/tui.js +1 -1
- package/dist/src/cli/dev/tui/types.d.ts +4 -3
- package/dist/src/cli/dev/tui/vercel-status.d.ts +47 -0
- package/dist/src/cli/dev/tui/vercel-status.js +1 -0
- package/dist/src/cli/run.d.ts +12 -19
- package/dist/src/cli/run.js +2 -2
- package/dist/src/client/client.d.ts +8 -0
- package/dist/src/client/client.js +1 -1
- package/dist/src/client/file-parts.d.ts +18 -0
- package/dist/src/client/file-parts.js +1 -0
- package/dist/src/client/index.d.ts +3 -2
- package/dist/src/client/index.js +1 -1
- package/dist/src/client/message-response.js +1 -1
- package/dist/src/client/open-stream.d.ts +6 -0
- package/dist/src/client/open-stream.js +1 -1
- package/dist/src/client/session-utils.d.ts +5 -0
- package/dist/src/client/session-utils.js +1 -1
- package/dist/src/client/session.js +1 -1
- package/dist/src/client/types.d.ts +9 -2
- package/dist/src/compiled/.vendor-stamp.json +8 -8
- package/dist/src/compiled/@ai-sdk/anthropic/index.d.ts +56 -31
- package/dist/src/compiled/@ai-sdk/anthropic/index.js +2 -2
- package/dist/src/compiled/@ai-sdk/google/index.js +1 -1
- package/dist/src/compiled/@ai-sdk/mcp/index.js +1 -1
- package/dist/src/compiled/@ai-sdk/openai/index.d.ts +16 -9
- package/dist/src/compiled/@ai-sdk/openai/index.js +2 -2
- package/dist/src/compiled/@ai-sdk/otel/index.js +2 -2
- package/dist/src/compiled/@vercel/sandbox/index.js +1 -1
- package/dist/src/compiled/@workflow/core/index.js +2 -2
- package/dist/src/compiled/@workflow/core/runtime/helpers.d.ts +4 -2
- package/dist/src/compiled/@workflow/core/runtime/wait-until.d.ts +18 -0
- package/dist/src/compiled/@workflow/core/runtime.d.ts +3 -1
- package/dist/src/compiled/@workflow/core/runtime.js +28 -28
- package/dist/src/compiled/@workflow/core/serialization.d.ts +41 -0
- package/dist/src/compiled/@workflow/core/util.d.ts +0 -5
- package/dist/src/compiled/@workflow/core/version.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/workflow.js +1 -1
- package/dist/src/compiled/@workflow/world/index.d.ts +2 -2
- package/dist/src/compiled/@workflow/world/queue.d.ts +28 -2
- package/dist/src/compiled/_chunks/workflow/{dist-gEXVSMPU.js → dist-CkMRLaRV.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/functions-DuPjIvMH.js +1 -0
- package/dist/src/compiled/_chunks/workflow/resume-hook-CEAS3opc.js +12 -0
- package/dist/src/compiled/_chunks/workflow/sleep-Cup6vPoA.js +1 -0
- package/dist/src/compiled/_chunks/workflow/{symbols-BWCAoPHE.js → symbols-BUTtwS7j.js} +1 -1
- package/dist/src/compiled/just-bash/index.d.ts +27 -4
- package/dist/src/compiler/artifacts.js +1 -1
- package/dist/src/compiler/manifest.d.ts +8 -8
- package/dist/src/compiler/normalize-agent-config.d.ts +0 -10
- package/dist/src/compiler/normalize-agent-config.js +1 -1
- package/dist/src/compiler/normalize-channel.d.ts +2 -1
- package/dist/src/compiler/normalize-channel.js +1 -1
- package/dist/src/compiler/normalize-connection.d.ts +2 -1
- package/dist/src/compiler/normalize-connection.js +1 -1
- package/dist/src/compiler/normalize-helpers.d.ts +5 -0
- package/dist/src/compiler/normalize-helpers.js +1 -1
- package/dist/src/compiler/normalize-instructions.d.ts +3 -2
- package/dist/src/compiler/normalize-instructions.js +1 -1
- package/dist/src/compiler/normalize-manifest.js +2 -2
- package/dist/src/compiler/normalize-sandbox.d.ts +2 -1
- package/dist/src/compiler/normalize-sandbox.js +1 -1
- package/dist/src/compiler/normalize-schedule.d.ts +2 -1
- package/dist/src/compiler/normalize-schedule.js +1 -1
- package/dist/src/compiler/normalize-skill.d.ts +2 -1
- package/dist/src/compiler/normalize-skill.js +1 -1
- package/dist/src/compiler/normalize-subagent.d.ts +4 -1
- package/dist/src/compiler/normalize-subagent.js +1 -1
- package/dist/src/compiler/normalize-tool.d.ts +2 -1
- package/dist/src/compiler/normalize-tool.js +1 -1
- package/dist/src/compiler/workspace-resources.js +1 -1
- package/dist/src/context/node.d.ts +1 -1
- package/dist/src/evals/assertions/collector.d.ts +43 -0
- package/dist/src/evals/assertions/collector.js +1 -0
- package/dist/src/evals/assertions/run.d.ts +72 -0
- package/dist/src/evals/assertions/run.js +2 -0
- package/dist/src/evals/autoevals-client.js +2 -0
- package/dist/src/evals/cli/eval-client.d.ts +22 -0
- package/dist/src/evals/cli/eval-client.js +1 -0
- package/dist/src/evals/cli/eval.d.ts +12 -3
- package/dist/src/evals/cli/eval.js +1 -1
- package/dist/src/evals/context.d.ts +19 -0
- package/dist/src/evals/context.js +1 -0
- package/dist/src/evals/define-eval-config.d.ts +16 -0
- package/dist/src/evals/define-eval-config.js +1 -0
- package/dist/src/evals/define-eval.d.ts +20 -0
- package/dist/src/evals/define-eval.js +1 -0
- package/dist/src/evals/expect/index.d.ts +25 -0
- package/dist/src/evals/expect/index.js +1 -0
- package/dist/src/evals/index.d.ts +7 -2
- package/dist/src/evals/index.js +1 -1
- package/dist/src/evals/judge.d.ts +20 -0
- package/dist/src/evals/judge.js +1 -0
- package/dist/src/evals/match.d.ts +67 -0
- package/dist/src/evals/match.js +1 -0
- package/dist/src/evals/reporters/index.d.ts +1 -0
- package/dist/src/evals/reporters/index.js +1 -1
- package/dist/src/evals/requirements.d.ts +3 -0
- package/dist/src/evals/requirements.js +1 -0
- package/dist/src/evals/runner/artifacts.d.ts +7 -6
- package/dist/src/evals/runner/artifacts.js +3 -3
- package/dist/src/evals/runner/derive-run-facts.d.ts +17 -3
- package/dist/src/evals/runner/derive-run-facts.js +1 -1
- package/dist/src/evals/runner/discover.d.ts +31 -10
- package/dist/src/evals/runner/discover.js +1 -1
- package/dist/src/evals/runner/execute-eval.d.ts +25 -0
- package/dist/src/evals/runner/execute-eval.js +1 -0
- package/dist/src/evals/runner/execute-task.d.ts +31 -0
- package/dist/src/evals/runner/execute-task.js +1 -0
- package/dist/src/evals/runner/reporters/braintrust.d.ts +7 -5
- package/dist/src/evals/runner/reporters/braintrust.js +2 -2
- package/dist/src/evals/runner/reporters/console.d.ts +4 -4
- package/dist/src/evals/runner/reporters/console.js +1 -1
- package/dist/src/evals/runner/reporters/junit.d.ts +10 -0
- package/dist/src/evals/runner/reporters/junit.js +4 -0
- package/dist/src/evals/runner/reporters/types.d.ts +14 -8
- package/dist/src/evals/runner/run-evals.d.ts +38 -0
- package/dist/src/evals/runner/run-evals.js +1 -0
- package/dist/src/evals/runner/verdict.d.ts +13 -0
- package/dist/src/evals/runner/verdict.js +1 -0
- package/dist/src/evals/session.d.ts +52 -0
- package/dist/src/evals/session.js +1 -0
- package/dist/src/evals/target.d.ts +23 -0
- package/dist/src/evals/target.js +1 -0
- package/dist/src/evals/types.d.ts +353 -165
- package/dist/src/execution/compaction.d.ts +14 -0
- package/dist/src/execution/compaction.js +1 -0
- package/dist/src/execution/delegated-parent-notification.js +1 -1
- package/dist/src/execution/dispatch-runtime-actions-step.js +1 -1
- package/dist/src/execution/node-step.js +1 -1
- package/dist/src/execution/sandbox/bash-tool.d.ts +6 -6
- package/dist/src/execution/sandbox/bash-tool.js +1 -1
- package/dist/src/execution/sandbox/bindings/local.d.ts +11 -0
- package/dist/src/execution/sandbox/bindings/local.js +1 -1
- package/dist/src/execution/sandbox/glob-tool.js +3 -3
- package/dist/src/execution/sandbox/grep-tool.js +3 -3
- package/dist/src/execution/sandbox/read-file-tool.js +1 -1
- package/dist/src/execution/subagent-adapter.js +1 -1
- package/dist/src/execution/tool-auth.js +1 -1
- package/dist/src/execution/turn-workflow.js +1 -1
- package/dist/src/execution/workflow-runtime.d.ts +2 -2
- package/dist/src/execution/workflow-runtime.js +1 -1
- package/dist/src/execution/workflow-steps.js +1 -1
- package/dist/src/harness/action-result-helpers.js +1 -1
- package/dist/src/harness/authorization.d.ts +26 -0
- package/dist/src/harness/authorization.js +1 -1
- package/dist/src/harness/code-mode-lifecycle.js +1 -1
- package/dist/src/harness/emission.d.ts +12 -5
- package/dist/src/harness/emission.js +1 -1
- package/dist/src/harness/model-call-error.d.ts +35 -6
- package/dist/src/harness/model-call-error.js +1 -1
- package/dist/src/harness/step-hooks.d.ts +10 -4
- package/dist/src/harness/step-hooks.js +1 -1
- package/dist/src/harness/tool-loop.js +1 -1
- package/dist/src/harness/tools.d.ts +4 -6
- package/dist/src/harness/tools.js +1 -1
- package/dist/src/harness/turn-tag-state.d.ts +4 -0
- package/dist/src/harness/turn-tag-state.js +1 -1
- package/dist/src/harness/types.d.ts +4 -15
- package/dist/src/internal/application/cache-metadata.js +1 -1
- package/dist/src/internal/application/compiled-artifacts.js +1 -1
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/internal/application/paths.js +1 -1
- package/dist/src/internal/authored-definition/schema-backed.js +1 -1
- package/dist/src/internal/authored-module-loader.d.ts +4 -1
- package/dist/src/internal/authored-module-loader.js +2 -2
- package/dist/src/internal/authored-module-map-loader.js +1 -1
- package/dist/src/internal/nitro/dev-runtime-artifacts.d.ts +11 -0
- package/dist/src/internal/nitro/dev-runtime-artifacts.js +1 -1
- package/dist/src/internal/nitro/host/build-application.js +1 -1
- package/dist/src/internal/nitro/host/build-vercel-agent-summary.js +1 -1
- package/dist/src/internal/nitro/host/configure-nitro-routes.js +3 -3
- package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
- package/dist/src/internal/nitro/host/dev-authored-source-watcher.js +1 -1
- package/dist/src/internal/nitro/host/dev-watcher-log.d.ts +37 -0
- package/dist/src/internal/nitro/host/dev-watcher-log.js +1 -0
- package/dist/src/internal/nitro/host/ports.d.ts +8 -0
- package/dist/src/internal/nitro/host/ports.js +1 -0
- package/dist/src/internal/nitro/host/prepare-application-host.js +1 -1
- package/dist/src/internal/nitro/host/server-external-packages.d.ts +1 -1
- package/dist/src/internal/nitro/host/server-external-packages.js +1 -1
- package/dist/src/internal/nitro/host/start-development-server.js +1 -1
- package/dist/src/internal/nitro/host/start-production-server.js +1 -1
- package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response-from-manifest.d.ts +5 -0
- package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response-from-manifest.js +1 -0
- package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response.d.ts +31 -2
- package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response.js +1 -1
- package/dist/src/internal/nitro/routes/agent-info/load-agent-info-data.d.ts +13 -0
- package/dist/src/internal/nitro/routes/agent-info/load-agent-info-data.js +1 -1
- package/dist/src/internal/nitro/routes/info.d.ts +2 -2
- package/dist/src/internal/nitro/routes/info.js +1 -1
- package/dist/src/internal/workflow/queue-namespace.d.ts +5 -0
- package/dist/src/internal/workflow/queue-namespace.js +1 -0
- package/dist/src/internal/workflow-bundle/builder-support.js +2 -2
- package/dist/src/internal/workflow-bundle/builder.js +3 -5
- package/dist/src/internal/workflow-bundle/vercel-workflow-output.js +1 -1
- package/dist/src/internal/workflow-bundle/workflow-builders.d.ts +1 -1
- package/dist/src/internal/workflow-bundle/workflow-builders.js +1 -1
- package/dist/src/node_modules/.pnpm/@clack_core@1.3.1/node_modules/@clack/core/dist/index.js +4 -4
- package/dist/src/protocol/message.d.ts +15 -0
- package/dist/src/protocol/message.js +2 -2
- package/dist/src/public/channels/slack/api.d.ts +8 -0
- package/dist/src/public/channels/slack/api.js +1 -1
- package/dist/src/public/channels/slack/connections.d.ts +26 -18
- package/dist/src/public/channels/slack/connections.js +1 -1
- package/dist/src/public/channels/slack/defaults.d.ts +5 -2
- package/dist/src/public/channels/slack/defaults.js +1 -1
- package/dist/src/public/channels/slack/index.d.ts +1 -1
- package/dist/src/public/channels/slack/slackChannel.d.ts +65 -5
- package/dist/src/public/channels/slack/slackChannel.js +1 -1
- package/dist/src/public/channels/teams/defaults.js +1 -1
- package/dist/src/public/connections/errors.d.ts +8 -0
- package/dist/src/public/definitions/tool.d.ts +0 -33
- package/dist/src/public/next/index.d.ts +7 -1
- package/dist/src/public/next/index.js +1 -1
- package/dist/src/public/next/server.d.ts +1 -0
- package/dist/src/public/next/server.js +1 -1
- package/dist/src/public/nuxt/dev-server.js +1 -1
- package/dist/src/public/sandbox/backends/local.d.ts +2 -3
- package/dist/src/public/sveltekit/dev-server.js +1 -1
- package/dist/src/public/sveltekit/index.d.ts +1 -1
- package/dist/src/public/tools/defaults.d.ts +2 -4
- package/dist/src/public/tools/defaults.js +1 -1
- package/dist/src/public/tools/define-bash-tool.d.ts +3 -3
- package/dist/src/public/tools/define-bash-tool.js +1 -1
- package/dist/src/public/tools/define-read-file-tool.d.ts +0 -6
- package/dist/src/public/tools/define-read-file-tool.js +1 -1
- package/dist/src/public/tools/index.d.ts +2 -2
- package/dist/src/public/tools/index.js +1 -1
- package/dist/src/public/tools/internal.js +1 -1
- package/dist/src/runtime/actions/types.d.ts +11 -11
- package/dist/src/runtime/agent/mock-model-adapter.js +1 -1
- package/dist/src/runtime/agent/mock-model-fixtures.js +3 -2
- package/dist/src/runtime/agent/mock-model-skill-selection.js +3 -4
- package/dist/src/runtime/connections/callback-route.js +1 -1
- package/dist/src/runtime/connections/mcp-client.js +1 -1
- package/dist/src/runtime/connections/scoped-authorization.d.ts +21 -5
- package/dist/src/runtime/connections/scoped-authorization.js +1 -1
- package/dist/src/runtime/connections/types.d.ts +33 -0
- package/dist/src/runtime/connections/validate-authorization.js +1 -1
- package/dist/src/runtime/framework-tools/bash.d.ts +3 -3
- package/dist/src/runtime/framework-tools/bash.js +1 -1
- package/dist/src/runtime/framework-tools/connection-search-dynamic.d.ts +1 -1
- package/dist/src/runtime/framework-tools/connection-search-dynamic.js +1 -1
- package/dist/src/runtime/framework-tools/file-state.d.ts +3 -3
- package/dist/src/runtime/framework-tools/index.js +1 -1
- package/dist/src/runtime/framework-tools/read-file.js +2 -2
- package/dist/src/runtime/framework-tools/todo.d.ts +7 -0
- package/dist/src/runtime/framework-tools/todo.js +2 -2
- package/dist/src/runtime/governance/auth/http-basic.js +1 -1
- package/dist/src/runtime/input/types.d.ts +1 -1
- package/dist/src/runtime/resolve-tool.d.ts +2 -2
- package/dist/src/runtime/resolve-tool.js +1 -1
- package/dist/src/runtime/sandbox/keys.js +1 -1
- package/dist/src/runtime/session-callback-route.js +1 -1
- package/dist/src/runtime/types.d.ts +1 -7
- package/dist/src/services/dev-client/client-options.d.ts +8 -0
- package/dist/src/services/dev-client/client-options.js +1 -0
- package/dist/src/services/dev-client/runtime-artifacts.d.ts +13 -0
- package/dist/src/services/dev-client/runtime-artifacts.js +1 -0
- package/dist/src/services/dev-client.d.ts +13 -46
- package/dist/src/services/dev-client.js +1 -1
- package/dist/src/services/inspect-application.js +1 -1
- package/dist/src/setup/ask.d.ts +205 -0
- package/dist/src/setup/ask.js +1 -0
- package/dist/src/setup/boxes/add-channels.d.ts +100 -16
- package/dist/src/setup/boxes/add-channels.js +2 -1
- package/dist/src/setup/boxes/add-connections.d.ts +13 -23
- package/dist/src/setup/boxes/add-connections.js +1 -1
- package/dist/src/setup/boxes/apply-ai-gateway-credential.d.ts +2 -2
- package/dist/src/setup/boxes/apply-ai-gateway-credential.js +1 -1
- package/dist/src/setup/boxes/deploy-project.d.ts +46 -14
- package/dist/src/setup/boxes/deploy-project.js +1 -1
- package/dist/src/setup/boxes/detect-ai-gateway.d.ts +10 -3
- package/dist/src/setup/boxes/detect-ai-gateway.js +1 -1
- package/dist/src/setup/boxes/link-project.d.ts +3 -3
- package/dist/src/setup/boxes/link-project.js +1 -1
- package/dist/src/setup/boxes/one-shot-next-steps.d.ts +18 -0
- package/dist/src/setup/boxes/one-shot-next-steps.js +2 -0
- package/dist/src/setup/boxes/preflight.d.ts +14 -6
- package/dist/src/setup/boxes/preflight.js +1 -1
- package/dist/src/setup/boxes/resolve-provisioning.d.ts +36 -8
- package/dist/src/setup/boxes/resolve-provisioning.js +1 -1
- package/dist/src/setup/boxes/resolve-target.d.ts +25 -8
- package/dist/src/setup/boxes/resolve-target.js +1 -1
- package/dist/src/setup/boxes/scaffold.d.ts +12 -6
- package/dist/src/setup/boxes/scaffold.js +1 -1
- package/dist/src/setup/boxes/select-channels.d.ts +38 -9
- package/dist/src/setup/boxes/select-channels.js +1 -1
- package/dist/src/setup/boxes/select-chat.d.ts +15 -11
- package/dist/src/setup/boxes/select-chat.js +1 -1
- package/dist/src/setup/boxes/select-connections.d.ts +30 -0
- package/dist/src/setup/boxes/select-connections.js +1 -0
- package/dist/src/setup/boxes/select-model.d.ts +18 -14
- package/dist/src/setup/boxes/select-model.js +1 -1
- package/dist/src/setup/boxes/select-setup-mode.d.ts +32 -0
- package/dist/src/setup/boxes/select-setup-mode.js +1 -0
- package/dist/src/setup/channel-add-conflicts.d.ts +28 -0
- package/dist/src/setup/channel-add-conflicts.js +1 -0
- package/dist/src/setup/cli/channel-setup-prompter.d.ts +23 -0
- package/dist/src/setup/cli/channel-setup-prompter.js +1 -0
- package/dist/src/setup/cli/connection-add-prompter.d.ts +8 -0
- package/dist/src/setup/cli/connection-add-prompter.js +1 -0
- package/dist/src/setup/{scaffold/cli → cli}/index.d.ts +4 -3
- package/dist/src/setup/cli/index.js +1 -0
- package/dist/src/setup/{scaffold/cli → cli}/prompt-ui.d.ts +39 -15
- package/dist/src/setup/cli/prompt-ui.js +5 -0
- package/dist/src/setup/{scaffold/cli → cli}/rail-log.d.ts +2 -0
- package/dist/src/setup/{scaffold/cli → cli}/rail-log.js +2 -2
- package/dist/src/setup/{scaffold/cli → cli}/select-component.d.ts +18 -3
- package/dist/src/setup/cli/select-component.js +1 -0
- package/dist/src/setup/cli/select-option-codec.d.ts +12 -0
- package/dist/src/setup/cli/select-option-codec.js +1 -0
- package/dist/src/setup/{scaffold/cli → cli}/select-state.d.ts +13 -1
- package/dist/src/setup/cli/select-state.js +1 -0
- package/dist/src/setup/cli/whimsy.d.ts +16 -0
- package/dist/src/setup/cli/whimsy.js +1 -0
- package/dist/src/setup/{scaffold/steps/setup-connection.d.ts → connection-connector.d.ts} +3 -2
- package/dist/src/setup/connection-connector.js +1 -0
- package/dist/src/setup/flows/channels.d.ts +43 -0
- package/dist/src/setup/flows/channels.js +1 -0
- package/dist/src/setup/flows/deploy.d.ts +40 -0
- package/dist/src/setup/flows/deploy.js +1 -0
- package/dist/src/setup/flows/in-project.d.ts +16 -0
- package/dist/src/setup/flows/in-project.js +1 -0
- package/dist/src/setup/flows/link.d.ts +43 -0
- package/dist/src/setup/flows/link.js +1 -0
- package/dist/src/setup/flows/model.d.ts +112 -0
- package/dist/src/setup/flows/model.js +1 -0
- package/dist/src/setup/flows/vercel.d.ts +31 -0
- package/dist/src/setup/flows/vercel.js +2 -0
- package/dist/src/setup/gateway-models.js +1 -1
- package/dist/src/setup/headless.d.ts +1 -1
- package/dist/src/setup/index.d.ts +10 -4
- package/dist/src/setup/index.js +1 -1
- package/dist/src/setup/onboarding.d.ts +7 -4
- package/dist/src/setup/onboarding.js +1 -1
- package/dist/src/setup/package-manager.d.ts +27 -0
- package/dist/src/setup/package-manager.js +1 -0
- package/dist/src/setup/primitives/index.d.ts +3 -0
- package/dist/src/setup/primitives/index.js +1 -0
- package/dist/src/setup/primitives/pm/bun.d.ts +10 -0
- package/dist/src/setup/primitives/pm/bun.js +1 -0
- package/dist/src/setup/primitives/pm/index.d.ts +11 -0
- package/dist/src/setup/primitives/pm/index.js +1 -0
- package/dist/src/setup/primitives/pm/npm.d.ts +10 -0
- package/dist/src/setup/primitives/pm/npm.js +1 -0
- package/dist/src/setup/primitives/pm/pnpm.d.ts +27 -0
- package/dist/src/setup/primitives/pm/pnpm.js +8 -0
- package/dist/src/setup/primitives/pm/run.d.ts +23 -0
- package/dist/src/setup/primitives/pm/run.js +1 -0
- package/dist/src/setup/primitives/pm/shared.d.ts +8 -0
- package/dist/src/setup/primitives/pm/shared.js +1 -0
- package/dist/src/setup/primitives/pm/types.d.ts +37 -0
- package/dist/src/setup/primitives/pm/types.js +1 -0
- package/dist/src/setup/primitives/pm/yarn.d.ts +10 -0
- package/dist/src/setup/primitives/pm/yarn.js +1 -0
- package/dist/src/setup/primitives/run-pnpm.d.ts +1 -0
- package/dist/src/setup/primitives/run-pnpm.js +1 -0
- package/dist/src/setup/{scaffold/primitives → primitives}/run-vercel.d.ts +7 -0
- package/dist/src/setup/primitives/run-vercel.js +1 -0
- package/dist/src/setup/project-name.d.ts +4 -0
- package/dist/src/setup/project-name.js +1 -0
- package/dist/src/setup/project-resolution.d.ts +54 -0
- package/dist/src/setup/project-resolution.js +1 -0
- package/dist/src/setup/prompter.d.ts +52 -4
- package/dist/src/setup/prompter.js +1 -1
- package/dist/src/setup/quit-guard.d.ts +1 -1
- package/dist/src/setup/run-vercel-link.d.ts +1 -1
- package/dist/src/setup/run-vercel-link.js +1 -1
- package/dist/src/setup/runner.d.ts +5 -4
- package/dist/src/setup/runner.js +1 -1
- package/dist/src/setup/scaffold/channels-catalog.d.ts +3 -3
- package/dist/src/setup/scaffold/channels-catalog.js +1 -1
- package/dist/src/setup/scaffold/create/add-to-project.d.ts +26 -0
- package/dist/src/setup/scaffold/create/add-to-project.js +1 -0
- package/dist/src/setup/scaffold/create/project.d.ts +54 -0
- package/dist/src/setup/scaffold/create/project.js +80 -0
- package/dist/src/setup/scaffold/index.d.ts +4 -4
- package/dist/src/setup/scaffold/index.js +1 -1
- package/dist/src/setup/scaffold/{channels.d.ts → update/channels.d.ts} +11 -0
- package/dist/src/setup/scaffold/update/channels.js +7 -0
- package/dist/src/setup/scaffold/{connections.d.ts → update/connections.d.ts} +1 -1
- package/dist/src/setup/scaffold/update/connections.js +21 -0
- package/dist/src/setup/scaffold/version-tokens.d.ts +11 -0
- package/dist/src/setup/scaffold/version-tokens.js +1 -0
- package/dist/src/setup/{scaffold/steps/setup-slackbot.d.ts → slackbot.d.ts} +24 -20
- package/dist/src/setup/slackbot.js +1 -0
- package/dist/src/setup/state.d.ts +62 -15
- package/dist/src/setup/state.js +1 -1
- package/dist/src/setup/step.d.ts +9 -18
- package/dist/src/setup/vercel-project.d.ts +15 -8
- package/dist/src/setup/vercel-project.js +1 -1
- package/dist/src/shared/agent-definition.d.ts +9 -3
- package/dist/src/shared/default-agent-model.d.ts +5 -0
- package/dist/src/shared/default-agent-model.js +1 -0
- package/dist/src/shared/sandbox-backend.d.ts +11 -11
- package/dist/src/source-change/apply-model-name.d.ts +25 -0
- package/dist/src/source-change/apply-model-name.js +2 -0
- package/dist/src/source-change/static-source-change.d.ts +36 -0
- package/dist/src/source-change/static-source-change.js +1 -0
- package/dist/src/svelte/index.js +1 -1
- package/dist/src/svelte/use-eve-agent.js +1 -1
- package/dist/src/vue/index.js +1 -1
- package/dist/src/vue/use-eve-agent.js +1 -1
- package/package.json +23 -38
- package/dist/docs/public/advanced/evals.md +0 -121
- package/dist/src/cli/commands/setup.d.ts +0 -55
- package/dist/src/cli/commands/setup.js +0 -1
- package/dist/src/cli/dev/repl/input-requests.d.ts +0 -38
- package/dist/src/cli/dev/repl/input-requests.js +0 -1
- package/dist/src/cli/dev/repl/input.d.ts +0 -19
- package/dist/src/cli/dev/repl/input.js +0 -1
- package/dist/src/cli/dev/repl/repl.d.ts +0 -62
- package/dist/src/cli/dev/repl/repl.js +0 -2
- package/dist/src/cli/dev/repl/terminal.d.ts +0 -21
- package/dist/src/cli/dev/repl/terminal.js +0 -5
- package/dist/src/compiled/_chunks/workflow/resume-hook-0Zk0zSvq.js +0 -12
- package/dist/src/compiled/_chunks/workflow/sleep-DXZr2BgM.js +0 -1
- package/dist/src/evals/define-eval-suite.d.ts +0 -16
- package/dist/src/evals/define-eval-suite.js +0 -1
- package/dist/src/evals/runner/execute-case.d.ts +0 -23
- package/dist/src/evals/runner/execute-case.js +0 -1
- package/dist/src/evals/runner/execute-suite.d.ts +0 -24
- package/dist/src/evals/runner/execute-suite.js +0 -1
- package/dist/src/evals/scorers/autoevals-client.js +0 -2
- package/dist/src/evals/scorers/autoevals.d.ts +0 -58
- package/dist/src/evals/scorers/autoevals.js +0 -1
- package/dist/src/evals/scorers/json.d.ts +0 -10
- package/dist/src/evals/scorers/json.js +0 -1
- package/dist/src/evals/scorers/run.d.ts +0 -18
- package/dist/src/evals/scorers/run.js +0 -1
- package/dist/src/evals/scorers/sql.d.ts +0 -9
- package/dist/src/evals/scorers/sql.js +0 -1
- package/dist/src/evals/scorers/text.d.ts +0 -18
- package/dist/src/evals/scorers/text.js +0 -1
- package/dist/src/evals/scores/index.d.ts +0 -72
- package/dist/src/evals/scores/index.js +0 -1
- package/dist/src/execution/tool-compaction.d.ts +0 -9
- package/dist/src/execution/tool-compaction.js +0 -1
- package/dist/src/services/dev-client/stream.d.ts +0 -5
- package/dist/src/services/dev-client/stream.js +0 -1
- package/dist/src/services/dev-client/url.d.ts +0 -11
- package/dist/src/services/dev-client/url.js +0 -1
- package/dist/src/setup/channel-setup-prompter.d.ts +0 -8
- package/dist/src/setup/channel-setup-prompter.js +0 -1
- package/dist/src/setup/scaffold/channels.js +0 -7
- package/dist/src/setup/scaffold/cli/channel-add-prompter.d.ts +0 -12
- package/dist/src/setup/scaffold/cli/channel-add-prompter.js +0 -1
- package/dist/src/setup/scaffold/cli/channel-setup-prompter.d.ts +0 -56
- package/dist/src/setup/scaffold/cli/connection-add-prompter.d.ts +0 -44
- package/dist/src/setup/scaffold/cli/connection-add-prompter.js +0 -1
- package/dist/src/setup/scaffold/cli/index.js +0 -1
- package/dist/src/setup/scaffold/cli/prompt-ui.js +0 -5
- package/dist/src/setup/scaffold/cli/select-component.js +0 -1
- package/dist/src/setup/scaffold/cli/select-state.js +0 -1
- package/dist/src/setup/scaffold/connections.js +0 -21
- package/dist/src/setup/scaffold/pnpm-workspace.d.ts +0 -3
- package/dist/src/setup/scaffold/pnpm-workspace.js +0 -11
- package/dist/src/setup/scaffold/primitives/detect-deployment.d.ts +0 -13
- package/dist/src/setup/scaffold/primitives/detect-deployment.js +0 -1
- package/dist/src/setup/scaffold/primitives/index.d.ts +0 -3
- package/dist/src/setup/scaffold/primitives/index.js +0 -1
- package/dist/src/setup/scaffold/primitives/pnpm-invocation.d.ts +0 -12
- package/dist/src/setup/scaffold/primitives/pnpm-invocation.js +0 -1
- package/dist/src/setup/scaffold/primitives/run-pnpm.d.ts +0 -17
- package/dist/src/setup/scaffold/primitives/run-pnpm.js +0 -1
- package/dist/src/setup/scaffold/primitives/run-vercel.js +0 -1
- package/dist/src/setup/scaffold/project.d.ts +0 -21
- package/dist/src/setup/scaffold/project.js +0 -80
- package/dist/src/setup/scaffold/steps/deploy-to-vercel.d.ts +0 -17
- package/dist/src/setup/scaffold/steps/deploy-to-vercel.js +0 -1
- package/dist/src/setup/scaffold/steps/index.d.ts +0 -4
- package/dist/src/setup/scaffold/steps/index.js +0 -1
- package/dist/src/setup/scaffold/steps/project-resolution.d.ts +0 -19
- package/dist/src/setup/scaffold/steps/project-resolution.js +0 -1
- package/dist/src/setup/scaffold/steps/run-add-connection.d.ts +0 -40
- package/dist/src/setup/scaffold/steps/run-add-connection.js +0 -1
- package/dist/src/setup/scaffold/steps/run-add-to-agent.d.ts +0 -81
- package/dist/src/setup/scaffold/steps/run-add-to-agent.js +0 -2
- package/dist/src/setup/scaffold/steps/setup-connection.js +0 -1
- package/dist/src/setup/scaffold/steps/setup-slackbot.js +0 -1
- /package/dist/src/{setup/scaffold/cli/channel-setup-prompter.js → cli/dev/tui/setup-flow.js} +0 -0
- /package/dist/src/evals/{scorers/autoevals-client.d.ts → autoevals-client.d.ts} +0 -0
- /package/dist/src/setup/{scaffold/cli → cli}/command-output.d.ts +0 -0
- /package/dist/src/setup/{scaffold/cli → cli}/command-output.js +0 -0
- /package/dist/src/setup/{scaffold/human-action.d.ts → human-action.d.ts} +0 -0
- /package/dist/src/setup/{scaffold/human-action.js → human-action.js} +0 -0
- /package/dist/src/setup/{scaffold/primitives → primitives}/process-output.d.ts +0 -0
- /package/dist/src/setup/{scaffold/primitives → primitives}/process-output.js +0 -0
- /package/dist/src/setup/scaffold/{web-template.d.ts → create/web-template.d.ts} +0 -0
- /package/dist/src/setup/scaffold/{web-template.js → create/web-template.js} +0 -0
- /package/dist/src/setup/scaffold/{module-files.d.ts → update/module-files.d.ts} +0 -0
- /package/dist/src/setup/scaffold/{module-files.js → update/module-files.js} +0 -0
- /package/dist/src/setup/scaffold/{package-json.d.ts → update/package-json.d.ts} +0 -0
- /package/dist/src/setup/scaffold/{package-json.js → update/package-json.js} +0 -0
- /package/dist/src/setup/scaffold/{primitives → update}/update-connection-connector.d.ts +0 -0
- /package/dist/src/setup/scaffold/{primitives → update}/update-connection-connector.js +0 -0
- /package/dist/src/setup/scaffold/{primitives → update}/update-slack-channel.d.ts +0 -0
- /package/dist/src/setup/scaffold/{primitives → update}/update-slack-channel.js +0 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { detectProjectIdentity, type ProjectIdentity } from "#setup/project-resolution.js";
|
|
2
|
+
/** Workspace-scoped Vercel state shown in the dev TUI's status line. */
|
|
3
|
+
export interface VercelStatusSnapshot {
|
|
4
|
+
/** Resolved link identity; absent while unlinked or while a probe is in flight. */
|
|
5
|
+
identity?: ProjectIdentity;
|
|
6
|
+
/** A /channels run added ≥1 channel this session and no /deploy has shipped since. */
|
|
7
|
+
pendingDeploy: boolean;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Status-line effect a completed setup command reports back to the runner.
|
|
11
|
+
* Session-scoped by design: a deploy from another terminal or channels added
|
|
12
|
+
* before this session escape it — accepted v1 limits.
|
|
13
|
+
*/
|
|
14
|
+
export type VercelStatusEffect = {
|
|
15
|
+
kind: "channels-added";
|
|
16
|
+
} | {
|
|
17
|
+
kind: "deployed";
|
|
18
|
+
} | {
|
|
19
|
+
kind: "link-changed";
|
|
20
|
+
};
|
|
21
|
+
export interface VercelStatusTrackerOptions {
|
|
22
|
+
/** Absolute local application root holding the `.vercel` link directory. */
|
|
23
|
+
appRoot: string;
|
|
24
|
+
/** Receives every snapshot change, including async identity resolutions. */
|
|
25
|
+
onChange: (snapshot: VercelStatusSnapshot) => void;
|
|
26
|
+
/** Test seam; defaults to the real network-bound probe. */
|
|
27
|
+
detectIdentity?: typeof detectProjectIdentity;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Owns the Vercel segment of the dev TUI status line: one cached link
|
|
31
|
+
* identity and the session-scoped pending-deploy flag. The identity probe is
|
|
32
|
+
* network-bound (it shells `vercel api`), so it runs only at startup and
|
|
33
|
+
* after a /vercel link or a /deploy — never on a poll. A linked directory
|
|
34
|
+
* whose `vercel` CLI call fails resolves to the raw project id as the name
|
|
35
|
+
* (see {@link detectProjectIdentity}); an unlinked one resolves to no
|
|
36
|
+
* identity, which hides the segment.
|
|
37
|
+
*/
|
|
38
|
+
export interface VercelStatusTracker {
|
|
39
|
+
/** Fire-and-forget identity re-probe; stale resolutions are discarded. */
|
|
40
|
+
refreshIdentity(): void;
|
|
41
|
+
applyEffect(effect: VercelStatusEffect): void;
|
|
42
|
+
current(): VercelStatusSnapshot;
|
|
43
|
+
/** Stops future onChange emissions; in-flight probe results are dropped. */
|
|
44
|
+
dispose(): void;
|
|
45
|
+
}
|
|
46
|
+
/** Creates the {@link VercelStatusTracker} for one dev TUI session. */
|
|
47
|
+
export declare function createVercelStatusTracker(options: VercelStatusTrackerOptions): VercelStatusTracker;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{detectProjectIdentity}from"#setup/project-resolution.js";function createVercelStatusTracker(t){let n=t.detectIdentity??detectProjectIdentity,r,i=!1,a=0,o=!1,snapshot=()=>{let e={pendingDeploy:i};return r!==void 0&&(e.identity=r),e},emit=()=>{o||t.onChange(snapshot())},refreshIdentity=()=>{a+=1;let e=a;(async()=>{let i;try{i=await n(t.appRoot)}catch{return}o||e!==a||(r=i,emit())})()};return{refreshIdentity,applyEffect(e){switch(e.kind){case`channels-added`:i=!0,emit();return;case`deployed`:i=!1,emit(),refreshIdentity();return;case`link-changed`:refreshIdentity();return}},current:snapshot,dispose(){o=!0,a+=1}}}export{createVercelStatusTracker};
|
package/dist/src/cli/run.d.ts
CHANGED
|
@@ -12,7 +12,6 @@ interface DevelopmentCliOptions {
|
|
|
12
12
|
name?: string;
|
|
13
13
|
port?: number;
|
|
14
14
|
reasoning?: TerminalPartDisplayMode;
|
|
15
|
-
repl?: boolean;
|
|
16
15
|
subagents?: TerminalPartDisplayMode;
|
|
17
16
|
tools?: TerminalPartDisplayMode;
|
|
18
17
|
ui?: boolean;
|
|
@@ -32,13 +31,11 @@ interface CliRuntimeDependencies {
|
|
|
32
31
|
printApplicationInfo(logger: CliLogger, appRoot: string, options?: {
|
|
33
32
|
json?: boolean;
|
|
34
33
|
}): Promise<void>;
|
|
35
|
-
runDevelopmentRepl(input: {
|
|
36
|
-
serverUrl: string;
|
|
37
|
-
}): Promise<void>;
|
|
38
34
|
runDevelopmentTui(input: {
|
|
39
35
|
serverUrl: string;
|
|
36
|
+
appRoot?: string;
|
|
40
37
|
} & TuiDisplayOptions): Promise<void>;
|
|
41
|
-
runEvalCommand(options: EvalCliOptions, logger: CliLogger): Promise<void>;
|
|
38
|
+
runEvalCommand(evalIds: readonly string[], options: EvalCliOptions, logger: CliLogger): Promise<void>;
|
|
42
39
|
startHost(appRoot: string, options?: {
|
|
43
40
|
host?: string;
|
|
44
41
|
port?: number;
|
|
@@ -50,33 +47,36 @@ interface CliRuntimeDependencies {
|
|
|
50
47
|
}
|
|
51
48
|
type CliRuntimeOverrides = Partial<CliRuntimeDependencies>;
|
|
52
49
|
interface EvalCliOptions {
|
|
53
|
-
all?: boolean;
|
|
54
50
|
json?: boolean;
|
|
51
|
+
junit?: string;
|
|
52
|
+
list?: boolean;
|
|
55
53
|
maxConcurrency?: string;
|
|
54
|
+
mockModels?: boolean;
|
|
55
|
+
noSkips?: boolean;
|
|
56
56
|
skipReport?: boolean;
|
|
57
|
-
|
|
57
|
+
strict?: boolean;
|
|
58
|
+
tag?: string[];
|
|
58
59
|
timeout?: string;
|
|
59
60
|
url?: string;
|
|
61
|
+
verbose?: boolean;
|
|
60
62
|
}
|
|
61
63
|
/**
|
|
62
64
|
* The interactive UI `eve dev` runs against a server.
|
|
63
65
|
*
|
|
64
66
|
* - `tui` — the default terminal UI.
|
|
65
|
-
* - `repl` — the classic line-based REPL (`--repl`).
|
|
66
67
|
* - `headless` — no UI: just keep the server running (`--no-ui`, or a
|
|
67
68
|
* non-interactive terminal).
|
|
68
69
|
*
|
|
69
70
|
* Exported for unit coverage of the flag-routing contract.
|
|
70
71
|
*/
|
|
71
|
-
export type DevUiMode = "tui" | "
|
|
72
|
+
export type DevUiMode = "tui" | "headless";
|
|
72
73
|
/**
|
|
73
74
|
* Resolves which UI `eve dev` should run from the parsed flags and whether
|
|
74
75
|
* the terminal is interactive. `--no-ui` and non-TTY terminals force
|
|
75
|
-
* `headless`;
|
|
76
|
-
* is the default.
|
|
76
|
+
* `headless`; otherwise the terminal UI runs.
|
|
77
77
|
*/
|
|
78
78
|
export declare function resolveDevUiMode(input: {
|
|
79
|
-
options: Pick<DevelopmentCliOptions, "
|
|
79
|
+
options: Pick<DevelopmentCliOptions, "ui">;
|
|
80
80
|
interactive: boolean;
|
|
81
81
|
}): DevUiMode;
|
|
82
82
|
/**
|
|
@@ -98,13 +98,6 @@ export declare function resolveTuiTitle(input: {
|
|
|
98
98
|
* back to the runner's own defaults when unset.
|
|
99
99
|
*/
|
|
100
100
|
export declare function resolveTuiDisplayOptions(options: DevelopmentCliOptions): TuiDisplayOptions;
|
|
101
|
-
/**
|
|
102
|
-
* Rewrites the deprecated `eve dev --no-repl` flag to its replacement
|
|
103
|
-
* `--no-ui`. The TUI is now the default UI, so "no REPL" no longer
|
|
104
|
-
* describes "no interactive UI"; `--no-repl` is kept as a silent alias so
|
|
105
|
-
* existing scripts and programmatic spawns (e.g. `withEve`) keep working.
|
|
106
|
-
*/
|
|
107
|
-
export declare function rewriteDeprecatedReplFlag(argv: readonly string[]): string[];
|
|
108
101
|
/**
|
|
109
102
|
* Runs the Eve CLI entrypoint.
|
|
110
103
|
*/
|
package/dist/src/cli/run.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{basename}from"node:path";import{createCliTheme,renderCliTaggedLine}from"#cli/ui/output.js";import{Command,CommanderError,InvalidArgumentError}from"#compiled/commander/index.js";import{resolveApplicationRoot}from"#internal/application/paths.js";import{
|
|
1
|
+
import{resolveInstalledPackageInfo}from"#internal/application/package.js";import{basename}from"node:path";import{createCliTheme,renderCliTaggedLine}from"#cli/ui/output.js";import{eveCliBanner}from"#cli/banner.js";import{Command,CommanderError,InvalidArgumentError}from"#compiled/commander/index.js";import{resolveApplicationRoot}from"#internal/application/paths.js";import{registerProjectCommands}from"#cli/commands/register-project-commands.js";import{parseDevelopmentServerUrl}from"#cli/dev/url.js";async function loadBuildHost(){return(await import(`#internal/nitro/host.js`)).buildApplication}async function loadPrintApplicationInfo(){return(await import(`#cli/commands/info.js`)).printApplicationInfo}async function loadRunDevelopmentTui(){return(await import(`#cli/dev/tui/tui.js`)).runDevelopmentTui}async function loadRunEvalCommand(){return(await import(`#evals/cli/eval.js`)).runEvalCommand}async function loadStartHost(){return(await import(`#internal/nitro/host.js`)).startDevelopmentServer}async function loadStartProductionHost(){return(await import(`#internal/nitro/host.js`)).startProductionServer}function shouldPrintCliBootBanner(e){return e.name()===`info`||e.name()===`dev`||e.name()===`init`}async function waitForShutdownSignal(e){await new Promise((t,n)=>{let r=!1,cleanup=()=>{process.off(`SIGINT`,handleSignal),process.off(`SIGTERM`,handleSignal)},handleSignal=()=>{r||(r=!0,cleanup(),e.close().then(t,n))};process.once(`SIGINT`,handleSignal),process.once(`SIGTERM`,handleSignal)})}async function waitForProductionServer(e){await Promise.race([e.wait(),waitForShutdownSignal({close:()=>e.close()})])}function parsePortOption(e){if(!/^-?\d+$/.test(e))throw new InvalidArgumentError(`Expected a numeric port, received "${e}".`);let t=Number(e);if(t<0||t>65535)throw new InvalidArgumentError(`Expected a port between 0 and 65535, received "${e}".`);return t}const DISPLAY_MODES=new Set([`full`,`collapsed`,`auto-collapsed`,`hidden`]),STATS_MODES=new Set([`tokens`,`tokensPerSecond`]),LOG_MODES=new Set([`all`,`stderr`,`none`]);function parseDisplayMode(e){if(!DISPLAY_MODES.has(e))throw new InvalidArgumentError(`Expected one of ${[...DISPLAY_MODES].join(`, `)}, received "${e}".`);return e}function parseStatsMode(e){if(!STATS_MODES.has(e))throw new InvalidArgumentError(`Expected one of ${[...STATS_MODES].join(`, `)}, received "${e}".`);return e}function parseLogsMode(e){if(!LOG_MODES.has(e))throw new InvalidArgumentError(`Expected one of ${[...LOG_MODES].join(`, `)}, received "${e}".`);return e}function parseContextSizeOption(e){let t=Number(e);if(!Number.isFinite(t)||t<=0)throw new InvalidArgumentError(`Expected a positive number, received "${e}".`);return t}function resolveDevUiMode(e){return e.options.ui===!1||!e.interactive?`headless`:`tui`}function resolveTuiTitle(e){if(e.name!==void 0&&e.name.length>0)return e.name;if(e.remoteServerUrl!==void 0)try{return new URL(e.remoteServerUrl).host}catch{return}let n=humanizeProjectName(basename(e.appRoot));return n.length>0?n:void 0}function humanizeProjectName(e){return e.replace(/[-_.]+/gu,` `).trim().split(/\s+/u).filter(e=>e.length>0).map(e=>e[0].toUpperCase()+e.slice(1)).join(` `)}function resolveTuiDisplayOptions(e){let t={reasoning:e.reasoning??`full`,tools:e.tools??`auto-collapsed`};return e.subagents!==void 0&&(t.subagents=e.subagents),e.connectionAuth!==void 0&&(t.connectionAuth=e.connectionAuth),e.assistantResponseStats!==void 0&&(t.assistantResponseStats=e.assistantResponseStats),e.contextSize!==void 0&&(t.contextSize=e.contextSize),e.logs!==void 0&&(t.logs=e.logs),t}function hasInteractiveTerminal(){return!!(process.stdin.isTTY&&process.stdout.isTTY)}function rewriteDevelopmentUrlShorthand(e){let t=e[1];return e[0]!==`dev`||e.length!==2||t===void 0||t.startsWith(`-`)?[...e]:[`dev`,`--url`,t]}function resolveRemoteDevelopmentServerUrl(e){if(e.url){if(e.host!==void 0)throw new InvalidArgumentError(`The --host option cannot be used with --url.`);if(e.port!==void 0)throw new InvalidArgumentError(`The --port option cannot be used with --url.`);if(e.ui===!1)throw new InvalidArgumentError(`The --no-ui option cannot be used with --url.`);return e.url}}function createCliProgram(t,o){let s=resolveApplicationRoot(),l=resolveInstalledPackageInfo().version,u=new Command,d=createCliTheme();u.name(`eve`).description(`Build and run an Eve application.`).version(l).showHelpAfterError().exitOverride().hook(`preAction`,(e,n)=>{shouldPrintCliBootBanner(n)&&t.log(eveCliBanner())}).configureOutput({writeErr:e=>{t.error(e.trimEnd())},writeOut:e=>{t.log(e.trimEnd())}});let f=u.command(`channels`).description(`Manage user-authored channels in the current project.`);return f.command(`add [kind]`).description(`Add channels interactively, or scaffold a channel kind (slack | web).`).option(`-f, --force`,`Overwrite existing channel files`).option(`-y, --yes`,`Assume yes for confirmations; requires an explicit channel kind`).action(async(e,n)=>{let{runChannelsAddCommand:r}=await import(`#cli/commands/channels.js`);await r(t,s,{kind:e,options:n})}),f.command(`list`).description(`List user-authored channels in the current project.`).option(`--json`,`Output as JSON`).action(async e=>{let{runChannelsListCommand:n}=await import(`#cli/commands/channels.js`);await n(t,s,e)}),u.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)`).action(async(e,n)=>{let{runInitCommand:r}=await import(`#cli/commands/init.js`);await r(t,s,e,n)}),registerProjectCommands({program:u,logger:t,appRoot:s}),u.command(`build`).description(`Build the current Eve application.`).action(async()=>{let{loadDevelopmentEnvironmentFiles:e}=await import(`#cli/dev/environment.js`);e(s);let n=await(o.buildHost??await loadBuildHost())(s);t.log(renderCliTaggedLine(d,{message:`built output at ${n}`,tag:`build`,tone:`success`}))}),u.command(`start`).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 e=>{let{loadDevelopmentEnvironmentFiles:n}=await import(`#cli/dev/environment.js`);n(s);let i=await(o.startProductionHost??await loadStartProductionHost())(s,{host:e.host,port:e.port});t.log(renderCliTaggedLine(d,{message:`server listening at ${i.url}`,tag:`start`,tone:`success`})),await waitForProductionServer(i)}),u.command(`dev`).description(`Start the Eve development server or connect to an existing URL.`).option(`--host <host>`,`Host interface to bind`).option(`--port <port>`,`Port to listen on (defaults to $PORT, then 3000)`,parsePortOption).option(`-u, --url <url>`,`Connect to an existing server URL`,parseDevelopmentServerUrl).option(`--no-ui`,`Start the server without an interactive UI`).option(`--name <name>`,`Title shown in the terminal UI (defaults to the app folder name)`).option(`--tools <mode>`,`How tool calls render: full | collapsed | auto-collapsed | hidden`,parseDisplayMode).option(`--reasoning <mode>`,`How reasoning renders: full | collapsed | auto-collapsed | hidden`,parseDisplayMode).option(`--subagents <mode>`,`How subagent sections render: full | collapsed | auto-collapsed | hidden`,parseDisplayMode).option(`--connection-auth <mode>`,`How connection authorization renders: full | collapsed | auto-collapsed | hidden`,parseDisplayMode).option(`--assistant-response-stats <mode>`,`Assistant header statistic: tokens | tokensPerSecond`,parseStatsMode).option(`--context-size <tokens>`,`Model context window size, shown as a usage percentage`,parseContextSizeOption).option(`--logs <mode>`,`Which server/agent logs to show: all | stderr | none`,parseLogsMode).addHelpText(`after`,`
|
|
2
2
|
You can also pass a bare URL as the only argument, for example: eve dev https://example.com
|
|
3
|
-
`).action(async
|
|
3
|
+
`).action(async e=>{let n=resolveRemoteDevelopmentServerUrl(e),{loadDevelopmentEnvironmentFiles:i}=await import(`#cli/dev/environment.js`);i(s);let runInteractiveUi=async r=>{t.log(``);let i=o.runDevelopmentTui??await loadRunDevelopmentTui(),a=resolveTuiDisplayOptions(e),c=resolveTuiTitle({name:e.name,remoteServerUrl:n,appRoot:s});c!==void 0&&(a.name=c),await i(n===void 0?{serverUrl:r,appRoot:s,...a}:{serverUrl:r,...a})};if(n){if(t.log(renderCliTaggedLine(d,{message:`connecting to ${n}`,tag:`dev`,tone:`info`})),resolveDevUiMode({options:e,interactive:hasInteractiveTerminal()})===`headless`){t.log(renderCliTaggedLine(d,{message:`Interactive UI disabled because the current terminal is not a TTY.`,tag:`dev`,tone:`warning`}));return}await runInteractiveUi(n);return}let a=await(o.startHost??await loadStartHost())(s,{host:e.host,port:e.port}),c=!1,closeServer=async()=>{c||(c=!0,await a.close())};try{let n=hasInteractiveTerminal(),i=resolveDevUiMode({options:e,interactive:n});if(i!==`tui`&&t.log(renderCliTaggedLine(d,{message:`server listening at ${a.url}`,tag:`dev`,tone:`success`})),i===`headless`)return e.ui!==!1&&!n&&t.log(renderCliTaggedLine(d,{message:`Interactive UI disabled because the current terminal is not a TTY.`,tag:`dev`,tone:`warning`})),await waitForShutdownSignal({close:closeServer});await runInteractiveUi(a.url)}finally{await closeServer()}}),u.command(`info`).description(`Print resolved application information.`).option(`--json`,`Output as JSON`).action(async e=>{await(o.printApplicationInfo??await loadPrintApplicationInfo())(t,s,e)}),u.command(`eval`).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)`).option(`--mock-models`,`Boot the local dev target with deterministic mock models`).option(`--tag <tag...>`,`Run only evals carrying a tag`).option(`--strict`,`Fail the exit code when any score falls below its threshold`).option(`--no-skips`,`Treat unmet eval requirements as failures`).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 ctx.log lines to stdout`).action(async(e,n)=>{await(o.runEvalCommand??await loadRunEvalCommand())(e,n,t)}),u}async function runCli(e=process.argv.slice(2),t=console,n={}){let r=createCliProgram(t,n),i=e.length===0?[`dev`]:rewriteDevelopmentUrlShorthand(e);try{await r.parseAsync(i,{from:`user`})}catch(e){if(e instanceof CommanderError){if(e.exitCode===0)return;throw Error(e.message)}throw e}}export{resolveDevUiMode,resolveTuiDisplayOptions,resolveTuiTitle,runCli};
|
|
@@ -26,6 +26,14 @@ export declare class Client {
|
|
|
26
26
|
* @throws {ClientError} If the server returns a non-successful status.
|
|
27
27
|
*/
|
|
28
28
|
info(): Promise<AgentInfoResult>;
|
|
29
|
+
/**
|
|
30
|
+
* Performs an authenticated fetch against a path on this Eve target.
|
|
31
|
+
*
|
|
32
|
+
* This is the raw escape hatch for framework-owned routes (for example
|
|
33
|
+
* channel ingress or dev-only schedule dispatch) while preserving the same
|
|
34
|
+
* auth/header cascade used by {@link health}, {@link info}, and sessions.
|
|
35
|
+
*/
|
|
36
|
+
fetch(path: string, init?: RequestInit): Promise<Response>;
|
|
29
37
|
/**
|
|
30
38
|
* Creates a {@link ClientSession} handle for one conversation.
|
|
31
39
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{EVE_HEALTH_ROUTE_PATH,EVE_INFO_ROUTE_PATH}from"#protocol/routes.js";import{ClientError}from"#client/client-error.js";import{ClientSession}from"#client/session.js";import{createInitialSessionState}from"#client/session-utils.js";import{createClientUrl}from"#client/url.js";var Client=class{#e;#t;#n;#r;constructor(e){this.#n=e.host,this.#e=e.auth,this.#t=e.headers,this.#r=e.maxReconnectAttempts??3}async health(){let t=createClientUrl(this.#n,EVE_HEALTH_ROUTE_PATH),r=await this.#i(),i=await fetch(t,{headers:r});if(!i.ok){let e=await i.text();throw new ClientError(i.status,e)}return await i.json()}async info(){let e=createClientUrl(this.#n,EVE_INFO_ROUTE_PATH),r=await this.#i(),i=await fetch(e,{headers:r});if(!i.ok){let e=await i.text();throw new ClientError(i.status,e)}return await i.json()}session(e){let t;return t=typeof e==`string`?{continuationToken:e,streamIndex:0}:e||createInitialSessionState(),new ClientSession({host:this.#n,maxReconnectAttempts:this.#r,resolveHeaders:e=>this.#i(e)},t)}async#i(e){let t=new Headers,n=await resolveHeadersValue(this.#t);for(let[e,r]of Object.entries(n))t.set(e,r);if(e)for(let[n,r]of Object.entries(e))t.set(n,r);let r=await this.#a();return r&&t.set(`authorization`,r),t}async#a(){let e=this.#e;if(e){if(`bearer`in e){let t=(await resolveTokenValue(e.bearer)).trim();return t.length===0?void 0:`Bearer ${t}`}if(`basic`in e){let t=await resolveTokenValue(e.basic.password);return`Basic ${encodeBasicCredentials(e.basic.username,t)}`}}}};async function resolveTokenValue(e){return typeof e==`function`?e():e}async function resolveHeadersValue(e){return e===void 0?{}:typeof e==`function`?await e():e}function encodeBasicCredentials(e,t){let n=new TextEncoder().encode(`${e}:${t}`),r=Array.from(n,e=>String.fromCodePoint(e)).join(``);return btoa(r)}export{Client};
|
|
1
|
+
import{EVE_HEALTH_ROUTE_PATH,EVE_INFO_ROUTE_PATH}from"#protocol/routes.js";import{ClientError}from"#client/client-error.js";import{ClientSession}from"#client/session.js";import{createInitialSessionState}from"#client/session-utils.js";import{createClientUrl}from"#client/url.js";var Client=class{#e;#t;#n;#r;constructor(e){this.#n=e.host,this.#e=e.auth,this.#t=e.headers,this.#r=e.maxReconnectAttempts??3}async health(){let t=createClientUrl(this.#n,EVE_HEALTH_ROUTE_PATH),r=await this.#i(),i=await fetch(t,{headers:r});if(!i.ok){let e=await i.text();throw new ClientError(i.status,e)}return await i.json()}async info(){let e=createClientUrl(this.#n,EVE_INFO_ROUTE_PATH),r=await this.#i(),i=await fetch(e,{headers:r});if(!i.ok){let e=await i.text();throw new ClientError(i.status,e)}return await i.json()}async fetch(e,t={}){let n=createClientUrl(this.#n,e),r=await this.#i(headersInitToRecord(t.headers));return await fetch(n,{...t,headers:r})}session(e){let t;return t=typeof e==`string`?{continuationToken:e,streamIndex:0}:e||createInitialSessionState(),new ClientSession({host:this.#n,maxReconnectAttempts:this.#r,resolveHeaders:e=>this.#i(e)},t)}async#i(e){let t=new Headers,n=await resolveHeadersValue(this.#t);for(let[e,r]of Object.entries(n))t.set(e,r);if(e)for(let[n,r]of Object.entries(e))t.set(n,r);let r=await this.#a();return r&&t.set(`authorization`,r),t}async#a(){let e=this.#e;if(e){if(`bearer`in e){let t=(await resolveTokenValue(e.bearer)).trim();return t.length===0?void 0:`Bearer ${t}`}if(`basic`in e){let t=await resolveTokenValue(e.basic.password);return`Basic ${encodeBasicCredentials(e.basic.username,t)}`}}}};async function resolveTokenValue(e){return typeof e==`function`?e():e}async function resolveHeadersValue(e){return e===void 0?{}:typeof e==`function`?await e():e}function headersInitToRecord(e){return e===void 0?{}:Object.fromEntries(new Headers(e).entries())}function encodeBasicCredentials(e,t){let n=new TextEncoder().encode(`${e}:${t}`),r=Array.from(n,e=>String.fromCodePoint(e)).join(``);return btoa(r)}export{Client};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { FilePart, UserContent } from "ai";
|
|
2
|
+
/**
|
|
3
|
+
* Creates an AI SDK `FilePart` whose data is an inline `data:` URL.
|
|
4
|
+
*/
|
|
5
|
+
export declare function createDataUrlFilePart(input: {
|
|
6
|
+
readonly bytes: Uint8Array;
|
|
7
|
+
readonly filename?: string;
|
|
8
|
+
readonly mediaType: string;
|
|
9
|
+
}): FilePart;
|
|
10
|
+
/**
|
|
11
|
+
* Builds one user turn containing text plus an inline file attachment.
|
|
12
|
+
*/
|
|
13
|
+
export declare function createTextWithFileContent(input: {
|
|
14
|
+
readonly bytes: Uint8Array;
|
|
15
|
+
readonly filename?: string;
|
|
16
|
+
readonly mediaType: string;
|
|
17
|
+
readonly text: string;
|
|
18
|
+
}): UserContent;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const BASE64_CHUNK_SIZE=32768;function createDataUrlFilePart(e){let t={data:`data:${e.mediaType};base64,${bytesToBase64(e.bytes)}`,mediaType:e.mediaType,type:`file`};return e.filename!==void 0&&e.filename.length>0&&(t.filename=e.filename),t}function createTextWithFileContent(e){return[{text:e.text,type:`text`},createDataUrlFilePart(e)]}function bytesToBase64(t){let n=``;for(let r=0;r<t.length;r+=BASE64_CHUNK_SIZE){let i=t.subarray(r,r+BASE64_CHUNK_SIZE);n+=String.fromCodePoint(...i)}return btoa(n)}export{createDataUrlFilePart,createTextWithFileContent};
|
|
@@ -2,14 +2,15 @@ export { EveAgentStore } from "#client/eve-agent-store.js";
|
|
|
2
2
|
export { Client } from "#client/client.js";
|
|
3
3
|
export { ClientError } from "#client/client-error.js";
|
|
4
4
|
export { defaultMessageReducer } from "#client/message-reducer.js";
|
|
5
|
+
export { createDataUrlFilePart, createTextWithFileContent } from "#client/file-parts.js";
|
|
5
6
|
export { MessageResponse } from "#client/message-response.js";
|
|
6
7
|
export { ClientSession } from "#client/session.js";
|
|
7
8
|
export type { EveAgentStoreCallbacks, EveAgentStoreInit, EveAgentStoreSnapshot, EveAgentStoreStatus, PrepareSend, } from "#client/eve-agent-store.js";
|
|
8
9
|
export type { AgentInfoEntry, AgentInfoChannelEntry, AgentInfoChannels, AgentInfoConnectionEntry, AgentInfoDynamicResolverEntry, AgentInfoFrameworkChannelEntry, AgentInfoFrameworkToolEntry, AgentInfoHookEntry, AgentInfoInstructions, AgentInfoInstructionsEntry, AgentInfoResult, AgentInfoSandboxEntry, AgentInfoScheduleEntry, AgentInfoSkillEntry, AgentInfoSource, AgentInfoSubagentEntry, AgentInfoToolEntry, AgentInfoTools, ClientAuth, ClientOptions, HeadersValue, HealthResult, MessageResult, SendTurnInput, SendTurnPayload, SessionState, StreamOptions, TokenValue, } from "#client/types.js";
|
|
9
10
|
export type { EveAgentReducer, EveAgentReducerEvent, ClientInputRespondedEvent, ClientMessageFailedEvent, ClientMessageSubmittedEvent, } from "#client/reducer.js";
|
|
10
11
|
export type { EveMessageData, EveDynamicToolPart, EveMessageInputRequest, EveMessage, EveMessageMetadata, EveMessagePart, EveMessageToolMetadata, } from "#client/message-reducer.js";
|
|
11
|
-
export type { ActionResultStreamEvent, ActionsRequestedStreamEvent, AssistantStepFinishReason, CompactionCompletedStreamEvent, CompactionRequestedStreamEvent, AuthorizationCompletedStreamEvent, ConnectionAuthorizationOutcome, AuthorizationRequiredStreamEvent, HandleMessageStreamEvent, InputRequestedStreamEvent, MessageAppendedStreamEvent, MessageCompletedStreamEvent, MessageReceivedStreamEvent, ReasoningAppendedStreamEvent, ReasoningCompletedStreamEvent, ResultCompletedStreamEvent, SessionCompletedStreamEvent, SessionFailedStreamEvent, SessionStartedStreamEvent, SessionWaitingStreamEvent, StepCompletedStreamEvent, StepFailedStreamEvent, StepStartedStreamEvent, SubagentCalledStreamEvent, SubagentChildEventStreamEvent, SubagentCompletedStreamEvent, SubagentStartedStreamEvent, TurnCompletedStreamEvent, TurnFailedStreamEvent, TurnStartedStreamEvent, } from "#protocol/message.js";
|
|
12
|
-
export { isCurrentTurnBoundaryEvent } from "#protocol/message.js";
|
|
12
|
+
export type { ActionResultStreamEvent, ActionsRequestedStreamEvent, AssistantStepFinishReason, CompactionCompletedStreamEvent, CompactionRequestedStreamEvent, AuthorizationCompletedStreamEvent, ConnectionAuthorizationOutcome, AuthorizationRequiredStreamEvent, HandleMessageStreamEvent, InputRequestedStreamEvent, MessageAppendedStreamEvent, MessageCompletedStreamEvent, MessageReceivedStreamEvent, ReasoningAppendedStreamEvent, ReasoningCompletedStreamEvent, ResultCompletedStreamEvent, SessionCompletedStreamEvent, SessionFailedStreamEvent, SessionStartedStreamEvent, SessionWaitingStreamEvent, StepCompletedStreamEvent, StepFailedStreamEvent, StepStartedStreamEvent, SubagentCalledStreamEvent, SubagentChildEventStreamEvent, SubagentCompletedStreamEvent, SubagentStartedStreamEvent, TurnCompletedStreamEvent, TurnFailedStreamEvent, TurnStartedStreamEvent, TurnFailureStreamEvent, } from "#protocol/message.js";
|
|
13
|
+
export { isCurrentTurnBoundaryEvent, isTurnFailureEvent } from "#protocol/message.js";
|
|
13
14
|
export type { InputOption, InputRequest, InputResponse } from "#runtime/input/types.js";
|
|
14
15
|
export { inputOptionSchema, inputRequestSchema, inputResponseSchema, isInputRequest, isInputResponse, } from "#runtime/input/types.js";
|
|
15
16
|
export { resolveTextToResponse, resolveTextToResponses } from "#channel/resolve-text.js";
|
package/dist/src/client/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{ClientError}from"#client/client-error.js";import{ClientSession}from"#client/session.js";import{Client}from"#client/client.js";import{EveAgentStore}from"#client/eve-agent-store.js";import{defaultMessageReducer}from"#client/message-reducer.js";import{createDataUrlFilePart,createTextWithFileContent}from"#client/file-parts.js";import{MessageResponse}from"#client/message-response.js";import{isCurrentTurnBoundaryEvent,isTurnFailureEvent}from"#protocol/message.js";import{inputOptionSchema,inputRequestSchema,inputResponseSchema,isInputRequest,isInputResponse}from"#runtime/input/types.js";import{resolveTextToResponse,resolveTextToResponses}from"#channel/resolve-text.js";export{Client,ClientError,ClientSession,EveAgentStore,MessageResponse,createDataUrlFilePart,createTextWithFileContent,defaultMessageReducer,inputOptionSchema,inputRequestSchema,inputResponseSchema,isCurrentTurnBoundaryEvent,isInputRequest,isInputResponse,isTurnFailureEvent,resolveTextToResponse,resolveTextToResponses};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{deriveResultStatus,extractCompletedMessage}from"#client/session-utils.js";import{extractCompletedResult}from"#client/output-schema.js";var MessageResponse=class{continuationToken;sessionId;#e=!1;#t;constructor(e){this.continuationToken=e.continuationToken,this.sessionId=e.sessionId,this.#t=e.createStream}async result(){let t=[];for await(let e of this)t.push(e);return{data:extractCompletedResult(t),events:t,message:extractCompletedMessage(t),sessionId:this.sessionId,status:deriveResultStatus(t)}}[Symbol.asyncIterator](){if(this.#e)throw Error(`MessageResponse has already been consumed.`);return this.#e=!0,this.#t()}};export{MessageResponse};
|
|
1
|
+
import{deriveResultStatus,extractCompletedMessage,extractInputRequests}from"#client/session-utils.js";import{extractCompletedResult}from"#client/output-schema.js";var MessageResponse=class{continuationToken;sessionId;#e=!1;#t;constructor(e){this.continuationToken=e.continuationToken,this.sessionId=e.sessionId,this.#t=e.createStream}async result(){let t=[];for await(let e of this)t.push(e);return{data:extractCompletedResult(t),events:t,inputRequests:extractInputRequests(t),message:extractCompletedMessage(t),sessionId:this.sessionId,status:deriveResultStatus(t)}}[Symbol.asyncIterator](){if(this.#e)throw Error(`MessageResponse has already been consumed.`);return this.#e=!0,this.#t()}};export{MessageResponse};
|
|
@@ -10,9 +10,15 @@ interface OpenStreamInput {
|
|
|
10
10
|
readonly signal?: AbortSignal;
|
|
11
11
|
readonly startIndex: number;
|
|
12
12
|
}
|
|
13
|
+
type OpenStreamBodyInput = Omit<OpenStreamInput, "maxReconnectAttempts">;
|
|
13
14
|
/**
|
|
14
15
|
* Opens a durable NDJSON event stream with automatic reconnection on socket
|
|
15
16
|
* disconnection. Used by {@link ClientSession.stream}.
|
|
16
17
|
*/
|
|
17
18
|
export declare function openStreamIterable(input: OpenStreamInput): AsyncGenerator<HandleMessageStreamEvent>;
|
|
19
|
+
/**
|
|
20
|
+
* Opens one stream response body, retrying the short propagation window where
|
|
21
|
+
* a just-acknowledged session may not yet be readable from the stream route.
|
|
22
|
+
*/
|
|
23
|
+
export declare function openStreamBody(input: OpenStreamBodyInput): Promise<ReadableStream<Uint8Array>>;
|
|
18
24
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createEveMessageStreamRoutePath}from"#protocol/routes.js";import{ClientError}from"#client/client-error.js";import{createClientUrl}from"#client/url.js";import{isStreamDisconnectError,readNdjsonStream}from"#client/ndjson.js";async function*openStreamIterable(
|
|
1
|
+
import{createEveMessageStreamRoutePath}from"#protocol/routes.js";import{ClientError}from"#client/client-error.js";import{createClientUrl}from"#client/url.js";import{isStreamDisconnectError,readNdjsonStream}from"#client/ndjson.js";const STREAM_OPEN_RETRYABLE_STATUS=new Set([404,409,425,500,502,503,504]);async function*openStreamIterable(e){let t=e.startIndex,n=e.maxReconnectAttempts;for(;;){let a=await openStreamBody({...e,startIndex:t}),o=!1;try{for await(let e of readNdjsonStream(a))t+=1,yield e}catch(e){if(!isStreamDisconnectError(e))throw e;o=!0}if(!o||e.signal?.aborted||n<=0)return;--n}}async function openStreamBody(r){let i,o;for(let s=0;s<12;s+=1){let c=createClientUrl(r.host,createEveMessageStreamRoutePath(r.sessionId),r.startIndex>0?{startIndex:String(r.startIndex)}:void 0),l=await r.resolveHeaders(),u=await fetch(c,{headers:l,signal:r.signal??null});if(u.ok){if(!u.body)throw new ClientError(u.status,`Response body is null.`);return u.body}if(i=u.status,o=await u.text(),!STREAM_OPEN_RETRYABLE_STATUS.has(u.status))throw new ClientError(u.status,o);s<11&&await sleep(250)}throw new ClientError(i??0,o??`Failed to open message stream.`)}async function sleep(e){await new Promise(t=>setTimeout(t,e))}export{openStreamBody,openStreamIterable};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { HandleMessageStreamEvent } from "#protocol/message.js";
|
|
2
2
|
import type { SessionState } from "#client/types.js";
|
|
3
|
+
import type { InputRequest } from "#runtime/input/types.js";
|
|
3
4
|
/**
|
|
4
5
|
* Returns a fresh session state with no active run.
|
|
5
6
|
*/
|
|
@@ -27,3 +28,7 @@ export declare function extractCompletedMessage(events: readonly HandleMessageSt
|
|
|
27
28
|
* Derives the result status from a turn's boundary event.
|
|
28
29
|
*/
|
|
29
30
|
export declare function deriveResultStatus(events: readonly HandleMessageStreamEvent[]): "completed" | "failed" | "waiting";
|
|
31
|
+
/**
|
|
32
|
+
* Collects HITL input requests emitted during one consumed turn.
|
|
33
|
+
*/
|
|
34
|
+
export declare function extractInputRequests(events: readonly HandleMessageStreamEvent[]): readonly InputRequest[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isCurrentTurnBoundaryEvent}from"#protocol/message.js";function createInitialSessionState(){return{streamIndex:0}}function advanceSession(e){let t=findBoundaryEvent(e.events),n=e.session.streamIndex+e.events.length;return t?.type===`session.waiting`?{continuationToken:e.continuationToken??e.session.continuationToken,sessionId:e.sessionId,streamIndex:n}:createInitialSessionState()}function extractCompletedMessage(e){let t;for(let n of e)isFinalMessageCompleted(n)&&(t=n.data.message??void 0);return t}function deriveResultStatus(e){let t=findBoundaryEvent(e);return t?.type===`session.waiting`?`waiting`:t?.type===`session.failed`?`failed`:`completed`}function findBoundaryEvent(t){for(let n=t.length-1;n>=0;n--){let r=t[n];if(r!==void 0&&isCurrentTurnBoundaryEvent(r))return r}}function isFinalMessageCompleted(e){return e.type===`message.completed`&&e.data.finishReason!==`tool-calls`}export{advanceSession,createInitialSessionState,deriveResultStatus,extractCompletedMessage};
|
|
1
|
+
import{isCurrentTurnBoundaryEvent}from"#protocol/message.js";function createInitialSessionState(){return{streamIndex:0}}function advanceSession(e){let t=findBoundaryEvent(e.events),n=e.session.streamIndex+e.events.length;return t?.type===`session.waiting`?{continuationToken:e.continuationToken??e.session.continuationToken,sessionId:e.sessionId,streamIndex:n}:createInitialSessionState()}function extractCompletedMessage(e){let t;for(let n of e)isFinalMessageCompleted(n)&&(t=n.data.message??void 0);return t}function deriveResultStatus(e){let t=findBoundaryEvent(e);return t?.type===`session.waiting`?`waiting`:t?.type===`session.failed`?`failed`:`completed`}function extractInputRequests(e){let t=[];for(let n of e)n.type===`input.requested`&&t.push(...n.data.requests);return t}function findBoundaryEvent(t){for(let n=t.length-1;n>=0;n--){let r=t[n];if(r!==void 0&&isCurrentTurnBoundaryEvent(r))return r}}function isFinalMessageCompleted(e){return e.type===`message.completed`&&e.data.finishReason!==`tool-calls`}export{advanceSession,createInitialSessionState,deriveResultStatus,extractCompletedMessage,extractInputRequests};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{EVE_CREATE_SESSION_ROUTE_PATH,createEveContinueSessionRoutePath
|
|
1
|
+
import{EVE_CREATE_SESSION_ROUTE_PATH,createEveContinueSessionRoutePath}from"#protocol/routes.js";import{ClientError}from"#client/client-error.js";import{advanceSession}from"#client/session-utils.js";import{createClientUrl}from"#client/url.js";import{MessageResponse}from"#client/message-response.js";import{EVE_SESSION_ID_HEADER,isCurrentTurnBoundaryEvent}from"#protocol/message.js";import{normalizeOutputSchemaForRequest}from"#client/output-schema.js";import{isStreamDisconnectError,readNdjsonStream}from"#client/ndjson.js";import{openStreamBody,openStreamIterable}from"#client/open-stream.js";var ClientSession=class{#e;#t;constructor(e,t){this.#e=e,this.#t=t}get state(){return this.#t}async send(e){let t=normalizeSendTurnInput(e),n=this.#t,{continuationToken:r,sessionId:i}=await this.#n(t,n);return new MessageResponse({continuationToken:r,createStream:()=>this.#r(i,r,n,t),sessionId:i})}stream(e){let t=this.#t.sessionId;if(!t)throw Error(`Session has no session ID. Send a message first.`);return this.#a(t,e)}async#n(n,r){let a=r.sessionId?createEveContinueSessionRoutePath(r.sessionId):EVE_CREATE_SESSION_ROUTE_PATH,s=createClientUrl(this.#e.host,a),c=await this.#e.resolveHeaders(n.headers);c.set(`content-type`,`application/json`);let l=createHandleMessageBody({input:n,outputSchema:normalizeOutputSchemaForRequest(n.outputSchema),session:r});if(l===null)throw Error(`Session.send requires a non-empty message, inputResponses, or both.`);let u=await postTurnWithRetry({body:JSON.stringify(l),headers:c,mustDeliver:(n.inputResponses?.length??0)>0,signal:n.signal,url:s}),d=await u.json(),f=(typeof d.sessionId==`string`?d.sessionId:void 0)??u.headers.get(EVE_SESSION_ID_HEADER)?.trim()??r.sessionId;if(!f)throw Error(`Message route did not return a session id.`);return{continuationToken:typeof d.continuationToken==`string`?d.continuationToken:void 0,sessionId:f}}async*#r(e,t,n,i){let a=[];try{let t=n.sessionId===e?n.streamIndex:0,r=this.#e.maxReconnectAttempts;for(;;){let n=await this.#i(e,t,i.signal,i.headers),o=!1;try{for await(let e of readNdjsonStream(n))if(a.push(e),t+=1,yield e,isCurrentTurnBoundaryEvent(e)){o=!0;break}}catch(e){if(!isStreamDisconnectError(e))throw e}if(o||i.signal?.aborted||r<=0)break;--r}}finally{this.#t=advanceSession({continuationToken:t,events:a,sessionId:e,session:n})}}async#i(e,t,n,r){return await openStreamBody({host:this.#e.host,resolveHeaders:()=>this.#e.resolveHeaders(r),sessionId:e,signal:n,startIndex:t})}async*#a(e,t){let n=this.#t,i=t?.startIndex??n.streamIndex,a=[];try{for await(let n of openStreamIterable({host:this.#e.host,maxReconnectAttempts:this.#e.maxReconnectAttempts,resolveHeaders:()=>this.#e.resolveHeaders(),sessionId:e,signal:t?.signal,startIndex:i}))a.push(n),yield n}finally{this.#t=advanceSession({continuationToken:n.continuationToken,events:a,session:{...n,sessionId:e,streamIndex:i},sessionId:e})}}};async function postTurnWithRetry(e){let t=e.mustDeliver?10:1,r,i;for(let a=0;a<t;a+=1){let o=await fetch(e.url,{body:e.body,headers:e.headers,method:`POST`,signal:e.signal??null});if(o.ok)return o;if(r=o.status,i=await o.text(),!isRetryableDeliveryFailure(o.status,i))throw new ClientError(o.status,i);a<t-1&&await sleep(200)}throw new ClientError(r??0,i??`Failed to deliver session turn.`)}function isRetryableDeliveryFailure(e,t){return e===500&&/target session was not found/i.test(t)}async function sleep(e){await new Promise(t=>setTimeout(t,e))}function normalizeSendTurnInput(e){return typeof e==`string`?{message:e}:e}function createHandleMessageBody(e){let t={};return e.input.message!==void 0&&(t.message=e.input.message),e.input.inputResponses!==void 0&&e.input.inputResponses.length>0&&(t.inputResponses=e.input.inputResponses),e.input.clientContext!==void 0&&(t.clientContext=e.input.clientContext),e.outputSchema!==void 0&&(t.outputSchema=e.outputSchema),e.session.continuationToken!==void 0&&(t.continuationToken=e.session.continuationToken),Object.keys(t).length===0||e.session.continuationToken===void 0&&t.message===void 0||e.session.continuationToken!==void 0&&t.message===void 0&&t.inputResponses===void 0?null:t}export{ClientSession};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { UserContent } from "ai";
|
|
2
2
|
import type { StandardJSONSchemaV1 } from "#compiled/@standard-schema/spec/index.js";
|
|
3
3
|
import type { HandleMessageStreamEvent } from "#protocol/message.js";
|
|
4
|
-
import type { InputResponse } from "#runtime/input/types.js";
|
|
4
|
+
import type { InputRequest, InputResponse } from "#runtime/input/types.js";
|
|
5
5
|
import type { JsonObject } from "#shared/json.js";
|
|
6
6
|
/**
|
|
7
7
|
* Static credential value or per-request credential resolver.
|
|
@@ -131,6 +131,10 @@ export interface MessageResult<TOutput = unknown> {
|
|
|
131
131
|
* All events received during this turn.
|
|
132
132
|
*/
|
|
133
133
|
readonly events: HandleMessageStreamEvent[];
|
|
134
|
+
/**
|
|
135
|
+
* HITL input requests emitted during this turn.
|
|
136
|
+
*/
|
|
137
|
+
readonly inputRequests: readonly InputRequest[];
|
|
134
138
|
/**
|
|
135
139
|
* The session ID for this turn. Always populated; the post-turn handler
|
|
136
140
|
* rejects responses that do not assign a session id.
|
|
@@ -169,7 +173,6 @@ export interface AgentInfoEntry extends AgentInfoSource {
|
|
|
169
173
|
export interface AgentInfoToolEntry extends AgentInfoEntry {
|
|
170
174
|
readonly description: string;
|
|
171
175
|
readonly hasAuth: boolean;
|
|
172
|
-
readonly hasCompactionHook: boolean;
|
|
173
176
|
readonly hasExecute: boolean;
|
|
174
177
|
readonly hasModelOutputProjection: boolean;
|
|
175
178
|
readonly hasOutputSchema: boolean;
|
|
@@ -284,6 +287,10 @@ export interface AgentInfoResult {
|
|
|
284
287
|
readonly name: string;
|
|
285
288
|
readonly outputSchema?: unknown;
|
|
286
289
|
};
|
|
290
|
+
readonly capabilities: {
|
|
291
|
+
readonly devRoutes: boolean;
|
|
292
|
+
readonly mockModels: boolean;
|
|
293
|
+
};
|
|
287
294
|
readonly channels: AgentInfoChannels;
|
|
288
295
|
readonly connections: readonly AgentInfoConnectionEntry[];
|
|
289
296
|
readonly diagnostics: {
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"moduleVersions": {
|
|
3
|
-
"@ai-sdk/anthropic": "4.0.0-canary.
|
|
3
|
+
"@ai-sdk/anthropic": "4.0.0-canary.65",
|
|
4
4
|
"chat": "4.29.0",
|
|
5
5
|
"@chat-adapter/slack": "4.29.0",
|
|
6
6
|
"@chat-adapter/state-memory": "4.29.0",
|
|
7
7
|
"chokidar": "5.0.0",
|
|
8
8
|
"commander": "14.0.3",
|
|
9
9
|
"experimental-ai-sdk-code-mode": "1.0.14",
|
|
10
|
-
"@ai-sdk/google": "4.0.0-canary.
|
|
10
|
+
"@ai-sdk/google": "4.0.0-canary.80",
|
|
11
11
|
"gray-matter": "4.0.3",
|
|
12
12
|
"jose": "6.2.3",
|
|
13
13
|
"just-bash": "3.0.1",
|
|
14
14
|
"jsonc-parser": "3.3.1",
|
|
15
|
-
"@ai-sdk/mcp": "2.0.0-canary.
|
|
16
|
-
"@ai-sdk/openai": "4.0.0-canary.
|
|
15
|
+
"@ai-sdk/mcp": "2.0.0-canary.62",
|
|
16
|
+
"@ai-sdk/openai": "4.0.0-canary.72",
|
|
17
17
|
"@opentelemetry/api": "1.9.1",
|
|
18
|
-
"@ai-sdk/otel": "1.0.0-canary.
|
|
18
|
+
"@ai-sdk/otel": "1.0.0-canary.117",
|
|
19
19
|
"picocolors": "1.1.1",
|
|
20
20
|
"@ai-sdk/provider": "4.0.0-canary.18",
|
|
21
21
|
"@standard-schema/spec": "1.1.0",
|
|
22
22
|
"turndown": "7.2.4",
|
|
23
23
|
"@vercel/oidc": "3.5.0",
|
|
24
24
|
"@vercel/sandbox": "2.1.0",
|
|
25
|
-
"@workflow/core": "5.0.0-beta.
|
|
25
|
+
"@workflow/core": "5.0.0-beta.14",
|
|
26
26
|
"@workflow/errors": "5.0.0-beta.7",
|
|
27
|
-
"@workflow/world": "5.0.0-beta.
|
|
27
|
+
"@workflow/world": "5.0.0-beta.8",
|
|
28
28
|
"zod": "4.4.3",
|
|
29
29
|
"zod-validation-error": "5.0.0"
|
|
30
30
|
},
|
|
31
|
-
"scriptHash": "
|
|
31
|
+
"scriptHash": "c3eb93dddfd9659076fc932d86d7ecb4c7450e83e2300523acbcdcfc267ae3e0"
|
|
32
32
|
}
|
|
@@ -11,34 +11,21 @@ import { ToolExecuteFunction, Tool, Experimental_SandboxSession, ProviderDefined
|
|
|
11
11
|
* - `compaction`: a context compaction step (billed at executor rates).
|
|
12
12
|
* - `message`: an executor sampling iteration (billed at executor rates).
|
|
13
13
|
* - `advisor_message`: an advisor sub-inference (billed at the advisor
|
|
14
|
-
* model's rates
|
|
15
|
-
* usage
|
|
16
|
-
*
|
|
14
|
+
* model's rates). Advisor token usage is NOT rolled into the top-level
|
|
15
|
+
* usage totals because it bills at a different rate; inspect this array
|
|
16
|
+
* directly for advisor billing.
|
|
17
|
+
* - `fallback_message`: a server-side fallback attempt that served the turn.
|
|
18
|
+
* Inspect this array for exact per-model attribution on a turn that fell
|
|
19
|
+
* back.
|
|
17
20
|
*/
|
|
18
21
|
type AnthropicUsageIteration = {
|
|
19
|
-
type: 'compaction' | 'message';
|
|
22
|
+
type: 'compaction' | 'message' | 'advisor_message' | 'fallback_message';
|
|
20
23
|
/**
|
|
21
|
-
*
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Number of output tokens generated in this iteration.
|
|
26
|
-
*/
|
|
27
|
-
outputTokens: number;
|
|
28
|
-
/**
|
|
29
|
-
* Number of cache-creation input tokens consumed in this iteration.
|
|
30
|
-
*/
|
|
31
|
-
cacheCreationInputTokens?: number;
|
|
32
|
-
/**
|
|
33
|
-
* Number of cache-read input tokens consumed in this iteration.
|
|
34
|
-
*/
|
|
35
|
-
cacheReadInputTokens?: number;
|
|
36
|
-
} | {
|
|
37
|
-
type: 'advisor_message';
|
|
38
|
-
/**
|
|
39
|
-
* The advisor model that produced this iteration.
|
|
24
|
+
* The model that produced this iteration. Populated for the per-model
|
|
25
|
+
* attribution cases (the fallback chain and advisor sub-inferences) and
|
|
26
|
+
* absent otherwise.
|
|
40
27
|
*/
|
|
41
|
-
model
|
|
28
|
+
model?: string;
|
|
42
29
|
/**
|
|
43
30
|
* Number of input tokens consumed in this iteration.
|
|
44
31
|
*/
|
|
@@ -48,21 +35,49 @@ type AnthropicUsageIteration = {
|
|
|
48
35
|
*/
|
|
49
36
|
outputTokens: number;
|
|
50
37
|
/**
|
|
51
|
-
* Number of cache-creation input tokens consumed
|
|
52
|
-
* sub-inference. Nonzero when advisor-side caching is enabled and
|
|
53
|
-
* the advisor writes a fresh cache entry.
|
|
38
|
+
* Number of cache-creation input tokens consumed in this iteration.
|
|
54
39
|
*/
|
|
55
40
|
cacheCreationInputTokens?: number;
|
|
56
41
|
/**
|
|
57
|
-
* Number of cache-read input tokens consumed
|
|
58
|
-
* sub-inference. Nonzero on the second and later advisor calls
|
|
59
|
-
* when advisor-side caching is enabled.
|
|
42
|
+
* Number of cache-read input tokens consumed in this iteration.
|
|
60
43
|
*/
|
|
61
44
|
cacheReadInputTokens?: number;
|
|
62
45
|
};
|
|
63
46
|
interface AnthropicMessageMetadata {
|
|
64
47
|
usage: JSONObject;
|
|
65
48
|
stopSequence: string | null;
|
|
49
|
+
/**
|
|
50
|
+
* Details about why the request stopped. Present only when the API returns
|
|
51
|
+
* a `refusal` stop reason together with a `stop_details` object (a
|
|
52
|
+
* classifier block or a model refusal).
|
|
53
|
+
*
|
|
54
|
+
* Branch on the finish reason (`content-filter`), not on this object: the
|
|
55
|
+
* API may return a refusal with no details at all, so this field can be
|
|
56
|
+
* absent even on a refusal and should not be relied upon being present.
|
|
57
|
+
*/
|
|
58
|
+
stopDetails?: {
|
|
59
|
+
/**
|
|
60
|
+
* The kind of stop detail. `'refusal'` for classifier blocks and model
|
|
61
|
+
* refusals.
|
|
62
|
+
*/
|
|
63
|
+
type: string;
|
|
64
|
+
/**
|
|
65
|
+
* The classifier category that triggered the block, e.g. `'cyber'` or
|
|
66
|
+
* `'bio'`. Absent for model refusals and other cases.
|
|
67
|
+
*/
|
|
68
|
+
category?: string;
|
|
69
|
+
/**
|
|
70
|
+
* Human-readable explanation of why the request was blocked. May be
|
|
71
|
+
* absent even on a refusal.
|
|
72
|
+
*/
|
|
73
|
+
explanation?: string;
|
|
74
|
+
/**
|
|
75
|
+
* The canonical id of a model to retry directly. Populated only when the
|
|
76
|
+
* request included fallbacks and the fallback attempt could not be made
|
|
77
|
+
* (e.g. the fallback model was rate limited or overloaded).
|
|
78
|
+
*/
|
|
79
|
+
recommendedModel?: string;
|
|
80
|
+
};
|
|
66
81
|
/**
|
|
67
82
|
* Usage breakdown by iteration when compaction is triggered.
|
|
68
83
|
*
|
|
@@ -168,7 +183,7 @@ interface AnthropicMessageMetadata {
|
|
|
168
183
|
} | null;
|
|
169
184
|
}
|
|
170
185
|
|
|
171
|
-
type AnthropicModelId = 'claude-3-haiku-20240307' | 'claude-haiku-4-5-20251001' | 'claude-haiku-4-5' | 'claude-opus-4-0' | 'claude-opus-4-20250514' | 'claude-opus-4-1-20250805' | 'claude-opus-4-1' | 'claude-opus-4-5' | 'claude-opus-4-5-20251101' | 'claude-sonnet-4-0' | 'claude-sonnet-4-20250514' | 'claude-sonnet-4-5-20250929' | 'claude-sonnet-4-5' | 'claude-sonnet-4-6' | 'claude-opus-4-6' | 'claude-opus-4-7' | 'claude-opus-4-8' | (string & {});
|
|
186
|
+
type AnthropicModelId = 'claude-3-haiku-20240307' | 'claude-haiku-4-5-20251001' | 'claude-haiku-4-5' | 'claude-opus-4-0' | 'claude-opus-4-20250514' | 'claude-opus-4-1-20250805' | 'claude-opus-4-1' | 'claude-opus-4-5' | 'claude-opus-4-5-20251101' | 'claude-sonnet-4-0' | 'claude-sonnet-4-20250514' | 'claude-sonnet-4-5-20250929' | 'claude-sonnet-4-5' | 'claude-sonnet-4-6' | 'claude-opus-4-6' | 'claude-opus-4-7' | 'claude-opus-4-8' | 'claude-fable-5' | (string & {});
|
|
172
187
|
declare const anthropicLanguageModelOptions: z.ZodObject<{
|
|
173
188
|
sendReasoning: z.ZodOptional<z.ZodBoolean>;
|
|
174
189
|
structuredOutputMode: z.ZodOptional<z.ZodEnum<{
|
|
@@ -239,6 +254,16 @@ declare const anthropicLanguageModelOptions: z.ZodObject<{
|
|
|
239
254
|
us: "us";
|
|
240
255
|
global: "global";
|
|
241
256
|
}>>;
|
|
257
|
+
fallbacks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
258
|
+
model: z.ZodString;
|
|
259
|
+
max_tokens: z.ZodOptional<z.ZodNumber>;
|
|
260
|
+
thinking: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
261
|
+
output_config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
262
|
+
speed: z.ZodOptional<z.ZodEnum<{
|
|
263
|
+
fast: "fast";
|
|
264
|
+
standard: "standard";
|
|
265
|
+
}>>;
|
|
266
|
+
}, z.core.$strip>>>;
|
|
242
267
|
anthropicBeta: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
243
268
|
contextManagement: z.ZodOptional<z.ZodObject<{
|
|
244
269
|
edits: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|