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,16 +1,16 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Overview"
|
|
3
|
-
description: "Put an
|
|
3
|
+
description: "Put an eve agent behind a browser chat UI with useEveAgent."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
The frontend helpers put a browser chat or agent UI on top of an
|
|
6
|
+
The frontend helpers put a browser chat or agent UI on top of an eve agent. `useEveAgent()` opens a durable session, sends turns, streams the reply back, and turns the raw event stream into render-ready state. React is the reference implementation; [Vue](./use-eve-agent-vue) and [Svelte](./use-eve-agent-svelte) ship the same surface.
|
|
7
7
|
|
|
8
8
|
## The integration model
|
|
9
9
|
|
|
10
|
-
A browser UI is a client of the agent's HTTP routes (the [
|
|
10
|
+
A browser UI is a client of the agent's HTTP routes (the [eve channel](../../channels/overview)). Two layers wire it up:
|
|
11
11
|
|
|
12
|
-
- **The framework integration** mounts the
|
|
13
|
-
- **The hook** (`useEveAgent`) holds the session state, streaming, errors, and composer status. It defaults to same-origin
|
|
12
|
+
- **The framework integration** mounts the eve routes on your app's origin, so the browser never crosses a CORS boundary or reads an env var to find the agent. Pick yours: [Next.js](./nextjs) (`withEve`), [Nuxt](./nuxt) (the `eve/nuxt` module), or [SvelteKit](./sveltekit) (the `eveSvelteKit` Vite plugin). On any other stack the hook talks to same-origin `/eve/v1/*` routes directly, or you pass an explicit `host`.
|
|
13
|
+
- **The hook** (`useEveAgent`) holds the session state, streaming, errors, and composer status. It defaults to same-origin eve routes such as `/eve/v1/session`.
|
|
14
14
|
|
|
15
15
|
The per-framework pages below walk through the wiring step by step: [Next.js](./nextjs), [Nuxt](./nuxt), and [SvelteKit](./sveltekit).
|
|
16
16
|
|
|
@@ -66,7 +66,7 @@ export function Chat() {
|
|
|
66
66
|
| `data` | Projected UI state from the reducer. Defaults to `{ messages }`. |
|
|
67
67
|
| `status` | `"ready"`, `"submitted"`, `"streaming"`, or `"error"`. Drives the composer. |
|
|
68
68
|
| `error` | The last `Error` thrown, if any. |
|
|
69
|
-
| `events` | Raw
|
|
69
|
+
| `events` | Raw eve stream events for this session. |
|
|
70
70
|
| `session` | Serializable session cursor (`sessionId`, `continuationToken`, `streamIndex`). |
|
|
71
71
|
| `send` | Send text or the full turn payload (multi-part messages, HITL responses). |
|
|
72
72
|
| `stop` | Abort the active request. |
|
|
@@ -100,7 +100,7 @@ Assistant text, reasoning, tool calls, and tool results stream into `data` as th
|
|
|
100
100
|
|
|
101
101
|
## Human-in-the-loop prompts
|
|
102
102
|
|
|
103
|
-
Tools opt into approval with `needsApproval
|
|
103
|
+
Tools opt into approval with `needsApproval`, and the model can also ask a question with `ask_question` — see [Human-in-the-loop](../../tools/human-in-the-loop) for the server-side model. Either way the stream emits an `input.requested` event, and the pending request rides on a `dynamic-tool` part of the latest message at `part.toolMetadata?.eve?.inputRequest`. Read it, then answer through the same session with `send()`:
|
|
104
104
|
|
|
105
105
|
```tsx
|
|
106
106
|
const request = agent.data.messages
|
|
@@ -115,7 +115,7 @@ if (request) {
|
|
|
115
115
|
}
|
|
116
116
|
```
|
|
117
117
|
|
|
118
|
-
`request.prompt` and `request.options` give you what you need to render the approve and deny UI. The default reducer marks the part as responded immediately, then updates it again once
|
|
118
|
+
`request.prompt` and `request.options` give you what you need to render the approve and deny UI. The default reducer marks the part as responded immediately, then updates it again once eve streams the resumed result.
|
|
119
119
|
|
|
120
120
|
## Attach page context per turn
|
|
121
121
|
|
|
@@ -143,7 +143,7 @@ const agent = useEveAgent({
|
|
|
143
143
|
|
|
144
144
|
On top of `onSessionChange`, the hook takes a few per-turn callbacks:
|
|
145
145
|
|
|
146
|
-
- `onEvent(event)`: fires for each
|
|
146
|
+
- `onEvent(event)`: fires for each eve stream event as it arrives.
|
|
147
147
|
- `onError(error)`: fires with the last `Error` when a turn fails.
|
|
148
148
|
- `onFinish(snapshot)`: fires with the final `{ data, status, session, ... }` snapshot once a turn settles.
|
|
149
149
|
|
|
@@ -157,7 +157,7 @@ const agent = useEveAgent({
|
|
|
157
157
|
|
|
158
158
|
Two more options tune turn behavior:
|
|
159
159
|
|
|
160
|
-
- `optimistic` (default `true`): projects submitted user messages into `data` before
|
|
160
|
+
- `optimistic` (default `true`): projects submitted user messages into `data` before eve confirms them with a `message.received` event. These are reducer-facing projection events only. `events` stays the authoritative eve stream.
|
|
161
161
|
- `maxReconnectAttempts` (default `3`): stream reconnection budget per turn.
|
|
162
162
|
|
|
163
163
|
## Custom reducer
|
|
@@ -182,7 +182,7 @@ const agent = useEveAgent({ reducer: toolCounter });
|
|
|
182
182
|
// agent.data is ToolLog
|
|
183
183
|
```
|
|
184
184
|
|
|
185
|
-
`reduce(data, event)` receives both authoritative
|
|
185
|
+
`reduce(data, event)` receives both authoritative eve stream events and client projection events (`client.message.submitted`, `client.message.failed`, `client.input.responded`). Handle the client events too if you want optimistic and HITL state in your projection. Otherwise, return `data` unchanged for them.
|
|
186
186
|
|
|
187
187
|
## Resumable sessions
|
|
188
188
|
|
|
@@ -206,7 +206,7 @@ Store the full `session` object (`sessionId`, `continuationToken`, `streamIndex`
|
|
|
206
206
|
|
|
207
207
|
## Custom hosts and headers
|
|
208
208
|
|
|
209
|
-
Pass `host` when the
|
|
209
|
+
Pass `host` when the eve server isn't same-origin, and pass `auth` or `headers` when the channel needs credentials. Function values are re-resolved before every HTTP request, reconnects included:
|
|
210
210
|
|
|
211
211
|
```tsx
|
|
212
212
|
const agent = useEveAgent({
|
|
@@ -231,4 +231,4 @@ const agent = useEveAgent({
|
|
|
231
231
|
- [Sessions, runs & streaming](../../concepts/sessions-runs-and-streaming): the event stream and session cursor
|
|
232
232
|
- [Channels](../../channels/overview): the HTTP routes the hook talks to
|
|
233
233
|
- [TypeScript SDK](../client/overview): the lower-level client underneath the frontend hooks
|
|
234
|
-
- [Next.js](./nextjs): step-by-step setup for wiring
|
|
234
|
+
- [Next.js](./nextjs): step-by-step setup for wiring eve into a Next.js app
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "SvelteKit"
|
|
3
|
-
description: "Run an
|
|
3
|
+
description: "Run an eve agent and a SvelteKit app as one project with the eveSvelteKit Vite plugin."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
`eve/sveltekit` runs a SvelteKit frontend and an
|
|
6
|
+
`eve/sveltekit` runs a SvelteKit frontend and an eve agent as one project instead of two services. The `eveSvelteKit()` Vite plugin puts both on one dev server and one Vercel deploy, and [`useEveAgent`](./use-eve-agent-svelte) finds the mounted routes on its own. There's no CORS to configure and no URL env vars to keep in sync.
|
|
7
7
|
|
|
8
8
|
## Prerequisites
|
|
9
9
|
|
|
10
10
|
- The `eve` package installed in your project (`npm install eve@latest`).
|
|
11
|
-
- An existing
|
|
11
|
+
- An existing eve agent directory. If you don't have one, start from [Getting started](../../getting-started).
|
|
12
12
|
- A SvelteKit app to mount the agent in.
|
|
13
13
|
|
|
14
14
|
## Register the Vite plugin
|
|
@@ -69,7 +69,7 @@ With the plugin in `vite.config.ts`, components call [`useEveAgent`](./use-eve-a
|
|
|
69
69
|
</form>
|
|
70
70
|
```
|
|
71
71
|
|
|
72
|
-
The default
|
|
72
|
+
The default eve channel is fail-closed. With no `agent/channels/eve.ts` authored, eve registers `eveChannel({ auth: [localDev(), vercelOidc()] })`: `localDev()` opens the routes on localhost, `vercelOidc()` admits Vercel OIDC callers in production, and everything else gets a `401`. To set your own auth policy, add `agent/channels/eve.ts`:
|
|
73
73
|
|
|
74
74
|
```ts title="agent/channels/eve.ts"
|
|
75
75
|
import { eveChannel } from "eve/channels/eve";
|
|
@@ -82,8 +82,8 @@ For a public demo, use `none()` (also from `eve/channels/auth`) to skip authenti
|
|
|
82
82
|
|
|
83
83
|
## Dev vs deploy topology
|
|
84
84
|
|
|
85
|
-
- **Local dev.** `npm run dev` boots the
|
|
86
|
-
- **Vercel.** The SvelteKit app and the
|
|
85
|
+
- **Local dev.** `npm run dev` boots the eve dev server next to SvelteKit and proxies the eve routes to it, so the browser only ever hits the SvelteKit origin. `npm run build && npm run preview` behaves the same way: the preview server gets its own eve route proxy and either reuses the shared eve server or starts one.
|
|
86
|
+
- **Vercel.** The SvelteKit app and the eve runtime deploy as a single project. The web app is public; the eve runtime sits behind it on the same origin. Use `eveBuildCommand` for a project-specific agent build:
|
|
87
87
|
|
|
88
88
|
```ts
|
|
89
89
|
export default defineConfig({
|
|
@@ -96,7 +96,7 @@ For a public demo, use `none()` (also from `eve/channels/auth`) to skip authenti
|
|
|
96
96
|
});
|
|
97
97
|
```
|
|
98
98
|
|
|
99
|
-
- **Non-Vercel hosts.** When the
|
|
99
|
+
- **Non-Vercel hosts.** When the eve service runs on a separate origin, pass `host` directly to `useEveAgent`:
|
|
100
100
|
|
|
101
101
|
```ts
|
|
102
102
|
const agent = useEveAgent({
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "useEveAgent (Svelte)"
|
|
3
|
-
description: "Svelte 5 binding that drives an
|
|
3
|
+
description: "Svelte 5 binding that drives an eve agent session from the browser."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
`useEveAgent()` from `eve/svelte` is the browser side of an
|
|
6
|
+
`useEveAgent()` from `eve/svelte` is the browser side of an eve session in a Svelte 5 app. Call it once for a long-lived session you can send turns to, with every stream event projected into rune-friendly reactive data. On SvelteKit, the [Vite plugin](./sveltekit) wires up the routes. The [frontend overview](./overview) covers the model shared across frameworks.
|
|
7
7
|
|
|
8
8
|
## Basic usage
|
|
9
9
|
|
|
@@ -117,7 +117,7 @@ const agent = useEveAgent({
|
|
|
117
117
|
|
|
118
118
|
## Custom host and credentials
|
|
119
119
|
|
|
120
|
-
Point `host` at an
|
|
120
|
+
Point `host` at an eve server on a different origin, and pass credentials through `auth` or `headers`. When you supply a function, it re-resolves before every request:
|
|
121
121
|
|
|
122
122
|
```ts
|
|
123
123
|
const agent = useEveAgent({
|
|
@@ -154,7 +154,7 @@ const agent = useEveAgent({
|
|
|
154
154
|
|
|
155
155
|
The binding takes a few per-turn callbacks:
|
|
156
156
|
|
|
157
|
-
- `onEvent(event)`: fires for each
|
|
157
|
+
- `onEvent(event)`: fires for each eve stream event as it arrives.
|
|
158
158
|
- `onError(error)`: fires with the last `Error` when a turn fails.
|
|
159
159
|
- `onFinish(snapshot)`: fires with the final snapshot once a turn settles.
|
|
160
160
|
- `onSessionChange(session)`: fires when the session cursor advances. Persist it to resume across reloads.
|
|
@@ -169,7 +169,7 @@ const agent = useEveAgent({
|
|
|
169
169
|
|
|
170
170
|
Two more options tune turn behavior:
|
|
171
171
|
|
|
172
|
-
- `optimistic` (default `true`): projects submitted user messages into `data` before
|
|
172
|
+
- `optimistic` (default `true`): projects submitted user messages into `data` before eve confirms them with a `message.received` event. These are reducer-facing projection events only; `events` stays the authoritative eve stream.
|
|
173
173
|
- `maxReconnectAttempts` (default `3`): stream reconnection budget per turn.
|
|
174
174
|
|
|
175
175
|
## Custom reducer
|
|
@@ -194,7 +194,7 @@ const agent = useEveAgent({ reducer: toolCounter });
|
|
|
194
194
|
// agent.data is ToolLog
|
|
195
195
|
```
|
|
196
196
|
|
|
197
|
-
`reduce(data, event)` receives both authoritative
|
|
197
|
+
`reduce(data, event)` receives both authoritative eve stream events and client projection events (`client.message.submitted`, `client.message.failed`, `client.input.responded`). Handle the client events too if you want optimistic and HITL state in your projection. Otherwise, return `data` unchanged for them.
|
|
198
198
|
|
|
199
199
|
## What to read next
|
|
200
200
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "useEveAgent (Vue)"
|
|
3
|
-
description: "Vue composable that drives an
|
|
3
|
+
description: "Vue composable that drives an eve agent session from the browser."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
`useEveAgent()` from `eve/vue` is how a Vue app talks to an
|
|
6
|
+
`useEveAgent()` from `eve/vue` is how a Vue app talks to an eve session. It opens a long-lived session, sends turns, and folds every stream event into reactive data you can bind in a template. Nuxt auto-imports it through the [module](./nuxt), and the [frontend overview](./overview) covers the shared model.
|
|
7
7
|
|
|
8
8
|
## Basic usage
|
|
9
9
|
|
|
@@ -130,7 +130,7 @@ const agent = useEveAgent({
|
|
|
130
130
|
|
|
131
131
|
## Custom host and credentials
|
|
132
132
|
|
|
133
|
-
When your
|
|
133
|
+
When your eve server lives somewhere other than the same origin, point at it with `host` and attach credentials through `auth` or `headers`. Pass a function and it re-resolves before each request:
|
|
134
134
|
|
|
135
135
|
```ts
|
|
136
136
|
const agent = useEveAgent({
|
|
@@ -167,7 +167,7 @@ const agent = useEveAgent({
|
|
|
167
167
|
|
|
168
168
|
The composable takes a few per-turn callbacks:
|
|
169
169
|
|
|
170
|
-
- `onEvent(event)`: fires for each
|
|
170
|
+
- `onEvent(event)`: fires for each eve stream event as it arrives.
|
|
171
171
|
- `onError(error)`: fires with the last `Error` when a turn fails.
|
|
172
172
|
- `onFinish(snapshot)`: fires with the final snapshot once a turn settles.
|
|
173
173
|
- `onSessionChange(session)`: fires when the session cursor advances. Persist it to resume across reloads.
|
|
@@ -182,7 +182,7 @@ const agent = useEveAgent({
|
|
|
182
182
|
|
|
183
183
|
Two more options tune turn behavior:
|
|
184
184
|
|
|
185
|
-
- `optimistic` (default `true`): projects submitted user messages into `data` before
|
|
185
|
+
- `optimistic` (default `true`): projects submitted user messages into `data` before eve confirms them with a `message.received` event. These are reducer-facing projection events only; `events` stays the authoritative eve stream.
|
|
186
186
|
- `maxReconnectAttempts` (default `3`): stream reconnection budget per turn.
|
|
187
187
|
|
|
188
188
|
## Custom reducer
|
|
@@ -207,7 +207,7 @@ const agent = useEveAgent({ reducer: toolCounter });
|
|
|
207
207
|
// agent.data.value is ToolLog
|
|
208
208
|
```
|
|
209
209
|
|
|
210
|
-
`reduce(data, event)` receives both authoritative
|
|
210
|
+
`reduce(data, event)` receives both authoritative eve stream events and client projection events (`client.message.submitted`, `client.message.failed`, `client.input.responded`). Handle the client events too if you want optimistic and HITL state in your projection. Otherwise, return `data` unchanged for them.
|
|
211
211
|
|
|
212
212
|
## What to read next
|
|
213
213
|
|
package/docs/guides/hooks.md
CHANGED
|
@@ -3,7 +3,7 @@ title: "Hooks"
|
|
|
3
3
|
description: "Subscribe to runtime stream events from agent/hooks/."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
Hooks are
|
|
6
|
+
Hooks are eve's authored extension points for the runtime event stream. A hook subscribes to stream events and runs side effects after each event is durably recorded, such as audit logging, metrics and alerting, or persisting every session and message to your own database for analytics. Reach for one to observe what the agent does without writing a tool, a context provider (a value made available across a step), or a channel adapter handler (a handler defined on a channel's adapter; see [Channels](../channels)).
|
|
7
7
|
|
|
8
8
|
## Define a hook
|
|
9
9
|
|
|
@@ -83,7 +83,7 @@ Hooks always run after the event is durably recorded, so if a hook throws, the s
|
|
|
83
83
|
|
|
84
84
|
## What happens when a hook throws
|
|
85
85
|
|
|
86
|
-
A thrown handler propagates through the emit composer and surfaces as `turn.failed`. If a hook subscribed to a failure-cascade event also throws, it escalates to `session.failed`. For belt-and-suspenders semantics inside a hook, wrap the body in `try`/`catch`.
|
|
86
|
+
A thrown handler propagates through the emit composer and surfaces as `turn.failed`. If a hook subscribed to a failure-cascade event also throws, it escalates to `session.failed`. For belt-and-suspenders semantics inside a hook, wrap the body in `try`/`catch`. eve treats a thrown hook as a real failure.
|
|
87
87
|
|
|
88
88
|
## Subagent isolation
|
|
89
89
|
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "instrumentation.ts"
|
|
3
|
-
description: "Trace an agent with OpenTelemetry in instrumentation.ts, read the workflow run tags
|
|
3
|
+
description: "Trace an agent with OpenTelemetry in instrumentation.ts, read the workflow run tags eve emits, and debug discovery with eve info and the common-failures table."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
`instrumentation.ts` is where you configure how an
|
|
6
|
+
`instrumentation.ts` is where you configure how an eve agent is observed. The framework auto-discovers `agent/instrumentation.ts` and runs it at server startup before any agent code. Its presence implicitly enables telemetry, so there is no separate `isEnabled` toggle.
|
|
7
7
|
|
|
8
8
|
If you intend to export telemetry, review the exporter destination, data categories, and required legal approvals before enabling telemetry.
|
|
9
9
|
|
|
10
10
|
## Three observability surfaces
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
eve observes an agent through three distinct surfaces. They do not all live in this file, and they write to different places:
|
|
13
13
|
|
|
14
14
|
| Surface | Configured in `instrumentation.ts`? | What it is |
|
|
15
15
|
| -------------------------------- | ----------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
@@ -17,7 +17,7 @@ Eve observes an agent through three distinct surfaces. They do not all live in t
|
|
|
17
17
|
| **OpenTelemetry export** | Yes: `setup`, `recordInputs`, `recordOutputs`, `functionId` | Where AI SDK spans are exported and what they record. |
|
|
18
18
|
| **Runtime context events** | Yes: `events["step.started"]` | Per-model-call values written into the AI SDK's runtime context, which the AI SDK carries onto its spans. |
|
|
19
19
|
|
|
20
|
-
The two configurable surfaces send AI SDK spans to your OpenTelemetry backend. Workflow run tags are a separate system, queryable in the Workflow dashboard rather than on your OTel spans. The sections below cover what you configure here; [Workflow run tags](#workflow-run-tags) documents what
|
|
20
|
+
The two configurable surfaces send AI SDK spans to your OpenTelemetry backend. Workflow run tags are a separate system, queryable in the Workflow dashboard rather than on your OTel spans. The sections below cover what you configure here; [Workflow run tags](#workflow-run-tags) documents what eve emits on its own.
|
|
21
21
|
|
|
22
22
|
## Define instrumentation
|
|
23
23
|
|
|
@@ -60,7 +60,7 @@ The third configurable surface, [runtime context events](#runtime-context), atta
|
|
|
60
60
|
|
|
61
61
|
## Runtime context
|
|
62
62
|
|
|
63
|
-
_Runtime context_ is an [AI SDK concept](https://ai-sdk.dev/docs/reference/ai-sdk-core/stream-text): a user-defined object that flows through a generation lifecycle.
|
|
63
|
+
_Runtime context_ is an [AI SDK concept](https://ai-sdk.dev/docs/reference/ai-sdk-core/stream-text): a user-defined object that flows through a generation lifecycle. eve exposes it through `events["step.started"]`, a callback that runs once eve has assembled the model input for an attempt and returns `{ runtimeContext }`. Because eve registers the AI SDK's OpenTelemetry integration with runtime context enabled, those returned values ride onto the model-call span and its children. The field is named `runtimeContext`, not `metadata`, because AI SDK v7 carries per-call attributes on runtime context rather than a dedicated metadata field.
|
|
64
64
|
|
|
65
65
|
Use it when the values depend on the current session, turn, step, channel, or model input:
|
|
66
66
|
|
|
@@ -94,7 +94,7 @@ The callback receives:
|
|
|
94
94
|
- `channel`: the channel's `kind` and the metadata projected by the active channel
|
|
95
95
|
- `modelInput`: the final instructions and messages passed to the model call
|
|
96
96
|
|
|
97
|
-
A channel exposes its identity through `kind`, the discriminant you narrow on. For authored channels it is `channel:<name>`, where `<name>` is the channel's filename under `agent/channels/`, so `agent/channels/support.ts` is `channel:support`. Framework channels use `http`, `schedule`, or `subagent`, and an unrecognized or absent kind normalizes to `unknown`. The kind is also emitted as the `eve.channel.kind` span attribute.
|
|
97
|
+
A channel exposes its identity through `kind`, the discriminant you narrow on. For authored channels it is `channel:<name>`, where `<name>` is the channel's filename under `agent/channels/`, so `agent/channels/support.ts` is `channel:support`. Framework channels use `http`, `schedule`, or `subagent`, and an unrecognized or absent kind normalizes to `unknown`. The kind is also emitted as the `eve.channel.kind` span attribute. eve emits compiler-owned typings keyed by the channel filename, so you can narrow either by checking `input.channel.kind === "channel:support"` or by using `isChannel(input.channel, supportChannel)`.
|
|
98
98
|
|
|
99
99
|
Channel metadata is channel-owned. Built-in channels expose only the fields they choose to make observable; Slack, for example, projects `channelId`, `teamId`, `threadTs`, and `triggeringUserId` from its durable channel state. User-authored channels expose their own projection by returning `metadata(state)` from `defineChannel`. Runtime instrumentation never falls back to raw channel state.
|
|
100
100
|
|
|
@@ -113,11 +113,11 @@ ai.eve.turn {eve.session.id}
|
|
|
113
113
|
+-- ai.streamText step 3 (final text)
|
|
114
114
|
```
|
|
115
115
|
|
|
116
|
-
|
|
116
|
+
eve creates the `ai.eve.turn` parent span per turn and passes enriched telemetry to the AI SDK so model calls and tool executions are traced automatically. Session, turn, step, and channel context is injected as the framework half of the runtime context (`eve.version`, `eve.session.id`, `eve.environment`, `eve.turn.id`, `eve.turn.sequence`, `eve.step.index`, `eve.channel.kind`) and rides onto the spans alongside any values your `events["step.started"]` callback returns under `runtimeContext`.
|
|
117
117
|
|
|
118
118
|
## Workflow run tags
|
|
119
119
|
|
|
120
|
-
Separately from OpenTelemetry,
|
|
120
|
+
Separately from OpenTelemetry, eve tags every workflow run with reserved `$eve.*` attributes. These live on the Vercel Workflow run, queryable in the Workflow dashboard, not on OTel spans, and you do not configure them: they are framework-owned and emitted automatically on every session, turn, and subagent run, whether or not an `instrumentation.ts` file is present. Authored code cannot set or override the `$eve.` namespace.
|
|
121
121
|
|
|
122
122
|
They let a dashboard reconstruct the tree of runs behind a single agent invocation and surface model and token usage without reading run bodies.
|
|
123
123
|
|
|
@@ -144,14 +144,14 @@ Note: By default, telemetry records full message history and model outputs You m
|
|
|
144
144
|
|
|
145
145
|
## Debugging
|
|
146
146
|
|
|
147
|
-
`eve info` is the fastest way to see what
|
|
147
|
+
`eve info` is the fastest way to see what eve actually picked up: the active tools, skills, subagents, schedules, routes, and discovery diagnostics. eve also writes inspectable artifacts under `.eve/`, kept even when discovery hits errors:
|
|
148
148
|
|
|
149
149
|
| Artifact | Tells you |
|
|
150
150
|
| ------------------------------- | ------------------------------------------- |
|
|
151
|
-
| `agent-discovery-manifest.json` | what
|
|
151
|
+
| `agent-discovery-manifest.json` | what eve found on disk |
|
|
152
152
|
| `diagnostics.json` | authored-shape errors and warnings |
|
|
153
|
-
| `compiled-agent-manifest.json` | the serialized surface
|
|
154
|
-
| `module-map.mjs` | compiled module entrypoints
|
|
153
|
+
| `compiled-agent-manifest.json` | the serialized surface eve loads at runtime |
|
|
154
|
+
| `module-map.mjs` | compiled module entrypoints eve imports |
|
|
155
155
|
|
|
156
156
|
When `eve build` fails on discovery errors, the CLI prints the full diagnostics report (severity, message, source path) and the path to the diagnostics artifact.
|
|
157
157
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Remote Agents"
|
|
3
|
-
description: "Call another
|
|
3
|
+
description: "Call another eve deployment as a subagent with defineRemoteAgent: same lowered tool shape, outbound auth, durable callback dispatch."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
`defineRemoteAgent` calls a separately deployed
|
|
6
|
+
`defineRemoteAgent` calls a separately deployed eve agent as if it were a local subagent. Reach for it when the specialist you delegate to is a separately owned agent behind its own URL rather than a directory in your repo.
|
|
7
7
|
|
|
8
8
|
The file lives under `agent/subagents/`, so its tool name is derived from the path. There's no `name` field.
|
|
9
9
|
|
|
@@ -22,7 +22,7 @@ export default defineRemoteAgent({
|
|
|
22
22
|
|
|
23
23
|
| Parameter | Type | Required | Default | Description |
|
|
24
24
|
| -------------- | ------------------------------- | -------- | ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
25
|
-
| `url` | `string` | Yes | n/a | Base URL of the remote
|
|
25
|
+
| `url` | `string` | Yes | n/a | Base URL of the remote eve deployment to call. |
|
|
26
26
|
| `description` | `string` | Yes | n/a | Model-visible delegation description. |
|
|
27
27
|
| `auth` | `OutboundAuthFn` | No | none | Outbound auth hook from `eve/agents/auth`. |
|
|
28
28
|
| `headers` | `HeadersValue` | No | none | Static or lazily resolved request headers. |
|
|
@@ -43,7 +43,7 @@ A remote agent lowers to the same `{ message, outputSchema? }` tool shape as a l
|
|
|
43
43
|
| `bearer(token)` | `Authorization: Bearer <token>` (static or lazily resolved) |
|
|
44
44
|
| `basic({ username, password })` | `Authorization: Basic …` |
|
|
45
45
|
|
|
46
|
-
If you are calling another Vercel-deployed
|
|
46
|
+
If you are calling another Vercel-deployed eve agent, reach for `vercelOidc()`. The remote verifies the OIDC token to authorize the caller. See [Auth & route protection](./auth-and-route-protection) for the receiving side.
|
|
47
47
|
|
|
48
48
|
## How remote dispatch and callbacks work
|
|
49
49
|
|
|
@@ -3,7 +3,7 @@ title: "Session Context"
|
|
|
3
3
|
description: "Runtime helpers: ctx.session, ctx.getSandbox, ctx.getSkill, and defineState."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
eve exposes runtime state through the `ctx` parameter passed to tool `execute`, hook handlers, and channel event handlers:
|
|
7
7
|
|
|
8
8
|
- `ctx.session`: session metadata, turn, auth, and parent lineage
|
|
9
9
|
- `ctx.getSandbox()`: live sandbox handle for the current agent
|
|
@@ -66,7 +66,7 @@ const result = await sandbox.run({ command: "npm test" });
|
|
|
66
66
|
Behavior:
|
|
67
67
|
|
|
68
68
|
- It takes no arguments. Each agent has exactly one sandbox.
|
|
69
|
-
- It is async because
|
|
69
|
+
- It is async because eve binds or restores sandbox state lazily.
|
|
70
70
|
- It only works when sandbox access is attached to the active runtime path.
|
|
71
71
|
- Visibility is node-local. A subagent sees its own sandbox, not the parent's.
|
|
72
72
|
|
|
@@ -119,7 +119,7 @@ export const budget = defineState<BudgetState>("myapp.budget", () => ({
|
|
|
119
119
|
Safe places:
|
|
120
120
|
|
|
121
121
|
- inside `defineTool(...).execute(input, ctx)`
|
|
122
|
-
- inside authored callbacks
|
|
122
|
+
- inside authored callbacks eve runs inside the runtime
|
|
123
123
|
- after asynchronous boundaries inside the same authored execution chain
|
|
124
124
|
|
|
125
125
|
Unsafe places:
|
|
@@ -128,7 +128,7 @@ Unsafe places:
|
|
|
128
128
|
- build scripts
|
|
129
129
|
- discovery-time code paths
|
|
130
130
|
|
|
131
|
-
If you call them outside an active
|
|
131
|
+
If you call them outside an active eve runtime context, they throw immediately with a message explaining the required scope.
|
|
132
132
|
|
|
133
133
|
## How it works
|
|
134
134
|
|
package/docs/guides/state.md
CHANGED
|
@@ -42,7 +42,7 @@ export default defineTool({
|
|
|
42
42
|
});
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
`get()` and `update()` require an active
|
|
45
|
+
`get()` and `update()` require an active eve context. Calling them outside tools, hooks, or framework-managed code throws.
|
|
46
46
|
|
|
47
47
|
## Reset state between turns
|
|
48
48
|
|
package/docs/instructions.mdx
CHANGED
|
@@ -3,7 +3,7 @@ title: "Instructions"
|
|
|
3
3
|
description: "Author the agent's always-on system prompt with instructions.md or instructions.ts."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
Instructions are the always-on system prompt, the agent's permanent identity rather than a procedure it pulls in when the moment calls for it. Use them for anything that should hold on every turn, such as a rule, a persona, or a constraint.
|
|
6
|
+
Instructions are the always-on system prompt, the agent's permanent identity rather than a procedure it pulls in when the moment calls for it. Use them for anything that should hold on every turn, such as a rule, a persona, or a constraint. eve prepends the instructions to every model call in the session.
|
|
7
7
|
|
|
8
8
|
## Author instructions
|
|
9
9
|
|
|
@@ -28,11 +28,11 @@ export default defineInstructions({
|
|
|
28
28
|
});
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
-
`defineInstructions` takes one field, `markdown`, the resolved prompt text. A module-backed prompt runs once at build time.
|
|
31
|
+
`defineInstructions` takes one field, `markdown`, the resolved prompt text. A module-backed prompt runs once at build time. eve captures the resulting markdown into the compiled manifest, so the runtime serves the same prompt every session and never re-runs the module.
|
|
32
32
|
|
|
33
33
|
## Split instructions across a directory
|
|
34
34
|
|
|
35
|
-
For more than one file, add an `agent/instructions/` directory.
|
|
35
|
+
For more than one file, add an `agent/instructions/` directory. eve reads its entries non-recursively and accepts both `.md` files and `.ts` modules (a `.ts` file can wrap `defineInstructions` or `defineDynamic`). Entries combine in alphabetical order by filename (`localeCompare`).
|
|
36
36
|
|
|
37
37
|
A flat `agent/instructions.md` (or `.ts`) at the agent root and the directory can coexist. The root file's content comes first, then the sorted directory entries. You cannot author both `instructions.md` and `instructions.ts` at the root; that pairing is a build error.
|
|
38
38
|
|
|
@@ -57,7 +57,7 @@ To resolve the prompt at runtime from session context (auth, tenant, or channel)
|
|
|
57
57
|
|
|
58
58
|
As the deployer, it is your responsibility to ensure your agent complies with applicable laws.
|
|
59
59
|
|
|
60
|
-
Where an
|
|
60
|
+
Where an eve agent communicates with people, you may be required to disclose that they are interacting with an automated AI system where law requires it. eve does not add this disclosure automatically; configure it in your instructions and/or channel responses.
|
|
61
61
|
|
|
62
62
|
## What to read next
|
|
63
63
|
|
package/docs/introduction.mdx
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Introduction"
|
|
3
|
-
description: "How an
|
|
3
|
+
description: "How an eve agent is laid out as files, what runs when a message arrives, and the building blocks you add as it grows."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
eve is a framework for building durable agents as ordinary files in a TypeScript project.
|
|
7
7
|
|
|
8
|
-
Instead of one large configuration object, each part of your agent gets a clear home. Instructions go in one file, tools in one folder, channels in another.
|
|
8
|
+
Instead of one large configuration object, each part of your agent gets a clear home. Instructions go in one file, tools in one folder, channels in another. eve discovers that structure and turns it into an agent that runs locally, serves HTTP, connects to other platforms, and keeps working across many turns.
|
|
9
9
|
|
|
10
10
|
<Callout>
|
|
11
|
-
|
|
11
|
+
eve is currently in beta and subject to the [Vercel beta
|
|
12
|
+
terms](https://vercel.com/docs/release-phases/public-beta-agreement); the framework, APIs,
|
|
13
|
+
documentation, and behavior may change before general availability.
|
|
12
14
|
</Callout>
|
|
13
15
|
|
|
14
|
-
## An
|
|
16
|
+
## An eve project at a glance
|
|
15
17
|
|
|
16
|
-
A small
|
|
18
|
+
A small eve app looks like this:
|
|
17
19
|
|
|
18
20
|
```text
|
|
19
21
|
my-agent/
|
|
@@ -29,7 +31,7 @@ my-agent/
|
|
|
29
31
|
└── slack.ts
|
|
30
32
|
```
|
|
31
33
|
|
|
32
|
-
You can understand most
|
|
34
|
+
You can understand most eve projects by reading that tree:
|
|
33
35
|
|
|
34
36
|
- `instructions.md` tells the agent who it is and how it should behave.
|
|
35
37
|
- [`agent.ts`](./agent-config) chooses the model and configures runtime options.
|
|
@@ -41,7 +43,7 @@ Start with only `instructions.md` and `agent.ts`. Add the other folders when the
|
|
|
41
43
|
|
|
42
44
|
## The files are the interface
|
|
43
45
|
|
|
44
|
-
|
|
46
|
+
eve is [filesystem-first](./reference/project-layout). A file's location says what it does, and its path usually gives it a name. For example, this file:
|
|
45
47
|
|
|
46
48
|
```text
|
|
47
49
|
agent/tools/get_weather.ts
|
|
@@ -62,17 +64,17 @@ export default defineTool({
|
|
|
62
64
|
});
|
|
63
65
|
```
|
|
64
66
|
|
|
65
|
-
There is no separate registry to keep in sync. Add the file and
|
|
67
|
+
There is no separate registry to keep in sync. Add the file and eve discovers it; move or rename it and its identity moves with it. See [Tools](./tools) for the complete API.
|
|
66
68
|
|
|
67
69
|
## What happens when a message arrives
|
|
68
70
|
|
|
69
|
-
The same flow runs whether a message comes from a web app, the terminal, or Slack.
|
|
71
|
+
The same flow runs whether a message comes from a web app, the terminal, or Slack. eve turns the platform input into a message, gives the model its instructions, skills, tools, and conversation history, runs the work (calling tools and subagents as needed), saves the session and streams events, then delivers the result back in the form the platform expects.
|
|
70
72
|
|
|
71
73
|
That keeps agent behavior portable. Your weather tool does not need to know whether the question came from a browser or from Slack.
|
|
72
74
|
|
|
73
75
|
## Durable by default
|
|
74
76
|
|
|
75
|
-
An
|
|
77
|
+
An eve session is more than one request and one response. It can:
|
|
76
78
|
|
|
77
79
|
- Stream progress while work is happening
|
|
78
80
|
- Call tools and subagents
|
|
@@ -80,7 +82,7 @@ An Eve session is more than one request and one response. It can:
|
|
|
80
82
|
- Resume after that answer arrives
|
|
81
83
|
- Keep durable state across turns
|
|
82
84
|
|
|
83
|
-
Under the hood,
|
|
85
|
+
Under the hood, eve uses the open-source [Workflow SDK](https://workflow-sdk.dev) to make sessions durable, resumable, and crash-safe. eve handles that machinery so your tools focus on the work itself.
|
|
84
86
|
|
|
85
87
|
## Grow the project by adding capabilities
|
|
86
88
|
|
package/docs/reference/cli.md
CHANGED
|
@@ -65,11 +65,11 @@ Useful artifacts written under `.eve/` (preserved even on partial failure):
|
|
|
65
65
|
|
|
66
66
|
| Artifact | Description |
|
|
67
67
|
| ---------------------------------------------- | ---------------------------------------------------- |
|
|
68
|
-
| `.eve/discovery/agent-discovery-manifest.json` | What
|
|
68
|
+
| `.eve/discovery/agent-discovery-manifest.json` | What eve found on disk |
|
|
69
69
|
| `.eve/discovery/diagnostics.json` | Authored-shape errors and warnings |
|
|
70
|
-
| `.eve/compile/compiled-agent-manifest.json` | The serialized authored surface
|
|
70
|
+
| `.eve/compile/compiled-agent-manifest.json` | The serialized authored surface eve loads at runtime |
|
|
71
71
|
| `.eve/compile/compile-metadata.json` | Build-time metadata and paths |
|
|
72
|
-
| `.eve/compile/module-map.mjs` | Compiled module entrypoints
|
|
72
|
+
| `.eve/compile/module-map.mjs` | Compiled module entrypoints eve imports at runtime |
|
|
73
73
|
|
|
74
74
|
## `eve start`
|
|
75
75
|
|
|
@@ -109,7 +109,7 @@ Pass a bare URL as the only argument and the UI connects to that server instead
|
|
|
109
109
|
| `--context-size <tokens>` | number | none | Model context window size, shown as a usage percentage |
|
|
110
110
|
| `--logs <mode>` | enum | `stderr` | Server/agent logs to show: `all` \| `stderr` \| `sandbox` \| `none` |
|
|
111
111
|
|
|
112
|
-
Local dev writes the active server process ID to `.eve/dev-process.pid`. If another `eve dev` starts for the same agent while that process is still running,
|
|
112
|
+
Local dev writes the active server process ID to `.eve/dev-process.pid`. If another `eve dev` starts for the same agent while that process is still running, eve exits with a message that includes the command to stop the existing server.
|
|
113
113
|
|
|
114
114
|
Local dev keeps immutable runtime source snapshots under `.eve/dev-runtime/snapshots/` so in-flight sessions hold a consistent code revision while new prompts pick up rebuilds. On startup, `eve dev` prunes stale runtime snapshots and old local sandbox templates in the background. For manual cleanup, stop `eve dev` and delete `.eve/dev-runtime/snapshots/` or `.eve/sandbox-cache/local/templates/`.
|
|
115
115
|
|
|
@@ -119,7 +119,7 @@ Local dev keeps immutable runtime source snapshots under `.eve/dev-runtime/snaps
|
|
|
119
119
|
eve link
|
|
120
120
|
```
|
|
121
121
|
|
|
122
|
-
Links the current directory to an existing Vercel project. You select a team and then a project, and
|
|
122
|
+
Links the current directory to an existing Vercel project. You select a team and then a project, and eve pulls the project's environment so an AI Gateway credential (`VERCEL_OIDC_TOKEN` or `AI_GATEWAY_API_KEY`) lands in `.env.local`, then verifies one actually did. Running it again re-links: the pickers always run, and the new choice wins. The command is interactive only; in CI, use `vercel link --project <name> --yes` instead. A running `eve dev` reloads env files automatically, so you don't need to restart after the pull.
|
|
123
123
|
|
|
124
124
|
## `eve deploy`
|
|
125
125
|
|
|
@@ -3,7 +3,7 @@ title: "Project Layout"
|
|
|
3
3
|
description: "Authored slots under agent/ and the path-derived naming rule."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
eve builds an agent by walking the filesystem under `agent/`. Each directory is an authored slot, and the slot a file lands in determines how eve loads it.
|
|
7
7
|
|
|
8
8
|
## Naming rule
|
|
9
9
|
|
|
@@ -64,7 +64,7 @@ The Subagents column states whether a local subagent (`subagents/<id>/`) can aut
|
|
|
64
64
|
|
|
65
65
|
## What reaches the runtime workspace
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
eve does not mount the whole tree. Only two sources land in the sandbox workspace:
|
|
68
68
|
|
|
69
69
|
- `skills/` files → `/workspace/skills/...`
|
|
70
70
|
- `agent/sandbox/workspace/**` → `/workspace/...` at session bootstrap
|
|
@@ -111,9 +111,9 @@ my-agent/
|
|
|
111
111
|
|
|
112
112
|
Prefer the nested layout. It keeps the app root separate from the authored surface.
|
|
113
113
|
|
|
114
|
-
## Why didn't
|
|
114
|
+
## Why didn't eve discover my file?
|
|
115
115
|
|
|
116
|
-
Run `eve info`. It lists the discovered surface and prints discovery diagnostics. From there, check that the file sits in the right authored slot (per the slot table above) and that the root-vs-subagent boundary is valid.
|
|
116
|
+
Run `eve info`. It lists the discovered surface and prints discovery diagnostics. From there, check that the file sits in the right authored slot (per the slot table above) and that the root-vs-subagent boundary is valid. eve also writes inspectable artifacts under `.eve/`. See the debugging artifacts in [instrumentation.ts](../guides/instrumentation) and the [CLI](./cli) reference.
|
|
117
117
|
|
|
118
118
|
## What to read next
|
|
119
119
|
|
package/docs/responsible-use.md
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Responsible Use"
|
|
3
|
-
description: "Deployer responsibility and safeguards to review before using
|
|
3
|
+
description: "Deployer responsibility and safeguards to review before using eve with sensitive, regulated, or production data."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
As the deployer, it is your responsibility to ensure your agent complies with applicable laws.
|
|
7
7
|
|
|
8
8
|
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.
|
|
9
9
|
|
|
10
|
-
Before using
|
|
10
|
+
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.
|
|
11
11
|
|
|
12
12
|
Require human approval or other safeguards for sensitive, irreversible, regulated, financial, healthcare, employment, housing, legal, safety-impacting, user-impacting, or external side-effecting actions.
|
|
13
13
|
|
|
14
|
-
Unless you configure stricter controls,
|
|
14
|
+
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.
|