eve 0.15.4 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (124) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/src/chunks/{use-eve-agent-8X2UMr8q.js → use-eve-agent-BEOUv37s.js} +70 -0
  3. package/dist/src/chunks/{use-eve-agent-9ZNiSFMb.js → use-eve-agent-C25KOe9i.js} +70 -0
  4. package/dist/src/cli/commands/init.js +1 -1
  5. package/dist/src/cli/dev/tui/agent-header.js +1 -1
  6. package/dist/src/cli/dev/tui/blocks.js +8 -8
  7. package/dist/src/cli/dev/tui/prompt-command-handler.js +1 -1
  8. package/dist/src/cli/dev/tui/prompt-commands.d.ts +1 -1
  9. package/dist/src/cli/dev/tui/prompt-commands.js +1 -1
  10. package/dist/src/cli/dev/tui/runner.d.ts +10 -3
  11. package/dist/src/cli/dev/tui/runner.js +1 -1
  12. package/dist/src/cli/dev/tui/setup-commands.d.ts +9 -1
  13. package/dist/src/cli/dev/tui/setup-commands.js +2 -2
  14. package/dist/src/cli/dev/tui/setup-flow.d.ts +8 -1
  15. package/dist/src/cli/dev/tui/setup-issues.d.ts +2 -14
  16. package/dist/src/cli/dev/tui/setup-issues.js +1 -1
  17. package/dist/src/cli/dev/tui/setup-panel.d.ts +14 -8
  18. package/dist/src/cli/dev/tui/setup-panel.js +3 -3
  19. package/dist/src/cli/dev/tui/terminal-renderer.js +6 -6
  20. package/dist/src/cli/dev/tui/tui-prompter.js +1 -1
  21. package/dist/src/cli/dev/tui/tui.d.ts +2 -3
  22. package/dist/src/cli/dev/tui/tui.js +1 -1
  23. package/dist/src/cli/dev/ui-options.d.ts +21 -0
  24. package/dist/src/cli/dev/ui-options.js +1 -0
  25. package/dist/src/cli/run.d.ts +6 -42
  26. package/dist/src/cli/run.js +2 -2
  27. package/dist/src/client/authorization-message-parts.d.ts +4 -0
  28. package/dist/src/client/authorization-message-parts.js +1 -0
  29. package/dist/src/client/index.d.ts +2 -2
  30. package/dist/src/client/message-reducer-types.d.ts +40 -1
  31. package/dist/src/client/message-reducer.d.ts +3 -5
  32. package/dist/src/client/message-reducer.js +1 -1
  33. package/dist/src/compiled/.vendor-stamp.json +1 -1
  34. package/dist/src/compiled/@ai-sdk/mcp/index.d.ts +71 -1
  35. package/dist/src/compiled/@ai-sdk/mcp/index.js +1 -1
  36. package/dist/src/harness/emission.d.ts +3 -3
  37. package/dist/src/harness/emission.js +1 -1
  38. package/dist/src/harness/stream-actions.d.ts +17 -0
  39. package/dist/src/harness/stream-actions.js +1 -0
  40. package/dist/src/internal/application/package.js +1 -1
  41. package/dist/src/internal/nitro/host/configure-nitro-routes.js +2 -2
  42. package/dist/src/internal/nitro/host/dev-authored-source-watcher.d.ts +1 -0
  43. package/dist/src/internal/nitro/host/dev-authored-source-watcher.js +1 -1
  44. package/dist/src/internal/nitro/host/start-development-server.d.ts +8 -0
  45. package/dist/src/internal/nitro/host/start-development-server.js +2 -2
  46. package/dist/src/internal/nitro/host.d.ts +1 -1
  47. package/dist/src/internal/nitro/host.js +1 -1
  48. package/dist/src/internal/nitro/routes/channel-dispatch.js +1 -1
  49. package/dist/src/internal/nitro/routes/dev-runtime-artifacts.d.ts +0 -3
  50. package/dist/src/internal/nitro/routes/dev-runtime-artifacts.js +1 -1
  51. package/dist/src/internal/nitro/routes/info.js +1 -1
  52. package/dist/src/internal/vercel/project-link.d.ts +10 -0
  53. package/dist/src/internal/vercel/project-link.js +1 -0
  54. package/dist/src/protocol/message.d.ts +14 -10
  55. package/dist/src/public/channels/auth.d.ts +26 -13
  56. package/dist/src/public/channels/auth.js +1 -1
  57. package/dist/src/react/index.d.ts +1 -1
  58. package/dist/src/runtime/agent/mock-model-adapter.d.ts +3 -2
  59. package/dist/src/runtime/agent/mock-model-adapter.js +1 -1
  60. package/dist/src/runtime/connections/principal.d.ts +2 -0
  61. package/dist/src/runtime/connections/principal.js +1 -1
  62. package/dist/src/runtime/connections/types.d.ts +4 -1
  63. package/dist/src/runtime/framework-channels/index.d.ts +1 -6
  64. package/dist/src/runtime/framework-channels/index.js +1 -1
  65. package/dist/src/runtime/governance/auth/oidc.js +1 -1
  66. package/dist/src/runtime/governance/auth/types.d.ts +14 -10
  67. package/dist/src/runtime/governance/auth/vercel-oidc-project.d.ts +12 -0
  68. package/dist/src/runtime/governance/auth/vercel-oidc-project.js +1 -0
  69. package/dist/src/services/dev-client/client-options.d.ts +5 -0
  70. package/dist/src/services/dev-client/client-options.js +1 -1
  71. package/dist/src/services/dev-client/request-headers.d.ts +8 -0
  72. package/dist/src/services/dev-client/request-headers.js +1 -1
  73. package/dist/src/services/dev-client/runtime-artifacts.d.ts +1 -0
  74. package/dist/src/services/dev-client/runtime-artifacts.js +1 -1
  75. package/dist/src/services/dev-client.d.ts +8 -0
  76. package/dist/src/services/dev-client.js +1 -1
  77. package/dist/src/setup/boxes/add-connections.d.ts +10 -8
  78. package/dist/src/setup/boxes/add-connections.js +1 -1
  79. package/dist/src/setup/boxes/resolve-provisioning.d.ts +1 -0
  80. package/dist/src/setup/boxes/resolve-provisioning.js +1 -1
  81. package/dist/src/setup/cli/channel-setup-prompter.d.ts +9 -2
  82. package/dist/src/setup/cli/channel-setup-prompter.js +1 -1
  83. package/dist/src/setup/cli/index.d.ts +1 -1
  84. package/dist/src/setup/cli/prompt-ui.d.ts +2 -0
  85. package/dist/src/setup/cli/select-state.js +1 -1
  86. package/dist/src/setup/connection-connector.d.ts +26 -52
  87. package/dist/src/setup/connection-connector.js +2 -1
  88. package/dist/src/setup/flows/channels.js +1 -1
  89. package/dist/src/setup/flows/connections.d.ts +36 -0
  90. package/dist/src/setup/flows/connections.js +3 -0
  91. package/dist/src/setup/flows/link.d.ts +1 -0
  92. package/dist/src/setup/flows/link.js +1 -1
  93. package/dist/src/setup/project-resolution.d.ts +2 -8
  94. package/dist/src/setup/project-resolution.js +1 -1
  95. package/dist/src/setup/prompter.d.ts +2 -0
  96. package/dist/src/setup/scaffold/connections/catalog.d.ts +10 -5
  97. package/dist/src/setup/scaffold/connections/catalog.js +1 -1
  98. package/dist/src/setup/scaffold/create/project.js +11 -11
  99. package/dist/src/setup/scaffold/create/web-template.d.ts +2 -2
  100. package/dist/src/setup/scaffold/create/web-template.js +107 -3
  101. package/dist/src/setup/scaffold/index.d.ts +1 -1
  102. package/dist/src/setup/scaffold/index.js +1 -1
  103. package/dist/src/setup/scaffold/update/connections.d.ts +6 -0
  104. package/dist/src/setup/scaffold/update/connections.js +3 -3
  105. package/dist/src/svelte/index.d.ts +1 -1
  106. package/dist/src/svelte/index.js +1 -1
  107. package/dist/src/svelte/use-eve-agent.js +1 -1
  108. package/dist/src/vue/index.d.ts +1 -1
  109. package/dist/src/vue/index.js +1 -1
  110. package/dist/src/vue/use-eve-agent.js +1 -1
  111. package/docs/channels/eve.mdx +3 -3
  112. package/docs/concepts/sessions-runs-and-streaming.md +1 -1
  113. package/docs/guides/auth-and-route-protection.md +5 -5
  114. package/docs/guides/dev-tui.md +11 -4
  115. package/docs/guides/frontend/nextjs.mdx +2 -2
  116. package/docs/guides/frontend/nuxt.mdx +2 -2
  117. package/docs/guides/frontend/overview.mdx +34 -4
  118. package/docs/guides/frontend/sveltekit.mdx +2 -2
  119. package/docs/reference/cli.md +3 -1
  120. package/docs/tutorial/ship-it.mdx +1 -1
  121. package/docs/tutorial/team-playbooks.mdx +1 -1
  122. package/package.json +2 -2
  123. package/dist/src/internal/nitro/host/dev-rebuild-registry.d.ts +0 -5
  124. package/dist/src/internal/nitro/host/dev-rebuild-registry.js +0 -1
@@ -72,9 +72,9 @@ export function Chat() {
72
72
  | `stop` | Abort the active request. |
73
73
  | `reset` | Clear local events, data, errors, and the local session cursor. |
74
74
 
75
- Most chat UIs only need `data.messages` and `status`. Drop down to `events` to render lower-level activity such as tool calls and reasoning deltas that the default reducer doesn't surface.
75
+ Most chat UIs only need `data.messages` and `status`. Drop down to `events` when you need the authoritative wire events directly, for example to persist an audit log or build a custom projection.
76
76
 
77
- `data.messages` are `EveMessage[]` following the AI SDK `UIMessage` convention, so they drop straight into any AI SDK UI primitive that accepts a `UIMessage[]`. Parts include user text, assistant text, reasoning, tool calls, tool results, and input requests.
77
+ `data.messages` are `EveMessage[]` following the AI SDK `UIMessage` convention, so they drop straight into any AI SDK UI primitive that accepts a `UIMessage[]`. Parts include user text, assistant text, reasoning, tool calls, tool results, input requests, and connection authorization prompts.
78
78
 
79
79
  ## Sending and streaming
80
80
 
@@ -117,6 +117,38 @@ if (request) {
117
117
 
118
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
+ ## Authorization prompts
121
+
122
+ Connections and tools that need OAuth or another grant emit `authorization.required`. The default reducer projects that into an `authorization` message part with the display name, instructions, device code, and user-facing sign-in URL. Render that part as a normal chat message, then keep the session cursor; eve resumes the parked turn when the callback completes and updates the part after `authorization.completed`:
123
+
124
+ ```tsx
125
+ import type { EveMessagePart } from "eve/react";
126
+
127
+ function AuthorizationPrompt({ part }: { part: EveMessagePart }) {
128
+ if (part.type !== "authorization") return null;
129
+
130
+ if (part.state === "completed") {
131
+ return (
132
+ <p>
133
+ {part.outcome === "authorized"
134
+ ? `${part.displayName} connected.`
135
+ : `${part.displayName} authorization ${part.outcome}.`}
136
+ </p>
137
+ );
138
+ }
139
+
140
+ return (
141
+ <section>
142
+ <p>{part.description}</p>
143
+ {part.authorization?.userCode ? <code>{part.authorization.userCode}</code> : null}
144
+ {part.authorization?.url ? <a href={part.authorization.url}>Sign in</a> : null}
145
+ </section>
146
+ );
147
+ }
148
+ ```
149
+
150
+ For fully custom state machines, `authorization.required` and `authorization.completed` are still available on `events` and `onEvent`.
151
+
120
152
  ## Attach page context per turn
121
153
 
122
154
  `clientContext` adds ephemeral context for the next model call only. Strings (or an array of strings) become user-role context messages; an object is JSON-serialized into one. It rides along with a message or HITL response, so it never dispatches a turn on its own and never lands in durable session history. Pass it directly to `send()`:
@@ -222,8 +254,6 @@ For multiple chat threads, keep one saved event log and session cursor per threa
222
254
 
223
255
  If the user can refresh or navigate immediately after pressing send, create your app-level chat row and store the pending user message before calling `send()`. After the request starts, persist the session state as soon as it contains a `sessionId`, then reconnect an interrupted in-flight turn with `session.stream({ startIndex: savedEvents.length })` from the lower-level client.
224
256
 
225
- Connection authorization prompts need one extra bit of UI state. eve emits `authorization.required` when a tool needs OAuth or another connection grant. Treat that as a parked chat turn for rendering and persistence: show the authorization prompt, disable ordinary text input for that thread, and keep the session cursor so the callback or a structured decline can continue the same session.
226
-
227
257
  ## Custom hosts and headers
228
258
 
229
259
  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:
@@ -69,13 +69,13 @@ With the plugin in `vite.config.ts`, components call [`useEveAgent`](./use-eve-a
69
69
  </form>
70
70
  ```
71
71
 
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`:
72
+ The default eve channel is fail-closed. With no `agent/channels/eve.ts` authored, eve registers `eveChannel({ auth: [vercelOidc(), localDev()] })`: `vercelOidc()` gets the first chance to resolve a Vercel caller, `localDev()` opens the remaining localhost requests, 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";
76
76
  import { localDev, vercelOidc } from "eve/channels/auth";
77
77
 
78
- export default eveChannel({ auth: [localDev(), vercelOidc()] });
78
+ export default eveChannel({ auth: [vercelOidc(), localDev()] });
79
79
  ```
80
80
 
81
81
  For a public demo, use `none()` (also from `eve/channels/auth`) to skip authentication. See [Channels](../../channels/overview) and [Auth & route protection](../auth-and-route-protection).
@@ -100,7 +100,7 @@ Pass a bare URL as the only argument and the UI connects to that server instead
100
100
  | `-u, --url <url>` | string | none | Connect to an existing server URL instead of starting one |
101
101
  | `--no-ui` | flag | UI on | Start the server without an interactive UI |
102
102
  | `--name <name>` | string | app folder name | Title shown in the terminal UI |
103
- | `--input <text>` | string | none | Pre-fill the prompt input after launching the UI (editable, not auto-submitted) |
103
+ | `--input <text>` | string | none | Pre-fill the prompt input; bare local `/model` starts onboarding |
104
104
  | `--tools <mode>` | enum | `auto-collapsed` | Tool-call rendering: `full` \| `collapsed` \| `auto-collapsed` \| `hidden` |
105
105
  | `--reasoning <mode>` | enum | `full` | Reasoning rendering: `full` \| `collapsed` \| `auto-collapsed` \| `hidden` |
106
106
  | `--subagents <mode>` | enum | `auto-collapsed` | Subagent-section rendering: `full` \| `collapsed` \| `auto-collapsed` \| `hidden` |
@@ -109,6 +109,8 @@ 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
+ A fresh `eve init` passes `--input /model`. That bare local input starts onboarding: the TUI installs the Vercel CLI if needed, asks you to log in if needed, then opens `/model`. Other input stays editable in the prompt.
113
+
112
114
  Local dev records the last ready URL per resolved app root in `.eve/dev-server-state.v1.json`. A second interactive `eve dev` reconnects only when that URL is loopback and healthy; each terminal UI creates a fresh client session while sharing the server process. A stale or malformed record is replaced when eve starts a new server. Passing `--host`, `--port`, or a `PORT` environment value skips reconnection and reports a healthy recorded server instead.
113
115
 
114
116
  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/`.
@@ -113,7 +113,7 @@ const appAuth: AuthFn<Request> = async (request) => {
113
113
  };
114
114
 
115
115
  export default eveChannel({
116
- auth: [appAuth, localDev(), vercelOidc()],
116
+ auth: [appAuth, vercelOidc(), localDev()],
117
117
  });
118
118
  ```
119
119
 
@@ -71,7 +71,7 @@ const devTeam: AuthFn<Request> = () =>
71
71
  };
72
72
 
73
73
  export default eveChannel({
74
- auth: [devTeam, localDev(), vercelOidc(), placeholderAuth()],
74
+ auth: [devTeam, vercelOidc(), localDev(), placeholderAuth()],
75
75
  });
76
76
  ```
77
77
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eve",
3
- "version": "0.15.4",
3
+ "version": "0.16.0",
4
4
  "private": false,
5
5
  "description": "Filesystem-first framework for durable backend AI agents that run anywhere.",
6
6
  "keywords": [
@@ -269,7 +269,7 @@
269
269
  "devDependencies": {
270
270
  "@ai-sdk/anthropic": "^4.0.0",
271
271
  "@ai-sdk/google": "^4.0.0",
272
- "@ai-sdk/mcp": "^2.0.0",
272
+ "@ai-sdk/mcp": "^2.0.1",
273
273
  "@ai-sdk/openai": "^4.0.0",
274
274
  "@ai-sdk/otel": "^1.0.0",
275
275
  "@ai-sdk/provider": "^4.0.0",
@@ -1,5 +0,0 @@
1
- export interface DevelopmentRebuildHandle {
2
- flush(): Promise<void>;
3
- }
4
- export declare function registerDevelopmentRebuildHandle(appRoot: string, handle: DevelopmentRebuildHandle): () => void;
5
- export declare function flushDevelopmentRebuild(appRoot: string): Promise<void>;
@@ -1 +0,0 @@
1
- import{resolve}from"node:path";const developmentRebuildHandles=new Map;function registerDevelopmentRebuildHandle(e,t){let n=resolve(e);return developmentRebuildHandles.set(n,t),()=>{developmentRebuildHandles.get(n)===t&&developmentRebuildHandles.delete(n)}}async function flushDevelopmentRebuild(e){await developmentRebuildHandles.get(resolve(e))?.flush()}export{flushDevelopmentRebuild,registerDevelopmentRebuildHandle};