eve 0.85.0 → 0.86.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -4
- package/dist/CHANGELOG.md +38 -0
- package/dist/src/cli/commands/agent-prompt/collect-intent.md +2 -1
- package/dist/src/cli/commands/agent-prompt/scaffold.md +1 -2
- package/dist/src/cli/dev/tui/runner.d.ts +1 -1
- package/dist/src/cli/dev/tui/runner.js +1 -1
- package/dist/src/cli/run.js +1 -1
- package/dist/src/compiled/.vendor-stamp.json +4 -4
- package/dist/src/compiled/@vercel/schedules/index.d.ts +45 -6
- package/dist/src/compiled/@vercel/schedules/index.js +2 -2
- package/dist/src/execution/dynamic-workflow/tool.js +1 -1
- package/dist/src/execution/proxied-deliver-step.js +1 -1
- package/dist/src/execution/session/active-turn.js +1 -1
- package/dist/src/execution/session/answer-caller.d.ts +9 -5
- package/dist/src/execution/session/answer-caller.js +1 -1
- package/dist/src/execution/session/principal.d.ts +8 -0
- package/dist/src/execution/session/principal.js +1 -1
- package/dist/src/execution/session/program.js +1 -1
- package/dist/src/execution/session/turn-step.js +1 -1
- package/dist/src/execution/session/turn.js +1 -1
- package/dist/src/execution/session-callback-request.js +1 -1
- package/dist/src/execution/tools/agent-router-workflow.js +1 -1
- package/dist/src/harness/attachment-staging.d.ts +2 -2
- package/dist/src/harness/attachment-staging.js +1 -1
- package/dist/src/internal/application/stamped-package-version.js +1 -1
- package/dist/src/internal/nitro/routes/schedule-collection-consumer.js +1 -1
- package/dist/src/public/schedules/providers/vercel.d.ts +2 -0
- package/dist/src/public/schedules/providers/vercel.js +1 -1
- package/dist/src/runtime/subagents/workflow.js +1 -1
- package/dist/src/setup/scaffold/create/project.js +1 -1
- package/dist/src/tools/provided/ask-question-workflow.js +1 -1
- package/dist/src/tools/provided/sleep-workflow.js +1 -1
- package/docs/channels/eve.mdx +1 -5
- package/docs/concepts/project-structure.mdx +1 -1
- package/docs/concepts/security-model.md +4 -0
- package/docs/concepts/upgrade-to-v27-events.md +68 -0
- package/docs/getting-started.mdx +2 -0
- package/docs/guides/auth-and-route-protection.md +1 -0
- package/docs/guides/client/streaming.mdx +1 -1
- package/docs/guides/deployment/self-hosting.md +1 -1
- package/docs/guides/frontend/meta.json +1 -0
- package/docs/guides/frontend/nextjs.mdx +329 -121
- package/docs/guides/frontend/overview.mdx +115 -335
- package/docs/guides/frontend/tanstack.mdx +1 -1
- package/docs/guides/frontend/use-eve-agent-svelte.mdx +5 -5
- package/docs/guides/frontend/use-eve-agent-vue.mdx +5 -5
- package/docs/guides/frontend/use-eve-agent.mdx +385 -0
- package/docs/guides/hooks.md +1 -1
- package/docs/guides/remote-agents.md +4 -2
- package/docs/guides/self-modification.md +6 -0
- package/docs/reference/cli.md +1 -2
- package/docs/sandbox/index.mdx +1 -1
- package/package.json +13 -21
- package/CHANGELOG.md +0 -3106
- package/dist/src/self-modification/agent.d.ts +0 -12
- package/dist/src/self-modification/agent.js +0 -1
|
@@ -55,11 +55,11 @@ The state fields are reactive getters; the commands are ordinary methods:
|
|
|
55
55
|
| `session` | `ClientSessionState \| undefined` |
|
|
56
56
|
| `send`, `respond`, `prewarm`, `resume`, `cancel`, `clear`, `compact`, `reset`, `newSession` | Methods |
|
|
57
57
|
|
|
58
|
-
Read the getters directly in templates, `$derived`, or `$effect`. The [
|
|
58
|
+
Read the getters directly in templates, `$derived`, or `$effect`. The [`useEveAgent` reference](./use-eve-agent#returned-state) describes what each value and command does.
|
|
59
59
|
|
|
60
60
|
## Send a message
|
|
61
61
|
|
|
62
|
-
Call `agent.send(text)` for text or pass content parts for attachments. The API and transport behavior match the [
|
|
62
|
+
Call `agent.send(text)` for text or pass content parts for attachments. The API and transport behavior match the [sending reference](./use-eve-agent#sending); only reactive access differs in Svelte. `send()` and `respond()` resolve with a `Delivery` receipt when accepted, without waiting for execution to finish. Read its `sessionId` and `deliveryId`, or use the receipt's [delivery reads](../client/messages#reusable-delivery-reads).
|
|
63
63
|
|
|
64
64
|
## Human-in-the-loop prompts
|
|
65
65
|
|
|
@@ -95,10 +95,10 @@ See [Human-in-the-loop prompts](./overview#human-in-the-loop-prompts) for reques
|
|
|
95
95
|
|
|
96
96
|
Pass `prewarm: true` to prepare an owned workflow on mount and after `newSession()`. It defaults
|
|
97
97
|
to `false`, so the first send creates the session. The binding waits for create acceptance,
|
|
98
|
-
retries while the inbox starts, and keeps the session stream open across turns. See [Prewarming
|
|
98
|
+
retries while the inbox starts, and keeps the session stream open across turns. See [Prewarming](./use-eve-agent#prewarming) for creation, failure, and
|
|
99
99
|
connection behavior.
|
|
100
100
|
|
|
101
|
-
Call `agent.cancel()` to stop the durable server-side turn while the binding remains attached through settlement. Offer it while `activeTurn(agent.view)` from `eve/events` returns a turn: `agent.status` reports outstanding work, so it is `"idle"` while a turn waits only on a person. Destroying the component only disconnects its local stream; it does not cancel server execution. Call `agent.newSession()` to clear local state and start a new session. `agent.reset()` instead retires the server-side session. Pass `initialSession`, `initialEvents`, and `resume: true` to restore a saved conversation and follow an in-flight turn. During bounded catch-up, `agent.status` is `"resuming"`; keep the hydrated conversation visible, disable submission, and wait for `"idle"` or `"busy"`, and inspect the separate `error` field. Use `agent.resume()` directly when restoration is controlled imperatively. See [Resumable sessions](./
|
|
101
|
+
Call `agent.cancel()` to stop the durable server-side turn while the binding remains attached through settlement. Offer it while `activeTurn(agent.view)` from `eve/events` returns a turn: `agent.status` reports outstanding work, so it is `"idle"` while a turn waits only on a person. Destroying the component only disconnects its local stream; it does not cancel server execution. Call `agent.newSession()` to clear local state and start a new session. `agent.reset()` instead retires the server-side session. Pass `initialSession`, `initialEvents`, and `resume: true` to restore a saved conversation and follow an in-flight turn. During bounded catch-up, `agent.status` is `"resuming"`; keep the hydrated conversation visible, disable submission, and wait for `"idle"` or `"busy"`, and inspect the separate `error` field. Use `agent.resume()` directly when restoration is controlled imperatively. See [Resumable sessions](./use-eve-agent#resume-a-saved-session) for the persistence contract and [Cancelling](./use-eve-agent#cancelling) for cancellation behavior.
|
|
102
102
|
|
|
103
103
|
## Custom host and credentials
|
|
104
104
|
|
|
@@ -110,7 +110,7 @@ Pass `clientContext` to `send()` or `respond()`, or use `prepareSend` to add con
|
|
|
110
110
|
|
|
111
111
|
## Lifecycle callbacks
|
|
112
112
|
|
|
113
|
-
Pass `onEvent`, `onError`, `onFinish`, or `onSessionChange` when the application needs lifecycle notifications. See [Lifecycle callbacks](./
|
|
113
|
+
Pass `onEvent`, `onError`, `onFinish`, or `onSessionChange` when the application needs lifecycle notifications. See [Lifecycle callbacks](./use-eve-agent#lifecycle-callbacks) for callback timing and optimistic projection behavior.
|
|
114
114
|
|
|
115
115
|
## Derive your own state
|
|
116
116
|
|
|
@@ -54,11 +54,11 @@ The state fields are computed refs; the commands are ordinary methods:
|
|
|
54
54
|
| `session` | `ComputedRef<ClientSessionState \| undefined>` |
|
|
55
55
|
| `send`, `respond`, `prewarm`, `resume`, `cancel`, `clear`, `compact`, `reset`, `newSession` | Methods |
|
|
56
56
|
|
|
57
|
-
Destructuring preserves reactivity because each state value remains a ref. Read refs with `.value` in `<script>` and without `.value` in a template. The [
|
|
57
|
+
Destructuring preserves reactivity because each state value remains a ref. Read refs with `.value` in `<script>` and without `.value` in a template. The [`useEveAgent` reference](./use-eve-agent#returned-state) describes what each value and command does.
|
|
58
58
|
|
|
59
59
|
## Send a message
|
|
60
60
|
|
|
61
|
-
Call `send(text)` for text or pass content parts for attachments. The API and transport behavior match the [
|
|
61
|
+
Call `send(text)` for text or pass content parts for attachments. The API and transport behavior match the [sending reference](./use-eve-agent#sending); only reactive access differs in Vue. `send()` and `respond()` resolve with a `Delivery` receipt when accepted, without waiting for execution to finish. Read its `sessionId` and `deliveryId`, or use the receipt's [delivery reads](../client/messages#reusable-delivery-reads).
|
|
62
62
|
|
|
63
63
|
## Human-in-the-loop prompts
|
|
64
64
|
|
|
@@ -104,10 +104,10 @@ See [Human-in-the-loop prompts](./overview#human-in-the-loop-prompts) for reques
|
|
|
104
104
|
|
|
105
105
|
Pass `prewarm: true` to prepare an owned workflow on mount and after `newSession()`. It defaults
|
|
106
106
|
to `false`, so the first send creates the session. The binding waits for create acceptance,
|
|
107
|
-
retries while the inbox starts, and keeps the session stream open across turns. See [Prewarming
|
|
107
|
+
retries while the inbox starts, and keeps the session stream open across turns. See [Prewarming](./use-eve-agent#prewarming) for creation, failure, and
|
|
108
108
|
connection behavior.
|
|
109
109
|
|
|
110
|
-
Call `cancel()` to stop the durable server-side turn while the composable remains attached through settlement. Offer it while `activeTurn(view.value)` from `eve/events` returns a turn: `status` reports outstanding work, so it is `"idle"` while a turn waits only on a person. Disposing the component only disconnects its local stream; it does not cancel server execution. Call `newSession()` to clear local state and start a new session. `reset()` instead retires the server-side session. Pass `initialSession`, `initialEvents`, and `resume: true` to restore a saved conversation and follow an in-flight turn. During bounded catch-up, `status.value` is `"resuming"`; keep the hydrated conversation visible, disable submission, and wait for `"idle"` or `"busy"`, and inspect the separate `error` field. Use `resume()` directly when restoration is controlled imperatively. See [Resumable sessions](./
|
|
110
|
+
Call `cancel()` to stop the durable server-side turn while the composable remains attached through settlement. Offer it while `activeTurn(view.value)` from `eve/events` returns a turn: `status` reports outstanding work, so it is `"idle"` while a turn waits only on a person. Disposing the component only disconnects its local stream; it does not cancel server execution. Call `newSession()` to clear local state and start a new session. `reset()` instead retires the server-side session. Pass `initialSession`, `initialEvents`, and `resume: true` to restore a saved conversation and follow an in-flight turn. During bounded catch-up, `status.value` is `"resuming"`; keep the hydrated conversation visible, disable submission, and wait for `"idle"` or `"busy"`, and inspect the separate `error` field. Use `resume()` directly when restoration is controlled imperatively. See [Resumable sessions](./use-eve-agent#resume-a-saved-session) for the persistence contract and [Cancelling](./use-eve-agent#cancelling) for cancellation behavior.
|
|
111
111
|
|
|
112
112
|
## Custom host and credentials
|
|
113
113
|
|
|
@@ -119,7 +119,7 @@ Pass `clientContext` to `send()` or `respond()`, or use `prepareSend` to add con
|
|
|
119
119
|
|
|
120
120
|
## Lifecycle callbacks
|
|
121
121
|
|
|
122
|
-
Pass `onEvent`, `onError`, `onFinish`, or `onSessionChange` when the application needs lifecycle notifications. See [Lifecycle callbacks](./
|
|
122
|
+
Pass `onEvent`, `onError`, `onFinish`, or `onSessionChange` when the application needs lifecycle notifications. See [Lifecycle callbacks](./use-eve-agent#lifecycle-callbacks) for callback timing and optimistic projection behavior.
|
|
123
123
|
|
|
124
124
|
## Derive your own state
|
|
125
125
|
|
|
@@ -0,0 +1,385 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "useEveAgent Reference"
|
|
3
|
+
description: "Every value, option, and behavior of useEveAgent, shared by the React, Vue, and Svelte bindings."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
This page lists every value, option, and behavior of `useEveAgent`. Use it when you need exact behavior. For a guided introduction, start with the [frontend overview](./overview).
|
|
7
|
+
|
|
8
|
+
React, [Vue](./use-eve-agent-vue), and [Svelte](./use-eve-agent-svelte) share the behavior described here. Their pages cover only how each binding exposes it.
|
|
9
|
+
|
|
10
|
+
## Returned state
|
|
11
|
+
|
|
12
|
+
| Field | What it is |
|
|
13
|
+
| ------------------ | ------------------------------------------------------------------------------ |
|
|
14
|
+
| `messages` | Messages to render, including your submitted messages before eve confirms them |
|
|
15
|
+
| `status` | Outstanding work: `"idle"`, `"busy"`, or `"resuming"`. See [Status](#status) |
|
|
16
|
+
| `error` | The latest session creation, stream, resume, or turn failure |
|
|
17
|
+
| `view` | Immutable session snapshot. Query it with functions from `eve/events` |
|
|
18
|
+
| `agents` | Child sessions this store follows. See [Child agents](#child-agents) |
|
|
19
|
+
| `events` | The session's raw stream events, deduplicated and in order |
|
|
20
|
+
| `session` | Serializable session cursor: `sessionId` and `streamIndex` |
|
|
21
|
+
| `send`, `respond` | Send a message or answers. Resolve with a `Delivery` receipt when accepted |
|
|
22
|
+
| `cancel` | Request durable cancellation of the active turn |
|
|
23
|
+
| `prewarm` | Create a session, or prepare an idle one, without starting a turn |
|
|
24
|
+
| `resume` | Catch up to the durable tail. Later following obeys `followWhile` |
|
|
25
|
+
| `follow` | Follow a delivery receipt from this or another store on the same session |
|
|
26
|
+
| `clear`, `compact` | Queue a context change and return its delivery |
|
|
27
|
+
| `reset` | Retire the server-side session and return its delivery |
|
|
28
|
+
| `newSession` | Clear local state and the local session cursor |
|
|
29
|
+
|
|
30
|
+
About snapshots:
|
|
31
|
+
|
|
32
|
+
- A snapshot publishes after every event in a committed stream line has been applied.
|
|
33
|
+
- A view you keep, and its observations, never change after later updates.
|
|
34
|
+
- Internal tables and preview dictionaries are not public fields.
|
|
35
|
+
|
|
36
|
+
## Options
|
|
37
|
+
|
|
38
|
+
| Option | Default | Purpose |
|
|
39
|
+
| --------------------------------------------------- | ------------ | ------------------------------------------------------------------------------------------------ |
|
|
40
|
+
| `agent` | none | Named agent mounted at `/eve/<name>/v1/*`. Don't combine with `baseUrl` |
|
|
41
|
+
| `baseUrl` | `""` | Where the eve routes are mounted: a same-origin prefix or another origin |
|
|
42
|
+
| `auth`, `headers` | none | Credentials and headers. Function values are resolved before every request, including reconnects |
|
|
43
|
+
| `session` | none | An existing `ClientSession` to bind. It stays owned by your code |
|
|
44
|
+
| `initialSession` | none | A saved session cursor to restore |
|
|
45
|
+
| `initialEvents` | `[]` | Saved events to render before catch-up. See [Resume a saved session](#resume-a-saved-session) |
|
|
46
|
+
| `resume` | `false` | Replay the session after mount and follow a running turn. Needs `initialSession` or `session` |
|
|
47
|
+
| `prewarm` | `false` | Create or prepare the session before the first send. See [Prewarming](#prewarming) |
|
|
48
|
+
| `optimistic` | `true` | Show submitted messages before eve confirms them |
|
|
49
|
+
| `followAgents` | `false` | Follow child sessions. See [Child agents](#child-agents) |
|
|
50
|
+
| `followWhile` | `() => true` | Keep the stream open only while this returns true. See [Stream lifetime](#stream-lifetime) |
|
|
51
|
+
| `prepareSend` | none | Adjust each turn just before it is sent, for example to add `clientContext` |
|
|
52
|
+
| `onEvent`, `onError`, `onFinish`, `onSessionChange` | none | See [Lifecycle callbacks](#lifecycle-callbacks) |
|
|
53
|
+
|
|
54
|
+
`agent`, `baseUrl`, `session`, `initialEvents`, `initialSession`, `auth`, `headers`, `optimistic`, `followAgents`, and `resume` are read once, when the hook creates its store. Remount the component, for example with `key={chat.id}`, to change them. React reads `prewarm`, `followWhile`, and the callbacks on every render. Vue and Svelte read `prewarm` when the binding is created and `followWhile` from their options object.
|
|
55
|
+
|
|
56
|
+
## Status
|
|
57
|
+
|
|
58
|
+
| Status | Meaning |
|
|
59
|
+
| ------------ | ------------------------------------------------------------------------------------------------------------ |
|
|
60
|
+
| `"idle"` | Nothing is pending. A turn waiting only on a person can still be open |
|
|
61
|
+
| `"busy"` | A command or answer is pending, a followed receipt hasn't settled, or the session has running or queued work |
|
|
62
|
+
| `"resuming"` | Catching up on an attached session. Disable sending and answering |
|
|
63
|
+
|
|
64
|
+
- `status` describes outstanding work, not whether a turn is open. Use `activeTurn(view)` from `eve/events` to decide whether a turn can be steered or cancelled.
|
|
65
|
+
- A failure sets `error` without changing `status`.
|
|
66
|
+
- After `followWhile` closes the stream, `status` reflects the last observed view, not the current server state.
|
|
67
|
+
|
|
68
|
+
## Messages
|
|
69
|
+
|
|
70
|
+
`messages` are eve's own `EveMessage[]`. To pass them to an API typed as AI SDK `UIMessage[]`, adapt them first.
|
|
71
|
+
|
|
72
|
+
| Part type | What it is |
|
|
73
|
+
| ------------- | -------------------------------------------------------------------------------------------------------- |
|
|
74
|
+
| `text` | Message text |
|
|
75
|
+
| `reasoning` | Model reasoning |
|
|
76
|
+
| `file` | An attachment a person sent. `url` can be absent |
|
|
77
|
+
| `tool` | A call the turn made |
|
|
78
|
+
| `interaction` | Something the turn asked a person that no call carries: a sign-in, the budget prompt, or a free question |
|
|
79
|
+
|
|
80
|
+
- **Keys:** assistant text and reasoning parts carry a stable `id` that survives appends and completion. Use `part.id` as the React key. Older events without an ID get a best-effort fallback. User text parts may not have an ID.
|
|
81
|
+
- **Steps:** each assistant part carries its turn's `stepIndex`.
|
|
82
|
+
- **Follow-ups split replies:** each message a person sends is its own bubble, placed where its turn took it in. A message that arrives while the agent works splits the response around it, and both pieces share `metadata.turnId`. A single event that combines several deliveries stays one bubble.
|
|
83
|
+
- **Attachments:** after `delivery.consumed` confirms an attachment turn, each attachment shows as a `file` part with `mediaType`, optional `filename` and `size`, and a `url` only when the original was browser-resolvable.
|
|
84
|
+
|
|
85
|
+
### Tool parts
|
|
86
|
+
|
|
87
|
+
A `tool` part shows a call's shared state, with partial input while it streams.
|
|
88
|
+
|
|
89
|
+
| Field | What it is |
|
|
90
|
+
| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
|
|
91
|
+
| `callId`, `name` | The call, and the tool, agent, or skill it invokes |
|
|
92
|
+
| `kind` | `tool`, `agent`, `skill`, or `control`. Task controls are usually hidden in activity displays |
|
|
93
|
+
| `label` | The tool's authored label, its latest output label, or a readable name |
|
|
94
|
+
| `state` | `streaming` while input arrives, then `requested`, `approval`, `running`, `blocked`, `completed`, `failed`, `rejected`, or `cancelled` |
|
|
95
|
+
| `inputText` | Partial input, only while `state` is `streaming` |
|
|
96
|
+
| `input`, `output`, `error` | Validated input, current or final output, and error details |
|
|
97
|
+
| `interaction` | The latest approval or question about the call. It stays `open` while an answer is submitted, until settlement |
|
|
98
|
+
|
|
99
|
+
- Read outcomes, reasons, and task identities from `call(view, part.callId)`, not from the part.
|
|
100
|
+
- A call stays open if your stream stopped following before it settled. Decide what an open call shows after the stream ends.
|
|
101
|
+
- A call that a model retry replaced isn't shown; the replacement asks again.
|
|
102
|
+
- A delegated call stays `running` until `call.settled`. Its child's detail is on a separate stream; see [Child agents](#child-agents).
|
|
103
|
+
|
|
104
|
+
## Sending
|
|
105
|
+
|
|
106
|
+
- `send(message, options)` and `respond(answers, options)` resolve when the server accepts the request, before the agent replies. They reject if preparation or submission fails. Later execution failures arrive through `view`, `error`, and `onError`.
|
|
107
|
+
- The returned `Delivery` has its own `stream({ signal })` and `result({ signal })` reads. These can open another HTTP stream and keep working after `newSession()` or unmount, so pass a signal that ends with your component.
|
|
108
|
+
- Headers passed to `send()` apply to that request and become the stream's credentials on its next reconnect, until a later send replaces them.
|
|
109
|
+
- Answers are accepted while other work runs.
|
|
110
|
+
|
|
111
|
+
### Messages during a running turn
|
|
112
|
+
|
|
113
|
+
| `turnPolicy` | Behavior |
|
|
114
|
+
| ------------------- | ------------------------------------------ |
|
|
115
|
+
| `"steer"` (default) | Corrects the current turn with the message |
|
|
116
|
+
| `"queue"` | Waits for the current turn to finish |
|
|
117
|
+
|
|
118
|
+
You don't need to pass `"steer"`; omit `turnPolicy` unless you want to queue.
|
|
119
|
+
|
|
120
|
+
Steering timing depends on what the turn is doing:
|
|
121
|
+
|
|
122
|
+
- Before answer output or local tool execution starts, eve interrupts model generation and continues the same turn with the correction.
|
|
123
|
+
- Running tools finish and save their results first.
|
|
124
|
+
- After answer output starts, steering waits for the next committed workflow boundary.
|
|
125
|
+
- Reasoning and search progress don't count as answer output.
|
|
126
|
+
|
|
127
|
+
### Optimistic messages
|
|
128
|
+
|
|
129
|
+
With `optimistic: true`, the default, a submitted message shows in `messages` before eve confirms it with `delivery.consumed`.
|
|
130
|
+
|
|
131
|
+
- The placeholder keeps its message ID when confirmed, so an unrelated or identical message can't replace it.
|
|
132
|
+
- A follow-up sent while a turn works appears at the end and stays there once the turn takes it in.
|
|
133
|
+
- If the send fails, the placeholder stays in place with `metadata.status: "failed"`.
|
|
134
|
+
- Placeholders appear only in `messages`; `events` stays the authoritative stream.
|
|
135
|
+
- While a POST acknowledgement is pending, stream-driven snapshots wait for its identity. `onEvent` still receives events.
|
|
136
|
+
|
|
137
|
+
### Prepare each send
|
|
138
|
+
|
|
139
|
+
`prepareSend` runs right before each send and returns the turn to send, for example with added `clientContext`. The optimistic message is already visible while it runs.
|
|
140
|
+
|
|
141
|
+
## Cancelling
|
|
142
|
+
|
|
143
|
+
- `cancel()` targets the turn this store is observing and keeps the stream attached through settlement.
|
|
144
|
+
- If no turn is active, it waits for a submission that was pending when you called it, including preparation, session creation, and POST acceptance, then cancels that turn. It never stops an unrelated later turn.
|
|
145
|
+
- It doesn't withdraw a queued message. If the message never reaches a running turn, `cancel()` does nothing. An idle `cancel()` doesn't arm a future request.
|
|
146
|
+
- Cancellation is cooperative: a turn can finish before it takes effect.
|
|
147
|
+
- Unmounting or closing the page disconnects the local stream but doesn't cancel the turn. Call `cancel()` first when the user wants to stop it.
|
|
148
|
+
|
|
149
|
+
## Stream lifetime
|
|
150
|
+
|
|
151
|
+
By default, the hook keeps one stream open across turns and idle periods, so replies, authorization updates, and turns started elsewhere all arrive as they happen.
|
|
152
|
+
|
|
153
|
+
- A turn settling doesn't close the connection.
|
|
154
|
+
- The stream reconnects from its cursor after a disconnect and when the server's renewable 60-second lease ends. Renewal doesn't start a turn or clear UI state.
|
|
155
|
+
- Unmounting or `newSession()` closes the local stream without cancelling the durable session.
|
|
156
|
+
|
|
157
|
+
### Close the stream when idle
|
|
158
|
+
|
|
159
|
+
`followWhile(view)` closes the stream when it returns false at a complete line boundary, after catch-up and any followed receipt. Pair it with `follow()` to stream only while the agent works. This sidebar shares a stable `ClientSession` with the main chat:
|
|
160
|
+
|
|
161
|
+
```tsx
|
|
162
|
+
import type { ClientSession } from "eve/client";
|
|
163
|
+
import { idle } from "eve/events";
|
|
164
|
+
import { useEveAgent } from "eve/react";
|
|
165
|
+
|
|
166
|
+
function useSessionPanels(session: ClientSession) {
|
|
167
|
+
const chat = useEveAgent({ session });
|
|
168
|
+
const sidebar = useEveAgent({ session, followWhile: (view) => !idle(view) });
|
|
169
|
+
|
|
170
|
+
async function send(message: string) {
|
|
171
|
+
const receipt = await chat.send(message);
|
|
172
|
+
sidebar.follow(receipt);
|
|
173
|
+
return receipt;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
return { chat, sidebar, send };
|
|
177
|
+
}
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
- `followWhile` can close the stream while a turn is active or waiting on a person. The UI then stays at its last observed state until a command or `follow()` reopens it.
|
|
181
|
+
- To close only between turns, pass `(view) => !idle(view) || activeTurn(view) !== undefined`.
|
|
182
|
+
- A closed stream can't see new activity. Send a command, call `resume()` or `follow()`, or keep the default when other sources can start work.
|
|
183
|
+
|
|
184
|
+
### Follow a receipt
|
|
185
|
+
|
|
186
|
+
- `follow(receipt)` tracks an accepted receipt until it settles, even if the stream caught up before the server admitted it.
|
|
187
|
+
- Pass only receipts from `send`, `respond`, `clear`, `compact`, or `reset` on the same session. A receipt the stream never admits keeps the store `"busy"` until the session ends or you call `newSession()`.
|
|
188
|
+
- `follow()` doesn't create a session or grant access.
|
|
189
|
+
- Limit retries after stream errors, and resolve authorization failures before retrying.
|
|
190
|
+
|
|
191
|
+
## Prewarming
|
|
192
|
+
|
|
193
|
+
Prewarming creates the session before the first message so the first reply starts sooner.
|
|
194
|
+
|
|
195
|
+
- **Default off.** The first send creates the session. Turn it on only after your auth, headers, and any chat-record binding are ready.
|
|
196
|
+
- **React:** `prewarm: true` prepares on mount, after each `newSession()`, and when the option changes from `false` to `true`, including for a restored session.
|
|
197
|
+
- **Vue and Svelte:** the option is read when the binding is created. Call `prewarm()` when typing starts.
|
|
198
|
+
- **Typing bursts:** call `prewarm()` once when a burst begins, with your own cooldown if you retry during long drafts. eve shares concurrent calls; it doesn't watch inputs or poll deployments.
|
|
199
|
+
|
|
200
|
+
### What prewarming does
|
|
201
|
+
|
|
202
|
+
- It starts the workflow and its inbox, then waits before session hooks or dynamic definitions run.
|
|
203
|
+
- It starts the agent's [sandbox](/docs/sandbox) in the background. The first turn doesn't wait for it; only a tool or hook that uses the sandbox does. If startup fails, the first turn that needs the sandbox starts it.
|
|
204
|
+
- The first message passes through the channel's `onMessage` hook and supplies identity and context for initialization and the first turn.
|
|
205
|
+
- The session timeout starts at creation, so an unused prewarmed session can expire. eve deletes its sandbox when it ends.
|
|
206
|
+
- `prewarm()` resolves when the server accepts creation, without waiting for initialization. The composer stays `"idle"`, and `prepareSend` doesn't run.
|
|
207
|
+
- A concurrent `send()` waits for creation to be accepted. While the inbox starts, the client retries `409 session_not_ready` with backoff for up to 20 seconds, and your abort signal cancels the wait.
|
|
208
|
+
|
|
209
|
+
### Existing sessions on Vercel
|
|
210
|
+
|
|
211
|
+
For an existing idle session, `prewarm()` can move it to the deployment that accepted the request, ahead of the next `send()`. The ID, history, stream, and expiry stay the same, and no model call runs.
|
|
212
|
+
|
|
213
|
+
- A session already running on that deployment isn't woken.
|
|
214
|
+
- Active turns are never interrupted. A turn can finish before the move, and a queued message takes priority.
|
|
215
|
+
- A session with pending tasks or input requests can skip the move.
|
|
216
|
+
- Sessions from eve versions without this support, or on workflow backends without deployment routing, aren't moved.
|
|
217
|
+
- A production alias targets its current deployment and a preview alias its preview. Requests pinned to an immutable deployment can't discover a newer one.
|
|
218
|
+
- In local development, `prewarm()` can create a session but doesn't move one.
|
|
219
|
+
- `client.sessions.attach(sessionId).prewarm({ signal })` returns `ready`, `accepted`, `unsupported`, or `no_active_session`. `accepted` means the request was saved, not that the move finished. It never replaces an expired session. `send()` keeps its own retries if the move is unavailable or unfinished.
|
|
220
|
+
|
|
221
|
+
### Prewarm failures
|
|
222
|
+
|
|
223
|
+
- A failed move of an existing session rejects the explicit call without setting `error` or blocking `send()`.
|
|
224
|
+
- A failed create sets `error` and calls `onError` when no send is waiting. A waiting send can fall back to creating the session with its message.
|
|
225
|
+
- After creation, initialization failures arrive on the stream during the first turn.
|
|
226
|
+
- React doesn't retry a failed prewarm on unrelated renders. Recover by calling `prewarm()`, toggling the option from `false` to `true`, calling `newSession()`, or sending a message.
|
|
227
|
+
|
|
228
|
+
## Start over
|
|
229
|
+
|
|
230
|
+
| Command | Effect |
|
|
231
|
+
| -------------- | ---------------------------------------------------------------------------------------------- |
|
|
232
|
+
| `newSession()` | Clears the local conversation and reuses the hook. The old session keeps running on the server |
|
|
233
|
+
| `reset()` | Retires the server-side session and returns its delivery |
|
|
234
|
+
|
|
235
|
+
After `reset()`, call `newSession()` to clear the retired conversation. With `prewarm` on, that prepares the next session; otherwise the next send creates it. A `session` you passed in stays yours: prewarming and `newSession()` never replace it.
|
|
236
|
+
|
|
237
|
+
## Resume a saved session
|
|
238
|
+
|
|
239
|
+
Pass a saved cursor and events with `resume: true`:
|
|
240
|
+
|
|
241
|
+
```tsx
|
|
242
|
+
const agent = useEveAgent({
|
|
243
|
+
initialEvents: saved.events,
|
|
244
|
+
initialSession: saved.session,
|
|
245
|
+
resume: true,
|
|
246
|
+
});
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
### Saved events
|
|
250
|
+
|
|
251
|
+
- `initialEvents` must be an ordered prefix of the same session's stream. Its end doesn't have to match where the stream resumes.
|
|
252
|
+
- Catch-up starts after the source lines your events cover. Coverage uses line positions, not event counts.
|
|
253
|
+
- Keep reader metadata unchanged. `meta.next` can record source lines that produced no events, as with [converted v26 history](/docs/concepts/upgrade-to-v27-events).
|
|
254
|
+
- The `initialSession` cursor alone never extends coverage. A partial line is replayed from its start.
|
|
255
|
+
- Each event's [`meta.position`](/docs/concepts/sessions-runs-and-streaming#positions) is stable, and the store drops positions it already applied. An overlapping replay renders once, and `onEvent` fires only for new events.
|
|
256
|
+
- `session.streamIndex` and `position(view)` both track the covered prefix.
|
|
257
|
+
|
|
258
|
+
### Catch-up
|
|
259
|
+
|
|
260
|
+
- While catching up, `status` is `"resuming"`. Render saved messages, but disable sending and answering, and don't show cancel or progress controls.
|
|
261
|
+
- `resume()` resolves when catch-up reaches the durable tail, even while a turn runs.
|
|
262
|
+
- Afterward, `status` is `"busy"` for running or queued work, or `"idle"` for a settled session or a turn waiting only on a person.
|
|
263
|
+
- The connection then stays open to follow the session, unless `followWhile` closes it.
|
|
264
|
+
- A terminal session failure sets `error`.
|
|
265
|
+
|
|
266
|
+
## Lifecycle callbacks
|
|
267
|
+
|
|
268
|
+
| Callback | When it fires |
|
|
269
|
+
| -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
270
|
+
| `onEvent(event)` | For each stream event as it arrives |
|
|
271
|
+
| `onError(error)` | When session creation, streaming, resume, or a live turn fails, or a prewarm fails with no send waiting. Restored historical failures don't fire it |
|
|
272
|
+
| `onFinish(snapshot)` | When a live turn settles, after its committed line is visible. Catch-up never fires it |
|
|
273
|
+
| `onSessionChange(session)` | When a session is created, its cursor advances, or `newSession()` clears it |
|
|
274
|
+
|
|
275
|
+
To read the result of one delivery, use `receipt.result()` instead of `onFinish`. A delivery can settle while its turn still waits for input.
|
|
276
|
+
|
|
277
|
+
## Interactions
|
|
278
|
+
|
|
279
|
+
Approvals, questions, sign-ins, and budget prompts are interactions. Read them with `interaction(view, id)`, `interactions(view)`, or `openInteractions(view)` from `eve/events`.
|
|
280
|
+
|
|
281
|
+
- An interaction is `open` until eve settles it. Submitting an answer doesn't settle it; the stream's `interaction.settled` does.
|
|
282
|
+
- A tool part's `state` is the call's state, not the decision. A call can be `cancelled` while its approval was never answered.
|
|
283
|
+
|
|
284
|
+
| `outcome` | Meaning |
|
|
285
|
+
| ----------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
|
|
286
|
+
| `accepted` | A person approved or answered it |
|
|
287
|
+
| `declined` | A person declined |
|
|
288
|
+
| `withdrawn`, `interrupted`, `abandoned`, `expired`, `invalid`, `failed` | No decision. The interaction ended another way, such as a cancelled turn or a message sent while a sign-in was pending |
|
|
289
|
+
|
|
290
|
+
Show "Approved" or "Denied" only for `accepted` and `declined`. For any other outcome, show the outcome itself. Keep a default branch: later releases can add outcomes.
|
|
291
|
+
|
|
292
|
+
## Use eve's answers
|
|
293
|
+
|
|
294
|
+
Read lifecycle state from `view` with functions from `eve/events`, instead of scanning `events` or keeping your own copy:
|
|
295
|
+
|
|
296
|
+
| Question | Ask eve |
|
|
297
|
+
| ----------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
|
|
298
|
+
| How did my request end, and what did it reply? | `delivery.result()`: `status`, `outcome`, `reply`, `interactions`, and `error` for that delivery |
|
|
299
|
+
| Is a turn open? | `activeTurn(view)` |
|
|
300
|
+
| What is the turn waiting on? | `waiting(view, turnId)` or `activity(view)` |
|
|
301
|
+
| How did a turn end, and why did it fail? | `turn(view, turnId)` and `failure(view, turnId)`, which also covers a session failure that ended the turn |
|
|
302
|
+
| What is a call doing, and how long did it take? | `call(view, callId)`: `state`, `outcome`, `startedAt`, and `endedAt` |
|
|
303
|
+
| What did a turn's model runs cost? | `runs(view, { turnId })` and `usage(view)` |
|
|
304
|
+
| What did a turn reply? | `reply(view, turnId)` |
|
|
305
|
+
| Where should a saved chat resume? | The hook's `session`, `position(view)`, or `session.snapshot()`. Never an event count |
|
|
306
|
+
| Did a person approve? | `interaction(view, id).outcome`. See [Interactions](#interactions) |
|
|
307
|
+
|
|
308
|
+
`delivery.result()` is scoped to one delivery. Scanning the events in a delivery's interval isn't: a queued message's interval starts while the earlier turn still runs, so it includes that turn's `turn.settled`.
|
|
309
|
+
|
|
310
|
+
Outside the store:
|
|
311
|
+
|
|
312
|
+
- `foldEvents(view, events)`, starting from `emptySessionView`, folds received events by whole line. It returns a new view and holds unfinished lines until they complete.
|
|
313
|
+
- `callPreview(view, callId)` and `contentPreviews(view)` show transient progress.
|
|
314
|
+
- `conversationOf(events)` from `eve/client` renders a saved log.
|
|
315
|
+
|
|
316
|
+
## Child agents
|
|
317
|
+
|
|
318
|
+
A delegated call's detailed progress lives on the child session's stream, not in the root `messages`. Pass `followAgents` to observe recorded children, including children opened inside workflow tools:
|
|
319
|
+
|
|
320
|
+
```tsx
|
|
321
|
+
const all = useEveAgent({ followAgents: true });
|
|
322
|
+
const shallow = useEveAgent({ followAgents: ({ depth }) => depth <= 3 });
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
- The predicate is synchronous. An excluded child's descendants aren't discovered. Root depth is zero.
|
|
326
|
+
- Each `agents[sessionId]` describes one opening, with an `owner` naming its call or task. Its `observation.conversation` has its own `agents`, `messages`, and `view`.
|
|
327
|
+
- Calls that continue a task reuse its child conversation.
|
|
328
|
+
- Read a call's or delivery's settled result for its outcome, not the child's latest message.
|
|
329
|
+
- Parent-relayed interactions are the actionable prompts. Don't render a second set of controls from child observations.
|
|
330
|
+
|
|
331
|
+
### Limits
|
|
332
|
+
|
|
333
|
+
| Limit | Value |
|
|
334
|
+
| ------------------------------- | -------------------------------------- |
|
|
335
|
+
| Child observations per root | 128, reset by `newSession()` |
|
|
336
|
+
| Depth | 8 |
|
|
337
|
+
| Simultaneous descendant reads | 8, independent of the root stream |
|
|
338
|
+
| Read length | Until the captured tail, or 10 seconds |
|
|
339
|
+
| Refresh delay after catching up | 1 to 10 seconds |
|
|
340
|
+
|
|
341
|
+
These limits don't affect execution or the root transcript. The policy is read at store creation and evaluated once per relationship at each reachable depth. When two paths reach the same session, the store shares one observation.
|
|
342
|
+
|
|
343
|
+
### Observation status
|
|
344
|
+
|
|
345
|
+
| Status | Meaning |
|
|
346
|
+
| ---------------- | ----------------------------------------------------------------------------------------------------------- |
|
|
347
|
+
| `"not-followed"` | Following is off, or `reason` names a predicate, limit, or cycle |
|
|
348
|
+
| `"queued"` | Waiting for a read slot |
|
|
349
|
+
| `"following"` | Reading. Silence doesn't mean the child is done |
|
|
350
|
+
| `"caught-up"` | Reached the tail captured for this read. The child may still be working |
|
|
351
|
+
| `"interrupted"` | A retryable read failure, or the observation was detached |
|
|
352
|
+
| `"unavailable"` | History can't be read now. `reason` distinguishes authorization, expiry, unsupported readers, and transport |
|
|
353
|
+
|
|
354
|
+
- Every status except `"not-followed"` exposes `position`, `caughtUp`, and `conversation`, which can be empty before the first read.
|
|
355
|
+
- `caughtUp` describes the tail when that read opened, not that execution finished.
|
|
356
|
+
- Each observation's `key` identifies the session within this store's authorized reader scope. Equal IDs from different remote namespaces aren't merged.
|
|
357
|
+
- Cursors are per session.
|
|
358
|
+
- Root call results, `status`, `resume()`, `events`, and callbacks describe the root session only; child failures stay on their observations.
|
|
359
|
+
|
|
360
|
+
### Activity from one call
|
|
361
|
+
|
|
362
|
+
When several calls share a child, `agentCallActivity(state, callId)` from `eve/client` shows what one call caused:
|
|
363
|
+
|
|
364
|
+
```ts
|
|
365
|
+
import { agentCallActivity } from "eve/client";
|
|
366
|
+
|
|
367
|
+
const activity = agentCallActivity(agent, callId);
|
|
368
|
+
if (activity.status === "linked") {
|
|
369
|
+
for (const { sessionId, deliveries, turns } of activity.sessions) {
|
|
370
|
+
const pending = deliveries.some(({ status }) => status !== "settled");
|
|
371
|
+
const turnIds = new Set(turns.map(({ turnId }) => turnId));
|
|
372
|
+
// Render agent.agents[sessionId]'s messages whose metadata.turnId is in turnIds.
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
- A delivery is `"unseen"` until this reader reads the child's admission, then `"admitted"`, `"consumed"`, or `"settled"`.
|
|
378
|
+
- Several calls can reach one turn. Each turn lists the other calls it answered in `sharedWith`, so render it once.
|
|
379
|
+
- `"unlinked"` means the parent recorded no delivery, as for a call that sent nothing or reached a remote agent on an earlier protocol.
|
|
380
|
+
|
|
381
|
+
### Without the hook
|
|
382
|
+
|
|
383
|
+
- For headless capture, use [`SessionStore.observe()`](../client/streaming#observe-nested-traces-without-a-framework). Archive observed prefixes with their per-session cursors in your own versioned schema, and keep earlier archives when history expires.
|
|
384
|
+
- If you read child streams yourself, attribute work with the parent's `child.sent` facts. Each one names the `callId` and the `childDeliveryId` on the child's stream. Don't count `delivery.consumed` on the child: answers to the child's questions are deliveries too.
|
|
385
|
+
- With your own session, pass a `child.opened` event to [`session.agent()`](../client/streaming#follow-a-subagent) and follow the child with `stream()`. It reads local and remote children through the parent. See [What the parent sees](../../subagents#what-the-parent-sees).
|
package/docs/guides/hooks.md
CHANGED
|
@@ -251,7 +251,7 @@ export default defineHook({
|
|
|
251
251
|
|
|
252
252
|
The remaining subscribers for the event still run. Then eve cancels the turn the same way [`session.cancel()`](./client/streaming) does: in-flight model and tool work is aborted, delegated child turns are cancelled, and the turn settles with `outcome: "cancelled"` and `cause: { hook }` naming the hook. No failure is recorded. A cancel from `turn.started` or `model.requested` takes effect before that model call. In a conversation, the next message starts a new turn. A delegated task reports the cancellation to its caller.
|
|
253
253
|
|
|
254
|
-
A plain-text message that answers a pending question, such as one from `ask_question`, is recorded as `delivery.consumed` before eve delivers it. Calling `ctx.cancel()` from that event's hook cancels the turn instead: the question settles as `interrupted`, and the waiting tool call never receives the text.
|
|
254
|
+
A plain-text message that answers a pending question, such as one from `ask_question`, is recorded as `delivery.consumed` before eve delivers it. Only the turn's own principal can answer by text; anyone else's text waits and runs as its own turn. Like a follow-up message, the answer updates the claims on `ctx.session.auth.current` for that event's hooks and the rest of the turn. Calling `ctx.cancel()` from that event's hook cancels the turn instead: the question settles as `interrupted`, and the waiting tool call never receives the text.
|
|
255
255
|
|
|
256
256
|
The same goes for the `call.progress` a workflow tool reports while the turn waits on it: `ctx.cancel()` from its hook cancels the turn, and the run's result never reaches the model.
|
|
257
257
|
|
|
@@ -222,9 +222,11 @@ The callback URL must use `http` or `https` and reach the parent at a public add
|
|
|
222
222
|
|
|
223
223
|
Callback URLs contain only the message's callback capability, never the parent's deployment-protection bypass secret. For a parent protected by Vercel Deployment Protection, configure Trusted Sources on the parent to admit the remote project and environment.
|
|
224
224
|
|
|
225
|
-
On the remote deployment, set `EVE_CALLBACK_TRUSTED_ORIGINS` to a comma-separated list of
|
|
225
|
+
On the remote deployment, set `EVE_CALLBACK_TRUSTED_ORIGINS` to a comma-separated list of parent HTTPS origins, for example `https://parent.example.com`. Each entry is an exact origin or starts with a `*.` label, as described below. The remote attaches its own short-lived Vercel OIDC token only to those origins and its own deployment origins; an exact entry does not extend trust to other ports or subdomains. Keep the remote's Vercel OIDC token available at runtime. Callbacks do not follow redirects.
|
|
226
226
|
|
|
227
|
-
|
|
227
|
+
Outside production, a parent's callback URL uses its generated deployment URL, which changes with every deployment. If those deployments are served under a domain you control, trust them with a leading `*.` label, for example `https://*.preview.example.com`. The wildcard matches exactly one label (`parent-abc123.preview.example.com`, but not `preview.example.com` or `a.b.preview.example.com`), and the port still has to match. It must be followed by at least two labels, and entries with a trailing dot are rejected. eve also rejects `https://*.vercel.app`, because every Vercel deployment shares that domain, but it does not detect other shared domains such as `*.github.io`.
|
|
228
|
+
|
|
229
|
+
Adding an origin grants trust: that recipient receives a bearer credential for the remote project's identity, not a token scoped to the callback recipient. List only parents you trust to act as the remote project until the token expires, and use a wildcard only when you control every host under it. A recipient can replay the token against other services, deployment-protection rules, or federated cloud roles that accept that identity.
|
|
228
230
|
|
|
229
231
|
This configuration is required when upgrading a protected cross-project setup that previously relied on a bypass secret in callback URLs. If either side is not on Vercel, make the capability-protected callback route reachable through your hosting policy; the framework does not forward a deployment-wide credential to the remote service.
|
|
230
232
|
|
|
@@ -45,6 +45,12 @@ export default selfModification({
|
|
|
45
45
|
|
|
46
46
|
The bare `eve/self-modification` entry is removed. Mount `eve/extensions/self-modification/local` for development or `eve/extensions/self-modification/remote` for deployed source changes. The local mount does not accept a `deployed` option. If your mount sets `deployed`, eve rejects it and asks you to move that configuration to an `eve/extensions/self-modification/remote` mount.
|
|
47
47
|
|
|
48
|
+
## Migrate a retired scaffold
|
|
49
|
+
|
|
50
|
+
The scaffold under `agent/subagents/self-modification/` is no longer supported. The disabled agent helper, including `eve/internal/self-modification/agent`, has been removed. Do not use the old `@eve/self-modification` compatibility package for new installations.
|
|
51
|
+
|
|
52
|
+
Preserve any authored changes, then remove the old scaffold directory. Run `eve add eve/self-modification` to create the supported local extension mount. Setup rejects the old directory rather than deleting it. The bundled local extension and the separate remote extension remain supported.
|
|
53
|
+
|
|
48
54
|
## Propose changes from a deployed agent
|
|
49
55
|
|
|
50
56
|
`eve/extensions/self-modification/remote` is a separate extension for deployed agents. It adds a subagent that checks out your repository in a sandbox, edits the authored source, and opens a draft pull request against a target branch. It never changes the running deployment. Changes take effect only after you review, merge, and redeploy.
|
package/docs/reference/cli.md
CHANGED
|
@@ -34,7 +34,7 @@ eve collects CLI telemetry by default to improve the command-line interface. Run
|
|
|
34
34
|
## `eve init`
|
|
35
35
|
|
|
36
36
|
```bash
|
|
37
|
-
eve init [target] [--model <provider/model-id>] [--reasoning <effort>] [--
|
|
37
|
+
eve init [target] [--model <provider/model-id>] [--reasoning <effort>] [--non-interactive]
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
Creates a new agent app or adds an agent to an existing app. Always installs dependencies. New directories also initialize Git.
|
|
@@ -55,7 +55,6 @@ After scaffolding in an interactive human terminal, eve opens the TUI directly.
|
|
|
55
55
|
| ----------------------- | ------ | ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
|
|
56
56
|
| `--model <model>` | string | `openai/gpt-6-luna-fast` | Set the root agent's AI Gateway model ID. |
|
|
57
57
|
| `--reasoning <effort>` | enum | `high` without `--model`; otherwise provider default | Set reasoning to `none`, `minimal`, `low`, `medium`, `high`, or `xhigh`. `provider-default` leaves the field unauthored. |
|
|
58
|
-
| `--channel-web-nextjs` | flag | off | Add the Web Chat app (Next.js). Not for existing projects — run `eve add channel/web` there instead. |
|
|
59
58
|
| `-n, --non-interactive` | flag | off | Scaffold and install dependencies without starting development. |
|
|
60
59
|
|
|
61
60
|
## `eve extension`
|
package/docs/sandbox/index.mdx
CHANGED
|
@@ -69,7 +69,7 @@ export default defineSandbox(async ({ session }) => {
|
|
|
69
69
|
});
|
|
70
70
|
```
|
|
71
71
|
|
|
72
|
-
When a client prewarms a session, for example with `useEveAgent({ prewarm: true })`, eve runs the selector before the first message arrives. `session.auth` then describes the request that created the session, and the first message's `onMessage` hook can return a different identity. Do not derive per-user sandbox options or `defineState()` values from `session.auth` in an agent whose clients prewarm sessions: eve keeps both from the prewarming run. See [prewarming](/docs/guides/frontend/
|
|
72
|
+
When a client prewarms a session, for example with `useEveAgent({ prewarm: true })`, eve runs the selector before the first message arrives. `session.auth` then describes the request that created the session, and the first message's `onMessage` hook can return a different identity. Do not derive per-user sandbox options or `defineState()` values from `session.auth` in an agent whose clients prewarm sessions: eve keeps both from the prewarming run. See [prewarming](/docs/guides/frontend/use-eve-agent#prewarming) for when eve prewarms a session.
|
|
73
73
|
|
|
74
74
|
The environment export is required because `eve build` prepares immutable environment inputs before a session exists.
|
|
75
75
|
|