eve 0.27.13 → 0.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +38 -0
- package/dist/src/channel/adapter.d.ts +5 -5
- package/dist/src/channel/session.d.ts +2 -2
- package/dist/src/channel/types.d.ts +16 -6
- package/dist/src/chunks/{use-eve-agent-CWYe-vqE.js → use-eve-agent-CyDt3Lny.js} +92 -1
- package/dist/src/chunks/{use-eve-agent-CsSQOKnp.js → use-eve-agent-DaH3cf8K.js} +92 -1
- package/dist/src/cli/commands/agent-prompt/collect-intent.md +1 -1
- package/dist/src/cli/commands/channels.d.ts +0 -17
- package/dist/src/cli/commands/channels.js +1 -1
- package/dist/src/cli/commands/deploy.js +1 -1
- package/dist/src/cli/commands/extension-init.js +1 -1
- package/dist/src/cli/commands/init.js +1 -1
- package/dist/src/cli/commands/integration-connect.d.ts +29 -0
- package/dist/src/cli/commands/integration-connect.js +1 -0
- package/dist/src/cli/commands/integration-setup.d.ts +2 -3
- package/dist/src/cli/commands/integration-setup.js +1 -1
- package/dist/src/cli/commands/register-integration-commands.js +1 -1
- package/dist/src/cli/commands/registry-setup-command.d.ts +13 -3
- package/dist/src/cli/commands/registry-setup-command.js +2 -1
- package/dist/src/cli/commands/registry.d.ts +35 -1
- package/dist/src/cli/commands/registry.js +1 -1
- package/dist/src/cli/commands/trace.js +1 -1
- package/dist/src/cli/dev/tui/agent-header.js +1 -1
- package/dist/src/cli/dev/tui/prompt-command-handler.js +1 -1
- package/dist/src/cli/dev/tui/prompt-commands.d.ts +1 -1
- package/dist/src/cli/dev/tui/prompt-commands.js +1 -1
- package/dist/src/cli/dev/tui/remote-auth-command.js +1 -1
- package/dist/src/cli/dev/tui/runner.d.ts +8 -7
- package/dist/src/cli/dev/tui/runner.js +1 -1
- package/dist/src/cli/dev/tui/setup-commands.d.ts +8 -13
- package/dist/src/cli/dev/tui/setup-commands.js +3 -2
- package/dist/src/cli/dev/tui/setup-flow.d.ts +14 -5
- package/dist/src/cli/dev/tui/setup-panel.d.ts +5 -1
- package/dist/src/cli/dev/tui/setup-panel.js +2 -2
- package/dist/src/cli/dev/tui/status-line.d.ts +1 -1
- package/dist/src/cli/dev/tui/status-line.js +1 -1
- package/dist/src/cli/dev/tui/subagent-pump.d.ts +8 -2
- package/dist/src/cli/dev/tui/subagent-pump.js +1 -1
- package/dist/src/cli/dev/tui/terminal-renderer.d.ts +2 -5
- package/dist/src/cli/dev/tui/terminal-renderer.js +12 -12
- package/dist/src/cli/dev/tui/test/fake-setup-flow-renderer.js +1 -1
- package/dist/src/cli/dev/tui/tui-prompter.js +1 -1
- package/dist/src/cli/dev/tui/tui.d.ts +2 -0
- package/dist/src/cli/dev/tui/tui.js +1 -1
- package/dist/src/cli/dev/tui/vercel-status.d.ts +1 -6
- package/dist/src/cli/dev/tui/vercel-status.js +1 -1
- package/dist/src/cli/invoke/result.d.ts +15 -0
- package/dist/src/cli/invoke/result.js +1 -1
- package/dist/src/cli/option-parsers.d.ts +11 -0
- package/dist/src/cli/option-parsers.js +1 -0
- package/dist/src/cli/run.d.ts +1 -12
- package/dist/src/cli/run.js +3 -3
- package/dist/src/cli/shutdown.d.ts +2 -0
- package/dist/src/cli/shutdown.js +1 -1
- package/dist/src/client/eve-agent-store.d.ts +7 -4
- package/dist/src/client/eve-agent-store.js +1 -1
- package/dist/src/client/index.d.ts +3 -3
- package/dist/src/client/index.js +1 -1
- package/dist/src/client/message-action-parts.js +1 -1
- package/dist/src/client/message-reducer-types.d.ts +5 -3
- package/dist/src/client/message-response.d.ts +4 -4
- package/dist/src/client/ndjson.d.ts +3 -3
- package/dist/src/client/open-stream.d.ts +2 -2
- package/dist/src/client/output-schema.d.ts +2 -2
- package/dist/src/client/reducer.d.ts +2 -2
- package/dist/src/client/session-utils.d.ts +5 -5
- package/dist/src/client/session.d.ts +2 -2
- package/dist/src/client/types.d.ts +2 -2
- package/dist/src/compiled/.vendor-stamp.json +5 -5
- package/dist/src/compiled/@workflow/core/index.js +1 -1
- package/dist/src/compiled/@workflow/core/private.d.ts +21 -5
- package/dist/src/compiled/@workflow/core/private.js +1 -1
- package/dist/src/compiled/@workflow/core/runtime/world.d.ts +10 -5
- package/dist/src/compiled/@workflow/core/runtime.js +3 -3
- package/dist/src/compiled/@workflow/core/telemetry/semantic-conventions.d.ts +2 -2
- package/dist/src/compiled/@workflow/core/version.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/workflow.js +1 -1
- package/dist/src/compiled/@workflow/world-local/index.js +3 -3
- package/dist/src/compiled/@workflow/world-vercel/index.js +13 -13
- package/dist/src/compiled/_chunks/workflow/{attribute-changes-DeZc2RZz.js → attribute-changes-1LmTKuTT.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{private-Cre8uYkA.js → private-BcwCGTV5.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{resume-hook-ip1hbn1b.js → resume-hook-D1_5NCZ6.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{run-CWytxfIp.js → run-C240Ctf4.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/sleep-De802yfX.js +1 -0
- package/dist/src/compiled/_chunks/workflow/{wait-until-De9yESQN.js → wait-until-z48sPUjU.js} +2 -2
- package/dist/src/compiled/shadcn-registry/index.d.ts +1 -0
- package/dist/src/compiler/compile-from-memory.d.ts +1 -0
- package/dist/src/compiler/extension-compatibility.d.ts +8 -8
- package/dist/src/compiler/extension-compatibility.js +1 -1
- package/dist/src/compiler/manifest.d.ts +2 -2
- package/dist/src/compiler/manifest.js +1 -1
- package/dist/src/compiler/normalize-agent-config.js +1 -1
- package/dist/src/context/dynamic-instruction-lifecycle.d.ts +2 -2
- package/dist/src/context/dynamic-model-lifecycle.d.ts +2 -2
- package/dist/src/context/dynamic-skill-lifecycle.d.ts +2 -2
- package/dist/src/context/dynamic-tool-lifecycle.d.ts +2 -2
- package/dist/src/context/hook-lifecycle.d.ts +2 -2
- package/dist/src/evals/assertions/collector.d.ts +2 -10
- package/dist/src/evals/assertions/collector.js +1 -1
- package/dist/src/evals/assertions/run.d.ts +3 -3
- package/dist/src/evals/cli/eval.d.ts +6 -2
- package/dist/src/evals/cli/eval.js +2 -2
- package/dist/src/evals/cli/filter.d.ts +14 -0
- package/dist/src/evals/cli/filter.js +1 -0
- package/dist/src/evals/context.js +1 -1
- package/dist/src/evals/diagnostics.d.ts +8 -0
- package/dist/src/evals/diagnostics.js +1 -0
- package/dist/src/evals/expect/index.d.ts +1 -1
- package/dist/src/evals/expect/index.js +1 -1
- package/dist/src/evals/index.d.ts +1 -1
- package/dist/src/evals/judge.js +2 -1
- package/dist/src/evals/match.d.ts +4 -4
- package/dist/src/evals/runner/artifacts.js +1 -1
- package/dist/src/evals/runner/derive-run-facts.d.ts +2 -2
- package/dist/src/evals/runner/reporters/assertion-diagnostics.d.ts +3 -0
- package/dist/src/evals/runner/reporters/assertion-diagnostics.js +3 -0
- package/dist/src/evals/runner/reporters/braintrust.js +1 -1
- package/dist/src/evals/runner/reporters/console.js +1 -1
- package/dist/src/evals/runner/reporters/junit.js +2 -2
- package/dist/src/evals/session.d.ts +3 -3
- package/dist/src/evals/types.d.ts +33 -17
- package/dist/src/execution/cancel-descendant-turns-step.js +1 -1
- package/dist/src/execution/dispatch-runtime-actions-step.js +1 -1
- package/dist/src/execution/route-child-delivery.d.ts +4 -3
- package/dist/src/execution/route-child-delivery.js +1 -1
- package/dist/src/execution/session-delivery-hook.d.ts +1 -0
- package/dist/src/execution/session-delivery-hook.js +1 -1
- package/dist/src/execution/session-timeout-control.d.ts +9 -0
- package/dist/src/execution/session-timeout-control.js +1 -0
- package/dist/src/execution/session-timeout-steps.d.ts +13 -0
- package/dist/src/execution/session-timeout-steps.js +1 -0
- package/dist/src/execution/session-timeout-workflow.d.ts +6 -0
- package/dist/src/execution/session-timeout-workflow.js +1 -0
- package/dist/src/execution/session-timeout.d.ts +2 -0
- package/dist/src/execution/session-timeout.js +1 -0
- package/dist/src/execution/settle-cancelled-turn-step.js +1 -1
- package/dist/src/execution/subagent-event-proxy-step.js +1 -1
- package/dist/src/execution/subagent-hitl-proxy.d.ts +5 -1
- package/dist/src/execution/subagent-hitl-proxy.js +1 -1
- package/dist/src/execution/terminal-session-completion-step.d.ts +5 -0
- package/dist/src/execution/terminal-session-completion-step.js +1 -0
- package/dist/src/execution/terminal-session-failure-step.js +1 -1
- package/dist/src/execution/turn-cancellation-control.js +1 -1
- package/dist/src/execution/turn-workflow.js +1 -1
- package/dist/src/execution/workflow-entry.d.ts +1 -0
- package/dist/src/execution/workflow-entry.js +1 -1
- package/dist/src/execution/workflow-runtime.d.ts +4 -0
- package/dist/src/execution/workflow-runtime.js +1 -1
- package/dist/src/execution/workflow-steps.d.ts +12 -2
- package/dist/src/execution/workflow-steps.js +1 -1
- package/dist/src/harness/agent-otel-provider.js +1 -1
- package/dist/src/harness/ai-sdk-hook-bridge.js +1 -1
- package/dist/src/harness/input-extraction.js +1 -1
- package/dist/src/harness/input-request-class.d.ts +23 -0
- package/dist/src/harness/input-request-class.js +1 -0
- package/dist/src/harness/input-requests.d.ts +20 -9
- package/dist/src/harness/input-requests.js +1 -1
- package/dist/src/harness/instrumentation-lifecycle.d.ts +12 -1
- package/dist/src/harness/proxy-input-requests.d.ts +10 -4
- package/dist/src/harness/proxy-input-requests.js +1 -1
- package/dist/src/harness/session-limit-continuation.d.ts +0 -11
- package/dist/src/harness/session-limit-continuation.js +1 -1
- package/dist/src/harness/session-limit-enforcement.d.ts +3 -2
- package/dist/src/harness/session-limit-enforcement.js +1 -1
- package/dist/src/harness/session-token-limits.d.ts +41 -0
- package/dist/src/harness/session-token-limits.js +1 -0
- package/dist/src/harness/stale-input-responses.js +1 -1
- package/dist/src/harness/subagent-token-budget.d.ts +6 -4
- package/dist/src/harness/subagent-token-budget.js +1 -1
- package/dist/src/harness/tool-loop.js +1 -1
- package/dist/src/harness/turn-sleep.d.ts +12 -0
- package/dist/src/harness/turn-sleep.js +1 -0
- package/dist/src/harness/turn-tag-state.d.ts +26 -17
- package/dist/src/harness/turn-tag-state.js +1 -1
- package/dist/src/harness/types.d.ts +4 -4
- package/dist/src/harness/workflow-lifecycle.d.ts +2 -2
- package/dist/src/internal/application/compiled-artifacts.js +7 -7
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/internal/authored-definition/core.js +1 -1
- package/dist/src/internal/nitro/host/dev-authored-source-watcher.d.ts +4 -0
- package/dist/src/internal/nitro/host/dev-authored-source-watcher.js +1 -1
- package/dist/src/internal/nitro/host/start-development-server.js +2 -2
- package/dist/src/internal/workflow/development-world-protocol.js +1 -1
- package/dist/src/internal/workflow/world-target.d.ts +7 -0
- package/dist/src/internal/workflow/world-target.js +1 -0
- package/dist/src/internal/workflow-bundle/workflow-core-shim.d.ts +1 -1
- package/dist/src/internal/workflow-bundle/workflow-core-shim.js +1 -1
- package/dist/src/protocol/event-dedupe.d.ts +25 -0
- package/dist/src/protocol/event-dedupe.js +1 -0
- package/dist/src/protocol/event-id.d.ts +16 -0
- package/dist/src/protocol/event-id.js +1 -0
- package/dist/src/protocol/message.d.ts +39 -23
- package/dist/src/protocol/message.js +2 -2
- package/dist/src/protocol/routes.d.ts +4 -0
- package/dist/src/protocol/routes.js +1 -1
- package/dist/src/public/channels/discord/discordChannel.d.ts +3 -3
- package/dist/src/public/channels/github/githubChannel.d.ts +3 -3
- package/dist/src/public/channels/linear/linearChannel.d.ts +3 -3
- package/dist/src/public/channels/slack/hitl.js +1 -1
- package/dist/src/public/channels/slack/slackChannel.d.ts +3 -3
- package/dist/src/public/channels/teams/hitl.js +1 -1
- package/dist/src/public/channels/teams/teamsChannel.d.ts +3 -3
- package/dist/src/public/channels/telegram/telegramChannel.d.ts +3 -3
- package/dist/src/public/channels/twilio/twilioChannel.d.ts +3 -3
- package/dist/src/public/definitions/channel.d.ts +4 -4
- package/dist/src/public/definitions/hook.d.ts +2 -2
- package/dist/src/public/tools/sleep/index.d.ts +18 -0
- package/dist/src/public/tools/sleep/index.js +1 -0
- package/dist/src/react/use-eve-agent.d.ts +3 -2
- package/dist/src/runtime/framework-tools/ask-question.js +1 -1
- package/dist/src/runtime/framework-tools/sleep.d.ts +15 -0
- package/dist/src/runtime/framework-tools/sleep.js +1 -0
- package/dist/src/runtime/hooks/registry.d.ts +2 -2
- package/dist/src/runtime/input/types.d.ts +19 -4
- package/dist/src/runtime/input/types.js +1 -1
- package/dist/src/runtime/resolve-agent.js +1 -1
- package/dist/src/runtime/types.d.ts +2 -2
- package/dist/src/services/dev-client/runtime-artifacts.d.ts +7 -0
- package/dist/src/services/dev-client/runtime-artifacts.js +1 -1
- package/dist/src/setup/boxes/apply-ai-gateway-credential.js +1 -1
- package/dist/src/setup/boxes/deploy-project.d.ts +3 -3
- package/dist/src/setup/flows/deploy.js +1 -1
- package/dist/src/setup/flows/ensure-vercel-project.d.ts +17 -0
- package/dist/src/setup/flows/ensure-vercel-project.js +1 -0
- package/dist/src/setup/flows/in-project.d.ts +1 -1
- package/dist/src/setup/flows/link.js +1 -1
- package/dist/src/setup/flows/model.js +1 -1
- package/dist/src/setup/flows/provider.js +1 -1
- package/dist/src/setup/flows/registry.d.ts +20 -0
- package/dist/src/setup/flows/registry.js +1 -0
- package/dist/src/setup/index.d.ts +0 -1
- package/dist/src/setup/index.js +1 -1
- package/dist/src/setup/{channel-setup-environment.d.ts → integrations/channels/environment.d.ts} +2 -2
- package/dist/src/setup/integrations/channels/environment.js +1 -0
- package/dist/src/setup/{channel-setup-integrations.d.ts → integrations/channels/index.d.ts} +3 -3
- package/dist/src/setup/integrations/channels/index.js +1 -0
- package/dist/src/setup/{channel-setup-runner.d.ts → integrations/channels/runner.d.ts} +1 -1
- package/dist/src/setup/integrations/channels/runner.js +1 -0
- package/dist/src/setup/{boxes/add-channels.d.ts → integrations/channels/setup.d.ts} +32 -22
- package/dist/src/setup/integrations/channels/setup.js +2 -0
- package/dist/src/setup/{channel-setup-slack.d.ts → integrations/channels/slack.d.ts} +1 -1
- package/dist/src/setup/integrations/channels/slack.js +1 -0
- package/dist/src/setup/{channel-setup-integration.d.ts → integrations/channels/types.d.ts} +23 -7
- package/dist/src/setup/{channel-setup-ui.d.ts → integrations/channels/ui.d.ts} +2 -2
- package/dist/src/setup/integrations/channels/ui.js +2 -0
- package/dist/src/setup/{channel-setup-web.d.ts → integrations/channels/web.d.ts} +1 -1
- package/dist/src/setup/integrations/channels/web.js +1 -0
- package/dist/src/setup/primitives/run-vercel.d.ts +1 -0
- package/dist/src/setup/primitives/run-vercel.js +1 -1
- package/dist/src/setup/prompter.d.ts +16 -3
- package/dist/src/setup/prompter.js +1 -1
- package/dist/src/setup/registry-setup-client.d.ts +18 -0
- package/dist/src/setup/registry-setup-client.js +2 -0
- package/dist/src/setup/registry-setup-protocol.d.ts +93 -0
- package/dist/src/setup/registry-setup-protocol.js +1 -0
- package/dist/src/setup/scaffold/channels-catalog.d.ts +1 -1
- package/dist/src/setup/scaffold/create/extension.js +2 -2
- package/dist/src/setup/scaffold/create/project.js +2 -2
- package/dist/src/setup/scaffold/create/web-template.d.ts +1 -1
- package/dist/src/setup/scaffold/create/web-template.js +2 -2
- package/dist/src/setup/scaffold/create-in-place.d.ts +1 -0
- package/dist/src/setup/scaffold/create-in-place.js +1 -0
- package/dist/src/setup/scaffold/index.js +1 -1
- package/dist/src/setup/scaffold/update/connections.js +3 -3
- package/dist/src/setup/scaffold/update/update-connection-connector.js +1 -1
- package/dist/src/setup/vercel-project-framework.d.ts +1 -1
- package/dist/src/setup/vercel-project-framework.js +1 -1
- package/dist/src/setup/vercel-project.d.ts +17 -2
- package/dist/src/setup/vercel-project.js +0 -0
- package/dist/src/shared/agent-definition.d.ts +12 -0
- package/dist/src/shared/dynamic-tool-definition.d.ts +2 -2
- package/dist/src/shared/ulid.d.ts +39 -0
- package/dist/src/shared/ulid.js +1 -0
- package/dist/src/svelte/index.js +1 -1
- package/dist/src/svelte/use-eve-agent.d.ts +4 -4
- 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.d.ts +4 -4
- package/dist/src/vue/use-eve-agent.js +1 -1
- package/docs/agent-config.md +28 -16
- package/docs/channels/overview.mdx +1 -1
- package/docs/channels/slack.mdx +2 -2
- package/docs/concepts/default-harness.md +12 -0
- package/docs/concepts/execution-model-and-durability.mdx +1 -1
- package/docs/concepts/sessions-runs-and-streaming.md +61 -0
- package/docs/evals/assertions.mdx +8 -1
- package/docs/evals/judge.mdx +11 -1
- package/docs/evals/reporters.mdx +1 -1
- package/docs/evals/running.mdx +3 -0
- package/docs/guides/client/streaming.mdx +9 -3
- package/docs/guides/dev-tui.md +9 -14
- package/docs/guides/frontend/overview.mdx +4 -2
- package/docs/guides/frontend/use-eve-agent-svelte.mdx +1 -1
- package/docs/guides/frontend/use-eve-agent-vue.mdx +10 -10
- package/docs/guides/hooks.md +40 -2
- package/docs/guides/instrumentation.md +5 -1
- package/docs/reference/cli.md +25 -38
- package/docs/reference/typescript-api.md +2 -1
- package/docs/tools/human-in-the-loop.md +5 -0
- package/docs/tutorial/ship-it.mdx +2 -2
- package/package.json +11 -6
- package/dist/src/compiled/@workflow/core/runtime/world-target.d.ts +0 -11
- package/dist/src/compiled/_chunks/workflow/sleep-BjrUxUcs.js +0 -1
- package/dist/src/node_modules/.pnpm/@workflow_utils@5.0.0-beta.7/node_modules/@workflow/utils/dist/index.js +0 -1
- package/dist/src/node_modules/.pnpm/@workflow_utils@5.0.0-beta.7/node_modules/@workflow/utils/dist/parse-name.js +0 -1
- package/dist/src/node_modules/.pnpm/@workflow_utils@5.0.0-beta.7/node_modules/@workflow/utils/dist/promise.js +0 -1
- package/dist/src/node_modules/.pnpm/@workflow_utils@5.0.0-beta.7/node_modules/@workflow/utils/dist/time.js +0 -1
- package/dist/src/node_modules/.pnpm/@workflow_utils@5.0.0-beta.7/node_modules/@workflow/utils/dist/workflow-routes.js +0 -1
- package/dist/src/node_modules/.pnpm/@workflow_utils@5.0.0-beta.7/node_modules/@workflow/utils/dist/world-target.js +0 -1
- package/dist/src/node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js +0 -1
- package/dist/src/setup/boxes/add-channels.js +0 -2
- package/dist/src/setup/boxes/add-connections.d.ts +0 -26
- package/dist/src/setup/boxes/add-connections.js +0 -1
- package/dist/src/setup/boxes/install-channel-registry-items.d.ts +0 -8
- package/dist/src/setup/boxes/install-channel-registry-items.js +0 -1
- package/dist/src/setup/boxes/one-shot-next-steps.d.ts +0 -18
- package/dist/src/setup/boxes/one-shot-next-steps.js +0 -2
- package/dist/src/setup/boxes/preflight.d.ts +0 -37
- package/dist/src/setup/boxes/preflight.js +0 -1
- package/dist/src/setup/boxes/resolve-target.d.ts +0 -58
- package/dist/src/setup/boxes/resolve-target.js +0 -1
- package/dist/src/setup/boxes/scaffold.d.ts +0 -40
- package/dist/src/setup/boxes/scaffold.js +0 -1
- package/dist/src/setup/boxes/select-channels.d.ts +0 -49
- package/dist/src/setup/boxes/select-channels.js +0 -1
- package/dist/src/setup/boxes/select-chat.d.ts +0 -38
- package/dist/src/setup/boxes/select-chat.js +0 -1
- package/dist/src/setup/boxes/select-connections.d.ts +0 -30
- package/dist/src/setup/boxes/select-connections.js +0 -1
- package/dist/src/setup/boxes/select-setup-mode.d.ts +0 -32
- package/dist/src/setup/boxes/select-setup-mode.js +0 -1
- package/dist/src/setup/channel-setup-deployment.d.ts +0 -11
- package/dist/src/setup/channel-setup-deployment.js +0 -1
- package/dist/src/setup/channel-setup-environment.js +0 -1
- package/dist/src/setup/channel-setup-integration.js +0 -1
- package/dist/src/setup/channel-setup-integrations.js +0 -1
- package/dist/src/setup/channel-setup-runner.js +0 -1
- package/dist/src/setup/channel-setup-slack.js +0 -1
- package/dist/src/setup/channel-setup-ui.js +0 -2
- package/dist/src/setup/channel-setup-web.js +0 -1
- package/dist/src/setup/flows/channels.d.ts +0 -57
- package/dist/src/setup/flows/channels.js +0 -1
- package/dist/src/setup/flows/connections.d.ts +0 -37
- package/dist/src/setup/flows/connections.js +0 -3
- package/dist/src/setup/onboarding.d.ts +0 -60
- package/dist/src/setup/onboarding.js +0 -1
- /package/dist/src/{node_modules/.pnpm/@workflow_utils@5.0.0-beta.7/node_modules/@workflow/utils/dist/pluralize.js → setup/integrations/channels/types.js} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eve",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Filesystem-first framework for durable backend AI agents that run anywhere.",
|
|
6
6
|
"keywords": [
|
|
@@ -101,6 +101,11 @@
|
|
|
101
101
|
"import": "./dist/src/public/tools/approval/index.js",
|
|
102
102
|
"default": "./dist/src/public/tools/approval/index.js"
|
|
103
103
|
},
|
|
104
|
+
"./tools/sleep": {
|
|
105
|
+
"types": "./dist/src/public/tools/sleep/index.d.ts",
|
|
106
|
+
"import": "./dist/src/public/tools/sleep/index.js",
|
|
107
|
+
"default": "./dist/src/public/tools/sleep/index.js"
|
|
108
|
+
},
|
|
104
109
|
"./tools": {
|
|
105
110
|
"types": "./dist/src/public/tools/index.d.ts",
|
|
106
111
|
"import": "./dist/src/public/tools/index.js",
|
|
@@ -307,13 +312,13 @@
|
|
|
307
312
|
"@vercel/otel": "2.1.3",
|
|
308
313
|
"@vercel/sandbox": "2.8.0",
|
|
309
314
|
"@vercel/sdk": "1.28.8",
|
|
310
|
-
"@workflow/core": "5.0.0-beta.
|
|
311
|
-
"@workflow/errors": "5.0.0-beta.
|
|
315
|
+
"@workflow/core": "5.0.0-beta.38",
|
|
316
|
+
"@workflow/errors": "5.0.0-beta.14",
|
|
312
317
|
"@workflow/serde": "5.0.0-beta.2",
|
|
313
|
-
"@workflow/utils": "5.0.0-beta.
|
|
318
|
+
"@workflow/utils": "5.0.0-beta.8",
|
|
314
319
|
"@workflow/world": "5.0.0-beta.23",
|
|
315
|
-
"@workflow/world-local": "5.0.0-beta.
|
|
316
|
-
"@workflow/world-vercel": "5.0.0-beta.
|
|
320
|
+
"@workflow/world-local": "5.0.0-beta.32",
|
|
321
|
+
"@workflow/world-vercel": "5.0.0-beta.34",
|
|
317
322
|
"ai": "^7.0.38",
|
|
318
323
|
"autoevals": "0.0.132",
|
|
319
324
|
"chat": "4.34.0",
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { World } from '#compiled/@workflow/world/index.js';
|
|
2
|
-
/**
|
|
3
|
-
* Unaliased target stub.
|
|
4
|
-
*
|
|
5
|
-
* Framework integrations alias this module to the configured world package at
|
|
6
|
-
* build time, including the default local world. Reaching this file means that
|
|
7
|
-
* static injection did not happen, so fail loudly instead of importing a
|
|
8
|
-
* fallback world that bundlers could retain alongside the configured one.
|
|
9
|
-
*/
|
|
10
|
-
export declare function createWorld(): World | Promise<World>;
|
|
11
|
-
//# sourceMappingURL=world-target.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{In as e}from"./wait-until-De9yESQN.js";import{i as t}from"./attribute-changes-DeZc2RZz.js";async function n(r){let i=globalThis[e];return i||t(`sleep()`,`https://workflow-sdk.dev/docs/api-reference/workflow/sleep`,n),i(r)}export{n as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./parse-name.js";import"./pluralize.js";import"./promise.js";import"./time.js";import"./workflow-routes.js";import{getWorldImport}from"./world-target.js";export{getWorldImport};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function parseName(e,t){if(typeof t!=`string`)return null;let[n,r,...i]=t.split(`//`);if(n!==e||!r||i.length===0)return null;let a=i.join(`//`),o=a.split(`/`).at(-1)??``,s=``;return s=r.startsWith(`./`)?r.split(`/`).at(-1)??``:(r.split(`@`).slice(0,-1).join(`@`)||r.split(`@`)[0])?.split(`/`).at(-1)??``,[`default`,`__default`].includes(o)&&s&&(o=s),{shortName:o,moduleSpecifier:r,functionName:a}}function parseWorkflowName(e){return parseName(`workflow`,e)}function parseStepName(e){return parseName(`step`,e)}export{parseStepName,parseWorkflowName};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"../../../../../../../_virtual/_rolldown/runtime.js";import{require_ms}from"../../../../../ms@2.1.3/node_modules/ms/index.js";require_ms();export{};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const WORKFLOW_ROUTE_BASE=`/.well-known/workflow/v1`;export{WORKFLOW_ROUTE_BASE};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function normalizeWorkflowTargetWorldImport(e){if(e)return e===`local`?`@workflow/world-local`:e===`vercel`?`@workflow/world-vercel`:e}function isVercelDeploymentEnv(e=process.env){return e.VERCEL_DEPLOYMENT_ID?!0:e.VERCEL===`1`&&e.VERCEL_ENV!==`development`&&e.NODE_ENV!==`development`}function resolveWorkflowTargetWorld(e=process.env){return e.WORKFLOW_TARGET_WORLD||(isVercelDeploymentEnv(e)?`vercel`:`local`)}function getWorldImport(e=process.env){return normalizeWorkflowTargetWorldImport(resolveWorkflowTargetWorld(e))}function isVercelWorldTarget(e){return e===`vercel`||e===`@workflow/world-vercel`}export{getWorldImport,isVercelDeploymentEnv,isVercelWorldTarget,normalizeWorkflowTargetWorldImport,resolveWorkflowTargetWorld};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__commonJSMin}from"../../../../../_virtual/_rolldown/runtime.js";var require_ms=__commonJSMin(((e,t)=>{var n=1e3,r=n*60,i=r*60,a=i*24,o=a*7,s=a*365.25;t.exports=function(e,t){t||={};var n=typeof e;if(n===`string`&&e.length>0)return parse(e);if(n===`number`&&isFinite(e))return t.long?fmtLong(e):fmtShort(e);throw Error(`val is not a non-empty string or a valid number. val=`+JSON.stringify(e))};function parse(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var c=parseFloat(t[1]);switch((t[2]||`ms`).toLowerCase()){case`years`:case`year`:case`yrs`:case`yr`:case`y`:return c*s;case`weeks`:case`week`:case`w`:return c*o;case`days`:case`day`:case`d`:return c*a;case`hours`:case`hour`:case`hrs`:case`hr`:case`h`:return c*i;case`minutes`:case`minute`:case`mins`:case`min`:case`m`:return c*r;case`seconds`:case`second`:case`secs`:case`sec`:case`s`:return c*n;case`milliseconds`:case`millisecond`:case`msecs`:case`msec`:case`ms`:return c;default:return}}}}function fmtShort(e){var t=Math.abs(e);return t>=a?Math.round(e/a)+`d`:t>=i?Math.round(e/i)+`h`:t>=r?Math.round(e/r)+`m`:t>=n?Math.round(e/n)+`s`:e+`ms`}function fmtLong(e){var t=Math.abs(e);return t>=a?plural(e,t,a,`day`):t>=i?plural(e,t,i,`hour`):t>=r?plural(e,t,r,`minute`):t>=n?plural(e,t,n,`second`):e+` ms`}function plural(e,t,n,r){var i=t>=n*1.5;return Math.round(e/n)+` `+r+(i?`s`:``)}}));export default require_ms();export{require_ms};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{detectDeployment,isProjectResolved,mergeProjectResolution,projectResolutionFromDeployment}from"../project-resolution.js";import{provisionSlackbot,reconcileSlackUid}from"../slackbot.js";import{hasVercelProject,requireProjectPath}from"../state.js";import{WizardCancelledError}from"../step.js";import{deriveSlackConnectorSlug,ensureChannel}from"#setup/scaffold/index.js";import{formatNodeEngineOverrideWarning}from"#setup/node-engine.js";import{detectPackageManager}from"#setup/package-manager.js";import{runVercel}from"#setup/primitives/run-vercel.js";import{HumanActionRequiredError}from"#setup/human-action.js";import{createPromptCommandOutput,withPhase}from"#setup/cli/index.js";import{runPackageManagerInstall}from"#setup/primitives/pm/run.js";const SLACKBOT_NOT_ATTACHED_ERROR=`Slackbot provisioning did not attach this project. Slack channel was not added.`;function slackbotFailureCopy(e){switch(e.state){case`not-installed`:return{reason:`Slackbot is not connected to a Slack workspace. Slack channel was not added.`,followUp:"Continuing without Slack — the install timed out and was cleaned up; re-run `eve channels add slack` to try again."};case`cleanup-failed`:return{reason:`The abandoned Slack connector could not be removed. Slack channel was not added.`,followUp:`Continuing without Slack — resolve the cleanup warning above before trying again.`};case`connector-lookup-failed`:return{reason:`Existing Slack connectors could not be inspected. Slack channel was not added.`,followUp:"Continuing without Slack — restore Vercel CLI access, then re-run `eve channels add slack`."};case`installation-check-failed`:return{reason:`Slack workspace installation could not be verified. Slack channel was not added.`,followUp:"Continuing without Slack — verify Vercel Connect is reachable, then re-run `eve channels add slack`."};case`existing-not-installed`:return{reason:`The existing Slack connector is not connected to a Slack workspace. Slack channel was not added.`,followUp:`Continuing without Slack — resolve the existing connector warning above before trying again.`};case`detach-failed`:return{reason:`Slackbot provisioning could not replace the existing trigger destination. Slack channel was not added.`,followUp:"Continuing without Slack — run the `vercel connect detach` and `vercel connect attach` commands above."};case`attach-failed`:return{reason:SLACKBOT_NOT_ATTACHED_ERROR,followUp:"Continuing without Slack — finish event delivery with the `vercel connect attach` command above."};case`create-failed`:return{reason:`Slackbot creation failed.`,followUp:"Continuing without Slack — add it later with `eve channels add slack`."}}}function warnOverwrittenFiles(e,t){for(let n of t??[])e.warning(`Overwrote ${n}`)}function warnCompetingNextConfigFiles(e,t){for(let n of t??[])e.warning(`Found competing Next.js config at ${n}; merge any needed settings into next.config.ts and remove it before starting the preview, or Next.js may ignore the generated eve rewrite.`)}function addChannels(u){let d=u.deps??{ensureChannel,deriveSlackConnectorSlug,provisionSlackbot,reconcileSlackUid,detectPackageManager,runPackageManagerInstall,runVercel,detectDeployment};async function scaffoldSlackChannel(e,t,n,r,i,a){let o=!1;if(!t.slackScaffolded){let t=await d.ensureChannel({projectRoot:n,kind:`slack`,slackConnectorUid:a,slackConnectorSlug:r,force:u.force,skipDependencyMutation:u.skipDependencyMutation});i.dependenciesChanged||=t.packageJsonUpdated.length>0,warnOverwrittenFiles(e,t.filesOverwritten),t.action===`created`||t.action===`overwritten`?e.success(`Scaffolded channel: slack`):e.info(`Channel "slack" already exists. Skipping file creation.`),o=t.action!==`skipped`,i.slackScaffolded=!0}return i.channelsAdded.push(`slack`),o}async function linkProjectForSlackbot(e,i,a,o,s){if(o)throw new HumanActionRequiredError({kind:`vercel-link`,command:`vercel link`,reason:`Slackbot creation needs this directory linked to a Vercel project.`});if(e.message(`Linking this directory to a Vercel project...`),!await d.runVercel([`link`],{cwd:i,signal:s}))throw s?.throwIfAborted(),Error(`Vercel project linking failed. Slackbot creation did not start.`);let c=mergeProjectResolution(a,projectResolutionFromDeployment(await d.detectDeployment(i,{signal:s})));if(!isProjectResolved(c))throw Error(`Vercel project linking failed. Slackbot creation did not start.`);return c}async function addWebChannelToPayload(e,t,n,r,i,a){if(!t.channelSelection.includes(`web`))return;if(t.webScaffolded){i.channelsAdded.push(`web`);return}e.message(`Scaffolding Web Chat channel files...`);let s={projectRoot:n,kind:`web`,packageManager:r,force:u.force,configureVercelServices:u.configureVercelServices??hasVercelProject(t),skipDependencyMutation:u.skipDependencyMutation};u.evePackage!==void 0&&(s.webPackageVersions={evePackage:u.evePackage});let c=await d.ensureChannel(s);if(i.dependenciesChanged||=c.packageJsonUpdated.length>0,a?.throwIfAborted(),warnOverwrittenFiles(e,c.filesOverwritten),c.kind===`web`&&c.action!==`skipped`&&c.nodeEngineOverride!==void 0&&e.warning(formatNodeEngineOverrideWarning(c.nodeEngineOverride)),warnCompetingNextConfigFiles(e,`competingNextConfigFiles`in c?c.competingNextConfigFiles:void 0),c.action===`created`||c.action===`overwritten`){e.success(`Scaffolded channel: web`),i.webScaffolded=!0,i.channelsAdded.push(`web`);return}e.info(`Next.js project detected. Skipping Web Chat scaffolding.`)}function assertSlackProjectReady(e){if(u.ensureLinkedProject===void 0){if(!hasVercelProject(e))throw Error(`Slack requires a Vercel project. Re-run and choose to deploy to Vercel to add Slack.`);if(!isProjectResolved(e.project))throw Error(`Expected a linked Vercel project for Slack, but none was resolved.`)}}async function provisionSlackbotWithControls(e,t,n,r){let i={selectConnector:async(e,t)=>{if(u.presetCreateSlackbot===!0)return t??e[0];let n={message:`Which Slack app would you like to use?`,options:[...e.map(e=>{let n={value:e.uid,label:`Use ${e.uid}`};return e.uid===t?.uid&&(n.hint=`Matches this agent`),n}),{value:`create`,label:`Create a new Slack app`}],initialValue:t?.uid},r=await u.prompter.select(n);return r===`create`?`create`:e.find(e=>e.uid===r)}};return r!==void 0&&(i.signal=r),u.prompter.awaitChoice!==void 0&&(i.awaitChoice=u.prompter.awaitChoice),d.provisionSlackbot(e,t,n,void 0,i)}async function scaffoldAttachedSlackChannel(e,t,n,r,i,a){if(!await scaffoldSlackChannel(e,t,n,r,i,a.connectorUid)&&!await d.reconcileSlackUid(e,n,a,`slack/${r}`))throw Error(`Slack connector UID update is required before deployment.`)}async function addSlackChannelToPayload(e,n,r,i,a,o){if(!n.channelSelection.includes(`slack`))return;let s=await d.deriveSlackConnectorSlug(i,n.agentName);if(u.slackCredentials===`environment`){if(!n.slackScaffolded){let t=await d.ensureChannel({projectRoot:i,kind:`slack`,slackConnectorSlug:s,slackCredentials:`environment`,force:u.force,skipDependencyMutation:u.skipDependencyMutation});a.dependenciesChanged||=t.packageJsonUpdated.length>0,warnOverwrittenFiles(e,t.filesOverwritten),t.action===`created`||t.action===`overwritten`?e.success(`Scaffolded channel: slack`):e.info(`Channel "slack" already exists. Skipping file creation.`),a.slackScaffolded=!0}a.channelsAdded.push(`slack`);return}if(assertSlackProjectReady(n),n.slackbotCreated){if(!n.slackbotAttached)throw Error(SLACKBOT_NOT_ATTACHED_ERROR);if(!n.deploymentPending)return;let t=n.slackConnectorUid;if(t===void 0)throw Error(`Slack connector UID was not resolved. Slack deployment did not start.`);await scaffoldAttachedSlackChannel(e,n,i,s,a,{state:`attached`,connectorUid:t});return}isProjectResolved(a.project)||(a.project=await linkProjectForSlackbot(e,i,a.project,r.headless,o));let l=await provisionSlackbotWithControls(e,i,s,o);if(o?.throwIfAborted(),l.state===`cancelled`)throw new WizardCancelledError;if(l.state!==`attached`){let t=slackbotFailureCopy(l);if(u.slackbotFailure!==`warn-and-continue`)throw Error(t.reason);e.warning(`${t.reason} ${t.followUp}`);return}a.slackbot={connectorUid:l.connectorUid,chatUrl:l.chatUrl,workspaceName:l.workspaceName},await scaffoldAttachedSlackChannel(e,n,i,s,a,l)}async function installChannelDependencies(e,t,n,r,i){if(!(u.skipDependencyMutation||!r.dependenciesChanged)){if(await withPhase(e,`Installing channel dependencies (${n} install)...`,()=>d.runPackageManagerInstall(n,t,{onOutput:createPromptCommandOutput(e),signal:i}))){r.dependenciesInstalled=!0;return}e.warning(`Dependency installation failed. The new channels stay unloadable until \`${n} install\` or a deploy succeeds.`)}}async function performAddChannels(e,t,n){n?.throwIfAborted();let r=u.prompter.log,i=requireProjectPath(e),a={channelsAdded:[],webScaffolded:e.webScaffolded,slackScaffolded:e.slackScaffolded,dependenciesChanged:!1,dependenciesInstalled:!1,project:e.project},o=await d.detectPackageManager(i);return await addWebChannelToPayload(r,e,i,o.kind,a,n),await addSlackChannelToPayload(r,e,t,i,a,n),await installChannelDependencies(r,i,o.kind,a,n),a}return{id:`add-channels`,async gather({state:e}){let t=u.headless??!1;if(t&&e.channelSelection.includes(`slack`)&&u.slackCredentials!==`environment`)throw Error("Slack setup is interactive. Run `eve channels add slack` from an interactive terminal.");return{headless:t,createSlackbot:u.presetCreateSlackbot}},async perform({state:e,input:t,signal:n}){try{return await performAddChannels(e,t,n)}catch(e){if(!(e instanceof WizardCancelledError)){let t=e instanceof Error?e.message:String(e),n=t.split(`
|
|
2
|
-
`)[0]?.trim()??t;u.prompter.log.error(n)}throw e}},apply(e,t){let r=[...e.channels];for(let e of t.channelsAdded)r.includes(e)||r.push(e);let i={...e,channels:r,webScaffolded:t.webScaffolded,slackScaffolded:t.slackScaffolded,deploymentPending:e.deploymentPending||t.channelsAdded.length>0,deploymentDependenciesInstalled:t.dependenciesChanged?t.dependenciesInstalled:e.deploymentDependenciesInstalled,project:mergeProjectResolution(e.project,t.project)};return t.slackbot===void 0?i:{...i,slackbotCreated:!0,slackbotAttached:!0,slackConnectorUid:t.slackbot.connectorUid,slackChatUrl:t.slackbot.chatUrl,slackWorkspaceName:t.slackbot.workspaceName}}}}export{addChannels};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { ensureConnection, listAuthoredConnections } from "#setup/scaffold/index.js";
|
|
2
|
-
import { cleanupCreatedConnectionConnector, setupConnectionConnector } from "../connection-connector.js";
|
|
3
|
-
import { readProjectLink, type ProjectResolution } from "../project-resolution.js";
|
|
4
|
-
import type { Prompter } from "../prompter.js";
|
|
5
|
-
import { type SetupState } from "../state.js";
|
|
6
|
-
import type { SetupBox } from "../step.js";
|
|
7
|
-
/** Injected for tests; defaults to the real scaffold and Connect effects. */
|
|
8
|
-
export interface AddConnectionsDeps {
|
|
9
|
-
ensureConnection: typeof ensureConnection;
|
|
10
|
-
listAuthoredConnections: typeof listAuthoredConnections;
|
|
11
|
-
readProjectLink: typeof readProjectLink;
|
|
12
|
-
setupConnectionConnector: typeof setupConnectionConnector;
|
|
13
|
-
cleanupCreatedConnectionConnector: typeof cleanupCreatedConnectionConnector;
|
|
14
|
-
}
|
|
15
|
-
export interface AddConnectionsOptions {
|
|
16
|
-
/** Carries connector selection prompts and provisioning output. */
|
|
17
|
-
prompter: Prompter;
|
|
18
|
-
signal?: AbortSignal;
|
|
19
|
-
deps?: AddConnectionsDeps;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* THE CONNECTIONS BOX: executes the {@link ConnectionPlan}s the
|
|
23
|
-
* select-connections box recorded during the interview. It scaffolds each file
|
|
24
|
-
* and resolves the concrete Connect connector against the linked project.
|
|
25
|
-
*/
|
|
26
|
-
export declare function addConnections(options: AddConnectionsOptions): SetupBox<SetupState, null, ProjectResolution>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{isProjectResolved,mergeProjectResolution,readProjectLink}from"../project-resolution.js";import{hasVercelProject,requireProjectPath}from"../state.js";import{cleanupCreatedConnectionConnector,setupConnectionConnector}from"../connection-connector.js";import{canonicalConnectorNameForEntry}from"../scaffold/connections/catalog.js";import{projectIdFromResolution}from"../vercel-project.js";import{CONNECT_REQUIRES_VERCEL}from"./select-connections.js";import{ensureConnection,listAuthoredConnections}from"#setup/scaffold/index.js";function logFollowUp(e,t){if(t.action===`skipped`){e.warning(`Skipped ${t.slug} (already exists; pass --force to overwrite).`);return}e.success(`Added agent/connections/${t.slug}.ts`),t.envKeysAdded.length>0?e.info(`Set ${t.envKeysAdded.join(`, `)} in .env.local`):t.envKeysRequired.length>0&&e.info(`Set ${t.envKeysRequired.join(`, `)} in your environment`)}function withConnectorUid(e,t){if(e.auth?.kind!==`connect`)throw Error(`Connection ${e.slug} is not configured for Vercel Connect.`);return{...e,auth:{...e.auth,connector:t}}}function addConnections(e){let s=e.deps??{ensureConnection,listAuthoredConnections,readProjectLink,setupConnectionConnector,cleanupCreatedConnectionConnector};return{id:`add-connections`,shouldRun(e){return e.connectionSelection.length>0},async gather(){return null},async perform({state:t}){let n=e.prompter.log,a=requireProjectPath(t),o=!hasVercelProject(t),c=t.project,l=new Set(await s.listAuthoredConnections(a));for(let r of t.connectionSelection){if(l.has(r.slug)){logFollowUp(n,await s.ensureConnection({projectRoot:a,slug:r.slug,protocol:r.protocol,entry:r.entry}));continue}let t=r.entry,i;switch(r.provision.kind){case`connect`:{let l=canonicalConnectorNameForEntry(r.entry);if(l===void 0)throw Error(`Connection ${r.slug} has no canonical connector name.`);let u=await s.setupConnectionConnector({log:n,prompter:e.prompter,projectRoot:a,slug:r.slug,service:r.provision.service,canonicalConnectorName:l,project:await resolveConnectionProject({noVercel:o,project:c,projectRoot:a,readProjectLink:s.readProjectLink}),signal:e.signal});t=withConnectorUid(t,u.connectorUid),u.kind===`created`&&(i=u.connectorId);break}case`command-hint`:n.info(`Run \`vercel connect create ${r.provision.service} --name ${r.slug}\`, then set the connector UID in agent/connections/${r.slug}.ts.`);break;case`connect-manual`:n.warning(`Could not determine a Connect service for ${r.slug}. Create the connector manually and set its UID in agent/connections/${r.slug}.ts.`);break;case`none`:break}let u;try{u=await s.ensureConnection({projectRoot:a,slug:r.slug,protocol:r.protocol,entry:t})}catch(e){if(i!==void 0)try{await s.cleanupCreatedConnectionConnector({log:n,projectRoot:a,connectorId:i})}catch(t){throw AggregateError([e,t],`${e instanceof Error?e.message:String(e)} ${t instanceof Error?t.message:String(t)}`)}throw e}u.action===`skipped`&&i!==void 0&&await s.cleanupCreatedConnectionConnector({log:n,projectRoot:a,connectorId:i}),logFollowUp(n,u),u.action!==`skipped`&&l.add(u.slug)}return c},apply(e,n){return{...e,project:mergeProjectResolution(e.project,n)}}}}async function resolveConnectionProject(t){if(t.noVercel)throw Error(CONNECT_REQUIRES_VERCEL);if(!isProjectResolved(t.project))throw Error(`Expected a linked Vercel project for Connect, but none was resolved.`);let n=await t.readProjectLink(t.projectRoot);if(n===void 0||n.projectId!==projectIdFromResolution(t.project))throw Error("A linked Vercel project is required. Run `eve link`, then retry /connect.");return n}export{addConnections};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { AddCommandOptions } from "#cli/commands/registry.js";
|
|
2
|
-
import type { SetupState } from "../state.js";
|
|
3
|
-
import type { SetupBox } from "../step.js";
|
|
4
|
-
export interface InstallChannelRegistryItemsOptions {
|
|
5
|
-
installItem?: (appRoot: string, item: string, options?: AddCommandOptions) => Promise<void>;
|
|
6
|
-
}
|
|
7
|
-
/** Installs registry-owned channel dependencies before integration setup runs. */
|
|
8
|
-
export declare function installChannelRegistryItems(options?: InstallChannelRegistryItemsOptions): SetupBox<SetupState, undefined, undefined>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function installChannelRegistryItems(e={}){let t=e.installItem??(async(e,t,n)=>{let{installOfficialRegistryItem:r}=await import(`#cli/commands/registry.js`);await r(e,t,n)});return{id:`install-channel-registry-items`,shouldRun:e=>e.channelSelection.length>0,gather:async()=>void 0,async perform({state:e}){if(e.projectPath.kind!==`resolved`)throw Error(`Expected a resolved project path before installing channel dependencies.`);for(let n of e.channelSelection)await t(e.projectPath.path,`channel/${n}`)},apply:e=>e}}export{installChannelRegistryItems};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { detectPackageManager } from "../package-manager.js";
|
|
2
|
-
import type { Prompter } from "../prompter.js";
|
|
3
|
-
import { type SetupState } from "../state.js";
|
|
4
|
-
import type { SetupBox } from "../step.js";
|
|
5
|
-
export interface OneShotNextStepsOptions {
|
|
6
|
-
/** Reports the next-steps note. The box never prompts. */
|
|
7
|
-
prompter: Prompter;
|
|
8
|
-
/** Test seam for the package manager that owns generated commands. */
|
|
9
|
-
detectPackageManager?: typeof detectPackageManager;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* THE ONE-SHOT EPILOGUE BOX: a one-shot run skips every post-scaffold box, so
|
|
13
|
-
* it ends here with exactly the commands that take the scaffold to a running
|
|
14
|
-
* agent. No project or team was resolved, so `vercel link` is the credential
|
|
15
|
-
* step: a logged-in CLI plus the link lets the runtime mint an AI Gateway
|
|
16
|
-
* token, and pasting a key into `.env.local` is the manual alternative.
|
|
17
|
-
*/
|
|
18
|
-
export declare function oneShotNextSteps(options: OneShotNextStepsOptions): SetupBox<SetupState, null, null>;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{__toESM}from"../../_virtual/_rolldown/runtime.js";import{require_picocolors}from"../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js";import{requireProjectPath}from"../state.js";import{detectPackageManager}from"../package-manager.js";import{relative}from"node:path";var import_picocolors=__toESM(require_picocolors(),1);function cdTarget(e){let t=relative(process.cwd(),e);return t.length===0||t.startsWith(`..`)?e:t}function step(e,t){return` ${import_picocolors.default.bold(e)}${t===void 0?``:` ${import_picocolors.default.dim(`# ${t}`)}`}`}function oneShotNextSteps(e){return{id:`one-shot-next-steps`,shouldRun(e){return e.setupMode===`one-shot`},async gather(){return null},async perform({state:t}){let n=requireProjectPath(t),r=await(e.detectPackageManager??detectPackageManager)(n),i=[`Your agent is scaffolded but not deployed or connected yet.`,...t.projectPath.inPlace?[]:[step(`cd ${cdTarget(n)}`)],step(`${r.kind} install`),step(`vercel link`,`or set AI_GATEWAY_API_KEY in .env.local manually`),step(`eve dev`)];return e.prompter.note(i.join(`
|
|
2
|
-
`),`Next steps`,{tone:`success`}),null},apply(e){return e}}}export{oneShotNextSteps};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { fetchGatewayModelIds } from "../gateway-models.js";
|
|
2
|
-
import type { SetupState } from "../state.js";
|
|
3
|
-
import type { SetupBox } from "../step.js";
|
|
4
|
-
/**
|
|
5
|
-
* What the gather decided to validate. `model: null` means nothing to
|
|
6
|
-
* validate: interactive runs pick from the gateway-backed catalog already.
|
|
7
|
-
*/
|
|
8
|
-
export interface PreflightInput {
|
|
9
|
-
/** Model id to validate against the AI Gateway catalog, or null to skip. */
|
|
10
|
-
model: string | null;
|
|
11
|
-
}
|
|
12
|
-
/** Injected for tests; defaults to the real AI Gateway catalog read. */
|
|
13
|
-
export interface PreflightDeps {
|
|
14
|
-
fetchGatewayModelIds: typeof fetchGatewayModelIds;
|
|
15
|
-
}
|
|
16
|
-
export interface PreflightOptions {
|
|
17
|
-
/** Directory to run `vercel` from: the project's parent (it does not exist yet). */
|
|
18
|
-
cwd: string;
|
|
19
|
-
/**
|
|
20
|
-
* Headless mode: only a headless `--model` needs catalog validation, so the
|
|
21
|
-
* gather derives a model to check from state. Interactive runs pick from the
|
|
22
|
-
* gateway-backed catalog and validate nothing. The box prompts for nothing,
|
|
23
|
-
* so this dispatch comes from the composition site, not from a question.
|
|
24
|
-
*/
|
|
25
|
-
headless?: boolean;
|
|
26
|
-
deps?: PreflightDeps;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* THE PREFLIGHT BOX: fails fast on an unknown `--model` BEFORE any filesystem
|
|
30
|
-
* scaffolding, so a bad flag never leaves a half-provisioned project on disk.
|
|
31
|
-
* Only a headless `--model` needs the gateway round-trip, so the interactive
|
|
32
|
-
* gather yields a no-op input. The scaffold bakes a gateway-format model id
|
|
33
|
-
* on every wiring (the `byok` block routes through the Gateway too), so the
|
|
34
|
-
* check applies regardless of how credentials are wired. Team validation
|
|
35
|
-
* lives in the resolve-provisioning box.
|
|
36
|
-
*/
|
|
37
|
-
export declare function preflight(options: PreflightOptions): SetupBox<SetupState, PreflightInput, null>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{fetchGatewayModelIds}from"../gateway-models.js";function preflight(t){let n=t.deps??{fetchGatewayModelIds};return{id:`preflight`,async gather({state:e}){return t.headless?{model:e.modelId.length>0?e.modelId:null}:{model:null}},async perform({input:e}){return e.model!==null&&await validateModel(n,e.model,t.cwd),null},apply(e){return e}}}async function validateModel(e,t,n){let r=await e.fetchGatewayModelIds(n);if(!(r===null||r.has(t)))throw Error(`Model "${t}" is not in the AI Gateway catalog. Pass a model id from https://ai-gateway.vercel.sh/v1/models (e.g. anthropic/claude-sonnet-5).`)}export{preflight};
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { isEveProject } from "#setup/scaffold/index.js";
|
|
2
|
-
import { type Asker } from "../ask.js";
|
|
3
|
-
import { pathExists } from "../path-exists.js";
|
|
4
|
-
import { type ResolvedProjectPath, type SetupState } from "../state.js";
|
|
5
|
-
import type { SetupBox } from "../step.js";
|
|
6
|
-
/** Injected for tests; defaults to the real filesystem probes. */
|
|
7
|
-
export interface ResolveTargetDeps {
|
|
8
|
-
pathExists: typeof pathExists;
|
|
9
|
-
isEveProject: typeof isEveProject;
|
|
10
|
-
}
|
|
11
|
-
export interface ResolveTargetOptions {
|
|
12
|
-
/** Resolves the name and directory questions; the composed stack decides how. */
|
|
13
|
-
asker: Asker;
|
|
14
|
-
/**
|
|
15
|
-
* Interactive-only notice surface for the duplicate-directory re-ask loop.
|
|
16
|
-
* Narrower than the prompter it forwards to; goes away when notices get a
|
|
17
|
-
* channel of their own.
|
|
18
|
-
*/
|
|
19
|
-
notify(message: string): void;
|
|
20
|
-
/**
|
|
21
|
-
* Skip the name question and use this value. Stays a factory option (not a
|
|
22
|
-
* `withAnswers` rung) so it keeps short-circuiting before any ask while
|
|
23
|
-
* still being validated, exactly as the dual-face box did.
|
|
24
|
-
*/
|
|
25
|
-
presetName?: string;
|
|
26
|
-
/** Parent directory the project folder is created inside. Defaults to cwd. */
|
|
27
|
-
targetDirectory?: string;
|
|
28
|
-
/** Force scaffolding into the target directory instead of a `./<name>` child. */
|
|
29
|
-
inPlace?: boolean;
|
|
30
|
-
/**
|
|
31
|
-
* Treat an existing `./<name>` that is already an eve project as resumable
|
|
32
|
-
* instead of refusing it. Composed on for headless runs so re-runs converge;
|
|
33
|
-
* interactive runs keep refusing so a human notices the collision.
|
|
34
|
-
*/
|
|
35
|
-
resumeExisting?: boolean;
|
|
36
|
-
deps?: ResolveTargetDeps;
|
|
37
|
-
}
|
|
38
|
-
/** The name + directory decision gather produces. */
|
|
39
|
-
export interface ResolveTargetInput {
|
|
40
|
-
agentName: string;
|
|
41
|
-
inPlace: boolean;
|
|
42
|
-
}
|
|
43
|
-
export interface ResolveTargetPayload {
|
|
44
|
-
agentName: string;
|
|
45
|
-
projectPath: Extract<ResolvedProjectPath, {
|
|
46
|
-
kind: "resolved";
|
|
47
|
-
}>;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* THE TARGET BOX (Q1 + Q2): resolve the agent name (the shared identity for
|
|
51
|
-
* the directory and the Vercel project) and decide whether to scaffold in
|
|
52
|
-
* place or into a new `./<name>` child. The current-vs-new question only fires
|
|
53
|
-
* when the target directory already looks like a project; otherwise creating a
|
|
54
|
-
* new directory is the announced default. A headless re-run resumes an
|
|
55
|
-
* existing eve project directory instead of refusing it (composed via
|
|
56
|
-
* `resumeExisting`), so re-runs converge.
|
|
57
|
-
*/
|
|
58
|
-
export declare function resolveTarget(options: ResolveTargetOptions): SetupBox<SetupState, ResolveTargetInput, ResolveTargetPayload>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{SkippedSignal,select,text}from"../ask.js";import{CURRENT_DIRECTORY_PROJECT_NAME}from"../state.js";import{pathExists}from"../path-exists.js";import{parseProjectName,validateProjectName}from"../project-name.js";import{basename,join,resolve}from"node:path";import{isEveProject}from"#setup/scaffold/index.js";const DEFAULT_PROJECT_NAME=`my-agent`;function validatePresetName(e){return parseProjectName(e)}async function askAgentName(e,t){return(await e.ask(text({key:`name`,message:`What's your agent's name?`,placeholder:DEFAULT_PROJECT_NAME,recommended:DEFAULT_PROJECT_NAME,validate:e=>validateProjectName(e.trim()||DEFAULT_PROJECT_NAME)??null,required:t}))).trim()||DEFAULT_PROJECT_NAME}function deriveInPlaceProjectName(e){let t=resolve(e??process.cwd()),n=basename(t);if(validateProjectName(n)!==void 0)throw Error(`Cannot infer a valid project name from "${t}". Pass --target-dir with a valid basename, or scaffold into a renamed directory.`);return n}function resolveTarget(n){let i=n.deps??{pathExists,isEveProject},parent=()=>resolve(n.targetDirectory??process.cwd()),inPlaceBasename=()=>basename(parent());async function assertNewDirectoryAvailable(e){if(e===CURRENT_DIRECTORY_PROJECT_NAME)return;let t=resolve(parent(),e);if(await i.pathExists(t)&&!(n.resumeExisting===!0&&await i.isEveProject(t)))throw Error(`Directory "${e}" already exists. Choose a different name.`)}async function looksLikeProject(e){let[t,n]=await Promise.all([i.pathExists(join(e,`package.json`)),i.pathExists(join(e,`.vercel`))]);return t||n}async function askFreeDirectoryName(e){let t=e;for(;;){if(t===CURRENT_DIRECTORY_PROJECT_NAME||!await i.pathExists(resolve(parent(),t)))return t;n.notify(`Directory "${t}" already exists. Choose a different name.`),t=await askAgentName(n.asker,!0)}}function inPlaceInput(){return{agentName:n.presetName===void 0?deriveInPlaceProjectName(n.targetDirectory):validatePresetName(n.presetName),inPlace:!0}}return{id:`resolve-target`,async gather(){if(n.inPlace){if(n.presetName===void 0&&validateProjectName(inPlaceBasename())!==void 0)try{return{agentName:await askAgentName(n.asker,!1),inPlace:!0}}catch(t){if(!(t instanceof SkippedSignal))throw t}return inPlaceInput()}if(n.presetName!==void 0){let e=validatePresetName(n.presetName);return await assertNewDirectoryAvailable(e),{agentName:e,inPlace:!1}}let r=await askAgentName(n.asker,!0);return await looksLikeProject(parent())&&await n.asker.ask(select({key:`target-directory`,message:`This directory already looks like a project. Where should the agent live?`,options:[{id:`current`,label:`Scaffold into this directory`,value:`current`},{id:`new`,label:`Create a new directory ./${r}`,value:`new`}],recommended:`new`,required:!0}))===`current`?{agentName:r,inPlace:!0}:{agentName:await askFreeDirectoryName(r),inPlace:!1}},async perform({input:e}){let t=e.inPlace?CURRENT_DIRECTORY_PROJECT_NAME:e.agentName;return{agentName:e.agentName,projectPath:{kind:`resolved`,inPlace:e.inPlace,path:resolve(parent(),t)}}},apply(e,t){return{...e,agentName:t.agentName,projectPath:t.projectPath}}}}export{resolveTarget};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { isEveProject, scaffoldBaseProject, type EvePackageContract } from "#setup/scaffold/index.js";
|
|
2
|
-
import type { Prompter } from "../prompter.js";
|
|
3
|
-
import { type SetupState } from "../state.js";
|
|
4
|
-
import type { SetupBox } from "../step.js";
|
|
5
|
-
/** Injected for tests; defaults to the real eve-scaffold helpers. */
|
|
6
|
-
export interface ScaffoldDeps {
|
|
7
|
-
scaffoldBaseProject: typeof scaffoldBaseProject;
|
|
8
|
-
isEveProject: typeof isEveProject;
|
|
9
|
-
}
|
|
10
|
-
export interface ScaffoldOptions {
|
|
11
|
-
/** Reports scaffold progress and overwrite warnings. The box never prompts. */
|
|
12
|
-
prompter: Prompter;
|
|
13
|
-
evePackage?: EvePackageContract;
|
|
14
|
-
/** Parent directory the project folder is created inside. Defaults to cwd. */
|
|
15
|
-
targetDirectory?: string;
|
|
16
|
-
/** Allow the in-place scaffold to replace eve scaffold files that already exist. */
|
|
17
|
-
overwriteExisting?: boolean;
|
|
18
|
-
/**
|
|
19
|
-
* Headless mode: a headless re-run over an existing eve project skips
|
|
20
|
-
* scaffolding (idempotent re-entry); an interactive run always scaffolds and
|
|
21
|
-
* lets `scaffoldBaseProject` own the in-place conflict rules. The box prompts
|
|
22
|
-
* for nothing, so this dispatch comes from the composition site.
|
|
23
|
-
*/
|
|
24
|
-
headless?: boolean;
|
|
25
|
-
deps?: ScaffoldDeps;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Whether the run is headless. A headless re-run over an existing eve project
|
|
29
|
-
* skips scaffolding (idempotent re-entry); an interactive run always scaffolds.
|
|
30
|
-
*/
|
|
31
|
-
export interface ScaffoldInput {
|
|
32
|
-
headless: boolean;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* THE SCAFFOLD BOX: writes the base agent template into the path resolved by
|
|
36
|
-
* the target box. It prompts for nothing; the gather only records which mode
|
|
37
|
-
* ran, because a headless re-run on an already-scaffolded eve project skips the
|
|
38
|
-
* write and continues setup instead of failing.
|
|
39
|
-
*/
|
|
40
|
-
export declare function scaffold(options: ScaffoldOptions): SetupBox<SetupState, ScaffoldInput, string>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{CURRENT_DIRECTORY_PROJECT_NAME,requireProjectPath}from"../state.js";import{isEveProject,scaffoldBaseProject}from"#setup/scaffold/index.js";function scaffold(i){let a=i.deps??{scaffoldBaseProject,isEveProject};return{id:`scaffold`,async gather(){return{headless:i.headless??!1}},async perform({state:n,input:r}){let{prompter:o}=i,s=n.projectPath.inPlace?CURRENT_DIRECTORY_PROJECT_NAME:n.agentName,c=requireProjectPath(n);if(r.headless&&!i.overwriteExisting&&await a.isEveProject(c))return o.log.message(`Existing eve project detected; continuing setup...`),c;o.log.message(`Scaffolding project files...`);let l=await a.scaffoldBaseProject({projectName:s,model:n.modelId,byokProvider:n.modelWiring===`self`,targetDirectory:i.targetDirectory,overwriteExisting:i.overwriteExisting,onOverwriteFile:e=>o.log.warning(`Overwrote ${e}`),evePackage:i.evePackage});return o.log.success(`Scaffolded project at ${l}`),l},apply(e,t){return{...e,projectPath:{kind:`resolved`,inPlace:e.projectPath.inPlace,path:t}}}}}export{scaffold};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { type ChannelKind } from "#setup/scaffold/index.js";
|
|
2
|
-
import type { DisabledChannelReasons } from "#setup/cli/index.js";
|
|
3
|
-
import type { Asker } from "../ask.js";
|
|
4
|
-
import { type SetupState } from "../state.js";
|
|
5
|
-
import type { SetupBox } from "../step.js";
|
|
6
|
-
/** The channel question, shared with the dev TUI's /channels action list. */
|
|
7
|
-
export declare const CHANNELS_PROMPT_MESSAGE = "Where will you chat with your agent?";
|
|
8
|
-
export interface SelectChannelsOptions {
|
|
9
|
-
/** Resolves the channels question; the composed stack decides how. */
|
|
10
|
-
asker: Asker;
|
|
11
|
-
/**
|
|
12
|
-
* Resolve to these channels without asking. Stays a factory option (not a
|
|
13
|
-
* `withAnswers` rung) so it keeps short-circuiting the picker exactly as the
|
|
14
|
-
* dual-face box did, while still passing the Slack/Vercel gate and
|
|
15
|
-
* `validateSelection` like a picked selection.
|
|
16
|
-
*/
|
|
17
|
-
presetChannels?: ChannelKind[];
|
|
18
|
-
/**
|
|
19
|
-
* Picker shape, chosen explicitly because the variants differ in whether a
|
|
20
|
-
* selection is required and whether the REPL row is shown. The
|
|
21
|
-
* "channels-add" picker allows an empty submission and keeps Slack selectable
|
|
22
|
-
* because capability planning later chooses Connect or environment credentials.
|
|
23
|
-
*/
|
|
24
|
-
variant: "onboarding" | "in-project" | "channels-add";
|
|
25
|
-
/**
|
|
26
|
-
* Reasons for channel kinds that cannot be added to this project (existing
|
|
27
|
-
* registrations); matching rows render disabled with the reason.
|
|
28
|
-
*/
|
|
29
|
-
disabledChannelReasons?: DisabledChannelReasons;
|
|
30
|
-
/**
|
|
31
|
-
* Rejects a selection before any later box runs effects. Runs on both the
|
|
32
|
-
* asked and the preset path, so a flag-driven selection is validated exactly
|
|
33
|
-
* like a picked one. A throw aborts the run.
|
|
34
|
-
*/
|
|
35
|
-
validateSelection?(channels: readonly ChannelKind[]): Promise<void> | void;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* THE CHANNELS BOX: interview-phase channel picker. Choosing channels is human
|
|
39
|
-
* input, so it runs before any filesystem work; the channels box scaffolds the
|
|
40
|
-
* chosen channels afterward from `state.channelSelection`. During onboarding
|
|
41
|
-
* the deployment decision has not been made yet, so Slack is never gated here:
|
|
42
|
-
* picking it is what makes the later provisioning box resolve to Vercel. Only
|
|
43
|
-
* the legacy in-project variant gates Slack on the detected on-disk link.
|
|
44
|
-
*
|
|
45
|
-
* The onboarding picker is required and always carries a locked, pre-selected
|
|
46
|
-
* Terminal UI row, so an empty selection is impossible: every agent can at least be
|
|
47
|
-
* chatted with locally in the terminal. Web and Slack stack on top of it.
|
|
48
|
-
*/
|
|
49
|
-
export declare function selectChannels(options: SelectChannelsOptions): SetupBox<SetupState, ChannelKind[], ChannelKind[]>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{hasVercelProject}from"../state.js";import{SCAFFOLDABLE_CHANNELS}from"#setup/scaffold/index.js";const CHANNELS_PROMPT_MESSAGE=`Where will you chat with your agent?`;function selectChannels(n){let r=n.variant===`channels-add`,i=n.variant===`in-project`;function assertSlackHasVercel(e,t){if(e&&t.includes(`slack`))throw Error("Slack requires a Vercel project. Link this directory (`vercel link`) and re-run to add Slack.")}function slackLacksVercel(t){return i&&!hasVercelProject(t)}return{id:`select-channels`,async gather({state:e}){let i=slackLacksVercel(e);if(n.presetChannels!==void 0)return assertSlackHasVercel(i,n.presetChannels),await n.validateSelection?.(n.presetChannels),n.presetChannels;let a=SCAFFOLDABLE_CHANNELS.map(e=>{let t=n.disabledChannelReasons?.[e.kind];return t===void 0?i&&e.kind===`slack`?{id:e.kind,value:e.kind,label:e.label,disabled:!0,disabledReason:`needs a Vercel project`}:{id:e.kind,value:e.kind,label:e.label,hint:e.hint}:{id:e.kind,value:e.kind,label:e.label,hint:e.hint,disabled:!0,disabledReason:t}}),o={id:`tui`,value:`tui`,label:`Terminal UI`,locked:!0,lockedReason:`always available`},s=await n.asker.askMany({key:`channels`,message:CHANNELS_PROMPT_MESSAGE,options:r?a:[...a,o],required:!0,requireSelection:!r});assertSlackHasVercel(i,s);let c=s.filter(e=>e!==`tui`);return await n.validateSelection?.(c),c},async perform({input:e}){return e},apply(e,t){return{...e,channelSelection:t}}}}export{CHANNELS_PROMPT_MESSAGE,selectChannels};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { type Asker, type SelectOption } from "../ask.js";
|
|
2
|
-
import type { ChannelKind, ChatPreference, SetupState } from "../state.js";
|
|
3
|
-
import type { SetupBox } from "../step.js";
|
|
4
|
-
/** The scaffolded facts the chat option list is derived from. */
|
|
5
|
-
export interface ChatPreferenceContext {
|
|
6
|
-
/** Channels scaffolded earlier in the flow; controls option visibility. */
|
|
7
|
-
availableChannels: ChannelKind[];
|
|
8
|
-
/** Whether the Slack app was attached to the channel route and is ready to use. */
|
|
9
|
-
slackbotAttached: boolean;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Builds the chat-preference option list. Channel-backed options come
|
|
13
|
-
* first (in the order Web -> Slack) when available, then the framework
|
|
14
|
-
* built-ins (Terminal UI, API), then the explicit skip option last. Exported
|
|
15
|
-
* for the unit test.
|
|
16
|
-
*/
|
|
17
|
-
export declare function buildChatPreferenceOptions(args: ChatPreferenceContext): SelectOption<ChatPreference>[];
|
|
18
|
-
export interface SelectChatOptions {
|
|
19
|
-
/** Resolves the chat question; the composed stack decides how. */
|
|
20
|
-
asker: Asker;
|
|
21
|
-
/**
|
|
22
|
-
* Resolve to this value without asking. The headless default ("skip") lives
|
|
23
|
-
* at the composition site, not here, so a missing headless preset fails
|
|
24
|
-
* fast. Stays a factory option (not a `withAnswers` rung) because a preset
|
|
25
|
-
* must keep bypassing the option list, which hides choices the current
|
|
26
|
-
* state did not scaffold, exactly as the dual-face box did.
|
|
27
|
-
*/
|
|
28
|
-
presetPreference?: ChatPreference;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* THE CHAT BOX: final prompt of the create flow. Asks one required "chat"
|
|
32
|
-
* select through the box's asker: where the user wants to chat with their
|
|
33
|
-
* agent. Options are dynamic on what was scaffolded earlier. Web Chat appears
|
|
34
|
-
* only if `web` is in the scaffolded channels, Slack appears only if `slack`
|
|
35
|
-
* was scaffolded AND the bot was attached during the channel setup step.
|
|
36
|
-
* REPL, API, and Skip are always present.
|
|
37
|
-
*/
|
|
38
|
-
export declare function selectChat(options: SelectChatOptions): SetupBox<SetupState, ChatPreference, ChatPreference>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{select}from"../ask.js";function buildChatPreferenceOptions(e){let option=(e,t,n)=>({id:e,label:t,value:e,hint:n}),t=[];return e.availableChannels.includes(`web`)&&t.push(option(`web`,`Web chat`,`next.js`)),e.availableChannels.includes(`slack`)&&e.slackbotAttached&&t.push(option(`slack`,`Slack`,`open workspace`)),t.push(option(`repl`,`Terminal UI`)),t.push(option(`api`,`API`)),t.push(option(`skip`,`Skip and chat later`)),t}function pickInitialPreference(e){if(e.availableChannels.includes(`web`))return`web`;if(e.availableChannels.includes(`slack`)&&e.slackbotAttached)return`slack`}function selectChat(t){return{id:`select-chat`,async gather({state:n}){if(t.presetPreference!==void 0)return t.presetPreference;let r={availableChannels:[...n.channels],slackbotAttached:n.slackbotAttached};return t.asker.ask(select({key:`chat`,message:`Start a chat with your agent now`,options:buildChatPreferenceOptions(r),recommended:pickInitialPreference(r),required:!0}))},async perform({input:e}){return e},apply(e,t){return{...e,chat:t}}}}export{buildChatPreferenceOptions,selectChat};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { ConnectionSelectOption } from "#setup/cli/index.js";
|
|
2
|
-
import { type Asker } from "../ask.js";
|
|
3
|
-
import type { ConnectionPlan, SetupState } from "../state.js";
|
|
4
|
-
import type { SetupBox } from "../step.js";
|
|
5
|
-
export declare const CONNECT_REQUIRES_VERCEL = "Authenticates through Vercel Connect, which needs a Vercel project. Re-run and choose to deploy to Vercel.";
|
|
6
|
-
export interface SelectConnectionsOptions {
|
|
7
|
-
/** Resolves the picker and custom sub-questions; the composed stack decides how. */
|
|
8
|
-
asker: Asker;
|
|
9
|
-
/**
|
|
10
|
-
* Headless mode: skips the picker entirely unless `presetConnections` were
|
|
11
|
-
* requested. Fixed at composition time (the same place the asker base is
|
|
12
|
-
* chosen), since `gather` cannot read the mode off the asker.
|
|
13
|
-
*/
|
|
14
|
-
headless?: boolean;
|
|
15
|
-
/** Skip the picker and plan exactly these catalog slugs. */
|
|
16
|
-
presetConnections?: string[];
|
|
17
|
-
}
|
|
18
|
-
/** Exported for tests: the picker rows derived from the curated catalog. */
|
|
19
|
-
export declare function buildCatalogOptions(disabledReasons: Readonly<Record<string, string>>): ConnectionSelectOption[];
|
|
20
|
-
/**
|
|
21
|
-
* THE CONNECTION SELECTION BOX: part of the interview phase, before any
|
|
22
|
-
* filesystem write. Offers the connection catalog (plus a custom MCP / OpenAPI
|
|
23
|
-
* escape hatch through preset slugs) and resolves every prompt into
|
|
24
|
-
* fully-specified {@link ConnectionPlan}s recorded on the state; the
|
|
25
|
-
* add-connections box executes them after the scaffold and link. The full
|
|
26
|
-
* catalog is selectable: the deployment decision comes later in the interview,
|
|
27
|
-
* and the provisioning box resolves to Vercel when a Connect-backed selection
|
|
28
|
-
* needs a project.
|
|
29
|
-
*/
|
|
30
|
-
export declare function selectConnections(options: SelectConnectionsOptions): SetupBox<SetupState, ConnectionPlan[], ConnectionPlan[]>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{select,text}from"../ask.js";import{CONNECTION_CATALOG,CUSTOM_CONNECTION_SLUG,SUPPORTED_PROTOCOLS,catalogSlugs,effectiveProtocols,getCatalogEntry,isValidConnectionSlug}from"#setup/scaffold/index.js";import{connectorServiceForEntry}from"#setup/scaffold/connections/catalog.js";const CONNECT_REQUIRES_VERCEL=`Authenticates through Vercel Connect, which needs a Vercel project. Re-run and choose to deploy to Vercel.`,PROTOCOL_LABELS={mcp:`MCP`,openapi:`OpenAPI`};function buildCatalogOptions(e){return CONNECTION_CATALOG.map(t=>{let n=e[t.slug];return n===void 0?{value:t.slug,label:t.label,hint:t.hint}:{value:t.slug,label:t.label,hint:t.hint,disabled:!0,disabledReason:n}})}function unknownSlugError(e){return Error(`Unknown connection "${e}". Known: ${catalogSlugs().join(`, `)}, or pass a custom name with a definition.`)}function assertSupportedProtocols(e,t){if(e.length===0)throw Error(`No supported protocol for "${t}". Supported: ${SUPPORTED_PROTOCOLS.join(`, `)}.`)}async function resolveProtocolInteractive(t,n,r){let i=effectiveProtocols(n);return assertSupportedProtocols(i,r),i.length===1?i[0]:t.ask(select({key:`protocol:${r}`,message:`Protocol for ${r}`,options:i.map(e=>({id:e,value:e,label:PROTOCOL_LABELS[e]}))}))}function resolveProtocolHeadless(e,t){let n=effectiveProtocols(e);if(assertSupportedProtocols(n,t),n.length>1)throw Error(`Connection "${t}" supports multiple protocols (${n.join(`, `)}). Pass --protocol to choose one.`);return n[0]}function deriveProvision(e,t){if(e.auth?.kind!==`connect`)return{kind:`none`};let n=connectorServiceForEntry({mcp:e.mcp,auth:e.auth});return n===void 0?{kind:`connect-manual`}:t?{kind:`command-hint`,service:n}:{kind:`connect`,service:n}}async function promptCustomSlug(e){return e.ask(text({key:`connection-name`,message:`Connection name`,placeholder:`mycorp`,validate:e=>{let t=e.trim();return t.length===0?`A name is required.`:isValidConnectionSlug(t)?null:`Start with a lowercase letter; use only lowercase letters, digits, and hyphens (max 64 characters).`}}))}async function planCustomInteractive(e,n){let r=await resolveProtocolInteractive(e,void 0,n),i=await e.ask(text({key:`description:${n}`,message:`Description for ${n}`,placeholder:`What this connection exposes`}));if(r===`mcp`){let a={slug:n,description:i,protocols:[`mcp`],mcp:{url:(await e.ask(text({key:`mcp-url:${n}`,message:`MCP server URL for ${n}`,placeholder:`https://mcp.example.com/mcp`,validate:e=>e.trim().length===0?`A URL is required.`:null}))).trim()},auth:{kind:`connect`,connector:n}};return{slug:n,protocol:r,entry:a,provision:deriveProvision(a,!1)}}let a=await e.ask(text({key:`openapi-spec:${n}`,message:`OpenAPI spec URL for ${n}`,placeholder:`https://api.example.com/openapi.json`,validate:e=>e.trim().length===0?`A spec URL is required.`:null})),o=await e.ask(text({key:`openapi-base-url:${n}`,message:`Base URL for ${n} (optional)`,placeholder:`https://api.example.com`})),s={slug:n,description:i,protocols:[`openapi`],openapi:o.trim().length>0?{spec:a.trim(),baseUrl:o.trim()}:{spec:a.trim()},auth:{kind:`connect`,connector:n}};return{slug:n,protocol:r,entry:s,provision:deriveProvision(s,!1)}}async function planSelectionInteractive(e,t){if(t===CUSTOM_CONNECTION_SLUG)return planCustomInteractive(e,(await promptCustomSlug(e)).trim());let n=getCatalogEntry(t);if(n!==void 0)return{slug:t,protocol:await resolveProtocolInteractive(e,n.protocols,t),entry:n,provision:deriveProvision(n,!1)};if(!isValidConnectionSlug(t))throw unknownSlugError(t);return planCustomInteractive(e,t)}function planPresetHeadless(e){if(e===CUSTOM_CONNECTION_SLUG)throw Error(`Custom connection requires interactive input or a preset definition.`);let t=getCatalogEntry(e);if(t!==void 0)return{slug:e,protocol:resolveProtocolHeadless(t.protocols,e),entry:t,provision:deriveProvision(t,!0)};throw isValidConnectionSlug(e)?Error(`Custom connection "${e}" requires interactive input or a preset definition.`):unknownSlugError(e)}function selectConnections(e){return{id:`select-connections`,async gather(){let t=e.headless??!1,n=e.presetConnections??[];if(t)return n.map(e=>planPresetHeadless(e));let r;if(n.length>0)r=[...n];else{let t=buildCatalogOptions({}).map(e=>({id:String(e.value),value:String(e.value),label:e.label,hint:e.hint,disabled:e.disabled,disabledReason:e.disabledReason}));r=await e.asker.askMany({key:`connection`,message:`What should your agent connect to?`,options:t})}let i=[];for(let t of r)i.push(await planSelectionInteractive(e.asker,t));return i},async perform({input:e}){return e},apply(e,t){return{...e,connectionSelection:t}}}}export{CONNECT_REQUIRES_VERCEL,buildCatalogOptions,selectConnections};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { type Asker } from "../ask.js";
|
|
2
|
-
import type { SetupMode, SetupState } from "../state.js";
|
|
3
|
-
import type { SetupBox } from "../step.js";
|
|
4
|
-
export interface SelectSetupModeOptions {
|
|
5
|
-
/** Resolves the mode question; the composed stack decides how. */
|
|
6
|
-
asker: Asker;
|
|
7
|
-
/**
|
|
8
|
-
* Skip the mode question and use this value. Stays a factory option (not a
|
|
9
|
-
* `withAnswers` rung) so it short-circuits before any ask, which is what
|
|
10
|
-
* lets a headless `--one-shot` run resolve without a terminal.
|
|
11
|
-
*/
|
|
12
|
-
presetMode?: SetupMode;
|
|
13
|
-
/**
|
|
14
|
-
* Model baked into a one-shot scaffold instead of {@link DEFAULT_AGENT_MODEL_ID}.
|
|
15
|
-
* Threaded from the same `--model` preset the model box consumes, so the
|
|
16
|
-
* flag keeps working when the model box is skipped.
|
|
17
|
-
*/
|
|
18
|
-
presetModel?: string;
|
|
19
|
-
}
|
|
20
|
-
/** The mode plus the model a one-shot run pins, since the model box is skipped. */
|
|
21
|
-
export interface SelectSetupModePayload {
|
|
22
|
-
mode: SetupMode;
|
|
23
|
-
modelId?: string;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* THE SETUP-MODE BOX: decide whether the run is the complete onboarding flow
|
|
27
|
-
* or a one-shot scaffold. One-shot pins the default model here because every
|
|
28
|
-
* later interview box (including the model picker) is gated off. The question
|
|
29
|
-
* is skippable, so a headless stack without a preset resolves to "complete"
|
|
30
|
-
* and current headless behavior is unchanged.
|
|
31
|
-
*/
|
|
32
|
-
export declare function selectSetupMode(options: SelectSetupModeOptions): SetupBox<SetupState, SetupMode, SelectSetupModePayload>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{SkippedSignal,select}from"../ask.js";import{DEFAULT_AGENT_MODEL_ID}from"#shared/default-agent-model.js";function selectSetupMode(n){return{id:`select-setup-mode`,async gather(){if(n.presetMode!==void 0)return n.presetMode;try{return await n.asker.ask(select({key:`setup-mode`,message:`How much should we set up now?`,options:[{id:`complete`,label:`Complete setup`,value:`complete`,hint:`model, channels, connections, deploy`},{id:`one-shot`,label:`One-shot`,value:`one-shot`,hint:`just write the project files`}],recommended:`complete`}))}catch(t){if(t instanceof SkippedSignal)return`complete`;throw t}},async perform({input:e}){return e===`one-shot`?{mode:e,modelId:n.presetModel??DEFAULT_AGENT_MODEL_ID}:{mode:e}},apply(e,t){return{...e,setupMode:t.mode,modelId:t.modelId??e.modelId}}}}export{selectSetupMode};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { DeployProjectDeps } from "./boxes/deploy-project.js";
|
|
2
|
-
import type { ChannelSetupUi } from "./channel-setup-ui.js";
|
|
3
|
-
import { type SetupState } from "./state.js";
|
|
4
|
-
/** Offers and, when accepted, performs deployment after channel setup completes. */
|
|
5
|
-
export declare function deployChannelSetup(input: {
|
|
6
|
-
state: SetupState;
|
|
7
|
-
ui: ChannelSetupUi;
|
|
8
|
-
signal?: AbortSignal;
|
|
9
|
-
presetDeploy?: boolean;
|
|
10
|
-
deps?: DeployProjectDeps;
|
|
11
|
-
}): Promise<SetupState>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{snapshotSetupState}from"./state.js";import{deployProject}from"./boxes/deploy-project.js";import{runInteractive}from"./runner.js";async function deployChannelSetup(t){if(!(t.presetDeploy??await t.ui.confirm({key:`deploy-channels`,message:`Deploy this project to Vercel now?`,recommended:!0})))return t.ui.nextSteps(["Run `eve deploy` to deploy when ready."]),t.state;let n=await runInteractive([deployProject({prompter:t.ui.prompter,ensureLinkedProject:`interactive-vercel-link`,deps:t.deps})],t.state,{write:e=>t.ui.prompter.log.message(e)},{snapshot:snapshotSetupState,signal:t.signal});return n.kind===`done`?n.state:t.state}export{deployChannelSetup};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function describeChannelSetupEnvironment(e){if(e.vercel.kind===`available`)switch(e.vercel.project.kind){case`deployed`:return`Found an authenticated Vercel account and deployed project (${e.vercel.project.productionUrl}).`;case`linked`:return`Found an authenticated Vercel account and linked project.`;case`unresolved`:return`Found an authenticated Vercel account; this directory is not linked to a project.`}switch(e.vercel.reason){case`logged-out`:return`No authenticated Vercel account found; using portable channel setup.`;case`cli-missing`:return`Vercel CLI not found; using portable channel setup.`;case`unavailable`:return`Could not verify the Vercel account; using portable channel setup.`}}function channelSetupEnvironment(e,t){return e===`authenticated`?{vercel:{kind:`available`,project:t}}:{vercel:{kind:`unavailable`,reason:e}}}export{channelSetupEnvironment,describeChannelSetupEnvironment};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{SLACK_CHANNEL_SETUP}from"./channel-setup-slack.js";import{WEB_CHANNEL_SETUP}from"./channel-setup-web.js";import{createChannelSetupUi}from"./channel-setup-ui.js";const CHANNEL_SETUP_INTEGRATIONS=[WEB_CHANNEL_SETUP,SLACK_CHANNEL_SETUP];function channelSetupIntegration(e){let t=CHANNEL_SETUP_INTEGRATIONS.find(t=>t.kind===e);if(t===void 0)throw Error(`No channel setup integration for "${e}".`);return t}export{CHANNEL_SETUP_INTEGRATIONS,channelSetupIntegration,createChannelSetupUi};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{snapshotSetupState}from"./state.js";import{addChannels}from"./boxes/add-channels.js";import{runInteractive}from"./runner.js";async function runChannelSetup(t,n){let r=await runInteractive([addChannels({asker:t.ui.asker,prompter:t.ui.prompter,headless:t.headless,presetCreateSlackbot:t.presetCreateSlackbot,force:t.force,configureVercelServices:n.configureVercelServices,slackCredentials:n.slackCredentials,ensureLinkedProject:n.ensureLinkedProject,skipDependencyMutation:t.skipDependencyMutation,deps:t.deps})],t.state,{write:e=>t.ui.prompter.log.message(e)},{snapshot:snapshotSetupState,signal:t.signal});return r.kind===`done`?{kind:`done`,state:r.state}:{kind:`cancelled`}}export{runChannelSetup};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{WizardCancelledError}from"./step.js";import{runChannelSetup}from"./channel-setup-runner.js";async function choosePortableCredentials(t){if(t.environment.vercel.kind===`available`)return`vercel-connect`;if(t.presetPortableCredentials!==void 0)return t.presetPortableCredentials?`environment`:`vercel-connect`;try{return await t.ui.prompter.select({message:`How would you like to configure Slack?`,options:[{value:`vercel`,label:`Set up Vercel Connect`,hint:`Sign in and link this project`},{value:`portable`,label:`Use portable credentials`,hint:`Read Slack tokens from environment variables`}]})===`portable`?`environment`:`vercel-connect`}catch(t){if(t instanceof WizardCancelledError)return`cancelled`;throw t}}const SLACK_CHANNEL_SETUP={kind:`slack`,label:`Slack`,hint:`Slack app mentions and DMs`,async setup(e){let n=await choosePortableCredentials(e);if(n===`cancelled`)return{kind:`cancelled`};let r=await runChannelSetup(e,n===`environment`?{slackCredentials:`environment`}:{slackCredentials:`vercel-connect`,ensureLinkedProject:`interactive-vercel-link`});return r.kind===`done`&&n===`environment`&&r.state.channels.includes(`slack`)&&e.ui.nextSteps([`Set SLACK_BOT_TOKEN and SLACK_SIGNING_SECRET in .env.local (listed in .env.example).`,`Configure your Slack app to send events to /eve/v1/slack on your public agent URL.`]),r}};export{SLACK_CHANNEL_SETUP};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{SkippedSignal,confirm}from"./ask.js";function createChannelSetupUi(n){return{...n,async confirm(r){try{return await n.asker.ask(confirm(r))}catch(t){if(t instanceof SkippedSignal)return!1;throw t}},nextSteps(e){e.length!==0&&n.prompter.note(e.join(`
|
|
2
|
-
`),`Next steps`,{tone:`success`})}}}export{createChannelSetupUi};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{runChannelSetup}from"./channel-setup-runner.js";const WEB_CHANNEL_SETUP={kind:`web`,label:`Web Chat`,hint:`Browser-based chat interface`,setup(e){return runChannelSetup(e,{configureVercelServices:e.environment.vercel.kind===`available`})}};export{WEB_CHANNEL_SETUP};
|