eve 0.84.0 → 0.84.1
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 +16 -0
- package/dist/src/channel/cross-channel-receive.d.ts +4 -1
- package/dist/src/channel/cross-channel-receive.js +1 -1
- package/dist/src/channel/delivery.js +1 -1
- package/dist/src/channel/session.js +1 -1
- package/dist/src/channel/types.d.ts +2 -0
- package/dist/src/chunks/{use-eve-agent-BbbguIdB.js → use-eve-agent-DMeP0JOF.js} +26 -10
- package/dist/src/chunks/{use-eve-agent-DWjyzplb.js → use-eve-agent-DP5Rso9C.js} +26 -10
- package/dist/src/cli/commands/init.js +1 -1
- package/dist/src/client/delivery.d.ts +2 -0
- package/dist/src/client/delivery.js +1 -1
- package/dist/src/client/optimistic-message-submissions.js +1 -1
- package/dist/src/client/session-store.js +1 -1
- package/dist/src/client/session.js +1 -1
- package/dist/src/client/sessions.d.ts +1 -0
- package/dist/src/client/sessions.js +1 -1
- package/dist/src/client/types.d.ts +2 -0
- package/dist/src/compiled/.vendor-stamp.json +2 -2
- package/dist/src/compiled/@chat-adapter/slack/index.js +13 -13
- package/dist/src/compiled/@vercel/sandbox/api-client/api-client.d.ts +75 -0
- package/dist/src/compiled/@vercel/sandbox/api-client/validators.d.ts +4 -0
- package/dist/src/compiled/@vercel/sandbox/command.d.ts +78 -0
- package/dist/src/compiled/@vercel/sandbox/drive.d.ts +41 -1
- package/dist/src/compiled/@vercel/sandbox/index.js +13 -13
- package/dist/src/compiled/@vercel/sandbox/network-policy.d.ts +35 -4
- package/dist/src/compiled/@vercel/sandbox/sandbox.d.ts +18 -4
- package/dist/src/compiled/@vercel/sandbox/session.d.ts +29 -3
- package/dist/src/compiled/@vercel/sandbox/utils/pipe-stdin.d.ts +19 -0
- package/dist/src/compiled/_chunks/client/{core-CspsxXR-.js → core-BsvaaMUJ.js} +1 -1
- package/dist/src/compiled/_chunks/node/{auth-Dztlx9pE.js → auth-v5pS3mLo.js} +1 -1
- package/dist/src/compiled/_chunks/node/is-stream-DsuQX_bd.js +1 -0
- package/dist/src/compiled/_chunks/node/token-DHGH-jVc.js +1 -0
- package/dist/src/compiled/_chunks/node/token-util-BH2pw9Qm.js +25 -0
- package/dist/src/compiled/_chunks/node/token-util-CcvxNv76.js +1 -0
- package/dist/src/compiled/_chunks/node/version-C2PfNyEv.js +1 -0
- package/dist/src/compiled/zod/index.js +1 -1
- package/dist/src/compiled/zod/v4/core.js +1 -1
- package/dist/src/compiled/zod-validation-error/index.js +1 -1
- package/dist/src/compiler/artifacts.d.ts +1 -0
- package/dist/src/compiler/artifacts.js +1 -1
- package/dist/src/compiler/manifest.d.ts +2 -2
- package/dist/src/compiler/manifest.js +1 -1
- package/dist/src/compiler/model-catalog.d.ts +8 -18
- package/dist/src/compiler/model-catalog.js +1 -1
- package/dist/src/compiler/normalize-agent-config.js +1 -1
- package/dist/src/compiler/normalize-manifest-types.d.ts +3 -0
- package/dist/src/compiler/normalize-manifest.js +1 -1
- package/dist/src/context/keys.d.ts +0 -8
- package/dist/src/context/keys.js +1 -1
- package/dist/src/eve-channel/index.js +1 -1
- package/dist/src/eve-channel/request.d.ts +1 -0
- package/dist/src/eve-channel/request.js +1 -1
- package/dist/src/eve-channel/support.js +1 -1
- package/dist/src/execution/agent-sessions/steps.js +1 -1
- package/dist/src/execution/dynamic-workflow/tool.js +1 -1
- package/dist/src/execution/sandbox/bindings/docker-cli.d.ts +2 -0
- package/dist/src/execution/sandbox/bindings/docker-cli.js +1 -1
- package/dist/src/execution/sandbox/bindings/docker-connection.js +1 -1
- package/dist/src/execution/sandbox/bindings/just-bash-runtime.js +1 -1
- package/dist/src/execution/sandbox/bindings/vercel.js +1 -1
- package/dist/src/execution/sandbox/multiplexed-command.d.ts +11 -1
- package/dist/src/execution/sandbox/multiplexed-command.js +1 -1
- package/dist/src/execution/sandbox/session.js +1 -1
- package/dist/src/execution/session-inbox/address.d.ts +1 -0
- package/dist/src/execution/session-inbox/handle.d.ts +7 -0
- package/dist/src/execution/session-inbox/handle.js +1 -0
- package/dist/src/execution/session-inbox/owner.d.ts +4 -4
- package/dist/src/execution/session-inbox/owner.js +1 -1
- package/dist/src/execution/session-inbox/resume.d.ts +1 -0
- package/dist/src/execution/session-inbox/resume.js +1 -1
- package/dist/src/execution/tools/agent-router-workflow.js +1 -1
- package/dist/src/execution/workflow-runtime.js +1 -1
- package/dist/src/harness/model-call/call.d.ts +3 -1
- package/dist/src/harness/model-call/call.js +1 -1
- package/dist/src/harness/model-call/run.js +1 -1
- package/dist/src/harness/semantic-errors/rules/gateway.js +1 -1
- package/dist/src/internal/application/compiled-artifacts.d.ts +2 -0
- package/dist/src/internal/application/compiled-artifacts.js +2 -2
- package/dist/src/internal/application/optional-package-install.js +1 -1
- package/dist/src/internal/application/stamped-package-version.js +1 -1
- package/dist/src/internal/model-catalog.d.ts +39 -16
- package/dist/src/internal/model-catalog.js +1 -1
- package/dist/src/internal/nitro/host/dev-build-host.js +1 -1
- package/dist/src/internal/nitro/routes/channel-dispatch.js +1 -1
- package/dist/src/protocol/delivery.d.ts +1 -0
- package/dist/src/public/nuxt/module.js +1 -1
- package/dist/src/reactions/kinds/model.js +1 -1
- package/dist/src/reactions/kinds/subagent.js +1 -1
- package/dist/src/runtime/agent/resolve-model.d.ts +3 -4
- package/dist/src/runtime/agent/resolve-model.js +1 -1
- package/dist/src/runtime/loaders/artifact-paths.d.ts +1 -0
- package/dist/src/runtime/loaders/artifact-paths.js +1 -1
- package/dist/src/runtime/loaders/bundled-artifacts.d.ts +2 -0
- package/dist/src/runtime/loaders/bundled-artifacts.js +1 -1
- package/dist/src/runtime/loaders/model-metadata.d.ts +4 -0
- package/dist/src/runtime/loaders/model-metadata.js +1 -0
- package/dist/src/runtime/resolve-agent.js +1 -1
- package/dist/src/runtime/sessions/compiled-agent-cache.d.ts +3 -0
- package/dist/src/runtime/sessions/compiled-agent-cache.js +1 -1
- package/dist/src/runtime/subagents/dynamic-agent-config.d.ts +2 -2
- package/dist/src/runtime/subagents/dynamic-agent-config.js +1 -1
- package/dist/src/runtime/subagents/workflow.js +1 -1
- package/dist/src/sandbox/provider.d.ts +2 -0
- package/dist/src/setup/flows/model-source-change.js +1 -1
- package/dist/src/setup/scaffold/create/project.js +1 -1
- package/dist/src/shared/agent-definition.d.ts +0 -1
- package/dist/src/shared/sandbox-session.d.ts +4 -0
- package/dist/src/svelte/index.js +1 -1
- package/dist/src/svelte/use-eve-agent.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/dist/src/vue/index.js +1 -1
- package/dist/src/vue/use-eve-agent.js +1 -1
- package/docs/agent-config.md +5 -4
- package/docs/concepts/default-harness.md +6 -0
- package/docs/evals/judge.mdx +13 -0
- package/docs/guides/client/overview.mdx +23 -1
- package/docs/reference/cli.md +1 -1
- package/docs/sandbox/custom-providers.mdx +1 -1
- package/docs/sandbox/index.mdx +1 -1
- package/docs/tools/workflows.mdx +4 -0
- package/package.json +2 -2
- package/dist/src/compiled/_chunks/node/token-Bedbhv5z.js +0 -1
- package/dist/src/compiled/_chunks/node/token-util-DpJNusVS.js +0 -1
- package/dist/src/compiled/_chunks/node/token-util-DwHQ2a3c.js +0 -1
- package/dist/src/compiled/_chunks/node/version-C__MqbLM.js +0 -1
- package/dist/src/runtime/agent/model-catalog.d.ts +0 -10
- package/dist/src/runtime/agent/model-catalog.js +0 -1
|
@@ -16,10 +16,14 @@ export interface SandboxCommandResult {
|
|
|
16
16
|
}
|
|
17
17
|
/** Options for starting a process without waiting for it to exit. */
|
|
18
18
|
export interface SandboxSpawnOptions extends SandboxRunOptions {
|
|
19
|
+
/** Opens a writable `stdin` on the process. Rejects on providers without stdin support. */
|
|
20
|
+
stdin?: boolean;
|
|
19
21
|
}
|
|
20
22
|
/** A running process with byte streams and explicit lifecycle operations. */
|
|
21
23
|
export interface SandboxProcess {
|
|
22
24
|
readonly pid?: number;
|
|
25
|
+
/** Present when spawned with `stdin: true`. Closing it sends EOF. */
|
|
26
|
+
readonly stdin?: WritableStream<Uint8Array>;
|
|
23
27
|
readonly stdout: ReadableStream<Uint8Array>;
|
|
24
28
|
readonly stderr: ReadableStream<Uint8Array>;
|
|
25
29
|
wait(): PromiseLike<{
|
package/dist/src/svelte/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
async function executeAskQuestionTool(e,t){"use workflow";return toAskQuestionOutput(await t.ask(toAskQuestionRequest(e)))}function toAskQuestionRequest(e){let t=e.options?.map(e=>({description:e.description,id:e.label,label:e.label}));return{allowFreeform:!0,display:t===void 0?`text`:`select`,prompt:e.question,...t!==void 0&&{options:t}}}function toAskQuestionOutput(e){switch(e.status){case`answered`:return{answer:e.optionId??e.text??``,status:`answered`};case`cancelled`:return{interrupted:!0};case`unavailable`:return{status:`unavailable`}}}executeAskQuestionTool.workflowId=`workflow//eve@0.84.
|
|
1
|
+
async function executeAskQuestionTool(e,t){"use workflow";return toAskQuestionOutput(await t.ask(toAskQuestionRequest(e)))}function toAskQuestionRequest(e){let t=e.options?.map(e=>({description:e.description,id:e.label,label:e.label}));return{allowFreeform:!0,display:t===void 0?`text`:`select`,prompt:e.question,...t!==void 0&&{options:t}}}function toAskQuestionOutput(e){switch(e.status){case`answered`:return{answer:e.optionId??e.text??``,status:`answered`};case`cancelled`:return{interrupted:!0};case`unavailable`:return{status:`unavailable`}}}executeAskQuestionTool.workflowId=`workflow//eve@0.84.1//executeAskQuestionTool`;export{executeAskQuestionTool,toAskQuestionOutput,toAskQuestionRequest};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{sleep}from"#compiled/@workflow/core/index.js";async function executeSleepTool(e,t){"use workflow";if(t.abortSignal.aborted)return{interrupted:!0};let n=new Promise(e=>t.abortSignal.addEventListener(`abort`,()=>e(`interrupted`),{once:!0})),r=sleep(Math.ceil(e.seconds*1e3)).then(()=>`elapsed`);return await Promise.race([r,n])===`elapsed`?{waitedSeconds:e.seconds}:{interrupted:!0}}executeSleepTool.workflowId=`workflow//eve@0.84.
|
|
1
|
+
import{sleep}from"#compiled/@workflow/core/index.js";async function executeSleepTool(e,t){"use workflow";if(t.abortSignal.aborted)return{interrupted:!0};let n=new Promise(e=>t.abortSignal.addEventListener(`abort`,()=>e(`interrupted`),{once:!0})),r=sleep(Math.ceil(e.seconds*1e3)).then(()=>`elapsed`);return await Promise.race([r,n])===`elapsed`?{waitedSeconds:e.seconds}:{interrupted:!0}}executeSleepTool.workflowId=`workflow//eve@0.84.1//executeSleepTool`;export{executeSleepTool};
|
package/dist/src/vue/index.js
CHANGED
package/docs/agent-config.md
CHANGED
|
@@ -177,10 +177,11 @@ The function returns a Gateway model ID, an AI SDK `LanguageModel`, or a selecti
|
|
|
177
177
|
- **Serialization.** Only memo results must be JSON. The function can return a live provider
|
|
178
178
|
instance built from those results. `ctx.model` is unavailable during model selection.
|
|
179
179
|
- **Selection object.** `{ model, reasoning?, modelContextWindowTokens?, modelOptions? }`.
|
|
180
|
-
When `modelContextWindowTokens` is omitted, eve
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
180
|
+
When `modelContextWindowTokens` is omitted, eve reads it from the AI Gateway model catalog that
|
|
181
|
+
`eve build` or `eve dev` recorded, so selecting a model makes no network request. A model that
|
|
182
|
+
catalog doesn't list fails the turn: set `modelContextWindowTokens` for an unlisted, custom, or
|
|
183
|
+
newly published model, or rebuild. Dynamic agents cannot set sibling `modelContextWindowTokens` or
|
|
184
|
+
`modelOptions` fields; return per-model values from the function.
|
|
184
185
|
|
|
185
186
|
The `session.started` runtime identity does not include a model ID for a dynamic agent. Each public
|
|
186
187
|
`model.started` event reports the concrete model selected for that model call.
|
|
@@ -24,6 +24,12 @@ input token count plus an estimate of new messages. A smaller character estimate
|
|
|
24
24
|
alone cannot satisfy compaction triggered by a higher provider count. If trimming
|
|
25
25
|
cannot free enough space, eve summarizes the older history.
|
|
26
26
|
|
|
27
|
+
The summary call retries transient provider errors like any model call. If it
|
|
28
|
+
still fails for any reason other than staying over the threshold, eve reports it
|
|
29
|
+
as a failed model call: the turn fails with `MODEL_CALL_FAILED` and the history
|
|
30
|
+
stays uncompacted. A transient error such as a 429 leaves the session waiting
|
|
31
|
+
for the next message.
|
|
32
|
+
|
|
27
33
|
First-class [memory](../memory) stays outside history, so the summarizer never
|
|
28
34
|
sees it. eve asks providers to capture before compaction rewrites history, and
|
|
29
35
|
what earlier turns recalled follows the checkpoint.
|
package/docs/evals/judge.mdx
CHANGED
|
@@ -66,6 +66,19 @@ t.judge("The assistant remembers the user's favorite word across turns.", {
|
|
|
66
66
|
|
|
67
67
|
The transcript contains user and assistant messages in turn order, excluding reasoning, tool calls, and tool results. See [Multi-turn evals](./cases#multi-turn-evals).
|
|
68
68
|
|
|
69
|
+
`turn.reply` is the turn's final reply. A turn can reply more than once, for example to confirm that work is underway before it waits on tasks. `session.transcript` includes every reply alongside the user's messages. To grade only one turn's replies, filter its messages with `transcriptOf` from `eve/client`:
|
|
70
|
+
|
|
71
|
+
```ts
|
|
72
|
+
import { transcriptOf } from "eve/client";
|
|
73
|
+
|
|
74
|
+
const turn = await t.send("Check the deploy and tell me when it's done.");
|
|
75
|
+
const replies = transcriptOf(turn.events)
|
|
76
|
+
.messages.filter((message) => message.role === "assistant")
|
|
77
|
+
.map((message) => message.text);
|
|
78
|
+
|
|
79
|
+
t.judge("The agent reported the deploy's result.", { on: replies.join("\n\n") }).atLeast(0.8);
|
|
80
|
+
```
|
|
81
|
+
|
|
69
82
|
## Decide several questions together
|
|
70
83
|
|
|
71
84
|
A batch makes one decision request against one shared state. Pass `state` to replace the default `{ input, output }` completely. Batch calls use `state` instead of `on`.
|
|
@@ -113,6 +113,28 @@ await response.result();
|
|
|
113
113
|
|
|
114
114
|
Per-request headers override client-level values with the same name. For example, a turn can set its application user's `Authorization` header while `vercelOidc` continues to send the deployment-protection credential in `x-vercel-trusted-oidc-idp-token`.
|
|
115
115
|
|
|
116
|
+
## Reusing a session inbox
|
|
117
|
+
|
|
118
|
+
Keep the complete `session.state` when saving and restoring a conversation. It can include an
|
|
119
|
+
opaque `inbox` handle returned by the server. The client sends this handle with later messages
|
|
120
|
+
to avoid another hook lookup. Treat it as transport state: do not inspect or edit it.
|
|
121
|
+
|
|
122
|
+
Set `EVE_INBOX_HANDLE_SECRET` to the same server-only random secret (at least 32 characters)
|
|
123
|
+
on the deployments that share sessions. Without this key, handles are neither issued nor used.
|
|
124
|
+
The signature authenticates all routing and encryption fields before use. Rotation falls back
|
|
125
|
+
to ordinary token resolution.
|
|
126
|
+
|
|
127
|
+
Reuse also requires a Workflow SDK with `parseHookResumeHandle`, an adapter that declares
|
|
128
|
+
`resolvedHookResume`, and a backend with the guarded resolved-hook endpoint.
|
|
129
|
+
Older SDKs do not issue or use handles, even when the secret
|
|
130
|
+
is configured. This change keeps the released SDK dependencies; adopting the SDK update
|
|
131
|
+
enables the optimization. Handles exclude user metadata, live capabilities, and trace carriers,
|
|
132
|
+
which may contain private server baggage. The signature authenticates a handle; it does not hide its contents.
|
|
133
|
+
|
|
134
|
+
The server checks that the handle addresses the requested inbox. Workflow still validates the
|
|
135
|
+
hook, persists the message, and wakes the workflow. A definite stale-owner rejection resolves
|
|
136
|
+
the current inbox again. An uncertain write is surfaced without submitting a second delivery.
|
|
137
|
+
|
|
116
138
|
## Sessions
|
|
117
139
|
|
|
118
140
|
Create and park an ID-addressed conversation before its first turn when you can start session work
|
|
@@ -163,7 +185,7 @@ for await (const event of session.stream({ follow: false })) {
|
|
|
163
185
|
await session.reset({ reason: "User requested a fresh session" });
|
|
164
186
|
```
|
|
165
187
|
|
|
166
|
-
`client.sessions` stores
|
|
188
|
+
`client.sessions` stores the session ID, stream cursor, and optional opaque inbox handle. Every method calls an ID-addressed `/eve/v1/session/:sessionId/...` route. Sending through a handle for an unknown or terminal ID fails instead of creating a replacement, and reset leaves the handle pinned to the retired ID.
|
|
167
189
|
|
|
168
190
|
A client can own many independent fixed sessions at once:
|
|
169
191
|
|
package/docs/reference/cli.md
CHANGED
|
@@ -47,7 +47,7 @@ Creates a new agent app or adds an agent to an existing app. Always installs dep
|
|
|
47
47
|
| `eve init` or `eve init .` in an existing project | Adds `agent/` plus missing `eve`, `ai`, and `zod` dependencies. Requires `package.json` and no existing `agent/` files |
|
|
48
48
|
| `eve init path/to/app` | Adds an agent to the existing package at `path/to/app` |
|
|
49
49
|
|
|
50
|
-
Existing packages do not need a target-selection prompt: run `eve init` from the project directory or `eve init path/to/app`. New projects in non-interactive environments need a new directory name, such as `eve init my-agent`.
|
|
50
|
+
Existing packages do not need a target-selection prompt: run `eve init` from the project directory or `eve init path/to/app`. New projects in non-interactive environments need a new directory name, such as `eve init my-agent`. A new project path can be nested, such as `eve init apps/my-agent`; eve creates missing parent directories.
|
|
51
51
|
|
|
52
52
|
After scaffolding in an interactive human terminal, eve opens the TUI directly. Pass `-n` or `--non-interactive` to return after scaffolding instead. It still installs dependencies and follows the normal Git setup behavior. Noninteractive and coding-agent invocations return without starting an interactive session. Fresh projects use the parent workspace's package manager when there is one; otherwise they use the manager that launched `eve init`.
|
|
53
53
|
|
|
@@ -110,7 +110,7 @@ export default defineSandbox(() => environment.open({ egress: "deny-all" }));
|
|
|
110
110
|
|
|
111
111
|
A `SandboxConnection` is the byte-level link to one sandbox. Each method has a fixed contract:
|
|
112
112
|
|
|
113
|
-
- `spawn({ command, workingDirectory, env, signal })` runs `command` as a Bash login-shell script (`bash -lc`) in `workingDirectory`, with the sandbox's environment plus `env`. `env` holds only the per-call variables. Aborting kills the process tree. It resolves to a process with `stdout` and `stderr` byte streams, `wait()`, and `kill()`.
|
|
113
|
+
- `spawn({ command, workingDirectory, env, signal })` runs `command` as a Bash login-shell script (`bash -lc`) in `workingDirectory`, with the sandbox's environment plus `env`. `env` holds only the per-call variables. Aborting kills the process tree. It resolves to a process with `stdout` and `stderr` byte streams, `wait()`, and `kill()`. When the call passes `stdin: true`, the process must also have a writable `stdin` stream; without one, eve kills the process and rejects the call.
|
|
114
114
|
- `readFile({ path, signal })` resolves to the file's bytes or a byte stream, or to `null` only when the path does not exist. A directory or an unreadable path rejects.
|
|
115
115
|
- `writeFiles({ files, signal })` writes every file, creating missing parent directories and overwriting existing files. It is the only write primitive.
|
|
116
116
|
- `removePath({ path, force, recursive, signal })` removes a file or directory. `force` ignores a missing path, and `recursive` removes a non-empty directory.
|
package/docs/sandbox/index.mdx
CHANGED
|
@@ -26,7 +26,7 @@ export default defineTool({
|
|
|
26
26
|
});
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
-
Relative paths resolve from the workspace root, and `sandbox.resolvePath(".")` returns its absolute path. `run()` returns `{ exitCode, stdout, stderr }`; a nonzero exit code does not throw automatically. Use `spawn()` for a long-running process.
|
|
29
|
+
Relative paths resolve from the workspace root, and `sandbox.resolvePath(".")` returns its absolute path. `run()` returns `{ exitCode, stdout, stderr }`; a nonzero exit code does not throw automatically. Use `spawn()` for a long-running process. Pass `stdin: true` to get a writable `stdin` stream on the process, for example to talk to a stdio server; closing it sends EOF. The Vercel and Docker sandboxes support it.
|
|
30
30
|
|
|
31
31
|
Built-in environments set `AI_AGENT=eve` on every `run()` and `spawn()` call, including the `bash` tool and `prepare`, so agent-aware CLIs such as `vercel` skip interactive prompts. To use a different value, set `AI_AGENT` in the environment's `env` option or pass it in the `env` of one `run()` or `spawn()` call.
|
|
32
32
|
|
package/docs/tools/workflows.mdx
CHANGED
|
@@ -613,6 +613,10 @@ const reviewer = ctx.agent("agent", {
|
|
|
613
613
|
});
|
|
614
614
|
```
|
|
615
615
|
|
|
616
|
+
Without `modelContextWindowTokens`, eve reads the model's context window from the AI Gateway model
|
|
617
|
+
catalog recorded when the agent was built. Set it for a model that catalog doesn't list; otherwise
|
|
618
|
+
the first `send` rejects.
|
|
619
|
+
|
|
616
620
|
The selection must contain an AI Gateway model id. A live AI SDK `LanguageModel` cannot cross the
|
|
617
621
|
durable workflow boundary. A remote agent rejects the option because its deployment owns its model
|
|
618
622
|
configuration.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eve",
|
|
3
|
-
"version": "0.84.
|
|
3
|
+
"version": "0.84.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Filesystem-first framework for durable backend AI agents that run anywhere.",
|
|
6
6
|
"keywords": [
|
|
@@ -618,7 +618,7 @@
|
|
|
618
618
|
"@vercel/oidc": "3.8.0",
|
|
619
619
|
"@vercel/otel": "2.1.3",
|
|
620
620
|
"@vercel/queue": "0.5.1",
|
|
621
|
-
"@vercel/sandbox": "3.
|
|
621
|
+
"@vercel/sandbox": "3.9.0",
|
|
622
622
|
"@vercel/schedules": "0.0.0-alpha.11",
|
|
623
623
|
"@vercel/sdk": "1.28.8",
|
|
624
624
|
"@workflow/core": "5.2.3",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./rolldown-runtime-tZXQYakl.js";import{r as t,t as n}from"./token-util-DpJNusVS.js";var r=e(((e,r)=>{var i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,c=(e,t)=>{for(var n in t)i(e,n,{get:t[n],enumerable:!0})},l=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of o(t))!s.call(e,c)&&c!==n&&i(e,c,{get:()=>t[c],enumerable:!(r=a(t,c))||r.enumerable});return e},u=e=>l(i({},`__esModule`,{value:!0}),e),d={};c(d,{refreshToken:()=>m}),r.exports=u(d);var f=t(),p=n();async function m(e){let t=e?.project,n=e?.team;if(!t&&!n){let e=(0,p.findProjectInfo)();t=e.projectId,n=e.teamId}else if(!t||!n){let e=(0,p.findProjectInfo)();t??=e.projectId,n??=e.teamId}if(!t)throw new f.VercelOidcTokenError("Failed to refresh OIDC token: No project specified. Try re-linking your project with `vc link`");let r=(0,p.loadToken)(t);if(!r||(0,p.isExpired)((0,p.getTokenPayload)(r.token),e?.expirationBufferMs)){let i=await(0,p.getVercelToken)({expirationBufferMs:e?.expirationBufferMs});if(r=await(0,p.getVercelOidcToken)(i,t,n),!r)throw new f.VercelOidcTokenError(`Failed to refresh OIDC token`);(0,p.saveToken)(r,t)}process.env.VERCEL_OIDC_TOKEN=r.token}0&&(r.exports={refreshToken:m})}));export default r();export{};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e,t}from"./rolldown-runtime-tZXQYakl.js";var n=t(((e,t)=>{var n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,o=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},s=(e,t,o,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of i(t))!a.call(e,c)&&c!==o&&n(e,c,{get:()=>t[c],enumerable:!(s=r(t,c))||s.enumerable});return e},c=e=>s(n({},`__esModule`,{value:!0}),e),l={};o(l,{VercelOidcTokenError:()=>u}),t.exports=c(l);var u=class extends Error{constructor(e,t){super(e),this.name=`VercelOidcTokenError`,this.cause=t}toString(){return this.cause?`${this.name}: ${this.message}: ${this.cause}`:`${this.name}: ${this.message}`}};0&&(t.exports={VercelOidcTokenError:u})})),r=t(((e,t)=>{var n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,o=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},s=(e,t,o,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of i(t))!a.call(e,c)&&c!==o&&n(e,c,{get:()=>t[c],enumerable:!(s=r(t,c))||s.enumerable});return e},c=e=>s(n({},`__esModule`,{value:!0}),e),l={};o(l,{AccessTokenMissingError:()=>u,RefreshAccessTokenFailedError:()=>d}),t.exports=c(l);var u=class extends Error{constructor(){super(`No authentication found. Please log in with the Vercel CLI (vercel login).`),this.name=`AccessTokenMissingError`}},d=class extends Error{constructor(e){super(`Failed to refresh authentication token.`,{cause:e}),this.name=`RefreshAccessTokenFailedError`}};0&&(t.exports={AccessTokenMissingError:u,RefreshAccessTokenFailedError:d})})),i=t(((t,r)=>{var i=Object.create,a=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,c=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,u=(e,t)=>{for(var n in t)a(e,n,{get:t[n],enumerable:!0})},d=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of s(t))!l.call(e,i)&&i!==n&&a(e,i,{get:()=>t[i],enumerable:!(r=o(t,i))||r.enumerable});return e},f=(e,t,n)=>(n=e==null?{}:i(c(e)),d(t||!e||!e.__esModule?a(n,`default`,{value:e,enumerable:!0}):n,e)),p=e=>d(a({},`__esModule`,{value:!0}),e),m={};u(m,{findRootDir:()=>y,getUserDataDir:()=>b}),r.exports=p(m);var h=f(e(`path`)),g=f(e(`fs`)),_=f(e(`os`)),v=n();function y(){try{let e=process.cwd();for(;e!==h.default.dirname(e);){let t=h.default.join(e,`.vercel`);if(g.default.existsSync(t))return e;e=h.default.dirname(e)}}catch{throw new v.VercelOidcTokenError(`Token refresh only supported in node server environments`)}return null}function b(){if(process.env.XDG_DATA_HOME)return process.env.XDG_DATA_HOME;switch(_.default.platform()){case`darwin`:return h.default.join(_.default.homedir(),`Library/Application Support`);case`linux`:return h.default.join(_.default.homedir(),`.local/share`);case`win32`:return process.env.LOCALAPPDATA?process.env.LOCALAPPDATA:null;default:return null}}0&&(r.exports={findRootDir:y,getUserDataDir:b})})),a=t(((t,n)=>{var r=Object.create,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,c=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,u=(e,t)=>{for(var n in t)i(e,n,{get:t[n],enumerable:!0})},d=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let s of o(t))!l.call(e,s)&&s!==n&&i(e,s,{get:()=>t[s],enumerable:!(r=a(t,s))||r.enumerable});return e},f=(e,t,n)=>(n=e==null?{}:r(c(e)),d(t||!e||!e.__esModule?i(n,`default`,{value:e,enumerable:!0}):n,e)),p=e=>d(i({},`__esModule`,{value:!0}),e),m={};u(m,{isValidAccessToken:()=>x,readAuthConfig:()=>y,writeAuthConfig:()=>b}),n.exports=p(m);var h=f(e(`fs`)),g=f(e(`path`)),_=s();function v(){let e=(0,_.getVercelDataDir)();if(!e)throw Error(`Unable to find Vercel CLI data directory. Your platform: ${process.platform}. Supported: darwin, linux, win32.`);return g.join(e,`auth.json`)}function y(){try{let e=v();if(!h.existsSync(e))return null;let t=h.readFileSync(e,`utf8`);return t?JSON.parse(t):null}catch{return null}}function b(e){let t=v(),n=g.dirname(t);h.existsSync(n)||h.mkdirSync(n,{mode:504,recursive:!0}),h.writeFileSync(t,JSON.stringify(e,null,2),{mode:384})}function x(e,t=0){if(!e.token)return!1;if(typeof e.expiresAt!=`number`)return!0;let n=Math.floor(Date.now()/1e3),r=t/1e3;return e.expiresAt>=n+r}0&&(n.exports={isValidAccessToken:x,readAuthConfig:y,writeAuthConfig:b})})),o=t(((t,n)=>{var r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,s=(e,t)=>{for(var n in t)r(e,n,{get:t[n],enumerable:!0})},c=(e,t,n,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of a(t))!o.call(e,c)&&c!==n&&r(e,c,{get:()=>t[c],enumerable:!(s=i(t,c))||s.enumerable});return e},l=e=>c(r({},`__esModule`,{value:!0}),e),u={};s(u,{processTokenResponse:()=>g,refreshTokenRequest:()=>h}),n.exports=l(u);var d=e(`os`);let f=`@vercel/oidc node-${process.version} ${(0,d.platform)()} (${(0,d.arch)()}) ${(0,d.hostname)()}`,p=null;async function m(){if(p)return p;let e=await fetch(`https://vercel.com/.well-known/openid-configuration`,{headers:{"user-agent":f}});if(!e.ok)throw Error(`Failed to discover OAuth endpoints`);let t=await e.json();if(!t||typeof t.token_endpoint!=`string`)throw Error(`Invalid OAuth discovery response`);let n=t.token_endpoint;return p=n,n}async function h(e){let t=await m();return await fetch(t,{method:`POST`,headers:{"Content-Type":`application/x-www-form-urlencoded`,"user-agent":f},body:new URLSearchParams({client_id:`cl_HYyOPBNtFMfHhaUn9L4QPfTZz6TP47bp`,grant_type:`refresh_token`,...e})})}async function g(e){let t=await e.json();if(!e.ok){let e=typeof t==`object`&&t&&`error`in t?String(t.error):`Token refresh failed`;return[Error(e)]}return typeof t!=`object`||!t?[Error(`Invalid token response`)]:typeof t.access_token==`string`?t.token_type===`Bearer`?typeof t.expires_in==`number`?[null,t]:[Error(`Missing expires_in in response`)]:[Error(`Invalid token_type in response`)]:[Error(`Missing access_token in response`)]}0&&(n.exports={processTokenResponse:g,refreshTokenRequest:h})})),s=t(((t,s)=>{var c=Object.create,l=Object.defineProperty,u=Object.getOwnPropertyDescriptor,d=Object.getOwnPropertyNames,f=Object.getPrototypeOf,p=Object.prototype.hasOwnProperty,m=(e,t)=>{for(var n in t)l(e,n,{get:t[n],enumerable:!0})},h=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of d(t))!p.call(e,i)&&i!==n&&l(e,i,{get:()=>t[i],enumerable:!(r=u(t,i))||r.enumerable});return e},g=(e,t,n)=>(n=e==null?{}:c(f(e)),h(t||!e||!e.__esModule?l(n,`default`,{value:e,enumerable:!0}):n,e)),_=e=>h(l({},`__esModule`,{value:!0}),e),v={};m(v,{assertVercelOidcTokenResponse:()=>k,findProjectInfo:()=>A,getTokenPayload:()=>N,getVercelDataDir:()=>E,getVercelOidcToken:()=>O,getVercelToken:()=>D,isExpired:()=>P,loadToken:()=>M,saveToken:()=>j}),s.exports=_(v);var y=g(e(`path`)),b=g(e(`fs`)),x=n(),S=i(),C=a(),w=o(),T=r();function E(){let e=(0,S.getUserDataDir)();return e?y.join(e,`com.vercel.cli`):null}async function D(e){let t=(0,C.readAuthConfig)();if(!t?.token)throw new T.AccessTokenMissingError;if((0,C.isValidAccessToken)(t,e?.expirationBufferMs))return t.token;if(!t.refreshToken)throw(0,C.writeAuthConfig)({}),new T.RefreshAccessTokenFailedError(`No refresh token available`);try{let e=await(0,w.refreshTokenRequest)({refresh_token:t.refreshToken}),[n,r]=await(0,w.processTokenResponse)(e);if(n||!r)throw(0,C.writeAuthConfig)({}),new T.RefreshAccessTokenFailedError(n);let i={token:r.access_token,expiresAt:Math.floor(Date.now()/1e3)+r.expires_in};return r.refresh_token&&(i.refreshToken=r.refresh_token),(0,C.writeAuthConfig)(i),i.token}catch(e){throw(0,C.writeAuthConfig)({}),e instanceof T.AccessTokenMissingError||e instanceof T.RefreshAccessTokenFailedError?e:new T.RefreshAccessTokenFailedError(e)}}async function O(e,t,n){let r=`https://api.vercel.com/v1/projects/${t}/token?source=vercel-oidc-refresh${n?`&teamId=${n}`:``}`,i=await fetch(r,{method:`POST`,headers:{Authorization:`Bearer ${e}`}});if(!i.ok)throw new x.VercelOidcTokenError(`Failed to refresh OIDC token: ${i.statusText}`);let a=await i.json();return k(a),a}function k(e){if(!e||typeof e!=`object`)throw TypeError("Vercel OIDC token is malformed. Expected an object. Please run `vc env pull` and try again");if(!(`token`in e)||typeof e.token!=`string`)throw TypeError("Vercel OIDC token is malformed. Expected a string-valued token property. Please run `vc env pull` and try again")}function A(){let e=(0,S.findRootDir)();if(!e)throw new x.VercelOidcTokenError("Unable to find project root directory. Have you linked your project with `vc link?`");let t=y.join(e,`.vercel`,`project.json`);if(!b.existsSync(t))throw new x.VercelOidcTokenError("project.json not found, have you linked your project with `vc link?`");let n=JSON.parse(b.readFileSync(t,`utf8`));if(typeof n.projectId!=`string`&&typeof n.orgId!=`string`)throw TypeError("Expected a string-valued projectId property. Try running `vc link` to re-link your project.");return{projectId:n.projectId,teamId:n.orgId}}function j(e,t){let n=(0,S.getUserDataDir)();if(!n)throw new x.VercelOidcTokenError(`Unable to find user data directory. Please reach out to Vercel support.`);let r=y.join(n,`com.vercel.token`,`${t}.json`),i=JSON.stringify(e);b.mkdirSync(y.dirname(r),{mode:504,recursive:!0}),b.writeFileSync(r,i),b.chmodSync(r,432)}function M(e){let t=(0,S.getUserDataDir)();if(!t)throw new x.VercelOidcTokenError(`Unable to find user data directory. Please reach out to Vercel support.`);let n=y.join(t,`com.vercel.token`,`${e}.json`);if(!b.existsSync(n))return null;let r=JSON.parse(b.readFileSync(n,`utf8`));return k(r),r}function N(e){let t=e.split(`.`);if(t.length!==3)throw new x.VercelOidcTokenError("Invalid token. Please run `vc env pull` and try again");let n=t[1].replace(/-/g,`+`).replace(/_/g,`/`),r=n.padEnd(n.length+(4-n.length%4)%4,`=`);return JSON.parse(Buffer.from(r,`base64`).toString(`utf8`))}function P(e,t=0){return e.exp*1e3<Date.now()+t}0&&(s.exports={assertVercelOidcTokenResponse:k,findProjectInfo:A,getTokenPayload:N,getVercelDataDir:E,getVercelOidcToken:O,getVercelToken:D,isExpired:P,loadToken:M,saveToken:j})}));export{r as n,n as r,s as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./token-util-DpJNusVS.js";export default e();export{};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=`3.3.0`;export{e as t};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export interface RuntimeModelMetadata {
|
|
2
|
-
readonly contextWindowTokens: number;
|
|
3
|
-
readonly maxOutputTokens?: number;
|
|
4
|
-
readonly resolvedModelId: string;
|
|
5
|
-
}
|
|
6
|
-
export interface RuntimeModelCatalog {
|
|
7
|
-
getByGatewayId(modelId: string): Promise<RuntimeModelMetadata | null>;
|
|
8
|
-
getByProviderModelId(provider: string, providerModelId: string): Promise<RuntimeModelMetadata | null>;
|
|
9
|
-
}
|
|
10
|
-
export declare function createRuntimeModelCatalog(fetchCatalog?: typeof globalThis.fetch): RuntimeModelCatalog;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{AI_GATEWAY_MODELS_CATALOG_URL,vercelGatewayFetch}from"#internal/gateway.js";import{findCatalogModelByProviderModelId,findCatalogModelBySlug,modelCatalogLimitsFromProvider,modelCatalogResponseSchema}from"#internal/model-catalog.js";function createRuntimeModelCatalog(e=vercelGatewayFetch){let t=null,loadCatalog=async()=>(t===null&&(t=e(AI_GATEWAY_MODELS_CATALOG_URL).then(async e=>{if(!e.ok)throw Error(`AI Gateway model catalog request failed with HTTP ${e.status} ${e.statusText}.`);return parseCatalogResponse(await e.json())}).catch(e=>{throw t=null,e})),await t);return{async getByGatewayId(e){let t=await loadCatalog(),n=findCatalogModelBySlug(t.models,e);if(n===void 0)return null;for(let e of n.providers){let t=modelCatalogLimitsFromProvider(e);if(t!==null)return{...t,resolvedModelId:n.slug}}return null},async getByProviderModelId(e,t){let n=await loadCatalog(),r=findCatalogModelByProviderModelId({models:n.models,provider:e,providerAliases:n.providerAliases,providerModelId:t});if(r===null)return null;let i=modelCatalogLimitsFromProvider(r.provider);return i===null?null:{...i,resolvedModelId:r.model.slug}}}}function parseCatalogResponse(e){let t=modelCatalogResponseSchema.safeParse(e);if(!t.success)throw Error(`AI Gateway model catalog response did not match the expected schema.`);return t.data}export{createRuntimeModelCatalog};
|