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.
Files changed (47) hide show
  1. package/README.md +9 -0
  2. package/dist/agent-workflow.d.mts +3 -2
  3. package/dist/agent-workflow.d.ts +3 -2
  4. package/dist/agent-workflow.js +380 -132
  5. package/dist/agent-workflow.mjs +1 -2
  6. package/dist/chunk-24UDM5XV.mjs +106 -0
  7. package/dist/chunk-2ZXHR6T6.mjs +401 -0
  8. package/dist/chunk-4WDKWMVB.mjs +389 -0
  9. package/dist/chunk-IACG26TC.mjs +2212 -0
  10. package/dist/chunk-NGLND33F.mjs +1247 -0
  11. package/dist/{chunk-T2UUL6VC.mjs → chunk-RXPVLORL.mjs} +3 -3
  12. package/dist/{chunk-HJGPUEFC.mjs → chunk-YRYXN7W4.mjs} +7 -1
  13. package/dist/client-Bkuq-Dfa.d.mts +2340 -0
  14. package/dist/client-Bkuq-Dfa.d.ts +2340 -0
  15. package/dist/{client-66JIQLSA.mjs → client-SNN3XDKO.mjs} +2 -2
  16. package/dist/client.d.mts +1 -1
  17. package/dist/client.d.ts +1 -1
  18. package/dist/client.js +1 -1
  19. package/dist/client.mjs +1 -1
  20. package/dist/{handler-BQY5SOI2.mjs → handler-WFNQWR6V.mjs} +2 -1
  21. package/dist/index.d.mts +4 -18
  22. package/dist/index.d.ts +4 -18
  23. package/dist/index.js +689 -259
  24. package/dist/index.mjs +91 -48
  25. package/dist/lifecycle-workflow.d.mts +2 -3
  26. package/dist/lifecycle-workflow.d.ts +2 -3
  27. package/dist/lifecycle-workflow.js +106 -20
  28. package/dist/lifecycle-workflow.mjs +1 -2
  29. package/dist/local-fs-handlers-ESZBRAWK.mjs +439 -0
  30. package/dist/next/loader.js +3 -3
  31. package/dist/next/loader.mjs +1 -1
  32. package/dist/next.js +10 -6
  33. package/dist/next.mjs +9 -5
  34. package/dist/{sandbox-27X2DSE3.mjs → sandbox-IFK5MVRM.mjs} +3 -4
  35. package/dist/{storage-KQYV42J4.mjs → storage-FCSHTDLC.mjs} +3 -3
  36. package/package.json +2 -2
  37. package/dist/chunk-2IIWVPZB.mjs +0 -334
  38. package/dist/chunk-A63YU65A.mjs +0 -20
  39. package/dist/chunk-GJETDXOU.mjs +0 -361
  40. package/dist/chunk-RDKDLHXM.mjs +0 -2031
  41. package/dist/chunk-VGJISV6O.mjs +0 -108
  42. package/dist/chunk-VS7U6SXN.mjs +0 -1261
  43. package/dist/client-DjcE0ATp.d.mts +0 -710
  44. package/dist/client-DwrDzn4_.d.ts +0 -710
  45. package/dist/local-fs-handlers-Q5W52DKV.mjs +0 -290
  46. package/dist/types-DuTc4UQW.d.mts +0 -1388
  47. 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 { k as StorageConfig } from './types-DuTc4UQW.mjs';
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;
@@ -1,12 +1,13 @@
1
1
  import * as workflow from 'workflow';
2
- import { k as StorageConfig } from './types-DuTc4UQW.js';
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;