@chatpanel/sdk 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/README.md +71 -0
- package/dist/api.generated.d.ts +1009 -0
- package/dist/api.generated.js +384 -0
- package/dist/discover.d.ts +10 -0
- package/dist/discover.js +35 -0
- package/dist/errors.d.ts +34 -0
- package/dist/errors.js +62 -0
- package/dist/index.d.ts +53 -0
- package/dist/index.js +94 -0
- package/dist/runtime.d.ts +76 -0
- package/dist/runtime.js +265 -0
- package/dist/sse.d.ts +14 -0
- package/dist/sse.js +67 -0
- package/dist/types.generated.d.ts +392 -0
- package/dist/types.generated.js +3 -0
- package/package.json +26 -0
|
@@ -0,0 +1,1009 @@
|
|
|
1
|
+
import type * as T from './types.generated.js';
|
|
2
|
+
import type { Runtime, RequestOptions, SseFrame } from './runtime.js';
|
|
3
|
+
/** Every operation in the contract, keyed by operationId — the route table the runtime executes. */
|
|
4
|
+
export declare const OPERATIONS: {
|
|
5
|
+
readonly "gateway.health": {
|
|
6
|
+
readonly id: "gateway.health";
|
|
7
|
+
readonly method: "GET";
|
|
8
|
+
readonly path: "/health";
|
|
9
|
+
readonly auth: "open";
|
|
10
|
+
readonly since: null;
|
|
11
|
+
readonly stream: null;
|
|
12
|
+
readonly pathParams: readonly [];
|
|
13
|
+
readonly queryParams: readonly [];
|
|
14
|
+
};
|
|
15
|
+
readonly "gateway.whoami": {
|
|
16
|
+
readonly id: "gateway.whoami";
|
|
17
|
+
readonly method: "POST";
|
|
18
|
+
readonly path: "/whoami";
|
|
19
|
+
readonly auth: "open";
|
|
20
|
+
readonly since: "0.9.0";
|
|
21
|
+
readonly stream: null;
|
|
22
|
+
readonly pathParams: readonly [];
|
|
23
|
+
readonly queryParams: readonly [];
|
|
24
|
+
};
|
|
25
|
+
readonly "gateway.pairCode": {
|
|
26
|
+
readonly id: "gateway.pairCode";
|
|
27
|
+
readonly method: "POST";
|
|
28
|
+
readonly path: "/pair/code";
|
|
29
|
+
readonly auth: "token";
|
|
30
|
+
readonly since: "0.9.0";
|
|
31
|
+
readonly stream: null;
|
|
32
|
+
readonly pathParams: readonly [];
|
|
33
|
+
readonly queryParams: readonly [];
|
|
34
|
+
};
|
|
35
|
+
readonly "gateway.pair": {
|
|
36
|
+
readonly id: "gateway.pair";
|
|
37
|
+
readonly method: "POST";
|
|
38
|
+
readonly path: "/pair";
|
|
39
|
+
readonly auth: "open";
|
|
40
|
+
readonly since: "0.9.0";
|
|
41
|
+
readonly stream: null;
|
|
42
|
+
readonly pathParams: readonly [];
|
|
43
|
+
readonly queryParams: readonly [];
|
|
44
|
+
};
|
|
45
|
+
readonly "gateway.audit": {
|
|
46
|
+
readonly id: "gateway.audit";
|
|
47
|
+
readonly method: "GET";
|
|
48
|
+
readonly path: "/audit";
|
|
49
|
+
readonly auth: "token";
|
|
50
|
+
readonly since: null;
|
|
51
|
+
readonly stream: null;
|
|
52
|
+
readonly pathParams: readonly [];
|
|
53
|
+
readonly queryParams: readonly [];
|
|
54
|
+
};
|
|
55
|
+
readonly "models.list": {
|
|
56
|
+
readonly id: "models.list";
|
|
57
|
+
readonly method: "GET";
|
|
58
|
+
readonly path: "/v1/models";
|
|
59
|
+
readonly auth: "open";
|
|
60
|
+
readonly since: null;
|
|
61
|
+
readonly stream: null;
|
|
62
|
+
readonly pathParams: readonly [];
|
|
63
|
+
readonly queryParams: readonly [];
|
|
64
|
+
};
|
|
65
|
+
readonly "chat.completions": {
|
|
66
|
+
readonly id: "chat.completions";
|
|
67
|
+
readonly method: "POST";
|
|
68
|
+
readonly path: "/v1/chat/completions";
|
|
69
|
+
readonly auth: "open";
|
|
70
|
+
readonly since: null;
|
|
71
|
+
readonly stream: "sse-when-stream";
|
|
72
|
+
readonly pathParams: readonly [];
|
|
73
|
+
readonly queryParams: readonly [];
|
|
74
|
+
};
|
|
75
|
+
readonly "redaction.preview": {
|
|
76
|
+
readonly id: "redaction.preview";
|
|
77
|
+
readonly method: "POST";
|
|
78
|
+
readonly path: "/redact";
|
|
79
|
+
readonly auth: "open";
|
|
80
|
+
readonly since: "0.6.62";
|
|
81
|
+
readonly stream: null;
|
|
82
|
+
readonly pathParams: readonly [];
|
|
83
|
+
readonly queryParams: readonly [];
|
|
84
|
+
};
|
|
85
|
+
readonly "history.search": {
|
|
86
|
+
readonly id: "history.search";
|
|
87
|
+
readonly method: "POST";
|
|
88
|
+
readonly path: "/v1/history/search";
|
|
89
|
+
readonly auth: "open";
|
|
90
|
+
readonly since: null;
|
|
91
|
+
readonly stream: null;
|
|
92
|
+
readonly pathParams: readonly [];
|
|
93
|
+
readonly queryParams: readonly [];
|
|
94
|
+
};
|
|
95
|
+
readonly "history.smartSearch": {
|
|
96
|
+
readonly id: "history.smartSearch";
|
|
97
|
+
readonly method: "POST";
|
|
98
|
+
readonly path: "/v1/history/smart-search";
|
|
99
|
+
readonly auth: "open";
|
|
100
|
+
readonly since: null;
|
|
101
|
+
readonly stream: null;
|
|
102
|
+
readonly pathParams: readonly [];
|
|
103
|
+
readonly queryParams: readonly [];
|
|
104
|
+
};
|
|
105
|
+
readonly "history.related": {
|
|
106
|
+
readonly id: "history.related";
|
|
107
|
+
readonly method: "GET";
|
|
108
|
+
readonly path: "/v1/history/related";
|
|
109
|
+
readonly auth: "open";
|
|
110
|
+
readonly since: null;
|
|
111
|
+
readonly stream: null;
|
|
112
|
+
readonly pathParams: readonly [];
|
|
113
|
+
readonly queryParams: readonly ["id", "limit"];
|
|
114
|
+
};
|
|
115
|
+
readonly "history.status": {
|
|
116
|
+
readonly id: "history.status";
|
|
117
|
+
readonly method: "GET";
|
|
118
|
+
readonly path: "/v1/history/status";
|
|
119
|
+
readonly auth: "open";
|
|
120
|
+
readonly since: null;
|
|
121
|
+
readonly stream: null;
|
|
122
|
+
readonly pathParams: readonly [];
|
|
123
|
+
readonly queryParams: readonly [];
|
|
124
|
+
};
|
|
125
|
+
readonly "history.list": {
|
|
126
|
+
readonly id: "history.list";
|
|
127
|
+
readonly method: "GET";
|
|
128
|
+
readonly path: "/v1/history/list";
|
|
129
|
+
readonly auth: "open";
|
|
130
|
+
readonly since: null;
|
|
131
|
+
readonly stream: null;
|
|
132
|
+
readonly pathParams: readonly [];
|
|
133
|
+
readonly queryParams: readonly ["limit", "offset", "type"];
|
|
134
|
+
};
|
|
135
|
+
readonly "history.get": {
|
|
136
|
+
readonly id: "history.get";
|
|
137
|
+
readonly method: "GET";
|
|
138
|
+
readonly path: "/v1/history/get";
|
|
139
|
+
readonly auth: "open";
|
|
140
|
+
readonly since: null;
|
|
141
|
+
readonly stream: null;
|
|
142
|
+
readonly pathParams: readonly [];
|
|
143
|
+
readonly queryParams: readonly ["id", "maxChars", "offset"];
|
|
144
|
+
};
|
|
145
|
+
readonly "history.records": {
|
|
146
|
+
readonly id: "history.records";
|
|
147
|
+
readonly method: "GET";
|
|
148
|
+
readonly path: "/v1/history/records";
|
|
149
|
+
readonly auth: "open";
|
|
150
|
+
readonly since: "0.10.0";
|
|
151
|
+
readonly stream: null;
|
|
152
|
+
readonly pathParams: readonly [];
|
|
153
|
+
readonly queryParams: readonly ["since", "cursor", "limit", "kind"];
|
|
154
|
+
};
|
|
155
|
+
readonly "history.putRecords": {
|
|
156
|
+
readonly id: "history.putRecords";
|
|
157
|
+
readonly method: "PUT";
|
|
158
|
+
readonly path: "/v1/history/records";
|
|
159
|
+
readonly auth: "token";
|
|
160
|
+
readonly since: "0.10.0";
|
|
161
|
+
readonly stream: null;
|
|
162
|
+
readonly pathParams: readonly [];
|
|
163
|
+
readonly queryParams: readonly [];
|
|
164
|
+
};
|
|
165
|
+
readonly "history.stream": {
|
|
166
|
+
readonly id: "history.stream";
|
|
167
|
+
readonly method: "GET";
|
|
168
|
+
readonly path: "/v1/history/stream";
|
|
169
|
+
readonly auth: "open";
|
|
170
|
+
readonly since: "0.11.0";
|
|
171
|
+
readonly stream: "sse";
|
|
172
|
+
readonly pathParams: readonly [];
|
|
173
|
+
readonly queryParams: readonly [];
|
|
174
|
+
};
|
|
175
|
+
readonly "history.ingest": {
|
|
176
|
+
readonly id: "history.ingest";
|
|
177
|
+
readonly method: "POST";
|
|
178
|
+
readonly path: "/v1/history/ingest";
|
|
179
|
+
readonly auth: "token";
|
|
180
|
+
readonly since: null;
|
|
181
|
+
readonly stream: null;
|
|
182
|
+
readonly pathParams: readonly [];
|
|
183
|
+
readonly queryParams: readonly [];
|
|
184
|
+
};
|
|
185
|
+
readonly "memory.list": {
|
|
186
|
+
readonly id: "memory.list";
|
|
187
|
+
readonly method: "GET";
|
|
188
|
+
readonly path: "/v1/memory/list";
|
|
189
|
+
readonly auth: "open";
|
|
190
|
+
readonly since: null;
|
|
191
|
+
readonly stream: null;
|
|
192
|
+
readonly pathParams: readonly [];
|
|
193
|
+
readonly queryParams: readonly [];
|
|
194
|
+
};
|
|
195
|
+
readonly "memory.recall": {
|
|
196
|
+
readonly id: "memory.recall";
|
|
197
|
+
readonly method: "POST";
|
|
198
|
+
readonly path: "/v1/memory/recall";
|
|
199
|
+
readonly auth: "open";
|
|
200
|
+
readonly since: null;
|
|
201
|
+
readonly stream: null;
|
|
202
|
+
readonly pathParams: readonly [];
|
|
203
|
+
readonly queryParams: readonly [];
|
|
204
|
+
};
|
|
205
|
+
readonly "memory.remember": {
|
|
206
|
+
readonly id: "memory.remember";
|
|
207
|
+
readonly method: "POST";
|
|
208
|
+
readonly path: "/v1/memory/remember";
|
|
209
|
+
readonly auth: "token";
|
|
210
|
+
readonly since: null;
|
|
211
|
+
readonly stream: null;
|
|
212
|
+
readonly pathParams: readonly [];
|
|
213
|
+
readonly queryParams: readonly [];
|
|
214
|
+
};
|
|
215
|
+
readonly "memory.forget": {
|
|
216
|
+
readonly id: "memory.forget";
|
|
217
|
+
readonly method: "POST";
|
|
218
|
+
readonly path: "/v1/memory/forget";
|
|
219
|
+
readonly auth: "token";
|
|
220
|
+
readonly since: null;
|
|
221
|
+
readonly stream: null;
|
|
222
|
+
readonly pathParams: readonly [];
|
|
223
|
+
readonly queryParams: readonly [];
|
|
224
|
+
};
|
|
225
|
+
readonly "memory.sync": {
|
|
226
|
+
readonly id: "memory.sync";
|
|
227
|
+
readonly method: "POST";
|
|
228
|
+
readonly path: "/v1/memory/sync";
|
|
229
|
+
readonly auth: "token";
|
|
230
|
+
readonly since: null;
|
|
231
|
+
readonly stream: null;
|
|
232
|
+
readonly pathParams: readonly [];
|
|
233
|
+
readonly queryParams: readonly [];
|
|
234
|
+
};
|
|
235
|
+
readonly "prefs.get": {
|
|
236
|
+
readonly id: "prefs.get";
|
|
237
|
+
readonly method: "GET";
|
|
238
|
+
readonly path: "/v1/prefs";
|
|
239
|
+
readonly auth: "open";
|
|
240
|
+
readonly since: "0.6.77";
|
|
241
|
+
readonly stream: null;
|
|
242
|
+
readonly pathParams: readonly [];
|
|
243
|
+
readonly queryParams: readonly ["section", "stamps"];
|
|
244
|
+
};
|
|
245
|
+
readonly "prefs.put": {
|
|
246
|
+
readonly id: "prefs.put";
|
|
247
|
+
readonly method: "POST";
|
|
248
|
+
readonly path: "/v1/prefs";
|
|
249
|
+
readonly auth: "open";
|
|
250
|
+
readonly since: "0.6.77";
|
|
251
|
+
readonly stream: null;
|
|
252
|
+
readonly pathParams: readonly [];
|
|
253
|
+
readonly queryParams: readonly [];
|
|
254
|
+
};
|
|
255
|
+
readonly "prefs.delete": {
|
|
256
|
+
readonly id: "prefs.delete";
|
|
257
|
+
readonly method: "DELETE";
|
|
258
|
+
readonly path: "/v1/prefs";
|
|
259
|
+
readonly auth: "open";
|
|
260
|
+
readonly since: "0.6.77";
|
|
261
|
+
readonly stream: null;
|
|
262
|
+
readonly pathParams: readonly [];
|
|
263
|
+
readonly queryParams: readonly ["section"];
|
|
264
|
+
};
|
|
265
|
+
readonly "prefs.events": {
|
|
266
|
+
readonly id: "prefs.events";
|
|
267
|
+
readonly method: "GET";
|
|
268
|
+
readonly path: "/v1/prefs/events";
|
|
269
|
+
readonly auth: "open";
|
|
270
|
+
readonly since: "0.6.77";
|
|
271
|
+
readonly stream: "sse";
|
|
272
|
+
readonly pathParams: readonly [];
|
|
273
|
+
readonly queryParams: readonly [];
|
|
274
|
+
};
|
|
275
|
+
readonly "teams.listRuns": {
|
|
276
|
+
readonly id: "teams.listRuns";
|
|
277
|
+
readonly method: "GET";
|
|
278
|
+
readonly path: "/v1/teams/runs";
|
|
279
|
+
readonly auth: "open";
|
|
280
|
+
readonly since: "0.6.78";
|
|
281
|
+
readonly stream: null;
|
|
282
|
+
readonly pathParams: readonly [];
|
|
283
|
+
readonly queryParams: readonly ["limit", "team"];
|
|
284
|
+
};
|
|
285
|
+
readonly "teams.createRun": {
|
|
286
|
+
readonly id: "teams.createRun";
|
|
287
|
+
readonly method: "POST";
|
|
288
|
+
readonly path: "/v1/teams/runs";
|
|
289
|
+
readonly auth: "open";
|
|
290
|
+
readonly since: "0.6.78";
|
|
291
|
+
readonly stream: null;
|
|
292
|
+
readonly pathParams: readonly [];
|
|
293
|
+
readonly queryParams: readonly [];
|
|
294
|
+
};
|
|
295
|
+
readonly "teams.getRun": {
|
|
296
|
+
readonly id: "teams.getRun";
|
|
297
|
+
readonly method: "GET";
|
|
298
|
+
readonly path: "/v1/teams/runs/{runId}";
|
|
299
|
+
readonly auth: "open";
|
|
300
|
+
readonly since: "0.6.78";
|
|
301
|
+
readonly stream: null;
|
|
302
|
+
readonly pathParams: readonly ["runId"];
|
|
303
|
+
readonly queryParams: readonly ["events"];
|
|
304
|
+
};
|
|
305
|
+
readonly "teams.deleteRun": {
|
|
306
|
+
readonly id: "teams.deleteRun";
|
|
307
|
+
readonly method: "DELETE";
|
|
308
|
+
readonly path: "/v1/teams/runs/{runId}";
|
|
309
|
+
readonly auth: "open";
|
|
310
|
+
readonly since: "0.6.110";
|
|
311
|
+
readonly stream: null;
|
|
312
|
+
readonly pathParams: readonly ["runId"];
|
|
313
|
+
readonly queryParams: readonly [];
|
|
314
|
+
};
|
|
315
|
+
readonly "teams.runEvents": {
|
|
316
|
+
readonly id: "teams.runEvents";
|
|
317
|
+
readonly method: "GET";
|
|
318
|
+
readonly path: "/v1/teams/runs/{runId}/events";
|
|
319
|
+
readonly auth: "open";
|
|
320
|
+
readonly since: "0.6.78";
|
|
321
|
+
readonly stream: "sse";
|
|
322
|
+
readonly pathParams: readonly ["runId"];
|
|
323
|
+
readonly queryParams: readonly ["after"];
|
|
324
|
+
};
|
|
325
|
+
readonly "teams.appendRunEvents": {
|
|
326
|
+
readonly id: "teams.appendRunEvents";
|
|
327
|
+
readonly method: "POST";
|
|
328
|
+
readonly path: "/v1/teams/runs/{runId}/events";
|
|
329
|
+
readonly auth: "open";
|
|
330
|
+
readonly since: "0.6.78";
|
|
331
|
+
readonly stream: null;
|
|
332
|
+
readonly pathParams: readonly ["runId"];
|
|
333
|
+
readonly queryParams: readonly [];
|
|
334
|
+
};
|
|
335
|
+
readonly "teams.stopRun": {
|
|
336
|
+
readonly id: "teams.stopRun";
|
|
337
|
+
readonly method: "POST";
|
|
338
|
+
readonly path: "/v1/teams/runs/{runId}/stop";
|
|
339
|
+
readonly auth: "open";
|
|
340
|
+
readonly since: "0.6.78";
|
|
341
|
+
readonly stream: null;
|
|
342
|
+
readonly pathParams: readonly ["runId"];
|
|
343
|
+
readonly queryParams: readonly [];
|
|
344
|
+
};
|
|
345
|
+
readonly "teams.answer": {
|
|
346
|
+
readonly id: "teams.answer";
|
|
347
|
+
readonly method: "POST";
|
|
348
|
+
readonly path: "/v1/teams/runs/{runId}/answer";
|
|
349
|
+
readonly auth: "open";
|
|
350
|
+
readonly since: "0.6.81";
|
|
351
|
+
readonly stream: null;
|
|
352
|
+
readonly pathParams: readonly ["runId"];
|
|
353
|
+
readonly queryParams: readonly [];
|
|
354
|
+
};
|
|
355
|
+
readonly "teams.decide": {
|
|
356
|
+
readonly id: "teams.decide";
|
|
357
|
+
readonly method: "POST";
|
|
358
|
+
readonly path: "/v1/teams/runs/{runId}/decide";
|
|
359
|
+
readonly auth: "open";
|
|
360
|
+
readonly since: "0.6.81";
|
|
361
|
+
readonly stream: null;
|
|
362
|
+
readonly pathParams: readonly ["runId"];
|
|
363
|
+
readonly queryParams: readonly [];
|
|
364
|
+
};
|
|
365
|
+
readonly "teams.post": {
|
|
366
|
+
readonly id: "teams.post";
|
|
367
|
+
readonly method: "POST";
|
|
368
|
+
readonly path: "/v1/teams/runs/{runId}/post";
|
|
369
|
+
readonly auth: "open";
|
|
370
|
+
readonly since: "0.6.81";
|
|
371
|
+
readonly stream: null;
|
|
372
|
+
readonly pathParams: readonly ["runId"];
|
|
373
|
+
readonly queryParams: readonly [];
|
|
374
|
+
};
|
|
375
|
+
readonly "teams.removeThread": {
|
|
376
|
+
readonly id: "teams.removeThread";
|
|
377
|
+
readonly method: "DELETE";
|
|
378
|
+
readonly path: "/v1/teams/runs/{runId}/threads/{threadId}";
|
|
379
|
+
readonly auth: "open";
|
|
380
|
+
readonly since: "0.6.106";
|
|
381
|
+
readonly stream: null;
|
|
382
|
+
readonly pathParams: readonly ["runId", "threadId"];
|
|
383
|
+
readonly queryParams: readonly [];
|
|
384
|
+
};
|
|
385
|
+
readonly "teams.handoff": {
|
|
386
|
+
readonly id: "teams.handoff";
|
|
387
|
+
readonly method: "POST";
|
|
388
|
+
readonly path: "/v1/teams/runs/{runId}/handoff";
|
|
389
|
+
readonly auth: "open";
|
|
390
|
+
readonly since: "0.6.85";
|
|
391
|
+
readonly stream: null;
|
|
392
|
+
readonly pathParams: readonly ["runId"];
|
|
393
|
+
readonly queryParams: readonly [];
|
|
394
|
+
};
|
|
395
|
+
readonly "teams.checkpoint": {
|
|
396
|
+
readonly id: "teams.checkpoint";
|
|
397
|
+
readonly method: "GET";
|
|
398
|
+
readonly path: "/v1/teams/runs/{runId}/checkpoint";
|
|
399
|
+
readonly auth: "open";
|
|
400
|
+
readonly since: "0.6.85";
|
|
401
|
+
readonly stream: null;
|
|
402
|
+
readonly pathParams: readonly ["runId"];
|
|
403
|
+
readonly queryParams: readonly [];
|
|
404
|
+
};
|
|
405
|
+
readonly "teams.claim": {
|
|
406
|
+
readonly id: "teams.claim";
|
|
407
|
+
readonly method: "POST";
|
|
408
|
+
readonly path: "/v1/teams/runs/{runId}/claim";
|
|
409
|
+
readonly auth: "open";
|
|
410
|
+
readonly since: "0.6.85";
|
|
411
|
+
readonly stream: null;
|
|
412
|
+
readonly pathParams: readonly ["runId"];
|
|
413
|
+
readonly queryParams: readonly [];
|
|
414
|
+
};
|
|
415
|
+
readonly "projects.list": {
|
|
416
|
+
readonly id: "projects.list";
|
|
417
|
+
readonly method: "GET";
|
|
418
|
+
readonly path: "/v1/projects";
|
|
419
|
+
readonly auth: "open";
|
|
420
|
+
readonly since: "0.6.90";
|
|
421
|
+
readonly stream: null;
|
|
422
|
+
readonly pathParams: readonly [];
|
|
423
|
+
readonly queryParams: readonly ["limit", "status"];
|
|
424
|
+
};
|
|
425
|
+
readonly "projects.create": {
|
|
426
|
+
readonly id: "projects.create";
|
|
427
|
+
readonly method: "POST";
|
|
428
|
+
readonly path: "/v1/projects";
|
|
429
|
+
readonly auth: "open";
|
|
430
|
+
readonly since: "0.6.90";
|
|
431
|
+
readonly stream: null;
|
|
432
|
+
readonly pathParams: readonly [];
|
|
433
|
+
readonly queryParams: readonly [];
|
|
434
|
+
};
|
|
435
|
+
readonly "projects.jobBoard": {
|
|
436
|
+
readonly id: "projects.jobBoard";
|
|
437
|
+
readonly method: "GET";
|
|
438
|
+
readonly path: "/v1/projects/jobs";
|
|
439
|
+
readonly auth: "open";
|
|
440
|
+
readonly since: "0.6.90";
|
|
441
|
+
readonly stream: null;
|
|
442
|
+
readonly pathParams: readonly [];
|
|
443
|
+
readonly queryParams: readonly [];
|
|
444
|
+
};
|
|
445
|
+
readonly "projects.get": {
|
|
446
|
+
readonly id: "projects.get";
|
|
447
|
+
readonly method: "GET";
|
|
448
|
+
readonly path: "/v1/projects/{projectId}";
|
|
449
|
+
readonly auth: "open";
|
|
450
|
+
readonly since: "0.6.90";
|
|
451
|
+
readonly stream: null;
|
|
452
|
+
readonly pathParams: readonly ["projectId"];
|
|
453
|
+
readonly queryParams: readonly ["events"];
|
|
454
|
+
};
|
|
455
|
+
readonly "projects.delete": {
|
|
456
|
+
readonly id: "projects.delete";
|
|
457
|
+
readonly method: "DELETE";
|
|
458
|
+
readonly path: "/v1/projects/{projectId}";
|
|
459
|
+
readonly auth: "open";
|
|
460
|
+
readonly since: "0.6.90";
|
|
461
|
+
readonly stream: null;
|
|
462
|
+
readonly pathParams: readonly ["projectId"];
|
|
463
|
+
readonly queryParams: readonly [];
|
|
464
|
+
};
|
|
465
|
+
readonly "projects.events": {
|
|
466
|
+
readonly id: "projects.events";
|
|
467
|
+
readonly method: "GET";
|
|
468
|
+
readonly path: "/v1/projects/{projectId}/events";
|
|
469
|
+
readonly auth: "open";
|
|
470
|
+
readonly since: "0.6.90";
|
|
471
|
+
readonly stream: "sse";
|
|
472
|
+
readonly pathParams: readonly ["projectId"];
|
|
473
|
+
readonly queryParams: readonly ["after"];
|
|
474
|
+
};
|
|
475
|
+
readonly "projects.appendEvents": {
|
|
476
|
+
readonly id: "projects.appendEvents";
|
|
477
|
+
readonly method: "POST";
|
|
478
|
+
readonly path: "/v1/projects/{projectId}/events";
|
|
479
|
+
readonly auth: "open";
|
|
480
|
+
readonly since: "0.6.90";
|
|
481
|
+
readonly stream: null;
|
|
482
|
+
readonly pathParams: readonly ["projectId"];
|
|
483
|
+
readonly queryParams: readonly [];
|
|
484
|
+
};
|
|
485
|
+
readonly "projects.postJob": {
|
|
486
|
+
readonly id: "projects.postJob";
|
|
487
|
+
readonly method: "POST";
|
|
488
|
+
readonly path: "/v1/projects/{projectId}/jobs";
|
|
489
|
+
readonly auth: "open";
|
|
490
|
+
readonly since: "0.6.90";
|
|
491
|
+
readonly stream: null;
|
|
492
|
+
readonly pathParams: readonly ["projectId"];
|
|
493
|
+
readonly queryParams: readonly [];
|
|
494
|
+
};
|
|
495
|
+
readonly "projects.patchJob": {
|
|
496
|
+
readonly id: "projects.patchJob";
|
|
497
|
+
readonly method: "POST";
|
|
498
|
+
readonly path: "/v1/projects/{projectId}/jobs/{jobId}";
|
|
499
|
+
readonly auth: "open";
|
|
500
|
+
readonly since: "0.6.90";
|
|
501
|
+
readonly stream: null;
|
|
502
|
+
readonly pathParams: readonly ["projectId", "jobId"];
|
|
503
|
+
readonly queryParams: readonly [];
|
|
504
|
+
};
|
|
505
|
+
readonly "projects.applications": {
|
|
506
|
+
readonly id: "projects.applications";
|
|
507
|
+
readonly method: "GET";
|
|
508
|
+
readonly path: "/v1/projects/{projectId}/jobs/{jobId}/applications";
|
|
509
|
+
readonly auth: "open";
|
|
510
|
+
readonly since: "0.6.90";
|
|
511
|
+
readonly stream: null;
|
|
512
|
+
readonly pathParams: readonly ["projectId", "jobId"];
|
|
513
|
+
readonly queryParams: readonly ["reach", "chatModel"];
|
|
514
|
+
};
|
|
515
|
+
readonly "projects.recruit": {
|
|
516
|
+
readonly id: "projects.recruit";
|
|
517
|
+
readonly method: "POST";
|
|
518
|
+
readonly path: "/v1/projects/{projectId}/jobs/{jobId}/recruit";
|
|
519
|
+
readonly auth: "open";
|
|
520
|
+
readonly since: "0.6.90";
|
|
521
|
+
readonly stream: null;
|
|
522
|
+
readonly pathParams: readonly ["projectId", "jobId"];
|
|
523
|
+
readonly queryParams: readonly [];
|
|
524
|
+
};
|
|
525
|
+
readonly "agents.scorecards": {
|
|
526
|
+
readonly id: "agents.scorecards";
|
|
527
|
+
readonly method: "GET";
|
|
528
|
+
readonly path: "/v1/agents/scorecards";
|
|
529
|
+
readonly auth: "open";
|
|
530
|
+
readonly since: "0.6.87";
|
|
531
|
+
readonly stream: null;
|
|
532
|
+
readonly pathParams: readonly [];
|
|
533
|
+
readonly queryParams: readonly [];
|
|
534
|
+
};
|
|
535
|
+
readonly "agents.scorecard": {
|
|
536
|
+
readonly id: "agents.scorecard";
|
|
537
|
+
readonly method: "GET";
|
|
538
|
+
readonly path: "/v1/agents/{agentId}/scorecard";
|
|
539
|
+
readonly auth: "open";
|
|
540
|
+
readonly since: "0.6.87";
|
|
541
|
+
readonly stream: null;
|
|
542
|
+
readonly pathParams: readonly ["agentId"];
|
|
543
|
+
readonly queryParams: readonly [];
|
|
544
|
+
};
|
|
545
|
+
readonly "agents.rate": {
|
|
546
|
+
readonly id: "agents.rate";
|
|
547
|
+
readonly method: "POST";
|
|
548
|
+
readonly path: "/v1/agents/{agentId}/scorecard";
|
|
549
|
+
readonly auth: "open";
|
|
550
|
+
readonly since: "0.6.87";
|
|
551
|
+
readonly stream: null;
|
|
552
|
+
readonly pathParams: readonly ["agentId"];
|
|
553
|
+
readonly queryParams: readonly [];
|
|
554
|
+
};
|
|
555
|
+
readonly "engines.list": {
|
|
556
|
+
readonly id: "engines.list";
|
|
557
|
+
readonly method: "GET";
|
|
558
|
+
readonly path: "/v1/engines";
|
|
559
|
+
readonly auth: "open";
|
|
560
|
+
readonly since: "0.6.89";
|
|
561
|
+
readonly stream: null;
|
|
562
|
+
readonly pathParams: readonly [];
|
|
563
|
+
readonly queryParams: readonly ["minCalls"];
|
|
564
|
+
};
|
|
565
|
+
readonly "engines.card": {
|
|
566
|
+
readonly id: "engines.card";
|
|
567
|
+
readonly method: "GET";
|
|
568
|
+
readonly path: "/v1/engines/{engineKey}/card";
|
|
569
|
+
readonly auth: "open";
|
|
570
|
+
readonly since: "0.6.89";
|
|
571
|
+
readonly stream: null;
|
|
572
|
+
readonly pathParams: readonly ["engineKey"];
|
|
573
|
+
readonly queryParams: readonly ["entries", "minCalls"];
|
|
574
|
+
};
|
|
575
|
+
readonly "engines.appendEntry": {
|
|
576
|
+
readonly id: "engines.appendEntry";
|
|
577
|
+
readonly method: "POST";
|
|
578
|
+
readonly path: "/v1/engines/{engineKey}/entries";
|
|
579
|
+
readonly auth: "open";
|
|
580
|
+
readonly since: "0.6.89";
|
|
581
|
+
readonly stream: null;
|
|
582
|
+
readonly pathParams: readonly ["engineKey"];
|
|
583
|
+
readonly queryParams: readonly [];
|
|
584
|
+
};
|
|
585
|
+
readonly "skills.list": {
|
|
586
|
+
readonly id: "skills.list";
|
|
587
|
+
readonly method: "GET";
|
|
588
|
+
readonly path: "/skills";
|
|
589
|
+
readonly auth: "open";
|
|
590
|
+
readonly since: "0.6.64";
|
|
591
|
+
readonly stream: null;
|
|
592
|
+
readonly pathParams: readonly [];
|
|
593
|
+
readonly queryParams: readonly ["workdir"];
|
|
594
|
+
};
|
|
595
|
+
readonly "skills.get": {
|
|
596
|
+
readonly id: "skills.get";
|
|
597
|
+
readonly method: "GET";
|
|
598
|
+
readonly path: "/skills/{skillId}";
|
|
599
|
+
readonly auth: "open";
|
|
600
|
+
readonly since: "0.6.67";
|
|
601
|
+
readonly stream: null;
|
|
602
|
+
readonly pathParams: readonly ["skillId"];
|
|
603
|
+
readonly queryParams: readonly ["workdir"];
|
|
604
|
+
};
|
|
605
|
+
};
|
|
606
|
+
export type OperationId = keyof typeof OPERATIONS;
|
|
607
|
+
/** Liveness, identity and pairing. */
|
|
608
|
+
export declare class GatewayApi {
|
|
609
|
+
private readonly rt;
|
|
610
|
+
constructor(rt: Runtime);
|
|
611
|
+
/** Liveness, version and capabilities. Additive fields only. `version` is what every version gate reads. */
|
|
612
|
+
health(opts?: RequestOptions): Promise<T.Health>;
|
|
613
|
+
/** What the gateway makes of this caller. — Gateway 0.9.0+. */
|
|
614
|
+
whoami(opts?: RequestOptions): Promise<T.WhoAmI>;
|
|
615
|
+
/** Mint a one-time pairing code (5 minutes, one use, 5 attempts). Only a caller that already holds the token may mint one — pairing widens nothing. — Requires the gateway token. Gateway 0.9.0+. */
|
|
616
|
+
pairCode(opts?: RequestOptions): Promise<T.PairingCode>;
|
|
617
|
+
/** Exchange a pairing code for the gateway token. — Gateway 0.9.0+. */
|
|
618
|
+
pair(body: {
|
|
619
|
+
/** The 6-digit code from `chatpanel-gateway pair`. */
|
|
620
|
+
code: string;
|
|
621
|
+
}, opts?: RequestOptions): Promise<T.Paired>;
|
|
622
|
+
/** The egress audit — which hosts this gateway has contacted and which its config allows. The checkable claim behind "nothing leaves the machine". Admin-gated because it names the user's model endpoints. — Requires the gateway token. */
|
|
623
|
+
audit(opts?: RequestOptions): Promise<T.Audit>;
|
|
624
|
+
}
|
|
625
|
+
/** What the gateway can route to. */
|
|
626
|
+
export declare class ModelsApi {
|
|
627
|
+
private readonly rt;
|
|
628
|
+
constructor(rt: Runtime);
|
|
629
|
+
/** Every model the gateway can route to. Describes the routing table, not the disk: a bridge agent is listed whether or not the CLI is installed. From 0.6.64 each agent carries `available`; from 0.6.66 a cloud model carries `configured: false` when a turn is known to fail for something the user can fix. */
|
|
630
|
+
list(opts?: RequestOptions): Promise<T.ModelList>;
|
|
631
|
+
}
|
|
632
|
+
/** The OpenAI-compatible chat endpoint, redacted and routed by the gateway. */
|
|
633
|
+
export declare class ChatApi {
|
|
634
|
+
private readonly rt;
|
|
635
|
+
constructor(rt: Runtime);
|
|
636
|
+
/** One chat turn through the gateway (OpenAI-compatible). Redacted on the way out, restored on the way back, routed by `model`. With `stream: true` the response is `text/event-stream` of OpenAI chunk objects ending in `data: [DONE]`. Send `tools` so a redacted turn can still act: the gateway relays a tool call back with real arguments and redacts the result. `X-ChatPanel-Redaction: off` is honoured only from a token-bearing caller (0.6.69+) and is recorded in the trace. **Two lanes.** An API destination (a cloud or local model endpoint) is a proxy hop and is open to any local caller. An AGENT destination (`codex`, `claude`, `opencode`, … — `provider_type: agent` in `GET /v1/models`) spawns a process on this machine, so the caller must hold the gateway token (0.9.0+): without it the gateway answers **401** `{ type: 'auth', code: 'agent_lane_token_required' }`. The SDKs surface that as `ForbiddenError` with `status` 401. */
|
|
637
|
+
completions(body: T.ChatCompletionRequest, opts?: RequestOptions & {
|
|
638
|
+
headers?: {
|
|
639
|
+
"X-ChatPanel-Redaction"?: "off";
|
|
640
|
+
"X-ChatPanel-Run"?: string;
|
|
641
|
+
};
|
|
642
|
+
}): Promise<T.ChatCompletion>;
|
|
643
|
+
/** The same call with `stream: true` — one frame per chunk until `[DONE]`. */
|
|
644
|
+
completionsStream(body: T.ChatCompletionRequest, opts?: RequestOptions & {
|
|
645
|
+
headers?: {
|
|
646
|
+
"X-ChatPanel-Redaction"?: "off";
|
|
647
|
+
"X-ChatPanel-Run"?: string;
|
|
648
|
+
};
|
|
649
|
+
}): AsyncIterable<SseFrame<T.ChatCompletionChunk>>;
|
|
650
|
+
}
|
|
651
|
+
/** Preview what the model would receive. */
|
|
652
|
+
export declare class RedactionApi {
|
|
653
|
+
private readonly rt;
|
|
654
|
+
constructor(rt: Runtime);
|
|
655
|
+
/** What the model would receive if this text were sent now. Runs the same redaction path as a real turn. The reply carries placeholder types, never the real values. — Gateway 0.6.62+. */
|
|
656
|
+
preview(body: {
|
|
657
|
+
text: string;
|
|
658
|
+
}, opts?: RequestOptions): Promise<T.RedactionPreview>;
|
|
659
|
+
}
|
|
660
|
+
/** The user's searchable history — chats, notes, meetings, briefs. */
|
|
661
|
+
export declare class HistoryApi {
|
|
662
|
+
private readonly rt;
|
|
663
|
+
constructor(rt: Runtime);
|
|
664
|
+
/** One keyword query over the warm index. */
|
|
665
|
+
search(body: T.SearchRequest, opts?: RequestOptions): Promise<T.SearchResponse>;
|
|
666
|
+
/** Several phrasings at once, rank-fused; briefs lead. */
|
|
667
|
+
smartSearch(body: T.SmartSearchRequest, opts?: RequestOptions): Promise<T.SmartSearchResponse>;
|
|
668
|
+
/** The records most connected to one record. */
|
|
669
|
+
related(query: {
|
|
670
|
+
id: string;
|
|
671
|
+
limit?: number;
|
|
672
|
+
}, opts?: RequestOptions): Promise<{
|
|
673
|
+
ok: boolean;
|
|
674
|
+
results: Array<T.SearchHit>;
|
|
675
|
+
}>;
|
|
676
|
+
/** Size and freshness of the warm index (and the lossless tier from 0.10.0). */
|
|
677
|
+
status(opts?: RequestOptions): Promise<T.HistoryStatus>;
|
|
678
|
+
/** A page of the warm index — metadata only, no bodies. */
|
|
679
|
+
list(query?: {
|
|
680
|
+
limit?: number;
|
|
681
|
+
offset?: number;
|
|
682
|
+
type?: T.RecordType;
|
|
683
|
+
}, opts?: RequestOptions): Promise<T.HistoryPage>;
|
|
684
|
+
/** One full warm record, optionally paged by characters. */
|
|
685
|
+
get(query: {
|
|
686
|
+
id: string;
|
|
687
|
+
maxChars?: number;
|
|
688
|
+
offset?: number;
|
|
689
|
+
}, opts?: RequestOptions): Promise<{
|
|
690
|
+
ok: boolean;
|
|
691
|
+
record: T.HistoryRecord;
|
|
692
|
+
}>;
|
|
693
|
+
/** WHOLE records changed after a stamp, oldest first, paged by cursor, tombstones included. The lossless tier. A gateway without the SQLite store answers 501. — Gateway 0.10.0+. */
|
|
694
|
+
records(query?: {
|
|
695
|
+
since?: number;
|
|
696
|
+
cursor?: string;
|
|
697
|
+
limit?: number;
|
|
698
|
+
kind?: string;
|
|
699
|
+
}, opts?: RequestOptions): Promise<T.RecordsPage>;
|
|
700
|
+
/** Push whole records; the gateway derives the searchable text itself. — Requires the gateway token. Gateway 0.10.0+. */
|
|
701
|
+
putRecords(body: T.PutRecordsRequest, opts?: RequestOptions): Promise<T.PutRecordsResponse>;
|
|
702
|
+
/** Live record changes — `hello` once, then a `records` event per change. — Gateway 0.11.0+. */
|
|
703
|
+
stream(opts?: RequestOptions): AsyncIterable<SseFrame<T.HistoryStreamEvent>>;
|
|
704
|
+
/** Push flattened (lossy) records into the warm index. — Requires the gateway token. */
|
|
705
|
+
ingest(body: T.IngestRequest, opts?: RequestOptions): Promise<{
|
|
706
|
+
ok: boolean;
|
|
707
|
+
size: number;
|
|
708
|
+
}>;
|
|
709
|
+
}
|
|
710
|
+
/** Durable facts about the user, carried into every turn on every client. */
|
|
711
|
+
export declare class MemoryApi {
|
|
712
|
+
private readonly rt;
|
|
713
|
+
constructor(rt: Runtime);
|
|
714
|
+
/** Every memory. */
|
|
715
|
+
list(opts?: RequestOptions): Promise<T.MemoryList>;
|
|
716
|
+
/** The memories relevant to a text, and a prompt block that carries them. */
|
|
717
|
+
recall(body: T.RecallRequest, opts?: RequestOptions): Promise<T.RecallResponse>;
|
|
718
|
+
/** Save a durable fact. Never anonymous — `source` is recorded. — Requires the gateway token. */
|
|
719
|
+
remember(body: T.RememberRequest, opts?: RequestOptions): Promise<T.RememberResponse>;
|
|
720
|
+
/** Forget memories matching an id or words. — Requires the gateway token. */
|
|
721
|
+
forget(body: {
|
|
722
|
+
query: string;
|
|
723
|
+
}, opts?: RequestOptions): Promise<{
|
|
724
|
+
ok: boolean;
|
|
725
|
+
removed: number;
|
|
726
|
+
size: number;
|
|
727
|
+
}>;
|
|
728
|
+
/** Two-way merge in one round trip — push what you have, receive the full set. — Requires the gateway token. */
|
|
729
|
+
sync(body: {
|
|
730
|
+
upserts?: Array<T.Memory>;
|
|
731
|
+
removes?: Array<string>;
|
|
732
|
+
}, opts?: RequestOptions): Promise<T.MemorySyncResponse>;
|
|
733
|
+
}
|
|
734
|
+
/** The settings every client shares. */
|
|
735
|
+
export declare class PrefsApi {
|
|
736
|
+
private readonly rt;
|
|
737
|
+
constructor(rt: Runtime);
|
|
738
|
+
/** The shared sections, or only their stamps. — Gateway 0.6.77+. */
|
|
739
|
+
get(query?: {
|
|
740
|
+
section?: string;
|
|
741
|
+
stamps?: boolean;
|
|
742
|
+
}, opts?: RequestOptions): Promise<T.Prefs>;
|
|
743
|
+
/** Write sections; per-section last-writer-wins by stamp. — Gateway 0.6.77+. */
|
|
744
|
+
put(body: T.PrefsWrite, opts?: RequestOptions): Promise<T.PrefsWriteResult>;
|
|
745
|
+
/** Remove one section. — Gateway 0.6.77+. */
|
|
746
|
+
delete(query: {
|
|
747
|
+
section: string;
|
|
748
|
+
}, opts?: RequestOptions): Promise<{
|
|
749
|
+
ok: boolean;
|
|
750
|
+
removed: boolean;
|
|
751
|
+
}>;
|
|
752
|
+
/** Live — which sections another client wrote. — Gateway 0.6.77+. */
|
|
753
|
+
events(opts?: RequestOptions): AsyncIterable<SseFrame<T.PrefsEvent>>;
|
|
754
|
+
}
|
|
755
|
+
/** Team runs — the board every client can read. */
|
|
756
|
+
export declare class TeamsApi {
|
|
757
|
+
private readonly rt;
|
|
758
|
+
constructor(rt: Runtime);
|
|
759
|
+
/** The board — recent runs, newest first. — Gateway 0.6.78+. */
|
|
760
|
+
listRuns(query?: {
|
|
761
|
+
limit?: number;
|
|
762
|
+
team?: string;
|
|
763
|
+
}, opts?: RequestOptions): Promise<{
|
|
764
|
+
ok: boolean;
|
|
765
|
+
runs: Array<T.TeamRun>;
|
|
766
|
+
}>;
|
|
767
|
+
/** Open a run record. — Gateway 0.6.78+. */
|
|
768
|
+
createRun(body: T.TeamRunCreate, opts?: RequestOptions): Promise<{
|
|
769
|
+
ok: boolean;
|
|
770
|
+
run: T.TeamRun;
|
|
771
|
+
}>;
|
|
772
|
+
/** One run, optionally with its events. — Gateway 0.6.78+. */
|
|
773
|
+
getRun(runId: string, query?: {
|
|
774
|
+
events?: boolean;
|
|
775
|
+
}, opts?: RequestOptions): Promise<{
|
|
776
|
+
ok: boolean;
|
|
777
|
+
run: T.TeamRun;
|
|
778
|
+
}>;
|
|
779
|
+
/** Remove a run; a live one is stopped first. — Gateway 0.6.110+. */
|
|
780
|
+
deleteRun(runId: string, opts?: RequestOptions): Promise<{
|
|
781
|
+
ok: boolean;
|
|
782
|
+
removed: boolean;
|
|
783
|
+
}>;
|
|
784
|
+
/** Tail a run — the record first, replay from `after`, then live. — Gateway 0.6.78+. */
|
|
785
|
+
runEvents(runId: string, query?: {
|
|
786
|
+
after?: number;
|
|
787
|
+
}, opts?: RequestOptions): AsyncIterable<SseFrame<T.RunEvent>>;
|
|
788
|
+
/** The running client appends events. — Gateway 0.6.78+. */
|
|
789
|
+
appendRunEvents(runId: string, body: {
|
|
790
|
+
events: Array<T.RunEvent>;
|
|
791
|
+
}, opts?: RequestOptions): Promise<{
|
|
792
|
+
ok: boolean;
|
|
793
|
+
run: T.TeamRun;
|
|
794
|
+
}>;
|
|
795
|
+
/** Ask the running client to stop. — Gateway 0.6.78+. */
|
|
796
|
+
stopRun(runId: string, opts?: RequestOptions): Promise<{
|
|
797
|
+
ok: boolean;
|
|
798
|
+
run: T.TeamRun;
|
|
799
|
+
}>;
|
|
800
|
+
/** A person answers an ask on the board. — Gateway 0.6.81+. */
|
|
801
|
+
answer(runId: string, body: {
|
|
802
|
+
threadId: string;
|
|
803
|
+
text: string;
|
|
804
|
+
by?: string;
|
|
805
|
+
}, opts?: RequestOptions): Promise<{
|
|
806
|
+
ok: boolean;
|
|
807
|
+
run: T.TeamRun;
|
|
808
|
+
}>;
|
|
809
|
+
/** Approve or reject a post. — Gateway 0.6.81+. */
|
|
810
|
+
decide(runId: string, body: {
|
|
811
|
+
postId: string;
|
|
812
|
+
status: "approved" | "rejected";
|
|
813
|
+
by?: string;
|
|
814
|
+
}, opts?: RequestOptions): Promise<{
|
|
815
|
+
ok: boolean;
|
|
816
|
+
run: T.TeamRun;
|
|
817
|
+
}>;
|
|
818
|
+
/** Post a note to a thread. — Gateway 0.6.81+. */
|
|
819
|
+
post(runId: string, body: {
|
|
820
|
+
threadId: string;
|
|
821
|
+
text: string;
|
|
822
|
+
kind?: string;
|
|
823
|
+
replyTo?: string;
|
|
824
|
+
by?: string;
|
|
825
|
+
}, opts?: RequestOptions): Promise<{
|
|
826
|
+
ok: boolean;
|
|
827
|
+
run: T.TeamRun;
|
|
828
|
+
}>;
|
|
829
|
+
/** A person removes a thread from the board. — Gateway 0.6.106+. */
|
|
830
|
+
removeThread(runId: string, threadId: string, opts?: RequestOptions): Promise<{
|
|
831
|
+
ok: boolean;
|
|
832
|
+
run: T.TeamRun;
|
|
833
|
+
}>;
|
|
834
|
+
/** Continue a task on another model. — Gateway 0.6.85+. */
|
|
835
|
+
handoff(runId: string, body: {
|
|
836
|
+
taskId: string;
|
|
837
|
+
model: string;
|
|
838
|
+
by?: string;
|
|
839
|
+
reason?: string;
|
|
840
|
+
}, opts?: RequestOptions): Promise<{
|
|
841
|
+
ok: boolean;
|
|
842
|
+
run: T.TeamRun;
|
|
843
|
+
}>;
|
|
844
|
+
/** What a client needs to resume a run whose client went away. — Gateway 0.6.85+. */
|
|
845
|
+
checkpoint(runId: string, opts?: RequestOptions): Promise<{
|
|
846
|
+
ok: boolean;
|
|
847
|
+
checkpoint: T.AnyObject;
|
|
848
|
+
}>;
|
|
849
|
+
/** A client takes a stopped or stale run over. — Gateway 0.6.85+. */
|
|
850
|
+
claim(runId: string, body: {
|
|
851
|
+
client: string;
|
|
852
|
+
}, opts?: RequestOptions): Promise<{
|
|
853
|
+
ok: boolean;
|
|
854
|
+
run: T.TeamRun;
|
|
855
|
+
}>;
|
|
856
|
+
}
|
|
857
|
+
/** The project record — the page a goal starts on and everything done for it. */
|
|
858
|
+
export declare class ProjectsApi {
|
|
859
|
+
private readonly rt;
|
|
860
|
+
constructor(rt: Runtime);
|
|
861
|
+
/** Projects, newest activity first, jobs counted. — Gateway 0.6.90+. */
|
|
862
|
+
list(query?: {
|
|
863
|
+
limit?: number;
|
|
864
|
+
status?: string;
|
|
865
|
+
}, opts?: RequestOptions): Promise<{
|
|
866
|
+
ok: boolean;
|
|
867
|
+
projects: Array<T.Project>;
|
|
868
|
+
}>;
|
|
869
|
+
/** Open a record (idempotent) or update the page. — Gateway 0.6.90+. */
|
|
870
|
+
create(body: {
|
|
871
|
+
id?: string;
|
|
872
|
+
project?: T.AnyObject;
|
|
873
|
+
by?: string;
|
|
874
|
+
}, opts?: RequestOptions): Promise<{
|
|
875
|
+
ok: boolean;
|
|
876
|
+
project: T.Project;
|
|
877
|
+
}>;
|
|
878
|
+
/** Every open posting across projects. — Gateway 0.6.90+. */
|
|
879
|
+
jobBoard(opts?: RequestOptions): Promise<{
|
|
880
|
+
ok: boolean;
|
|
881
|
+
jobs: Array<T.AnyObject>;
|
|
882
|
+
}>;
|
|
883
|
+
/** The record — jobs, runs, spend, decisions, report. — Gateway 0.6.90+. */
|
|
884
|
+
get(projectId: string, query?: {
|
|
885
|
+
events?: boolean;
|
|
886
|
+
}, opts?: RequestOptions): Promise<{
|
|
887
|
+
ok: boolean;
|
|
888
|
+
project: T.Project;
|
|
889
|
+
}>;
|
|
890
|
+
/** Remove a project record. — Gateway 0.6.90+. */
|
|
891
|
+
delete(projectId: string, opts?: RequestOptions): Promise<{
|
|
892
|
+
ok: boolean;
|
|
893
|
+
removed: boolean;
|
|
894
|
+
}>;
|
|
895
|
+
/** Tail a project — hello, replay, then live. — Gateway 0.6.90+. */
|
|
896
|
+
events(projectId: string, query?: {
|
|
897
|
+
after?: number;
|
|
898
|
+
}, opts?: RequestOptions): AsyncIterable<SseFrame<T.RunEvent>>;
|
|
899
|
+
/** The executive loop appends (status, run.linked, run.spent, decision, report). — Gateway 0.6.90+. */
|
|
900
|
+
appendEvents(projectId: string, body: {
|
|
901
|
+
events: Array<T.RunEvent>;
|
|
902
|
+
}, opts?: RequestOptions): Promise<{
|
|
903
|
+
ok: boolean;
|
|
904
|
+
project: T.Project;
|
|
905
|
+
}>;
|
|
906
|
+
/** Post a job. — Gateway 0.6.90+. */
|
|
907
|
+
postJob(projectId: string, body: {
|
|
908
|
+
job: T.AnyObject;
|
|
909
|
+
by?: string;
|
|
910
|
+
}, opts?: RequestOptions): Promise<{
|
|
911
|
+
ok: boolean;
|
|
912
|
+
project: T.Project;
|
|
913
|
+
}>;
|
|
914
|
+
/** Move a job along its state machine. — Gateway 0.6.90+. */
|
|
915
|
+
patchJob(projectId: string, jobId: string, body: {
|
|
916
|
+
patch: T.AnyObject;
|
|
917
|
+
by?: string;
|
|
918
|
+
}, opts?: RequestOptions): Promise<{
|
|
919
|
+
ok: boolean;
|
|
920
|
+
project: T.Project;
|
|
921
|
+
}>;
|
|
922
|
+
/** The pool applies at once; `prompt` is the evaluator's, for a structured call. — Gateway 0.6.90+. */
|
|
923
|
+
applications(projectId: string, jobId: string, query?: {
|
|
924
|
+
reach?: string;
|
|
925
|
+
chatModel?: string;
|
|
926
|
+
}, opts?: RequestOptions): Promise<T.AnyObject>;
|
|
927
|
+
/** One pass — fit recomputed, the evaluation read through the schema, the pick landed as events. — Gateway 0.6.90+. */
|
|
928
|
+
recruit(projectId: string, jobId: string, body: {
|
|
929
|
+
by?: string;
|
|
930
|
+
reach?: string;
|
|
931
|
+
chatModel?: string;
|
|
932
|
+
evaluation?: T.AnyObject;
|
|
933
|
+
text?: string;
|
|
934
|
+
}, opts?: RequestOptions): Promise<T.AnyObject>;
|
|
935
|
+
}
|
|
936
|
+
/** Attested per-agent scorecards. */
|
|
937
|
+
export declare class AgentsApi {
|
|
938
|
+
private readonly rt;
|
|
939
|
+
constructor(rt: Runtime);
|
|
940
|
+
/** Every agent's scorecard. — Gateway 0.6.87+. */
|
|
941
|
+
scorecards(opts?: RequestOptions): Promise<{
|
|
942
|
+
ok: boolean;
|
|
943
|
+
agents: Array<T.AnyObject>;
|
|
944
|
+
}>;
|
|
945
|
+
/** One agent's attested scorecard. — Gateway 0.6.87+. */
|
|
946
|
+
scorecard(agentId: string, opts?: RequestOptions): Promise<T.AnyObject>;
|
|
947
|
+
/** A person rates the agent's work on a run, task or job. — Gateway 0.6.87+. */
|
|
948
|
+
rate(agentId: string, body: {
|
|
949
|
+
score: number;
|
|
950
|
+
note?: string;
|
|
951
|
+
about?: string;
|
|
952
|
+
by?: string;
|
|
953
|
+
runId?: string;
|
|
954
|
+
taskId?: string;
|
|
955
|
+
jobId?: string;
|
|
956
|
+
refs?: T.AnyObject;
|
|
957
|
+
}, opts?: RequestOptions): Promise<T.AnyObject>;
|
|
958
|
+
}
|
|
959
|
+
/** The model ledger — every engine's card. */
|
|
960
|
+
export declare class EnginesApi {
|
|
961
|
+
private readonly rt;
|
|
962
|
+
constructor(rt: Runtime);
|
|
963
|
+
/** Every engine's card. — Gateway 0.6.89+. */
|
|
964
|
+
list(query?: {
|
|
965
|
+
minCalls?: number;
|
|
966
|
+
}, opts?: RequestOptions): Promise<{
|
|
967
|
+
ok: boolean;
|
|
968
|
+
engines: Array<T.AnyObject>;
|
|
969
|
+
}>;
|
|
970
|
+
/** One engine's card, optionally with entries. — Gateway 0.6.89+. */
|
|
971
|
+
card(engineKey: string, query?: {
|
|
972
|
+
entries?: boolean;
|
|
973
|
+
minCalls?: number;
|
|
974
|
+
}, opts?: RequestOptions): Promise<T.AnyObject>;
|
|
975
|
+
/** Append a ledger entry for an engine. — Gateway 0.6.89+. */
|
|
976
|
+
appendEntry(engineKey: string, body: T.AnyObject, opts?: RequestOptions): Promise<T.AnyObject>;
|
|
977
|
+
}
|
|
978
|
+
/** The skills on this machine (served through the bridge). */
|
|
979
|
+
export declare class SkillsApi {
|
|
980
|
+
private readonly rt;
|
|
981
|
+
constructor(rt: Runtime);
|
|
982
|
+
/** The skills on this machine — with a prompt character count, not the prompt. — Gateway 0.6.64+. */
|
|
983
|
+
list(query?: {
|
|
984
|
+
workdir?: string;
|
|
985
|
+
}, opts?: RequestOptions): Promise<{
|
|
986
|
+
skills: Array<T.Skill>;
|
|
987
|
+
}>;
|
|
988
|
+
/** One skill, with its prompt. — Gateway 0.6.67+. */
|
|
989
|
+
get(skillId: string, query?: {
|
|
990
|
+
workdir?: string;
|
|
991
|
+
}, opts?: RequestOptions): Promise<{
|
|
992
|
+
skill: T.Skill | null;
|
|
993
|
+
}>;
|
|
994
|
+
}
|
|
995
|
+
/** The namespaces a client exposes, built on one runtime. */
|
|
996
|
+
export declare function buildApi(rt: Runtime): {
|
|
997
|
+
gateway: GatewayApi;
|
|
998
|
+
models: ModelsApi;
|
|
999
|
+
chat: ChatApi;
|
|
1000
|
+
redaction: RedactionApi;
|
|
1001
|
+
history: HistoryApi;
|
|
1002
|
+
memory: MemoryApi;
|
|
1003
|
+
prefs: PrefsApi;
|
|
1004
|
+
teams: TeamsApi;
|
|
1005
|
+
projects: ProjectsApi;
|
|
1006
|
+
agents: AgentsApi;
|
|
1007
|
+
engines: EnginesApi;
|
|
1008
|
+
skills: SkillsApi;
|
|
1009
|
+
};
|