otterly 0.1.0 → 0.3.1

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.
@@ -5,7 +5,7 @@ import { AgentError } from "../errors.js";
5
5
  import { apiSessions } from "./session-store.js";
6
6
  import { errorToHttpStatus } from "./openai-compat.js";
7
7
  import { logError } from "./logger.js";
8
- const PKG_VERSION = "0.1.0";
8
+ const PKG_VERSION = "0.3.1";
9
9
  /**
10
10
  * GET /api/status — health check with queue and circuit breaker stats
11
11
  */
@@ -0,0 +1,503 @@
1
+ export declare const openApiSpec: {
2
+ openapi: string;
3
+ info: {
4
+ title: string;
5
+ version: string;
6
+ description: string;
7
+ };
8
+ paths: {
9
+ "/api/status": {
10
+ get: {
11
+ summary: string;
12
+ operationId: string;
13
+ responses: {
14
+ "200": {
15
+ description: string;
16
+ content: {
17
+ "application/json": {
18
+ schema: {
19
+ type: string;
20
+ properties: {
21
+ status: {
22
+ type: string;
23
+ example: string;
24
+ };
25
+ version: {
26
+ type: string;
27
+ example: string;
28
+ };
29
+ activeSessions: {
30
+ type: string;
31
+ };
32
+ queue: {
33
+ type: string;
34
+ properties: {
35
+ active: {
36
+ type: string;
37
+ };
38
+ queued: {
39
+ type: string;
40
+ };
41
+ maxConcurrent: {
42
+ type: string;
43
+ };
44
+ maxQueueSize: {
45
+ type: string;
46
+ };
47
+ };
48
+ };
49
+ circuitBreaker: {
50
+ type: string;
51
+ enum: string[];
52
+ };
53
+ };
54
+ required: string[];
55
+ };
56
+ };
57
+ };
58
+ };
59
+ };
60
+ };
61
+ };
62
+ "/swagger.json": {
63
+ get: {
64
+ summary: string;
65
+ operationId: string;
66
+ responses: {
67
+ "200": {
68
+ description: string;
69
+ content: {
70
+ "application/json": {
71
+ schema: {
72
+ type: string;
73
+ };
74
+ };
75
+ };
76
+ };
77
+ };
78
+ };
79
+ };
80
+ "/": {
81
+ get: {
82
+ summary: string;
83
+ operationId: string;
84
+ responses: {
85
+ "200": {
86
+ description: string;
87
+ content: {
88
+ "application/json": {
89
+ schema: {
90
+ type: string;
91
+ properties: {
92
+ name: {
93
+ type: string;
94
+ example: string;
95
+ };
96
+ version: {
97
+ type: string;
98
+ example: string;
99
+ };
100
+ playground: {
101
+ type: string;
102
+ example: string;
103
+ };
104
+ };
105
+ required: string[];
106
+ };
107
+ };
108
+ };
109
+ };
110
+ };
111
+ };
112
+ };
113
+ "/playground": {
114
+ get: {
115
+ summary: string;
116
+ operationId: string;
117
+ responses: {
118
+ "200": {
119
+ description: string;
120
+ content: {
121
+ "text/html": {
122
+ schema: {
123
+ type: string;
124
+ };
125
+ };
126
+ };
127
+ };
128
+ };
129
+ };
130
+ };
131
+ "/v1/chat/completions": {
132
+ post: {
133
+ summary: string;
134
+ operationId: string;
135
+ security: {
136
+ BearerAuth: never[];
137
+ }[];
138
+ parameters: {
139
+ name: string;
140
+ in: string;
141
+ schema: {
142
+ type: string;
143
+ };
144
+ description: string;
145
+ }[];
146
+ requestBody: {
147
+ required: boolean;
148
+ content: {
149
+ "application/json": {
150
+ schema: {
151
+ type: string;
152
+ required: string[];
153
+ properties: {
154
+ messages: {
155
+ type: string;
156
+ items: {
157
+ type: string;
158
+ required: string[];
159
+ properties: {
160
+ role: {
161
+ type: string;
162
+ enum: string[];
163
+ };
164
+ content: {
165
+ type: string;
166
+ };
167
+ };
168
+ };
169
+ };
170
+ model: {
171
+ type: string;
172
+ default: string;
173
+ };
174
+ stream: {
175
+ type: string;
176
+ default: boolean;
177
+ description: string;
178
+ };
179
+ tools: {
180
+ type: string;
181
+ items: {
182
+ type: string;
183
+ };
184
+ description: string;
185
+ };
186
+ response_format: {
187
+ type: string;
188
+ properties: {
189
+ type: {
190
+ type: string;
191
+ enum: string[];
192
+ };
193
+ };
194
+ };
195
+ };
196
+ };
197
+ };
198
+ };
199
+ };
200
+ responses: {
201
+ "200": {
202
+ description: string;
203
+ content: {
204
+ "application/json": {
205
+ schema: {
206
+ $ref: string;
207
+ };
208
+ };
209
+ "text/event-stream": {
210
+ schema: {
211
+ type: string;
212
+ description: string;
213
+ };
214
+ };
215
+ };
216
+ };
217
+ "400": {
218
+ description: string;
219
+ };
220
+ "401": {
221
+ description: string;
222
+ };
223
+ "429": {
224
+ description: string;
225
+ };
226
+ "503": {
227
+ description: string;
228
+ };
229
+ };
230
+ };
231
+ };
232
+ "/api/run": {
233
+ post: {
234
+ summary: string;
235
+ operationId: string;
236
+ security: {
237
+ BearerAuth: never[];
238
+ }[];
239
+ parameters: {
240
+ name: string;
241
+ in: string;
242
+ schema: {
243
+ type: string;
244
+ };
245
+ description: string;
246
+ }[];
247
+ requestBody: {
248
+ required: boolean;
249
+ content: {
250
+ "application/json": {
251
+ schema: {
252
+ type: string;
253
+ required: string[];
254
+ properties: {
255
+ prompt: {
256
+ type: string;
257
+ };
258
+ session_id: {
259
+ type: string;
260
+ };
261
+ options: {
262
+ type: string;
263
+ properties: {
264
+ cwd: {
265
+ type: string;
266
+ };
267
+ permissionMode: {
268
+ type: string;
269
+ };
270
+ systemPrompt: {
271
+ type: string;
272
+ };
273
+ resume: {
274
+ type: string;
275
+ };
276
+ model: {
277
+ type: string;
278
+ };
279
+ maxTurns: {
280
+ type: string;
281
+ };
282
+ };
283
+ };
284
+ };
285
+ };
286
+ };
287
+ };
288
+ };
289
+ responses: {
290
+ "200": {
291
+ description: string;
292
+ content: {
293
+ "application/json": {
294
+ schema: {
295
+ $ref: string;
296
+ };
297
+ };
298
+ };
299
+ };
300
+ "400": {
301
+ description: string;
302
+ };
303
+ "401": {
304
+ description: string;
305
+ };
306
+ "429": {
307
+ description: string;
308
+ };
309
+ "503": {
310
+ description: string;
311
+ };
312
+ };
313
+ };
314
+ };
315
+ "/api/stream": {
316
+ post: {
317
+ summary: string;
318
+ operationId: string;
319
+ security: {
320
+ BearerAuth: never[];
321
+ }[];
322
+ parameters: {
323
+ name: string;
324
+ in: string;
325
+ schema: {
326
+ type: string;
327
+ };
328
+ description: string;
329
+ }[];
330
+ requestBody: {
331
+ required: boolean;
332
+ content: {
333
+ "application/json": {
334
+ schema: {
335
+ type: string;
336
+ required: string[];
337
+ properties: {
338
+ prompt: {
339
+ type: string;
340
+ };
341
+ session_id: {
342
+ type: string;
343
+ };
344
+ options: {
345
+ type: string;
346
+ properties: {
347
+ cwd: {
348
+ type: string;
349
+ };
350
+ permissionMode: {
351
+ type: string;
352
+ };
353
+ systemPrompt: {
354
+ type: string;
355
+ };
356
+ resume: {
357
+ type: string;
358
+ };
359
+ model: {
360
+ type: string;
361
+ };
362
+ };
363
+ };
364
+ };
365
+ };
366
+ };
367
+ };
368
+ };
369
+ responses: {
370
+ "200": {
371
+ description: string;
372
+ content: {
373
+ "application/x-ndjson": {
374
+ schema: {
375
+ $ref: string;
376
+ };
377
+ };
378
+ };
379
+ };
380
+ "400": {
381
+ description: string;
382
+ };
383
+ "401": {
384
+ description: string;
385
+ };
386
+ "429": {
387
+ description: string;
388
+ };
389
+ "503": {
390
+ description: string;
391
+ };
392
+ };
393
+ };
394
+ };
395
+ };
396
+ components: {
397
+ securitySchemes: {
398
+ BearerAuth: {
399
+ type: string;
400
+ scheme: string;
401
+ description: string;
402
+ };
403
+ };
404
+ schemas: {
405
+ ChatCompletionResponse: {
406
+ type: string;
407
+ properties: {
408
+ id: {
409
+ type: string;
410
+ };
411
+ object: {
412
+ type: string;
413
+ example: string;
414
+ };
415
+ created: {
416
+ type: string;
417
+ };
418
+ model: {
419
+ type: string;
420
+ };
421
+ choices: {
422
+ type: string;
423
+ items: {
424
+ type: string;
425
+ properties: {
426
+ index: {
427
+ type: string;
428
+ };
429
+ message: {
430
+ type: string;
431
+ properties: {
432
+ role: {
433
+ type: string;
434
+ };
435
+ content: {
436
+ type: string;
437
+ };
438
+ };
439
+ };
440
+ finish_reason: {
441
+ type: string;
442
+ };
443
+ };
444
+ };
445
+ };
446
+ usage: {
447
+ type: string;
448
+ properties: {
449
+ prompt_tokens: {
450
+ type: string;
451
+ };
452
+ completion_tokens: {
453
+ type: string;
454
+ };
455
+ total_tokens: {
456
+ type: string;
457
+ };
458
+ };
459
+ };
460
+ };
461
+ };
462
+ NativeRunResponse: {
463
+ type: string;
464
+ properties: {
465
+ text: {
466
+ type: string;
467
+ };
468
+ sessionId: {
469
+ type: string;
470
+ };
471
+ cost: {
472
+ type: string;
473
+ };
474
+ duration: {
475
+ type: string;
476
+ };
477
+ usage: {
478
+ type: string;
479
+ properties: {
480
+ inputTokens: {
481
+ type: string;
482
+ };
483
+ outputTokens: {
484
+ type: string;
485
+ };
486
+ };
487
+ };
488
+ };
489
+ };
490
+ StreamEvent: {
491
+ type: string;
492
+ description: string;
493
+ properties: {
494
+ type: {
495
+ type: string;
496
+ enum: string[];
497
+ };
498
+ };
499
+ required: string[];
500
+ };
501
+ };
502
+ };
503
+ };