eve 0.11.1 → 0.11.3
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 +17 -2
- package/README.md +11 -11
- package/bin/eve.d.ts +1 -1
- package/bin/eve.js +6 -6
- package/dist/src/channel/routes.d.ts +4 -4
- package/dist/src/channel/types.d.ts +2 -2
- package/dist/src/channel/websocket-upgrade-server.d.ts +3 -3
- package/dist/src/chunks/{use-eve-agent-CdETo3qQ.js → use-eve-agent-D9ZhQhyV.js} +2 -2
- package/dist/src/chunks/{use-eve-agent-ClyM-_UT.js → use-eve-agent-DFI0POM9.js} +2 -2
- package/dist/src/cli/banner.d.ts +1 -1
- package/dist/src/cli/banner.js +1 -1
- package/dist/src/cli/commands/channel-add-conflicts.js +1 -1
- package/dist/src/cli/commands/channels.js +1 -1
- package/dist/src/cli/commands/deploy.js +1 -1
- package/dist/src/cli/commands/info.js +1 -1
- package/dist/src/cli/commands/init-agent-instructions.md +1 -1
- package/dist/src/cli/commands/init-git.js +1 -1
- package/dist/src/cli/commands/init.d.ts +1 -1
- package/dist/src/cli/commands/link.js +1 -1
- package/dist/src/cli/commands/preconditions.d.ts +2 -2
- package/dist/src/cli/commands/preconditions.js +1 -1
- package/dist/src/cli/dev/environment.d.ts +1 -1
- package/dist/src/cli/dev/tui/runner.js +1 -1
- package/dist/src/cli/dev/tui/setup-issues.d.ts +2 -0
- package/dist/src/cli/dev/tui/setup-issues.js +1 -1
- package/dist/src/cli/dev/tui/terminal-renderer.js +2 -2
- package/dist/src/cli/dev/tui/theme.d.ts +1 -1
- package/dist/src/cli/dev/tui/tui.d.ts +1 -1
- package/dist/src/cli/dev/url.d.ts +1 -1
- package/dist/src/cli/run.d.ts +1 -1
- package/dist/src/cli/run.js +2 -2
- package/dist/src/cli/ui/output.d.ts +1 -1
- package/dist/src/client/client-error.d.ts +1 -1
- package/dist/src/client/client.d.ts +3 -3
- package/dist/src/client/eve-agent-store.d.ts +1 -1
- package/dist/src/client/eve-agent-store.js +1 -1
- package/dist/src/client/message-reducer-types.d.ts +3 -3
- package/dist/src/client/message-reducer.d.ts +3 -3
- package/dist/src/client/output-schema.d.ts +1 -1
- package/dist/src/client/reducer.d.ts +5 -5
- package/dist/src/client/session.d.ts +1 -1
- package/dist/src/client/types.d.ts +1 -1
- package/dist/src/client/url.d.ts +2 -2
- package/dist/src/compiled/.vendor-stamp.json +1 -1
- package/dist/src/compiled/@vercel/detect-agent/index.d.ts +1 -1
- package/dist/src/compiler/channel-instrumentation-types.js +1 -1
- package/dist/src/compiler/model-catalog.d.ts +1 -1
- package/dist/src/compiler/module-map.js +1 -1
- package/dist/src/compiler/normalize-agent-config.js +1 -1
- package/dist/src/compiler/normalize-channel.js +1 -1
- package/dist/src/compiler/normalize-connection.js +1 -1
- package/dist/src/compiler/normalize-instructions.js +1 -1
- package/dist/src/compiler/normalize-sandbox.js +1 -1
- package/dist/src/compiler/normalize-schedule.js +1 -1
- package/dist/src/compiler/normalize-skill.js +1 -1
- package/dist/src/compiler/normalize-subagent.js +1 -1
- package/dist/src/compiler/normalize-tool.js +1 -1
- package/dist/src/compiler/workspace-resources.js +1 -1
- package/dist/src/context/build-callback-context.js +1 -1
- package/dist/src/context/container.d.ts +4 -4
- package/dist/src/context/container.js +1 -1
- package/dist/src/discover/diagnostics.d.ts +1 -1
- package/dist/src/discover/project.d.ts +2 -2
- package/dist/src/discover/project.js +1 -1
- package/dist/src/evals/cli/eval-client.d.ts +1 -1
- package/dist/src/evals/define-eval.d.ts +1 -1
- package/dist/src/evals/runner/execute-eval.d.ts +1 -1
- package/dist/src/evals/runner/execute-task.d.ts +1 -1
- package/dist/src/evals/types.d.ts +6 -6
- package/dist/src/execution/durable-session-migrations/chain.js +1 -1
- package/dist/src/execution/sandbox/bash-tool.js +1 -1
- package/dist/src/execution/sandbox/bindings/docker-options.d.ts +1 -1
- package/dist/src/execution/sandbox/bindings/just-bash-runtime.js +1 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-runtime.js +1 -1
- package/dist/src/execution/sandbox/bindings/vercel.js +1 -1
- package/dist/src/execution/sandbox/development-prewarm.js +1 -1
- package/dist/src/execution/sandbox/ensure.js +1 -1
- package/dist/src/execution/sandbox/prewarm.js +1 -1
- package/dist/src/execution/session-callback-step.d.ts +1 -1
- package/dist/src/harness/attachment-staging.js +1 -1
- package/dist/src/harness/code-mode-lifecycle.d.ts +1 -1
- package/dist/src/harness/code-mode.js +1 -1
- package/dist/src/harness/emission.d.ts +1 -1
- package/dist/src/harness/runtime-actions.d.ts +1 -1
- package/dist/src/harness/tool-loop.js +1 -1
- package/dist/src/harness/tools.d.ts +12 -0
- package/dist/src/harness/tools.js +1 -1
- package/dist/src/internal/application/cache-metadata.d.ts +2 -2
- package/dist/src/internal/application/compiled-artifacts.js +2 -2
- package/dist/src/internal/application/package.d.ts +7 -7
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/internal/authored-module-bundle.js +1 -1
- package/dist/src/internal/helpers/markdown.js +1 -1
- package/dist/src/internal/instrumentation.d.ts +1 -1
- package/dist/src/internal/nitro/host/build-application.d.ts +1 -1
- package/dist/src/internal/nitro/host/channel-routes.d.ts +3 -3
- package/dist/src/internal/nitro/host/configure-nitro-routes.d.ts +1 -1
- package/dist/src/internal/nitro/host/configure-nitro-routes.js +1 -1
- package/dist/src/internal/nitro/host/create-application-nitro.d.ts +1 -1
- package/dist/src/internal/nitro/host/cron-handler-route.d.ts +3 -3
- package/dist/src/internal/nitro/host/nitro-bundler-config.d.ts +1 -1
- package/dist/src/internal/nitro/host/optional-engine-dependency-plugin.d.ts +2 -2
- package/dist/src/internal/nitro/host/schedule-task-routes.d.ts +2 -2
- package/dist/src/internal/nitro/host/start-development-server.d.ts +1 -1
- package/dist/src/internal/nitro/host/start-development-server.js +1 -1
- package/dist/src/internal/nitro/host/start-production-server.d.ts +1 -1
- package/dist/src/internal/nitro/host/start-production-server.js +2 -2
- package/dist/src/internal/nitro/routes/agent-info/load-agent-info-data.js +1 -1
- package/dist/src/internal/nitro/routes/health.d.ts +1 -1
- package/dist/src/internal/nitro/routes/info.d.ts +1 -1
- package/dist/src/internal/nitro/routes/runtime-artifacts.js +1 -1
- package/dist/src/internal/nitro/routes/schedule-task.d.ts +1 -1
- package/dist/src/internal/package-name.d.ts +1 -1
- package/dist/src/internal/vercel-agent-summary.d.ts +6 -6
- package/dist/src/internal/workflow/builtins.d.ts +3 -3
- package/dist/src/internal/workflow-bundle/nitro-step-entry.js +1 -1
- package/dist/src/internal/workflow-bundle/vercel-workflow-output.d.ts +7 -7
- package/dist/src/internal/workflow-bundle/workflow-core-shim.d.ts +4 -4
- package/dist/src/internal/workflow-bundle/workflow-core-shim.js +1 -1
- package/dist/src/packages/eve-catalog/src/index.js +1 -1
- package/dist/src/protocol/message.d.ts +2 -2
- package/dist/src/protocol/routes.d.ts +3 -3
- package/dist/src/public/agents/auth.d.ts +1 -1
- package/dist/src/public/channels/auth.d.ts +1 -1
- package/dist/src/public/channels/discord/api.d.ts +2 -2
- package/dist/src/public/channels/discord/discordChannel.d.ts +2 -2
- package/dist/src/public/channels/discord/hitl.d.ts +4 -4
- package/dist/src/public/channels/discord/verify.d.ts +1 -1
- package/dist/src/public/channels/eve.d.ts +5 -5
- package/dist/src/public/channels/github/api.d.ts +1 -1
- package/dist/src/public/channels/github/defaults.d.ts +1 -1
- package/dist/src/public/channels/github/inbound.d.ts +1 -1
- package/dist/src/public/channels/index.d.ts +2 -2
- package/dist/src/public/channels/linear/auth.d.ts +1 -1
- package/dist/src/public/channels/linear/hitl.d.ts +4 -4
- package/dist/src/public/channels/linear/inbound.d.ts +1 -1
- package/dist/src/public/channels/linear/verify.d.ts +1 -1
- package/dist/src/public/channels/slack/constants.d.ts +1 -1
- package/dist/src/public/channels/teams/api.d.ts +4 -4
- package/dist/src/public/channels/teams/hitl.d.ts +4 -4
- package/dist/src/public/channels/teams/limits.d.ts +3 -3
- package/dist/src/public/channels/teams/verify.d.ts +2 -2
- package/dist/src/public/channels/telegram/api.d.ts +1 -1
- package/dist/src/public/channels/telegram/hitl.d.ts +3 -3
- package/dist/src/public/channels/telegram/verify.d.ts +1 -1
- package/dist/src/public/channels/twilio/api.d.ts +1 -1
- package/dist/src/public/context/index.d.ts +1 -1
- package/dist/src/public/definitions/defineChannel.d.ts +2 -2
- package/dist/src/public/definitions/hook.d.ts +1 -1
- package/dist/src/public/definitions/remote-agent.d.ts +5 -5
- package/dist/src/public/definitions/sandbox.d.ts +1 -1
- package/dist/src/public/definitions/source.d.ts +2 -2
- package/dist/src/public/definitions/state.d.ts +2 -2
- package/dist/src/public/definitions/state.js +1 -1
- package/dist/src/public/instrumentation/index.d.ts +3 -3
- package/dist/src/public/next/index.d.ts +12 -12
- package/dist/src/public/next/index.js +1 -1
- package/dist/src/public/next/server.js +1 -1
- package/dist/src/public/next/vercel-output-config.js +1 -1
- package/dist/src/public/nuxt/dev-server.d.ts +2 -2
- package/dist/src/public/nuxt/dev-server.js +1 -1
- package/dist/src/public/nuxt/module.d.ts +10 -10
- package/dist/src/public/nuxt/routing.d.ts +6 -6
- package/dist/src/public/nuxt/routing.js +1 -1
- package/dist/src/public/nuxt/vercel-json.d.ts +2 -2
- package/dist/src/public/sandbox/backends/just-bash.d.ts +1 -1
- package/dist/src/public/sandbox/backends/microsandbox.d.ts +1 -1
- package/dist/src/public/sandbox/backends/vercel.d.ts +1 -1
- package/dist/src/public/sandbox/docker-sandbox.d.ts +1 -1
- package/dist/src/public/sandbox/just-bash-sandbox.d.ts +1 -1
- package/dist/src/public/sandbox/microsandbox-sandbox.d.ts +3 -3
- package/dist/src/public/sandbox/vercel-sandbox.d.ts +2 -2
- package/dist/src/public/sveltekit/dev-server.d.ts +2 -2
- package/dist/src/public/sveltekit/dev-server.js +1 -1
- package/dist/src/public/sveltekit/index.d.ts +11 -11
- package/dist/src/public/sveltekit/routing.d.ts +5 -5
- package/dist/src/public/sveltekit/routing.js +1 -1
- package/dist/src/public/sveltekit/vercel-json.d.ts +2 -2
- package/dist/src/public/tool-result-narrowing.js +1 -1
- package/dist/src/public/types/json.d.ts +1 -1
- package/dist/src/react/use-eve-agent.d.ts +8 -8
- package/dist/src/runtime/agent/bootstrap-model.js +1 -1
- package/dist/src/runtime/agent/bootstrap.d.ts +1 -1
- package/dist/src/runtime/agent/bootstrap.js +1 -1
- package/dist/src/runtime/agent/mock-model-adapter.js +1 -1
- package/dist/src/runtime/agent/resolve-model.js +1 -1
- package/dist/src/runtime/attributes/emit.d.ts +2 -2
- package/dist/src/runtime/connections/callback-route.d.ts +1 -1
- package/dist/src/runtime/connections/principal.js +1 -1
- package/dist/src/runtime/connections/scoped-authorization.d.ts +1 -1
- package/dist/src/runtime/connections/types.d.ts +4 -4
- package/dist/src/runtime/framework-tools/final-output.d.ts +1 -1
- package/dist/src/runtime/governance/auth/http-basic.d.ts +1 -1
- package/dist/src/runtime/governance/auth/token-claims.d.ts +1 -1
- package/dist/src/runtime/governance/auth/types.d.ts +1 -1
- package/dist/src/runtime/loaders/artifact-paths.d.ts +1 -1
- package/dist/src/runtime/loaders/compile-metadata.js +1 -1
- package/dist/src/runtime/loaders/manifest.js +1 -1
- package/dist/src/runtime/loaders/module-map.js +1 -1
- package/dist/src/runtime/prompt/compose.js +1 -1
- package/dist/src/runtime/resolve-channel.js +1 -1
- package/dist/src/runtime/schedules/register.js +1 -1
- package/dist/src/runtime/sessions/auth.d.ts +1 -1
- package/dist/src/runtime/sessions/runtime-session.d.ts +1 -1
- package/dist/src/runtime/types.d.ts +1 -1
- package/dist/src/runtime/workspace/types.d.ts +1 -1
- package/dist/src/services/dev-client/request-headers.d.ts +2 -2
- package/dist/src/services/dev-client/vercel-auth-error.d.ts +1 -1
- package/dist/src/services/inspect-application.d.ts +1 -1
- package/dist/src/setup/boxes/add-channels.d.ts +1 -1
- package/dist/src/setup/boxes/add-channels.js +1 -1
- package/dist/src/setup/boxes/deploy-project.js +1 -1
- package/dist/src/setup/boxes/resolve-target.d.ts +2 -2
- package/dist/src/setup/boxes/scaffold.d.ts +4 -4
- package/dist/src/setup/boxes/scaffold.js +1 -1
- package/dist/src/setup/channel-add-conflicts.js +1 -1
- package/dist/src/setup/cli/rail-log.d.ts +1 -1
- package/dist/src/setup/flows/model.d.ts +3 -5
- package/dist/src/setup/flows/model.js +1 -1
- package/dist/src/setup/node-engine.d.ts +5 -5
- package/dist/src/setup/node-engine.js +1 -1
- package/dist/src/setup/onboarding.d.ts +2 -2
- package/dist/src/setup/primitives/open-url.d.ts +1 -1
- package/dist/src/setup/primitives/pm/pnpm.js +1 -1
- package/dist/src/setup/primitives/pm/run.d.ts +1 -1
- package/dist/src/setup/primitives/pm/types.d.ts +1 -1
- package/dist/src/setup/scaffold/connections/catalog.d.ts +1 -1
- package/dist/src/setup/scaffold/create/add-to-project.d.ts +2 -2
- package/dist/src/setup/scaffold/create/add-to-project.js +1 -1
- package/dist/src/setup/scaffold/create/project.d.ts +5 -5
- package/dist/src/setup/scaffold/create/project.js +3 -3
- package/dist/src/setup/scaffold/create/web-template.d.ts +2 -2
- package/dist/src/setup/scaffold/create/web-template.js +2 -2
- package/dist/src/setup/scaffold/update/package-json.d.ts +1 -1
- package/dist/src/setup/slack-connect-lifecycle.d.ts +2 -2
- package/dist/src/setup/slack-connect-lifecycle.js +1 -1
- package/dist/src/setup/slackbot.d.ts +1 -1
- package/dist/src/setup/slackbot.js +1 -1
- package/dist/src/setup/validate-gateway-key.d.ts +1 -1
- package/dist/src/setup/vercel-project.js +1 -1
- package/dist/src/shared/agent-definition.d.ts +15 -15
- package/dist/src/shared/code-mode.d.ts +3 -3
- package/dist/src/shared/json-schema.d.ts +1 -1
- package/dist/src/shared/model-endpoint-status.d.ts +2 -2
- package/dist/src/shared/sandbox-backend.d.ts +4 -4
- package/dist/src/shared/sandbox-definition.d.ts +3 -3
- package/dist/src/shared/sandbox-network-policy.d.ts +1 -1
- package/dist/src/shared/sandbox-session.d.ts +2 -2
- package/dist/src/shared/skill-package.d.ts +1 -1
- package/dist/src/shared/skill-package.js +1 -1
- package/dist/src/shared/tool-definition.d.ts +1 -1
- package/dist/src/svelte/index.js +1 -1
- package/dist/src/svelte/use-eve-agent.d.ts +7 -7
- 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 +7 -7
- package/dist/src/vue/use-eve-agent.js +1 -1
- package/docs/README.md +11 -11
- package/docs/agent-config.md +2 -2
- package/docs/channels/custom.mdx +5 -5
- package/docs/channels/discord.mdx +3 -3
- package/docs/channels/eve.mdx +7 -7
- package/docs/channels/linear.mdx +6 -6
- package/docs/channels/overview.mdx +11 -11
- package/docs/channels/slack.mdx +4 -4
- package/docs/channels/teams.mdx +2 -2
- package/docs/channels/telegram.mdx +3 -3
- package/docs/channels/twilio.mdx +1 -1
- package/docs/concepts/context-control.md +5 -5
- package/docs/concepts/default-harness.md +16 -16
- package/docs/concepts/execution-model-and-durability.md +9 -9
- package/docs/concepts/security-model.md +9 -9
- package/docs/concepts/sessions-runs-and-streaming.md +30 -30
- package/docs/connections.mdx +11 -11
- package/docs/evals/judge.mdx +2 -2
- package/docs/evals/overview.mdx +2 -2
- package/docs/evals/reporters.mdx +2 -2
- package/docs/getting-started.mdx +12 -10
- package/docs/guides/auth-and-route-protection.md +6 -6
- package/docs/guides/client/continuations.mdx +3 -3
- package/docs/guides/client/output-schema.mdx +1 -1
- package/docs/guides/client/overview.mdx +5 -5
- package/docs/guides/client/streaming.mdx +1 -1
- package/docs/guides/deployment.md +7 -7
- package/docs/guides/dev-tui.md +2 -2
- package/docs/guides/frontend/nextjs.mdx +13 -13
- package/docs/guides/frontend/nuxt.mdx +7 -7
- package/docs/guides/frontend/overview.mdx +13 -13
- package/docs/guides/frontend/sveltekit.mdx +7 -7
- package/docs/guides/frontend/use-eve-agent-svelte.mdx +6 -6
- package/docs/guides/frontend/use-eve-agent-vue.mdx +6 -6
- package/docs/guides/hooks.md +2 -2
- package/docs/guides/instrumentation.md +12 -12
- package/docs/guides/remote-agents.md +4 -4
- package/docs/guides/session-context.md +4 -4
- package/docs/guides/state.md +1 -1
- package/docs/instructions.mdx +4 -4
- package/docs/introduction.mdx +14 -12
- package/docs/reference/cli.md +5 -5
- package/docs/reference/project-layout.md +4 -4
- package/docs/responsible-use.md +3 -3
- package/docs/sandbox.mdx +8 -8
- package/docs/schedules.mdx +1 -1
- package/docs/skills.mdx +4 -4
- package/docs/subagents.mdx +3 -3
- package/docs/tools/human-in-the-loop.md +83 -0
- package/docs/tools/meta.json +4 -0
- package/docs/{tools.mdx → tools/overview.mdx} +14 -37
- package/docs/tutorial/connect-a-warehouse.mdx +3 -3
- package/docs/tutorial/first-agent.mdx +2 -2
- package/docs/tutorial/how-it-runs.mdx +2 -2
- package/docs/tutorial/query-sample-data.mdx +1 -1
- package/docs/tutorial/ship-it.mdx +4 -4
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
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{boolean,object,record,string,unknown}from"../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/schemas.js";import"../node_modules/.pnpm/zod@4.4.3/node_modules/zod/index.js";import{captureVercel,runVercel}from"#setup/primitives/index.js";import{HumanActionRequiredError}from"#setup/human-action.js";import{whimsyFor}from"#setup/cli/index.js";var import_picocolors=__toESM(require_picocolors(),1);const JsonObjectSchema=record(string(),unknown()),VercelTeamListEntrySchema=object({name:string(),slug:string(),current:boolean()}),VercelProjectListEntrySchema=object({name:string(),id:string()}),VercelProjectReferenceSchema=object({id:string(),name:string()}),VercelApiErrorSchema=object({error:object({code:string().optional(),message:string().optional()}).optional()});function unresolvedProject(){return{kind:`unresolved`}}async function withNetworkSpinner(e,t,n){let r=e.log.spinner?.(t);try{return await n()}finally{r?.stop()}}function projectIdFromResolution(e){return e.kind===`unresolved`?void 0:e.projectId}function parseJson(e,t){try{return JSON.parse(e)}catch{throw Error(`Could not parse ${t} JSON from Vercel CLI output.`)}}function parseVercelJsonList(e,t,n){let r=parseJson(e,t),i=JsonObjectSchema.safeParse(r);if(!i.success)throw Error(`Could not read ${t} from Vercel CLI JSON output.`);let a=i.data[t];if(!Array.isArray(a))throw Error(`Vercel CLI JSON output did not include ${t}.`);let o=[];for(let e of a){let t=n.safeParse(e);t.success&&o.push(t.data)}return o}function parseTeamList(e){return e===void 0?[]:parseVercelJsonList(e,`teams`,VercelTeamListEntrySchema)}async function listTeams(e,t={}){let n=await captureVercel([`teams`,`ls`,`--format`,`json`],{cwd:e,signal:t.signal});if(!n.ok)throw isForbiddenApiFailure(n.failure)&&requireVercelTeamAccess(n.failure),Error(`Could not list Vercel teams. ${n.failure.message}`);return parseTeamList(n.stdout)}function parseProjectList(e){return e===void 0?[]:parseVercelJsonList(e,`projects`,VercelProjectListEntrySchema)}async function listProjects(e,t,n={}){let r=await captureVercel([`project`,`ls`,`--format`,`json`,`--scope`,t],{cwd:e,signal:n.signal});if(!r.ok)throw isForbiddenApiFailure(r.failure)&&requireVercelTeamAccess(r.failure),Error(`Could not list Vercel projects in ${t}. ${r.failure.message}`);return parseProjectList(r.stdout)}function isNotFoundApiFailure(e){if(e.code===404)return!0;let t=VercelApiErrorSchema.safeParse(safeParseJson(e.stdout)),n=t.success?t.data.error:void 0,r=`${n?.code??``} ${n?.message??``} ${e.stderr}`.toLowerCase();return r.includes(`not_found`)||r.includes(`not found`)||r.includes(`404`)}function isConflictApiFailure(e){let t=VercelApiErrorSchema.safeParse(safeParseJson(e.stdout)),n=t.success?t.data.error:void 0,r=`${n?.code??``} ${n?.message??``} ${e.stdout} ${e.stderr}`.toLowerCase();return r.includes(`409`)||r.includes(`conflict`)||r.includes(`already exists`)}function isForbiddenApiFailure(e){let t=VercelApiErrorSchema.safeParse(safeParseJson(e.stdout)),n=t.success?t.data.error:void 0,r=`${n?.code??``} ${n?.message??``} ${e.stdout} ${e.stderr}`.toLowerCase();return r.includes(`403`)||r.includes(`forbidden`)||r.includes(`not_authorized`)||r.includes(`not authorized`)||r.includes(`sso`)||r.includes(`saml`)}function safeParseJson(e){try{return JSON.parse(e)}catch{return}}function parseProjectReference(e,t){let n=VercelProjectReferenceSchema.safeParse(parseJson(e,t));if(!n.success)throw Error(`Could not read Vercel project identity from ${t}.`);return n.data}async function resolveProjectByNameOrId(e,t,n,r={}){let i=await captureVercel([`api`,`/v9/projects/${encodeURIComponent(n)}`,`--scope`,t,`--raw`],{cwd:e,signal:r.signal});if(i.ok)return parseProjectReference(i.stdout,`project ${n}`);if(isNotFoundApiFailure(i.failure))return null;throw isForbiddenApiFailure(i.failure)&&requireVercelTeamAccess(i.failure),Error(`Could not resolve project "${n}" in ${t}. ${i.failure.message}`)}async function createProject(e,t,n,r,i){let a=await captureVercel([`api`,`/v10/projects`,`--scope`,t,`--method`,`POST`,`--raw-field`,`name=${n}`,`--raw`],{cwd:e,onOutput:r,signal:i.signal});if(a.ok)return parseProjectReference(a.stdout,`created project ${n}`);throw isConflictApiFailure(a.failure)?Error(projectNameCollisionMessage(n,t)):(isForbiddenApiFailure(a.failure)&&requireVercelTeamAccess(a.failure),Error(`Could not create Vercel project "${n}" in ${t}. ${a.failure.message}`))}function projectNameCollisionMessage(e,t){return`Vercel project "${e}" already exists in ${t}. Pass --project ${e} to link it, or choose a different project name.`}async function assertNewProjectNameAvailable(e,t,n,r={}){if(await resolveProjectByNameOrId(e,t,n,r)!==null)throw Error(projectNameCollisionMessage(n,t))}function requireVercelLogin(e){let t=`Provisioning a Vercel project requires you to be logged in to Vercel.`,n=e?.stderr.trim();throw new HumanActionRequiredError({kind:`vercel-login`,command:`vercel login`,reason:e?`${t} The Vercel CLI check did not succeed: ${e.message}${n?` ${n}`:``}`:t})}function probeWhoami(e,t){return captureVercel([`whoami`],{cwd:e,signal:t.signal,timeoutMs:1e4})}function isLoggedOutFailure(e){let t=`${e.stdout} ${e.stderr}`.toLowerCase();return t.includes(`credentials`)||t.includes(`not authenticated`)||t.includes(`not logged in`)}function requireVercelAuth(e){if(e.errno===`ENOENT`)throw new HumanActionRequiredError({kind:`vercel-cli-missing`,command:`npm i -g vercel@latest`,reason:e.message});isLoggedOutFailure(e)&&requireVercelLogin(e);let t=e.stderr.trim();throw Error(`Couldn't verify your Vercel login: ${e.message}${t?` ${t}`:``}`)}async function getVercelAuthStatus(e,t={}){let n=await probeWhoami(e,t);return t.signal?.throwIfAborted(),n.ok?`authenticated`:n.failure.errno===`ENOENT`?`cli-missing`:isLoggedOutFailure(n.failure)?`logged-out`:`unavailable`}function requireVercelTeamAccess(e){let t=e.stderr.trim();throw new HumanActionRequiredError({kind:`vercel-forbidden`,command:`vercel login`,reason:`Vercel denied access to this scope.${t?` ${t}`:``} Re-authenticate (for example to complete a team's SSO) or switch to a team you can access.`})}async function requireAuth(e,t,n={}){let check=async()=>{let t=await probeWhoami(e,n);n.signal?.throwIfAborted(),t.ok||requireVercelAuth(t.failure)};if(t===void 0){await check();return}await withNetworkSpinner(t,whimsyFor(`auth`),check)}async function isVercelAuthenticated(e,t={}){return await getVercelAuthStatus(e,t)===`authenticated`}async function whoamiScope(e,t){let n=await probeWhoami(e,t);return t.signal?.throwIfAborted(),n.ok||requireVercelAuth(n.failure),n.stdout.trim()}async function resolveTeam(e,t,n={}){return t===void 0?(await listTeams(e,n)).find(e=>e.current)?.slug??await whoamiScope(e,n):t}async function validateTeam(e,t,n,r={}){if(n===void 0)return;let i=await listTeams(t,r);if(i.length>0&&!i.some(e=>e.slug===n))throw Error(`Team "${n}" was not found in \`vercel teams ls\`. Pass a valid team slug or omit --team.`)}async function pickTeam(e,t,n,r={}){if(n!==void 0)return await validateTeam(e,t,n,r),resolveTeam(t,n,r);let i=await withNetworkSpinner(e,whimsyFor(`teams`),()=>listTeams(t,r));return i.length<=1?i.find(e=>e.current)?.slug??await whoamiScope(t,r):e.select({message:`Select your team`,search:!0,placeholder:`type to search teams`,options:i.map(e=>({value:e.slug,label:e.current?`${e.name} (current)`:e.name})),initialValue:i.find(e=>e.current)?.slug})}async function pickProject(e,t,n,r={}){let i=await withNetworkSpinner(e,whimsyFor(`projects`,n),()=>listProjects(t,n,r));if(i.length===0){if(r.allowCreateWhenEmpty===!1)throw Error(`No existing Vercel projects found in ${n}. Create one in Vercel, then try again.`);return{project:await e.text({message:`No projects found in ${n}. Enter a project name to create`,validate:e=>e.trim().length===0?`Project name cannot be empty.`:void 0}),exists:!1}}return{project:await e.select({message:`Project to link`,search:!0,placeholder:`type to filter projects`,options:i.map(e=>({value:e.name,label:e.name}))}),exists:!0}}async function pickNewProjectName(e,t,n,r,i={}){let a=await withNetworkSpinner(e,whimsyFor(`project-name`,n),()=>resolveProjectByNameOrId(t,n,r.trim(),i)),o=r.trim();for(;a!==null;)o=(await e.text({message:`New project name`,defaultValue:`${o}-2`,notices:[{tone:`warning`,text:`${import_picocolors.default.yellow(`Project named`)} '${import_picocolors.default.blue(o)}' ${import_picocolors.default.yellow(`already exists in`)} '${import_picocolors.default.blue(n)}'`}],validate:e=>{if(e.trim().length===0)return`Project name cannot be empty.`}})).trim(),a=await resolveProjectByNameOrId(t,n,o,i);return o}async function linkProject(e,t,n,r,i={}){let a=[`--scope`,n.team],o;if(n.kind===`new`)o=await withNetworkSpinner(e,`Creating Vercel project "${n.project}" in ${n.team}...`,async()=>(await assertNewProjectNameAvailable(t,n.team,n.project,i),createProject(t,n.team,n.project,r,i)));else{let e=await resolveProjectByNameOrId(t,n.team,n.project,i);if(e===null)throw Error(`Vercel project "${n.project}" was not found in ${n.team}.`);o=e}return withNetworkSpinner(e,`Linking this directory to Vercel project "${o.name}"...`,()=>runVercel([`link`,`--project`,o.id,...a,`--yes`],{cwd:t,onOutput:r,signal:i.signal}))}export{assertNewProjectNameAvailable,getVercelAuthStatus,isVercelAuthenticated,linkProject,listProjects,listTeams,pickNewProjectName,pickProject,pickTeam,projectIdFromResolution,requireAuth,requireVercelAuth,requireVercelLogin,requireVercelTeamAccess,resolveProjectByNameOrId,resolveTeam,unresolvedProject,validateTeam,withNetworkSpinner};
|
|
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{boolean,object,record,string,unknown}from"../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/schemas.js";import"../node_modules/.pnpm/zod@4.4.3/node_modules/zod/index.js";import{captureVercel,runVercel}from"#setup/primitives/index.js";import{HumanActionRequiredError}from"#setup/human-action.js";import{whimsyFor}from"#setup/cli/index.js";var import_picocolors=__toESM(require_picocolors(),1);const JsonObjectSchema=record(string(),unknown()),VercelTeamListEntrySchema=object({name:string(),slug:string(),current:boolean()}),VercelProjectListEntrySchema=object({name:string(),id:string()}),VercelProjectReferenceSchema=object({id:string(),name:string()}),VercelApiErrorSchema=object({error:object({code:string().optional(),message:string().optional()}).optional()});function unresolvedProject(){return{kind:`unresolved`}}async function withNetworkSpinner(e,t,n){let r=e.log.spinner?.(t);try{return await n()}finally{r?.stop()}}function projectIdFromResolution(e){return e.kind===`unresolved`?void 0:e.projectId}function parseJson(e,t){try{return JSON.parse(e)}catch{throw Error(`Could not parse ${t} JSON from Vercel CLI output.`)}}function parseVercelJsonList(e,t,n){let r=parseJson(e,t),i=JsonObjectSchema.safeParse(r);if(!i.success)throw Error(`Could not read ${t} from Vercel CLI JSON output.`);let a=i.data[t];if(!Array.isArray(a))throw Error(`Vercel CLI JSON output did not include ${t}.`);let o=[];for(let e of a){let t=n.safeParse(e);t.success&&o.push(t.data)}return o}function parseTeamList(e){return e===void 0?[]:parseVercelJsonList(e,`teams`,VercelTeamListEntrySchema)}async function listTeams(e,t={}){let n=await captureVercel([`teams`,`ls`,`--format`,`json`],{cwd:e,signal:t.signal});if(!n.ok)throw isForbiddenApiFailure(n.failure)&&requireVercelTeamAccess(n.failure),Error(`Could not list Vercel teams. ${n.failure.message}`);return parseTeamList(n.stdout)}function parseProjectList(e){return e===void 0?[]:parseVercelJsonList(e,`projects`,VercelProjectListEntrySchema)}async function listProjects(e,t,n={}){let r=await captureVercel([`project`,`ls`,`--format`,`json`,`--scope`,t],{cwd:e,signal:n.signal});if(!r.ok)throw isForbiddenApiFailure(r.failure)&&requireVercelTeamAccess(r.failure),Error(`Could not list Vercel projects in ${t}. ${r.failure.message}`);return parseProjectList(r.stdout)}function isNotFoundApiFailure(e){if(e.code===404)return!0;let t=VercelApiErrorSchema.safeParse(safeParseJson(e.stdout)),n=t.success?t.data.error:void 0,r=`${n?.code??``} ${n?.message??``} ${e.stderr}`.toLowerCase();return r.includes(`not_found`)||r.includes(`not found`)||r.includes(`404`)}function isConflictApiFailure(e){let t=VercelApiErrorSchema.safeParse(safeParseJson(e.stdout)),n=t.success?t.data.error:void 0,r=`${n?.code??``} ${n?.message??``} ${e.stdout} ${e.stderr}`.toLowerCase();return r.includes(`409`)||r.includes(`conflict`)||r.includes(`already exists`)}function isForbiddenApiFailure(e){let t=VercelApiErrorSchema.safeParse(safeParseJson(e.stdout)),n=t.success?t.data.error:void 0,r=`${n?.code??``} ${n?.message??``} ${e.stdout} ${e.stderr}`.toLowerCase();return r.includes(`403`)||r.includes(`forbidden`)||r.includes(`not_authorized`)||r.includes(`not authorized`)||r.includes(`sso`)||r.includes(`saml`)}function safeParseJson(e){try{return JSON.parse(e)}catch{return}}function parseProjectReference(e,t){let n=VercelProjectReferenceSchema.safeParse(parseJson(e,t));if(!n.success)throw Error(`Could not read Vercel project identity from ${t}.`);return n.data}async function resolveProjectByNameOrId(e,t,n,r={}){let i=await captureVercel([`api`,`/v9/projects/${encodeURIComponent(n)}`,`--scope`,t,`--raw`],{cwd:e,signal:r.signal});if(i.ok)return parseProjectReference(i.stdout,`project ${n}`);if(isNotFoundApiFailure(i.failure))return null;throw isForbiddenApiFailure(i.failure)&&requireVercelTeamAccess(i.failure),Error(`Could not resolve project "${n}" in ${t}. ${i.failure.message}`)}async function createProject(e,t,n,r,i){let a=await captureVercel([`api`,`/v10/projects`,`--scope`,t,`--method`,`POST`,`--raw-field`,`name=${n}`,`--raw`],{cwd:e,onOutput:r,signal:i.signal});if(a.ok)return parseProjectReference(a.stdout,`created project ${n}`);throw isConflictApiFailure(a.failure)?Error(projectNameCollisionMessage(n,t)):(isForbiddenApiFailure(a.failure)&&requireVercelTeamAccess(a.failure),Error(`Could not create Vercel project "${n}" in ${t}. ${a.failure.message}`))}function projectNameCollisionMessage(e,t){return`Vercel project "${e}" already exists in ${t}. Pass --project ${e} to link it, or choose a different project name.`}async function assertNewProjectNameAvailable(e,t,n,r={}){if(await resolveProjectByNameOrId(e,t,n,r)!==null)throw Error(projectNameCollisionMessage(n,t))}function requireVercelLogin(e){let t=`Provisioning a Vercel project requires you to be logged in to Vercel.`,n=e?.stderr.trim();throw new HumanActionRequiredError({kind:`vercel-login`,command:`vercel login`,reason:e?`${t} The Vercel CLI check did not succeed: ${e.message}${n?` ${n}`:``}`:t})}function probeWhoami(e,t){return captureVercel([`whoami`],{cwd:e,signal:t.signal,timeoutMs:1e4})}function isLoggedOutFailure(e){let t=`${e.stdout} ${e.stderr}`.toLowerCase();return t.includes(`credentials`)||t.includes(`not authenticated`)||t.includes(`not logged in`)}function requireVercelAuth(e){if(e.errno===`ENOENT`)throw new HumanActionRequiredError({kind:`vercel-cli-missing`,command:`npm i -g vercel@latest`,reason:e.message});isLoggedOutFailure(e)&&requireVercelLogin(e);let t=e.stderr.trim();throw Error(`Couldn't verify your Vercel login: ${e.message}${t?` ${t}`:``}`)}async function getVercelAuthStatus(e,t={}){let n=await probeWhoami(e,t);return t.signal?.throwIfAborted(),n.ok?`authenticated`:n.failure.errno===`ENOENT`?`cli-missing`:isLoggedOutFailure(n.failure)?`logged-out`:`unavailable`}function requireVercelTeamAccess(e){let t=e.stderr.trim();throw new HumanActionRequiredError({kind:`vercel-forbidden`,command:`vercel login`,reason:`Vercel denied access to this scope.${t?` ${t}`:``} Re-authenticate (for example to complete a team's SSO) or switch to a team you can access.`})}async function requireAuth(e,t,n={}){let check=async()=>{let t=await probeWhoami(e,n);n.signal?.throwIfAborted(),t.ok||requireVercelAuth(t.failure)};if(t===void 0){await check();return}await withNetworkSpinner(t,whimsyFor(`auth`),check)}async function isVercelAuthenticated(e,t={}){return await getVercelAuthStatus(e,t)===`authenticated`}async function whoamiScope(e,t){let n=await probeWhoami(e,t);return t.signal?.throwIfAborted(),n.ok||requireVercelAuth(n.failure),n.stdout.trim()}async function resolveTeam(e,t,n={}){return t===void 0?(await listTeams(e,n)).find(e=>e.current)?.slug??await whoamiScope(e,n):t}async function validateTeam(e,t,n,r={}){if(n===void 0)return;let i=await listTeams(t,r);if(i.length>0&&!i.some(e=>e.slug===n))throw Error(`Team "${n}" was not found in \`vercel teams ls\`. Pass a valid team slug or omit --team.`)}async function pickTeam(e,t,n,r={}){if(n!==void 0)return await validateTeam(e,t,n,r),resolveTeam(t,n,r);let i=await withNetworkSpinner(e,whimsyFor(`teams`),()=>listTeams(t,r));return i.length<=1?i.find(e=>e.current)?.slug??await whoamiScope(t,r):e.select({message:`Select your team`,search:!0,placeholder:`type to search teams`,options:i.map(e=>({value:e.slug,label:e.current?`${e.name} (current)`:e.name})),initialValue:i.find(e=>e.current)?.slug})}async function pickProject(e,t,n,r={}){let i=await withNetworkSpinner(e,whimsyFor(`projects`,n),()=>listProjects(t,n,r));if(i.length===0){if(r.allowCreateWhenEmpty===!1)throw Error(`No existing Vercel projects found in ${n}. Create one in Vercel, then try again.`);return{project:await e.text({message:`No projects found in ${n}. Enter a project name to create`,validate:e=>e.trim().length===0?`Project name cannot be empty.`:void 0}),exists:!1}}return{project:await e.select({message:`Project to link`,search:!0,placeholder:`type to filter projects`,options:i.map(e=>({value:e.name,label:e.name}))}),exists:!0}}async function pickNewProjectName(e,t,n,r,i={}){let a=await withNetworkSpinner(e,whimsyFor(`project-name`,n),()=>resolveProjectByNameOrId(t,n,r.trim(),i)),o=r.trim();for(;a!==null;)o=(await e.text({message:`New project name`,defaultValue:`${o}-2`,notices:[{tone:`warning`,text:`${import_picocolors.default.yellow(`Project named`)} '${import_picocolors.default.blue(o)}' ${import_picocolors.default.yellow(`already exists in`)} '${import_picocolors.default.blue(n)}'`}],validate:e=>{if(e.trim().length===0)return`Project name cannot be empty.`}})).trim(),a=await resolveProjectByNameOrId(t,n,o,i);return o}async function linkProject(e,t,n,r,i={}){let a=[`--scope`,n.team],o;if(n.kind===`new`)o=await withNetworkSpinner(e,`Creating Vercel project "${n.project}" in ${n.team}...`,async()=>(await assertNewProjectNameAvailable(t,n.team,n.project,i),createProject(t,n.team,n.project,r,i)));else{let e=await resolveProjectByNameOrId(t,n.team,n.project,i);if(e===null)throw Error(`Vercel project "${n.project}" was not found in ${n.team}.`);o=e}return withNetworkSpinner(e,`Linking this directory to Vercel project "${o.name}"...`,()=>runVercel([`link`,`--project`,o.id,...a,`--yes`],{cwd:t,onOutput:r,nonInteractive:!0,signal:i.signal}))}export{assertNewProjectNameAvailable,getVercelAuthStatus,isVercelAuthenticated,linkProject,listProjects,listTeams,pickNewProjectName,pickProject,pickTeam,projectIdFromResolution,requireAuth,requireVercelAuth,requireVercelLogin,requireVercelTeamAccess,resolveProjectByNameOrId,resolveTeam,unresolvedProject,validateTeam,withNetworkSpinner};
|
|
@@ -3,7 +3,7 @@ import type { StandardJSONSchemaV1 } from "#compiled/@standard-schema/spec/index
|
|
|
3
3
|
import type { JsonObject } from "#shared/json.js";
|
|
4
4
|
import type { ModuleSourceRef } from "#shared/source-ref.js";
|
|
5
5
|
/**
|
|
6
|
-
* Optional overrides that
|
|
6
|
+
* Optional overrides that eve forwards to the AI SDK model runtime call for
|
|
7
7
|
* this model.
|
|
8
8
|
*/
|
|
9
9
|
export interface AgentModelOptionsDefinition {
|
|
@@ -44,27 +44,27 @@ export type InternalAgentModelDefinition = {
|
|
|
44
44
|
/**
|
|
45
45
|
* The model handle you assign to an agent's `model` field. This is the AI SDK
|
|
46
46
|
* `LanguageModel` value (for example, the result of a provider or gateway
|
|
47
|
-
* model call), not an
|
|
47
|
+
* model call), not an eve-authored definition object.
|
|
48
48
|
*/
|
|
49
49
|
export type PublicAgentModelDefinition = LanguageModel;
|
|
50
50
|
export interface InternalAgentCompactionDefinition {
|
|
51
51
|
/**
|
|
52
52
|
* Optional model used only for generating compaction summaries.
|
|
53
53
|
*
|
|
54
|
-
* When omitted,
|
|
54
|
+
* When omitted, eve uses the active turn model for the summary call.
|
|
55
55
|
*/
|
|
56
56
|
model?: InternalAgentModelDefinition;
|
|
57
57
|
/**
|
|
58
58
|
* Fraction of the primary model context window that triggers compaction.
|
|
59
59
|
*
|
|
60
|
-
*
|
|
60
|
+
* eve defaults to `0.9` when this is omitted.
|
|
61
61
|
*/
|
|
62
62
|
thresholdPercent?: number;
|
|
63
63
|
}
|
|
64
64
|
/**
|
|
65
65
|
* Configures conversation compaction: when the model context window fills past
|
|
66
|
-
* `thresholdPercent`,
|
|
67
|
-
* field is optional; omit the block to use
|
|
66
|
+
* `thresholdPercent`, eve summarizes earlier turns to reclaim space. Every
|
|
67
|
+
* field is optional; omit the block to use eve's defaults.
|
|
68
68
|
*/
|
|
69
69
|
export interface PublicAgentCompactionDefinition {
|
|
70
70
|
/**
|
|
@@ -72,20 +72,20 @@ export interface PublicAgentCompactionDefinition {
|
|
|
72
72
|
* in tokens.
|
|
73
73
|
*
|
|
74
74
|
* Same escape hatch as the agent-level `modelContextWindowTokens`. When set,
|
|
75
|
-
*
|
|
75
|
+
* eve uses this value verbatim and skips the AI Gateway lookup for the
|
|
76
76
|
* compaction summary model.
|
|
77
77
|
*/
|
|
78
78
|
readonly modelContextWindowTokens?: number;
|
|
79
79
|
/**
|
|
80
80
|
* Optional model used only for generating compaction summaries.
|
|
81
81
|
*
|
|
82
|
-
* When omitted,
|
|
82
|
+
* When omitted, eve uses the active turn model for the summary call.
|
|
83
83
|
*/
|
|
84
84
|
readonly model?: PublicAgentModelDefinition;
|
|
85
85
|
/**
|
|
86
86
|
* Fraction of the primary model context window that triggers compaction.
|
|
87
87
|
*
|
|
88
|
-
*
|
|
88
|
+
* eve defaults to `0.9` when this is omitted.
|
|
89
89
|
*/
|
|
90
90
|
readonly thresholdPercent?: number;
|
|
91
91
|
}
|
|
@@ -103,7 +103,7 @@ export interface AgentExperimentalDefinition {
|
|
|
103
103
|
* instead of exposing them directly to the model. The model writes
|
|
104
104
|
* JavaScript that calls the tools inside the sandbox.
|
|
105
105
|
*
|
|
106
|
-
* When unset,
|
|
106
|
+
* When unset, eve falls back to the `EVE_EXPERIMENTAL_CODE_MODE`
|
|
107
107
|
* environment variable (`"1"` enables it) for backwards compatibility.
|
|
108
108
|
*/
|
|
109
109
|
readonly codeMode?: boolean;
|
|
@@ -116,8 +116,8 @@ export interface AgentExperimentalDefinition {
|
|
|
116
116
|
*/
|
|
117
117
|
export interface AgentBuildDefinition {
|
|
118
118
|
/**
|
|
119
|
-
* Additional imported package names that
|
|
120
|
-
* into hosted build output.
|
|
119
|
+
* Additional imported package names that eve should keep external and trace
|
|
120
|
+
* into hosted build output. eve also keeps matching imports external while
|
|
121
121
|
* compiling authored TypeScript modules such as tools, channels, and
|
|
122
122
|
* schedules.
|
|
123
123
|
*
|
|
@@ -169,10 +169,10 @@ export type PublicAgentDefinition = {
|
|
|
169
169
|
/**
|
|
170
170
|
* Optional override for the primary model's context window size, in tokens.
|
|
171
171
|
*
|
|
172
|
-
* Escape hatch for cases where
|
|
172
|
+
* Escape hatch for cases where eve cannot resolve the model's metadata via
|
|
173
173
|
* the AI Gateway model catalog (e.g. a custom or unlisted model id). When
|
|
174
|
-
* set,
|
|
175
|
-
* leaving this unset so
|
|
174
|
+
* set, eve uses this value verbatim and skips the AI Gateway lookup. Prefer
|
|
175
|
+
* leaving this unset so eve can stay in sync with provider metadata.
|
|
176
176
|
*/
|
|
177
177
|
readonly modelContextWindowTokens?: number;
|
|
178
178
|
readonly modelOptions?: AgentModelOptionsDefinition;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type * as CodeModeModule from "#compiled/experimental-ai-sdk-code-mode/index.js";
|
|
2
|
-
/** Internal AI SDK tool name used for
|
|
2
|
+
/** Internal AI SDK tool name used for eve's code-mode wrapper. */
|
|
3
3
|
export declare const CODE_MODE_TOOL_NAME = "code_mode";
|
|
4
4
|
/**
|
|
5
|
-
* Model-facing tool name for
|
|
5
|
+
* Model-facing tool name for eve's `Workflow` orchestration wrapper — a
|
|
6
6
|
* code-mode sandbox restricted to subagent and remote-agent calls. Reserved so
|
|
7
7
|
* authored tools cannot collide with it.
|
|
8
8
|
*/
|
|
@@ -19,7 +19,7 @@ export declare function isCodeModeEnvEnabled(env?: {
|
|
|
19
19
|
}): boolean;
|
|
20
20
|
/**
|
|
21
21
|
* Resolves the effective code-mode setting for one agent. The authored
|
|
22
|
-
* `experimental.codeMode` flag wins; when omitted,
|
|
22
|
+
* `experimental.codeMode` flag wins; when omitted, eve falls back to the
|
|
23
23
|
* {@link isCodeModeEnvEnabled} environment backstop.
|
|
24
24
|
*/
|
|
25
25
|
export declare function resolveCodeModeEnabled(experimentalCodeMode: boolean | undefined, env?: {
|
|
@@ -3,7 +3,7 @@ import { type JsonObject } from "#shared/json.js";
|
|
|
3
3
|
type JsonSchemaDirection = "input" | "output";
|
|
4
4
|
/**
|
|
5
5
|
* Normalizes one Standard Schema or JSON Schema definition into plain JSON
|
|
6
|
-
* Schema data that can cross
|
|
6
|
+
* Schema data that can cross eve runtime and client boundaries.
|
|
7
7
|
*/
|
|
8
8
|
export declare function normalizeJsonSchemaDefinition(value: StandardJSONSchemaV1 | Record<string, unknown> | unknown, direction?: JsonSchemaDirection): JsonObject;
|
|
9
9
|
export {};
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
* dev TUI status bar, or any other consumer of `/eve/v1/info`) shows and gates
|
|
5
5
|
* on three states:
|
|
6
6
|
*
|
|
7
|
-
* - `external`: a direct provider endpoint, not the gateway.
|
|
7
|
+
* - `external`: a direct provider endpoint, not the gateway. eve makes no
|
|
8
8
|
* connectedness claim, since the provider key lives in the agent's own code
|
|
9
9
|
* rather than the gateway's credentials, and model selection is disabled
|
|
10
|
-
* because
|
|
10
|
+
* because eve cannot rewrite the authored source.
|
|
11
11
|
* - `gateway` + `connected: true`: routed through the Vercel AI Gateway with a
|
|
12
12
|
* resolvable credential (`api-key` from `AI_GATEWAY_API_KEY`, else `oidc`).
|
|
13
13
|
* - `gateway` + `connected: false`: routed through the gateway with neither a
|
|
@@ -37,7 +37,7 @@ export interface SandboxSeedFile {
|
|
|
37
37
|
* Diagnostic tags attached to provider-owned sandbox resources.
|
|
38
38
|
*
|
|
39
39
|
* Built-in backends may forward these into their hosting platform's
|
|
40
|
-
* native tagging system.
|
|
40
|
+
* native tagging system. eve supplies stable tags such as the active
|
|
41
41
|
* agent, channel, and session id so sandboxes can be found and
|
|
42
42
|
* attributed in provider dashboards.
|
|
43
43
|
*/
|
|
@@ -60,7 +60,7 @@ export interface SandboxBackendRuntimeContext {
|
|
|
60
60
|
*/
|
|
61
61
|
export interface SandboxBackendCreateInput {
|
|
62
62
|
/**
|
|
63
|
-
* Reusable template key to open this session from. `null` means
|
|
63
|
+
* Reusable template key to open this session from. `null` means eve
|
|
64
64
|
* intentionally skipped template prewarm because the sandbox has no
|
|
65
65
|
* `bootstrap()` and no seed files, so the backend should create a
|
|
66
66
|
* fresh session from its default base runtime.
|
|
@@ -114,7 +114,7 @@ export interface SandboxBackendPrewarmResult {
|
|
|
114
114
|
*
|
|
115
115
|
* A `SandboxBackend` is a value an author attaches to a
|
|
116
116
|
* {@link SandboxDefinition} to choose which underlying runtime hosts the
|
|
117
|
-
* sandbox.
|
|
117
|
+
* sandbox. eve ships built-in backends (`docker()`,
|
|
118
118
|
* `justbash()`, `microsandbox()`,
|
|
119
119
|
* `vercel()`, and the availability-aware
|
|
120
120
|
* `defaultSandbox()`), but the interface is public so authors can write
|
|
@@ -143,7 +143,7 @@ export interface SandboxBackend<BO = Record<string, never>, SO = Record<string,
|
|
|
143
143
|
*/
|
|
144
144
|
create(input: SandboxBackendCreateInput): Promise<SandboxBackendHandle<SO>>;
|
|
145
145
|
/**
|
|
146
|
-
* Build-time prewarm hook.
|
|
146
|
+
* Build-time prewarm hook. eve invokes this for every authored
|
|
147
147
|
* sandbox in the compiled graph before serving traffic so the backend
|
|
148
148
|
* can capture reusable template state. Idempotent against existing state
|
|
149
149
|
* keyed by `templateKey`.
|
|
@@ -35,7 +35,7 @@ export interface SandboxSessionContext<O = Record<string, never>> {
|
|
|
35
35
|
readonly use: SandboxSessionUseFn<O>;
|
|
36
36
|
}
|
|
37
37
|
/**
|
|
38
|
-
* Resolves a build-time revalidation key for a bootstrap snapshot.
|
|
38
|
+
* Resolves a build-time revalidation key for a bootstrap snapshot. eve
|
|
39
39
|
* evaluates it during compile/build and freezes the result into compiled
|
|
40
40
|
* artifacts. Supply one only for external inputs that affect bootstrap
|
|
41
41
|
* output; authored source and managed seeds are tracked automatically.
|
|
@@ -73,7 +73,7 @@ interface SandboxDefinitionBase<BO = Record<string, never>, SO = Record<string,
|
|
|
73
73
|
* });
|
|
74
74
|
* ```
|
|
75
75
|
*
|
|
76
|
-
* When this field is omitted,
|
|
76
|
+
* When this field is omitted, eve substitutes `defaultSandbox()` at
|
|
77
77
|
* runtime, which picks the best available backend: `vercel()`
|
|
78
78
|
* on hosted Vercel (where `process.env.VERCEL` is set), then Docker,
|
|
79
79
|
* microsandbox, or just-bash
|
|
@@ -94,7 +94,7 @@ export interface SandboxDefinitionWithBootstrap<BO = Record<string, never>, SO =
|
|
|
94
94
|
bootstrap(input: SandboxBootstrapContext<BO>): Promise<void> | void;
|
|
95
95
|
/**
|
|
96
96
|
* Optional build-time revalidation key for the reusable sandbox
|
|
97
|
-
* snapshot produced by {@link bootstrap}.
|
|
97
|
+
* snapshot produced by {@link bootstrap}. eve evaluates this
|
|
98
98
|
* function during compile/build, stores the resolved string in
|
|
99
99
|
* compiled artifacts, and uses that frozen value for both prewarm and
|
|
100
100
|
* runtime session create. Authored sandbox source and
|
|
@@ -2,7 +2,7 @@ import type { NetworkPolicy } from "#compiled/@vercel/sandbox/index.js";
|
|
|
2
2
|
/**
|
|
3
3
|
* Firewall network policy applied to a live sandbox session.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
5
|
+
* eve-owned alias of the backend network-policy shape. Use it to restrict
|
|
6
6
|
* egress (`"deny-all"`, an allow-list) or to broker credentials onto
|
|
7
7
|
* outgoing requests. A per-domain `transform` injects headers at the
|
|
8
8
|
* firewall so secrets never enter the sandbox process:
|
|
@@ -64,13 +64,13 @@ export interface SandboxRemovePathOptions {
|
|
|
64
64
|
readonly recursive?: boolean;
|
|
65
65
|
}
|
|
66
66
|
/**
|
|
67
|
-
* Public
|
|
67
|
+
* Public eve-owned sandbox session exposed to authored lifecycle hooks.
|
|
68
68
|
*
|
|
69
69
|
* The eight I/O methods (`run`, `spawn`, `readFile`, `readBinaryFile`,
|
|
70
70
|
* `readTextFile`, `writeFile`, `writeBinaryFile`, `writeTextFile`) are
|
|
71
71
|
* pulled directly from the AI SDK {@link AiSdkSandbox} type, so authored
|
|
72
72
|
* code that targets either surface uses identical signatures. `id` and
|
|
73
|
-
* `resolvePath` are
|
|
73
|
+
* `resolvePath` are eve-specific extensions that the runtime relies on
|
|
74
74
|
* for caching and `/workspace` path anchoring.
|
|
75
75
|
*
|
|
76
76
|
* Relative paths resolve from `/workspace`, the live working directory
|
|
@@ -14,7 +14,7 @@ export interface MaterializableSkillPackage {
|
|
|
14
14
|
readonly name: string;
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
|
-
* Normalizes one named skill package into the concrete files
|
|
17
|
+
* Normalizes one named skill package into the concrete files eve writes to
|
|
18
18
|
* workspace resources or the live sandbox.
|
|
19
19
|
*/
|
|
20
20
|
export declare function normalizeSkillPackage(input: NamedSkillDefinition): MaterializableSkillPackage;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{dirname,join}from"node:path";import{mkdir,writeFile}from"node:fs/promises";import{Buffer}from"node:buffer";const WORKSPACE_ROOT=`/workspace`;function normalizeSkillPackage(e){assertSafeSkillPackageName(e.name);let t=[{content:Buffer.from(e.markdown,`utf8`),relativePath:`SKILL.md`}];for(let[n,r]of Object.entries(e.files??{}))assertSafeSkillPackageFilePath(n),t.push({content:contentToBuffer(r),relativePath:n});return t.sort((e,t)=>comparePaths(e.relativePath,t.relativePath)),{description:e.description,files:t,license:e.license,markdown:e.markdown,metadata:e.metadata===void 0?void 0:{...e.metadata},name:e.name}}async function writeSkillPackageDirectory(i){for(let a of i.skill.files){let o=join(i.rootPath,`skills`,i.skill.name,a.relativePath);await mkdir(dirname(o),{recursive:!0}),await writeFile(o,a.content)}}async function writeSkillPackageToSandbox(e){for(let t of e.skill.files)await e.sandbox.writeBinaryFile({content:t.content,path:`${WORKSPACE_ROOT}/skills/${e.skill.name}/${t.relativePath}`})}async function removeSkillPackageFromSandbox(e){assertSafeSkillPackageName(e.name),await e.sandbox.removePath({force:!0,path:`${WORKSPACE_ROOT}/skills/${e.name}`,recursive:!0})}function assertSafeSkillPackageName(e){if(e.length===0||e.startsWith(`.`)||e.includes(`/`)||e.includes(`\\`)||e.includes(`..`)||!/^[A-Za-z0-9][A-Za-z0-9._-]*$/.test(e)||/^[A-Za-z]:/.test(e))throw Error(`Expected skill name to be a non-empty shell-safe path segment starting with an alphanumeric character and containing only alphanumerics, ".", "_", or "-".`)}function assertSafeSkillPackageFilePath(e){if(e===`SKILL.md`)throw Error(`Skill package files must not include "SKILL.md";
|
|
1
|
+
import{dirname,join}from"node:path";import{mkdir,writeFile}from"node:fs/promises";import{Buffer}from"node:buffer";const WORKSPACE_ROOT=`/workspace`;function normalizeSkillPackage(e){assertSafeSkillPackageName(e.name);let t=[{content:Buffer.from(e.markdown,`utf8`),relativePath:`SKILL.md`}];for(let[n,r]of Object.entries(e.files??{}))assertSafeSkillPackageFilePath(n),t.push({content:contentToBuffer(r),relativePath:n});return t.sort((e,t)=>comparePaths(e.relativePath,t.relativePath)),{description:e.description,files:t,license:e.license,markdown:e.markdown,metadata:e.metadata===void 0?void 0:{...e.metadata},name:e.name}}async function writeSkillPackageDirectory(i){for(let a of i.skill.files){let o=join(i.rootPath,`skills`,i.skill.name,a.relativePath);await mkdir(dirname(o),{recursive:!0}),await writeFile(o,a.content)}}async function writeSkillPackageToSandbox(e){for(let t of e.skill.files)await e.sandbox.writeBinaryFile({content:t.content,path:`${WORKSPACE_ROOT}/skills/${e.skill.name}/${t.relativePath}`})}async function removeSkillPackageFromSandbox(e){assertSafeSkillPackageName(e.name),await e.sandbox.removePath({force:!0,path:`${WORKSPACE_ROOT}/skills/${e.name}`,recursive:!0})}function assertSafeSkillPackageName(e){if(e.length===0||e.startsWith(`.`)||e.includes(`/`)||e.includes(`\\`)||e.includes(`..`)||!/^[A-Za-z0-9][A-Za-z0-9._-]*$/.test(e)||/^[A-Za-z]:/.test(e))throw Error(`Expected skill name to be a non-empty shell-safe path segment starting with an alphanumeric character and containing only alphanumerics, ".", "_", or "-".`)}function assertSafeSkillPackageFilePath(e){if(e===`SKILL.md`)throw Error(`Skill package files must not include "SKILL.md"; eve generates it.`);if(e.length===0||e.startsWith(`/`)||e.includes(`\\`)||/^[A-Za-z]:/.test(e)||e.split(`/`).some(e=>e.length===0||e===`.`||e===`..`))throw Error(`Expected skill package file paths to be relative POSIX paths.`)}function contentToBuffer(e){return typeof e==`string`?Buffer.from(e,`utf8`):Buffer.from(e)}function comparePaths(e,t){return e<t?-1:+(e>t)}export{assertSafeSkillPackageName,normalizeSkillPackage,removeSkillPackageFromSandbox,writeSkillPackageDirectory,writeSkillPackageToSandbox};
|
|
@@ -44,7 +44,7 @@ export interface PublicToolDefinitionWithExecuteFn<TInput = unknown, TOutput = u
|
|
|
44
44
|
execute: ToolExecuteFn<TInput, TOutput>;
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
47
|
-
*
|
|
47
|
+
* eve-owned shape for the model-facing tool result produced by
|
|
48
48
|
* `toModelOutput`. Structurally compatible with the AI SDK's
|
|
49
49
|
* `ToolResultOutput` so the harness can forward it without conversion.
|
|
50
50
|
*/
|
package/dist/src/svelte/index.js
CHANGED
|
@@ -12,7 +12,7 @@ export type { PrepareSend };
|
|
|
12
12
|
*/
|
|
13
13
|
export type UseEveAgentStatus = EveAgentStoreStatus;
|
|
14
14
|
/**
|
|
15
|
-
* Immutable point-in-time view of an
|
|
15
|
+
* Immutable point-in-time view of an eve agent session: projected `data`, the
|
|
16
16
|
* last `error`, the raw `events` stream, the `session` cursor, and `status`.
|
|
17
17
|
* `useEveAgent` passes this snapshot to the `onFinish` callback.
|
|
18
18
|
*/
|
|
@@ -21,7 +21,7 @@ export type UseEveAgentSnapshot<TData> = EveAgentStoreSnapshot<TData>;
|
|
|
21
21
|
* Reactive return value from `useEveAgent`.
|
|
22
22
|
*
|
|
23
23
|
* The state properties are Svelte 5 rune-friendly getters. Read them from a
|
|
24
|
-
* template, `$derived`, or `$effect` and Svelte will update when
|
|
24
|
+
* template, `$derived`, or `$effect` and Svelte will update when eve streams
|
|
25
25
|
* new events.
|
|
26
26
|
*/
|
|
27
27
|
export interface UseEveAgentReturn<TData> {
|
|
@@ -43,7 +43,7 @@ export interface UseEveAgentReturn<TData> {
|
|
|
43
43
|
readonly stop: () => void;
|
|
44
44
|
}
|
|
45
45
|
/**
|
|
46
|
-
* Configuration for a Svelte
|
|
46
|
+
* Configuration for a Svelte eve agent session.
|
|
47
47
|
*
|
|
48
48
|
* Read once when `useEveAgent` creates its store; create a new binding to
|
|
49
49
|
* change host, reducer, or session. To rotate credentials or headers without
|
|
@@ -62,9 +62,9 @@ export interface UseEveAgentOptions<TData> extends EveAgentStoreCallbacks<TData>
|
|
|
62
62
|
*/
|
|
63
63
|
readonly headers?: HeadersValue;
|
|
64
64
|
/**
|
|
65
|
-
* Base URL for
|
|
65
|
+
* Base URL for eve client requests. Empty targets same-origin eve routes
|
|
66
66
|
* such as `/eve/v1/...`; a same-origin prefix like `/api` routes through an
|
|
67
|
-
* app-owned proxy; an absolute origin hits an
|
|
67
|
+
* app-owned proxy; an absolute origin hits an eve server directly.
|
|
68
68
|
*
|
|
69
69
|
* @default ""
|
|
70
70
|
*/
|
|
@@ -80,10 +80,10 @@ export interface UseEveAgentOptions<TData> extends EveAgentStoreCallbacks<TData>
|
|
|
80
80
|
*/
|
|
81
81
|
readonly maxReconnectAttempts?: number;
|
|
82
82
|
/**
|
|
83
|
-
* Project submitted user messages before
|
|
83
|
+
* Project submitted user messages before eve confirms them with a
|
|
84
84
|
* `message.received` stream event. Optimistic events are reducer-facing
|
|
85
85
|
* projection only and never appear in `events`, which stays the
|
|
86
|
-
* authoritative
|
|
86
|
+
* authoritative eve stream.
|
|
87
87
|
*
|
|
88
88
|
* @default true
|
|
89
89
|
*/
|
package/dist/src/vue/index.js
CHANGED
|
@@ -13,7 +13,7 @@ export type { PrepareSend };
|
|
|
13
13
|
*/
|
|
14
14
|
export type UseEveAgentStatus = EveAgentStoreStatus;
|
|
15
15
|
/**
|
|
16
|
-
* Point-in-time projected state for an
|
|
16
|
+
* Point-in-time projected state for an eve agent session (`data`, `error`,
|
|
17
17
|
* `events`, `session`, `status`).
|
|
18
18
|
*
|
|
19
19
|
* `useEveAgent` passes this shape to callbacks such as `onFinish`, but exposes
|
|
@@ -42,7 +42,7 @@ export interface UseEveAgentReturn<TData> {
|
|
|
42
42
|
readonly stop: () => void;
|
|
43
43
|
}
|
|
44
44
|
/**
|
|
45
|
-
* Configuration for creating or binding a Vue
|
|
45
|
+
* Configuration for creating or binding a Vue eve agent session.
|
|
46
46
|
*
|
|
47
47
|
* Session configuration is read once when the composable creates its internal
|
|
48
48
|
* store; to change the host, reducer, or session, remount the component. For
|
|
@@ -59,11 +59,11 @@ export interface UseEveAgentOptions<TData> extends EveAgentStoreCallbacks<TData>
|
|
|
59
59
|
/** Custom headers; a function value is resolved per request. */
|
|
60
60
|
readonly headers?: HeadersValue;
|
|
61
61
|
/**
|
|
62
|
-
* Base URL used for
|
|
62
|
+
* Base URL used for eve client requests.
|
|
63
63
|
*
|
|
64
|
-
* By default, requests target same-origin
|
|
64
|
+
* By default, requests target same-origin eve routes such as `/eve/v1/...`.
|
|
65
65
|
* Pass a same-origin prefix such as `/api` to use an app-owned proxy, or an
|
|
66
|
-
* absolute origin to talk to an
|
|
66
|
+
* absolute origin to talk to an eve server directly.
|
|
67
67
|
*
|
|
68
68
|
* @default ""
|
|
69
69
|
*/
|
|
@@ -75,11 +75,11 @@ export interface UseEveAgentOptions<TData> extends EveAgentStoreCallbacks<TData>
|
|
|
75
75
|
/** Maximum SSE reconnection attempts per turn. @default 3 */
|
|
76
76
|
readonly maxReconnectAttempts?: number;
|
|
77
77
|
/**
|
|
78
|
-
* Project submitted user messages before
|
|
78
|
+
* Project submitted user messages before eve confirms them with a
|
|
79
79
|
* `message.received` stream event.
|
|
80
80
|
*
|
|
81
81
|
* Optimistic events are reducer-facing projection events only. They are not
|
|
82
|
-
* exposed through `events`, which remains the authoritative
|
|
82
|
+
* exposed through `events`, which remains the authoritative eve stream.
|
|
83
83
|
*
|
|
84
84
|
* @default true
|
|
85
85
|
*/
|
package/docs/README.md
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
#
|
|
1
|
+
# eve Public Docs
|
|
2
2
|
|
|
3
|
-
This folder is for app authors using
|
|
3
|
+
This folder is for app authors using eve as a framework.
|
|
4
4
|
|
|
5
|
-
If you want to understand how to build agents with
|
|
5
|
+
If you want to understand how to build agents with eve, start here.
|
|
6
6
|
|
|
7
7
|
Important naming note:
|
|
8
8
|
|
|
9
|
-
- The framework is called
|
|
9
|
+
- The framework is called eve.
|
|
10
10
|
- The current published package name is `eve`.
|
|
11
11
|
- The CLI binary is `eve`.
|
|
12
12
|
|
|
13
13
|
## Legal and safeguards
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
eve is currently a preview and subject to the Vercel beta terms; the framework, APIs, documentation, and behavior may change before general availability.
|
|
16
16
|
|
|
17
17
|
As the deployer, it is your responsibility to ensure your agent complies with applicable laws.
|
|
18
18
|
|
|
19
19
|
You are responsible for configuring approval policies, tool restrictions, connection scopes, route/session authorization, sandbox controls, telemetry exports, and other safeguards appropriate for your use case.
|
|
20
20
|
|
|
21
|
-
Before using
|
|
21
|
+
Before using eve with non-public, sensitive, regulated, or production data, review which default tools, custom tools, MCP tools, shell/file/web tools, connected services, subagents, schedules, and external actions are available to the agent.
|
|
22
22
|
|
|
23
23
|
Require human approval or other safeguards for sensitive, irreversible, regulated, financial, healthcare, employment, housing, legal, safety-impacting, user-impacting, or external side-effecting actions.
|
|
24
24
|
|
|
25
|
-
Unless you configure stricter controls,
|
|
25
|
+
Unless you configure stricter controls, eve agents may operate with permissive settings, including tool execution without human approval where approval is omitted and sandbox network egress that is not deny-all. Do not rely on model behavior alone to prevent sensitive or irreversible actions.
|
|
26
26
|
|
|
27
27
|
Casing convention:
|
|
28
28
|
|
|
@@ -40,7 +40,7 @@ Read in this order:
|
|
|
40
40
|
5. [TypeScript API](./reference/typescript-api.md)
|
|
41
41
|
6. [Context Control](./concepts/context-control.md)
|
|
42
42
|
7. [Skills](./skills.mdx)
|
|
43
|
-
8. [Tools](./tools.mdx)
|
|
43
|
+
8. [Tools](./tools/overview.mdx)
|
|
44
44
|
9. [Connections](./connections.mdx)
|
|
45
45
|
10. [Sandboxes](./sandbox.mdx)
|
|
46
46
|
11. [Channels](./channels/overview.mdx)
|
|
@@ -56,7 +56,7 @@ Read in this order:
|
|
|
56
56
|
|
|
57
57
|
## The public mental model
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
eve is a filesystem-first framework for durable backend agents.
|
|
60
60
|
|
|
61
61
|
You author an agent as files on disk:
|
|
62
62
|
|
|
@@ -71,7 +71,7 @@ You author an agent as files on disk:
|
|
|
71
71
|
- recurring jobs in `schedules/`
|
|
72
72
|
- additive runtime config in `agent.ts`
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
eve then gives you:
|
|
75
75
|
|
|
76
76
|
- a stable HTTP message route
|
|
77
77
|
- optional channel webhook routes
|
|
@@ -89,7 +89,7 @@ know:
|
|
|
89
89
|
- the harness does one unit of AI work and decides whether to continue, wait, or finish
|
|
90
90
|
- the runtime persists session state, streams events, and owns workflow orchestration
|
|
91
91
|
|
|
92
|
-
That is why
|
|
92
|
+
That is why eve exposes two identifiers:
|
|
93
93
|
|
|
94
94
|
- `continuationToken` for the next user message
|
|
95
95
|
- `sessionId` for streaming and inspection
|
package/docs/agent-config.md
CHANGED
|
@@ -17,7 +17,7 @@ export default defineAgent({
|
|
|
17
17
|
});
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
The root `agent.ts` can be omitted when no runtime config is needed. In that case,
|
|
20
|
+
The root `agent.ts` can be omitted when no runtime config is needed. In that case, eve defaults
|
|
21
21
|
to `anthropic/claude-sonnet-4.6`. When `agent.ts` is present, `model` is required.
|
|
22
22
|
|
|
23
23
|
`model` accepts a gateway model id string, which routes through the [Vercel AI Gateway](https://vercel.com/docs/ai-gateway). To call a provider directly and configure the model in code, pass a provider-authored `LanguageModel`:
|
|
@@ -57,7 +57,7 @@ See [Default harness](./concepts/default-harness#compaction) for how the loop ap
|
|
|
57
57
|
| `modelOptions` | `AgentModelOptionsDefinition` | none | Provider option overrides forwarded to the model call. |
|
|
58
58
|
| `experimental` | `{ codeMode?: boolean }` | flags unset | Opt-in flags that can change or disappear in any release. Treat them as unstable. `codeMode` routes executable tools through a sandboxed code-execution wrapper, where the model writes JavaScript that calls the tools inside the [sandbox](./sandbox). |
|
|
59
59
|
| `outputSchema` | Standard Schema or a JSON Schema object | none | Structured return type for task-mode runs (a subagent, schedule, or remote job). Interactive conversation turns ignore it unless the client supplies a per-message schema. |
|
|
60
|
-
| `build` | `{ externalDependencies?: string[] }` | none | Hosted-build packaging controls. `externalDependencies` keeps listed packages external while
|
|
60
|
+
| `build` | `{ externalDependencies?: string[] }` | none | Hosted-build packaging controls. `externalDependencies` keeps listed packages external while eve compiles authored modules such as tools and channels, and traces those packages into the hosted output. |
|
|
61
61
|
|
|
62
62
|
`codeMode` is experimental and may change or be removed.
|
|
63
63
|
|
package/docs/channels/custom.mdx
CHANGED
|
@@ -3,7 +3,7 @@ title: "Custom Channels"
|
|
|
3
3
|
description: "Author custom HTTP and WebSocket channels with routes, events, metadata, continuation tokens, and file uploads."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
When
|
|
6
|
+
When eve doesn't ship a channel for your surface, you build one. Custom channels expose HTTP or WebSocket endpoints, parse incoming requests, start or resume sessions, observe runtime events, and own delivery back to your platform.
|
|
7
7
|
|
|
8
8
|
## File location and identity
|
|
9
9
|
|
|
@@ -53,7 +53,7 @@ Declare routes with the `POST()` and `GET()` helpers. Each route handler receive
|
|
|
53
53
|
- `waitUntil(promise)` extends the request lifetime for background work.
|
|
54
54
|
- `requestIp` is the client IP, or `null` when the host cannot provide it.
|
|
55
55
|
|
|
56
|
-
Event handlers like `"message.completed"` are declared under the `events` key. They receive `(eventData, channel, ctx)`, where `eventData` is the event payload, `channel` carries platform handles and session continuation operations, and `ctx` is the
|
|
56
|
+
Event handlers like `"message.completed"` are declared under the `events` key. They receive `(eventData, channel, ctx)`, where `eventData` is the event payload, `channel` carries platform handles and session continuation operations, and `ctx` is the eve `SessionContext`. Every channel kind shares this signature. The one exception is `session.failed`, which receives only `(eventData, channel)` with no `ctx`.
|
|
57
57
|
|
|
58
58
|
## WebSocket routes
|
|
59
59
|
|
|
@@ -76,11 +76,11 @@ export default defineChannel({
|
|
|
76
76
|
});
|
|
77
77
|
```
|
|
78
78
|
|
|
79
|
-
`WS()` handlers receive the same helpers as HTTP route handlers: `send`, `getSession`, `receive`, `params`, `waitUntil`, and `requestIp`. The returned hooks are
|
|
79
|
+
`WS()` handlers receive the same helpers as HTTP route handlers: `send`, `getSession`, `receive`, `params`, `waitUntil`, and `requestIp`. The returned hooks are eve-owned structural types compatible with Nitro/H3 websocket routing, including `upgrade`, `open`, `message`, `close`, and `error`.
|
|
80
80
|
|
|
81
81
|
### Node upgrade server escape hatch
|
|
82
82
|
|
|
83
|
-
Prefer the `WS()` lifecycle hooks above when you own the websocket behavior.
|
|
83
|
+
Prefer the `WS()` lifecycle hooks above when you own the websocket behavior. eve also exposes `createWebSocketUpgradeServer()` for the narrower case where a third-party SDK or framework expects to bind directly to a Node `http.Server` with `server.on("upgrade", ...)`.
|
|
84
84
|
|
|
85
85
|
```ts
|
|
86
86
|
import { defineChannel, WS, createWebSocketUpgradeServer } from "eve/channels";
|
|
@@ -94,7 +94,7 @@ export default defineChannel({
|
|
|
94
94
|
});
|
|
95
95
|
```
|
|
96
96
|
|
|
97
|
-
The bridge server does not listen on its own port. It receives only upgrade events that matched the
|
|
97
|
+
The bridge server does not listen on its own port. It receives only upgrade events that matched the eve route, and only on hosts where Nitro exposes the raw Node upgrade request, socket, and head. Treat it as a compatibility adapter for libraries with server-binding APIs, not the primary way to build websocket channels in eve.
|
|
98
98
|
|
|
99
99
|
## Cross-channel hand-off
|
|
100
100
|
|
|
@@ -4,7 +4,7 @@ description: "Reach your agent from Discord HTTP Interactions, including slash c
|
|
|
4
4
|
type: integration
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
The Discord channel wires your agent into Discord's HTTP Interactions, including slash and application commands, message components, and modal submissions. Discord enforces a three-second ACK deadline, so the channel verifies the Ed25519 signature headers, acknowledges the command right away, and runs the
|
|
7
|
+
The Discord channel wires your agent into Discord's HTTP Interactions, including slash and application commands, message components, and modal submissions. Discord enforces a three-second ACK deadline, so the channel verifies the Ed25519 signature headers, acknowledges the command right away, and runs the eve work in the background. See [Channels](./overview) for the contract this builds on.
|
|
8
8
|
|
|
9
9
|
## Add the channel
|
|
10
10
|
|
|
@@ -24,12 +24,12 @@ To skip env vars, pass the same values through `credentials: { applicationId, bo
|
|
|
24
24
|
|
|
25
25
|
## Register a command
|
|
26
26
|
|
|
27
|
-
Registering commands is on you, not the channel. Use Discord's API or the Developer Portal. A string option named `message` lines up with
|
|
27
|
+
Registering commands is on you, not the channel. Use Discord's API or the Developer Portal. A string option named `message` lines up with eve's default prompt extraction:
|
|
28
28
|
|
|
29
29
|
```bash
|
|
30
30
|
curl -X PUT "https://discord.com/api/v10/applications/$DISCORD_APPLICATION_ID/commands" \
|
|
31
31
|
-H "Authorization: Bot $DISCORD_BOT_TOKEN" -H "Content-Type: application/json" \
|
|
32
|
-
-d '[{"name":"ask","description":"Ask the
|
|
32
|
+
-d '[{"name":"ask","description":"Ask the eve agent","type":1,
|
|
33
33
|
"options":[{"name":"message","description":"What should the agent do?","type":3,"required":true}]}]'
|
|
34
34
|
```
|
|
35
35
|
|