eve 0.18.2 → 0.20.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/CHANGELOG.md +27 -0
- package/dist/src/cli/dev/tui/setup-selection-input.js +1 -1
- package/dist/src/cli/dev/tui/stream-format.d.ts +4 -0
- package/dist/src/cli/dev/tui/stream-format.js +1 -1
- package/dist/src/cli/dev/tui/terminal-renderer.js +1 -1
- package/dist/src/cli/dev/tui/test/mock-terminal.d.ts +2 -0
- package/dist/src/cli/dev/tui/test/mock-terminal.js +1 -1
- package/dist/src/compiled/.vendor-stamp.json +2 -1
- package/dist/src/compiled/@chat-adapter/slack/index.js +29 -32
- package/dist/src/compiled/@chat-adapter/twilio/LICENSE +9 -0
- package/dist/src/compiled/@chat-adapter/twilio/api.d.ts +108 -0
- package/dist/src/compiled/@chat-adapter/twilio/api.js +1 -0
- package/dist/src/compiled/@chat-adapter/twilio/format.d.ts +12 -0
- package/dist/src/compiled/@chat-adapter/twilio/format.js +1 -0
- package/dist/src/compiled/@chat-adapter/twilio/index.d.ts +84 -0
- package/dist/src/compiled/@chat-adapter/twilio/index.js +1 -0
- package/dist/src/compiled/@chat-adapter/twilio/voice.d.ts +44 -0
- package/dist/src/compiled/@chat-adapter/twilio/voice.js +1 -0
- package/dist/src/compiled/@chat-adapter/twilio/webhook.d.ts +18 -0
- package/dist/src/compiled/@chat-adapter/twilio/webhook.js +1 -0
- package/dist/src/compiled/_chunks/node/chunk-5OX2R7AJ-CxVV-owP.js +1 -0
- package/dist/src/compiled/_chunks/node/chunk-PFJ2G64A-B79fSABi.js +1 -0
- package/dist/src/compiled/_chunks/node/chunk-QZV7YRVM-Dzw4WEBv.js +1 -0
- package/dist/src/compiled/_chunks/node/dist-RHRJZ03Q.js +4 -0
- package/dist/src/context/build-base-tool-context.d.ts +9 -0
- package/dist/src/context/build-base-tool-context.js +1 -0
- package/dist/src/context/build-dynamic-tools.js +1 -1
- package/dist/src/context/dynamic-tool-lifecycle.js +1 -1
- package/dist/src/evals/cli/eval.js +4 -1
- package/dist/src/evals/runner/discover.d.ts +10 -0
- package/dist/src/evals/runner/discover.js +1 -1
- package/dist/src/execution/durable-session-migrations/turn-workflow.d.ts +2 -0
- package/dist/src/execution/node-step.d.ts +2 -0
- package/dist/src/execution/node-step.js +1 -1
- package/dist/src/execution/sandbox/abort-bound-session.d.ts +6 -0
- package/dist/src/execution/sandbox/abort-bound-session.js +1 -0
- package/dist/src/execution/sandbox/active-handles.d.ts +29 -0
- package/dist/src/execution/sandbox/active-handles.js +1 -0
- package/dist/src/execution/sandbox/bindings/docker.d.ts +2 -2
- package/dist/src/execution/sandbox/bindings/docker.js +1 -1
- package/dist/src/execution/sandbox/bindings/just-bash-runtime.js +1 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-lifecycle.js +1 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-provider-state.d.ts +11 -0
- package/dist/src/execution/sandbox/bindings/microsandbox-provider-state.js +1 -0
- package/dist/src/execution/sandbox/bindings/microsandbox-runtime.d.ts +7 -4
- package/dist/src/execution/sandbox/bindings/microsandbox-runtime.js +1 -1
- package/dist/src/execution/sandbox/bindings/vercel.js +1 -1
- package/dist/src/execution/sandbox/ensure.js +1 -1
- package/dist/src/execution/sandbox/require-sandbox.d.ts +3 -1
- package/dist/src/execution/sandbox/require-sandbox.js +1 -1
- package/dist/src/execution/tool-auth.d.ts +2 -1
- package/dist/src/execution/tool-auth.js +1 -1
- package/dist/src/execution/web-fetch/tool.d.ts +6 -1
- package/dist/src/execution/web-fetch/tool.js +1 -1
- package/dist/src/execution/workflow-steps.js +1 -1
- package/dist/src/harness/action-result-helpers.d.ts +11 -1
- package/dist/src/harness/action-result-helpers.js +1 -1
- package/dist/src/harness/attachment-staging.js +1 -1
- package/dist/src/harness/compaction.d.ts +1 -1
- package/dist/src/harness/compaction.js +1 -1
- package/dist/src/harness/emission.d.ts +1 -0
- package/dist/src/harness/emission.js +1 -1
- package/dist/src/harness/execute-tool.d.ts +2 -1
- package/dist/src/harness/model-call-error.js +1 -1
- package/dist/src/harness/step-hooks.d.ts +1 -1
- package/dist/src/harness/step-hooks.js +1 -1
- package/dist/src/harness/tool-loop.js +1 -1
- package/dist/src/harness/tools.d.ts +2 -3
- package/dist/src/harness/tools.js +1 -1
- package/dist/src/harness/turn-cancellation.d.ts +8 -0
- package/dist/src/harness/turn-cancellation.js +1 -0
- package/dist/src/harness/turn-tag-state.d.ts +2 -0
- package/dist/src/harness/turn-tag-state.js +1 -1
- package/dist/src/harness/types.d.ts +2 -0
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/internal/nitro/dev-runtime-source-snapshot-copy.js +1 -1
- package/dist/src/internal/nitro/host/configure-nitro-routes.js +1 -1
- package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
- package/dist/src/internal/nitro/host/dev-authored-source-watcher.js +1 -1
- package/dist/src/internal/nitro/host/sandbox-shutdown-plugin.d.ts +40 -0
- package/dist/src/internal/nitro/host/sandbox-shutdown-plugin.js +1 -0
- package/dist/src/internal/nitro/host/start-production-server.js +1 -1
- package/dist/src/internal/nitro/routes/index.d.ts +7 -2
- package/dist/src/internal/nitro/routes/index.js +78 -48
- package/dist/src/protocol/message.d.ts +14 -2
- package/dist/src/protocol/message.js +2 -2
- package/dist/src/public/channels/chat-sdk/chatSdkChannel.d.ts +141 -0
- package/dist/src/public/channels/chat-sdk/chatSdkChannel.js +3 -0
- package/dist/src/public/channels/chat-sdk/index.d.ts +1 -0
- package/dist/src/public/channels/chat-sdk/index.js +1 -0
- package/dist/src/public/channels/discord/discordChannel.js +1 -1
- package/dist/src/public/channels/index.d.ts +2 -0
- package/dist/src/public/channels/slack/api.js +1 -1
- package/dist/src/public/channels/twilio/api.d.ts +8 -29
- package/dist/src/public/channels/twilio/api.js +1 -1
- package/dist/src/public/channels/twilio/inbound.d.ts +10 -19
- package/dist/src/public/channels/twilio/inbound.js +2 -2
- package/dist/src/public/channels/twilio/routing.d.ts +13 -0
- package/dist/src/public/channels/twilio/routing.js +1 -0
- package/dist/src/public/channels/twilio/twilioChannel.js +1 -1
- package/dist/src/public/channels/twilio/twiml.d.ts +5 -36
- package/dist/src/public/channels/twilio/twiml.js +1 -1
- package/dist/src/public/channels/twilio/verify.d.ts +12 -33
- package/dist/src/public/channels/twilio/verify.js +1 -1
- package/dist/src/public/definitions/approval.d.ts +4 -1
- package/dist/src/public/definitions/tool.d.ts +7 -0
- package/dist/src/public/tools/internal.d.ts +3 -2
- package/dist/src/public/tools/internal.js +1 -1
- package/dist/src/runtime/connections/mcp-client.d.ts +2 -2
- package/dist/src/runtime/connections/mcp-client.js +1 -1
- package/dist/src/runtime/connections/openapi-client.d.ts +2 -2
- package/dist/src/runtime/connections/openapi-client.js +1 -1
- package/dist/src/runtime/connections/types.d.ts +6 -1
- package/dist/src/runtime/framework-tools/bash.js +1 -1
- package/dist/src/runtime/framework-tools/connection-search-dynamic.js +1 -1
- package/dist/src/runtime/framework-tools/glob.js +1 -1
- package/dist/src/runtime/framework-tools/grep.js +1 -1
- package/dist/src/runtime/framework-tools/read-file.js +1 -1
- package/dist/src/runtime/framework-tools/web-fetch.js +1 -1
- package/dist/src/runtime/framework-tools/write-file.js +1 -1
- package/dist/src/sandbox/state.d.ts +0 -1
- package/dist/src/setup/scaffold/create/project.js +1 -1
- package/dist/src/shared/dynamic-tool-definition.d.ts +4 -1
- package/dist/src/shared/sandbox-backend.d.ts +7 -1
- package/dist/src/shared/tool-definition.d.ts +1 -1
- package/docs/sandbox.mdx +3 -1
- package/docs/tools/human-in-the-loop.md +1 -1
- package/docs/tools/overview.mdx +2 -0
- package/package.json +7 -1
|
@@ -6,7 +6,7 @@ import type { JsonObject } from "#shared/json.js";
|
|
|
6
6
|
* function. These are the same options the SDK passes to every tool call.
|
|
7
7
|
*/
|
|
8
8
|
export type ToolExecuteOptions = Omit<ToolExecutionOptions<unknown>, "context">;
|
|
9
|
-
export type ToolExecuteFn<TInput = unknown, TOutput = unknown> = (input: TInput, options
|
|
9
|
+
export type ToolExecuteFn<TInput = unknown, TOutput = unknown> = (input: TInput, options: ToolExecuteOptions) => Promise<TOutput> | TOutput;
|
|
10
10
|
interface ToolDefinitionBase {
|
|
11
11
|
readonly description: string;
|
|
12
12
|
}
|
package/docs/sandbox.mdx
CHANGED
|
@@ -157,7 +157,7 @@ export default defineSandbox({
|
|
|
157
157
|
|
|
158
158
|
`justbash()` needs no daemon or VM, but commands run in a simulated bash with a virtual filesystem under `.eve/sandbox-cache/`, with no real binaries (`git`, `node`, package managers) and no network isolation. The `just-bash` package is an optional peer dependency, so `eve dev` installs it into your application automatically when missing (disable with `autoInstall: false`); production processes fail with an actionable install error instead.
|
|
159
159
|
|
|
160
|
-
You can also write your own backend. A `SandboxBackend` is an adapter object with a `name`, a `create`, and an optional `prewarm`. It can point at your own container runner, VM pool, internal sandbox service, or another isolation layer, as long as it returns the `SandboxSession` operations eve needs. See the `SandboxBackend*` types on `eve/sandbox`.
|
|
160
|
+
You can also write your own backend. A `SandboxBackend` is an adapter object with a `name`, a `create`, and an optional `prewarm`. It can point at your own container runner, VM pool, internal sandbox service, or another isolation layer, as long as it returns the `SandboxSession` operations eve needs. Handles returned by `create` implement `shutdown()`, which stops the underlying compute at server shutdown. See the `SandboxBackend*` types on `eve/sandbox`.
|
|
161
161
|
|
|
162
162
|
## Lifecycle
|
|
163
163
|
|
|
@@ -185,6 +185,8 @@ export default defineSandbox({
|
|
|
185
185
|
|
|
186
186
|
Sessions are persistent, and how the underlying runtime idles out depends on the backend. On the Vercel backend, the VM times out after a period of inactivity (default 30 minutes); eve preserves the filesystem and resumes the sandbox on the next message as if nothing happened, even days later. The Docker backend keeps a long-lived container per durable session and persists `/workspace` across turns without that timeout, and the just-bash backend stores its virtual filesystem under `.eve/sandbox-cache/`. In every case, `/workspace` survives between turns for the same session.
|
|
187
187
|
|
|
188
|
+
When the eve server stops, no sandbox compute outlives it. `eve dev` stops the sandboxes it started when the dev server closes, and a self-hosted production server stops every open sandbox on shutdown (`SIGTERM`/`SIGINT`). Session state persists across the stop — the next server start reattaches each durable session from its stopped container, VM, or snapshot. Custom `SandboxBackend` adapters participate through the handle's `shutdown()` method: stop the underlying compute, keeping the session reattachable from persisted state where the backend supports it.
|
|
189
|
+
|
|
188
190
|
## Network policy
|
|
189
191
|
|
|
190
192
|
Egress rules go on the backend factory or in `onSession`'s `use()`. There are three forms:
|
|
@@ -38,7 +38,7 @@ export default defineTool({
|
|
|
38
38
|
|
|
39
39
|
By default, omitted `approval` behaves like `never()`, so tool calls may execute without human approval. Require human approval or other safeguards for sensitive, irreversible, regulated, financial, healthcare, employment, housing, legal, safety-impacting, user-impacting, or external side-effecting actions.
|
|
40
40
|
|
|
41
|
-
When the decision depends on the input, pass your own policy instead of a helper. It receives the same session context as tool execution, plus `{ toolName, toolInput, approvedTools }`, and returns an AI SDK 7 approval status synchronously or as a promise. Use `ctx.session.auth.current` to guard by the caller of the current turn and `ctx.session.auth.initiator` to guard by the caller that created the session. Return `"user-approval"` to pause for a person or `"not-applicable"` to continue without a prompt. `toolInput` can be undefined, so guard the access. This policy denies cross-tenant calls, then requires approval only when an amount crosses a threshold:
|
|
41
|
+
When the decision depends on the input, pass your own policy instead of a helper. It receives the same session context as tool execution, plus `{ toolName, toolInput, approvedTools, callId }`, and returns an AI SDK 7 approval status synchronously or as a promise. Use `ctx.session.auth.current` to guard by the caller of the current turn and `ctx.session.auth.initiator` to guard by the caller that created the session. Return `"user-approval"` to pause for a person or `"not-applicable"` to continue without a prompt. `toolInput` can be undefined, so guard the access. This policy denies cross-tenant calls, then requires approval only when an amount crosses a threshold:
|
|
42
42
|
|
|
43
43
|
```ts
|
|
44
44
|
approval: ({ session, toolInput }) => {
|
package/docs/tools/overview.mdx
CHANGED
|
@@ -37,6 +37,8 @@ When a tool returns structured data, add an optional `outputSchema`. With Zod or
|
|
|
37
37
|
`execute` gets a `ctx` carrying the runtime accessors:
|
|
38
38
|
|
|
39
39
|
- `ctx.session`: session metadata, turn, auth, parent lineage.
|
|
40
|
+
- `ctx.callId`: the id of the current tool call, carried by the call's [stream events](/docs/concepts/sessions-runs-and-streaming) and approval context.
|
|
41
|
+
- `ctx.abortSignal`: aborts when the active turn is cancelled. Pass it to cancellation-aware work; sandbox sessions from `ctx.getSandbox()` are already bound to it.
|
|
40
42
|
- `ctx.getSandbox()`: the live [sandbox](/docs/sandbox) handle.
|
|
41
43
|
- `ctx.getSkill(id)`: read a packaged [skill](/docs/skills)'s metadata and files.
|
|
42
44
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eve",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.20.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Filesystem-first framework for durable backend AI agents that run anywhere.",
|
|
6
6
|
"keywords": [
|
|
@@ -216,6 +216,11 @@
|
|
|
216
216
|
"import": "./dist/src/public/channels/slack/index.js",
|
|
217
217
|
"default": "./dist/src/public/channels/slack/index.js"
|
|
218
218
|
},
|
|
219
|
+
"./channels/chat-sdk": {
|
|
220
|
+
"types": "./dist/src/public/channels/chat-sdk/index.d.ts",
|
|
221
|
+
"import": "./dist/src/public/channels/chat-sdk/index.js",
|
|
222
|
+
"default": "./dist/src/public/channels/chat-sdk/index.js"
|
|
223
|
+
},
|
|
219
224
|
"./channels/github": {
|
|
220
225
|
"types": "./dist/src/public/channels/github/index.d.ts",
|
|
221
226
|
"import": "./dist/src/public/channels/github/index.js",
|
|
@@ -276,6 +281,7 @@
|
|
|
276
281
|
"@ai-sdk/provider-utils": "^5.0.0",
|
|
277
282
|
"@chat-adapter/slack": "4.31.0",
|
|
278
283
|
"@chat-adapter/state-memory": "4.31.0",
|
|
284
|
+
"@chat-adapter/twilio": "4.31.0",
|
|
279
285
|
"@clack/core": "1.3.1",
|
|
280
286
|
"@nuxt/kit": "^4.0.0",
|
|
281
287
|
"@standard-schema/spec": "1.1.0",
|