eve 0.6.0-beta.9 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +281 -0
- package/README.md +9 -6
- package/dist/docs/public/README.md +17 -12
- package/dist/docs/public/agent-config.md +10 -10
- package/dist/docs/public/channels/custom.mdx +4 -4
- package/dist/docs/public/channels/discord.mdx +1 -1
- package/dist/docs/public/channels/eve.mdx +10 -10
- package/dist/docs/public/channels/github.mdx +1 -1
- package/dist/docs/public/channels/overview.mdx +21 -15
- package/dist/docs/public/channels/slack.mdx +16 -4
- package/dist/docs/public/channels/teams.mdx +1 -1
- package/dist/docs/public/channels/telegram.mdx +1 -1
- package/dist/docs/public/channels/twilio.mdx +1 -1
- package/dist/docs/public/{advanced → concepts}/context-control.md +3 -3
- package/dist/docs/public/{advanced → concepts}/default-harness.md +5 -5
- package/dist/docs/public/{advanced → concepts}/execution-model-and-durability.md +3 -1
- package/dist/docs/public/concepts/meta.json +10 -0
- package/dist/docs/public/{advanced → concepts}/security-model.md +3 -3
- package/dist/docs/public/{advanced → concepts}/sessions-runs-and-streaming.md +7 -7
- package/dist/docs/public/connections.mdx +6 -4
- 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/getting-started.mdx +38 -33
- package/dist/docs/public/{advanced → guides}/auth-and-route-protection.md +5 -3
- package/dist/docs/public/{client → guides/client}/continuations.mdx +2 -2
- package/dist/docs/public/{client → guides/client}/messages.mdx +1 -1
- package/dist/docs/public/{client → guides/client}/meta.json +1 -1
- package/dist/docs/public/{client → guides/client}/output-schema.mdx +2 -2
- package/dist/docs/public/{client → guides/client}/overview.mdx +5 -5
- package/dist/docs/public/{client → guides/client}/streaming.mdx +1 -1
- package/dist/docs/public/{advanced → guides}/deployment.md +9 -1
- package/dist/docs/public/guides/dev-tui.md +50 -0
- package/dist/docs/public/{advanced → guides}/dynamic-capabilities.md +1 -1
- package/dist/docs/public/{advanced → guides}/dynamic-workflows.md +1 -1
- package/dist/docs/public/{frontend → guides/frontend}/nextjs.mdx +16 -7
- package/dist/docs/public/{frontend → guides/frontend}/nuxt.mdx +7 -7
- package/dist/docs/public/{frontend → guides/frontend}/overview.mdx +6 -6
- package/dist/docs/public/{frontend → guides/frontend}/sveltekit.mdx +5 -5
- package/dist/docs/public/{frontend → guides/frontend}/use-eve-agent-svelte.mdx +2 -2
- package/dist/docs/public/{frontend → guides/frontend}/use-eve-agent-vue.mdx +2 -2
- package/dist/docs/public/{advanced → guides}/hooks.md +2 -2
- package/dist/docs/public/{advanced → guides}/instrumentation.md +3 -1
- package/dist/docs/public/{advanced → guides}/meta.json +8 -12
- package/dist/docs/public/{advanced → guides}/session-context.md +3 -3
- package/dist/docs/public/{advanced → guides}/state.md +1 -1
- package/dist/docs/public/instructions.mdx +2 -2
- package/dist/docs/public/introduction.md +5 -2
- package/dist/docs/public/meta.json +4 -3
- package/dist/docs/public/reference/cli.md +35 -19
- package/dist/docs/public/reference/meta.json +1 -1
- package/dist/docs/public/reference/project-layout.md +5 -1
- package/dist/docs/public/reference/typescript-api.md +27 -23
- package/dist/docs/public/sandbox.mdx +1 -1
- package/dist/docs/public/schedules.mdx +2 -2
- package/dist/docs/public/skills.mdx +3 -3
- package/dist/docs/public/subagents.mdx +3 -3
- package/dist/docs/public/tools.mdx +4 -8
- package/dist/docs/public/tutorial/connect-a-warehouse.mdx +3 -3
- package/dist/docs/public/tutorial/first-agent.mdx +6 -3
- package/dist/docs/public/tutorial/guard-the-spend.mdx +1 -1
- package/dist/docs/public/tutorial/how-it-runs.mdx +2 -2
- package/dist/docs/public/tutorial/meta.json +1 -1
- package/dist/docs/public/tutorial/query-sample-data.mdx +1 -1
- package/dist/docs/public/tutorial/remember-definitions.mdx +3 -3
- package/dist/docs/public/tutorial/run-analysis.mdx +1 -1
- package/dist/docs/public/tutorial/ship-it.mdx +4 -4
- package/dist/docs/public/tutorial/team-playbooks.mdx +3 -3
- 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 +64 -7
- 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 +9 -18
- 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/capabilities.d.ts +19 -1
- package/dist/src/compiled/@workflow/core/class-serialization.d.ts +32 -0
- package/dist/src/compiled/@workflow/core/create-hook.d.ts +37 -0
- package/dist/src/compiled/@workflow/core/global.d.ts +11 -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/start.d.ts +6 -0
- package/dist/src/compiled/@workflow/core/runtime/suspension-handler.d.ts +15 -2
- package/dist/src/compiled/@workflow/core/runtime/wait-continuation.d.ts +84 -0
- 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/types.d.ts +21 -0
- package/dist/src/compiled/@workflow/core/serialization.d.ts +113 -6
- package/dist/src/compiled/@workflow/core/symbols.d.ts +2 -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/attribute-dispatcher.d.ts +6 -0
- package/dist/src/compiled/@workflow/core/workflow/set-attributes.d.ts +3 -4
- package/dist/src/compiled/@workflow/core/workflow.js +1 -1
- package/dist/src/compiled/@workflow/world/events.d.ts +48 -0
- package/dist/src/compiled/@workflow/world/index.d.ts +3 -3
- package/dist/src/compiled/@workflow/world/queue.d.ts +31 -2
- package/dist/src/compiled/@workflow/world/runs.d.ts +2 -0
- package/dist/src/compiled/@workflow/world/spec-version.d.ts +2 -1
- package/dist/src/compiled/_chunks/workflow/attribute-changes-DGVGRGfw.js +59 -0
- 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-DMSadN9o.js +1 -0
- package/dist/src/compiled/_chunks/workflow/run-BRdn7zy_.js +1 -0
- package/dist/src/compiled/_chunks/workflow/sleep-CpXfoXLF.js +1 -0
- package/dist/src/compiled/just-bash/index.d.ts +4 -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.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 +8 -5
- 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 +6 -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/{checks/match.d.ts → match.d.ts} +17 -18
- 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/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 +10 -15
- package/dist/src/evals/runner/verdict.js +1 -1
- 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 +294 -219
- 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.js +1 -1
- package/dist/src/execution/sandbox/bindings/vercel.d.ts +2 -6
- package/dist/src/execution/sandbox/bindings/vercel.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.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/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/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 +5 -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/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 +22 -42
- package/dist/docs/evals-v2-plan.md +0 -939
- package/dist/docs/public/advanced/dev-tui.md +0 -52
- package/dist/docs/public/advanced/evals.md +0 -158
- package/dist/docs/public/reference/faqs.md +0 -48
- 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/compiled/_chunks/workflow/symbols-BWCAoPHE.js +0 -48
- package/dist/src/evals/checks/checks.d.ts +0 -66
- package/dist/src/evals/checks/checks.js +0 -2
- package/dist/src/evals/checks/index.d.ts +0 -21
- package/dist/src/evals/checks/index.js +0 -1
- package/dist/src/evals/checks/match.js +0 -1
- package/dist/src/evals/define-eval-suite.d.ts +0 -18
- 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/model-marker.d.ts +0 -12
- package/dist/src/evals/scorers/model-marker.js +0 -1
- package/dist/src/evals/scorers/run.d.ts +0 -24
- 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/docs/public/{frontend → guides/frontend}/meta.json +0 -0
- /package/dist/docs/public/{advanced → guides}/remote-agents.md +0 -0
- /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
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import type { StandardSchemaV1 } from "#compiled/@standard-schema/spec/index.js";
|
|
2
|
-
import type { HandleMessageStreamEvent } from "#protocol/message.js";
|
|
3
|
-
import type { EveEvalCheck } from "#evals/types.js";
|
|
4
|
-
import { type EveEvalSubagentCallMatchOptions, type EveEvalToolCallMatchOptions } from "#evals/checks/match.js";
|
|
5
|
-
/**
|
|
6
|
-
* Asserts the run ran to completion: it did not fail and did not park on an
|
|
7
|
-
* unanswered HITL input request.
|
|
8
|
-
*/
|
|
9
|
-
export declare function completed(): EveEvalCheck;
|
|
10
|
-
/**
|
|
11
|
-
* Asserts the run ended parked on HITL input (`input.requested` with no
|
|
12
|
-
* resolution). For park-shaped suites: approval gates, ask-question flows.
|
|
13
|
-
*/
|
|
14
|
-
export declare function waiting(): EveEvalCheck;
|
|
15
|
-
/**
|
|
16
|
-
* Asserts the run did not fail: terminal status is not `"failed"` and no
|
|
17
|
-
* `turn.failed` / `step.failed` events were emitted. Parked runs pass; use
|
|
18
|
-
* {@link completed} to also reject parking.
|
|
19
|
-
*/
|
|
20
|
-
export declare function didNotFail(): EveEvalCheck;
|
|
21
|
-
/**
|
|
22
|
-
* Asserts the joined assistant message text contains `token` (substring for
|
|
23
|
-
* strings, `test` for RegExps).
|
|
24
|
-
*/
|
|
25
|
-
export declare function messageIncludes(token: string | RegExp): EveEvalCheck;
|
|
26
|
-
/**
|
|
27
|
-
* Asserts `result.output` deep-equals `value` (exact structural equality;
|
|
28
|
-
* objects must carry the same keys on both sides).
|
|
29
|
-
*/
|
|
30
|
-
export declare function outputEquals(value: unknown): EveEvalCheck;
|
|
31
|
-
/**
|
|
32
|
-
* Asserts `result.output` validates against a Standard Schema (e.g. a Zod
|
|
33
|
-
* schema). Useful with `outputSchema` turns and `task.parseOutput`.
|
|
34
|
-
*/
|
|
35
|
-
export declare function outputMatches(schema: StandardSchemaV1): EveEvalCheck;
|
|
36
|
-
/**
|
|
37
|
-
* Asserts a tool call with `name` happened. Options constrain the call
|
|
38
|
-
* further: `input` partial-deep-matches the call input, `output` matches the
|
|
39
|
-
* result, `isError` constrains error state, and `times` requires an exact
|
|
40
|
-
* count of matching calls.
|
|
41
|
-
*/
|
|
42
|
-
export declare function toolCalled(name: string, options?: EveEvalToolCallMatchOptions): EveEvalCheck;
|
|
43
|
-
/**
|
|
44
|
-
* Asserts no tool call with `name` happened.
|
|
45
|
-
*/
|
|
46
|
-
export declare function toolNotCalled(name: string): EveEvalCheck;
|
|
47
|
-
/**
|
|
48
|
-
* Asserts the named tools were called in the given order (subsequence match:
|
|
49
|
-
* other calls may interleave).
|
|
50
|
-
*/
|
|
51
|
-
export declare function toolOrder(names: readonly string[]): EveEvalCheck;
|
|
52
|
-
/**
|
|
53
|
-
* Asserts no action result (tool, subagent, or skill) reported a failure.
|
|
54
|
-
*/
|
|
55
|
-
export declare function noFailedActions(): EveEvalCheck;
|
|
56
|
-
/**
|
|
57
|
-
* Asserts a subagent delegation to `name` occurred. `remoteUrl` matches the
|
|
58
|
-
* `subagent.called` remote metadata, `output` matches the
|
|
59
|
-
* `subagent.completed` output.
|
|
60
|
-
*/
|
|
61
|
-
export declare function subagentCalled(name: string, options?: EveEvalSubagentCallMatchOptions): EveEvalCheck;
|
|
62
|
-
/**
|
|
63
|
-
* Escape hatch: asserts an arbitrary predicate over the full typed event
|
|
64
|
-
* stream. `label` names the check in reports.
|
|
65
|
-
*/
|
|
66
|
-
export declare function event(predicate: (events: readonly HandleMessageStreamEvent[]) => boolean, label: string): EveEvalCheck;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{toErrorMessage}from"#shared/errors.js";import{deepEquals,subagentCallMatches,testRegExp,toolCallMatches}from"#evals/checks/match.js";function defineCheck(t,n){return async r=>{try{return{name:t,...await n(r)}}catch(n){return{name:t,passed:!1,message:toErrorMessage(n)}}}}function completed(){return defineCheck(`completed`,({result:e})=>e.status===`failed`?{passed:!1,message:failureDetail(`run failed`,e.derived.failureCode)}:e.derived.parked?{passed:!1,message:`run parked on ${e.derived.inputRequests.length} unanswered input request(s)`}:{passed:!0})}function waiting(){return defineCheck(`waiting`,({result:e})=>e.derived.parked?{passed:!0}:{passed:!1,message:`expected the run to park on HITL input; it ended "${e.status}" with no pending requests`})}function didNotFail(){return defineCheck(`didNotFail`,({result:e})=>{if(e.status===`failed`)return{passed:!1,message:failureDetail(`run failed`,e.derived.failureCode)};let t=e.events.find(e=>e.type===`turn.failed`||e.type===`step.failed`);return t===void 0?{passed:!0}:{passed:!1,message:`${t.type} (${t.data.code}): ${t.data.message}`}})}function messageIncludes(e){return defineCheck(`messageIncludes(${String(e)})`,({result:t})=>{let n=joinCompletedMessages(t.events);return(typeof e==`string`?n.includes(e):testRegExp(e,n))?{passed:!0}:{passed:!1,message:`assistant messages did not include ${String(e)}; got: ${truncate(n)}`}})}function outputEquals(e){return defineCheck(`outputEquals`,({result:n})=>deepEquals(n.output,e)?{passed:!0}:{passed:!1,message:`output ${truncate(JSON.stringify(n.output))} does not equal expected ${truncate(JSON.stringify(e))}`})}function outputMatches(e){return defineCheck(`outputMatches`,async({result:t})=>{let n=await e[`~standard`].validate(t.output);return!(`issues`in n)||n.issues===void 0?{passed:!0}:{passed:!1,message:`output failed schema validation: ${n.issues.map(e=>e.message).join(`; `)}`}})}function toolCalled(e,t={}){return defineCheck(`toolCalled(${e})`,n=>{let r=n.result.derived.toolCalls.filter(t=>t.name===e),a=r.filter(e=>toolCallMatches(e,t,n));if(t.times===void 0?a.length>0:a.length===t.times)return{passed:!0,metadata:{matchingCalls:a.length}};let o=r.length>0?`observed ${e} calls: ${r.map(e=>truncate(JSON.stringify(e.input))).join(`, `)}`:`observed tools: ${formatToolNames(n)}`;return{passed:!1,message:`${t.times===void 0?`expected a matching call to "${e}"`:`expected exactly ${t.times} matching call(s), found ${a.length}`}; ${o}`}})}function toolNotCalled(e){return defineCheck(`toolNotCalled(${e})`,({result:t})=>{let n=t.derived.toolCalls.filter(t=>t.name===e).length;return n===0?{passed:!0}:{passed:!1,message:`"${e}" was called ${n} time(s)`}})}function toolOrder(e){return defineCheck(`toolOrder(${e.join(` → `)})`,t=>{let n=t.result.derived.toolCalls.map(e=>e.name),r=0;for(let t of n)if(t===e[r]&&(r+=1),r===e.length)break;return r===e.length?{passed:!0}:{passed:!1,message:`missing "${e[r]}" after [${e.slice(0,r).join(`, `)}]; observed order: [${n.join(`, `)}]`}})}function noFailedActions(){return defineCheck(`noFailedActions`,({result:e})=>{let t=e.events.filter(e=>e.type===`action.result`&&(e.data.status===`failed`||e.data.result.isError===!0));if(t.length===0)return{passed:!0};let n=t.map(e=>e.data.result.kind===`tool-result`?e.data.result.toolName:e.data.result.kind);return{passed:!1,message:`${t.length} failed action(s): ${n.join(`, `)}`}})}function subagentCalled(e,t={}){return defineCheck(`subagentCalled(${e})`,r=>{let i=r.result.derived.subagentCalls.filter(t=>t.name===e);return i.filter(e=>subagentCallMatches(e,t,r)).length>0?{passed:!0}:i.length===0?{passed:!1,message:`subagent "${e}" was never called; observed: [${r.result.derived.subagentCalls.map(e=>e.name).join(`, `)}]`,metadata:{observedSubagentCalls:r.result.derived.subagentCalls}}:{passed:!1,message:`subagent "${e}" was called but no call matched the constraints`,metadata:{observedSubagentCalls:i}}})}function event(e,t){return defineCheck(`event(${t})`,({result:n})=>e(n.events)?{passed:!0}:{passed:!1,message:`event predicate "${t}" did not hold`})}function joinCompletedMessages(e){let t=[];for(let n of e)n.type===`message.completed`&&n.data.message!==null&&t.push(n.data.message);return t.join(`
|
|
2
|
-
`)}function formatToolNames(e){return`[${e.result.derived.toolCalls.map(e=>e.name).join(`, `)}]`}function failureDetail(e,t){return t===void 0?e:`${e} (code: ${t})`}function truncate(e,t=200){return e===void 0?`undefined`:e.length<=t?e:`${e.slice(0,t)}…`}export{completed,didNotFail,event,messageIncludes,noFailedActions,outputEquals,outputMatches,subagentCalled,toolCalled,toolNotCalled,toolOrder,waiting};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import * as CheckBuiltins from "#evals/checks/checks.js";
|
|
2
|
-
export type { EveEvalCheck, EveEvalCheckArgs, EveEvalCheckResult } from "#evals/types.js";
|
|
3
|
-
export type { EveEvalSubagentCallMatchOptions, EveEvalToolCallMatchOptions, EveEvalValueMatcher, } from "#evals/checks/match.js";
|
|
4
|
-
/**
|
|
5
|
-
* Built-in hard assertions for eval suites. Unlike scores, a failed check
|
|
6
|
-
* marks its case failed and produces a non-zero `eve eval` exit code.
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* ```ts
|
|
10
|
-
* import { Checks } from "eve/evals/checks";
|
|
11
|
-
*
|
|
12
|
-
* Checks.completed()
|
|
13
|
-
* Checks.didNotFail()
|
|
14
|
-
* Checks.messageIncludes("Sunny")
|
|
15
|
-
* Checks.toolCalled("bash", { input: { command: /pwd/ } })
|
|
16
|
-
* Checks.toolOrder(["search", "get_weather"])
|
|
17
|
-
* Checks.subagentCalled("weather", { output: /72F/ })
|
|
18
|
-
* Checks.event((events) => events.length > 0, "stream-not-empty")
|
|
19
|
-
* ```
|
|
20
|
-
*/
|
|
21
|
-
export declare const Checks: typeof CheckBuiltins;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import*as CheckBuiltins from"#evals/checks/checks.js";const Checks=CheckBuiltins;export{Checks};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function matchesValue(e,t,n){if(e instanceof RegExp)return testRegExpAgainst(e,t);if(typeof e==`function`){let r=e(t,n);return typeof r==`boolean`?r:typeof r==`function`?Object.is(r,t):matchesValue(r,t,n)}return Array.isArray(e)?!Array.isArray(t)||t.length!==e.length?!1:e.every((e,r)=>matchesValue(e,t[r],n)):isPlainObject(e)?isPlainObject(t)?Object.entries(e).every(([e,r])=>matchesValue(r,t[e],n)):!1:Object.is(e,t)}function toolCallMatches(e,t,n){return!(t.input!==void 0&&!matchesValue(t.input,e.input,n)||t.output!==void 0&&!matchesValue(t.output,e.output,n)||t.isError!==void 0&&e.isError!==t.isError)}function subagentCallMatches(e,t,n){return!(t.remoteUrl!==void 0&&!matchesValue(t.remoteUrl,e.remoteUrl,n)||t.output!==void 0&&!matchesValue(t.output,e.output,n))}function deepEquals(e,t){if(Object.is(e,t))return!0;if(Array.isArray(e)||Array.isArray(t))return!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length?!1:e.every((e,n)=>deepEquals(e,t[n]));if(isPlainObject(e)&&isPlainObject(t)){let n=Object.keys(e),r=Object.keys(t);return n.length===r.length?n.every(n=>deepEquals(e[n],t[n])):!1}return!1}function testRegExpAgainst(e,t){if(typeof t==`string`)return testRegExp(e,t);if(t===void 0)return!1;let n=JSON.stringify(t);return n!==void 0&&testRegExp(e,n)}function testRegExp(e,t){return(e.global||e.sticky)&&(e.lastIndex=0),e.test(t)}function isPlainObject(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}export{deepEquals,matchesValue,subagentCallMatches,testRegExp,toolCallMatches};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { EveEvalSuiteDefinition, EveEvalSuiteInput, EveEvalSuiteInputFields } from "#evals/types.js";
|
|
2
|
-
import type { ExactDefinition } from "#public/definitions/exact.js";
|
|
3
|
-
/**
|
|
4
|
-
* Defines one Eve eval suite.
|
|
5
|
-
*
|
|
6
|
-
* Requires a `scores` array, and a `model` only when a model-backed scorer
|
|
7
|
-
* (e.g. the `Autoevals` wrappers) is present without its own model override —
|
|
8
|
-
* the model is used solely for scoring, never for the agent under test. Pass
|
|
9
|
-
* either `load` (an async case loader) or `cases` (a static array), but not
|
|
10
|
-
* both. Suite identity is derived from the `evals/<path>.eval.ts` file path
|
|
11
|
-
* by the discovery layer, so authoring `id` or `name` throws.
|
|
12
|
-
*
|
|
13
|
-
* Throws on invalid input: missing `scores`, a model-backed scorer without a
|
|
14
|
-
* `model`, both or neither of `load`/`cases`, both `task.prompt` and
|
|
15
|
-
* `task.messages`, a non-array `checks`, a non-positive or non-integer
|
|
16
|
-
* `maxConcurrency`, or a negative or non-finite `timeoutMs`.
|
|
17
|
-
*/
|
|
18
|
-
export declare function defineEvalSuite<TInput extends EveEvalSuiteInput>(input: ExactDefinition<TInput, EveEvalSuiteInputFields>): EveEvalSuiteDefinition;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{modelBackedScorerName}from"#evals/scorers/model-marker.js";function defineEvalSuite(e){validateSuiteInput(e);let t=e.load??(()=>Promise.resolve([...e.cases]));return{...e,load:t,_tag:`EveEvalSuite`}}function validateSuiteInput(t){if(`id`in t)throw Error("Eval suite must not specify `id`. Suite identity is derived from the file path under evals/.");if(`name`in t)throw Error("Eval suite must not specify `name`. Suite identity is derived from the file path under evals/.");if(t.load!==void 0&&t.cases!==void 0)throw Error("Eval suite cannot specify both `load` and `cases`. Use one or the other.");if(t.load===void 0&&t.cases===void 0)throw Error("Eval suite requires either a `load` function or a `cases` array.");if(!Array.isArray(t.scores))throw Error("Eval suite requires a `scores` array.");if(t.checks!==void 0&&!Array.isArray(t.checks))throw Error("Eval suite `checks` must be an array of check functions.");if(t.model===void 0){let n=t.scores.map(modelBackedScorerName).find(e=>e!==void 0);if(n!==void 0)throw Error(`Eval suite requires a \`model\` because the ${n} scorer is model-backed. Set the suite-level \`model\` or pass \`model\` to the scorer.`)}if(t.task?.prompt!==void 0&&t.task?.messages!==void 0)throw Error("Eval suite task cannot specify both `prompt` and `messages`. Use one or the other.");if(t.maxConcurrency!==void 0&&(t.maxConcurrency<1||!Number.isInteger(t.maxConcurrency)))throw Error("Eval suite `maxConcurrency` must be a positive integer.");if(t.timeoutMs!==void 0&&(t.timeoutMs<0||!Number.isFinite(t.timeoutMs)))throw Error("Eval suite `timeoutMs` must be a non-negative finite number.")}export{defineEvalSuite};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { Client } from "#client/client.js";
|
|
2
|
-
import type { EveEvalCase, EveEvalTask, EveEvalTaskResult } from "#evals/types.js";
|
|
3
|
-
/**
|
|
4
|
-
* Options for executing one eval case.
|
|
5
|
-
*/
|
|
6
|
-
interface ExecuteCaseOptions {
|
|
7
|
-
readonly client: Client;
|
|
8
|
-
readonly testCase: EveEvalCase;
|
|
9
|
-
readonly task?: EveEvalTask;
|
|
10
|
-
readonly timeoutMs?: number;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Executes one eval case against an Eve agent target.
|
|
14
|
-
*
|
|
15
|
-
* The runner owns session lifecycle, stream capture, and derived metadata.
|
|
16
|
-
* The suite only declares how to derive messages and parse outputs.
|
|
17
|
-
*
|
|
18
|
-
* For multi-turn cases (`task.messages`), events from all turns are
|
|
19
|
-
* accumulated so derived facts reflect the full conversation. The output
|
|
20
|
-
* and status come from the final turn only.
|
|
21
|
-
*/
|
|
22
|
-
export declare function executeCase(options: ExecuteCaseOptions): Promise<EveEvalTaskResult>;
|
|
23
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createEmptyDerivedFacts,deriveRunFacts}from"#evals/runner/derive-run-facts.js";async function executeCase(e){let{client:n,testCase:r,task:i,timeoutMs:a}=e,o=n.session(),s=resolveMessages(r,i),c=a===void 0?void 0:AbortSignal.timeout(a),l=[],u;for(let e of s)u=await(await o.send({message:e,signal:c})).result(),l.push(...u.events);if(!u)return createEmptyResult();let d=u.message??null,f=deriveRunFacts(l,{sessionId:u.sessionId}),p=extractRuntimeIdentity(l),m={output:d,finalMessage:d,sessionId:u.sessionId,status:u.status,events:l,derived:f,runtimeIdentity:p};return i?.parseOutput!==void 0&&(m.output=i.parseOutput(m)),m}function resolveMessages(e,t){return t?.messages===void 0?t?.prompt===void 0?[typeof e.input==`string`?e.input:JSON.stringify(e.input)]:[t.prompt(e)]:t.messages(e)}function extractRuntimeIdentity(e){for(let t of e)if(t.type===`session.started`&&t.data.runtime!==void 0)return t.data.runtime}function createEmptyResult(){return{output:null,finalMessage:null,status:`failed`,events:[],derived:createEmptyDerivedFacts()}}export{executeCase};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { Client } from "#client/client.js";
|
|
2
|
-
import type { EveEvalSuite, EveEvalSuiteResult, EveEvalTarget } from "#evals/types.js";
|
|
3
|
-
import type { EvalReporter } from "#evals/runner/reporters/types.js";
|
|
4
|
-
/**
|
|
5
|
-
* Options for executing one eval suite.
|
|
6
|
-
*/
|
|
7
|
-
interface ExecuteSuiteOptions {
|
|
8
|
-
readonly suite: EveEvalSuite;
|
|
9
|
-
readonly target: EveEvalTarget;
|
|
10
|
-
readonly reporters: readonly EvalReporter[];
|
|
11
|
-
readonly appRoot: string;
|
|
12
|
-
/**
|
|
13
|
-
* Pre-configured client for communicating with the Eve agent.
|
|
14
|
-
* The CLI constructs this once with the appropriate auth and headers,
|
|
15
|
-
* and every case creates a fresh session from it.
|
|
16
|
-
*/
|
|
17
|
-
readonly client: Client;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Executes all cases in one eval suite, runs checks and scorers, writes
|
|
21
|
-
* artifacts, and reports results.
|
|
22
|
-
*/
|
|
23
|
-
export declare function executeSuite(options: ExecuteSuiteOptions): Promise<EveEvalSuiteResult>;
|
|
24
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{toErrorMessage}from"#shared/errors.js";import{createEmptyDerivedFacts}from"#evals/runner/derive-run-facts.js";import{resolveArtifactDirectory,writeArtifacts}from"#evals/runner/artifacts.js";import{executeCase}from"#evals/runner/execute-case.js";import{computeCaseVerdict}from"#evals/runner/verdict.js";async function executeSuite(e){let{suite:t,target:i,reporters:a,appRoot:o,client:s}=e,c=new Date().toISOString();for(let e of a)await e.onSuiteStart(t,i);let l=await t.load(),u=t.maxConcurrency??8,d=[],f=[...l],p=new Set;for(;f.length>0||p.size>0;){for(;f.length>0&&p.size<u;){let e=f.shift();if(e===void 0)break;let n=(async()=>{let n=await executeSingleCase(t,e,s,i);d.push(n);for(let e of a)await e.onCaseComplete(n)})().finally(()=>{p.delete(n)});p.add(n)}p.size>0&&await Promise.race(p)}let m=new Date().toISOString(),h={suite:t.id,target:i,cases:d,startedAt:c,completedAt:m,passed:countVerdicts(d,`passed`),failed:countVerdicts(d,`failed`),scored:countVerdicts(d,`scored`),skipped:countVerdicts(d,`skipped`),errored:d.filter(e=>e.error!==void 0).length};await writeArtifacts(resolveArtifactDirectory(o,t.id),h);for(let e of a)await e.onSuiteComplete(h);return h}async function executeSingleCase(n,r,o,s){let c,l;try{c=await executeCase({client:o,testCase:r,task:n.task,timeoutMs:n.timeoutMs})}catch(n){l=toErrorMessage(n),c={output:null,finalMessage:null,status:`failed`,events:[],derived:createEmptyDerivedFacts()}}let u=await runChecks(n,r,c,s),d=await runScorers(n,r,c),f=computeCaseVerdict({error:l,checks:u,scores:d,thresholds:n.thresholds});return{case:r,result:c,checks:u,scores:d,verdict:f,error:l}}async function runChecks(t,n,r,i){let a=[...t.checks??[],...n.checks??[]];if(a.length===0)return[];let o={case:n,result:r,target:i},s=[];for(let[t,n]of a.entries())try{s.push(await n(o))}catch(r){s.push({name:n.name===``?`check#${t}`:n.name,passed:!1,message:toErrorMessage(r)})}return s}async function runScorers(e,t,n){let r={input:typeof t.input==`string`?t.input:JSON.stringify(t.input),output:String(n.output??``),expected:t.expected===void 0?void 0:String(t.expected),model:e.model,modelOptions:e.modelOptions,case:t,result:n},i=[];for(let n of[...e.scores,...t.scores??[]]){let e=await n(r);e!==null&&i.push(e)}return i}function countVerdicts(e,t){return e.filter(e=>e.verdict===t).length}export{executeSuite};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import"../../node_modules/.pnpm/autoevals@0.0.132_ws@8.21.0/node_modules/autoevals/jsdist/index.js";import{generateText,jsonSchema}from"ai";function createAutoevalsClient(e){return{chat:{completions:{create:t=>createChatCompletion(t,e)}}}}async function createChatCompletion(t,n){let r=convertTools(t.tools),i=await generateText({model:n.languageModel,messages:convertMessages(t.messages??[]),tools:Object.keys(r).length>0?r:void 0,toolChoice:convertToolChoice(t.tool_choice),providerOptions:n.providerOptions}),a=i.toolCalls.map(e=>({id:e.toolCallId,type:`function`,function:{name:e.toolName,arguments:JSON.stringify(e.input??{})}}));return{choices:[{index:0,finish_reason:a.length>0?`tool_calls`:`stop`,message:{role:`assistant`,content:i.text||null,tool_calls:a.length>0?a:void 0}}]}}function convertMessages(e){return e.map(e=>{let t=contentToText(e.content);switch(e.role){case`assistant`:return{role:`assistant`,content:t};case`developer`:case`system`:return{role:`system`,content:t};default:return{role:`user`,content:t}}})}function contentToText(e){return e==null?``:typeof e==`string`?e:e.map(e=>e.text??``).filter(Boolean).join(`
|
|
2
|
-
`)}function convertTools(e){let n={};for(let r of e??[])r.type!==`function`||r.function?.name===void 0||(n[r.function.name]={description:r.function.description,inputSchema:jsonSchema(r.function.parameters??{})});return n}function convertToolChoice(e){if(e!==void 0)return typeof e==`string`?e:{type:`tool`,toolName:e.function.name}}export{createAutoevalsClient};
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { type LanguageModel } from "ai";
|
|
2
|
-
import type { AgentModelOptionsDefinition } from "#shared/agent-definition.js";
|
|
3
|
-
import type { EveEvalScorer } from "#evals/types.js";
|
|
4
|
-
/**
|
|
5
|
-
* Optional per-scorer overrides for model-backed Autoevals scorers. When
|
|
6
|
-
* omitted, the suite's `model` and `modelOptions` apply.
|
|
7
|
-
*/
|
|
8
|
-
export interface AutoevalsModelScorerOptions {
|
|
9
|
-
/** Judge model for this scorer. Overrides the suite judge model. */
|
|
10
|
-
readonly model?: LanguageModel;
|
|
11
|
-
/** Provider options for this scorer. Eve merges them over the suite's `modelOptions`. */
|
|
12
|
-
readonly modelOptions?: AgentModelOptionsDefinition;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Options for {@link closedQA}. Extends {@link AutoevalsModelScorerOptions}
|
|
16
|
-
* with the required free-form `criteria` the judge applies.
|
|
17
|
-
*/
|
|
18
|
-
export interface AutoevalsClosedQAOptions extends AutoevalsModelScorerOptions {
|
|
19
|
-
/**
|
|
20
|
-
* Natural-language criterion the judge model evaluates the output against.
|
|
21
|
-
*
|
|
22
|
-
* @example "The answer must mention the refund policy."
|
|
23
|
-
*/
|
|
24
|
-
readonly criteria: string;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Scores output factuality against the case `expected` value using the
|
|
28
|
-
* Autoevals Factuality grader. Requires a per-case `expected` and a judge
|
|
29
|
-
* model (the suite `model`/`modelOptions`, overridable via `options`).
|
|
30
|
-
* Returns a graded score between 0 and 1.
|
|
31
|
-
*/
|
|
32
|
-
export declare function factuality(options?: AutoevalsModelScorerOptions): EveEvalScorer;
|
|
33
|
-
/**
|
|
34
|
-
* Scores whether `output` summarizes the case `input` better than the case
|
|
35
|
-
* `expected` summary, using the Autoevals Summary grader. Requires a per-case
|
|
36
|
-
* `expected` and a judge model (the suite `model`/`modelOptions`, overridable
|
|
37
|
-
* via `options`). Returns a graded score between 0 and 1.
|
|
38
|
-
*/
|
|
39
|
-
export declare function summary(options?: AutoevalsModelScorerOptions): EveEvalScorer;
|
|
40
|
-
/**
|
|
41
|
-
* Scores semantic equivalence between the `output` SQL and the case `expected`
|
|
42
|
-
* SQL using the model-judged Autoevals Sql grader. Requires a per-case
|
|
43
|
-
* `expected` and a judge model (the suite `model`/`modelOptions`, overridable
|
|
44
|
-
* via `options`). For a deterministic check, use `Sql.exactNormalized()`
|
|
45
|
-
* instead.
|
|
46
|
-
*/
|
|
47
|
-
export declare function sql(options?: AutoevalsModelScorerOptions): EveEvalScorer;
|
|
48
|
-
/**
|
|
49
|
-
* Judges whether `output` meets a required free-form natural-language
|
|
50
|
-
* `criteria` using a judge model.
|
|
51
|
-
*
|
|
52
|
-
* Use this when "correct" cannot be expressed as exact or fuzzy match against
|
|
53
|
-
* an `expected` value (for example, "must cite a source" or "must apologize
|
|
54
|
-
* before refusing"). The `criteria` is the only required field; the judge model
|
|
55
|
-
* comes from the suite `model`/`modelOptions`, overridable via `options`.
|
|
56
|
-
* Per-case `expected` is ignored.
|
|
57
|
-
*/
|
|
58
|
-
export declare function closedQA(options: AutoevalsClosedQAOptions): EveEvalScorer;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ClosedQA,Factuality,Sql,Summary}from"../../node_modules/.pnpm/autoevals@0.0.132_ws@8.21.0/node_modules/autoevals/jsdist/index.js";import{formatLanguageModelGatewayId}from"#internal/runtime-model.js";import"ai";import{markModelBackedScorer}from"#evals/scorers/model-marker.js";import{createAutoevalsClient}from"#evals/scorers/autoevals-client.js";function factuality(e={}){return languageScorer(`Autoevals.factuality`,Factuality,e)}function summary(e={}){return languageScorer(`Autoevals.summary`,Summary,e)}function sql(e={}){return languageScorer(`Autoevals.sql`,Sql,e)}function closedQA(t){return markWhenSuiteModelRequired(`Autoevals.closedQA`,async n=>{let r=resolveJudgeModel(`Autoevals.closedQA`,t,n);return toScorerResult(await ClosedQA({input:n.input,output:n.output,criteria:t.criteria,model:formatLanguageModelGatewayId(r),client:createAutoevalsClient({languageModel:r,providerOptions:mergeProviderOptions(n,t.modelOptions)})}))},t)}function languageScorer(e,t,n){return markWhenSuiteModelRequired(e,async r=>{let i=resolveJudgeModel(e,n,r);return toScorerResult(await t({input:r.input,output:r.output,expected:r.expected,model:formatLanguageModelGatewayId(i),client:createAutoevalsClient({languageModel:i,providerOptions:mergeProviderOptions(r,n.modelOptions)})}))},n)}function markWhenSuiteModelRequired(e,t,n){return n.model===void 0?markModelBackedScorer(e,t):t}function resolveJudgeModel(e,t,n){let r=t.model??n.model;if(r===void 0)throw Error(`${e} needs a judge model. Set the suite-level \`model\` or pass \`model\` to the scorer.`);return r}function mergeProviderOptions(e,t){let n=e.modelOptions?.providerOptions,r=t?.providerOptions;if(!(n===void 0&&r===void 0))return{...n,...r}}function toScorerResult(e){return{name:e.name,score:e.score,metadata:e.metadata}}export{closedQA,factuality,sql,summary};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { EveEvalScorer } from "#evals/types.js";
|
|
2
|
-
/**
|
|
3
|
-
* Scores 1 when the task output deep-equals the case expected value (via
|
|
4
|
-
* `JSON.stringify` with sorted keys), 0 otherwise. Returns `null` when
|
|
5
|
-
* expected is absent.
|
|
6
|
-
*
|
|
7
|
-
* Uses `case.expected` and `result.output` for the raw values rather than
|
|
8
|
-
* the coerced string fields.
|
|
9
|
-
*/
|
|
10
|
-
export declare function deepEqual(): EveEvalScorer;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function deepEqual(){return({case:e,result:t})=>e.expected===void 0?null:{name:`json.deepEqual`,score:+(stableStringify(t.output)===stableStringify(e.expected))}}function stableStringify(e){return JSON.stringify(e,(e,t)=>{if(typeof t==`object`&&t&&!Array.isArray(t)){let e={};for(let n of Object.keys(t).sort())e[n]=t[n];return e}return t})}export{deepEqual};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { EveEvalScorer } from "#evals/types.js";
|
|
2
|
-
/**
|
|
3
|
-
* Marks a scorer as model-backed: it reads `args.model` and needs the suite
|
|
4
|
-
* to provide one. `defineEvalSuite` uses the marker to require `model` only
|
|
5
|
-
* when such a scorer is present without its own per-scorer model override.
|
|
6
|
-
*/
|
|
7
|
-
export declare function markModelBackedScorer(name: string, scorer: EveEvalScorer): EveEvalScorer;
|
|
8
|
-
/**
|
|
9
|
-
* Returns the marked scorer name when a scorer requires the suite judge
|
|
10
|
-
* model, or `undefined` for deterministic scorers.
|
|
11
|
-
*/
|
|
12
|
-
export declare function modelBackedScorerName(scorer: EveEvalScorer): string | undefined;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const JUDGE_MODEL_MARKER=Symbol.for(`eve.evals.requiresJudgeModel`);function markModelBackedScorer(e,t){return t[JUDGE_MODEL_MARKER]=e,t}function modelBackedScorerName(e){return e[JUDGE_MODEL_MARKER]}export{markModelBackedScorer,modelBackedScorerName};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { type EveEvalToolCallMatchOptions } from "#evals/checks/match.js";
|
|
2
|
-
import type { EveEvalScorer } from "#evals/types.js";
|
|
3
|
-
/**
|
|
4
|
-
* Scores 1 when the run did not fail and did not end parked on unanswered
|
|
5
|
-
* HITL input requests, 0 otherwise. A parked run never produced a final
|
|
6
|
-
* answer, so it does not count as success.
|
|
7
|
-
*/
|
|
8
|
-
export declare function didNotFail(): EveEvalScorer;
|
|
9
|
-
/**
|
|
10
|
-
* Scores 1 when the run called a tool with the given name at least once,
|
|
11
|
-
* 0 otherwise. `options` constrain the match further with the same matcher
|
|
12
|
-
* mini-language as `Checks.toolCalled`: `input` partial-deep-matches the
|
|
13
|
-
* call input, `output` matches the result, `isError` constrains error
|
|
14
|
-
* state, and `times` requires an exact count of matching calls.
|
|
15
|
-
*/
|
|
16
|
-
export declare function usedTool(name: string, options?: EveEvalToolCallMatchOptions): EveEvalScorer;
|
|
17
|
-
/**
|
|
18
|
-
* Scores 1 when the run made no tool calls at all, 0 otherwise.
|
|
19
|
-
*/
|
|
20
|
-
export declare function usedNoTools(): EveEvalScorer;
|
|
21
|
-
/**
|
|
22
|
-
* Scores 1 when the run made at most `max` tool calls, 0 otherwise.
|
|
23
|
-
*/
|
|
24
|
-
export declare function maxToolCalls(max: number): EveEvalScorer;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{toolCallMatches}from"#evals/checks/match.js";function didNotFail(){return({result:e})=>({name:`run.didNotFail`,score:+(e.status!==`failed`&&!e.derived.parked),metadata:{status:e.status,parked:e.derived.parked}})}function usedTool(t,n={}){return({result:r})=>{let i=r.derived.toolCalls.filter(e=>e.name===t).filter(t=>toolCallMatches(t,n)),a=n.times===void 0?i.length>0:i.length===n.times;return{name:`run.usedTool(${t})`,score:+!!a,metadata:{expectedTool:t,matchingCalls:i.length,actualToolCalls:r.derived.toolCalls.map(e=>e.name)}}}}function usedNoTools(){return({result:e})=>({name:`run.usedNoTools`,score:+(e.derived.toolCallCount===0),metadata:{toolCallCount:e.derived.toolCallCount}})}function maxToolCalls(e){return({result:t})=>{let n=+(t.derived.toolCallCount<=e);return{name:`run.maxToolCalls(${e})`,score:n,metadata:{maxAllowed:e,actualToolCallCount:t.derived.toolCallCount}}}}export{didNotFail,maxToolCalls,usedNoTools,usedTool};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { EveEvalScorer } from "#evals/types.js";
|
|
2
|
-
/**
|
|
3
|
-
* Scores 1 when the normalized SQL of `output` matches the normalized
|
|
4
|
-
* SQL of `expected`, 0 otherwise. Returns `null` when expected is absent.
|
|
5
|
-
*
|
|
6
|
-
* Normalization collapses whitespace, strips trailing semicolons, and
|
|
7
|
-
* lowercases the SQL string.
|
|
8
|
-
*/
|
|
9
|
-
export declare function exactNormalized(): EveEvalScorer;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function exactNormalized(){return({output:e,expected:t})=>{if(t===void 0)return null;let n=normalizeSql(e),r=normalizeSql(t);return{name:`sql.exactNormalized`,score:+(n===r),metadata:{normalizedOutput:n,normalizedExpected:r}}}}function normalizeSql(e){return e.toLowerCase().replace(/\s+/g,` `).trim().replace(/;+$/,``)}export{exactNormalized};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { EveEvalScorer } from "#evals/types.js";
|
|
2
|
-
/**
|
|
3
|
-
* Scores 1 when `output` exactly equals `expected` (string comparison),
|
|
4
|
-
* 0 otherwise. Returns `null` when expected is absent.
|
|
5
|
-
*/
|
|
6
|
-
export declare function exact(): EveEvalScorer;
|
|
7
|
-
/**
|
|
8
|
-
* Scores 1 when `output` contains `expected` as a substring,
|
|
9
|
-
* 0 otherwise. Returns `null` when expected is absent.
|
|
10
|
-
*/
|
|
11
|
-
export declare function includes(): EveEvalScorer;
|
|
12
|
-
/**
|
|
13
|
-
* Scores by normalized character-level Levenshtein similarity
|
|
14
|
-
* (1 = identical, 0 = entirely different). Use it for fuzzy comparison
|
|
15
|
-
* when exact match is too strict but you do not want to call an LLM
|
|
16
|
-
* judge or embedding model. Returns `null` when expected is absent.
|
|
17
|
-
*/
|
|
18
|
-
export declare function levenshtein(): EveEvalScorer;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Levenshtein}from"../../node_modules/.pnpm/autoevals@0.0.132_ws@8.21.0/node_modules/autoevals/jsdist/index.js";function exact(){return({output:e,expected:t})=>t===void 0?null:{name:`text.exact`,score:+(e===t)}}function includes(){return({output:e,expected:t})=>t===void 0?null:{name:`text.includes`,score:+!!e.includes(t)}}function levenshtein(){return async({output:t,expected:n})=>n===void 0?null:{name:`text.levenshtein`,score:(await Levenshtein({output:t,expected:n})).score}}export{exact,includes,levenshtein};
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import * as JsonScorers from "#evals/scorers/json.js";
|
|
2
|
-
import * as RunScorers from "#evals/scorers/run.js";
|
|
3
|
-
import * as SqlScorers from "#evals/scorers/sql.js";
|
|
4
|
-
import * as TextScorers from "#evals/scorers/text.js";
|
|
5
|
-
import * as AutoevalsScorers from "#evals/scorers/autoevals.js";
|
|
6
|
-
export type { AutoevalsClosedQAOptions, AutoevalsModelScorerOptions, } from "#evals/scorers/autoevals.js";
|
|
7
|
-
/**
|
|
8
|
-
* Text scorers for exact, substring, and fuzzy character-level matching.
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* ```ts
|
|
12
|
-
* import { Text } from "eve/evals/scores";
|
|
13
|
-
*
|
|
14
|
-
* Text.exact()
|
|
15
|
-
* Text.includes()
|
|
16
|
-
* Text.levenshtein()
|
|
17
|
-
* ```
|
|
18
|
-
*/
|
|
19
|
-
export declare const Text: typeof TextScorers;
|
|
20
|
-
/**
|
|
21
|
-
* JSON scorers for structural comparison.
|
|
22
|
-
*
|
|
23
|
-
* @example
|
|
24
|
-
* ```ts
|
|
25
|
-
* import { Json } from "eve/evals/scores";
|
|
26
|
-
*
|
|
27
|
-
* Json.deepEqual()
|
|
28
|
-
* ```
|
|
29
|
-
*/
|
|
30
|
-
export declare const Json: typeof JsonScorers;
|
|
31
|
-
/**
|
|
32
|
-
* SQL scorers for normalized query comparison.
|
|
33
|
-
*
|
|
34
|
-
* @example
|
|
35
|
-
* ```ts
|
|
36
|
-
* import { Sql } from "eve/evals/scores";
|
|
37
|
-
*
|
|
38
|
-
* Sql.exactNormalized()
|
|
39
|
-
* ```
|
|
40
|
-
*/
|
|
41
|
-
export declare const Sql: typeof SqlScorers;
|
|
42
|
-
/**
|
|
43
|
-
* Run-derived scorers for execution and tool-usage checks.
|
|
44
|
-
*
|
|
45
|
-
* @example
|
|
46
|
-
* ```ts
|
|
47
|
-
* import { Run } from "eve/evals/scores";
|
|
48
|
-
*
|
|
49
|
-
* Run.didNotFail()
|
|
50
|
-
* Run.usedTool("get_weather")
|
|
51
|
-
* Run.usedNoTools()
|
|
52
|
-
* Run.maxToolCalls(5)
|
|
53
|
-
* ```
|
|
54
|
-
*/
|
|
55
|
-
export declare const Run: typeof RunScorers;
|
|
56
|
-
/**
|
|
57
|
-
* Eve-owned wrappers around Braintrust Autoevals scorers.
|
|
58
|
-
*
|
|
59
|
-
* String model IDs route through the Vercel AI Gateway; AI SDK model
|
|
60
|
-
* instances run directly.
|
|
61
|
-
*
|
|
62
|
-
* @example
|
|
63
|
-
* ```ts
|
|
64
|
-
* import { Autoevals } from "eve/evals/scores";
|
|
65
|
-
*
|
|
66
|
-
* Autoevals.factuality()
|
|
67
|
-
* Autoevals.summary()
|
|
68
|
-
* Autoevals.sql()
|
|
69
|
-
* Autoevals.closedQA({ criteria: "Must cite a source." })
|
|
70
|
-
* ```
|
|
71
|
-
*/
|
|
72
|
-
export declare const Autoevals: typeof AutoevalsScorers;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import*as JsonScorers from"#evals/scorers/json.js";import*as RunScorers from"#evals/scorers/run.js";import*as SqlScorers from"#evals/scorers/sql.js";import*as TextScorers from"#evals/scorers/text.js";import*as AutoevalsScorers from"#evals/scorers/autoevals.js";const Text=TextScorers,Json=JsonScorers,Sql=SqlScorers,Run=RunScorers,Autoevals=AutoevalsScorers;export{Autoevals,Json,Run,Sql,Text};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { CompactionCallbackResult, HarnessSession } from "#harness/types.js";
|
|
2
|
-
import type { ResolvedToolDefinition } from "#runtime/types.js";
|
|
3
|
-
/**
|
|
4
|
-
* Builds the harness compaction callback for a list of resolved tools.
|
|
5
|
-
*
|
|
6
|
-
* Hooks run in registration order inside the active `AlsContext`; throws
|
|
7
|
-
* are logged so one buggy hook cannot block the rest.
|
|
8
|
-
*/
|
|
9
|
-
export declare function createToolCompactionHandler(tools: readonly ResolvedToolDefinition[]): (session: HarnessSession) => Promise<CompactionCallbackResult>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createLogger}from"#internal/logging.js";import{buildCallbackContext}from"#context/build-callback-context.js";const log=createLogger(`execution.tool-compaction`);function createToolCompactionHandler(e){let n=e.filter(e=>e.onCompact!==void 0);return async e=>{if(n.length===0)return{messages:[],session:e};let r=buildCallbackContext(),i=new AbortController().signal,a=[],o=e.state??{},s=!1;for(let t of n){let n=t.onCompact;if(n===void 0)continue;let c;try{c=await n({history:e.history,signal:i},r)??{}}catch(e){log.warn(`compaction hook for tool "${t.name}" threw and was skipped`,{toolName:t.name,error:e});continue}c.messages!==void 0&&c.messages.length>0&&a.push(...c.messages),c.sessionPatch!==void 0&&(o={...o,...c.sessionPatch},s=!0)}return{messages:a,session:s?{...e,state:o}:e}}}export{createToolCompactionHandler};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { HandleMessageStreamEvent } from "#protocol/message.js";
|
|
2
|
-
/**
|
|
3
|
-
* Returns the last boundary event observed for the current streamed turn slice.
|
|
4
|
-
*/
|
|
5
|
-
export declare function extractCurrentTurnBoundaryEvent(events: readonly HandleMessageStreamEvent[]): HandleMessageStreamEvent | undefined;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{isCurrentTurnBoundaryEvent}from"#protocol/message.js";function extractCurrentTurnBoundaryEvent(e){return[...e].reverse().find(isCurrentTurnBoundaryEvent)}export{extractCurrentTurnBoundaryEvent};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Resolves one server-provided resource reference against the configured
|
|
3
|
-
* development server URL.
|
|
4
|
-
*
|
|
5
|
-
* Absolute resource URLs are returned untouched; relative routes are
|
|
6
|
-
* resolved against the development server base.
|
|
7
|
-
*/
|
|
8
|
-
export declare function resolveDevelopmentServerResourceUrl(input: {
|
|
9
|
-
resource: string;
|
|
10
|
-
serverUrl: string;
|
|
11
|
-
}): URL;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function createDevelopmentServerBaseUrl(e){let t=new URL(e);return t.hash=``,t.search=``,t.pathname.endsWith(`/`)||(t.pathname=`${t.pathname}/`),t}function resolveDevelopmentServerResourceUrl(e){let t=e.resource.trim();try{return new URL(t)}catch{return new URL(t.replace(/^\/+/,``),createDevelopmentServerBaseUrl(e.serverUrl))}}export{resolveDevelopmentServerResourceUrl};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { ChannelSetupPrompter } from "#setup/scaffold/cli/index.js";
|
|
2
|
-
import type { Prompter } from "./prompter.js";
|
|
3
|
-
/**
|
|
4
|
-
* Adapts the setup {@link Prompter} to the channel scaffolder's
|
|
5
|
-
* {@link ChannelSetupPrompter}, mapping its checklist onto the unified
|
|
6
|
-
* `select({ multiple: true })` and reusing the same single-select method.
|
|
7
|
-
*/
|
|
8
|
-
export declare function toChannelSetupPrompter(prompter: Prompter): ChannelSetupPrompter;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function toChannelSetupPrompter(e){return{multiselect:t=>e.select({multiple:!0,message:t.message,required:t.required,options:t.options.map(e=>({value:e.value,label:e.label,hint:e.hint,disabled:e.disabled,disabledReason:e.disabled?e.disabledReason:void 0}))}),select:t=>e.select({message:t.message,initialValue:t.initialValue,options:t.options.map(e=>({value:e.value,label:e.label,hint:e.hint,disabled:e.disabled}))}),log:e.log}}export{toChannelSetupPrompter};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{pathExists,writeTextFile}from"./files.js";import{getSupportedModuleBaseName,matchesSupportedModuleBaseName}from"./module-files.js";import{patchPackageJson}from"./package-json.js";import{PNPM_WORKSPACE_PATH,ensurePnpmWorkspacePolicy}from"./pnpm-workspace.js";import{WEB_APP_TEMPLATE_FILES,WEB_APP_TEMPLATE_PACKAGE_JSON}from"./web-template.js";import"./project.js";import{basename,join,resolve}from"node:path";import{readFile,readdir,writeFile}from"node:fs/promises";const SLACK_CHANNEL_DEFAULT_ROUTE=`/eve/v1/slack`,DEFAULT_SLACK_CONNECTOR_SLUG=`my-agent`,PACKAGE_DEPENDENCY_FIELDS=[`dependencies`,`devDependencies`,`peerDependencies`,`optionalDependencies`],WEB_NEXT_CONFIG_PATH=`next.config.ts`,WEB_VERCEL_JSON_PATH=`vercel.json`,WEB_VERCEL_JSON_SCHEMA=`https://openapi.vercel.sh/vercel.json`,WEB_COMPETING_NEXT_CONFIG_PATHS=[`next.config.js`,`next.config.mjs`,WEB_NEXT_CONFIG_PATH,`next.config.mts`].filter(e=>e!==WEB_NEXT_CONFIG_PATH),WEB_DEFAULT_VERCEL_SERVICES={web:{entrypoint:`.`,framework:`nextjs`,routePrefix:`/`},eve:{buildCommand:`eve build`,entrypoint:`.`,framework:`eve`,routePrefix:`/_eve_internal/eve`}};function toSlackConnectorSlug(e){return e}function isJsonObject(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}async function readDependencyVersion(e,t){let n=JSON.parse(await readFile(e,`utf8`));if(!isJsonObject(n)||!isJsonObject(n.dependencies))return;let r=n.dependencies[t];return typeof r==`string`?r:void 0}function packageJsonHasDependency(e,t){for(let n of PACKAGE_DEPENDENCY_FIELDS){let r=e[n];if(isJsonObject(r)&&typeof r[t]==`string`)return!0}return!1}async function hasPackageDependency(t,n){if(!await pathExists(t))return!1;let r=JSON.parse(await readFile(t,`utf8`));return isJsonObject(r)&&packageJsonHasDependency(r,n)}async function ensurePackageDependency(t,n,r){return!await pathExists(t)||await readDependencyVersion(t,n)===r?[]:(await patchPackageJson(t,{dependencies:{[n]:r}}),[{path:t,dependencies:[n],devDependencies:[],scripts:[]}])}function resolveWebPackageVersions(e){return{evePackageVersion:e?.evePackageVersion??`0.6.0-beta.9`,aiPackageVersion:e?.aiPackageVersion??`7.0.0-canary.165`,nextPackageVersion:e?.nextPackageVersion??`16.2.6`,reactPackageVersion:e?.reactPackageVersion??`19.2.6`,reactDomPackageVersion:e?.reactDomPackageVersion??`19.2.6`,streamdownPackageVersion:e?.streamdownPackageVersion??`2.5.0`,zodPackageVersion:e?.zodPackageVersion??`4.4.3`,tsgoPackageVersion:e?.tsgoPackageVersion??`7.0.0-dev.20260523.1`,typesNodePackageVersion:e?.typesNodePackageVersion??`25.9.1`,typesReactPackageVersion:e?.typesReactPackageVersion??`19.2.15`,typesReactDomPackageVersion:e?.typesReactDomPackageVersion??`19.2.3`}}function formatEveDependencySpecifier(e){return/^\d+\.\d+\.\d+(?:[-+][0-9A-Za-z-.]+)?$/.test(e)?`^${e}`:e}async function patchWebPackageJson(t,n){if(!await pathExists(t))return[];assertStampedVersion(`evePackageVersion`,n.evePackageVersion),assertStampedVersion(`aiPackageVersion`,n.aiPackageVersion),assertStampedVersion(`nextPackageVersion`,n.nextPackageVersion),assertStampedVersion(`reactPackageVersion`,n.reactPackageVersion),assertStampedVersion(`reactDomPackageVersion`,n.reactDomPackageVersion),assertStampedVersion(`streamdownPackageVersion`,n.streamdownPackageVersion),assertStampedVersion(`zodPackageVersion`,n.zodPackageVersion),assertStampedVersion(`tsgoPackageVersion`,n.tsgoPackageVersion),assertStampedVersion(`typesNodePackageVersion`,n.typesNodePackageVersion),assertStampedVersion(`typesReactPackageVersion`,n.typesReactPackageVersion),assertStampedVersion(`typesReactDomPackageVersion`,n.typesReactDomPackageVersion);let r={...WEB_APP_TEMPLATE_PACKAGE_JSON.dependencies,ai:n.aiPackageVersion,eve:formatEveDependencySpecifier(n.evePackageVersion),next:n.nextPackageVersion,react:n.reactPackageVersion,"react-dom":n.reactDomPackageVersion,streamdown:n.streamdownPackageVersion,zod:n.zodPackageVersion},a={...WEB_APP_TEMPLATE_PACKAGE_JSON.devDependencies,"@types/node":n.typesNodePackageVersion,"@types/react":n.typesReactPackageVersion,"@types/react-dom":n.typesReactDomPackageVersion,"@typescript/native-preview":n.tsgoPackageVersion},o=WEB_APP_TEMPLATE_PACKAGE_JSON.scripts;return await patchPackageJson(t,{dependencies:r,devDependencies:a,scripts:o}),[{path:t,dependencies:Object.keys(r),devDependencies:Object.keys(a),scripts:Object.keys(o)}]}function normalizeSlackConnectorSlug(e){return toSlackConnectorSlug((e.trim().replace(/^@/,``).split(`/`).at(-1)??``).toLowerCase().replace(/[^a-z0-9_-]+/g,`-`).replace(/^[^a-z0-9]+/,``).replace(/[^a-z0-9]+$/,``).slice(0,100).replace(/[^a-z0-9]+$/,``)||`my-agent`)}async function deriveSlackConnectorSlug(e,t){if(t!==void 0&&t.length>0&&t!==`.`)return normalizeSlackConnectorSlug(t);try{let t=await readFile(join(e,`package.json`),`utf8`),n=JSON.parse(t);if(typeof n.name==`string`&&n.name.length>0)return normalizeSlackConnectorSlug(n.name)}catch{}return normalizeSlackConnectorSlug(basename(resolve(e))||`my-agent`)}function buildSlackTemplate(e){return`import { connectSlackCredentials } from "@vercel/connect/eve";
|
|
2
|
-
import { slackChannel } from "eve/channels/slack";
|
|
3
|
-
|
|
4
|
-
export default slackChannel({
|
|
5
|
-
credentials: connectSlackCredentials("slack/${e}"),
|
|
6
|
-
});
|
|
7
|
-
`}function renderWebAppTemplate(e,t,n){let r=n?``:`, { configureVercelJson: false }`;return e.replaceAll(`__EVE_INIT_APP_NAME__`,t).replaceAll(`__EVE_INIT_WITH_EVE_OPTIONS__`,r)}function withWebVercelServices(e){let t=JSON.parse(e);if(!isJsonObject(t))throw Error(`${WEB_VERCEL_JSON_PATH} must contain a JSON object.`);let n=t.experimentalServices;if(n!==void 0&&!isJsonObject(n))throw Error(`${WEB_VERCEL_JSON_PATH} experimentalServices must contain a JSON object.`);let r={...t,$schema:typeof t.$schema==`string`?t.$schema:WEB_VERCEL_JSON_SCHEMA,experimentalServices:{...n,web:n?.web??WEB_DEFAULT_VERCEL_SERVICES.web,eve:n?.eve??WEB_DEFAULT_VERCEL_SERVICES.eve}};return JSON.stringify(t)===JSON.stringify(r)?e:`${JSON.stringify(r,null,2)}\n`}async function ensureWebVercelServices(n){if(!await pathExists(n))return await writeTextFile(n,`${JSON.stringify({$schema:WEB_VERCEL_JSON_SCHEMA,experimentalServices:WEB_DEFAULT_VERCEL_SERVICES},null,2)}\n`,{force:!0}),`written`;let r=await readFile(n,`utf8`),i=withWebVercelServices(r);return i===r?`skipped`:(await writeFile(n,i,`utf8`),`written`)}async function findCompetingNextConfigFiles(t){let n=[];for(let r of WEB_COMPETING_NEXT_CONFIG_PATHS){let i=join(t,r);await pathExists(i)&&n.push(i)}return n}function assertStampedVersion(e,t){if(t.startsWith(`__`))throw Error(`Channel scaffold received unstamped version token (${e}=${t}). Build eve before using its dist entrypoint.`)}async function ensureChannel(e){switch(e.kind){case`slack`:return ensureSlackChannel({...e,kind:`slack`});case`web`:return ensureWebChannel({...e,kind:`web`})}}async function ensureWebChannel(n){let r=join(n.projectRoot,`package.json`),i=await pathExists(join(n.projectRoot,`app/page.tsx`));if(!n.force&&await hasPackageDependency(r,`next`))return{kind:`web`,action:`skipped`,skipReason:`nextjs-project`,filesWritten:[],filesSkipped:[r],packageJsonUpdated:[]};let c=await patchWebPackageJson(r,resolveWebPackageVersions(n.webPackageVersions)),l=[],u=[],d=[],f=[],p=basename(resolve(n.projectRoot)),m=n.configureVercelServices??!0;if(m){let e=join(n.projectRoot,WEB_VERCEL_JSON_PATH);await ensureWebVercelServices(e)===`written`?l.push(e):f.push(e)}let h=join(n.projectRoot,PNPM_WORKSPACE_PATH);await ensurePnpmWorkspacePolicy(h)===`written`?l.push(h):f.push(h);for(let[r,i]of Object.entries(WEB_APP_TEMPLATE_FILES)){let a=join(n.projectRoot,r);if(r===`agent/channels/eve.ts`&&!n.force&&await pathExists(a)){f.push(a);continue}let o=await pathExists(a);await writeTextFile(a,renderWebAppTemplate(i,p,m),{force:!0}),l.push(a),o&&u.push(a)}d.push(...await findCompetingNextConfigFiles(n.projectRoot));let g={kind:`web`,action:i?`overwritten`:`created`,filesWritten:l,filesSkipped:f,packageJsonUpdated:c};return u.length>0&&(g.filesOverwritten=u),d.length>0&&(g.competingNextConfigFiles=d),g}async function ensureSlackChannel(n){let r=join(n.projectRoot,`agent/channels/slack.ts`),i=await pathExists(r);if(!n.force&&i)return{kind:`slack`,action:`skipped`,filesWritten:[],filesSkipped:[r],packageJsonUpdated:[]};let a=n.connectPackageVersion??`0.1.1`;assertStampedVersion(`connectPackageVersion`,a);let o=await ensurePackageDependency(join(n.projectRoot,`package.json`),`@vercel/connect`,a),s=n.slackConnectorSlug??await deriveSlackConnectorSlug(n.projectRoot);await writeTextFile(r,buildSlackTemplate(s),{force:n.force});let c={kind:`slack`,action:i?`overwritten`:`created`,filesWritten:[r],filesSkipped:[],packageJsonUpdated:o,slackConnectorSlug:s};return i&&(c.filesOverwritten=[r]),c}async function listAuthoredChannels(e){let t=join(e,`agent/channels`),i;try{i=await readdir(t,{withFileTypes:!0})}catch(e){if(e.code===`ENOENT`)return[];throw e}let a=[];for(let e of i){if(e.isFile()){let t=getSupportedModuleBaseName(e.name);t!==null&&a.push(t);continue}if(e.isDirectory())try{(await readdir(join(t,e.name))).some(e=>matchesSupportedModuleBaseName(e,`connection`))&&a.push(e.name)}catch{}}return a.sort()}export{DEFAULT_SLACK_CONNECTOR_SLUG,SLACK_CHANNEL_DEFAULT_ROUTE,deriveSlackConnectorSlug,ensureChannel,listAuthoredChannels,normalizeSlackConnectorSlug};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { ChannelSetupPrompter } from "./channel-setup-prompter.js";
|
|
2
|
-
/** Cancellation raised by the `eve channels add` prompt UI. */
|
|
3
|
-
export declare class ChannelAddCancelledError extends Error {
|
|
4
|
-
constructor();
|
|
5
|
-
}
|
|
6
|
-
/** Terminal operations required by `eve channels add`. */
|
|
7
|
-
export interface ChannelAddPrompter extends ChannelSetupPrompter {
|
|
8
|
-
intro(title: string, subtitle?: string): void;
|
|
9
|
-
outro(message: string): void;
|
|
10
|
-
}
|
|
11
|
-
/** Creates the onboarding-style prompt UI for `eve channels add`. */
|
|
12
|
-
export declare function createChannelAddPrompter(): ChannelAddPrompter;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__toESM}from"../../../_virtual/_rolldown/runtime.js";import{q}from"../../../node_modules/.pnpm/@clack_core@1.3.1/node_modules/@clack/core/dist/index.js";import{require_picocolors}from"../../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js";import{formatPromptCancellation,formatPromptOpener,formatPromptOutro}from"./prompt-ui.js";import{createRailLog}from"./rail-log.js";import{runSelectComponent}from"./select-component.js";var import_picocolors=__toESM(require_picocolors(),1),ChannelAddCancelledError=class extends Error{constructor(){super(`Channel setup cancelled.`),this.name=`ChannelAddCancelledError`}};function guardCancel(e){if(q(e))throw process.stdout.write(formatPromptCancellation(`Channel setup cancelled.`,import_picocolors.default)),new ChannelAddCancelledError;return e}function createChannelAddPrompter(){let e=createRailLog({colors:import_picocolors.default,output:process.stdout});return{intro(t,n=`Eve by Vercel: like Next.js, but for agents.`){e.settle(),process.stdout.write(formatPromptOpener(t,n,import_picocolors.default))},outro(t){e.settle(),process.stdout.write(formatPromptOutro(t,import_picocolors.default))},async multiselect(t){return e.settle(),guardCancel(await runSelectComponent({message:t.message,options:t.options,multiple:!0,search:!1,required:t.required??!1,leadingRail:`green`}))},async select(t){return e.settle(),guardCancel(await runSelectComponent({message:t.message,options:t.options,multiple:!1,search:!1,required:!1,defaultValue:t.initialValue,leadingRail:`green`}))},log:e}}export{ChannelAddCancelledError,createChannelAddPrompter};
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import type { ChannelKind } from "../channels.js";
|
|
2
|
-
interface ChannelSelectOptionBase {
|
|
3
|
-
value: ChannelKind;
|
|
4
|
-
label: string;
|
|
5
|
-
hint?: string;
|
|
6
|
-
}
|
|
7
|
-
/** A selectable item displayed in the shared onboarding channel picker. */
|
|
8
|
-
export interface EnabledChannelSelectOption extends ChannelSelectOptionBase {
|
|
9
|
-
disabled?: false;
|
|
10
|
-
}
|
|
11
|
-
/** An unavailable picker item with a visible explanation for its disabled state. */
|
|
12
|
-
export interface DisabledChannelSelectOption extends ChannelSelectOptionBase {
|
|
13
|
-
disabled: true;
|
|
14
|
-
disabledReason: string;
|
|
15
|
-
}
|
|
16
|
-
/** An item displayed in the shared onboarding channel picker. */
|
|
17
|
-
export type ChannelSelectOption = EnabledChannelSelectOption | DisabledChannelSelectOption;
|
|
18
|
-
/** Reasons that make scaffoldable channel kinds unavailable in a picker. */
|
|
19
|
-
export type DisabledChannelReasons = Readonly<Partial<Record<ChannelKind, string>>>;
|
|
20
|
-
/** Minimal prompt capability needed to select scaffoldable channels. */
|
|
21
|
-
export interface ChannelPrompt {
|
|
22
|
-
multiselect(opts: {
|
|
23
|
-
message: string;
|
|
24
|
-
options: ChannelSelectOption[];
|
|
25
|
-
required?: boolean;
|
|
26
|
-
}): Promise<ChannelKind[]>;
|
|
27
|
-
}
|
|
28
|
-
/** Values supported by the select questions in add-channel setup. */
|
|
29
|
-
export type ChannelSetupPromptValue = string | number | boolean;
|
|
30
|
-
/** One select option shown during add-channel setup. */
|
|
31
|
-
export interface ChannelSetupSelectOption<T extends ChannelSetupPromptValue> {
|
|
32
|
-
value: T;
|
|
33
|
-
label: string;
|
|
34
|
-
hint?: string;
|
|
35
|
-
disabled?: boolean;
|
|
36
|
-
}
|
|
37
|
-
/** Status and subprocess output operations used by shared setup flows. */
|
|
38
|
-
export interface ChannelSetupLog {
|
|
39
|
-
message(text: string): void;
|
|
40
|
-
info(text: string): void;
|
|
41
|
-
success(text: string): void;
|
|
42
|
-
warning(text: string): void;
|
|
43
|
-
error(text: string): void;
|
|
44
|
-
/** Updates the transient detail beneath the current status while a child command runs. */
|
|
45
|
-
commandOutput(text: string): void;
|
|
46
|
-
}
|
|
47
|
-
/** Prompts and status output needed by the shared channel setup flow. */
|
|
48
|
-
export interface ChannelSetupPrompter extends ChannelPrompt {
|
|
49
|
-
select<T extends ChannelSetupPromptValue>(opts: {
|
|
50
|
-
message: string;
|
|
51
|
-
options: ChannelSetupSelectOption<T>[];
|
|
52
|
-
initialValue?: T;
|
|
53
|
-
}): Promise<T>;
|
|
54
|
-
log: ChannelSetupLog;
|
|
55
|
-
}
|
|
56
|
-
export {};
|