@hydra-acp/cli 0.1.3 → 0.1.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/README.md +27 -3
- package/dist/cli.js +1788 -428
- package/dist/index.d.ts +608 -38
- package/dist/index.js +1211 -234
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -72,6 +72,7 @@ declare const HydraConfig: z.ZodObject<{
|
|
|
72
72
|
ttlHours?: number | undefined;
|
|
73
73
|
}>>;
|
|
74
74
|
defaultAgent: z.ZodDefault<z.ZodString>;
|
|
75
|
+
defaultModels: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
75
76
|
defaultCwd: z.ZodDefault<z.ZodString>;
|
|
76
77
|
sessionListColdLimit: z.ZodDefault<z.ZodNumber>;
|
|
77
78
|
extensions: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
@@ -127,6 +128,7 @@ declare const HydraConfig: z.ZodObject<{
|
|
|
127
128
|
ttlHours: number;
|
|
128
129
|
};
|
|
129
130
|
defaultAgent: string;
|
|
131
|
+
defaultModels: Record<string, string>;
|
|
130
132
|
defaultCwd: string;
|
|
131
133
|
sessionListColdLimit: number;
|
|
132
134
|
}, {
|
|
@@ -156,6 +158,7 @@ declare const HydraConfig: z.ZodObject<{
|
|
|
156
158
|
ttlHours?: number | undefined;
|
|
157
159
|
} | undefined;
|
|
158
160
|
defaultAgent?: string | undefined;
|
|
161
|
+
defaultModels?: Record<string, string> | undefined;
|
|
159
162
|
defaultCwd?: string | undefined;
|
|
160
163
|
sessionListColdLimit?: number | undefined;
|
|
161
164
|
}>;
|
|
@@ -194,110 +197,170 @@ declare const RegistryAgent: z.ZodObject<{
|
|
|
194
197
|
"darwin-aarch64": z.ZodOptional<z.ZodObject<{
|
|
195
198
|
archive: z.ZodOptional<z.ZodString>;
|
|
196
199
|
cmd: z.ZodOptional<z.ZodString>;
|
|
200
|
+
args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
201
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
197
202
|
}, "strip", z.ZodTypeAny, {
|
|
203
|
+
args?: string[] | undefined;
|
|
204
|
+
env?: Record<string, string> | undefined;
|
|
198
205
|
archive?: string | undefined;
|
|
199
206
|
cmd?: string | undefined;
|
|
200
207
|
}, {
|
|
208
|
+
args?: string[] | undefined;
|
|
209
|
+
env?: Record<string, string> | undefined;
|
|
201
210
|
archive?: string | undefined;
|
|
202
211
|
cmd?: string | undefined;
|
|
203
212
|
}>>;
|
|
204
213
|
"darwin-x86_64": z.ZodOptional<z.ZodObject<{
|
|
205
214
|
archive: z.ZodOptional<z.ZodString>;
|
|
206
215
|
cmd: z.ZodOptional<z.ZodString>;
|
|
216
|
+
args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
217
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
207
218
|
}, "strip", z.ZodTypeAny, {
|
|
219
|
+
args?: string[] | undefined;
|
|
220
|
+
env?: Record<string, string> | undefined;
|
|
208
221
|
archive?: string | undefined;
|
|
209
222
|
cmd?: string | undefined;
|
|
210
223
|
}, {
|
|
224
|
+
args?: string[] | undefined;
|
|
225
|
+
env?: Record<string, string> | undefined;
|
|
211
226
|
archive?: string | undefined;
|
|
212
227
|
cmd?: string | undefined;
|
|
213
228
|
}>>;
|
|
214
229
|
"linux-aarch64": z.ZodOptional<z.ZodObject<{
|
|
215
230
|
archive: z.ZodOptional<z.ZodString>;
|
|
216
231
|
cmd: z.ZodOptional<z.ZodString>;
|
|
232
|
+
args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
233
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
217
234
|
}, "strip", z.ZodTypeAny, {
|
|
235
|
+
args?: string[] | undefined;
|
|
236
|
+
env?: Record<string, string> | undefined;
|
|
218
237
|
archive?: string | undefined;
|
|
219
238
|
cmd?: string | undefined;
|
|
220
239
|
}, {
|
|
240
|
+
args?: string[] | undefined;
|
|
241
|
+
env?: Record<string, string> | undefined;
|
|
221
242
|
archive?: string | undefined;
|
|
222
243
|
cmd?: string | undefined;
|
|
223
244
|
}>>;
|
|
224
245
|
"linux-x86_64": z.ZodOptional<z.ZodObject<{
|
|
225
246
|
archive: z.ZodOptional<z.ZodString>;
|
|
226
247
|
cmd: z.ZodOptional<z.ZodString>;
|
|
248
|
+
args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
249
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
227
250
|
}, "strip", z.ZodTypeAny, {
|
|
251
|
+
args?: string[] | undefined;
|
|
252
|
+
env?: Record<string, string> | undefined;
|
|
228
253
|
archive?: string | undefined;
|
|
229
254
|
cmd?: string | undefined;
|
|
230
255
|
}, {
|
|
256
|
+
args?: string[] | undefined;
|
|
257
|
+
env?: Record<string, string> | undefined;
|
|
231
258
|
archive?: string | undefined;
|
|
232
259
|
cmd?: string | undefined;
|
|
233
260
|
}>>;
|
|
234
261
|
"windows-x86_64": z.ZodOptional<z.ZodObject<{
|
|
235
262
|
archive: z.ZodOptional<z.ZodString>;
|
|
236
263
|
cmd: z.ZodOptional<z.ZodString>;
|
|
264
|
+
args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
265
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
237
266
|
}, "strip", z.ZodTypeAny, {
|
|
267
|
+
args?: string[] | undefined;
|
|
268
|
+
env?: Record<string, string> | undefined;
|
|
238
269
|
archive?: string | undefined;
|
|
239
270
|
cmd?: string | undefined;
|
|
240
271
|
}, {
|
|
272
|
+
args?: string[] | undefined;
|
|
273
|
+
env?: Record<string, string> | undefined;
|
|
241
274
|
archive?: string | undefined;
|
|
242
275
|
cmd?: string | undefined;
|
|
243
276
|
}>>;
|
|
244
277
|
"windows-aarch64": z.ZodOptional<z.ZodObject<{
|
|
245
278
|
archive: z.ZodOptional<z.ZodString>;
|
|
246
279
|
cmd: z.ZodOptional<z.ZodString>;
|
|
280
|
+
args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
281
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
247
282
|
}, "strip", z.ZodTypeAny, {
|
|
283
|
+
args?: string[] | undefined;
|
|
284
|
+
env?: Record<string, string> | undefined;
|
|
248
285
|
archive?: string | undefined;
|
|
249
286
|
cmd?: string | undefined;
|
|
250
287
|
}, {
|
|
288
|
+
args?: string[] | undefined;
|
|
289
|
+
env?: Record<string, string> | undefined;
|
|
251
290
|
archive?: string | undefined;
|
|
252
291
|
cmd?: string | undefined;
|
|
253
292
|
}>>;
|
|
254
293
|
}, "strip", z.ZodTypeAny, {
|
|
255
294
|
"darwin-aarch64"?: {
|
|
295
|
+
args?: string[] | undefined;
|
|
296
|
+
env?: Record<string, string> | undefined;
|
|
256
297
|
archive?: string | undefined;
|
|
257
298
|
cmd?: string | undefined;
|
|
258
299
|
} | undefined;
|
|
259
300
|
"darwin-x86_64"?: {
|
|
301
|
+
args?: string[] | undefined;
|
|
302
|
+
env?: Record<string, string> | undefined;
|
|
260
303
|
archive?: string | undefined;
|
|
261
304
|
cmd?: string | undefined;
|
|
262
305
|
} | undefined;
|
|
263
306
|
"linux-aarch64"?: {
|
|
307
|
+
args?: string[] | undefined;
|
|
308
|
+
env?: Record<string, string> | undefined;
|
|
264
309
|
archive?: string | undefined;
|
|
265
310
|
cmd?: string | undefined;
|
|
266
311
|
} | undefined;
|
|
267
312
|
"linux-x86_64"?: {
|
|
313
|
+
args?: string[] | undefined;
|
|
314
|
+
env?: Record<string, string> | undefined;
|
|
268
315
|
archive?: string | undefined;
|
|
269
316
|
cmd?: string | undefined;
|
|
270
317
|
} | undefined;
|
|
271
|
-
"windows-
|
|
318
|
+
"windows-aarch64"?: {
|
|
319
|
+
args?: string[] | undefined;
|
|
320
|
+
env?: Record<string, string> | undefined;
|
|
272
321
|
archive?: string | undefined;
|
|
273
322
|
cmd?: string | undefined;
|
|
274
323
|
} | undefined;
|
|
275
|
-
"windows-
|
|
324
|
+
"windows-x86_64"?: {
|
|
325
|
+
args?: string[] | undefined;
|
|
326
|
+
env?: Record<string, string> | undefined;
|
|
276
327
|
archive?: string | undefined;
|
|
277
328
|
cmd?: string | undefined;
|
|
278
329
|
} | undefined;
|
|
279
330
|
}, {
|
|
280
331
|
"darwin-aarch64"?: {
|
|
332
|
+
args?: string[] | undefined;
|
|
333
|
+
env?: Record<string, string> | undefined;
|
|
281
334
|
archive?: string | undefined;
|
|
282
335
|
cmd?: string | undefined;
|
|
283
336
|
} | undefined;
|
|
284
337
|
"darwin-x86_64"?: {
|
|
338
|
+
args?: string[] | undefined;
|
|
339
|
+
env?: Record<string, string> | undefined;
|
|
285
340
|
archive?: string | undefined;
|
|
286
341
|
cmd?: string | undefined;
|
|
287
342
|
} | undefined;
|
|
288
343
|
"linux-aarch64"?: {
|
|
344
|
+
args?: string[] | undefined;
|
|
345
|
+
env?: Record<string, string> | undefined;
|
|
289
346
|
archive?: string | undefined;
|
|
290
347
|
cmd?: string | undefined;
|
|
291
348
|
} | undefined;
|
|
292
349
|
"linux-x86_64"?: {
|
|
350
|
+
args?: string[] | undefined;
|
|
351
|
+
env?: Record<string, string> | undefined;
|
|
293
352
|
archive?: string | undefined;
|
|
294
353
|
cmd?: string | undefined;
|
|
295
354
|
} | undefined;
|
|
296
|
-
"windows-
|
|
355
|
+
"windows-aarch64"?: {
|
|
356
|
+
args?: string[] | undefined;
|
|
357
|
+
env?: Record<string, string> | undefined;
|
|
297
358
|
archive?: string | undefined;
|
|
298
359
|
cmd?: string | undefined;
|
|
299
360
|
} | undefined;
|
|
300
|
-
"windows-
|
|
361
|
+
"windows-x86_64"?: {
|
|
362
|
+
args?: string[] | undefined;
|
|
363
|
+
env?: Record<string, string> | undefined;
|
|
301
364
|
archive?: string | undefined;
|
|
302
365
|
cmd?: string | undefined;
|
|
303
366
|
} | undefined;
|
|
@@ -318,26 +381,38 @@ declare const RegistryAgent: z.ZodObject<{
|
|
|
318
381
|
}, "strip", z.ZodTypeAny, {
|
|
319
382
|
binary?: {
|
|
320
383
|
"darwin-aarch64"?: {
|
|
384
|
+
args?: string[] | undefined;
|
|
385
|
+
env?: Record<string, string> | undefined;
|
|
321
386
|
archive?: string | undefined;
|
|
322
387
|
cmd?: string | undefined;
|
|
323
388
|
} | undefined;
|
|
324
389
|
"darwin-x86_64"?: {
|
|
390
|
+
args?: string[] | undefined;
|
|
391
|
+
env?: Record<string, string> | undefined;
|
|
325
392
|
archive?: string | undefined;
|
|
326
393
|
cmd?: string | undefined;
|
|
327
394
|
} | undefined;
|
|
328
395
|
"linux-aarch64"?: {
|
|
396
|
+
args?: string[] | undefined;
|
|
397
|
+
env?: Record<string, string> | undefined;
|
|
329
398
|
archive?: string | undefined;
|
|
330
399
|
cmd?: string | undefined;
|
|
331
400
|
} | undefined;
|
|
332
401
|
"linux-x86_64"?: {
|
|
402
|
+
args?: string[] | undefined;
|
|
403
|
+
env?: Record<string, string> | undefined;
|
|
333
404
|
archive?: string | undefined;
|
|
334
405
|
cmd?: string | undefined;
|
|
335
406
|
} | undefined;
|
|
336
|
-
"windows-
|
|
407
|
+
"windows-aarch64"?: {
|
|
408
|
+
args?: string[] | undefined;
|
|
409
|
+
env?: Record<string, string> | undefined;
|
|
337
410
|
archive?: string | undefined;
|
|
338
411
|
cmd?: string | undefined;
|
|
339
412
|
} | undefined;
|
|
340
|
-
"windows-
|
|
413
|
+
"windows-x86_64"?: {
|
|
414
|
+
args?: string[] | undefined;
|
|
415
|
+
env?: Record<string, string> | undefined;
|
|
341
416
|
archive?: string | undefined;
|
|
342
417
|
cmd?: string | undefined;
|
|
343
418
|
} | undefined;
|
|
@@ -355,26 +430,38 @@ declare const RegistryAgent: z.ZodObject<{
|
|
|
355
430
|
}, {
|
|
356
431
|
binary?: {
|
|
357
432
|
"darwin-aarch64"?: {
|
|
433
|
+
args?: string[] | undefined;
|
|
434
|
+
env?: Record<string, string> | undefined;
|
|
358
435
|
archive?: string | undefined;
|
|
359
436
|
cmd?: string | undefined;
|
|
360
437
|
} | undefined;
|
|
361
438
|
"darwin-x86_64"?: {
|
|
439
|
+
args?: string[] | undefined;
|
|
440
|
+
env?: Record<string, string> | undefined;
|
|
362
441
|
archive?: string | undefined;
|
|
363
442
|
cmd?: string | undefined;
|
|
364
443
|
} | undefined;
|
|
365
444
|
"linux-aarch64"?: {
|
|
445
|
+
args?: string[] | undefined;
|
|
446
|
+
env?: Record<string, string> | undefined;
|
|
366
447
|
archive?: string | undefined;
|
|
367
448
|
cmd?: string | undefined;
|
|
368
449
|
} | undefined;
|
|
369
450
|
"linux-x86_64"?: {
|
|
451
|
+
args?: string[] | undefined;
|
|
452
|
+
env?: Record<string, string> | undefined;
|
|
370
453
|
archive?: string | undefined;
|
|
371
454
|
cmd?: string | undefined;
|
|
372
455
|
} | undefined;
|
|
373
|
-
"windows-
|
|
456
|
+
"windows-aarch64"?: {
|
|
457
|
+
args?: string[] | undefined;
|
|
458
|
+
env?: Record<string, string> | undefined;
|
|
374
459
|
archive?: string | undefined;
|
|
375
460
|
cmd?: string | undefined;
|
|
376
461
|
} | undefined;
|
|
377
|
-
"windows-
|
|
462
|
+
"windows-x86_64"?: {
|
|
463
|
+
args?: string[] | undefined;
|
|
464
|
+
env?: Record<string, string> | undefined;
|
|
378
465
|
archive?: string | undefined;
|
|
379
466
|
cmd?: string | undefined;
|
|
380
467
|
} | undefined;
|
|
@@ -396,26 +483,38 @@ declare const RegistryAgent: z.ZodObject<{
|
|
|
396
483
|
distribution: {
|
|
397
484
|
binary?: {
|
|
398
485
|
"darwin-aarch64"?: {
|
|
486
|
+
args?: string[] | undefined;
|
|
487
|
+
env?: Record<string, string> | undefined;
|
|
399
488
|
archive?: string | undefined;
|
|
400
489
|
cmd?: string | undefined;
|
|
401
490
|
} | undefined;
|
|
402
491
|
"darwin-x86_64"?: {
|
|
492
|
+
args?: string[] | undefined;
|
|
493
|
+
env?: Record<string, string> | undefined;
|
|
403
494
|
archive?: string | undefined;
|
|
404
495
|
cmd?: string | undefined;
|
|
405
496
|
} | undefined;
|
|
406
497
|
"linux-aarch64"?: {
|
|
498
|
+
args?: string[] | undefined;
|
|
499
|
+
env?: Record<string, string> | undefined;
|
|
407
500
|
archive?: string | undefined;
|
|
408
501
|
cmd?: string | undefined;
|
|
409
502
|
} | undefined;
|
|
410
503
|
"linux-x86_64"?: {
|
|
504
|
+
args?: string[] | undefined;
|
|
505
|
+
env?: Record<string, string> | undefined;
|
|
411
506
|
archive?: string | undefined;
|
|
412
507
|
cmd?: string | undefined;
|
|
413
508
|
} | undefined;
|
|
414
|
-
"windows-
|
|
509
|
+
"windows-aarch64"?: {
|
|
510
|
+
args?: string[] | undefined;
|
|
511
|
+
env?: Record<string, string> | undefined;
|
|
415
512
|
archive?: string | undefined;
|
|
416
513
|
cmd?: string | undefined;
|
|
417
514
|
} | undefined;
|
|
418
|
-
"windows-
|
|
515
|
+
"windows-x86_64"?: {
|
|
516
|
+
args?: string[] | undefined;
|
|
517
|
+
env?: Record<string, string> | undefined;
|
|
419
518
|
archive?: string | undefined;
|
|
420
519
|
cmd?: string | undefined;
|
|
421
520
|
} | undefined;
|
|
@@ -444,26 +543,38 @@ declare const RegistryAgent: z.ZodObject<{
|
|
|
444
543
|
distribution: {
|
|
445
544
|
binary?: {
|
|
446
545
|
"darwin-aarch64"?: {
|
|
546
|
+
args?: string[] | undefined;
|
|
547
|
+
env?: Record<string, string> | undefined;
|
|
447
548
|
archive?: string | undefined;
|
|
448
549
|
cmd?: string | undefined;
|
|
449
550
|
} | undefined;
|
|
450
551
|
"darwin-x86_64"?: {
|
|
552
|
+
args?: string[] | undefined;
|
|
553
|
+
env?: Record<string, string> | undefined;
|
|
451
554
|
archive?: string | undefined;
|
|
452
555
|
cmd?: string | undefined;
|
|
453
556
|
} | undefined;
|
|
454
557
|
"linux-aarch64"?: {
|
|
558
|
+
args?: string[] | undefined;
|
|
559
|
+
env?: Record<string, string> | undefined;
|
|
455
560
|
archive?: string | undefined;
|
|
456
561
|
cmd?: string | undefined;
|
|
457
562
|
} | undefined;
|
|
458
563
|
"linux-x86_64"?: {
|
|
564
|
+
args?: string[] | undefined;
|
|
565
|
+
env?: Record<string, string> | undefined;
|
|
459
566
|
archive?: string | undefined;
|
|
460
567
|
cmd?: string | undefined;
|
|
461
568
|
} | undefined;
|
|
462
|
-
"windows-
|
|
569
|
+
"windows-aarch64"?: {
|
|
570
|
+
args?: string[] | undefined;
|
|
571
|
+
env?: Record<string, string> | undefined;
|
|
463
572
|
archive?: string | undefined;
|
|
464
573
|
cmd?: string | undefined;
|
|
465
574
|
} | undefined;
|
|
466
|
-
"windows-
|
|
575
|
+
"windows-x86_64"?: {
|
|
576
|
+
args?: string[] | undefined;
|
|
577
|
+
env?: Record<string, string> | undefined;
|
|
467
578
|
archive?: string | undefined;
|
|
468
579
|
cmd?: string | undefined;
|
|
469
580
|
} | undefined;
|
|
@@ -518,110 +629,170 @@ declare const RegistryDocument: z.ZodObject<{
|
|
|
518
629
|
"darwin-aarch64": z.ZodOptional<z.ZodObject<{
|
|
519
630
|
archive: z.ZodOptional<z.ZodString>;
|
|
520
631
|
cmd: z.ZodOptional<z.ZodString>;
|
|
632
|
+
args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
633
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
521
634
|
}, "strip", z.ZodTypeAny, {
|
|
635
|
+
args?: string[] | undefined;
|
|
636
|
+
env?: Record<string, string> | undefined;
|
|
522
637
|
archive?: string | undefined;
|
|
523
638
|
cmd?: string | undefined;
|
|
524
639
|
}, {
|
|
640
|
+
args?: string[] | undefined;
|
|
641
|
+
env?: Record<string, string> | undefined;
|
|
525
642
|
archive?: string | undefined;
|
|
526
643
|
cmd?: string | undefined;
|
|
527
644
|
}>>;
|
|
528
645
|
"darwin-x86_64": z.ZodOptional<z.ZodObject<{
|
|
529
646
|
archive: z.ZodOptional<z.ZodString>;
|
|
530
647
|
cmd: z.ZodOptional<z.ZodString>;
|
|
648
|
+
args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
649
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
531
650
|
}, "strip", z.ZodTypeAny, {
|
|
651
|
+
args?: string[] | undefined;
|
|
652
|
+
env?: Record<string, string> | undefined;
|
|
532
653
|
archive?: string | undefined;
|
|
533
654
|
cmd?: string | undefined;
|
|
534
655
|
}, {
|
|
656
|
+
args?: string[] | undefined;
|
|
657
|
+
env?: Record<string, string> | undefined;
|
|
535
658
|
archive?: string | undefined;
|
|
536
659
|
cmd?: string | undefined;
|
|
537
660
|
}>>;
|
|
538
661
|
"linux-aarch64": z.ZodOptional<z.ZodObject<{
|
|
539
662
|
archive: z.ZodOptional<z.ZodString>;
|
|
540
663
|
cmd: z.ZodOptional<z.ZodString>;
|
|
664
|
+
args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
665
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
541
666
|
}, "strip", z.ZodTypeAny, {
|
|
667
|
+
args?: string[] | undefined;
|
|
668
|
+
env?: Record<string, string> | undefined;
|
|
542
669
|
archive?: string | undefined;
|
|
543
670
|
cmd?: string | undefined;
|
|
544
671
|
}, {
|
|
672
|
+
args?: string[] | undefined;
|
|
673
|
+
env?: Record<string, string> | undefined;
|
|
545
674
|
archive?: string | undefined;
|
|
546
675
|
cmd?: string | undefined;
|
|
547
676
|
}>>;
|
|
548
677
|
"linux-x86_64": z.ZodOptional<z.ZodObject<{
|
|
549
678
|
archive: z.ZodOptional<z.ZodString>;
|
|
550
679
|
cmd: z.ZodOptional<z.ZodString>;
|
|
680
|
+
args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
681
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
551
682
|
}, "strip", z.ZodTypeAny, {
|
|
683
|
+
args?: string[] | undefined;
|
|
684
|
+
env?: Record<string, string> | undefined;
|
|
552
685
|
archive?: string | undefined;
|
|
553
686
|
cmd?: string | undefined;
|
|
554
687
|
}, {
|
|
688
|
+
args?: string[] | undefined;
|
|
689
|
+
env?: Record<string, string> | undefined;
|
|
555
690
|
archive?: string | undefined;
|
|
556
691
|
cmd?: string | undefined;
|
|
557
692
|
}>>;
|
|
558
693
|
"windows-x86_64": z.ZodOptional<z.ZodObject<{
|
|
559
694
|
archive: z.ZodOptional<z.ZodString>;
|
|
560
695
|
cmd: z.ZodOptional<z.ZodString>;
|
|
696
|
+
args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
697
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
561
698
|
}, "strip", z.ZodTypeAny, {
|
|
699
|
+
args?: string[] | undefined;
|
|
700
|
+
env?: Record<string, string> | undefined;
|
|
562
701
|
archive?: string | undefined;
|
|
563
702
|
cmd?: string | undefined;
|
|
564
703
|
}, {
|
|
704
|
+
args?: string[] | undefined;
|
|
705
|
+
env?: Record<string, string> | undefined;
|
|
565
706
|
archive?: string | undefined;
|
|
566
707
|
cmd?: string | undefined;
|
|
567
708
|
}>>;
|
|
568
709
|
"windows-aarch64": z.ZodOptional<z.ZodObject<{
|
|
569
710
|
archive: z.ZodOptional<z.ZodString>;
|
|
570
711
|
cmd: z.ZodOptional<z.ZodString>;
|
|
712
|
+
args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
713
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
571
714
|
}, "strip", z.ZodTypeAny, {
|
|
715
|
+
args?: string[] | undefined;
|
|
716
|
+
env?: Record<string, string> | undefined;
|
|
572
717
|
archive?: string | undefined;
|
|
573
718
|
cmd?: string | undefined;
|
|
574
719
|
}, {
|
|
720
|
+
args?: string[] | undefined;
|
|
721
|
+
env?: Record<string, string> | undefined;
|
|
575
722
|
archive?: string | undefined;
|
|
576
723
|
cmd?: string | undefined;
|
|
577
724
|
}>>;
|
|
578
725
|
}, "strip", z.ZodTypeAny, {
|
|
579
726
|
"darwin-aarch64"?: {
|
|
727
|
+
args?: string[] | undefined;
|
|
728
|
+
env?: Record<string, string> | undefined;
|
|
580
729
|
archive?: string | undefined;
|
|
581
730
|
cmd?: string | undefined;
|
|
582
731
|
} | undefined;
|
|
583
732
|
"darwin-x86_64"?: {
|
|
733
|
+
args?: string[] | undefined;
|
|
734
|
+
env?: Record<string, string> | undefined;
|
|
584
735
|
archive?: string | undefined;
|
|
585
736
|
cmd?: string | undefined;
|
|
586
737
|
} | undefined;
|
|
587
738
|
"linux-aarch64"?: {
|
|
739
|
+
args?: string[] | undefined;
|
|
740
|
+
env?: Record<string, string> | undefined;
|
|
588
741
|
archive?: string | undefined;
|
|
589
742
|
cmd?: string | undefined;
|
|
590
743
|
} | undefined;
|
|
591
744
|
"linux-x86_64"?: {
|
|
745
|
+
args?: string[] | undefined;
|
|
746
|
+
env?: Record<string, string> | undefined;
|
|
592
747
|
archive?: string | undefined;
|
|
593
748
|
cmd?: string | undefined;
|
|
594
749
|
} | undefined;
|
|
595
|
-
"windows-
|
|
750
|
+
"windows-aarch64"?: {
|
|
751
|
+
args?: string[] | undefined;
|
|
752
|
+
env?: Record<string, string> | undefined;
|
|
596
753
|
archive?: string | undefined;
|
|
597
754
|
cmd?: string | undefined;
|
|
598
755
|
} | undefined;
|
|
599
|
-
"windows-
|
|
756
|
+
"windows-x86_64"?: {
|
|
757
|
+
args?: string[] | undefined;
|
|
758
|
+
env?: Record<string, string> | undefined;
|
|
600
759
|
archive?: string | undefined;
|
|
601
760
|
cmd?: string | undefined;
|
|
602
761
|
} | undefined;
|
|
603
762
|
}, {
|
|
604
763
|
"darwin-aarch64"?: {
|
|
764
|
+
args?: string[] | undefined;
|
|
765
|
+
env?: Record<string, string> | undefined;
|
|
605
766
|
archive?: string | undefined;
|
|
606
767
|
cmd?: string | undefined;
|
|
607
768
|
} | undefined;
|
|
608
769
|
"darwin-x86_64"?: {
|
|
770
|
+
args?: string[] | undefined;
|
|
771
|
+
env?: Record<string, string> | undefined;
|
|
609
772
|
archive?: string | undefined;
|
|
610
773
|
cmd?: string | undefined;
|
|
611
774
|
} | undefined;
|
|
612
775
|
"linux-aarch64"?: {
|
|
776
|
+
args?: string[] | undefined;
|
|
777
|
+
env?: Record<string, string> | undefined;
|
|
613
778
|
archive?: string | undefined;
|
|
614
779
|
cmd?: string | undefined;
|
|
615
780
|
} | undefined;
|
|
616
781
|
"linux-x86_64"?: {
|
|
782
|
+
args?: string[] | undefined;
|
|
783
|
+
env?: Record<string, string> | undefined;
|
|
617
784
|
archive?: string | undefined;
|
|
618
785
|
cmd?: string | undefined;
|
|
619
786
|
} | undefined;
|
|
620
|
-
"windows-
|
|
787
|
+
"windows-aarch64"?: {
|
|
788
|
+
args?: string[] | undefined;
|
|
789
|
+
env?: Record<string, string> | undefined;
|
|
621
790
|
archive?: string | undefined;
|
|
622
791
|
cmd?: string | undefined;
|
|
623
792
|
} | undefined;
|
|
624
|
-
"windows-
|
|
793
|
+
"windows-x86_64"?: {
|
|
794
|
+
args?: string[] | undefined;
|
|
795
|
+
env?: Record<string, string> | undefined;
|
|
625
796
|
archive?: string | undefined;
|
|
626
797
|
cmd?: string | undefined;
|
|
627
798
|
} | undefined;
|
|
@@ -642,26 +813,38 @@ declare const RegistryDocument: z.ZodObject<{
|
|
|
642
813
|
}, "strip", z.ZodTypeAny, {
|
|
643
814
|
binary?: {
|
|
644
815
|
"darwin-aarch64"?: {
|
|
816
|
+
args?: string[] | undefined;
|
|
817
|
+
env?: Record<string, string> | undefined;
|
|
645
818
|
archive?: string | undefined;
|
|
646
819
|
cmd?: string | undefined;
|
|
647
820
|
} | undefined;
|
|
648
821
|
"darwin-x86_64"?: {
|
|
822
|
+
args?: string[] | undefined;
|
|
823
|
+
env?: Record<string, string> | undefined;
|
|
649
824
|
archive?: string | undefined;
|
|
650
825
|
cmd?: string | undefined;
|
|
651
826
|
} | undefined;
|
|
652
827
|
"linux-aarch64"?: {
|
|
828
|
+
args?: string[] | undefined;
|
|
829
|
+
env?: Record<string, string> | undefined;
|
|
653
830
|
archive?: string | undefined;
|
|
654
831
|
cmd?: string | undefined;
|
|
655
832
|
} | undefined;
|
|
656
833
|
"linux-x86_64"?: {
|
|
834
|
+
args?: string[] | undefined;
|
|
835
|
+
env?: Record<string, string> | undefined;
|
|
657
836
|
archive?: string | undefined;
|
|
658
837
|
cmd?: string | undefined;
|
|
659
838
|
} | undefined;
|
|
660
|
-
"windows-
|
|
839
|
+
"windows-aarch64"?: {
|
|
840
|
+
args?: string[] | undefined;
|
|
841
|
+
env?: Record<string, string> | undefined;
|
|
661
842
|
archive?: string | undefined;
|
|
662
843
|
cmd?: string | undefined;
|
|
663
844
|
} | undefined;
|
|
664
|
-
"windows-
|
|
845
|
+
"windows-x86_64"?: {
|
|
846
|
+
args?: string[] | undefined;
|
|
847
|
+
env?: Record<string, string> | undefined;
|
|
665
848
|
archive?: string | undefined;
|
|
666
849
|
cmd?: string | undefined;
|
|
667
850
|
} | undefined;
|
|
@@ -679,26 +862,38 @@ declare const RegistryDocument: z.ZodObject<{
|
|
|
679
862
|
}, {
|
|
680
863
|
binary?: {
|
|
681
864
|
"darwin-aarch64"?: {
|
|
865
|
+
args?: string[] | undefined;
|
|
866
|
+
env?: Record<string, string> | undefined;
|
|
682
867
|
archive?: string | undefined;
|
|
683
868
|
cmd?: string | undefined;
|
|
684
869
|
} | undefined;
|
|
685
870
|
"darwin-x86_64"?: {
|
|
871
|
+
args?: string[] | undefined;
|
|
872
|
+
env?: Record<string, string> | undefined;
|
|
686
873
|
archive?: string | undefined;
|
|
687
874
|
cmd?: string | undefined;
|
|
688
875
|
} | undefined;
|
|
689
876
|
"linux-aarch64"?: {
|
|
877
|
+
args?: string[] | undefined;
|
|
878
|
+
env?: Record<string, string> | undefined;
|
|
690
879
|
archive?: string | undefined;
|
|
691
880
|
cmd?: string | undefined;
|
|
692
881
|
} | undefined;
|
|
693
882
|
"linux-x86_64"?: {
|
|
883
|
+
args?: string[] | undefined;
|
|
884
|
+
env?: Record<string, string> | undefined;
|
|
694
885
|
archive?: string | undefined;
|
|
695
886
|
cmd?: string | undefined;
|
|
696
887
|
} | undefined;
|
|
697
|
-
"windows-
|
|
888
|
+
"windows-aarch64"?: {
|
|
889
|
+
args?: string[] | undefined;
|
|
890
|
+
env?: Record<string, string> | undefined;
|
|
698
891
|
archive?: string | undefined;
|
|
699
892
|
cmd?: string | undefined;
|
|
700
893
|
} | undefined;
|
|
701
|
-
"windows-
|
|
894
|
+
"windows-x86_64"?: {
|
|
895
|
+
args?: string[] | undefined;
|
|
896
|
+
env?: Record<string, string> | undefined;
|
|
702
897
|
archive?: string | undefined;
|
|
703
898
|
cmd?: string | undefined;
|
|
704
899
|
} | undefined;
|
|
@@ -720,26 +915,38 @@ declare const RegistryDocument: z.ZodObject<{
|
|
|
720
915
|
distribution: {
|
|
721
916
|
binary?: {
|
|
722
917
|
"darwin-aarch64"?: {
|
|
918
|
+
args?: string[] | undefined;
|
|
919
|
+
env?: Record<string, string> | undefined;
|
|
723
920
|
archive?: string | undefined;
|
|
724
921
|
cmd?: string | undefined;
|
|
725
922
|
} | undefined;
|
|
726
923
|
"darwin-x86_64"?: {
|
|
924
|
+
args?: string[] | undefined;
|
|
925
|
+
env?: Record<string, string> | undefined;
|
|
727
926
|
archive?: string | undefined;
|
|
728
927
|
cmd?: string | undefined;
|
|
729
928
|
} | undefined;
|
|
730
929
|
"linux-aarch64"?: {
|
|
930
|
+
args?: string[] | undefined;
|
|
931
|
+
env?: Record<string, string> | undefined;
|
|
731
932
|
archive?: string | undefined;
|
|
732
933
|
cmd?: string | undefined;
|
|
733
934
|
} | undefined;
|
|
734
935
|
"linux-x86_64"?: {
|
|
936
|
+
args?: string[] | undefined;
|
|
937
|
+
env?: Record<string, string> | undefined;
|
|
735
938
|
archive?: string | undefined;
|
|
736
939
|
cmd?: string | undefined;
|
|
737
940
|
} | undefined;
|
|
738
|
-
"windows-
|
|
941
|
+
"windows-aarch64"?: {
|
|
942
|
+
args?: string[] | undefined;
|
|
943
|
+
env?: Record<string, string> | undefined;
|
|
739
944
|
archive?: string | undefined;
|
|
740
945
|
cmd?: string | undefined;
|
|
741
946
|
} | undefined;
|
|
742
|
-
"windows-
|
|
947
|
+
"windows-x86_64"?: {
|
|
948
|
+
args?: string[] | undefined;
|
|
949
|
+
env?: Record<string, string> | undefined;
|
|
743
950
|
archive?: string | undefined;
|
|
744
951
|
cmd?: string | undefined;
|
|
745
952
|
} | undefined;
|
|
@@ -768,26 +975,38 @@ declare const RegistryDocument: z.ZodObject<{
|
|
|
768
975
|
distribution: {
|
|
769
976
|
binary?: {
|
|
770
977
|
"darwin-aarch64"?: {
|
|
978
|
+
args?: string[] | undefined;
|
|
979
|
+
env?: Record<string, string> | undefined;
|
|
771
980
|
archive?: string | undefined;
|
|
772
981
|
cmd?: string | undefined;
|
|
773
982
|
} | undefined;
|
|
774
983
|
"darwin-x86_64"?: {
|
|
984
|
+
args?: string[] | undefined;
|
|
985
|
+
env?: Record<string, string> | undefined;
|
|
775
986
|
archive?: string | undefined;
|
|
776
987
|
cmd?: string | undefined;
|
|
777
988
|
} | undefined;
|
|
778
989
|
"linux-aarch64"?: {
|
|
990
|
+
args?: string[] | undefined;
|
|
991
|
+
env?: Record<string, string> | undefined;
|
|
779
992
|
archive?: string | undefined;
|
|
780
993
|
cmd?: string | undefined;
|
|
781
994
|
} | undefined;
|
|
782
995
|
"linux-x86_64"?: {
|
|
996
|
+
args?: string[] | undefined;
|
|
997
|
+
env?: Record<string, string> | undefined;
|
|
783
998
|
archive?: string | undefined;
|
|
784
999
|
cmd?: string | undefined;
|
|
785
1000
|
} | undefined;
|
|
786
|
-
"windows-
|
|
1001
|
+
"windows-aarch64"?: {
|
|
1002
|
+
args?: string[] | undefined;
|
|
1003
|
+
env?: Record<string, string> | undefined;
|
|
787
1004
|
archive?: string | undefined;
|
|
788
1005
|
cmd?: string | undefined;
|
|
789
1006
|
} | undefined;
|
|
790
|
-
"windows-
|
|
1007
|
+
"windows-x86_64"?: {
|
|
1008
|
+
args?: string[] | undefined;
|
|
1009
|
+
env?: Record<string, string> | undefined;
|
|
791
1010
|
archive?: string | undefined;
|
|
792
1011
|
cmd?: string | undefined;
|
|
793
1012
|
} | undefined;
|
|
@@ -820,26 +1039,38 @@ declare const RegistryDocument: z.ZodObject<{
|
|
|
820
1039
|
distribution: {
|
|
821
1040
|
binary?: {
|
|
822
1041
|
"darwin-aarch64"?: {
|
|
1042
|
+
args?: string[] | undefined;
|
|
1043
|
+
env?: Record<string, string> | undefined;
|
|
823
1044
|
archive?: string | undefined;
|
|
824
1045
|
cmd?: string | undefined;
|
|
825
1046
|
} | undefined;
|
|
826
1047
|
"darwin-x86_64"?: {
|
|
1048
|
+
args?: string[] | undefined;
|
|
1049
|
+
env?: Record<string, string> | undefined;
|
|
827
1050
|
archive?: string | undefined;
|
|
828
1051
|
cmd?: string | undefined;
|
|
829
1052
|
} | undefined;
|
|
830
1053
|
"linux-aarch64"?: {
|
|
1054
|
+
args?: string[] | undefined;
|
|
1055
|
+
env?: Record<string, string> | undefined;
|
|
831
1056
|
archive?: string | undefined;
|
|
832
1057
|
cmd?: string | undefined;
|
|
833
1058
|
} | undefined;
|
|
834
1059
|
"linux-x86_64"?: {
|
|
1060
|
+
args?: string[] | undefined;
|
|
1061
|
+
env?: Record<string, string> | undefined;
|
|
835
1062
|
archive?: string | undefined;
|
|
836
1063
|
cmd?: string | undefined;
|
|
837
1064
|
} | undefined;
|
|
838
|
-
"windows-
|
|
1065
|
+
"windows-aarch64"?: {
|
|
1066
|
+
args?: string[] | undefined;
|
|
1067
|
+
env?: Record<string, string> | undefined;
|
|
839
1068
|
archive?: string | undefined;
|
|
840
1069
|
cmd?: string | undefined;
|
|
841
1070
|
} | undefined;
|
|
842
|
-
"windows-
|
|
1071
|
+
"windows-x86_64"?: {
|
|
1072
|
+
args?: string[] | undefined;
|
|
1073
|
+
env?: Record<string, string> | undefined;
|
|
843
1074
|
archive?: string | undefined;
|
|
844
1075
|
cmd?: string | undefined;
|
|
845
1076
|
} | undefined;
|
|
@@ -872,26 +1103,38 @@ declare const RegistryDocument: z.ZodObject<{
|
|
|
872
1103
|
distribution: {
|
|
873
1104
|
binary?: {
|
|
874
1105
|
"darwin-aarch64"?: {
|
|
1106
|
+
args?: string[] | undefined;
|
|
1107
|
+
env?: Record<string, string> | undefined;
|
|
875
1108
|
archive?: string | undefined;
|
|
876
1109
|
cmd?: string | undefined;
|
|
877
1110
|
} | undefined;
|
|
878
1111
|
"darwin-x86_64"?: {
|
|
1112
|
+
args?: string[] | undefined;
|
|
1113
|
+
env?: Record<string, string> | undefined;
|
|
879
1114
|
archive?: string | undefined;
|
|
880
1115
|
cmd?: string | undefined;
|
|
881
1116
|
} | undefined;
|
|
882
1117
|
"linux-aarch64"?: {
|
|
1118
|
+
args?: string[] | undefined;
|
|
1119
|
+
env?: Record<string, string> | undefined;
|
|
883
1120
|
archive?: string | undefined;
|
|
884
1121
|
cmd?: string | undefined;
|
|
885
1122
|
} | undefined;
|
|
886
1123
|
"linux-x86_64"?: {
|
|
1124
|
+
args?: string[] | undefined;
|
|
1125
|
+
env?: Record<string, string> | undefined;
|
|
887
1126
|
archive?: string | undefined;
|
|
888
1127
|
cmd?: string | undefined;
|
|
889
1128
|
} | undefined;
|
|
890
|
-
"windows-
|
|
1129
|
+
"windows-aarch64"?: {
|
|
1130
|
+
args?: string[] | undefined;
|
|
1131
|
+
env?: Record<string, string> | undefined;
|
|
891
1132
|
archive?: string | undefined;
|
|
892
1133
|
cmd?: string | undefined;
|
|
893
1134
|
} | undefined;
|
|
894
|
-
"windows-
|
|
1135
|
+
"windows-x86_64"?: {
|
|
1136
|
+
args?: string[] | undefined;
|
|
1137
|
+
env?: Record<string, string> | undefined;
|
|
895
1138
|
archive?: string | undefined;
|
|
896
1139
|
cmd?: string | undefined;
|
|
897
1140
|
} | undefined;
|
|
@@ -935,7 +1178,7 @@ interface SpawnPlan {
|
|
|
935
1178
|
args: string[];
|
|
936
1179
|
env: Record<string, string>;
|
|
937
1180
|
}
|
|
938
|
-
declare function planSpawn(agent: RegistryAgent, extraArgs?: string[]): SpawnPlan
|
|
1181
|
+
declare function planSpawn(agent: RegistryAgent, extraArgs?: string[]): Promise<SpawnPlan>;
|
|
939
1182
|
|
|
940
1183
|
type JsonRpcId = string | number;
|
|
941
1184
|
interface JsonRpcRequest {
|
|
@@ -1023,6 +1266,23 @@ declare const SessionListEntry: z.ZodObject<{
|
|
|
1023
1266
|
cwd: z.ZodString;
|
|
1024
1267
|
title: z.ZodOptional<z.ZodString>;
|
|
1025
1268
|
agentId: z.ZodOptional<z.ZodString>;
|
|
1269
|
+
currentModel: z.ZodOptional<z.ZodString>;
|
|
1270
|
+
currentUsage: z.ZodOptional<z.ZodObject<{
|
|
1271
|
+
used: z.ZodOptional<z.ZodNumber>;
|
|
1272
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
1273
|
+
costAmount: z.ZodOptional<z.ZodNumber>;
|
|
1274
|
+
costCurrency: z.ZodOptional<z.ZodString>;
|
|
1275
|
+
}, "strip", z.ZodTypeAny, {
|
|
1276
|
+
used?: number | undefined;
|
|
1277
|
+
size?: number | undefined;
|
|
1278
|
+
costAmount?: number | undefined;
|
|
1279
|
+
costCurrency?: string | undefined;
|
|
1280
|
+
}, {
|
|
1281
|
+
used?: number | undefined;
|
|
1282
|
+
size?: number | undefined;
|
|
1283
|
+
costAmount?: number | undefined;
|
|
1284
|
+
costCurrency?: string | undefined;
|
|
1285
|
+
}>>;
|
|
1026
1286
|
updatedAt: z.ZodString;
|
|
1027
1287
|
attachedClients: z.ZodNumber;
|
|
1028
1288
|
status: z.ZodDefault<z.ZodEnum<["live", "cold"]>>;
|
|
@@ -1037,6 +1297,13 @@ declare const SessionListEntry: z.ZodObject<{
|
|
|
1037
1297
|
upstreamSessionId?: string | undefined;
|
|
1038
1298
|
title?: string | undefined;
|
|
1039
1299
|
_meta?: Record<string, unknown> | undefined;
|
|
1300
|
+
currentModel?: string | undefined;
|
|
1301
|
+
currentUsage?: {
|
|
1302
|
+
used?: number | undefined;
|
|
1303
|
+
size?: number | undefined;
|
|
1304
|
+
costAmount?: number | undefined;
|
|
1305
|
+
costCurrency?: string | undefined;
|
|
1306
|
+
} | undefined;
|
|
1040
1307
|
}, {
|
|
1041
1308
|
cwd: string;
|
|
1042
1309
|
sessionId: string;
|
|
@@ -1047,6 +1314,13 @@ declare const SessionListEntry: z.ZodObject<{
|
|
|
1047
1314
|
upstreamSessionId?: string | undefined;
|
|
1048
1315
|
title?: string | undefined;
|
|
1049
1316
|
_meta?: Record<string, unknown> | undefined;
|
|
1317
|
+
currentModel?: string | undefined;
|
|
1318
|
+
currentUsage?: {
|
|
1319
|
+
used?: number | undefined;
|
|
1320
|
+
size?: number | undefined;
|
|
1321
|
+
costAmount?: number | undefined;
|
|
1322
|
+
costCurrency?: string | undefined;
|
|
1323
|
+
} | undefined;
|
|
1050
1324
|
}>;
|
|
1051
1325
|
type SessionListEntry = z.infer<typeof SessionListEntry>;
|
|
1052
1326
|
declare const SessionListResult: z.ZodObject<{
|
|
@@ -1056,6 +1330,23 @@ declare const SessionListResult: z.ZodObject<{
|
|
|
1056
1330
|
cwd: z.ZodString;
|
|
1057
1331
|
title: z.ZodOptional<z.ZodString>;
|
|
1058
1332
|
agentId: z.ZodOptional<z.ZodString>;
|
|
1333
|
+
currentModel: z.ZodOptional<z.ZodString>;
|
|
1334
|
+
currentUsage: z.ZodOptional<z.ZodObject<{
|
|
1335
|
+
used: z.ZodOptional<z.ZodNumber>;
|
|
1336
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
1337
|
+
costAmount: z.ZodOptional<z.ZodNumber>;
|
|
1338
|
+
costCurrency: z.ZodOptional<z.ZodString>;
|
|
1339
|
+
}, "strip", z.ZodTypeAny, {
|
|
1340
|
+
used?: number | undefined;
|
|
1341
|
+
size?: number | undefined;
|
|
1342
|
+
costAmount?: number | undefined;
|
|
1343
|
+
costCurrency?: string | undefined;
|
|
1344
|
+
}, {
|
|
1345
|
+
used?: number | undefined;
|
|
1346
|
+
size?: number | undefined;
|
|
1347
|
+
costAmount?: number | undefined;
|
|
1348
|
+
costCurrency?: string | undefined;
|
|
1349
|
+
}>>;
|
|
1059
1350
|
updatedAt: z.ZodString;
|
|
1060
1351
|
attachedClients: z.ZodNumber;
|
|
1061
1352
|
status: z.ZodDefault<z.ZodEnum<["live", "cold"]>>;
|
|
@@ -1070,6 +1361,13 @@ declare const SessionListResult: z.ZodObject<{
|
|
|
1070
1361
|
upstreamSessionId?: string | undefined;
|
|
1071
1362
|
title?: string | undefined;
|
|
1072
1363
|
_meta?: Record<string, unknown> | undefined;
|
|
1364
|
+
currentModel?: string | undefined;
|
|
1365
|
+
currentUsage?: {
|
|
1366
|
+
used?: number | undefined;
|
|
1367
|
+
size?: number | undefined;
|
|
1368
|
+
costAmount?: number | undefined;
|
|
1369
|
+
costCurrency?: string | undefined;
|
|
1370
|
+
} | undefined;
|
|
1073
1371
|
}, {
|
|
1074
1372
|
cwd: string;
|
|
1075
1373
|
sessionId: string;
|
|
@@ -1080,6 +1378,13 @@ declare const SessionListResult: z.ZodObject<{
|
|
|
1080
1378
|
upstreamSessionId?: string | undefined;
|
|
1081
1379
|
title?: string | undefined;
|
|
1082
1380
|
_meta?: Record<string, unknown> | undefined;
|
|
1381
|
+
currentModel?: string | undefined;
|
|
1382
|
+
currentUsage?: {
|
|
1383
|
+
used?: number | undefined;
|
|
1384
|
+
size?: number | undefined;
|
|
1385
|
+
costAmount?: number | undefined;
|
|
1386
|
+
costCurrency?: string | undefined;
|
|
1387
|
+
} | undefined;
|
|
1083
1388
|
}>, "many">;
|
|
1084
1389
|
nextCursor: z.ZodOptional<z.ZodString>;
|
|
1085
1390
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -1093,6 +1398,13 @@ declare const SessionListResult: z.ZodObject<{
|
|
|
1093
1398
|
upstreamSessionId?: string | undefined;
|
|
1094
1399
|
title?: string | undefined;
|
|
1095
1400
|
_meta?: Record<string, unknown> | undefined;
|
|
1401
|
+
currentModel?: string | undefined;
|
|
1402
|
+
currentUsage?: {
|
|
1403
|
+
used?: number | undefined;
|
|
1404
|
+
size?: number | undefined;
|
|
1405
|
+
costAmount?: number | undefined;
|
|
1406
|
+
costCurrency?: string | undefined;
|
|
1407
|
+
} | undefined;
|
|
1096
1408
|
}[];
|
|
1097
1409
|
nextCursor?: string | undefined;
|
|
1098
1410
|
}, {
|
|
@@ -1106,6 +1418,13 @@ declare const SessionListResult: z.ZodObject<{
|
|
|
1106
1418
|
upstreamSessionId?: string | undefined;
|
|
1107
1419
|
title?: string | undefined;
|
|
1108
1420
|
_meta?: Record<string, unknown> | undefined;
|
|
1421
|
+
currentModel?: string | undefined;
|
|
1422
|
+
currentUsage?: {
|
|
1423
|
+
used?: number | undefined;
|
|
1424
|
+
size?: number | undefined;
|
|
1425
|
+
costAmount?: number | undefined;
|
|
1426
|
+
costCurrency?: string | undefined;
|
|
1427
|
+
} | undefined;
|
|
1109
1428
|
}[];
|
|
1110
1429
|
nextCursor?: string | undefined;
|
|
1111
1430
|
}>;
|
|
@@ -1214,6 +1533,7 @@ declare class HistoryStore {
|
|
|
1214
1533
|
private writeQueues;
|
|
1215
1534
|
append(sessionId: string, entry: HistoryEntry): Promise<void>;
|
|
1216
1535
|
rewrite(sessionId: string, entries: HistoryEntry[]): Promise<void>;
|
|
1536
|
+
compact(sessionId: string, maxEntries: number): Promise<void>;
|
|
1217
1537
|
load(sessionId: string): Promise<HistoryEntry[]>;
|
|
1218
1538
|
delete(sessionId: string): Promise<void>;
|
|
1219
1539
|
private enqueue;
|
|
@@ -1239,6 +1559,12 @@ interface SpawnReplacementAgentResult {
|
|
|
1239
1559
|
agentMeta?: Record<string, unknown>;
|
|
1240
1560
|
}
|
|
1241
1561
|
type SpawnReplacementAgent = (params: SpawnReplacementAgentParams) => Promise<SpawnReplacementAgentResult>;
|
|
1562
|
+
interface UsageSnapshot {
|
|
1563
|
+
used?: number;
|
|
1564
|
+
size?: number;
|
|
1565
|
+
costAmount?: number;
|
|
1566
|
+
costCurrency?: string;
|
|
1567
|
+
}
|
|
1242
1568
|
interface SessionInit {
|
|
1243
1569
|
cwd: string;
|
|
1244
1570
|
agentId: string;
|
|
@@ -1250,12 +1576,13 @@ interface SessionInit {
|
|
|
1250
1576
|
agentArgs?: string[];
|
|
1251
1577
|
idleTimeoutMs?: number;
|
|
1252
1578
|
spawnReplacementAgent?: SpawnReplacementAgent;
|
|
1253
|
-
seedHistory?: CachedNotification[];
|
|
1254
1579
|
historyStore?: HistoryStore;
|
|
1255
1580
|
currentModel?: string;
|
|
1256
1581
|
currentMode?: string;
|
|
1582
|
+
currentUsage?: UsageSnapshot;
|
|
1257
1583
|
agentCommands?: AdvertisedCommand[];
|
|
1258
1584
|
firstPromptSeeded?: boolean;
|
|
1585
|
+
createdAt?: number;
|
|
1259
1586
|
}
|
|
1260
1587
|
interface CloseOptions {
|
|
1261
1588
|
deleteRecord?: boolean;
|
|
@@ -1273,9 +1600,10 @@ declare class Session {
|
|
|
1273
1600
|
title: string | undefined;
|
|
1274
1601
|
currentModel: string | undefined;
|
|
1275
1602
|
currentMode: string | undefined;
|
|
1603
|
+
currentUsage: UsageSnapshot | undefined;
|
|
1276
1604
|
updatedAt: number;
|
|
1605
|
+
readonly createdAt: number;
|
|
1277
1606
|
private clients;
|
|
1278
|
-
private history;
|
|
1279
1607
|
private historyStore;
|
|
1280
1608
|
private promptQueue;
|
|
1281
1609
|
private promptInFlight;
|
|
@@ -1284,16 +1612,20 @@ declare class Session {
|
|
|
1284
1612
|
private titleHandlers;
|
|
1285
1613
|
private broadcastHandlers;
|
|
1286
1614
|
private firstPromptSeeded;
|
|
1615
|
+
private promptStartedAt;
|
|
1616
|
+
private appendCount;
|
|
1287
1617
|
private inFlightPermissions;
|
|
1288
1618
|
private internalPromptCapture;
|
|
1289
1619
|
private idleTimeoutMs;
|
|
1290
1620
|
private idleTimer;
|
|
1621
|
+
private lastRecordedAt;
|
|
1291
1622
|
private spawnReplacementAgent;
|
|
1292
1623
|
private agentChangeHandlers;
|
|
1293
1624
|
private agentAdvertisedCommands;
|
|
1294
1625
|
private agentCommandsHandlers;
|
|
1295
1626
|
private modelHandlers;
|
|
1296
1627
|
private modeHandlers;
|
|
1628
|
+
private usageHandlers;
|
|
1297
1629
|
constructor(init: SessionInit);
|
|
1298
1630
|
private broadcastMergedCommands;
|
|
1299
1631
|
private wireAgent;
|
|
@@ -1303,9 +1635,9 @@ declare class Session {
|
|
|
1303
1635
|
}) => void): void;
|
|
1304
1636
|
get attachedCount(): number;
|
|
1305
1637
|
get turnStartedAt(): number | undefined;
|
|
1306
|
-
getHistorySnapshot(): CachedNotification[]
|
|
1638
|
+
getHistorySnapshot(): Promise<CachedNotification[]>;
|
|
1307
1639
|
onBroadcast(handler: (entry: CachedNotification) => void): () => void;
|
|
1308
|
-
attach(client: AttachedClient, historyPolicy: HistoryPolicy): CachedNotification[]
|
|
1640
|
+
attach(client: AttachedClient, historyPolicy: HistoryPolicy): Promise<CachedNotification[]>;
|
|
1309
1641
|
replayPendingPermissions(client: AttachedClient): void;
|
|
1310
1642
|
detach(clientId: string): void;
|
|
1311
1643
|
prompt(clientId: string, params: unknown): Promise<unknown>;
|
|
@@ -1323,21 +1655,28 @@ declare class Session {
|
|
|
1323
1655
|
private maybeSeedTitleFromPrompt;
|
|
1324
1656
|
private maybeApplyAgentModel;
|
|
1325
1657
|
private maybeApplyAgentMode;
|
|
1658
|
+
private maybeApplyAgentUsage;
|
|
1326
1659
|
private setAgentAdvertisedCommands;
|
|
1327
1660
|
onAgentCommandsChange(handler: (commands: AdvertisedCommand[]) => void): void;
|
|
1328
1661
|
onModelChange(handler: (model: string) => void): void;
|
|
1329
1662
|
onModeChange(handler: (mode: string) => void): void;
|
|
1663
|
+
onUsageChange(handler: (usage: UsageSnapshot) => void): void;
|
|
1330
1664
|
mergedAvailableCommands(): AdvertisedCommand[];
|
|
1665
|
+
agentOnlyAdvertisedCommands(): AdvertisedCommand[];
|
|
1331
1666
|
private maybeApplyAgentSessionInfo;
|
|
1332
1667
|
private handleSlashCommand;
|
|
1333
1668
|
private runTitleCommand;
|
|
1334
1669
|
private runTitleRegen;
|
|
1335
1670
|
private runInternalPrompt;
|
|
1336
|
-
private
|
|
1671
|
+
private runAgentCommand;
|
|
1337
1672
|
private buildSwitchTranscript;
|
|
1673
|
+
seedFromImport(): Promise<void>;
|
|
1338
1674
|
private broadcastAgentSwitch;
|
|
1339
1675
|
private markClosed;
|
|
1340
|
-
private
|
|
1676
|
+
private get lastActivityAt();
|
|
1677
|
+
private scheduleIdleCheck;
|
|
1678
|
+
private armIdleTimer;
|
|
1679
|
+
private checkIdle;
|
|
1341
1680
|
private cancelIdleTimer;
|
|
1342
1681
|
private rewriteForClient;
|
|
1343
1682
|
private recordAndBroadcast;
|
|
@@ -1349,13 +1688,31 @@ declare class Session {
|
|
|
1349
1688
|
declare const SessionRecord: z.ZodObject<{
|
|
1350
1689
|
version: z.ZodLiteral<1>;
|
|
1351
1690
|
sessionId: z.ZodString;
|
|
1691
|
+
lineageId: z.ZodOptional<z.ZodString>;
|
|
1352
1692
|
upstreamSessionId: z.ZodString;
|
|
1693
|
+
importedFromSessionId: z.ZodOptional<z.ZodString>;
|
|
1353
1694
|
agentId: z.ZodString;
|
|
1354
1695
|
cwd: z.ZodString;
|
|
1355
1696
|
title: z.ZodOptional<z.ZodString>;
|
|
1356
1697
|
agentArgs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1357
1698
|
currentModel: z.ZodOptional<z.ZodString>;
|
|
1358
1699
|
currentMode: z.ZodOptional<z.ZodString>;
|
|
1700
|
+
currentUsage: z.ZodOptional<z.ZodObject<{
|
|
1701
|
+
used: z.ZodOptional<z.ZodNumber>;
|
|
1702
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
1703
|
+
costAmount: z.ZodOptional<z.ZodNumber>;
|
|
1704
|
+
costCurrency: z.ZodOptional<z.ZodString>;
|
|
1705
|
+
}, "strip", z.ZodTypeAny, {
|
|
1706
|
+
used?: number | undefined;
|
|
1707
|
+
size?: number | undefined;
|
|
1708
|
+
costAmount?: number | undefined;
|
|
1709
|
+
costCurrency?: string | undefined;
|
|
1710
|
+
}, {
|
|
1711
|
+
used?: number | undefined;
|
|
1712
|
+
size?: number | undefined;
|
|
1713
|
+
costAmount?: number | undefined;
|
|
1714
|
+
costCurrency?: string | undefined;
|
|
1715
|
+
}>>;
|
|
1359
1716
|
agentCommands: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1360
1717
|
name: z.ZodString;
|
|
1361
1718
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -1380,6 +1737,14 @@ declare const SessionRecord: z.ZodObject<{
|
|
|
1380
1737
|
agentArgs?: string[] | undefined;
|
|
1381
1738
|
currentModel?: string | undefined;
|
|
1382
1739
|
currentMode?: string | undefined;
|
|
1740
|
+
currentUsage?: {
|
|
1741
|
+
used?: number | undefined;
|
|
1742
|
+
size?: number | undefined;
|
|
1743
|
+
costAmount?: number | undefined;
|
|
1744
|
+
costCurrency?: string | undefined;
|
|
1745
|
+
} | undefined;
|
|
1746
|
+
lineageId?: string | undefined;
|
|
1747
|
+
importedFromSessionId?: string | undefined;
|
|
1383
1748
|
agentCommands?: {
|
|
1384
1749
|
name: string;
|
|
1385
1750
|
description?: string | undefined;
|
|
@@ -1396,6 +1761,14 @@ declare const SessionRecord: z.ZodObject<{
|
|
|
1396
1761
|
agentArgs?: string[] | undefined;
|
|
1397
1762
|
currentModel?: string | undefined;
|
|
1398
1763
|
currentMode?: string | undefined;
|
|
1764
|
+
currentUsage?: {
|
|
1765
|
+
used?: number | undefined;
|
|
1766
|
+
size?: number | undefined;
|
|
1767
|
+
costAmount?: number | undefined;
|
|
1768
|
+
costCurrency?: string | undefined;
|
|
1769
|
+
} | undefined;
|
|
1770
|
+
lineageId?: string | undefined;
|
|
1771
|
+
importedFromSessionId?: string | undefined;
|
|
1399
1772
|
agentCommands?: {
|
|
1400
1773
|
name: string;
|
|
1401
1774
|
description?: string | undefined;
|
|
@@ -1406,9 +1779,185 @@ declare class SessionStore {
|
|
|
1406
1779
|
write(record: Omit<SessionRecord, "version">): Promise<void>;
|
|
1407
1780
|
read(sessionId: string): Promise<SessionRecord | undefined>;
|
|
1408
1781
|
delete(sessionId: string): Promise<void>;
|
|
1782
|
+
findByLineageId(lineageId: string): Promise<SessionRecord | undefined>;
|
|
1409
1783
|
list(): Promise<SessionRecord[]>;
|
|
1410
1784
|
}
|
|
1411
1785
|
|
|
1786
|
+
declare const Bundle: z.ZodObject<{
|
|
1787
|
+
version: z.ZodLiteral<1>;
|
|
1788
|
+
exportedAt: z.ZodString;
|
|
1789
|
+
exportedFrom: z.ZodObject<{
|
|
1790
|
+
hydraVersion: z.ZodString;
|
|
1791
|
+
machine: z.ZodString;
|
|
1792
|
+
}, "strip", z.ZodTypeAny, {
|
|
1793
|
+
hydraVersion: string;
|
|
1794
|
+
machine: string;
|
|
1795
|
+
}, {
|
|
1796
|
+
hydraVersion: string;
|
|
1797
|
+
machine: string;
|
|
1798
|
+
}>;
|
|
1799
|
+
session: z.ZodObject<{
|
|
1800
|
+
sessionId: z.ZodString;
|
|
1801
|
+
lineageId: z.ZodString;
|
|
1802
|
+
agentId: z.ZodString;
|
|
1803
|
+
cwd: z.ZodString;
|
|
1804
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1805
|
+
currentModel: z.ZodOptional<z.ZodString>;
|
|
1806
|
+
currentMode: z.ZodOptional<z.ZodString>;
|
|
1807
|
+
currentUsage: z.ZodOptional<z.ZodObject<{
|
|
1808
|
+
used: z.ZodOptional<z.ZodNumber>;
|
|
1809
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
1810
|
+
costAmount: z.ZodOptional<z.ZodNumber>;
|
|
1811
|
+
costCurrency: z.ZodOptional<z.ZodString>;
|
|
1812
|
+
}, "strip", z.ZodTypeAny, {
|
|
1813
|
+
used?: number | undefined;
|
|
1814
|
+
size?: number | undefined;
|
|
1815
|
+
costAmount?: number | undefined;
|
|
1816
|
+
costCurrency?: string | undefined;
|
|
1817
|
+
}, {
|
|
1818
|
+
used?: number | undefined;
|
|
1819
|
+
size?: number | undefined;
|
|
1820
|
+
costAmount?: number | undefined;
|
|
1821
|
+
costCurrency?: string | undefined;
|
|
1822
|
+
}>>;
|
|
1823
|
+
agentCommands: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1824
|
+
name: z.ZodString;
|
|
1825
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1826
|
+
}, "strip", z.ZodTypeAny, {
|
|
1827
|
+
name: string;
|
|
1828
|
+
description?: string | undefined;
|
|
1829
|
+
}, {
|
|
1830
|
+
name: string;
|
|
1831
|
+
description?: string | undefined;
|
|
1832
|
+
}>, "many">>;
|
|
1833
|
+
createdAt: z.ZodString;
|
|
1834
|
+
updatedAt: z.ZodString;
|
|
1835
|
+
}, "strip", z.ZodTypeAny, {
|
|
1836
|
+
cwd: string;
|
|
1837
|
+
agentId: string;
|
|
1838
|
+
sessionId: string;
|
|
1839
|
+
updatedAt: string;
|
|
1840
|
+
lineageId: string;
|
|
1841
|
+
createdAt: string;
|
|
1842
|
+
title?: string | undefined;
|
|
1843
|
+
currentModel?: string | undefined;
|
|
1844
|
+
currentMode?: string | undefined;
|
|
1845
|
+
currentUsage?: {
|
|
1846
|
+
used?: number | undefined;
|
|
1847
|
+
size?: number | undefined;
|
|
1848
|
+
costAmount?: number | undefined;
|
|
1849
|
+
costCurrency?: string | undefined;
|
|
1850
|
+
} | undefined;
|
|
1851
|
+
agentCommands?: {
|
|
1852
|
+
name: string;
|
|
1853
|
+
description?: string | undefined;
|
|
1854
|
+
}[] | undefined;
|
|
1855
|
+
}, {
|
|
1856
|
+
cwd: string;
|
|
1857
|
+
agentId: string;
|
|
1858
|
+
sessionId: string;
|
|
1859
|
+
updatedAt: string;
|
|
1860
|
+
lineageId: string;
|
|
1861
|
+
createdAt: string;
|
|
1862
|
+
title?: string | undefined;
|
|
1863
|
+
currentModel?: string | undefined;
|
|
1864
|
+
currentMode?: string | undefined;
|
|
1865
|
+
currentUsage?: {
|
|
1866
|
+
used?: number | undefined;
|
|
1867
|
+
size?: number | undefined;
|
|
1868
|
+
costAmount?: number | undefined;
|
|
1869
|
+
costCurrency?: string | undefined;
|
|
1870
|
+
} | undefined;
|
|
1871
|
+
agentCommands?: {
|
|
1872
|
+
name: string;
|
|
1873
|
+
description?: string | undefined;
|
|
1874
|
+
}[] | undefined;
|
|
1875
|
+
}>;
|
|
1876
|
+
history: z.ZodArray<z.ZodObject<{
|
|
1877
|
+
method: z.ZodString;
|
|
1878
|
+
params: z.ZodUnknown;
|
|
1879
|
+
recordedAt: z.ZodNumber;
|
|
1880
|
+
}, "strip", z.ZodTypeAny, {
|
|
1881
|
+
method: string;
|
|
1882
|
+
recordedAt: number;
|
|
1883
|
+
params?: unknown;
|
|
1884
|
+
}, {
|
|
1885
|
+
method: string;
|
|
1886
|
+
recordedAt: number;
|
|
1887
|
+
params?: unknown;
|
|
1888
|
+
}>, "many">;
|
|
1889
|
+
promptHistory: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1890
|
+
}, "strip", z.ZodTypeAny, {
|
|
1891
|
+
version: 1;
|
|
1892
|
+
exportedAt: string;
|
|
1893
|
+
exportedFrom: {
|
|
1894
|
+
hydraVersion: string;
|
|
1895
|
+
machine: string;
|
|
1896
|
+
};
|
|
1897
|
+
session: {
|
|
1898
|
+
cwd: string;
|
|
1899
|
+
agentId: string;
|
|
1900
|
+
sessionId: string;
|
|
1901
|
+
updatedAt: string;
|
|
1902
|
+
lineageId: string;
|
|
1903
|
+
createdAt: string;
|
|
1904
|
+
title?: string | undefined;
|
|
1905
|
+
currentModel?: string | undefined;
|
|
1906
|
+
currentMode?: string | undefined;
|
|
1907
|
+
currentUsage?: {
|
|
1908
|
+
used?: number | undefined;
|
|
1909
|
+
size?: number | undefined;
|
|
1910
|
+
costAmount?: number | undefined;
|
|
1911
|
+
costCurrency?: string | undefined;
|
|
1912
|
+
} | undefined;
|
|
1913
|
+
agentCommands?: {
|
|
1914
|
+
name: string;
|
|
1915
|
+
description?: string | undefined;
|
|
1916
|
+
}[] | undefined;
|
|
1917
|
+
};
|
|
1918
|
+
history: {
|
|
1919
|
+
method: string;
|
|
1920
|
+
recordedAt: number;
|
|
1921
|
+
params?: unknown;
|
|
1922
|
+
}[];
|
|
1923
|
+
promptHistory?: string[] | undefined;
|
|
1924
|
+
}, {
|
|
1925
|
+
version: 1;
|
|
1926
|
+
exportedAt: string;
|
|
1927
|
+
exportedFrom: {
|
|
1928
|
+
hydraVersion: string;
|
|
1929
|
+
machine: string;
|
|
1930
|
+
};
|
|
1931
|
+
session: {
|
|
1932
|
+
cwd: string;
|
|
1933
|
+
agentId: string;
|
|
1934
|
+
sessionId: string;
|
|
1935
|
+
updatedAt: string;
|
|
1936
|
+
lineageId: string;
|
|
1937
|
+
createdAt: string;
|
|
1938
|
+
title?: string | undefined;
|
|
1939
|
+
currentModel?: string | undefined;
|
|
1940
|
+
currentMode?: string | undefined;
|
|
1941
|
+
currentUsage?: {
|
|
1942
|
+
used?: number | undefined;
|
|
1943
|
+
size?: number | undefined;
|
|
1944
|
+
costAmount?: number | undefined;
|
|
1945
|
+
costCurrency?: string | undefined;
|
|
1946
|
+
} | undefined;
|
|
1947
|
+
agentCommands?: {
|
|
1948
|
+
name: string;
|
|
1949
|
+
description?: string | undefined;
|
|
1950
|
+
}[] | undefined;
|
|
1951
|
+
};
|
|
1952
|
+
history: {
|
|
1953
|
+
method: string;
|
|
1954
|
+
recordedAt: number;
|
|
1955
|
+
params?: unknown;
|
|
1956
|
+
}[];
|
|
1957
|
+
promptHistory?: string[] | undefined;
|
|
1958
|
+
}>;
|
|
1959
|
+
type Bundle = z.infer<typeof Bundle>;
|
|
1960
|
+
|
|
1412
1961
|
interface CreateSessionParams {
|
|
1413
1962
|
cwd: string;
|
|
1414
1963
|
agentId: string;
|
|
@@ -1423,14 +1972,16 @@ interface ResurrectParams {
|
|
|
1423
1972
|
cwd: string;
|
|
1424
1973
|
title?: string;
|
|
1425
1974
|
agentArgs?: string[];
|
|
1426
|
-
seedHistory?: CachedNotification[];
|
|
1427
1975
|
currentModel?: string;
|
|
1428
1976
|
currentMode?: string;
|
|
1977
|
+
currentUsage?: UsageSnapshot;
|
|
1429
1978
|
agentCommands?: AdvertisedCommand[];
|
|
1979
|
+
createdAt?: string;
|
|
1430
1980
|
}
|
|
1431
1981
|
type AgentSpawner = (opts: AgentInstanceOptions) => AgentInstance;
|
|
1432
1982
|
interface SessionManagerOptions {
|
|
1433
1983
|
idleTimeoutMs?: number;
|
|
1984
|
+
defaultModels?: Record<string, string>;
|
|
1434
1985
|
}
|
|
1435
1986
|
declare class SessionManager {
|
|
1436
1987
|
private registry;
|
|
@@ -1440,21 +1991,39 @@ declare class SessionManager {
|
|
|
1440
1991
|
private store;
|
|
1441
1992
|
private histories;
|
|
1442
1993
|
private idleTimeoutMs;
|
|
1994
|
+
private defaultModels;
|
|
1443
1995
|
private metaWriteQueues;
|
|
1444
1996
|
constructor(registry: Registry, spawner?: AgentSpawner, store?: SessionStore, options?: SessionManagerOptions);
|
|
1445
1997
|
create(params: CreateSessionParams): Promise<Session>;
|
|
1446
1998
|
resurrect(params: ResurrectParams): Promise<Session>;
|
|
1447
1999
|
private doResurrect;
|
|
2000
|
+
private doResurrectFromImport;
|
|
1448
2001
|
private bootstrapAgent;
|
|
1449
2002
|
private attachManagerHooks;
|
|
1450
|
-
getHistory(sessionId: string): Promise<
|
|
2003
|
+
getHistory(sessionId: string): Promise<HistoryEntry[] | undefined>;
|
|
1451
2004
|
loadFromDisk(sessionId: string): Promise<ResurrectParams | undefined>;
|
|
2005
|
+
private deriveTitleFromHistory;
|
|
1452
2006
|
get(sessionId: string): Session | undefined;
|
|
1453
2007
|
resolveCanonicalId(input: string): Promise<string | undefined>;
|
|
1454
2008
|
require(sessionId: string): Session;
|
|
1455
2009
|
list(filter?: {
|
|
1456
2010
|
cwd?: string;
|
|
1457
2011
|
}): Promise<SessionListEntry[]>;
|
|
2012
|
+
exportBundle(sessionId: string): Promise<{
|
|
2013
|
+
record: SessionRecord & {
|
|
2014
|
+
lineageId: string;
|
|
2015
|
+
};
|
|
2016
|
+
history: HistoryEntry[];
|
|
2017
|
+
promptHistory: string[];
|
|
2018
|
+
} | undefined>;
|
|
2019
|
+
importBundle(bundle: Bundle, opts?: {
|
|
2020
|
+
replace?: boolean;
|
|
2021
|
+
}): Promise<{
|
|
2022
|
+
sessionId: string;
|
|
2023
|
+
importedFromSessionId: string;
|
|
2024
|
+
replaced: boolean;
|
|
2025
|
+
}>;
|
|
2026
|
+
private writeImportedRecord;
|
|
1458
2027
|
deleteRecord(sessionId: string): Promise<boolean>;
|
|
1459
2028
|
hasRecord(sessionId: string): Promise<boolean>;
|
|
1460
2029
|
private persistTitle;
|
|
@@ -1462,6 +2031,7 @@ declare class SessionManager {
|
|
|
1462
2031
|
private persistSnapshot;
|
|
1463
2032
|
private enqueueMetaWrite;
|
|
1464
2033
|
closeAll(): Promise<void>;
|
|
2034
|
+
flushMetaWrites(): Promise<void>;
|
|
1465
2035
|
}
|
|
1466
2036
|
|
|
1467
2037
|
interface ExtensionContext {
|
|
@@ -1532,7 +2102,7 @@ declare const paths: {
|
|
|
1532
2102
|
currentLogFile: () => string;
|
|
1533
2103
|
registryCache: () => string;
|
|
1534
2104
|
agentsDir: () => string;
|
|
1535
|
-
|
|
2105
|
+
agentInstallDir: (id: string, platformKey: string, version: string) => string;
|
|
1536
2106
|
sessionsDir: () => string;
|
|
1537
2107
|
sessionDir: (id: string) => string;
|
|
1538
2108
|
sessionFile: (id: string) => string;
|