eve 0.22.2 → 0.22.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -0
- package/dist/src/chunks/{use-eve-agent-CM24ZUEI.js → use-eve-agent-Cojyfr4X.js} +25 -13
- package/dist/src/chunks/{use-eve-agent-CxcKypLZ.js → use-eve-agent-D-S1TPCW.js} +25 -13
- package/dist/src/cli/dev/url.js +1 -1
- package/dist/src/client/client-error.d.ts +5 -1
- package/dist/src/client/client-error.js +1 -1
- package/dist/src/client/client.js +1 -1
- package/dist/src/client/open-stream.js +1 -1
- package/dist/src/client/session.js +1 -1
- package/dist/src/client/types.d.ts +2 -1
- package/dist/src/client/url.js +1 -1
- package/dist/src/compiler/manifest.d.ts +40 -2
- package/dist/src/compiler/manifest.js +1 -1
- package/dist/src/compiler/module-map.js +2 -2
- package/dist/src/compiler/normalize-extension.d.ts +68 -0
- package/dist/src/compiler/normalize-extension.js +1 -0
- package/dist/src/compiler/normalize-manifest.js +2 -2
- package/dist/src/compiler/workspace-resources.js +1 -1
- package/dist/src/context/dynamic-skill-lifecycle.js +1 -1
- package/dist/src/context/dynamic-tool-lifecycle.js +1 -1
- package/dist/src/discover/discover-agent.d.ts +14 -1
- package/dist/src/discover/discover-agent.js +1 -1
- package/dist/src/discover/extension-specifier.d.ts +15 -0
- package/dist/src/discover/extension-specifier.js +1 -0
- package/dist/src/discover/extensions.d.ts +109 -0
- package/dist/src/discover/extensions.js +1 -0
- package/dist/src/discover/filesystem.d.ts +1 -1
- package/dist/src/discover/filesystem.js +1 -1
- package/dist/src/discover/grammar.d.ts +27 -0
- package/dist/src/discover/grammar.js +1 -1
- package/dist/src/discover/manifest.d.ts +46 -0
- package/dist/src/discover/manifest.js +1 -1
- package/dist/src/evals/assertions/run.d.ts +3 -2
- package/dist/src/evals/assertions/run.js +2 -2
- package/dist/src/evals/index.d.ts +1 -1
- package/dist/src/evals/loaders/yaml.js +1 -1
- package/dist/src/evals/match.d.ts +11 -6
- package/dist/src/execution/sandbox/bindings/microsandbox-network.js +1 -1
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/internal/authored-module-loader.d.ts +14 -0
- package/dist/src/internal/authored-module-loader.js +2 -2
- package/dist/src/internal/authored-module-map-loader.js +1 -1
- package/dist/src/internal/bundler/extension-scope-plugin.d.ts +37 -0
- package/dist/src/internal/bundler/extension-scope-plugin.js +3 -0
- package/dist/src/internal/helpers/gray-matter.d.ts +25 -0
- package/dist/src/internal/helpers/gray-matter.js +1 -0
- package/dist/src/internal/helpers/markdown.js +1 -1
- package/dist/src/internal/nitro/dev-runtime-source-snapshot-copy.js +1 -1
- package/dist/src/internal/nitro/host/build-application.js +1 -1
- package/dist/src/internal/nitro/host/build-extension.d.ts +24 -0
- package/dist/src/internal/nitro/host/build-extension.js +4 -0
- package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
- package/dist/src/public/channels/discord/discordChannel.js +1 -1
- package/dist/src/public/channels/slack/api.js +1 -1
- package/dist/src/public/channels/slack/mrkdwn.d.ts +0 -2
- package/dist/src/public/channels/slack/mrkdwn.js +1 -1
- package/dist/src/public/definitions/extension.d.ts +68 -0
- package/dist/src/public/definitions/extension.js +1 -0
- package/dist/src/public/extension/index.d.ts +10 -0
- package/dist/src/public/extension/index.js +1 -0
- package/dist/src/runtime/connections/openapi-client.js +1 -1
- package/dist/src/runtime/connections/openapi-spec.js +1 -1
- package/dist/src/runtime/resolve-dynamic-skill.js +1 -1
- package/dist/src/runtime/resolve-dynamic-tool.js +1 -1
- package/dist/src/runtime/types.d.ts +10 -0
- package/dist/src/services/dev-client/vercel-auth-error.d.ts +2 -2
- package/dist/src/services/dev-client/vercel-auth-error.js +3 -3
- package/dist/src/setup/scaffold/create/project.js +3 -3
- package/dist/src/svelte/index.js +1 -1
- package/dist/src/svelte/use-eve-agent.js +1 -1
- package/dist/src/vue/index.js +1 -1
- package/dist/src/vue/use-eve-agent.js +1 -1
- package/docs/channels/custom.mdx +2 -2
- package/docs/channels/linear.mdx +1 -1
- package/docs/channels/slack.mdx +2 -0
- package/docs/concepts/context-control.md +1 -1
- package/docs/connections/openapi.mdx +3 -1
- package/docs/evals/assertions.mdx +4 -2
- package/docs/extensions.md +155 -0
- package/docs/guides/client/overview.mdx +1 -1
- package/docs/guides/dev-tui.md +4 -0
- package/docs/guides/dynamic-capabilities.md +3 -3
- package/docs/guides/instrumentation.md +1 -1
- package/docs/guides/state.md +3 -3
- package/docs/instructions.mdx +1 -1
- package/docs/meta.json +1 -0
- package/docs/patterns/dynamic-scheduling.md +11 -11
- package/docs/patterns/multi-tenant-approvals.md +6 -6
- package/docs/patterns/multi-tenant-auth.md +13 -13
- package/docs/patterns/multi-tenant-memory.md +9 -9
- package/docs/schedules.mdx +1 -1
- package/docs/tutorial/guard-the-spend.mdx +2 -2
- package/docs/tutorial/query-sample-data.mdx +1 -1
- package/docs/tutorial/remember-definitions.mdx +2 -2
- package/docs/tutorial/ship-it.mdx +1 -1
- package/package.json +6 -1
|
@@ -22,7 +22,7 @@ The current caller and initiating caller are both available on the session. This
|
|
|
22
22
|
|
|
23
23
|
```ts title="agent/lib/tenant-approval.ts"
|
|
24
24
|
import type { ApprovalContext, ApprovalStatus } from "eve/tools";
|
|
25
|
-
import { approvalPolicies } from "./approval-policies
|
|
25
|
+
import { approvalPolicies } from "./approval-policies";
|
|
26
26
|
|
|
27
27
|
type Surface = "connection" | "tool";
|
|
28
28
|
|
|
@@ -77,8 +77,8 @@ Approval runs before `execute`. The executor must still derive and enforce tenan
|
|
|
77
77
|
```ts title="agent/tools/transfer_funds.ts"
|
|
78
78
|
import { defineTool } from "eve/tools";
|
|
79
79
|
import { z } from "zod";
|
|
80
|
-
import { transferFunds } from "../../lib/payments
|
|
81
|
-
import { decideTenantApproval } from "../lib/tenant-approval
|
|
80
|
+
import { transferFunds } from "../../lib/payments";
|
|
81
|
+
import { decideTenantApproval } from "../lib/tenant-approval";
|
|
82
82
|
|
|
83
83
|
export default defineTool({
|
|
84
84
|
description: "Transfer funds from the current tenant's account.",
|
|
@@ -111,7 +111,7 @@ The same callback gates every generated operation. The qualified operation name
|
|
|
111
111
|
|
|
112
112
|
```ts title="agent/connections/billing.ts"
|
|
113
113
|
import { defineOpenAPIConnection } from "eve/connections";
|
|
114
|
-
import { decideTenantApproval } from "../lib/tenant-approval
|
|
114
|
+
import { decideTenantApproval } from "../lib/tenant-approval";
|
|
115
115
|
|
|
116
116
|
export default defineOpenAPIConnection({
|
|
117
117
|
spec: "https://billing.example.com/openapi.json",
|
|
@@ -135,7 +135,7 @@ The allow-list limits what the model can discover. Approval independently decide
|
|
|
135
135
|
|
|
136
136
|
```ts title="agent/connections/support.ts"
|
|
137
137
|
import { defineMcpClientConnection } from "eve/connections";
|
|
138
|
-
import { decideTenantApproval } from "../lib/tenant-approval
|
|
138
|
+
import { decideTenantApproval } from "../lib/tenant-approval";
|
|
139
139
|
|
|
140
140
|
export default defineMcpClientConnection({
|
|
141
141
|
url: "https://support.example.com/mcp",
|
|
@@ -176,7 +176,7 @@ export interface ApprovalPolicyProvider {
|
|
|
176
176
|
decide(request: ApprovalPolicyRequest): Promise<ApprovalPolicyDecision>;
|
|
177
177
|
}
|
|
178
178
|
|
|
179
|
-
export { approvalPolicies } from "../../lib/approval-policies
|
|
179
|
+
export { approvalPolicies } from "../../lib/approval-policies";
|
|
180
180
|
```
|
|
181
181
|
|
|
182
182
|
Your provider decides the policy model. A common implementation checks active tenant membership, finds an exact resource rule before a connection-wide fallback, evaluates role and input thresholds, and defaults to deny. Keep those choices in application code rather than encoding a database design into the agent.
|
|
@@ -44,7 +44,7 @@ the caller before eve starts a run, then stamp the tenant onto the session:
|
|
|
44
44
|
```ts title="agent/channels/eve.ts"
|
|
45
45
|
import { eveChannel } from "eve/channels/eve";
|
|
46
46
|
import { localDev, type AuthFn } from "eve/channels/auth";
|
|
47
|
-
import { verifyAgentCaller } from "../../lib/app-auth
|
|
47
|
+
import { verifyAgentCaller } from "../../lib/app-auth";
|
|
48
48
|
|
|
49
49
|
function tenantAppAuth(): AuthFn<Request> {
|
|
50
50
|
return async (request) => {
|
|
@@ -92,7 +92,7 @@ cache by that user, and pass the projected principal into `getToken`:
|
|
|
92
92
|
|
|
93
93
|
```ts title="agent/lib/tenant-connection-auth.ts"
|
|
94
94
|
import type { ConnectionPrincipal, NonInteractiveAuthorizationDefinition } from "eve/connections";
|
|
95
|
-
import { tenantCredentials, type TenantService } from "./tenant-credentials
|
|
95
|
+
import { tenantCredentials, type TenantService } from "./tenant-credentials";
|
|
96
96
|
|
|
97
97
|
function requireTenantPrincipal(principal: ConnectionPrincipal): {
|
|
98
98
|
tenantId: string;
|
|
@@ -136,8 +136,8 @@ Derive the tenant inside `execute`, fetch its credential from your application p
|
|
|
136
136
|
```ts title="agent/tools/list_invoices.ts"
|
|
137
137
|
import { defineTool } from "eve/tools";
|
|
138
138
|
import { z } from "zod";
|
|
139
|
-
import { tenantCredentials } from "../lib/tenant-credentials
|
|
140
|
-
import { requireTenantCaller } from "../lib/tenant
|
|
139
|
+
import { tenantCredentials } from "../lib/tenant-credentials";
|
|
140
|
+
import { requireTenantCaller } from "../lib/tenant";
|
|
141
141
|
|
|
142
142
|
export default defineTool({
|
|
143
143
|
description: "List recent invoices from the current tenant's billing account.",
|
|
@@ -167,9 +167,9 @@ receive the token at call time without exposing it to the model:
|
|
|
167
167
|
|
|
168
168
|
```ts title="agent/connections/billing.ts"
|
|
169
169
|
import { defineOpenAPIConnection } from "eve/connections";
|
|
170
|
-
import { tenantCredentials } from "../lib/tenant-credentials
|
|
171
|
-
import { tenantBearerAuth } from "../lib/tenant-connection-auth
|
|
172
|
-
import { requireTenantCaller } from "../lib/tenant
|
|
170
|
+
import { tenantCredentials } from "../lib/tenant-credentials";
|
|
171
|
+
import { tenantBearerAuth } from "../lib/tenant-connection-auth";
|
|
172
|
+
import { requireTenantCaller } from "../lib/tenant";
|
|
173
173
|
|
|
174
174
|
export default defineOpenAPIConnection({
|
|
175
175
|
spec: "https://billing.example.com/openapi.json",
|
|
@@ -193,9 +193,9 @@ MCP connections accept the same callbacks:
|
|
|
193
193
|
|
|
194
194
|
```ts title="agent/connections/support.ts"
|
|
195
195
|
import { defineMcpClientConnection } from "eve/connections";
|
|
196
|
-
import { tenantCredentials } from "../lib/tenant-credentials
|
|
197
|
-
import { tenantBearerAuth } from "../lib/tenant-connection-auth
|
|
198
|
-
import { requireTenantCaller } from "../lib/tenant
|
|
196
|
+
import { tenantCredentials } from "../lib/tenant-credentials";
|
|
197
|
+
import { tenantBearerAuth } from "../lib/tenant-connection-auth";
|
|
198
|
+
import { requireTenantCaller } from "../lib/tenant";
|
|
199
199
|
|
|
200
200
|
export default defineMcpClientConnection({
|
|
201
201
|
url: "https://support.example.com/mcp",
|
|
@@ -220,8 +220,8 @@ tenant API key from `headers` instead:
|
|
|
220
220
|
|
|
221
221
|
```ts title="agent/connections/support.ts"
|
|
222
222
|
import { defineMcpClientConnection } from "eve/connections";
|
|
223
|
-
import { tenantCredentials } from "../lib/tenant-credentials
|
|
224
|
-
import { requireTenantCaller } from "../lib/tenant
|
|
223
|
+
import { tenantCredentials } from "../lib/tenant-credentials";
|
|
224
|
+
import { requireTenantCaller } from "../lib/tenant";
|
|
225
225
|
|
|
226
226
|
export default defineMcpClientConnection({
|
|
227
227
|
url: "https://support.example.com/mcp",
|
|
@@ -274,7 +274,7 @@ export interface TenantCredentialProvider {
|
|
|
274
274
|
): Promise<TenantApiKeyCredential>;
|
|
275
275
|
}
|
|
276
276
|
|
|
277
|
-
export { tenantCredentials } from "../../lib/tenant-credentials
|
|
277
|
+
export { tenantCredentials } from "../../lib/tenant-credentials";
|
|
278
278
|
```
|
|
279
279
|
|
|
280
280
|
Implement the provider with the secret system your application already trusts:
|
|
@@ -53,8 +53,8 @@ Resolve on `turn.started` so later turns in the same session see memories writte
|
|
|
53
53
|
|
|
54
54
|
```ts title="agent/instructions/memory.ts"
|
|
55
55
|
import { defineDynamic, defineInstructions } from "eve/instructions";
|
|
56
|
-
import { memoryStore } from "../lib/memory-store
|
|
57
|
-
import { requireTenantCaller } from "../lib/tenant
|
|
56
|
+
import { memoryStore } from "../lib/memory-store";
|
|
57
|
+
import { requireTenantCaller } from "../lib/tenant";
|
|
58
58
|
|
|
59
59
|
export default defineDynamic({
|
|
60
60
|
events: {
|
|
@@ -88,8 +88,8 @@ The model chooses the memory key and value. The executor chooses the tenant and
|
|
|
88
88
|
```ts title="agent/tools/remember.ts"
|
|
89
89
|
import { defineTool } from "eve/tools";
|
|
90
90
|
import { z } from "zod";
|
|
91
|
-
import { memoryStore } from "../lib/memory-store
|
|
92
|
-
import { requireTenantCaller } from "../lib/tenant
|
|
91
|
+
import { memoryStore } from "../lib/memory-store";
|
|
92
|
+
import { requireTenantCaller } from "../lib/tenant";
|
|
93
93
|
|
|
94
94
|
export default defineTool({
|
|
95
95
|
description: "Remember one stable fact or preference for the current user.",
|
|
@@ -110,8 +110,8 @@ export default defineTool({
|
|
|
110
110
|
```ts title="agent/tools/list_memories.ts"
|
|
111
111
|
import { defineTool } from "eve/tools";
|
|
112
112
|
import { z } from "zod";
|
|
113
|
-
import { memoryStore } from "../lib/memory-store
|
|
114
|
-
import { requireTenantCaller } from "../lib/tenant
|
|
113
|
+
import { memoryStore } from "../lib/memory-store";
|
|
114
|
+
import { requireTenantCaller } from "../lib/tenant";
|
|
115
115
|
|
|
116
116
|
export default defineTool({
|
|
117
117
|
description: "List long-term memories saved for the current user.",
|
|
@@ -126,8 +126,8 @@ export default defineTool({
|
|
|
126
126
|
import { defineTool } from "eve/tools";
|
|
127
127
|
import { always } from "eve/tools/approval";
|
|
128
128
|
import { z } from "zod";
|
|
129
|
-
import { memoryStore } from "../lib/memory-store
|
|
130
|
-
import { requireTenantCaller } from "../lib/tenant
|
|
129
|
+
import { memoryStore } from "../lib/memory-store";
|
|
130
|
+
import { requireTenantCaller } from "../lib/tenant";
|
|
131
131
|
|
|
132
132
|
export default defineTool({
|
|
133
133
|
description: "Delete one long-term memory belonging to the current user.",
|
|
@@ -165,7 +165,7 @@ export interface MemoryStore {
|
|
|
165
165
|
}
|
|
166
166
|
|
|
167
167
|
// Implement this with your application's PostgreSQL, KV, or vector-store client.
|
|
168
|
-
export { memoryStore } from "../../lib/memory-store
|
|
168
|
+
export { memoryStore } from "../../lib/memory-store";
|
|
169
169
|
```
|
|
170
170
|
|
|
171
171
|
Whatever backend you choose, preserve these invariants:
|
package/docs/schedules.mdx
CHANGED
|
@@ -61,7 +61,7 @@ Use a handler when the schedule needs to deliver to a channel, branch on conditi
|
|
|
61
61
|
```ts title="agent/schedules/critical-alerts.ts"
|
|
62
62
|
import { defineSchedule } from "eve/schedules";
|
|
63
63
|
|
|
64
|
-
import slack from "../channels/slack
|
|
64
|
+
import slack from "../channels/slack";
|
|
65
65
|
|
|
66
66
|
export default defineSchedule({
|
|
67
67
|
cron: "* * * * *",
|
|
@@ -23,8 +23,8 @@ export function estimateScanGb(sql: string): number {
|
|
|
23
23
|
```ts title="agent/tools/run_sql.ts"
|
|
24
24
|
import { defineTool } from "eve/tools";
|
|
25
25
|
import { z } from "zod";
|
|
26
|
-
import { runReadOnlySql } from "../lib/sample-db
|
|
27
|
-
import { estimateScanGb } from "../lib/cost
|
|
26
|
+
import { runReadOnlySql } from "../lib/sample-db";
|
|
27
|
+
import { estimateScanGb } from "../lib/cost";
|
|
28
28
|
|
|
29
29
|
const THRESHOLD_GB = 50;
|
|
30
30
|
|
|
@@ -47,7 +47,7 @@ export async function runReadOnlySql(sql: string) {
|
|
|
47
47
|
```ts title="agent/tools/run_sql.ts"
|
|
48
48
|
import { defineTool } from "eve/tools";
|
|
49
49
|
import { z } from "zod";
|
|
50
|
-
import { runReadOnlySql } from "../lib/sample-db
|
|
50
|
+
import { runReadOnlySql } from "../lib/sample-db";
|
|
51
51
|
|
|
52
52
|
export default defineTool({
|
|
53
53
|
description:
|
|
@@ -26,7 +26,7 @@ export const glossary = defineState<Glossary>("analytics.glossary", () => ({
|
|
|
26
26
|
```ts title="agent/tools/define_metric.ts"
|
|
27
27
|
import { defineTool } from "eve/tools";
|
|
28
28
|
import { z } from "zod";
|
|
29
|
-
import { glossary } from "../lib/glossary
|
|
29
|
+
import { glossary } from "../lib/glossary";
|
|
30
30
|
|
|
31
31
|
export default defineTool({
|
|
32
32
|
description: "Record the team's definition of a metric so it persists across turns.",
|
|
@@ -41,7 +41,7 @@ export default defineTool({
|
|
|
41
41
|
```ts title="agent/tools/recall_metrics.ts"
|
|
42
42
|
import { defineTool } from "eve/tools";
|
|
43
43
|
import { z } from "zod";
|
|
44
|
-
import { glossary } from "../lib/glossary
|
|
44
|
+
import { glossary } from "../lib/glossary";
|
|
45
45
|
|
|
46
46
|
export default defineTool({
|
|
47
47
|
description: "Read the team's recorded metric definitions.",
|
|
@@ -98,7 +98,7 @@ Now point the channel at it. Replace the contents of `agent/channels/eve.ts`, wh
|
|
|
98
98
|
```ts title="agent/channels/eve.ts"
|
|
99
99
|
import { eveChannel } from "eve/channels/eve";
|
|
100
100
|
import { localDev, vercelOidc, type AuthFn } from "eve/channels/auth";
|
|
101
|
-
import { authenticate } from "../lib/auth
|
|
101
|
+
import { authenticate } from "../lib/auth";
|
|
102
102
|
|
|
103
103
|
const appAuth: AuthFn<Request> = async (request) => {
|
|
104
104
|
const user = await authenticate(request); // your cookie/session/provider
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eve",
|
|
3
|
-
"version": "0.22.
|
|
3
|
+
"version": "0.22.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Filesystem-first framework for durable backend AI agents that run anywhere.",
|
|
6
6
|
"keywords": [
|
|
@@ -186,6 +186,11 @@
|
|
|
186
186
|
"import": "./dist/src/public/context/index.js",
|
|
187
187
|
"default": "./dist/src/public/context/index.js"
|
|
188
188
|
},
|
|
189
|
+
"./extension": {
|
|
190
|
+
"types": "./dist/src/public/extension/index.d.ts",
|
|
191
|
+
"import": "./dist/src/public/extension/index.js",
|
|
192
|
+
"default": "./dist/src/public/extension/index.js"
|
|
193
|
+
},
|
|
189
194
|
"./instrumentation": {
|
|
190
195
|
"types": "./dist/src/public/instrumentation/index.d.ts",
|
|
191
196
|
"import": "./dist/src/public/instrumentation/index.js",
|