experimental-agent 0.1.1 → 0.1.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/README.md +9 -0
- package/dist/agent-workflow.d.mts +3 -2
- package/dist/agent-workflow.d.ts +3 -2
- package/dist/agent-workflow.js +380 -132
- package/dist/agent-workflow.mjs +1 -2
- package/dist/chunk-24UDM5XV.mjs +106 -0
- package/dist/chunk-2ZXHR6T6.mjs +401 -0
- package/dist/chunk-4WDKWMVB.mjs +389 -0
- package/dist/chunk-IACG26TC.mjs +2212 -0
- package/dist/chunk-NGLND33F.mjs +1247 -0
- package/dist/{chunk-T2UUL6VC.mjs → chunk-RXPVLORL.mjs} +3 -3
- package/dist/{chunk-HJGPUEFC.mjs → chunk-YRYXN7W4.mjs} +7 -1
- package/dist/client-Bkuq-Dfa.d.mts +2340 -0
- package/dist/client-Bkuq-Dfa.d.ts +2340 -0
- package/dist/{client-66JIQLSA.mjs → client-SNN3XDKO.mjs} +2 -2
- package/dist/client.d.mts +1 -1
- package/dist/client.d.ts +1 -1
- package/dist/client.js +1 -1
- package/dist/client.mjs +1 -1
- package/dist/{handler-BQY5SOI2.mjs → handler-WFNQWR6V.mjs} +2 -1
- package/dist/index.d.mts +4 -18
- package/dist/index.d.ts +4 -18
- package/dist/index.js +689 -259
- package/dist/index.mjs +91 -48
- package/dist/lifecycle-workflow.d.mts +2 -3
- package/dist/lifecycle-workflow.d.ts +2 -3
- package/dist/lifecycle-workflow.js +106 -20
- package/dist/lifecycle-workflow.mjs +1 -2
- package/dist/local-fs-handlers-ESZBRAWK.mjs +439 -0
- package/dist/next/loader.js +3 -3
- package/dist/next/loader.mjs +1 -1
- package/dist/next.js +10 -6
- package/dist/next.mjs +9 -5
- package/dist/{sandbox-27X2DSE3.mjs → sandbox-IFK5MVRM.mjs} +3 -4
- package/dist/{storage-KQYV42J4.mjs → storage-FCSHTDLC.mjs} +3 -3
- package/package.json +2 -2
- package/dist/chunk-2IIWVPZB.mjs +0 -334
- package/dist/chunk-A63YU65A.mjs +0 -20
- package/dist/chunk-GJETDXOU.mjs +0 -361
- package/dist/chunk-RDKDLHXM.mjs +0 -2031
- package/dist/chunk-VGJISV6O.mjs +0 -108
- package/dist/chunk-VS7U6SXN.mjs +0 -1261
- package/dist/client-DjcE0ATp.d.mts +0 -710
- package/dist/client-DwrDzn4_.d.ts +0 -710
- package/dist/local-fs-handlers-Q5W52DKV.mjs +0 -290
- package/dist/types-DuTc4UQW.d.mts +0 -1388
- package/dist/types-DuTc4UQW.d.ts +0 -1388
package/README.md
CHANGED
|
@@ -191,6 +191,13 @@ const stream = await session.stream();
|
|
|
191
191
|
await session.tag.set("category", "support");
|
|
192
192
|
```
|
|
193
193
|
|
|
194
|
+
### Handles vs Records
|
|
195
|
+
|
|
196
|
+
- `myAgent.session(id)` and `myAgent.sandbox(id)` return orchestration handles.
|
|
197
|
+
- Handles are use-case APIs (send, stream, run tools, resume sandbox lifecycle).
|
|
198
|
+
- `myAgent.storage.*` is the raw record API (`Session`, `SandboxRecord`, `Message`, `Part`, `Command`, `SetupSnapshot`).
|
|
199
|
+
- Use `storage` for record lookups and filters (for example existence checks and list queries).
|
|
200
|
+
|
|
194
201
|
### Durable UI
|
|
195
202
|
|
|
196
203
|
Unlike `useChat` alone, messages survive refresh. They're persisted to storage.
|
|
@@ -293,6 +300,8 @@ The SDK stores: `Session`, `Message`, `Part`, `SandboxRecord`.
|
|
|
293
300
|
|
|
294
301
|
Everything else—users, titles, access control—belongs in your database. Session ID is your join key.
|
|
295
302
|
|
|
303
|
+
For session queries scoped to a sandbox, use `storage.session.listBySandbox({ sandboxId, ... })`.
|
|
304
|
+
|
|
296
305
|
### Vercel Agent Storage
|
|
297
306
|
|
|
298
307
|
The default `{ type: "vercel" }` uses the hosted Vercel Agent Storage service:
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import * as workflow from 'workflow';
|
|
2
|
-
import {
|
|
2
|
+
import { u as StorageConfig, g as RpcPayload, h as RpcResult } from './client-Bkuq-Dfa.mjs';
|
|
3
|
+
import 'errore';
|
|
3
4
|
import 'ai';
|
|
4
5
|
import 'zod';
|
|
5
|
-
import 'errore';
|
|
6
6
|
|
|
7
7
|
type AgentInput = {
|
|
8
8
|
sessionId: string;
|
|
9
9
|
storageConfig: StorageConfig;
|
|
10
|
+
rpc: (params: RpcPayload) => Promise<RpcResult>;
|
|
10
11
|
};
|
|
11
12
|
type AgentMessageInput = {
|
|
12
13
|
assistantMessageId: string;
|
package/dist/agent-workflow.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import * as workflow from 'workflow';
|
|
2
|
-
import {
|
|
2
|
+
import { u as StorageConfig, g as RpcPayload, h as RpcResult } from './client-Bkuq-Dfa.js';
|
|
3
|
+
import 'errore';
|
|
3
4
|
import 'ai';
|
|
4
5
|
import 'zod';
|
|
5
|
-
import 'errore';
|
|
6
6
|
|
|
7
7
|
type AgentInput = {
|
|
8
8
|
sessionId: string;
|
|
9
9
|
storageConfig: StorageConfig;
|
|
10
|
+
rpc: (params: RpcPayload) => Promise<RpcResult>;
|
|
10
11
|
};
|
|
11
12
|
type AgentMessageInput = {
|
|
12
13
|
assistantMessageId: string;
|