experimental-agent 0.0.2 → 0.0.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 +13 -2
- package/dist/agent-workflow.d.mts +11 -3
- package/dist/agent-workflow.d.ts +11 -3
- package/dist/agent-workflow.js +1921 -1144
- package/dist/agent-workflow.mjs +7 -3
- package/dist/chunk-3ODWQVIA.mjs +12 -0
- package/dist/chunk-64THY7Y7.mjs +155 -0
- package/dist/chunk-GSRJYPWF.mjs +284 -0
- package/dist/chunk-HJGPUEFC.mjs +42 -0
- package/dist/chunk-JEE2FQ4O.mjs +844 -0
- package/dist/chunk-TQRCSTCF.mjs +103 -0
- package/dist/chunk-UFVWOC5L.mjs +79 -0
- package/dist/chunk-VBLZWXVE.mjs +318 -0
- package/dist/chunk-ZASQBPOI.mjs +2057 -0
- package/dist/{types-DPXFq_r6.d.ts → client-BlSrVoPI.d.mts} +868 -31
- package/dist/{types-DPXFq_r6.d.mts → client-BlSrVoPI.d.ts} +868 -31
- package/dist/client-SREKHM6I.mjs +15 -0
- package/dist/client.d.mts +37 -0
- package/dist/client.d.ts +37 -0
- package/dist/client.js +58 -0
- package/dist/client.mjs +30 -0
- package/dist/{client-HUG4HT5L.mjs → handler-36FM5H35.mjs} +4 -5
- package/dist/index.d.mts +3 -4
- package/dist/index.d.ts +3 -4
- package/dist/index.js +3102 -1438
- package/dist/index.mjs +720 -147
- package/dist/lifecycle-workflow.d.mts +3 -10
- package/dist/lifecycle-workflow.d.ts +3 -10
- package/dist/lifecycle-workflow.js +170 -1246
- package/dist/lifecycle-workflow.mjs +5 -41
- package/dist/local-fs-handlers-P4WGW3QY.mjs +235 -0
- package/dist/next/loader.d.mts +14 -0
- package/dist/next/loader.d.ts +14 -0
- package/dist/next/loader.js +206 -0
- package/dist/next/loader.mjs +103 -0
- package/dist/next.d.mts +34 -0
- package/dist/next.d.ts +34 -0
- package/dist/next.js +329 -0
- package/dist/next.mjs +224 -0
- package/dist/process-manager-JAKAXROL.mjs +10 -0
- package/dist/{client-4Y3UPWFR.mjs → sandbox-QAPGBVYM.mjs} +4 -3
- package/dist/storage-Q376OZH3.mjs +20 -0
- package/dist/{vercel-2CFDMEHB.mjs → vercel-LLXAHKVJ.mjs} +3 -1
- package/dist/vercel-sdk-VHKEX2GQ.mjs +8 -0
- package/package.json +32 -19
- package/dist/chunk-24DJSI7C.mjs +0 -374
- package/dist/chunk-4RGMKC2M.mjs +0 -755
- package/dist/chunk-6ICYKNCC.mjs +0 -284
- package/dist/chunk-PGYYQ3WZ.mjs +0 -1088
- package/dist/client-BBpD9kKL.d.ts +0 -193
- package/dist/client-BGJViybU.d.mts +0 -193
- package/dist/lifecycle-workflow-steps-HHN46ZAD.mjs +0 -20
- package/dist/local-BYPFRMLZ.mjs +0 -282
- package/dist/process-manager-H2HF6G4G.mjs +0 -153
- package/dist/sandbox-BFA4ECEQ.mjs +0 -10
- package/dist/storage-2U2QFNWI.mjs +0 -27
- /package/dist/{chunk-36X6L7SK.mjs → chunk-TAXLUVIC.mjs} +0 -0
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@ import { agent } from "experimental-agent";
|
|
|
22
22
|
|
|
23
23
|
export const myAgent = agent({
|
|
24
24
|
model: "anthropic/claude-opus-4.5",
|
|
25
|
-
|
|
25
|
+
system: "You are a helpful coding assistant.",
|
|
26
26
|
});
|
|
27
27
|
```
|
|
28
28
|
|
|
@@ -163,7 +163,7 @@ export function Chat({ chatId, streamingMessageId }) {
|
|
|
163
163
|
```ts
|
|
164
164
|
const myAgent = agent({
|
|
165
165
|
model: "anthropic/claude-haiku-4.5", // Required
|
|
166
|
-
|
|
166
|
+
system: "...", // System prompt
|
|
167
167
|
sandbox: { type: "vercel" }, // or "local"
|
|
168
168
|
storage: { type: "vercel" }, // or "local" or "custom"
|
|
169
169
|
skillsDir: ".agent/skills", // Skills location
|
|
@@ -304,3 +304,14 @@ The default `{ type: "vercel" }` uses the hosted Vercel Agent Storage service:
|
|
|
304
304
|
Just deploy to Vercel and it works. No database setup, no connection strings.
|
|
305
305
|
|
|
306
306
|
For self-hosting or custom backends, see [apps/storage](../../apps/storage/) for a reference implementation using `handleStorageRpc`.
|
|
307
|
+
|
|
308
|
+
## Development
|
|
309
|
+
|
|
310
|
+
From the repo root:
|
|
311
|
+
|
|
312
|
+
```bash
|
|
313
|
+
pnpm agent # tsup --watch
|
|
314
|
+
pnpm test # vitest run
|
|
315
|
+
pnpm test:watch # vitest watch
|
|
316
|
+
pnpm typecheck # tsc --noEmit
|
|
317
|
+
```
|
|
@@ -1,21 +1,29 @@
|
|
|
1
1
|
import * as workflow from 'workflow';
|
|
2
|
-
import {
|
|
2
|
+
import { q as StorageConfig, d as RpcPayload, e as RpcResult } from './client-BlSrVoPI.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;
|
|
13
14
|
hookToken: string;
|
|
15
|
+
createdAt: number;
|
|
16
|
+
context: Record<string, unknown>;
|
|
17
|
+
};
|
|
18
|
+
type ApprovalResponse = {
|
|
19
|
+
approved: boolean;
|
|
20
|
+
reason?: string;
|
|
14
21
|
};
|
|
15
22
|
declare const agentMessageHook: workflow.TypedHook<AgentMessageInput, AgentMessageInput>;
|
|
23
|
+
declare const approvalHook: workflow.TypedHook<ApprovalResponse, ApprovalResponse>;
|
|
16
24
|
declare function agentWorkflow({ input, event, }: {
|
|
17
25
|
input: AgentInput;
|
|
18
26
|
event: AgentMessageInput;
|
|
19
27
|
}): Promise<void>;
|
|
20
28
|
|
|
21
|
-
export { type AgentInput, type AgentMessageInput, agentMessageHook, agentWorkflow };
|
|
29
|
+
export { type AgentInput, type AgentMessageInput, type ApprovalResponse, agentMessageHook, agentWorkflow, approvalHook };
|
package/dist/agent-workflow.d.ts
CHANGED
|
@@ -1,21 +1,29 @@
|
|
|
1
1
|
import * as workflow from 'workflow';
|
|
2
|
-
import {
|
|
2
|
+
import { q as StorageConfig, d as RpcPayload, e as RpcResult } from './client-BlSrVoPI.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;
|
|
13
14
|
hookToken: string;
|
|
15
|
+
createdAt: number;
|
|
16
|
+
context: Record<string, unknown>;
|
|
17
|
+
};
|
|
18
|
+
type ApprovalResponse = {
|
|
19
|
+
approved: boolean;
|
|
20
|
+
reason?: string;
|
|
14
21
|
};
|
|
15
22
|
declare const agentMessageHook: workflow.TypedHook<AgentMessageInput, AgentMessageInput>;
|
|
23
|
+
declare const approvalHook: workflow.TypedHook<ApprovalResponse, ApprovalResponse>;
|
|
16
24
|
declare function agentWorkflow({ input, event, }: {
|
|
17
25
|
input: AgentInput;
|
|
18
26
|
event: AgentMessageInput;
|
|
19
27
|
}): Promise<void>;
|
|
20
28
|
|
|
21
|
-
export { type AgentInput, type AgentMessageInput, agentMessageHook, agentWorkflow };
|
|
29
|
+
export { type AgentInput, type AgentMessageInput, type ApprovalResponse, agentMessageHook, agentWorkflow, approvalHook };
|