@deepagents/experimental 4.3.0 → 5.0.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/README.md +9 -5
- package/dist/index.js +1716 -152
- package/dist/index.js.map +4 -4
- package/dist/zukhruf/agent-control-plane.d.ts +68 -0
- package/dist/zukhruf/agent-control-plane.d.ts.map +1 -0
- package/dist/zukhruf/agent-declaration-registry.d.ts +9 -0
- package/dist/zukhruf/agent-declaration-registry.d.ts.map +1 -0
- package/dist/zukhruf/agent-directory.d.ts +21 -0
- package/dist/zukhruf/agent-directory.d.ts.map +1 -0
- package/dist/zukhruf/agent-path.d.ts +15 -0
- package/dist/zukhruf/agent-path.d.ts.map +1 -0
- package/dist/zukhruf/agent-runtime.d.ts +53 -0
- package/dist/zukhruf/agent-runtime.d.ts.map +1 -0
- package/dist/zukhruf/agent-status-projector.d.ts +32 -0
- package/dist/zukhruf/agent-status-projector.d.ts.map +1 -0
- package/dist/zukhruf/agent-thread.d.ts +31 -0
- package/dist/zukhruf/agent-thread.d.ts.map +1 -0
- package/dist/zukhruf/agent-tool-context.d.ts +6 -0
- package/dist/zukhruf/agent-tool-context.d.ts.map +1 -0
- package/dist/zukhruf/agent-turn-executor.d.ts +19 -0
- package/dist/zukhruf/agent-turn-executor.d.ts.map +1 -0
- package/dist/zukhruf/agent-turn-id.d.ts +11 -0
- package/dist/zukhruf/agent-turn-id.d.ts.map +1 -0
- package/dist/zukhruf/agent.d.ts +13 -8
- package/dist/zukhruf/agent.d.ts.map +1 -1
- package/dist/zukhruf/approval-controller.d.ts +34 -0
- package/dist/zukhruf/approval-controller.d.ts.map +1 -0
- package/dist/zukhruf/approval-mutex.d.ts +5 -0
- package/dist/zukhruf/approval-mutex.d.ts.map +1 -0
- package/dist/zukhruf/index.d.ts +15 -11
- package/dist/zukhruf/index.d.ts.map +1 -1
- package/dist/zukhruf/index.js +1716 -152
- package/dist/zukhruf/index.js.map +4 -4
- package/dist/zukhruf/list-agents.d.ts +234 -0
- package/dist/zukhruf/list-agents.d.ts.map +1 -0
- package/dist/zukhruf/mailbox/coordinator.d.ts +22 -0
- package/dist/zukhruf/mailbox/coordinator.d.ts.map +1 -0
- package/dist/zukhruf/mailbox/sqlite.store.d.ts +16 -0
- package/dist/zukhruf/mailbox/sqlite.store.d.ts.map +1 -0
- package/dist/zukhruf/mailbox/store.d.ts +20 -0
- package/dist/zukhruf/mailbox/store.d.ts.map +1 -0
- package/dist/zukhruf/mailbox/types.d.ts +35 -0
- package/dist/zukhruf/mailbox/types.d.ts.map +1 -0
- package/dist/zukhruf/message-tools.d.ts +456 -0
- package/dist/zukhruf/message-tools.d.ts.map +1 -0
- package/dist/zukhruf/queue/pg-boss.turn-queue.d.ts +2 -1
- package/dist/zukhruf/queue/pg-boss.turn-queue.d.ts.map +1 -1
- package/dist/zukhruf/queue/turn-queue.d.ts +14 -0
- package/dist/zukhruf/queue/turn-queue.d.ts.map +1 -1
- package/dist/zukhruf/spawn-agent.d.ts +301 -0
- package/dist/zukhruf/spawn-agent.d.ts.map +1 -0
- package/dist/zukhruf/sqlite-approval-mutex.d.ts +17 -0
- package/dist/zukhruf/sqlite-approval-mutex.d.ts.map +1 -0
- package/package.json +8 -7
- package/dist/zukhruf/runtime.d.ts +0 -67
- package/dist/zukhruf/runtime.d.ts.map +0 -1
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
import type { AgentToolContext } from './agent-tool-context.ts';
|
|
2
|
+
export declare const spawnAgentTool: ({
|
|
3
|
+
title?: string;
|
|
4
|
+
providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
|
|
5
|
+
metadata?: import("@ai-sdk/provider").JSONObject;
|
|
6
|
+
inputSchema: import("ai").FlexibleSchema<{
|
|
7
|
+
agent_type: string;
|
|
8
|
+
message: string;
|
|
9
|
+
task_name: string;
|
|
10
|
+
}>;
|
|
11
|
+
contextSchema?: import("ai").FlexibleSchema<AgentToolContext> | undefined;
|
|
12
|
+
needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
|
|
13
|
+
agent_type: string;
|
|
14
|
+
message: string;
|
|
15
|
+
task_name: string;
|
|
16
|
+
}, NoInfer<AgentToolContext>> | undefined;
|
|
17
|
+
onInputStart?: ((options: import("ai").ToolExecutionOptions<NoInfer<AgentToolContext>>) => void | PromiseLike<void>) | undefined;
|
|
18
|
+
onInputDelta?: ((options: {
|
|
19
|
+
inputTextDelta: string;
|
|
20
|
+
} & import("ai").ToolExecutionOptions<NoInfer<AgentToolContext>>) => void | PromiseLike<void>) | undefined;
|
|
21
|
+
onInputAvailable?: ((options: {
|
|
22
|
+
input: {
|
|
23
|
+
agent_type: string;
|
|
24
|
+
message: string;
|
|
25
|
+
task_name: string;
|
|
26
|
+
};
|
|
27
|
+
} & import("ai").ToolExecutionOptions<NoInfer<AgentToolContext>>) => void | PromiseLike<void>) | undefined;
|
|
28
|
+
toModelOutput?: ((options: {
|
|
29
|
+
toolCallId: string;
|
|
30
|
+
input: {
|
|
31
|
+
agent_type: string;
|
|
32
|
+
message: string;
|
|
33
|
+
task_name: string;
|
|
34
|
+
};
|
|
35
|
+
output: NoInfer<{
|
|
36
|
+
task_name: string;
|
|
37
|
+
agent_path: string;
|
|
38
|
+
}>;
|
|
39
|
+
}) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
|
|
40
|
+
} & {
|
|
41
|
+
outputSchema?: import("ai").FlexibleSchema<{
|
|
42
|
+
task_name: string;
|
|
43
|
+
agent_path: string;
|
|
44
|
+
}> | undefined;
|
|
45
|
+
execute: import("ai").ToolExecuteFunction<{
|
|
46
|
+
agent_type: string;
|
|
47
|
+
message: string;
|
|
48
|
+
task_name: string;
|
|
49
|
+
}, {
|
|
50
|
+
task_name: string;
|
|
51
|
+
agent_path: string;
|
|
52
|
+
}, NoInfer<AgentToolContext>>;
|
|
53
|
+
} & {
|
|
54
|
+
description?: string | ((options: {
|
|
55
|
+
context: NoInfer<AgentToolContext>;
|
|
56
|
+
experimental_sandbox?: import("ai").Experimental_SandboxSession;
|
|
57
|
+
}) => string) | undefined;
|
|
58
|
+
strict?: boolean;
|
|
59
|
+
inputExamples?: {
|
|
60
|
+
input: NoInfer<{
|
|
61
|
+
agent_type: string;
|
|
62
|
+
message: string;
|
|
63
|
+
task_name: string;
|
|
64
|
+
}>;
|
|
65
|
+
}[] | undefined;
|
|
66
|
+
id?: never;
|
|
67
|
+
isProviderExecuted?: never;
|
|
68
|
+
args?: never;
|
|
69
|
+
supportsDeferredResults?: never;
|
|
70
|
+
} & {
|
|
71
|
+
type?: undefined | "function";
|
|
72
|
+
} & {
|
|
73
|
+
execute: import("ai").ToolExecuteFunction<{
|
|
74
|
+
agent_type: string;
|
|
75
|
+
message: string;
|
|
76
|
+
task_name: string;
|
|
77
|
+
}, {
|
|
78
|
+
task_name: string;
|
|
79
|
+
agent_path: string;
|
|
80
|
+
}, NoInfer<AgentToolContext>>;
|
|
81
|
+
}) | ({
|
|
82
|
+
title?: string;
|
|
83
|
+
providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
|
|
84
|
+
metadata?: import("@ai-sdk/provider").JSONObject;
|
|
85
|
+
inputSchema: import("ai").FlexibleSchema<{
|
|
86
|
+
agent_type: string;
|
|
87
|
+
message: string;
|
|
88
|
+
task_name: string;
|
|
89
|
+
}>;
|
|
90
|
+
contextSchema?: import("ai").FlexibleSchema<AgentToolContext> | undefined;
|
|
91
|
+
needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
|
|
92
|
+
agent_type: string;
|
|
93
|
+
message: string;
|
|
94
|
+
task_name: string;
|
|
95
|
+
}, NoInfer<AgentToolContext>> | undefined;
|
|
96
|
+
onInputStart?: ((options: import("ai").ToolExecutionOptions<NoInfer<AgentToolContext>>) => void | PromiseLike<void>) | undefined;
|
|
97
|
+
onInputDelta?: ((options: {
|
|
98
|
+
inputTextDelta: string;
|
|
99
|
+
} & import("ai").ToolExecutionOptions<NoInfer<AgentToolContext>>) => void | PromiseLike<void>) | undefined;
|
|
100
|
+
onInputAvailable?: ((options: {
|
|
101
|
+
input: {
|
|
102
|
+
agent_type: string;
|
|
103
|
+
message: string;
|
|
104
|
+
task_name: string;
|
|
105
|
+
};
|
|
106
|
+
} & import("ai").ToolExecutionOptions<NoInfer<AgentToolContext>>) => void | PromiseLike<void>) | undefined;
|
|
107
|
+
toModelOutput?: ((options: {
|
|
108
|
+
toolCallId: string;
|
|
109
|
+
input: {
|
|
110
|
+
agent_type: string;
|
|
111
|
+
message: string;
|
|
112
|
+
task_name: string;
|
|
113
|
+
};
|
|
114
|
+
output: NoInfer<{
|
|
115
|
+
task_name: string;
|
|
116
|
+
agent_path: string;
|
|
117
|
+
}>;
|
|
118
|
+
}) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
|
|
119
|
+
} & {
|
|
120
|
+
outputSchema?: import("ai").FlexibleSchema<{
|
|
121
|
+
task_name: string;
|
|
122
|
+
agent_path: string;
|
|
123
|
+
}> | undefined;
|
|
124
|
+
execute: import("ai").ToolExecuteFunction<{
|
|
125
|
+
agent_type: string;
|
|
126
|
+
message: string;
|
|
127
|
+
task_name: string;
|
|
128
|
+
}, {
|
|
129
|
+
task_name: string;
|
|
130
|
+
agent_path: string;
|
|
131
|
+
}, NoInfer<AgentToolContext>>;
|
|
132
|
+
} & {
|
|
133
|
+
description?: string | ((options: {
|
|
134
|
+
context: NoInfer<AgentToolContext>;
|
|
135
|
+
experimental_sandbox?: import("ai").Experimental_SandboxSession;
|
|
136
|
+
}) => string) | undefined;
|
|
137
|
+
strict?: boolean;
|
|
138
|
+
inputExamples?: {
|
|
139
|
+
input: NoInfer<{
|
|
140
|
+
agent_type: string;
|
|
141
|
+
message: string;
|
|
142
|
+
task_name: string;
|
|
143
|
+
}>;
|
|
144
|
+
}[] | undefined;
|
|
145
|
+
id?: never;
|
|
146
|
+
isProviderExecuted?: never;
|
|
147
|
+
args?: never;
|
|
148
|
+
supportsDeferredResults?: never;
|
|
149
|
+
} & {
|
|
150
|
+
type: "dynamic";
|
|
151
|
+
} & {
|
|
152
|
+
execute: import("ai").ToolExecuteFunction<{
|
|
153
|
+
agent_type: string;
|
|
154
|
+
message: string;
|
|
155
|
+
task_name: string;
|
|
156
|
+
}, {
|
|
157
|
+
task_name: string;
|
|
158
|
+
agent_path: string;
|
|
159
|
+
}, NoInfer<AgentToolContext>>;
|
|
160
|
+
}) | ({
|
|
161
|
+
title?: string;
|
|
162
|
+
providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
|
|
163
|
+
metadata?: import("@ai-sdk/provider").JSONObject;
|
|
164
|
+
inputSchema: import("ai").FlexibleSchema<{
|
|
165
|
+
agent_type: string;
|
|
166
|
+
message: string;
|
|
167
|
+
task_name: string;
|
|
168
|
+
}>;
|
|
169
|
+
contextSchema?: import("ai").FlexibleSchema<AgentToolContext> | undefined;
|
|
170
|
+
needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
|
|
171
|
+
agent_type: string;
|
|
172
|
+
message: string;
|
|
173
|
+
task_name: string;
|
|
174
|
+
}, NoInfer<AgentToolContext>> | undefined;
|
|
175
|
+
onInputStart?: ((options: import("ai").ToolExecutionOptions<NoInfer<AgentToolContext>>) => void | PromiseLike<void>) | undefined;
|
|
176
|
+
onInputDelta?: ((options: {
|
|
177
|
+
inputTextDelta: string;
|
|
178
|
+
} & import("ai").ToolExecutionOptions<NoInfer<AgentToolContext>>) => void | PromiseLike<void>) | undefined;
|
|
179
|
+
onInputAvailable?: ((options: {
|
|
180
|
+
input: {
|
|
181
|
+
agent_type: string;
|
|
182
|
+
message: string;
|
|
183
|
+
task_name: string;
|
|
184
|
+
};
|
|
185
|
+
} & import("ai").ToolExecutionOptions<NoInfer<AgentToolContext>>) => void | PromiseLike<void>) | undefined;
|
|
186
|
+
toModelOutput?: ((options: {
|
|
187
|
+
toolCallId: string;
|
|
188
|
+
input: {
|
|
189
|
+
agent_type: string;
|
|
190
|
+
message: string;
|
|
191
|
+
task_name: string;
|
|
192
|
+
};
|
|
193
|
+
output: NoInfer<{
|
|
194
|
+
task_name: string;
|
|
195
|
+
agent_path: string;
|
|
196
|
+
}>;
|
|
197
|
+
}) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
|
|
198
|
+
} & {
|
|
199
|
+
outputSchema?: import("ai").FlexibleSchema<{
|
|
200
|
+
task_name: string;
|
|
201
|
+
agent_path: string;
|
|
202
|
+
}> | undefined;
|
|
203
|
+
execute: import("ai").ToolExecuteFunction<{
|
|
204
|
+
agent_type: string;
|
|
205
|
+
message: string;
|
|
206
|
+
task_name: string;
|
|
207
|
+
}, {
|
|
208
|
+
task_name: string;
|
|
209
|
+
agent_path: string;
|
|
210
|
+
}, NoInfer<AgentToolContext>>;
|
|
211
|
+
} & {
|
|
212
|
+
type: "provider";
|
|
213
|
+
id: `${string}.${string}`;
|
|
214
|
+
args: Record<string, unknown>;
|
|
215
|
+
description?: never;
|
|
216
|
+
strict?: never;
|
|
217
|
+
inputExamples?: never;
|
|
218
|
+
} & {
|
|
219
|
+
isProviderExecuted: false;
|
|
220
|
+
supportsDeferredResults?: never;
|
|
221
|
+
} & {
|
|
222
|
+
execute: import("ai").ToolExecuteFunction<{
|
|
223
|
+
agent_type: string;
|
|
224
|
+
message: string;
|
|
225
|
+
task_name: string;
|
|
226
|
+
}, {
|
|
227
|
+
task_name: string;
|
|
228
|
+
agent_path: string;
|
|
229
|
+
}, NoInfer<AgentToolContext>>;
|
|
230
|
+
}) | ({
|
|
231
|
+
title?: string;
|
|
232
|
+
providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
|
|
233
|
+
metadata?: import("@ai-sdk/provider").JSONObject;
|
|
234
|
+
inputSchema: import("ai").FlexibleSchema<{
|
|
235
|
+
agent_type: string;
|
|
236
|
+
message: string;
|
|
237
|
+
task_name: string;
|
|
238
|
+
}>;
|
|
239
|
+
contextSchema?: import("ai").FlexibleSchema<AgentToolContext> | undefined;
|
|
240
|
+
needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
|
|
241
|
+
agent_type: string;
|
|
242
|
+
message: string;
|
|
243
|
+
task_name: string;
|
|
244
|
+
}, NoInfer<AgentToolContext>> | undefined;
|
|
245
|
+
onInputStart?: ((options: import("ai").ToolExecutionOptions<NoInfer<AgentToolContext>>) => void | PromiseLike<void>) | undefined;
|
|
246
|
+
onInputDelta?: ((options: {
|
|
247
|
+
inputTextDelta: string;
|
|
248
|
+
} & import("ai").ToolExecutionOptions<NoInfer<AgentToolContext>>) => void | PromiseLike<void>) | undefined;
|
|
249
|
+
onInputAvailable?: ((options: {
|
|
250
|
+
input: {
|
|
251
|
+
agent_type: string;
|
|
252
|
+
message: string;
|
|
253
|
+
task_name: string;
|
|
254
|
+
};
|
|
255
|
+
} & import("ai").ToolExecutionOptions<NoInfer<AgentToolContext>>) => void | PromiseLike<void>) | undefined;
|
|
256
|
+
toModelOutput?: ((options: {
|
|
257
|
+
toolCallId: string;
|
|
258
|
+
input: {
|
|
259
|
+
agent_type: string;
|
|
260
|
+
message: string;
|
|
261
|
+
task_name: string;
|
|
262
|
+
};
|
|
263
|
+
output: NoInfer<{
|
|
264
|
+
task_name: string;
|
|
265
|
+
agent_path: string;
|
|
266
|
+
}>;
|
|
267
|
+
}) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
|
|
268
|
+
} & {
|
|
269
|
+
outputSchema?: import("ai").FlexibleSchema<{
|
|
270
|
+
task_name: string;
|
|
271
|
+
agent_path: string;
|
|
272
|
+
}> | undefined;
|
|
273
|
+
execute: import("ai").ToolExecuteFunction<{
|
|
274
|
+
agent_type: string;
|
|
275
|
+
message: string;
|
|
276
|
+
task_name: string;
|
|
277
|
+
}, {
|
|
278
|
+
task_name: string;
|
|
279
|
+
agent_path: string;
|
|
280
|
+
}, NoInfer<AgentToolContext>>;
|
|
281
|
+
} & {
|
|
282
|
+
type: "provider";
|
|
283
|
+
id: `${string}.${string}`;
|
|
284
|
+
args: Record<string, unknown>;
|
|
285
|
+
description?: never;
|
|
286
|
+
strict?: never;
|
|
287
|
+
inputExamples?: never;
|
|
288
|
+
} & {
|
|
289
|
+
isProviderExecuted: true;
|
|
290
|
+
supportsDeferredResults?: boolean;
|
|
291
|
+
} & {
|
|
292
|
+
execute: import("ai").ToolExecuteFunction<{
|
|
293
|
+
agent_type: string;
|
|
294
|
+
message: string;
|
|
295
|
+
task_name: string;
|
|
296
|
+
}, {
|
|
297
|
+
task_name: string;
|
|
298
|
+
agent_path: string;
|
|
299
|
+
}, NoInfer<AgentToolContext>>;
|
|
300
|
+
});
|
|
301
|
+
//# sourceMappingURL=spawn-agent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spawn-agent.d.ts","sourceRoot":"","sources":["../../src/zukhruf/spawn-agent.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAyBhE,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAEZ,MAAM;wBAAc,MAAM;;;;;mBAA1B,MAAM;oBAAc,MAAM;;;;;;;mBAA1B,MAAM;oBAAc,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAA1B,MAAM;oBAAc,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAA1B,MAAM;wBAAc,MAAM;;;;;mBAA1B,MAAM;oBAAc,MAAM;;;;;;;mBAA1B,MAAM;oBAAc,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAA1B,MAAM;oBAAc,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAA1B,MAAM;wBAAc,MAAM;;;;;mBAA1B,MAAM;oBAAc,MAAM;;;;;;;mBAA1B,MAAM;oBAAc,MAAM;;;;;;;;;;;;;;;;;;mBAA1B,MAAM;oBAAc,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAA1B,MAAM;wBAAc,MAAM;;;;;mBAA1B,MAAM;oBAAc,MAAM;;;;;;;mBAA1B,MAAM;oBAAc,MAAM;;;;;;;;;;;;;;;;;;mBAA1B,MAAM;oBAAc,MAAM;;EAgBvC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ApprovalMutex } from './approval-mutex.ts';
|
|
2
|
+
/**
|
|
3
|
+
* Cross-process approval mutex backed by a dedicated SQLite database.
|
|
4
|
+
*
|
|
5
|
+
* SQLite write locks are database-wide, so one file serializes all approval
|
|
6
|
+
* transitions that use it. Do not use the ContextStore database file: the
|
|
7
|
+
* protected operation must be able to persist the assistant message while this
|
|
8
|
+
* transaction is open.
|
|
9
|
+
*/
|
|
10
|
+
export declare class SqliteApprovalMutex extends ApprovalMutex implements Disposable {
|
|
11
|
+
#private;
|
|
12
|
+
constructor(path: string);
|
|
13
|
+
runExclusive<T>(conversationId: string, operation: () => Promise<T>): Promise<T>;
|
|
14
|
+
close(): void;
|
|
15
|
+
[Symbol.dispose](): void;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=sqlite-approval-mutex.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sqlite-approval-mutex.d.ts","sourceRoot":"","sources":["../../src/zukhruf/sqlite-approval-mutex.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD;;;;;;;GAOG;AACH,qBAAa,mBAAoB,SAAQ,aAAc,YAAW,UAAU;;gBAM9D,IAAI,EAAE,MAAM;IAelB,YAAY,CAAC,CAAC,EAClB,cAAc,EAAE,MAAM,EACtB,SAAS,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAC1B,OAAO,CAAC,CAAC,CAAC;IA8Bb,KAAK,IAAI,IAAI;IAIb,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,IAAI;CAmBzB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepagents/experimental",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
},
|
|
36
36
|
"files": [
|
|
37
37
|
"dist",
|
|
38
|
+
"!dist/spec/**",
|
|
38
39
|
"!**/*.tsbuildinfo",
|
|
39
40
|
"!**/*.test.*"
|
|
40
41
|
],
|
|
@@ -42,17 +43,17 @@
|
|
|
42
43
|
"access": "public"
|
|
43
44
|
},
|
|
44
45
|
"dependencies": {
|
|
45
|
-
"@deepagents/context": "
|
|
46
|
-
"ai": "^
|
|
46
|
+
"@deepagents/context": "5.0.0",
|
|
47
|
+
"ai": "^7.0.20",
|
|
47
48
|
"just-bash": "^3.0.1",
|
|
48
49
|
"pg-boss": "^12.24.1",
|
|
49
50
|
"tiny-tfidf": "^1.0.0",
|
|
50
|
-
"uuid": "^13.0.2"
|
|
51
|
+
"uuid": "^13.0.2",
|
|
52
|
+
"zod": "^3.25.76 || ^4.0.0"
|
|
51
53
|
},
|
|
52
54
|
"devDependencies": {
|
|
53
|
-
"@ai-sdk/provider": "^
|
|
55
|
+
"@ai-sdk/provider": "^4.0.3",
|
|
54
56
|
"@electric-sql/pglite": "^0.5.3",
|
|
55
|
-
"just-bash": "^3.0.1"
|
|
56
|
-
"zod": "^3.25.76 || ^4.0.0"
|
|
57
|
+
"just-bash": "^3.0.1"
|
|
57
58
|
}
|
|
58
59
|
}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { ContextEngine, type ContextStore, type StreamStore } from '@deepagents/context';
|
|
2
|
-
import type { AgentDeclaration } from './agent.ts';
|
|
3
|
-
import type { TurnQueue } from './queue/turn-queue.ts';
|
|
4
|
-
export interface RuntimeOptions {
|
|
5
|
-
store: ContextStore;
|
|
6
|
-
streamStore: StreamStore;
|
|
7
|
-
queue: TurnQueue;
|
|
8
|
-
}
|
|
9
|
-
export interface ConversationId {
|
|
10
|
-
chatId: string;
|
|
11
|
-
userId: string;
|
|
12
|
-
}
|
|
13
|
-
export interface WorkOptions {
|
|
14
|
-
concurrency?: number;
|
|
15
|
-
}
|
|
16
|
-
export interface TurnInput {
|
|
17
|
-
/**
|
|
18
|
-
* The ask's identity, supplied by the caller: any unique string (a client's
|
|
19
|
-
* message id, or `crypto.randomUUID()` when the caller has no natural key).
|
|
20
|
-
* It doubles as the stream id and the assistant message id. Enqueueing the
|
|
21
|
-
* same id again reattaches to the existing turn instead of running it
|
|
22
|
-
* twice; the first call's `input` wins.
|
|
23
|
-
*/
|
|
24
|
-
id: string;
|
|
25
|
-
input: string;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Executes an AgentDeclaration as a background agent, split into three roles:
|
|
29
|
-
*
|
|
30
|
-
* - `enqueue` — durably queue a turn (the queue carries the user message
|
|
31
|
-
* until execution); executes nothing. Safe from any short-lived process.
|
|
32
|
-
* - `work` — start a worker that consumes queued turns; each turn runs
|
|
33
|
-
* start-to-finish in this process, serialized per chat by the TurnQueue.
|
|
34
|
-
* - `observe` — reconnect/cancel from anywhere; never spins a sandbox.
|
|
35
|
-
*
|
|
36
|
-
* Plus the approval verbs: a turn pauses when the model calls a
|
|
37
|
-
* `needsApproval` tool (the pause is pure data — a dangling tool part on the
|
|
38
|
-
* chain head + a terminal stream); `approve`/`deny` resolve it and re-run the
|
|
39
|
-
* turn as a continuation. Turns enqueued while a chat awaits approval QUEUE
|
|
40
|
-
* BEHIND it (parked, revived in order after the continuation).
|
|
41
|
-
*/
|
|
42
|
-
export declare function createRuntime(declaration: AgentDeclaration, options: RuntimeOptions): {
|
|
43
|
-
enqueue({ chatId, userId }: ConversationId, turn: TurnInput): Promise<{
|
|
44
|
-
id: string;
|
|
45
|
-
stream: ReadableStream<import("@deepagents/context").StreamPart>;
|
|
46
|
-
}>;
|
|
47
|
-
approve(conversation: ConversationId, input: {
|
|
48
|
-
toolCallId: string;
|
|
49
|
-
}): Promise<{
|
|
50
|
-
id: string;
|
|
51
|
-
stream: ReadableStream<import("@deepagents/context").StreamPart>;
|
|
52
|
-
}>;
|
|
53
|
-
deny(conversation: ConversationId, input: {
|
|
54
|
-
toolCallId: string;
|
|
55
|
-
reason?: string;
|
|
56
|
-
}): Promise<{
|
|
57
|
-
id: string;
|
|
58
|
-
stream: ReadableStream<import("@deepagents/context").StreamPart>;
|
|
59
|
-
}>;
|
|
60
|
-
observe({ chatId, userId }: ConversationId): {
|
|
61
|
-
engine: ContextEngine;
|
|
62
|
-
resume(): Promise<ReadableStream<import("@deepagents/context").StreamPart> | null>;
|
|
63
|
-
cancel(streamId?: string): Promise<void>;
|
|
64
|
-
};
|
|
65
|
-
work(options?: WorkOptions): Promise<AsyncDisposable>;
|
|
66
|
-
};
|
|
67
|
-
//# sourceMappingURL=runtime.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/zukhruf/runtime.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,aAAa,EACb,KAAK,YAAY,EAGjB,KAAK,WAAW,EAKjB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,KAAK,EAAkB,SAAS,EAAW,MAAM,uBAAuB,CAAC;AAEhF,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,YAAY,CAAC;IACpB,WAAW,EAAE,WAAW,CAAC;IACzB,KAAK,EAAE,SAAS,CAAC;CAClB;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,WAAW;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,SAAS;IACxB;;;;;;OAMG;IACH,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;CACf;AAcD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,aAAa,CAC3B,WAAW,EAAE,gBAAgB,EAC7B,OAAO,EAAE,cAAc;gCAmHa,cAAc,QAAQ,SAAS;;;;0BAsBrC,cAAc,SAAS;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE;;;;uBAOzD,cAAc,SACrB;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE;;;;gCAQpB,cAAc;;;0BAgBd,MAAM;;mBAWb,WAAW,GAAG,OAAO,CAAC,eAAe,CAAC;EAc9D"}
|