@paddockai/client 0.0.3 → 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/LICENSE +202 -0
- package/dist/index.cjs +17 -10
- package/dist/index.d.cts +478 -433
- package/dist/index.d.ts +478 -433
- package/dist/index.js +17 -10
- package/package.json +1 -1
package/dist/index.d.ts
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
1508
|
};
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
/** @description
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
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
|
-
};
|
|
1492
|
-
/** @enum {string} */
|
|
1493
|
-
DeliveryStatus: "pending" | "done" | "rejected" | "handshake";
|
|
1494
|
-
DeliveryError: {
|
|
1495
|
-
/** @enum {string} */
|
|
1496
|
-
code: "invalid_body" | "no_function" | "function_rejected" | "function_error" | "function_timeout";
|
|
1497
|
-
message: string;
|
|
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 */
|
|
@@ -1757,6 +1767,7 @@ type S = components["schemas"];
|
|
|
1757
1767
|
/** A string union that also accepts values a newer server sends (009#open-reading). */
|
|
1758
1768
|
type Open<T extends string> = T | (string & {});
|
|
1759
1769
|
type Timestamp = string;
|
|
1770
|
+
type Metadata = Record<string, string>;
|
|
1760
1771
|
type Page<T> = {
|
|
1761
1772
|
data: T[];
|
|
1762
1773
|
nextCursor: string | null;
|
|
@@ -1771,10 +1782,20 @@ type ErrorBody = {
|
|
|
1771
1782
|
};
|
|
1772
1783
|
type Harness = Open<S["Harness"]>;
|
|
1773
1784
|
type OutboxQueued = S["OutboxQueued"];
|
|
1785
|
+
type OutboxRetrying = S["OutboxRetrying"];
|
|
1774
1786
|
type OutboxDelivered = S["OutboxDelivered"];
|
|
1775
|
-
type OutboxFailed =
|
|
1776
|
-
|
|
1787
|
+
type OutboxFailed = S["OutboxFailed"];
|
|
1788
|
+
type InboxFailed = S["InboxFailed"];
|
|
1789
|
+
/** Who wrote a user message (003#authors). */
|
|
1790
|
+
type Author = Omit<S["Author"], "kind" | "via"> & {
|
|
1791
|
+
kind: Open<S["Author"]["kind"]>;
|
|
1792
|
+
via: {
|
|
1793
|
+
kind: Open<S["Author"]["via"]["kind"]>;
|
|
1794
|
+
id: string;
|
|
1795
|
+
};
|
|
1777
1796
|
};
|
|
1797
|
+
/** The person a message or a session token speaks for. */
|
|
1798
|
+
type Participant = S["AuthorInput"];
|
|
1778
1799
|
type TurnErrorCode = Open<S["TurnErrorCode"]>;
|
|
1779
1800
|
type TurnError = {
|
|
1780
1801
|
code: TurnErrorCode;
|
|
@@ -1785,7 +1806,11 @@ type Session = Omit<S["Session"], "status" | "lastError"> & {
|
|
|
1785
1806
|
status: SessionStatus;
|
|
1786
1807
|
lastError: TurnError | null;
|
|
1787
1808
|
};
|
|
1788
|
-
|
|
1809
|
+
/** What a session token allows: "full" reads and writes its session, "read_only" only reads and follows it. */
|
|
1810
|
+
type TokenMode = Open<S["TokenMode"]>;
|
|
1811
|
+
type SessionToken = Omit<S["SessionToken"], "mode"> & {
|
|
1812
|
+
mode: TokenMode;
|
|
1813
|
+
};
|
|
1789
1814
|
type TurnStatus = Open<S["TurnStatus"]>;
|
|
1790
1815
|
/** "user": over waiting messages; "harness": started by the harness on its own, with no inputs. */
|
|
1791
1816
|
type TurnOrigin = Open<S["TurnOrigin"]>;
|
|
@@ -1813,7 +1838,9 @@ type ToolCall = Omit<S["ToolCall"], "tool"> & {
|
|
|
1813
1838
|
type ToolResult = Omit<S["ToolResult"], "tool"> & {
|
|
1814
1839
|
tool: ToolName;
|
|
1815
1840
|
};
|
|
1816
|
-
type UserBody = S["UserBody"]
|
|
1841
|
+
type UserBody = Omit<S["UserBody"], "author"> & {
|
|
1842
|
+
author: Author | null;
|
|
1843
|
+
};
|
|
1817
1844
|
type AssistantBody = S["AssistantBody"];
|
|
1818
1845
|
type ReasoningBody = S["ReasoningBody"];
|
|
1819
1846
|
type ToolCallBody = {
|
|
@@ -1862,6 +1889,7 @@ type TurnEnded = Omit<S["TurnEnded"], "outcome" | "error" | "timing"> & {
|
|
|
1862
1889
|
error: TurnError | null;
|
|
1863
1890
|
timing: TurnTiming | null;
|
|
1864
1891
|
};
|
|
1892
|
+
type Usage = S["Usage"];
|
|
1865
1893
|
type AgentUnavailable = {
|
|
1866
1894
|
error: TurnError;
|
|
1867
1895
|
};
|
|
@@ -1947,12 +1975,18 @@ type EventBody = {
|
|
|
1947
1975
|
} | {
|
|
1948
1976
|
type: "outbox.queued";
|
|
1949
1977
|
outbox: OutboxQueued;
|
|
1978
|
+
} | {
|
|
1979
|
+
type: "outbox.retrying";
|
|
1980
|
+
outbox: OutboxRetrying;
|
|
1950
1981
|
} | {
|
|
1951
1982
|
type: "outbox.delivered";
|
|
1952
1983
|
outbox: OutboxDelivered;
|
|
1953
1984
|
} | {
|
|
1954
1985
|
type: "outbox.failed";
|
|
1955
1986
|
outbox: OutboxFailed;
|
|
1987
|
+
} | {
|
|
1988
|
+
type: "inbox.failed";
|
|
1989
|
+
inbox: InboxFailed;
|
|
1956
1990
|
};
|
|
1957
1991
|
type EventType = EventBody["type"];
|
|
1958
1992
|
type Event = EventEnvelope & EventBody;
|
|
@@ -2152,15 +2186,26 @@ declare class SessionOperations {
|
|
|
2152
2186
|
};
|
|
2153
2187
|
constructor(transport: Transport, id: string);
|
|
2154
2188
|
private get base();
|
|
2155
|
-
/**
|
|
2156
|
-
|
|
2189
|
+
/**
|
|
2190
|
+
* Stores a user message; resolves with its event once stored (004#messages). author, the person
|
|
2191
|
+
* the message speaks for, is allowed with an API key or a function token, never a session token.
|
|
2192
|
+
*/
|
|
2193
|
+
send(text: string, options?: {
|
|
2194
|
+
author?: Participant;
|
|
2195
|
+
metadata?: Record<string, string>;
|
|
2196
|
+
}): Promise<Event>;
|
|
2157
2197
|
/** Stores a stop.requested event and resolves with it. */
|
|
2158
2198
|
stop(): Promise<Event>;
|
|
2159
2199
|
/** The session's events from after, then live events, reconnecting on its own (009#stream-reconnection). */
|
|
2160
2200
|
stream(options?: StreamOptions): EventStream;
|
|
2161
|
-
/**
|
|
2201
|
+
/**
|
|
2202
|
+
* Mints a session token for the browser: ttl in seconds; participant authors the token's
|
|
2203
|
+
* messages; readOnly makes a token that can only read and follow the session (004#credentials).
|
|
2204
|
+
*/
|
|
2162
2205
|
createToken(options: {
|
|
2163
2206
|
ttl: number;
|
|
2207
|
+
participant?: Participant;
|
|
2208
|
+
readOnly?: boolean;
|
|
2164
2209
|
}): Promise<SessionToken>;
|
|
2165
2210
|
/** Reads the session. */
|
|
2166
2211
|
get(): Promise<Session>;
|
|
@@ -2270,7 +2315,7 @@ declare class SessionHandle extends SessionOperations {
|
|
|
2270
2315
|
private load;
|
|
2271
2316
|
}
|
|
2272
2317
|
|
|
2273
|
-
declare const version = "0.0.
|
|
2318
|
+
declare const version = "0.0.5";
|
|
2274
2319
|
|
|
2275
2320
|
export { EventStream, PaddockClient, PaddockConnectionError, PaddockError, PaddockTimeoutError, PageList, SessionFold, SessionHandle, initialState, isKnownMessageKind, isStreamingMessageEvent, version };
|
|
2276
|
-
export type { ClientMessage, ConnectionState, ContextCategory, ContextItem, ContextStatus, ErrorCode, Event, EventListOptions, EventPage, EventType, Harness, HarnessEntry, HarnessMcpServer, HarnessStatus, HarnessStatusUpdate, Message, MessageKind, PaddockClientOptions, Page, PageOptions, RunState, Session, SessionState, SessionStatus, StatusUpdateEvent, StoredMessage, StreamEvent, StreamOptions, StreamingMessage, StreamingMessageEvent, SubagentRun, TimingPhase, TimingPhaseKind, ToolCall, ToolInput, ToolName, ToolOutput, ToolResult, Turn, TurnEnded, TurnError, TurnErrorCode, TurnOrigin, TurnStarted, TurnStatus, TurnTiming, WorkflowRun };
|
|
2321
|
+
export type { Author, ClientMessage, ConnectionState, ContextCategory, ContextItem, ContextStatus, ErrorCode, Event, EventListOptions, EventPage, EventType, Harness, HarnessEntry, HarnessMcpServer, HarnessStatus, HarnessStatusUpdate, Message, MessageKind, Metadata, PaddockClientOptions, Page, PageOptions, RunState, Session, SessionState, SessionStatus, SessionToken, StatusUpdateEvent, StoredMessage, StreamEvent, StreamOptions, StreamingMessage, StreamingMessageEvent, SubagentRun, TimingPhase, TimingPhaseKind, TokenMode, ToolCall, ToolInput, ToolName, ToolOutput, ToolResult, Turn, TurnEnded, TurnError, TurnErrorCode, TurnOrigin, TurnStarted, TurnStatus, TurnTiming, Usage, WorkflowRun };
|