@paddockai/server 0.0.4 → 0.0.5
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/dist/index.cjs +80 -135
- package/dist/index.d.cts +578 -605
- package/dist/index.d.ts +578 -605
- package/dist/index.js +79 -123
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -18,10 +18,6 @@ interface components {
|
|
|
18
18
|
};
|
|
19
19
|
/** @enum {string} */
|
|
20
20
|
Harness: "claude-code" | "codex" | "pi";
|
|
21
|
-
/** @description The customer's own string keys and values; never case-converted. */
|
|
22
|
-
Metadata: {
|
|
23
|
-
[key: string]: string;
|
|
24
|
-
};
|
|
25
21
|
/**
|
|
26
22
|
* Format: date-time
|
|
27
23
|
* @description RFC 3339 in UTC with milliseconds.
|
|
@@ -31,8 +27,10 @@ interface components {
|
|
|
31
27
|
name: string;
|
|
32
28
|
version: number;
|
|
33
29
|
harness: components["schemas"]["Harness"];
|
|
30
|
+
/** @description The template's model: harness.model, or the harness's default when it is null. */
|
|
34
31
|
model: string;
|
|
35
|
-
|
|
32
|
+
/** @description paddock.yaml's description. */
|
|
33
|
+
description: string | null;
|
|
36
34
|
digest: string;
|
|
37
35
|
/**
|
|
38
36
|
* @description A built-in template: paddock creates its versions, and it cannot be changed or deleted. Absent from servers that predate built-in templates, which is false.
|
|
@@ -44,93 +42,194 @@ interface components {
|
|
|
44
42
|
TemplatePage: components["schemas"]["Page"] & {
|
|
45
43
|
data?: components["schemas"]["Template"][];
|
|
46
44
|
};
|
|
47
|
-
|
|
45
|
+
/** @description A model the project can use: a platform model of paddock's catalog, or a project model of one of its providers. */
|
|
46
|
+
Model: {
|
|
47
|
+
/** @description What a template's or an agent's model names. */
|
|
48
48
|
name: string;
|
|
49
|
-
|
|
49
|
+
harness: components["schemas"]["Harness"];
|
|
50
|
+
/** @enum {string} */
|
|
51
|
+
source: "platform" | "project";
|
|
52
|
+
/** @description The project model's provider; null for a platform model. */
|
|
53
|
+
provider: string | null;
|
|
50
54
|
};
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
value: string;
|
|
55
|
+
ModelPage: components["schemas"]["Page"] & {
|
|
56
|
+
data?: components["schemas"]["Model"][];
|
|
54
57
|
};
|
|
55
|
-
|
|
58
|
+
PaddockPermissions: {
|
|
56
59
|
allow: string[];
|
|
57
60
|
deny: string[];
|
|
58
61
|
};
|
|
59
|
-
|
|
62
|
+
/** @description The harness, its models, and its permission rules. agents.create may replace the whole block. */
|
|
63
|
+
HarnessBlock: {
|
|
64
|
+
/** @enum {string} */
|
|
65
|
+
provider: "claude-code" | "codex" | "pi";
|
|
66
|
+
model: string | null;
|
|
67
|
+
small_model: string | null;
|
|
68
|
+
permissions: components["schemas"]["PaddockPermissions"];
|
|
69
|
+
};
|
|
70
|
+
EnvironmentBlock: {
|
|
71
|
+
/** @description A script that prepares the computer. */
|
|
72
|
+
setup: string | null;
|
|
73
|
+
};
|
|
74
|
+
PaddockEnv: {
|
|
60
75
|
name: string;
|
|
61
|
-
|
|
62
|
-
headers?: {
|
|
63
|
-
[key: string]: string;
|
|
64
|
-
};
|
|
76
|
+
value: string;
|
|
65
77
|
};
|
|
66
|
-
|
|
78
|
+
PaddockSecret: {
|
|
67
79
|
name: string;
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
80
|
+
/** @enum {string} */
|
|
81
|
+
scope: "agent" | "template";
|
|
82
|
+
sandbox: boolean;
|
|
83
|
+
};
|
|
84
|
+
PaddockPathEntry: {
|
|
85
|
+
name: string;
|
|
86
|
+
path: string;
|
|
87
|
+
};
|
|
88
|
+
/** @description A remote server (url and headers) or a local one (command, args, env, run from path); exactly one of url and command. */
|
|
89
|
+
PaddockMcp: {
|
|
90
|
+
name: string;
|
|
91
|
+
url: string | null;
|
|
92
|
+
headers: {
|
|
93
|
+
[key: string]: string;
|
|
94
|
+
};
|
|
95
|
+
path: string | null;
|
|
96
|
+
command: string | null;
|
|
97
|
+
args: string[];
|
|
98
|
+
env: {
|
|
71
99
|
[key: string]: string;
|
|
72
100
|
};
|
|
73
101
|
};
|
|
74
|
-
|
|
75
|
-
McpEntry: components["schemas"]["McpRemoteEntry"] | components["schemas"]["McpLocalEntry"];
|
|
76
|
-
MarketplaceEntry: {
|
|
102
|
+
PaddockMarketplace: {
|
|
77
103
|
name: string;
|
|
78
|
-
/** @description host/owner/repo: a public Git repository
|
|
104
|
+
/** @description host/owner/repo: a public Git repository. */
|
|
79
105
|
source: string;
|
|
80
|
-
/** @description Read-only: raised by refresh. */
|
|
81
|
-
revision?: number;
|
|
82
106
|
};
|
|
83
|
-
|
|
107
|
+
PaddockPlugin: {
|
|
84
108
|
/** @description plugin@marketplace */
|
|
85
109
|
name: string;
|
|
86
|
-
enabled
|
|
110
|
+
enabled: boolean;
|
|
87
111
|
};
|
|
88
|
-
/** @description
|
|
89
|
-
|
|
90
|
-
|
|
112
|
+
/** @description new, or { key }: where a message goes when the router is null. */
|
|
113
|
+
InboxSession: "new" | {
|
|
114
|
+
key: string;
|
|
91
115
|
};
|
|
92
|
-
|
|
93
|
-
harness: components["schemas"]["Harness"];
|
|
94
|
-
model: string;
|
|
95
|
-
/** @description claude-code only: its small model. */
|
|
96
|
-
smallModel?: string;
|
|
97
|
-
systemPrompt?: string;
|
|
98
|
-
env?: components["schemas"]["EnvEntry"][];
|
|
99
|
-
permissions?: components["schemas"]["PermissionsSpec"];
|
|
100
|
-
mcp?: components["schemas"]["McpEntry"][];
|
|
101
|
-
marketplaces?: components["schemas"]["MarketplaceEntry"][];
|
|
102
|
-
plugins?: components["schemas"]["PluginEntry"][];
|
|
103
|
-
outbox?: components["schemas"]["OutboxSpec"];
|
|
104
|
-
};
|
|
105
|
-
/** @description A template as one document, in its JSON spelling. */
|
|
106
|
-
TemplateDocument: {
|
|
116
|
+
WebhookBlock: {
|
|
107
117
|
/** @enum {string} */
|
|
108
|
-
|
|
118
|
+
verify: "none" | "hmac-sha256" | "standard-webhooks";
|
|
119
|
+
secret: string | null;
|
|
120
|
+
signature_header: string | null;
|
|
121
|
+
dedupe_header: string | null;
|
|
122
|
+
session: components["schemas"]["InboxSession"];
|
|
123
|
+
};
|
|
124
|
+
GithubBlock: {
|
|
125
|
+
events: string[];
|
|
126
|
+
repositories: string[];
|
|
127
|
+
secret: string;
|
|
128
|
+
session: components["schemas"]["InboxSession"];
|
|
129
|
+
};
|
|
130
|
+
SchedulerBlock: {
|
|
131
|
+
cron: string;
|
|
132
|
+
timezone: string;
|
|
133
|
+
message: string;
|
|
134
|
+
session: components["schemas"]["InboxSession"];
|
|
135
|
+
};
|
|
136
|
+
/** @description An inbox entry: a built-in source, the block named after it and no other, and a router or null (010). */
|
|
137
|
+
InboxEntry: {
|
|
138
|
+
name: string;
|
|
109
139
|
/** @enum {string} */
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
140
|
+
source: "webhook" | "github" | "scheduler";
|
|
141
|
+
router: string | null;
|
|
142
|
+
webhook?: components["schemas"]["WebhookBlock"];
|
|
143
|
+
github?: components["schemas"]["GithubBlock"];
|
|
144
|
+
scheduler?: components["schemas"]["SchedulerBlock"];
|
|
113
145
|
};
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
146
|
+
HttpBlock: {
|
|
147
|
+
url: string;
|
|
148
|
+
method: string;
|
|
149
|
+
headers: {
|
|
150
|
+
[key: string]: string;
|
|
151
|
+
};
|
|
152
|
+
per_minute: number;
|
|
153
|
+
};
|
|
154
|
+
/** @description An outbox entry: a subscription, a deliver function or null, and a built-in target with the block named after it (010). */
|
|
155
|
+
OutboxEntry: {
|
|
117
156
|
name: string;
|
|
118
|
-
|
|
157
|
+
subscribe: string;
|
|
158
|
+
deliver: string | null;
|
|
119
159
|
/** @enum {string} */
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
provider: string | null;
|
|
160
|
+
target: "http";
|
|
161
|
+
http?: components["schemas"]["HttpBlock"];
|
|
123
162
|
};
|
|
124
|
-
|
|
125
|
-
|
|
163
|
+
/** @description A template's paddock.yaml as JSON, as written. Every field is required; unused ones are null, [], or {}. */
|
|
164
|
+
PaddockDocument: {
|
|
165
|
+
name: string;
|
|
166
|
+
description: string | null;
|
|
167
|
+
harness: components["schemas"]["HarnessBlock"];
|
|
168
|
+
/** @description A Markdown file, relative to the template. */
|
|
169
|
+
instructions: string | null;
|
|
170
|
+
environment: components["schemas"]["EnvironmentBlock"];
|
|
171
|
+
env: components["schemas"]["PaddockEnv"][];
|
|
172
|
+
secrets: components["schemas"]["PaddockSecret"][];
|
|
173
|
+
skills: components["schemas"]["PaddockPathEntry"][];
|
|
174
|
+
subagents: components["schemas"]["PaddockPathEntry"][];
|
|
175
|
+
commands: components["schemas"]["PaddockPathEntry"][];
|
|
176
|
+
hooks: components["schemas"]["PaddockPathEntry"][];
|
|
177
|
+
mcp: components["schemas"]["PaddockMcp"][];
|
|
178
|
+
/** @description Custom tools; empty in this version. */
|
|
179
|
+
tools: Record<string, never>[];
|
|
180
|
+
marketplaces: components["schemas"]["PaddockMarketplace"][];
|
|
181
|
+
plugins: components["schemas"]["PaddockPlugin"][];
|
|
182
|
+
rsi: boolean;
|
|
183
|
+
inbox: components["schemas"]["InboxEntry"][];
|
|
184
|
+
outbox: components["schemas"]["OutboxEntry"][];
|
|
185
|
+
};
|
|
186
|
+
TemplateFile: {
|
|
187
|
+
path: string;
|
|
188
|
+
size: number;
|
|
189
|
+
};
|
|
190
|
+
/** @enum {string} */
|
|
191
|
+
Source: "webhook" | "github" | "scheduler";
|
|
192
|
+
/** @description An inbox entry with its endpoint. */
|
|
193
|
+
InboxEndpoint: {
|
|
194
|
+
name: string;
|
|
195
|
+
source: components["schemas"]["Source"];
|
|
196
|
+
/** @description The entry's inb_ endpoint; null for a scheduler entry. */
|
|
197
|
+
endpointId: string | null;
|
|
198
|
+
/** @description The URL to register with the sender: the template URL, or on an agent its agent URL; null for a scheduler entry. */
|
|
199
|
+
url: string | null;
|
|
126
200
|
};
|
|
127
201
|
TemplateDetail: components["schemas"]["Template"] & {
|
|
128
|
-
document: components["schemas"]["
|
|
202
|
+
document: components["schemas"]["PaddockDocument"];
|
|
203
|
+
/** @description Every file of the version's bundle, by its path in the bundle. */
|
|
204
|
+
files: components["schemas"]["TemplateFile"][];
|
|
205
|
+
/** @description Each inbox entry with its template URL. */
|
|
206
|
+
inbox: components["schemas"]["InboxEndpoint"][];
|
|
207
|
+
};
|
|
208
|
+
InboxEndpointList: {
|
|
209
|
+
data: components["schemas"]["InboxEndpoint"][];
|
|
210
|
+
};
|
|
211
|
+
/** @description A secret's name and scope, and when its value was set; never the value. */
|
|
212
|
+
Secret: {
|
|
213
|
+
name: string;
|
|
214
|
+
/** @enum {string} */
|
|
215
|
+
scope: "agent" | "template";
|
|
216
|
+
setAt: components["schemas"]["Timestamp"];
|
|
217
|
+
};
|
|
218
|
+
SecretPage: components["schemas"]["Page"] & {
|
|
219
|
+
data?: components["schemas"]["Secret"][];
|
|
220
|
+
};
|
|
221
|
+
SetSecretRequest: {
|
|
222
|
+
/** @description 1 byte to 16 KiB of UTF-8. */
|
|
223
|
+
value: string;
|
|
224
|
+
};
|
|
225
|
+
/** @description The customer's own string keys and values; never case-converted. */
|
|
226
|
+
Metadata: {
|
|
227
|
+
[key: string]: string;
|
|
129
228
|
};
|
|
130
229
|
/** @enum {string} */
|
|
131
230
|
AgentStatus: "sleeping" | "waking" | "awake" | "unavailable";
|
|
132
231
|
/** @enum {string} */
|
|
133
|
-
TurnErrorCode: "harness_error" | "watchdog_timeout" | "model_unavailable" | "model_auth" | "context_too_long" | "conversation_lost" | "sandbox_unavailable" | "internal";
|
|
232
|
+
TurnErrorCode: "harness_error" | "watchdog_timeout" | "model_unavailable" | "model_auth" | "context_too_long" | "conversation_lost" | "setup_failed" | "sandbox_unavailable" | "internal";
|
|
134
233
|
TurnError: {
|
|
135
234
|
code: components["schemas"]["TurnErrorCode"];
|
|
136
235
|
message: string;
|
|
@@ -154,18 +253,57 @@ interface components {
|
|
|
154
253
|
capabilities: components["schemas"]["Capabilities"];
|
|
155
254
|
/** @description Its active sessions. */
|
|
156
255
|
sessionCount: number;
|
|
256
|
+
/** @description The agent URL of each webhook and GitHub inbox entry of its template version. */
|
|
257
|
+
inbox: components["schemas"]["InboxEndpoint"][];
|
|
157
258
|
metadata: components["schemas"]["Metadata"];
|
|
158
259
|
createdAt: components["schemas"]["Timestamp"];
|
|
159
260
|
};
|
|
160
261
|
AgentPage: components["schemas"]["Page"] & {
|
|
161
262
|
data?: components["schemas"]["Agent"][];
|
|
162
263
|
};
|
|
264
|
+
PermissionsSpec: {
|
|
265
|
+
allow: string[];
|
|
266
|
+
deny: string[];
|
|
267
|
+
};
|
|
268
|
+
/** @description Replaces the template's whole harness block for this agent; every field is written. */
|
|
269
|
+
HarnessOverride: {
|
|
270
|
+
provider: components["schemas"]["Harness"];
|
|
271
|
+
/** @description null: the harness's default model. */
|
|
272
|
+
model: string | null;
|
|
273
|
+
/** @description Claude Code only; null otherwise. */
|
|
274
|
+
smallModel: string | null;
|
|
275
|
+
permissions: components["schemas"]["PermissionsSpec"];
|
|
276
|
+
};
|
|
163
277
|
CreateAgentRequest: {
|
|
164
278
|
template: string;
|
|
165
279
|
metadata?: components["schemas"]["Metadata"];
|
|
280
|
+
/** @description The agent's own env values, which override the template's by name. */
|
|
281
|
+
env?: {
|
|
282
|
+
[key: string]: string;
|
|
283
|
+
};
|
|
284
|
+
/** @description A value for every agent secret the template declares. */
|
|
285
|
+
secrets?: {
|
|
286
|
+
[key: string]: string;
|
|
287
|
+
};
|
|
288
|
+
harness?: components["schemas"]["HarnessOverride"];
|
|
166
289
|
};
|
|
167
290
|
/** @enum {string} */
|
|
168
291
|
EntrySource: "template" | "agent";
|
|
292
|
+
McpRemoteEntry: {
|
|
293
|
+
name: string;
|
|
294
|
+
url: string;
|
|
295
|
+
headers?: {
|
|
296
|
+
[key: string]: string;
|
|
297
|
+
};
|
|
298
|
+
};
|
|
299
|
+
McpLocalEntry: {
|
|
300
|
+
name: string;
|
|
301
|
+
command: string;
|
|
302
|
+
args?: string[];
|
|
303
|
+
env?: {
|
|
304
|
+
[key: string]: string;
|
|
305
|
+
};
|
|
306
|
+
};
|
|
169
307
|
AgentMcpEntry: {
|
|
170
308
|
name: string;
|
|
171
309
|
source: components["schemas"]["EntrySource"];
|
|
@@ -177,6 +315,15 @@ interface components {
|
|
|
177
315
|
AgentMcpEntryPage: components["schemas"]["Page"] & {
|
|
178
316
|
data?: components["schemas"]["AgentMcpEntry"][];
|
|
179
317
|
};
|
|
318
|
+
/** @description An MCP server: a remote one by URL, or one that runs in the sandbox. */
|
|
319
|
+
McpEntry: components["schemas"]["McpRemoteEntry"] | components["schemas"]["McpLocalEntry"];
|
|
320
|
+
MarketplaceEntry: {
|
|
321
|
+
name: string;
|
|
322
|
+
/** @description host/owner/repo: a public Git repository holding a marketplace file. */
|
|
323
|
+
source: string;
|
|
324
|
+
/** @description Read-only: raised by refresh. */
|
|
325
|
+
revision?: number;
|
|
326
|
+
};
|
|
180
327
|
AgentMarketplaceEntry: {
|
|
181
328
|
name: string;
|
|
182
329
|
source: components["schemas"]["EntrySource"];
|
|
@@ -187,6 +334,11 @@ interface components {
|
|
|
187
334
|
AgentMarketplaceEntryPage: components["schemas"]["Page"] & {
|
|
188
335
|
data?: components["schemas"]["AgentMarketplaceEntry"][];
|
|
189
336
|
};
|
|
337
|
+
PluginEntry: {
|
|
338
|
+
/** @description plugin@marketplace */
|
|
339
|
+
name: string;
|
|
340
|
+
enabled?: boolean;
|
|
341
|
+
};
|
|
190
342
|
AgentPluginEntry: {
|
|
191
343
|
name: string;
|
|
192
344
|
source: components["schemas"]["EntrySource"];
|
|
@@ -197,6 +349,10 @@ interface components {
|
|
|
197
349
|
AgentPluginEntryPage: components["schemas"]["Page"] & {
|
|
198
350
|
data?: components["schemas"]["AgentPluginEntry"][];
|
|
199
351
|
};
|
|
352
|
+
EnvEntry: {
|
|
353
|
+
name: string;
|
|
354
|
+
value: string;
|
|
355
|
+
};
|
|
200
356
|
AgentEnvEntry: {
|
|
201
357
|
name: string;
|
|
202
358
|
source: components["schemas"]["EntrySource"];
|
|
@@ -218,11 +374,6 @@ interface components {
|
|
|
218
374
|
value: string | null;
|
|
219
375
|
source: components["schemas"]["EntrySource"];
|
|
220
376
|
};
|
|
221
|
-
/** @description The agent's effective outbox allow list: its own, or else the template's. */
|
|
222
|
-
OutboxSetting: {
|
|
223
|
-
value: components["schemas"]["OutboxSpec"];
|
|
224
|
-
source: components["schemas"]["EntrySource"];
|
|
225
|
-
};
|
|
226
377
|
WorkflowSpec: {
|
|
227
378
|
name: string;
|
|
228
379
|
description: string;
|
|
@@ -235,8 +386,16 @@ interface components {
|
|
|
235
386
|
WorkflowEntryPage: components["schemas"]["Page"] & {
|
|
236
387
|
data?: components["schemas"]["WorkflowEntry"][];
|
|
237
388
|
};
|
|
389
|
+
AuthorInput: {
|
|
390
|
+
id: string;
|
|
391
|
+
name?: string;
|
|
392
|
+
};
|
|
238
393
|
SendMessageRequest: {
|
|
239
394
|
text: string;
|
|
395
|
+
/** @description With an API key or a function token: the person the message speaks for. */
|
|
396
|
+
author?: components["schemas"]["AuthorInput"];
|
|
397
|
+
/** @description Up to 50 pairs, stored on the message. */
|
|
398
|
+
metadata?: components["schemas"]["Metadata"];
|
|
240
399
|
};
|
|
241
400
|
/** @description A position in an agent's event log. */
|
|
242
401
|
Seq: number;
|
|
@@ -248,6 +407,19 @@ interface components {
|
|
|
248
407
|
turnId: string | null;
|
|
249
408
|
createdAt: components["schemas"]["Timestamp"];
|
|
250
409
|
};
|
|
410
|
+
Author: {
|
|
411
|
+
/** @enum {string} */
|
|
412
|
+
kind: "participant" | "api_key" | "session_token" | "inbox" | "function";
|
|
413
|
+
/** @description participant: the application's own ID; api_key: the key's ID; session_token: the session's ID; inbox and function: <template>/<entry>. */
|
|
414
|
+
id: string;
|
|
415
|
+
name: string | null;
|
|
416
|
+
via: {
|
|
417
|
+
/** @enum {string} */
|
|
418
|
+
kind: "api_key" | "session_token" | "inbox" | "function";
|
|
419
|
+
/** @description The credential or pipeline that stored the message; inbox: the delivery's ID. */
|
|
420
|
+
id: string;
|
|
421
|
+
};
|
|
422
|
+
};
|
|
251
423
|
UserBody: {
|
|
252
424
|
/**
|
|
253
425
|
* @description discriminator enum property added by openapi-typescript
|
|
@@ -255,6 +427,9 @@ interface components {
|
|
|
255
427
|
*/
|
|
256
428
|
kind: "user";
|
|
257
429
|
text: string;
|
|
430
|
+
/** @description Who wrote it; null for a message whose writer was not recorded. */
|
|
431
|
+
author: components["schemas"]["Author"] | null;
|
|
432
|
+
metadata: components["schemas"]["Metadata"];
|
|
258
433
|
};
|
|
259
434
|
AssistantBody: {
|
|
260
435
|
/**
|
|
@@ -863,20 +1038,15 @@ interface components {
|
|
|
863
1038
|
type: "config.applied";
|
|
864
1039
|
config: components["schemas"]["ConfigApplied"];
|
|
865
1040
|
};
|
|
866
|
-
|
|
867
|
-
name: string;
|
|
868
|
-
contentType: string;
|
|
869
|
-
size: number;
|
|
870
|
-
};
|
|
871
|
-
/** @description A send committed to the outbox, or a failed message queued again by outbox.retry. */
|
|
1041
|
+
/** @description A send committed to the outbox with the entries it matched, or a message's failed steps queued again by outbox.retry. */
|
|
872
1042
|
OutboxQueued: {
|
|
873
1043
|
id: string;
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
1044
|
+
/** @description What the agent sent. */
|
|
1045
|
+
body: {
|
|
1046
|
+
[key: string]: unknown;
|
|
1047
|
+
};
|
|
1048
|
+
/** @description The matched outbox entries; on a retry, the entries queued again. */
|
|
1049
|
+
entries: string[];
|
|
880
1050
|
/** @description Queued again by outbox.retry. */
|
|
881
1051
|
retry: boolean;
|
|
882
1052
|
};
|
|
@@ -888,9 +1058,30 @@ interface components {
|
|
|
888
1058
|
type: "outbox.queued";
|
|
889
1059
|
outbox: components["schemas"]["OutboxQueued"];
|
|
890
1060
|
};
|
|
1061
|
+
/** @description A deliver step or a target input failed and will be tried again. */
|
|
1062
|
+
OutboxRetrying: {
|
|
1063
|
+
id: string;
|
|
1064
|
+
entry: string;
|
|
1065
|
+
/** @description The target input's index; null for the deliver step. */
|
|
1066
|
+
index: number | null;
|
|
1067
|
+
attempts: number;
|
|
1068
|
+
retryAt: components["schemas"]["Timestamp"];
|
|
1069
|
+
code: string;
|
|
1070
|
+
message: string;
|
|
1071
|
+
};
|
|
1072
|
+
OutboxRetryingEvent: {
|
|
1073
|
+
/**
|
|
1074
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1075
|
+
* @enum {string}
|
|
1076
|
+
*/
|
|
1077
|
+
type: "outbox.retrying";
|
|
1078
|
+
outbox: components["schemas"]["OutboxRetrying"];
|
|
1079
|
+
};
|
|
1080
|
+
/** @description A target input was delivered. */
|
|
891
1081
|
OutboxDelivered: {
|
|
892
1082
|
id: string;
|
|
893
|
-
|
|
1083
|
+
entry: string;
|
|
1084
|
+
index: number;
|
|
894
1085
|
attempts: number;
|
|
895
1086
|
};
|
|
896
1087
|
OutboxDeliveredEvent: {
|
|
@@ -901,13 +1092,15 @@ interface components {
|
|
|
901
1092
|
type: "outbox.delivered";
|
|
902
1093
|
outbox: components["schemas"]["OutboxDelivered"];
|
|
903
1094
|
};
|
|
1095
|
+
/** @description A deliver step or a target input failed finally; outbox.retry queues it again. */
|
|
904
1096
|
OutboxFailed: {
|
|
905
1097
|
id: string;
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
message: string;
|
|
1098
|
+
entry: string;
|
|
1099
|
+
/** @description The target input's index; null for the deliver step. */
|
|
1100
|
+
index: number | null;
|
|
910
1101
|
attempts: number;
|
|
1102
|
+
code: string;
|
|
1103
|
+
message: string;
|
|
911
1104
|
};
|
|
912
1105
|
OutboxFailedEvent: {
|
|
913
1106
|
/**
|
|
@@ -917,7 +1110,25 @@ interface components {
|
|
|
917
1110
|
type: "outbox.failed";
|
|
918
1111
|
outbox: components["schemas"]["OutboxFailed"];
|
|
919
1112
|
};
|
|
920
|
-
|
|
1113
|
+
/** @description An inbox delivery or route for this agent failed finally. */
|
|
1114
|
+
InboxFailed: {
|
|
1115
|
+
deliveryId: string;
|
|
1116
|
+
template: string;
|
|
1117
|
+
entry: string;
|
|
1118
|
+
/** @description The route's position; null when the delivery failed before routing. */
|
|
1119
|
+
position: number | null;
|
|
1120
|
+
code: string;
|
|
1121
|
+
message: string;
|
|
1122
|
+
};
|
|
1123
|
+
InboxFailedEvent: {
|
|
1124
|
+
/**
|
|
1125
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1126
|
+
* @enum {string}
|
|
1127
|
+
*/
|
|
1128
|
+
type: "inbox.failed";
|
|
1129
|
+
inbox: components["schemas"]["InboxFailed"];
|
|
1130
|
+
};
|
|
1131
|
+
EventBody: components["schemas"]["MessageEvent"] | components["schemas"]["TurnStartedEvent"] | components["schemas"]["TurnEndedEvent"] | components["schemas"]["StopRequestedEvent"] | components["schemas"]["AgentUnavailableEvent"] | components["schemas"]["AgentAvailableEvent"] | components["schemas"]["DaemonOutdatedEvent"] | components["schemas"]["SessionStatusEvent"] | components["schemas"]["ConfigAppliedEvent"] | components["schemas"]["OutboxQueuedEvent"] | components["schemas"]["OutboxRetryingEvent"] | components["schemas"]["OutboxDeliveredEvent"] | components["schemas"]["OutboxFailedEvent"] | components["schemas"]["InboxFailedEvent"];
|
|
921
1132
|
/** @description An event of an agent's log: the envelope and one event type. */
|
|
922
1133
|
Event: components["schemas"]["EventEnvelope"] & Omit<components["schemas"]["EventBody"], "type">;
|
|
923
1134
|
FileEntry: {
|
|
@@ -951,8 +1162,8 @@ interface components {
|
|
|
951
1162
|
/** @description The agent generation the session's harness runs in full; 0 before the first. */
|
|
952
1163
|
observedGeneration: number;
|
|
953
1164
|
metadata: components["schemas"]["Metadata"];
|
|
954
|
-
/** @description
|
|
955
|
-
|
|
1165
|
+
/** @description Unique among the agent's active sessions; the inbox finds sessions by it. */
|
|
1166
|
+
key: string | null;
|
|
956
1167
|
createdAt: components["schemas"]["Timestamp"];
|
|
957
1168
|
};
|
|
958
1169
|
SessionPage: components["schemas"]["Page"] & {
|
|
@@ -962,15 +1173,25 @@ interface components {
|
|
|
962
1173
|
cwd?: string;
|
|
963
1174
|
systemPrompt?: string;
|
|
964
1175
|
metadata?: components["schemas"]["Metadata"];
|
|
965
|
-
/** @description
|
|
966
|
-
|
|
1176
|
+
/** @description 1 to 500 bytes, unique among the agent's active sessions. */
|
|
1177
|
+
key?: string;
|
|
967
1178
|
};
|
|
968
1179
|
CreateTokenRequest: {
|
|
969
1180
|
ttlSeconds: number;
|
|
1181
|
+
/** @description The person the token's messages are authored by. */
|
|
1182
|
+
participant?: components["schemas"]["AuthorInput"];
|
|
1183
|
+
/** @description A token that can only read and follow the session. */
|
|
1184
|
+
readOnly?: boolean;
|
|
970
1185
|
};
|
|
1186
|
+
/**
|
|
1187
|
+
* @description What a session token allows: `full` reads and writes its session, `read_only` only reads and follows it.
|
|
1188
|
+
* @enum {string}
|
|
1189
|
+
*/
|
|
1190
|
+
TokenMode: "full" | "read_only";
|
|
971
1191
|
SessionToken: {
|
|
972
1192
|
token: string;
|
|
973
1193
|
expiresAt: components["schemas"]["Timestamp"];
|
|
1194
|
+
mode: components["schemas"]["TokenMode"];
|
|
974
1195
|
};
|
|
975
1196
|
EventPage: {
|
|
976
1197
|
data: components["schemas"]["Event"][];
|
|
@@ -1157,6 +1378,16 @@ interface components {
|
|
|
1157
1378
|
/** @description The event's seq in decimal */
|
|
1158
1379
|
id: string;
|
|
1159
1380
|
};
|
|
1381
|
+
OutboxRetryingStreamEvent: {
|
|
1382
|
+
/**
|
|
1383
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1384
|
+
* @enum {string}
|
|
1385
|
+
*/
|
|
1386
|
+
event: "outbox.retrying";
|
|
1387
|
+
data: components["schemas"]["Event"];
|
|
1388
|
+
/** @description The event's seq in decimal */
|
|
1389
|
+
id: string;
|
|
1390
|
+
};
|
|
1160
1391
|
OutboxDeliveredStreamEvent: {
|
|
1161
1392
|
/**
|
|
1162
1393
|
* @description discriminator enum property added by openapi-typescript
|
|
@@ -1177,8 +1408,18 @@ interface components {
|
|
|
1177
1408
|
/** @description The event's seq in decimal */
|
|
1178
1409
|
id: string;
|
|
1179
1410
|
};
|
|
1411
|
+
InboxFailedStreamEvent: {
|
|
1412
|
+
/**
|
|
1413
|
+
* @description discriminator enum property added by openapi-typescript
|
|
1414
|
+
* @enum {string}
|
|
1415
|
+
*/
|
|
1416
|
+
event: "inbox.failed";
|
|
1417
|
+
data: components["schemas"]["Event"];
|
|
1418
|
+
/** @description The event's seq in decimal */
|
|
1419
|
+
id: string;
|
|
1420
|
+
};
|
|
1180
1421
|
/** @description An event of the stream as an SDK surfaces it: the SSE event field as event, the parsed data as data, the SSE id as id. */
|
|
1181
|
-
StreamEvent: components["schemas"]["SessionStreamEvent"] | components["schemas"]["MessageStreamEvent"] | components["schemas"]["TurnStartedStreamEvent"] | components["schemas"]["TurnEndedStreamEvent"] | components["schemas"]["StopRequestedStreamEvent"] | components["schemas"]["AgentUnavailableStreamEvent"] | components["schemas"]["AgentAvailableStreamEvent"] | components["schemas"]["DaemonOutdatedStreamEvent"] | components["schemas"]["ConfigAppliedStreamEvent"] | components["schemas"]["SessionStatusStreamEvent"] | components["schemas"]["OutboxQueuedStreamEvent"] | components["schemas"]["OutboxDeliveredStreamEvent"] | components["schemas"]["OutboxFailedStreamEvent"] | components["schemas"]["StatusUpdateStreamEvent"] | components["schemas"]["ErrorStreamEvent"];
|
|
1422
|
+
StreamEvent: components["schemas"]["SessionStreamEvent"] | components["schemas"]["MessageStreamEvent"] | components["schemas"]["TurnStartedStreamEvent"] | components["schemas"]["TurnEndedStreamEvent"] | components["schemas"]["StopRequestedStreamEvent"] | components["schemas"]["AgentUnavailableStreamEvent"] | components["schemas"]["AgentAvailableStreamEvent"] | components["schemas"]["DaemonOutdatedStreamEvent"] | components["schemas"]["ConfigAppliedStreamEvent"] | components["schemas"]["SessionStatusStreamEvent"] | components["schemas"]["OutboxQueuedStreamEvent"] | components["schemas"]["OutboxRetryingStreamEvent"] | components["schemas"]["OutboxDeliveredStreamEvent"] | components["schemas"]["OutboxFailedStreamEvent"] | components["schemas"]["InboxFailedStreamEvent"] | components["schemas"]["StatusUpdateStreamEvent"] | components["schemas"]["ErrorStreamEvent"];
|
|
1182
1423
|
/** @enum {string} */
|
|
1183
1424
|
ProviderKind: "anthropic" | "openai" | "anthropic-compatible" | "openai-compatible";
|
|
1184
1425
|
/**
|
|
@@ -1254,359 +1495,126 @@ interface components {
|
|
|
1254
1495
|
ProviderTestRequest: {
|
|
1255
1496
|
testModel?: string;
|
|
1256
1497
|
};
|
|
1257
|
-
/**
|
|
1258
|
-
* @description AWS Lambda's runtime identifiers.
|
|
1259
|
-
* @enum {string}
|
|
1260
|
-
*/
|
|
1261
|
-
FunctionRuntime: "nodejs24.x" | "python3.14";
|
|
1262
|
-
FunctionSummary: {
|
|
1263
|
-
runtime: components["schemas"]["FunctionRuntime"];
|
|
1264
|
-
/** @description The preset the code was taken from when it was set. */
|
|
1265
|
-
preset: string | null;
|
|
1266
|
-
/** @description The code is still the preset's, byte for byte, so the console offers its form. */
|
|
1267
|
-
presetCode: boolean;
|
|
1268
|
-
/** @description paddock's version of the side's function, raised by every set, never reused. */
|
|
1269
|
-
version: number;
|
|
1270
|
-
/** @description SHA-256 of the code, hex. */
|
|
1271
|
-
codeSha256: string;
|
|
1272
|
-
updatedAt: components["schemas"]["Timestamp"];
|
|
1273
|
-
};
|
|
1274
|
-
Inbound: {
|
|
1275
|
-
/** @description https://webhook.paddockai.dev/con_… */
|
|
1276
|
-
url: string;
|
|
1277
|
-
/** @description The inbound function; null: every request is answered 503. */
|
|
1278
|
-
functionSummary: components["schemas"]["FunctionSummary"] | null;
|
|
1279
|
-
};
|
|
1280
|
-
RateLimit: {
|
|
1281
|
-
perMinute: number;
|
|
1282
|
-
};
|
|
1283
|
-
CredentialError: {
|
|
1284
|
-
reason: string;
|
|
1285
|
-
at: components["schemas"]["Timestamp"];
|
|
1286
|
-
};
|
|
1287
|
-
Outbound: {
|
|
1288
|
-
/** @description The deliver function; null: sends are refused until one is set. */
|
|
1289
|
-
functionSummary: components["schemas"]["FunctionSummary"] | null;
|
|
1290
|
-
rateLimit: components["schemas"]["RateLimit"];
|
|
1291
|
-
/** @description The last permanent error with code auth; cleared by the next delivered message. */
|
|
1292
|
-
credentialError: components["schemas"]["CredentialError"] | null;
|
|
1293
|
-
};
|
|
1294
|
-
Connector: {
|
|
1295
|
-
id: string;
|
|
1296
|
-
/** @description [a-z0-9-], 1 to 64 characters, unique in the project, fixed at creation. */
|
|
1297
|
-
name: string;
|
|
1298
|
-
/** @description The names of its secrets, default first; never their values. */
|
|
1299
|
-
secrets: string[];
|
|
1300
|
-
/** @description null: no webhook URL answers for it. */
|
|
1301
|
-
inbound: components["schemas"]["Inbound"] | null;
|
|
1302
|
-
/** @description null: every send to its keys is refused. */
|
|
1303
|
-
outbound: components["schemas"]["Outbound"] | null;
|
|
1304
|
-
createdAt: components["schemas"]["Timestamp"];
|
|
1305
|
-
updatedAt: components["schemas"]["Timestamp"];
|
|
1306
|
-
};
|
|
1307
|
-
ConnectorPage: components["schemas"]["Page"] & {
|
|
1308
|
-
data?: components["schemas"]["Connector"][];
|
|
1309
|
-
};
|
|
1310
|
-
/** @description Present: the connector has an inbound side. */
|
|
1311
|
-
InboundCreate: Record<string, never>;
|
|
1312
|
-
/** @description Present: the connector has an outbound side. */
|
|
1313
|
-
OutboundCreate: {
|
|
1314
|
-
rateLimit?: components["schemas"]["RateLimit"];
|
|
1315
|
-
};
|
|
1316
|
-
ConnectorCreate: {
|
|
1317
|
-
name: string;
|
|
1318
|
-
inbound?: components["schemas"]["InboundCreate"] | null;
|
|
1319
|
-
outbound?: components["schemas"]["OutboundCreate"] | null;
|
|
1320
|
-
/** @description The default secret, 16 to 256 printable ASCII characters; generated when omitted. */
|
|
1321
|
-
secret?: string;
|
|
1322
|
-
};
|
|
1323
|
-
PresetParam: {
|
|
1324
|
-
name: string;
|
|
1325
|
-
title: string;
|
|
1326
|
-
required: boolean;
|
|
1327
|
-
default: string | null;
|
|
1328
|
-
/** @description A closed set of values; null: any. */
|
|
1329
|
-
choices: string[] | null;
|
|
1330
|
-
};
|
|
1331
|
-
PresetSide: {
|
|
1332
|
-
/** @description The code by runtime. */
|
|
1333
|
-
code: {
|
|
1334
|
-
[key: string]: string;
|
|
1335
|
-
};
|
|
1336
|
-
/** @description The form the console shows. */
|
|
1337
|
-
params: components["schemas"]["PresetParam"][];
|
|
1338
|
-
};
|
|
1339
|
-
FunctionPreset: {
|
|
1340
|
-
/** @description route-all, github, slack, stripe, hubspot-v2, hubspot-v3, shopify, linear, standard-webhooks, webhook, email-ses. */
|
|
1341
|
-
name: string;
|
|
1342
|
-
title: string;
|
|
1343
|
-
/** @description The secret names its code reads, default first. */
|
|
1344
|
-
secrets: string[];
|
|
1345
|
-
inbound: components["schemas"]["PresetSide"] | null;
|
|
1346
|
-
outbound: components["schemas"]["PresetSide"] | null;
|
|
1347
|
-
};
|
|
1348
|
-
FunctionPresetList: {
|
|
1349
|
-
presets: components["schemas"]["FunctionPreset"][];
|
|
1350
|
-
};
|
|
1351
|
-
/** @description Sets which sides exist and the outbound rate limit; a side omitted or null is removed. */
|
|
1352
|
-
ConnectorUpdate: {
|
|
1353
|
-
inbound?: components["schemas"]["InboundCreate"] | null;
|
|
1354
|
-
outbound?: components["schemas"]["OutboundCreate"] | null;
|
|
1355
|
-
};
|
|
1356
|
-
ConnectorSecret: {
|
|
1357
|
-
name: string;
|
|
1358
|
-
secret: string;
|
|
1359
|
-
};
|
|
1360
|
-
SecretRotateRequest: {
|
|
1361
|
-
/** @description 1 to 64 of [A-Za-z0-9_]; default "default". A name the connector lacks is created. */
|
|
1362
|
-
name?: string;
|
|
1363
|
-
/** @description 16 to 256 printable ASCII characters; generated when omitted. */
|
|
1364
|
-
secret?: string;
|
|
1365
|
-
};
|
|
1366
1498
|
/** @enum {string} */
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
side: components["schemas"]["FunctionSide"];
|
|
1370
|
-
/** @description The one source file, UTF-8. */
|
|
1371
|
-
code: string;
|
|
1372
|
-
/** @description Passed to every invocation; not secret. */
|
|
1373
|
-
params: {
|
|
1374
|
-
[key: string]: string;
|
|
1375
|
-
};
|
|
1376
|
-
};
|
|
1377
|
-
FunctionSet: {
|
|
1378
|
-
runtime: components["schemas"]["FunctionRuntime"];
|
|
1379
|
-
/** @description At most 256 KiB; omitted: the preset's code for the side and runtime. */
|
|
1380
|
-
code?: string;
|
|
1381
|
-
/** @description A preset's name; required when code is omitted. */
|
|
1382
|
-
preset?: string;
|
|
1383
|
-
/** @description Omitted: the preset's defaults, or none. */
|
|
1384
|
-
params?: {
|
|
1385
|
-
[key: string]: string;
|
|
1386
|
-
};
|
|
1387
|
-
};
|
|
1388
|
-
FunctionTestEvent: {
|
|
1389
|
-
/** @enum {string} */
|
|
1390
|
-
method?: "POST";
|
|
1391
|
-
query?: {
|
|
1392
|
-
[key: string]: string;
|
|
1393
|
-
};
|
|
1394
|
-
headers?: {
|
|
1395
|
-
[key: string]: string;
|
|
1396
|
-
};
|
|
1397
|
-
/** @description The raw body. */
|
|
1398
|
-
body: string;
|
|
1399
|
-
/**
|
|
1400
|
-
* @description Default utf8.
|
|
1401
|
-
* @enum {string}
|
|
1402
|
-
*/
|
|
1403
|
-
bodyEncoding?: "utf8" | "base64";
|
|
1404
|
-
};
|
|
1405
|
-
DeliverTestAttachment: {
|
|
1499
|
+
DeliveryStatus: "pending" | "routed" | "dropped" | "filtered" | "rejected" | "failed";
|
|
1500
|
+
TemplateVersionRef: {
|
|
1406
1501
|
name: string;
|
|
1407
|
-
|
|
1408
|
-
url: string;
|
|
1409
|
-
};
|
|
1410
|
-
DeliverTestMessage: {
|
|
1411
|
-
/** @description The key is the connector's name, ":", and this. */
|
|
1412
|
-
address: string;
|
|
1413
|
-
text: string;
|
|
1414
|
-
/** @description URLs the function downloads, as given. */
|
|
1415
|
-
attachments?: components["schemas"]["DeliverTestAttachment"][];
|
|
1502
|
+
version: number;
|
|
1416
1503
|
};
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
runtime: components["schemas"]["FunctionRuntime"];
|
|
1504
|
+
DeliveryError: {
|
|
1505
|
+
/** @description rejected: the verification that failed; failed: invalid_result, invalid_schedule, no_router, or unavailable. */
|
|
1420
1506
|
code: string;
|
|
1421
|
-
/** @description Default: none. */
|
|
1422
|
-
params?: {
|
|
1423
|
-
[key: string]: string;
|
|
1424
|
-
};
|
|
1425
|
-
};
|
|
1426
|
-
/** @description Inbound: a sample request, or a recorded delivery's request; outbound: a message delivered for real. With a draft, the draft runs instead of the saved version. */
|
|
1427
|
-
FunctionTestRequest: {
|
|
1428
|
-
event?: components["schemas"]["FunctionTestEvent"];
|
|
1429
|
-
deliveryId?: string;
|
|
1430
|
-
/** @description With deliveryId: run as a replay would, with ctx.replay set. */
|
|
1431
|
-
replay?: boolean;
|
|
1432
|
-
message?: components["schemas"]["DeliverTestMessage"];
|
|
1433
|
-
draft?: components["schemas"]["FunctionDraft"];
|
|
1434
|
-
};
|
|
1435
|
-
/** @enum {string} */
|
|
1436
|
-
FunctionResult: "accept" | "respond" | "reject" | "ok" | "retryable" | "permanent" | "error" | "timeout";
|
|
1437
|
-
/** @description As agent.sessions.create takes them; used only when a session is created. connectorKey is the route's and refused in metadata. */
|
|
1438
|
-
SessionSettings: {
|
|
1439
|
-
cwd?: string;
|
|
1440
|
-
systemPrompt?: string;
|
|
1441
|
-
metadata?: components["schemas"]["Metadata"];
|
|
1442
|
-
};
|
|
1443
|
-
/** @description One entry of an inbound function's deliver list. */
|
|
1444
|
-
Route: {
|
|
1445
|
-
/** @description An agent's ID. */
|
|
1446
|
-
agent: string;
|
|
1447
|
-
/** @description null: a new session. */
|
|
1448
|
-
sessionKey: string | null;
|
|
1449
|
-
/** @description A reply match: the external ID of the message the event answers. */
|
|
1450
|
-
replyTo?: string;
|
|
1451
|
-
/** @description With replyTo: deliver only to the matched session. */
|
|
1452
|
-
matchOnly?: boolean;
|
|
1453
1507
|
message: string;
|
|
1454
|
-
/** @description Becomes the session's reply key when delivered. */
|
|
1455
|
-
replyKey?: string;
|
|
1456
|
-
settings?: components["schemas"]["SessionSettings"];
|
|
1457
|
-
};
|
|
1458
|
-
/** @description A handshake's answer. */
|
|
1459
|
-
FunctionResponse: {
|
|
1460
|
-
status: number;
|
|
1461
|
-
headers: {
|
|
1462
|
-
[key: string]: string;
|
|
1463
|
-
};
|
|
1464
|
-
body: string;
|
|
1465
|
-
};
|
|
1466
|
-
FunctionTest: {
|
|
1467
|
-
side: components["schemas"]["FunctionSide"];
|
|
1468
|
-
/** @description The saved version that ran; null for a draft. */
|
|
1469
|
-
version: number | null;
|
|
1470
|
-
result: components["schemas"]["FunctionResult"];
|
|
1471
|
-
/** @description Inbound: the HTTP status a real request would have been answered with. */
|
|
1472
|
-
answer: number | null;
|
|
1473
|
-
/** @description Inbound accept. */
|
|
1474
|
-
dedupeKey: string | null;
|
|
1475
|
-
/** @description Inbound accept: what a real request would deliver. */
|
|
1476
|
-
routes: components["schemas"]["Route"][] | null;
|
|
1477
|
-
response: components["schemas"]["FunctionResponse"] | null;
|
|
1478
|
-
/** @description Outbound ok. */
|
|
1479
|
-
externalId: string | null;
|
|
1480
|
-
/** @description Outbound retryable: seconds. */
|
|
1481
|
-
retryAfter: number | null;
|
|
1482
|
-
/** @description Outbound permanent. */
|
|
1483
|
-
code: string | null;
|
|
1484
|
-
/** @description Inbound reject; outbound retryable and permanent. */
|
|
1485
|
-
reason: string | null;
|
|
1486
|
-
/** @description error and timeout, and an answer outside the contract. */
|
|
1487
|
-
error: string | null;
|
|
1488
|
-
durationMs: number;
|
|
1489
|
-
/** @description The last 4 KiB the code wrote to its standard output and error. */
|
|
1490
|
-
logs: string;
|
|
1491
1508
|
};
|
|
1492
|
-
/** @
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1509
|
+
/** @description A recorded webhook or GitHub request, or a schedule's tick. */
|
|
1510
|
+
Delivery: {
|
|
1511
|
+
id: string;
|
|
1512
|
+
template: components["schemas"]["TemplateVersionRef"];
|
|
1513
|
+
entry: string;
|
|
1514
|
+
source: components["schemas"]["Source"];
|
|
1515
|
+
endpointId: string | null;
|
|
1516
|
+
/** @description The agent the event belongs to: an agent URL's or a schedule's; null at a template URL. */
|
|
1517
|
+
agentId: string | null;
|
|
1518
|
+
status: components["schemas"]["DeliveryStatus"];
|
|
1519
|
+
error: components["schemas"]["DeliveryError"] | null;
|
|
1520
|
+
attempts: number;
|
|
1521
|
+
replayOf: string | null;
|
|
1522
|
+
receivedAt: components["schemas"]["Timestamp"];
|
|
1523
|
+
finishedAt: components["schemas"]["Timestamp"] | null;
|
|
1498
1524
|
};
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
version: number;
|
|
1502
|
-
result: components["schemas"]["FunctionResult"];
|
|
1503
|
-
durationMs: number;
|
|
1525
|
+
DeliveryPage: components["schemas"]["Page"] & {
|
|
1526
|
+
data?: components["schemas"]["Delivery"][];
|
|
1504
1527
|
};
|
|
1505
|
-
/** @
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1528
|
+
/** @description Where a route goes: a new session, the agent's session with a key, or a session by ID. */
|
|
1529
|
+
SessionTarget: {
|
|
1530
|
+
/** @constant */
|
|
1531
|
+
new: true;
|
|
1532
|
+
} | {
|
|
1533
|
+
key: string;
|
|
1534
|
+
} | {
|
|
1535
|
+
id: string;
|
|
1511
1536
|
};
|
|
1512
1537
|
/** @enum {string} */
|
|
1513
|
-
OutcomeStatus: "pending" | "delivered" | "
|
|
1514
|
-
|
|
1515
|
-
/** @
|
|
1516
|
-
code: "agent_not_found" | "invalid_settings" | "unavailable" | "internal";
|
|
1517
|
-
message: string;
|
|
1518
|
-
};
|
|
1519
|
-
RouteOutcome: components["schemas"]["Route"] & {
|
|
1520
|
-
/** @description The route's place in the answer, from 0. */
|
|
1538
|
+
OutcomeStatus: "pending" | "delivered" | "failed";
|
|
1539
|
+
RouteOutcome: {
|
|
1540
|
+
/** @description The route's place in the router's result, from 0. */
|
|
1521
1541
|
position: number;
|
|
1542
|
+
agentId: string;
|
|
1543
|
+
session: components["schemas"]["SessionTarget"];
|
|
1522
1544
|
status: components["schemas"]["OutcomeStatus"];
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
/** @description While pending: the earlier delivery with the same agent and key it waits for. */
|
|
1545
|
+
error: components["schemas"]["DeliveryError"] | null;
|
|
1546
|
+
/** @description While pending: the earlier delivery of the same agent and session it waits for. */
|
|
1526
1547
|
waitingFor: string | null;
|
|
1527
|
-
error: components["schemas"]["OutcomeError"] | null;
|
|
1528
|
-
/** @description Set when delivered. */
|
|
1529
1548
|
sessionId: string | null;
|
|
1530
|
-
sessionCreated: boolean;
|
|
1531
|
-
/** @description The reply match chose the session. */
|
|
1532
|
-
sessionMatched: boolean;
|
|
1533
1549
|
messageId: string | null;
|
|
1534
1550
|
seq: components["schemas"]["Seq"] | null;
|
|
1535
1551
|
};
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
/** @description null: no function ran. */
|
|
1544
|
-
function: components["schemas"]["DeliveryFunction"] | null;
|
|
1545
|
-
/** @description null when rejected, a handshake, or a replay. */
|
|
1546
|
-
dedupe: components["schemas"]["Dedupe"] | null;
|
|
1547
|
-
/** @description One per route, in the function's order. */
|
|
1552
|
+
DeliveryDetail: components["schemas"]["Delivery"] & {
|
|
1553
|
+
/** @description The source's standard event: webhook.Request, github.Event, or scheduler.Tick. */
|
|
1554
|
+
event: {
|
|
1555
|
+
[key: string]: unknown;
|
|
1556
|
+
};
|
|
1557
|
+
/** @description The last 4 KiB the router logged. */
|
|
1558
|
+
logs: string | null;
|
|
1548
1559
|
outcomes: components["schemas"]["RouteOutcome"][];
|
|
1549
|
-
attempts: number;
|
|
1550
|
-
nextAttemptAt: components["schemas"]["Timestamp"] | null;
|
|
1551
|
-
receivedAt: components["schemas"]["Timestamp"];
|
|
1552
|
-
finishedAt: components["schemas"]["Timestamp"] | null;
|
|
1553
1560
|
};
|
|
1554
|
-
|
|
1555
|
-
|
|
1561
|
+
/** @enum {string} */
|
|
1562
|
+
OutboxStatus: "unmatched" | "pending" | "delivered" | "failed";
|
|
1563
|
+
/** @enum {string} */
|
|
1564
|
+
StepStatus: "pending" | "delivered" | "failed";
|
|
1565
|
+
StepError: {
|
|
1566
|
+
/** @description function_error, function_timeout, invalid_result, invalid_input, http_status, network, expired, session_deleted, or agent_deleted. */
|
|
1567
|
+
code: string;
|
|
1568
|
+
message: string;
|
|
1556
1569
|
};
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
/** @description
|
|
1560
|
-
|
|
1561
|
-
headers: {
|
|
1562
|
-
[key: string]: string;
|
|
1563
|
-
};
|
|
1564
|
-
/** @description As received, as UTF-8; null when it was over the limit. */
|
|
1565
|
-
body: string | null;
|
|
1570
|
+
TargetAnswer: {
|
|
1571
|
+
status: number;
|
|
1572
|
+
/** @description At most the first 4 KiB. */
|
|
1573
|
+
body: string;
|
|
1566
1574
|
};
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
/** @description
|
|
1570
|
-
|
|
1575
|
+
OutboxInput: {
|
|
1576
|
+
index: number;
|
|
1577
|
+
/** @description The target input, http.Request for http. */
|
|
1578
|
+
input: {
|
|
1579
|
+
[key: string]: unknown;
|
|
1580
|
+
};
|
|
1581
|
+
idempotencyKey: string;
|
|
1582
|
+
status: components["schemas"]["StepStatus"];
|
|
1583
|
+
attempts: number;
|
|
1584
|
+
nextAttemptAt: components["schemas"]["Timestamp"] | null;
|
|
1585
|
+
answer: components["schemas"]["TargetAnswer"] | null;
|
|
1586
|
+
error: components["schemas"]["StepError"] | null;
|
|
1571
1587
|
};
|
|
1572
|
-
/** @
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1588
|
+
/** @description A matched entry: its deliver step and the target inputs of its result. */
|
|
1589
|
+
OutboxMessageEntry: {
|
|
1590
|
+
name: string;
|
|
1591
|
+
/** @description The deliver step's: delivered once its result is stored. */
|
|
1592
|
+
status: components["schemas"]["StepStatus"];
|
|
1593
|
+
attempts: number;
|
|
1594
|
+
nextAttemptAt: components["schemas"]["Timestamp"] | null;
|
|
1595
|
+
error: components["schemas"]["StepError"] | null;
|
|
1596
|
+
logs: string | null;
|
|
1597
|
+
inputs: components["schemas"]["OutboxInput"][];
|
|
1579
1598
|
};
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
class: "retryable" | "permanent";
|
|
1583
|
-
code: string | null;
|
|
1599
|
+
SubscriptionError: {
|
|
1600
|
+
entry: string;
|
|
1584
1601
|
message: string;
|
|
1585
1602
|
};
|
|
1603
|
+
/** @description A message the agent sent and what became of it. */
|
|
1586
1604
|
OutboxMessage: {
|
|
1587
1605
|
id: string;
|
|
1588
|
-
connectorId: string;
|
|
1589
|
-
/** @description As resolved: the session's reply key when send named none. */
|
|
1590
|
-
key: string;
|
|
1591
|
-
sessionId: string;
|
|
1592
1606
|
agentId: string;
|
|
1593
|
-
|
|
1607
|
+
sessionId: string;
|
|
1594
1608
|
turnId: string | null;
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1609
|
+
/** @description The seq of its outbox.queued event. */
|
|
1610
|
+
seq: components["schemas"]["Seq"];
|
|
1611
|
+
/** @description What the agent sent. */
|
|
1612
|
+
body: {
|
|
1613
|
+
[key: string]: unknown;
|
|
1614
|
+
};
|
|
1599
1615
|
status: components["schemas"]["OutboxStatus"];
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
/** @description While queued: the earlier message of the key it waits for. */
|
|
1603
|
-
waitingFor: string | null;
|
|
1604
|
-
/** @description The last attempt's; on a queued retry and when failed. */
|
|
1605
|
-
error: components["schemas"]["OutboxError"] | null;
|
|
1606
|
-
/** @description The last answer's progress, which the next attempt gets; null when none. */
|
|
1607
|
-
progress: unknown;
|
|
1608
|
-
attempts: number;
|
|
1609
|
-
nextAttemptAt: components["schemas"]["Timestamp"] | null;
|
|
1616
|
+
entries: components["schemas"]["OutboxMessageEntry"][];
|
|
1617
|
+
subscriptionErrors: components["schemas"]["SubscriptionError"][];
|
|
1610
1618
|
createdAt: components["schemas"]["Timestamp"];
|
|
1611
1619
|
finishedAt: components["schemas"]["Timestamp"] | null;
|
|
1612
1620
|
};
|
|
@@ -1690,32 +1698,34 @@ interface components {
|
|
|
1690
1698
|
SessionId: string;
|
|
1691
1699
|
/** @description The turn's ID */
|
|
1692
1700
|
TurnId: string;
|
|
1693
|
-
/** @description The connector's ID, or for connectors.get its name */
|
|
1694
|
-
ConnectorIdOrName: string;
|
|
1695
|
-
/** @description The connector's side */
|
|
1696
|
-
FunctionSide: components["schemas"]["FunctionSide"];
|
|
1697
1701
|
/** @description The outbox message's ID */
|
|
1698
1702
|
OutboxId: string;
|
|
1699
|
-
/** @description Only this
|
|
1700
|
-
|
|
1703
|
+
/** @description Only this agent's messages */
|
|
1704
|
+
OutboxAgentFilter: string;
|
|
1701
1705
|
/** @description Only this session's messages */
|
|
1702
1706
|
OutboxSessionFilter: string;
|
|
1703
|
-
/** @description Only the messages of this key */
|
|
1704
|
-
OutboxKeyFilter: string;
|
|
1705
1707
|
/** @description Only the messages with this status */
|
|
1706
1708
|
OutboxStatusFilter: components["schemas"]["OutboxStatus"];
|
|
1707
|
-
/** @description
|
|
1708
|
-
|
|
1709
|
-
/** @description
|
|
1710
|
-
|
|
1709
|
+
/** @description Only the deliveries of this template name */
|
|
1710
|
+
DeliveryTemplateFilter: string;
|
|
1711
|
+
/** @description Only the deliveries of this inbox entry */
|
|
1712
|
+
DeliveryEntryFilter: string;
|
|
1713
|
+
/** @description Only the deliveries that belong to this agent */
|
|
1714
|
+
DeliveryAgentFilter: string;
|
|
1711
1715
|
/** @description Only the deliveries with this status */
|
|
1712
1716
|
DeliveryStatusFilter: components["schemas"]["DeliveryStatus"];
|
|
1717
|
+
/** @description Only the active session with this key */
|
|
1718
|
+
SessionKeyFilter: string;
|
|
1719
|
+
/** @description The delivery's ID */
|
|
1720
|
+
DeliveryId: string;
|
|
1713
1721
|
/** @description The model provider's name */
|
|
1714
1722
|
ProviderName: string;
|
|
1715
1723
|
/** @description The template's name */
|
|
1716
1724
|
TemplateName: string;
|
|
1717
1725
|
/** @description The template version */
|
|
1718
1726
|
TemplateVersion: number;
|
|
1727
|
+
/** @description The secret's name, as paddock.yaml declares it */
|
|
1728
|
+
SecretPathName: string;
|
|
1719
1729
|
/** @description The capability entry's name */
|
|
1720
1730
|
EntryName: string;
|
|
1721
1731
|
/** @description A path relative to its root; it may contain slashes, which the services route as one parameter */
|
|
@@ -1775,9 +1785,17 @@ type Template = Omit<S["Template"], "harness"> & {
|
|
|
1775
1785
|
harness: Harness;
|
|
1776
1786
|
};
|
|
1777
1787
|
type TemplateDetail = Template & Omit<S["TemplateDetail"], keyof S["Template"]>;
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
type
|
|
1788
|
+
type TemplateFile = S["TemplateFile"];
|
|
1789
|
+
/** A template's paddock.yaml as JSON, in its strict form with every field written (014#paddock-yaml). */
|
|
1790
|
+
type PaddockDocument = S["PaddockDocument"];
|
|
1791
|
+
/** Who supplies a secret's value: the agent, when it is created, or the template (014#secrets). */
|
|
1792
|
+
type SecretScope = Open<S["Secret"]["scope"]>;
|
|
1793
|
+
/** A secret's name and scope and when its value was set; no operation returns a value. */
|
|
1794
|
+
type Secret = Omit<S["Secret"], "scope"> & {
|
|
1795
|
+
scope: SecretScope;
|
|
1796
|
+
};
|
|
1797
|
+
/** Replaces a template's whole harness block for one agent (014#harness-override); every field is written. */
|
|
1798
|
+
type HarnessOverride = S["HarnessOverride"];
|
|
1781
1799
|
/** Where a model comes from: paddock's catalog, or one of the project's providers. */
|
|
1782
1800
|
type ModelSource = Open<S["Model"]["source"]>;
|
|
1783
1801
|
/** A model the project can use (002#models): a platform model or a project model. */
|
|
@@ -1804,116 +1822,71 @@ type ProviderDraft = S["ProviderDraft"];
|
|
|
1804
1822
|
type ProviderTest = Omit<S["ProviderTest"], "method"> & {
|
|
1805
1823
|
method: Open<S["ProviderTest"]["method"]>;
|
|
1806
1824
|
};
|
|
1807
|
-
|
|
1808
|
-
type
|
|
1809
|
-
type
|
|
1810
|
-
|
|
1825
|
+
/** An inbox entry with its endpoint (010#endpoints): the template URL, or on an agent its agent URL. */
|
|
1826
|
+
type InboxSource = Open<S["Source"]>;
|
|
1827
|
+
type InboxEndpoint = Omit<S["InboxEndpoint"], "source"> & {
|
|
1828
|
+
source: InboxSource;
|
|
1811
1829
|
};
|
|
1812
|
-
type
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
type
|
|
1817
|
-
|
|
1818
|
-
type Outbound = {
|
|
1819
|
-
functionSummary: FunctionSummary | null;
|
|
1820
|
-
rateLimit: RateLimit;
|
|
1821
|
-
credentialError: CredentialError | null;
|
|
1822
|
-
};
|
|
1823
|
-
type Connector = Omit<S["Connector"], "inbound" | "outbound"> & {
|
|
1824
|
-
inbound: Inbound | null;
|
|
1825
|
-
outbound: Outbound | null;
|
|
1826
|
-
};
|
|
1827
|
-
type ConnectorCreate = S["ConnectorCreate"];
|
|
1828
|
-
type ConnectorUpdate = S["ConnectorUpdate"];
|
|
1829
|
-
type ConnectorSecret = S["ConnectorSecret"];
|
|
1830
|
-
type ConnectorFunction = FunctionSummary & {
|
|
1831
|
-
side: FunctionSide;
|
|
1832
|
-
code: string;
|
|
1833
|
-
params: Record<string, string>;
|
|
1834
|
-
};
|
|
1835
|
-
type FunctionSet = S["FunctionSet"];
|
|
1836
|
-
type PresetParam = S["PresetParam"];
|
|
1837
|
-
type PresetSide = S["PresetSide"];
|
|
1838
|
-
type FunctionPreset = S["FunctionPreset"];
|
|
1839
|
-
type FunctionDraft = S["FunctionDraft"];
|
|
1840
|
-
type FunctionTestEvent = S["FunctionTestEvent"];
|
|
1841
|
-
type DeliverTestMessage = S["DeliverTestMessage"];
|
|
1842
|
-
/** Inbound: an event, or a recorded delivery's request (replay: as a replay sees it); outbound: a message. */
|
|
1843
|
-
type FunctionTestRequest = ({
|
|
1844
|
-
event: FunctionTestEvent;
|
|
1830
|
+
type TemplateVersionRef = S["TemplateVersionRef"];
|
|
1831
|
+
type DeliveryStatus = Open<S["DeliveryStatus"]>;
|
|
1832
|
+
type DeliveryError = S["DeliveryError"];
|
|
1833
|
+
/** Where a route goes: a new session, the agent's session with a key, or a session by ID. */
|
|
1834
|
+
type SessionTarget = {
|
|
1835
|
+
new: true;
|
|
1845
1836
|
} | {
|
|
1846
|
-
|
|
1847
|
-
replay?: boolean;
|
|
1837
|
+
key: string;
|
|
1848
1838
|
} | {
|
|
1849
|
-
|
|
1850
|
-
}) & {
|
|
1851
|
-
draft?: FunctionDraft;
|
|
1852
|
-
};
|
|
1853
|
-
type FunctionResult = Open<S["FunctionResult"]>;
|
|
1854
|
-
type FunctionResponse = S["FunctionResponse"];
|
|
1855
|
-
type SessionSettings = S["SessionSettings"];
|
|
1856
|
-
type Route = S["Route"];
|
|
1857
|
-
type FunctionTest = Omit<S["FunctionTest"], "result"> & {
|
|
1858
|
-
result: FunctionResult;
|
|
1859
|
-
};
|
|
1860
|
-
type OutcomeErrorCode = Open<S["OutcomeError"]["code"]>;
|
|
1861
|
-
type OutcomeError = {
|
|
1862
|
-
code: OutcomeErrorCode;
|
|
1863
|
-
message: string;
|
|
1839
|
+
id: string;
|
|
1864
1840
|
};
|
|
1865
|
-
type DedupeSource = Open<S["DedupeSource"]>;
|
|
1866
|
-
type DeliveryStatus = Open<S["DeliveryStatus"]>;
|
|
1867
1841
|
type OutcomeStatus = Open<S["OutcomeStatus"]>;
|
|
1868
|
-
type RouteOutcome = Omit<S["RouteOutcome"], "status" | "
|
|
1842
|
+
type RouteOutcome = Omit<S["RouteOutcome"], "status" | "session"> & {
|
|
1869
1843
|
status: OutcomeStatus;
|
|
1870
|
-
|
|
1871
|
-
};
|
|
1872
|
-
type DeliveryError = {
|
|
1873
|
-
code: Open<S["DeliveryError"]["code"]>;
|
|
1874
|
-
message: string;
|
|
1875
|
-
};
|
|
1876
|
-
type DeliveryFunction = {
|
|
1877
|
-
version: number;
|
|
1878
|
-
result: FunctionResult;
|
|
1879
|
-
durationMs: number;
|
|
1844
|
+
session: SessionTarget;
|
|
1880
1845
|
};
|
|
1881
|
-
|
|
1846
|
+
/** A recorded webhook or GitHub request, or a schedule's tick (010#deliveries). */
|
|
1847
|
+
type Delivery = Omit<S["Delivery"], "status" | "source"> & {
|
|
1882
1848
|
status: DeliveryStatus;
|
|
1883
|
-
|
|
1884
|
-
function: DeliveryFunction | null;
|
|
1885
|
-
dedupe: {
|
|
1886
|
-
source: DedupeSource;
|
|
1887
|
-
hash: string;
|
|
1888
|
-
} | null;
|
|
1889
|
-
outcomes: RouteOutcome[];
|
|
1849
|
+
source: InboxSource;
|
|
1890
1850
|
};
|
|
1891
|
-
|
|
1851
|
+
/** A delivery with its source event, its router's last logs, and each route's outcome. */
|
|
1892
1852
|
type DeliveryDetail = Delivery & {
|
|
1893
|
-
|
|
1894
|
-
|
|
1853
|
+
event: Record<string, unknown>;
|
|
1854
|
+
logs: string | null;
|
|
1855
|
+
outcomes: RouteOutcome[];
|
|
1895
1856
|
};
|
|
1896
1857
|
type OutboxStatus = Open<S["OutboxStatus"]>;
|
|
1897
|
-
type
|
|
1898
|
-
type
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1858
|
+
type StepStatus = Open<S["StepStatus"]>;
|
|
1859
|
+
type StepError = S["StepError"];
|
|
1860
|
+
type TargetAnswer = S["TargetAnswer"];
|
|
1861
|
+
type OutboxInput = Omit<S["OutboxInput"], "status"> & {
|
|
1862
|
+
status: StepStatus;
|
|
1902
1863
|
};
|
|
1903
|
-
|
|
1904
|
-
type
|
|
1864
|
+
/** A matched outbox entry: its deliver step and the target inputs of its result. */
|
|
1865
|
+
type OutboxEntry = Omit<S["OutboxMessageEntry"], "status" | "inputs"> & {
|
|
1866
|
+
status: StepStatus;
|
|
1867
|
+
inputs: OutboxInput[];
|
|
1868
|
+
};
|
|
1869
|
+
type SubscriptionError = S["SubscriptionError"];
|
|
1870
|
+
/** A message an agent sent and what became of it (010#outbox). */
|
|
1871
|
+
type OutboxMessage = Omit<S["OutboxMessage"], "status" | "entries"> & {
|
|
1905
1872
|
status: OutboxStatus;
|
|
1906
|
-
|
|
1907
|
-
origin: Origin | null;
|
|
1908
|
-
/** The last answer's progress, which the next attempt gets; null when none. */
|
|
1909
|
-
progress: unknown;
|
|
1873
|
+
entries: OutboxEntry[];
|
|
1910
1874
|
};
|
|
1911
|
-
type OutboxSpec = S["OutboxSpec"];
|
|
1912
1875
|
type OutboxQueued = S["OutboxQueued"];
|
|
1876
|
+
type OutboxRetrying = S["OutboxRetrying"];
|
|
1913
1877
|
type OutboxDelivered = S["OutboxDelivered"];
|
|
1914
|
-
type OutboxFailed =
|
|
1915
|
-
|
|
1878
|
+
type OutboxFailed = S["OutboxFailed"];
|
|
1879
|
+
type InboxFailed = S["InboxFailed"];
|
|
1880
|
+
/** Who wrote a user message (003#authors). */
|
|
1881
|
+
type Author = Omit<S["Author"], "kind" | "via"> & {
|
|
1882
|
+
kind: Open<S["Author"]["kind"]>;
|
|
1883
|
+
via: {
|
|
1884
|
+
kind: Open<S["Author"]["via"]["kind"]>;
|
|
1885
|
+
id: string;
|
|
1886
|
+
};
|
|
1916
1887
|
};
|
|
1888
|
+
/** The person a message or a session token speaks for. */
|
|
1889
|
+
type Participant = S["AuthorInput"];
|
|
1917
1890
|
type TurnErrorCode = Open<S["TurnErrorCode"]>;
|
|
1918
1891
|
type TurnError = {
|
|
1919
1892
|
code: TurnErrorCode;
|
|
@@ -1951,7 +1924,11 @@ type Session = Omit<S["Session"], "status" | "lastError"> & {
|
|
|
1951
1924
|
status: SessionStatus;
|
|
1952
1925
|
lastError: TurnError | null;
|
|
1953
1926
|
};
|
|
1954
|
-
|
|
1927
|
+
/** What a session token allows: "full" reads and writes its session, "read_only" only reads and follows it. */
|
|
1928
|
+
type TokenMode = Open<S["TokenMode"]>;
|
|
1929
|
+
type SessionToken = Omit<S["SessionToken"], "mode"> & {
|
|
1930
|
+
mode: TokenMode;
|
|
1931
|
+
};
|
|
1955
1932
|
type TurnStatus = Open<S["TurnStatus"]>;
|
|
1956
1933
|
/** "user": over waiting messages; "harness": started by the harness on its own, with no inputs. */
|
|
1957
1934
|
type TurnOrigin = Open<S["TurnOrigin"]>;
|
|
@@ -1979,7 +1956,9 @@ type ToolCall = Omit<S["ToolCall"], "tool"> & {
|
|
|
1979
1956
|
type ToolResult = Omit<S["ToolResult"], "tool"> & {
|
|
1980
1957
|
tool: ToolName;
|
|
1981
1958
|
};
|
|
1982
|
-
type UserBody = S["UserBody"]
|
|
1959
|
+
type UserBody = Omit<S["UserBody"], "author"> & {
|
|
1960
|
+
author: Author | null;
|
|
1961
|
+
};
|
|
1983
1962
|
type AssistantBody = S["AssistantBody"];
|
|
1984
1963
|
type ReasoningBody = S["ReasoningBody"];
|
|
1985
1964
|
type ToolCallBody = {
|
|
@@ -2113,12 +2092,18 @@ type EventBody = {
|
|
|
2113
2092
|
} | {
|
|
2114
2093
|
type: "outbox.queued";
|
|
2115
2094
|
outbox: OutboxQueued;
|
|
2095
|
+
} | {
|
|
2096
|
+
type: "outbox.retrying";
|
|
2097
|
+
outbox: OutboxRetrying;
|
|
2116
2098
|
} | {
|
|
2117
2099
|
type: "outbox.delivered";
|
|
2118
2100
|
outbox: OutboxDelivered;
|
|
2119
2101
|
} | {
|
|
2120
2102
|
type: "outbox.failed";
|
|
2121
2103
|
outbox: OutboxFailed;
|
|
2104
|
+
} | {
|
|
2105
|
+
type: "inbox.failed";
|
|
2106
|
+
inbox: InboxFailed;
|
|
2122
2107
|
};
|
|
2123
2108
|
type EventType = EventBody["type"];
|
|
2124
2109
|
type Event = EventEnvelope & EventBody;
|
|
@@ -2318,15 +2303,26 @@ declare class SessionOperations {
|
|
|
2318
2303
|
};
|
|
2319
2304
|
constructor(transport: Transport, id: string);
|
|
2320
2305
|
private get base();
|
|
2321
|
-
/**
|
|
2322
|
-
|
|
2306
|
+
/**
|
|
2307
|
+
* Stores a user message; resolves with its event once stored (004#messages). author, the person
|
|
2308
|
+
* the message speaks for, is allowed with an API key or a function token, never a session token.
|
|
2309
|
+
*/
|
|
2310
|
+
send(text: string, options?: {
|
|
2311
|
+
author?: Participant;
|
|
2312
|
+
metadata?: Record<string, string>;
|
|
2313
|
+
}): Promise<Event>;
|
|
2323
2314
|
/** Stores a stop.requested event and resolves with it. */
|
|
2324
2315
|
stop(): Promise<Event>;
|
|
2325
2316
|
/** The session's events from after, then live events, reconnecting on its own (009#stream-reconnection). */
|
|
2326
2317
|
stream(options?: StreamOptions): EventStream;
|
|
2327
|
-
/**
|
|
2318
|
+
/**
|
|
2319
|
+
* Mints a session token for the browser: ttl in seconds; participant authors the token's
|
|
2320
|
+
* messages; readOnly makes a token that can only read and follow the session (004#credentials).
|
|
2321
|
+
*/
|
|
2328
2322
|
createToken(options: {
|
|
2329
2323
|
ttl: number;
|
|
2324
|
+
participant?: Participant;
|
|
2325
|
+
readOnly?: boolean;
|
|
2330
2326
|
}): Promise<SessionToken>;
|
|
2331
2327
|
/** Reads the session. */
|
|
2332
2328
|
get(): Promise<Session>;
|
|
@@ -2357,7 +2353,7 @@ declare class Paddock {
|
|
|
2357
2353
|
readonly modelProviders: ModelProviders;
|
|
2358
2354
|
readonly agents: Agents;
|
|
2359
2355
|
readonly sessions: Sessions;
|
|
2360
|
-
readonly
|
|
2356
|
+
readonly inbox: Inbox;
|
|
2361
2357
|
readonly outbox: Outbox;
|
|
2362
2358
|
constructor(options?: PaddockOptions);
|
|
2363
2359
|
}
|
|
@@ -2365,14 +2361,24 @@ declare class Templates {
|
|
|
2365
2361
|
private readonly t;
|
|
2366
2362
|
constructor(t: Transport);
|
|
2367
2363
|
/**
|
|
2368
|
-
*
|
|
2369
|
-
*
|
|
2370
|
-
*
|
|
2371
|
-
*
|
|
2364
|
+
* Creates a template version from a bundle, the gzip tar that `paddock templates create DIR`
|
|
2365
|
+
* builds from a template directory (014#build). secrets holds values of the template's
|
|
2366
|
+
* template secrets. The server assigns the version; a bundle whose digest equals the latest
|
|
2367
|
+
* version returns that version. With dryRun, the server checks everything and returns the
|
|
2368
|
+
* version a create would return, storing nothing.
|
|
2372
2369
|
*/
|
|
2373
|
-
create(
|
|
2370
|
+
create(bundle: Uint8Array | ArrayBuffer | Blob, options?: {
|
|
2371
|
+
secrets?: Record<string, string>;
|
|
2374
2372
|
dryRun?: boolean;
|
|
2375
2373
|
}): Promise<Template>;
|
|
2374
|
+
/** Each inbox entry of a template name's latest version with its template URL (010#endpoints). */
|
|
2375
|
+
inbox(name: string): Promise<InboxEndpoint[]>;
|
|
2376
|
+
/** A template name's template secrets, shared by its versions: names and set times, never values. */
|
|
2377
|
+
secrets(name: string): {
|
|
2378
|
+
list(): Promise<Secret[]>;
|
|
2379
|
+
set(secret: string, value: string): Promise<Secret>;
|
|
2380
|
+
delete(secret: string): Promise<void>;
|
|
2381
|
+
};
|
|
2376
2382
|
/** "name@version" reads that version; "name" reads the latest. */
|
|
2377
2383
|
get(ref: string): Promise<TemplateDetail>;
|
|
2378
2384
|
/** The latest version of each template, or with name every version of that template. */
|
|
@@ -2417,9 +2423,17 @@ type AgentHandle = Agent & AgentResources;
|
|
|
2417
2423
|
declare class Agents {
|
|
2418
2424
|
private readonly t;
|
|
2419
2425
|
constructor(t: Transport);
|
|
2426
|
+
/**
|
|
2427
|
+
* Creates an agent from "name@version". env holds its own env values, which override the
|
|
2428
|
+
* template's by name; secrets a value for every agent secret the template declares; harness,
|
|
2429
|
+
* when given, replaces the template's harness block for this agent (014#harness-override).
|
|
2430
|
+
*/
|
|
2420
2431
|
create(options: {
|
|
2421
2432
|
template: string;
|
|
2422
2433
|
metadata?: Metadata;
|
|
2434
|
+
env?: Record<string, string>;
|
|
2435
|
+
secrets?: Record<string, string>;
|
|
2436
|
+
harness?: HarnessOverride;
|
|
2423
2437
|
}): Promise<AgentHandle>;
|
|
2424
2438
|
get(id: string): Promise<AgentHandle>;
|
|
2425
2439
|
list(options?: PageOptions & {
|
|
@@ -2473,26 +2487,26 @@ declare class AgentResources {
|
|
|
2473
2487
|
list(options?: PageOptions): PageList<Entry<WorkflowSpec>>;
|
|
2474
2488
|
get(name: string): Promise<Entry<WorkflowSpec>>;
|
|
2475
2489
|
};
|
|
2476
|
-
/** The agent's effective
|
|
2477
|
-
readonly export: () => Promise<
|
|
2490
|
+
/** The agent's effective configuration as paddock.yaml in JSON, secrets by name only. */
|
|
2491
|
+
readonly export: () => Promise<PaddockDocument>;
|
|
2492
|
+
/** The agent's secrets: names and set times, never values. */
|
|
2493
|
+
readonly secrets: {
|
|
2494
|
+
list(): Promise<Secret[]>;
|
|
2495
|
+
set(name: string, value: string): Promise<Secret>;
|
|
2496
|
+
};
|
|
2478
2497
|
/**
|
|
2479
2498
|
* Sends text to the agent's default session, its newest session whose defaultSession
|
|
2480
2499
|
* metadata is "true", created on the first send; resolves with the stored user
|
|
2481
2500
|
* message, whose sessionId names that session. The sandbox wakes for it.
|
|
2482
2501
|
*/
|
|
2483
|
-
readonly send: (text: string
|
|
2502
|
+
readonly send: (text: string, options?: {
|
|
2503
|
+
author?: Participant;
|
|
2504
|
+
metadata?: Metadata;
|
|
2505
|
+
}) => Promise<Event>;
|
|
2484
2506
|
readonly permissions: {
|
|
2485
2507
|
get(): Promise<PermissionsSpec>;
|
|
2486
2508
|
set(spec: PermissionsSpec): Promise<PermissionsSpec>;
|
|
2487
2509
|
};
|
|
2488
|
-
/** The key patterns the agent may send to: its own list, or else the template's (015#allow). */
|
|
2489
|
-
readonly outbox: {
|
|
2490
|
-
get(): Promise<Setting<OutboxSpec>>;
|
|
2491
|
-
/** The agent's own list, which replaces the template's. */
|
|
2492
|
-
set(spec: OutboxSpec): Promise<Setting<OutboxSpec>>;
|
|
2493
|
-
/** Removes the agent's own list and returns the template's, restored. */
|
|
2494
|
-
delete(): Promise<Setting<OutboxSpec>>;
|
|
2495
|
-
};
|
|
2496
2510
|
readonly memory: {
|
|
2497
2511
|
list(): Promise<{
|
|
2498
2512
|
data: FileEntry[];
|
|
@@ -2514,15 +2528,16 @@ declare class AgentResources {
|
|
|
2514
2528
|
}): Promise<void>;
|
|
2515
2529
|
};
|
|
2516
2530
|
readonly sessions: {
|
|
2517
|
-
/**
|
|
2531
|
+
/** key: 1 to 500 bytes, unique among the agent's active sessions; the inbox finds sessions by it (010#routing). */
|
|
2518
2532
|
create(options?: {
|
|
2519
2533
|
cwd?: string;
|
|
2520
2534
|
systemPrompt?: string;
|
|
2521
2535
|
metadata?: Metadata;
|
|
2522
|
-
|
|
2536
|
+
key?: string;
|
|
2523
2537
|
}): Promise<SessionHandle>;
|
|
2524
2538
|
list(options?: PageOptions & {
|
|
2525
2539
|
metadata?: Metadata;
|
|
2540
|
+
key?: string;
|
|
2526
2541
|
}): PageList<SessionHandle>;
|
|
2527
2542
|
};
|
|
2528
2543
|
constructor(t: Transport, agentId: string);
|
|
@@ -2540,89 +2555,47 @@ declare class Sessions {
|
|
|
2540
2555
|
list(options?: PageOptions & {
|
|
2541
2556
|
agentId?: string;
|
|
2542
2557
|
metadata?: Metadata;
|
|
2558
|
+
key?: string;
|
|
2543
2559
|
createdAfter?: string;
|
|
2544
2560
|
createdBefore?: string;
|
|
2545
2561
|
}): PageList<SessionHandle>;
|
|
2546
2562
|
get(id: string): Promise<SessionHandle>;
|
|
2547
2563
|
delete(id: string): Promise<void>;
|
|
2548
2564
|
}
|
|
2549
|
-
/**
|
|
2550
|
-
|
|
2551
|
-
/**
|
|
2552
|
-
* The project's connectors (015#operations): each an inbound side whose function routes
|
|
2553
|
-
* other services' requests to agents' sessions, and an outbound side whose function
|
|
2554
|
-
* delivers what agents send.
|
|
2555
|
-
*/
|
|
2556
|
-
declare class Connectors {
|
|
2557
|
-
private readonly t;
|
|
2558
|
-
constructor(t: Transport);
|
|
2559
|
-
/** Creates a connector with the sides given; the secret is generated when omitted. */
|
|
2560
|
-
create(spec: ConnectorCreate): Promise<ConnectorHandle>;
|
|
2561
|
-
/** The connectors, newest first. */
|
|
2562
|
-
list(options?: PageOptions): PageList<ConnectorHandle>;
|
|
2563
|
-
/** By ID or by name. */
|
|
2564
|
-
get(idOrName: string): Promise<ConnectorHandle>;
|
|
2565
|
-
/** Sets which sides exist and the outbound rate limit; a side omitted or null is removed with its function. */
|
|
2566
|
-
update(id: string, spec: ConnectorUpdate): Promise<ConnectorHandle>;
|
|
2567
|
-
/** Deletes its functions first; its URL answers 404 at once, and its deliveries and outbox messages are removed. */
|
|
2568
|
-
delete(id: string): Promise<void>;
|
|
2569
|
-
/** Stock function code per side, in both runtimes, with the params each reads (015#presets). */
|
|
2570
|
-
functionPresets(): Promise<FunctionPreset[]>;
|
|
2571
|
-
}
|
|
2572
|
-
declare class ConnectorResources {
|
|
2573
|
-
/** The connector's named secrets, whose values only these return; name defaults to "default". */
|
|
2574
|
-
readonly secret: {
|
|
2575
|
-
get(options?: {
|
|
2576
|
-
name?: string;
|
|
2577
|
-
}): Promise<ConnectorSecret>;
|
|
2578
|
-
/** Sets the named secret at once, to the given value or a generated one, creating it when missing. */
|
|
2579
|
-
rotate(options?: {
|
|
2580
|
-
name?: string;
|
|
2581
|
-
secret?: string;
|
|
2582
|
-
}): Promise<ConnectorSecret>;
|
|
2583
|
-
/** Removes a secret other than default. */
|
|
2584
|
-
delete(options: {
|
|
2585
|
-
name: string;
|
|
2586
|
-
}): Promise<void>;
|
|
2587
|
-
};
|
|
2588
|
-
/** The code each side runs: inbound on every request, outbound on every message sent. */
|
|
2589
|
-
readonly functions: {
|
|
2590
|
-
get(side: FunctionSide): Promise<ConnectorFunction>;
|
|
2591
|
-
/** Replaces the code, the runtime, and the params; resolves once the new version is published. */
|
|
2592
|
-
set(side: FunctionSide, spec: FunctionSet): Promise<ConnectorFunction>;
|
|
2593
|
-
/** From then on inbound answers every request 503, and outbound refuses every send. */
|
|
2594
|
-
delete(side: FunctionSide): Promise<void>;
|
|
2595
|
-
/** Runs the saved function, or a draft; records and publishes nothing, but an outbound test delivers for real. */
|
|
2596
|
-
test(side: FunctionSide, request: FunctionTestRequest): Promise<FunctionTest>;
|
|
2597
|
-
};
|
|
2565
|
+
/** The project's inbox (010#deliveries): every recorded webhook or GitHub request and schedule tick. */
|
|
2566
|
+
declare class Inbox {
|
|
2598
2567
|
readonly deliveries: {
|
|
2599
|
-
/**
|
|
2568
|
+
/** Deliveries newest first by receipt; every filter left out matches all. */
|
|
2600
2569
|
list(options?: PageOptions & {
|
|
2570
|
+
template?: string;
|
|
2571
|
+
entry?: string;
|
|
2572
|
+
agentId?: string;
|
|
2601
2573
|
status?: DeliveryStatus;
|
|
2602
2574
|
}): PageList<Delivery>;
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2575
|
+
/** A delivery with its source event, its router's last logs, and each route's outcome. */
|
|
2576
|
+
get(id: string): Promise<DeliveryDetail>;
|
|
2577
|
+
/** Runs the recorded event through the current router as a new delivery. */
|
|
2578
|
+
replay(id: string): Promise<Delivery>;
|
|
2606
2579
|
};
|
|
2607
|
-
constructor(t: Transport
|
|
2580
|
+
constructor(t: Transport);
|
|
2608
2581
|
}
|
|
2609
|
-
/** The project's outbox (
|
|
2582
|
+
/** The project's outbox (010#outbox): every message agents send with the send tool. */
|
|
2610
2583
|
declare class Outbox {
|
|
2611
2584
|
private readonly t;
|
|
2612
2585
|
constructor(t: Transport);
|
|
2613
|
-
/**
|
|
2586
|
+
/** Outbox messages newest first; every filter left out matches all. */
|
|
2614
2587
|
list(options?: PageOptions & {
|
|
2615
|
-
|
|
2588
|
+
agentId?: string;
|
|
2616
2589
|
sessionId?: string;
|
|
2617
|
-
key?: string;
|
|
2618
2590
|
status?: OutboxStatus;
|
|
2619
2591
|
}): PageList<OutboxMessage>;
|
|
2592
|
+
/** A message with each entry's deliver step and each target input's status, attempts, and last answer. */
|
|
2620
2593
|
get(id: string): Promise<OutboxMessage>;
|
|
2621
|
-
/** Queues
|
|
2594
|
+
/** Queues the message's failed steps again with their idempotency keys and their places in order. */
|
|
2622
2595
|
retry(id: string): Promise<OutboxMessage>;
|
|
2623
2596
|
}
|
|
2624
2597
|
|
|
2625
|
-
declare const version = "0.0.
|
|
2598
|
+
declare const version = "0.0.5";
|
|
2626
2599
|
|
|
2627
|
-
export { AgentResources, Agents, Collection,
|
|
2628
|
-
export type { Agent, AgentHandle, AgentStatus, AgentUnavailable, AssistantBody, Capabilities, ConfigApplied, ConfigChange, ConnectionState,
|
|
2600
|
+
export { AgentResources, Agents, Collection, EventStream, Inbox, Marketplaces, ModelProviders, Models, Outbox, Paddock, PaddockConnectionError, PaddockError, PaddockTimeoutError, PageList, Sessions, SettingResource, Templates, isKnownMessageKind, isStreamingMessageEvent, version };
|
|
2601
|
+
export type { Agent, AgentHandle, AgentStatus, AgentUnavailable, AssistantBody, Author, Capabilities, ConfigApplied, ConfigChange, ConnectionState, DaemonOutdated, Delivery, DeliveryDetail, DeliveryError, DeliveryStatus, Entry, EntrySource, EnvEntry, ErrorBody, ErrorCode, Event, EventBody, EventEnvelope, EventListOptions, EventPage, EventType, FileEntry, Harness, HarnessOverride, InboxEndpoint, InboxFailed, InboxSource, MarketplaceEntry, McpEntry, Message, MessageBody, MessageKind, Metadata, Model, ModelProtocol, ModelProvider, ModelSource, Open, OutboxDelivered, OutboxEntry, OutboxFailed, OutboxInput, OutboxMessage, OutboxQueued, OutboxRetrying, OutboxStatus, OutcomeStatus, PaddockDocument, PaddockOptions, Page, PageOptions, Participant, PermissionsSpec, PluginEntry, ProviderCreate, ProviderDraft, ProviderKind, ProviderModel, ProviderTest, ProviderUpdate, ReasoningBody, RouteOutcome, Secret, SecretScope, Session, SessionHandle, SessionStatus, SessionTarget, SessionToken, Setting, StepError, StepStatus, StoredMessage, StreamEvent, StreamOptions, StreamingBody, StreamingMessage, StreamingMessageEvent, SubscriptionError, TargetAnswer, Template, TemplateDetail, TemplateFile, TemplateVersionRef, Timestamp, TimingPhase, TimingPhaseKind, TokenMode, ToolCall, ToolCallBody, ToolInput, ToolName, ToolOutput, ToolResult, ToolResultBody, Turn, TurnEnded, TurnError, TurnErrorCode, TurnOrigin, TurnStarted, TurnStatus, TurnTiming, UnknownBody, Usage, UserBody, WorkflowSpec };
|