@brainpilot/protocol 0.0.13 → 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/dist/domain.d.ts CHANGED
@@ -14,21 +14,28 @@ import { z } from "zod";
14
14
  * not a working default.
15
15
  */
16
16
  export declare const EXAMPLE_MODEL = "claude-sonnet-4-6";
17
+ /** Per-session domain-resource ablation mode. Defaults to full in the runtime. */
18
+ export declare const DomainResourcesSchema: z.ZodEnum<["full", "base"]>;
19
+ export type DomainResources = z.infer<typeof DomainResourcesSchema>;
17
20
  export declare const SessionSchema: z.ZodObject<{
18
21
  id: z.ZodString;
19
22
  title: z.ZodString;
20
23
  createdAt: z.ZodString;
21
24
  updatedAt: z.ZodString;
25
+ /** Optional for compatibility with older runtimes; new runtimes always emit it. */
26
+ domainResources: z.ZodOptional<z.ZodEnum<["full", "base"]>>;
22
27
  }, "strip", z.ZodTypeAny, {
23
28
  id: string;
24
29
  title: string;
25
30
  createdAt: string;
26
31
  updatedAt: string;
32
+ domainResources?: "full" | "base" | undefined;
27
33
  }, {
28
34
  id: string;
29
35
  title: string;
30
36
  createdAt: string;
31
37
  updatedAt: string;
38
+ domainResources?: "full" | "base" | undefined;
32
39
  }>;
33
40
  export type Session = z.infer<typeof SessionSchema>;
34
41
  /** §10 state authority enum. */
@@ -205,6 +212,632 @@ export declare const SessionTokenUsageSchema: z.ZodObject<{
205
212
  }>;
206
213
  }>;
207
214
  export type SessionTokenUsage = z.infer<typeof SessionTokenUsageSchema>;
215
+ /**
216
+ * Per-agent per-tool invocation counter. Key is the tool name (`"read"`,
217
+ * `"bash"`, `"skill_search"`, external-MCP-bridged names, …). Value is the
218
+ * number of times the runtime observed a `tool_execution_start` for that
219
+ * tool. Aborted mid-run tools still count — we count *invocations*, not
220
+ * *successful completions*; see `errors` on `AgentStatsSchema` for the
221
+ * failure counter.
222
+ */
223
+ export declare const ToolCallCountsSchema: z.ZodRecord<z.ZodString, z.ZodNumber>;
224
+ export type ToolCallCounts = z.infer<typeof ToolCallCountsSchema>;
225
+ /**
226
+ * Per-skill invocation counter. Split by the three `skill_search` sub-modes
227
+ * (see packages/runtime/src/tools/skill-search.ts):
228
+ * - `queries` — `mode="query"` with `keywords` (exploration; no body read)
229
+ * - `loads` — `mode="query"` with `skill_name` (returns full SKILL.md)
230
+ * - `browses` — `mode="browse"` (directory/file browse under a skill)
231
+ *
232
+ * A special key `"__search__"` collects `queries` where the args carried no
233
+ * `skill_name` (pure keyword search — the agent looked around but did not
234
+ * commit to a named skill). Args that fail to parse are also charged to
235
+ * `__search__.queries` so counters are never dropped silently.
236
+ */
237
+ export declare const SkillCounterSchema: z.ZodObject<{
238
+ queries: z.ZodNumber;
239
+ loads: z.ZodNumber;
240
+ browses: z.ZodNumber;
241
+ }, "strip", z.ZodTypeAny, {
242
+ queries: number;
243
+ loads: number;
244
+ browses: number;
245
+ }, {
246
+ queries: number;
247
+ loads: number;
248
+ browses: number;
249
+ }>;
250
+ export type SkillCounter = z.infer<typeof SkillCounterSchema>;
251
+ export declare const SkillCountsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
252
+ queries: z.ZodNumber;
253
+ loads: z.ZodNumber;
254
+ browses: z.ZodNumber;
255
+ }, "strip", z.ZodTypeAny, {
256
+ queries: number;
257
+ loads: number;
258
+ browses: number;
259
+ }, {
260
+ queries: number;
261
+ loads: number;
262
+ browses: number;
263
+ }>>;
264
+ export type SkillCounts = z.infer<typeof SkillCountsSchema>;
265
+ /**
266
+ * All countable stats for one agent, in one accounting unit (session
267
+ * cumulative, or a single RUN_STATS delta).
268
+ *
269
+ * `errors` counts `tool_execution_end.isError === true` per tool name; it is
270
+ * additive to `tools` — `tools[name]` is "attempted N times", `errors[name]`
271
+ * is "of those, M failed". We do not subtract.
272
+ */
273
+ export declare const AgentStatsSchema: z.ZodObject<{
274
+ tokens: z.ZodObject<{
275
+ input: z.ZodNumber;
276
+ output: z.ZodNumber;
277
+ cacheRead: z.ZodNumber;
278
+ cacheWrite: z.ZodNumber;
279
+ total: z.ZodNumber;
280
+ }, "strip", z.ZodTypeAny, {
281
+ input: number;
282
+ output: number;
283
+ cacheRead: number;
284
+ cacheWrite: number;
285
+ total: number;
286
+ }, {
287
+ input: number;
288
+ output: number;
289
+ cacheRead: number;
290
+ cacheWrite: number;
291
+ total: number;
292
+ }>;
293
+ tools: z.ZodRecord<z.ZodString, z.ZodNumber>;
294
+ skills: z.ZodRecord<z.ZodString, z.ZodObject<{
295
+ queries: z.ZodNumber;
296
+ loads: z.ZodNumber;
297
+ browses: z.ZodNumber;
298
+ }, "strip", z.ZodTypeAny, {
299
+ queries: number;
300
+ loads: number;
301
+ browses: number;
302
+ }, {
303
+ queries: number;
304
+ loads: number;
305
+ browses: number;
306
+ }>>;
307
+ errors: z.ZodRecord<z.ZodString, z.ZodNumber>;
308
+ }, "strip", z.ZodTypeAny, {
309
+ tokens: {
310
+ input: number;
311
+ output: number;
312
+ cacheRead: number;
313
+ cacheWrite: number;
314
+ total: number;
315
+ };
316
+ tools: Record<string, number>;
317
+ skills: Record<string, {
318
+ queries: number;
319
+ loads: number;
320
+ browses: number;
321
+ }>;
322
+ errors: Record<string, number>;
323
+ }, {
324
+ tokens: {
325
+ input: number;
326
+ output: number;
327
+ cacheRead: number;
328
+ cacheWrite: number;
329
+ total: number;
330
+ };
331
+ tools: Record<string, number>;
332
+ skills: Record<string, {
333
+ queries: number;
334
+ loads: number;
335
+ browses: number;
336
+ }>;
337
+ errors: Record<string, number>;
338
+ }>;
339
+ export type AgentStats = z.infer<typeof AgentStatsSchema>;
340
+ /** Status stamped onto a `RunStats` entry when it is finalized. */
341
+ export declare const RunStatsStatusSchema: z.ZodEnum<["ok", "error", "aborted"]>;
342
+ export type RunStatsStatus = z.infer<typeof RunStatsStatusSchema>;
343
+ /**
344
+ * One completed run's contribution, computed as `cumulative_after -
345
+ * cumulative_before`. Appended to `SessionStats.byRun` when the run reaches
346
+ * a terminal event (`RUN_FINISHED` / `RUN_ERROR`) or is aborted.
347
+ */
348
+ export declare const RunStatsSchema: z.ZodObject<{
349
+ runId: z.ZodString;
350
+ agentName: z.ZodString;
351
+ startedAt: z.ZodNumber;
352
+ finishedAt: z.ZodNumber;
353
+ status: z.ZodEnum<["ok", "error", "aborted"]>;
354
+ delta: z.ZodObject<{
355
+ tokens: z.ZodObject<{
356
+ input: z.ZodNumber;
357
+ output: z.ZodNumber;
358
+ cacheRead: z.ZodNumber;
359
+ cacheWrite: z.ZodNumber;
360
+ total: z.ZodNumber;
361
+ }, "strip", z.ZodTypeAny, {
362
+ input: number;
363
+ output: number;
364
+ cacheRead: number;
365
+ cacheWrite: number;
366
+ total: number;
367
+ }, {
368
+ input: number;
369
+ output: number;
370
+ cacheRead: number;
371
+ cacheWrite: number;
372
+ total: number;
373
+ }>;
374
+ tools: z.ZodRecord<z.ZodString, z.ZodNumber>;
375
+ skills: z.ZodRecord<z.ZodString, z.ZodObject<{
376
+ queries: z.ZodNumber;
377
+ loads: z.ZodNumber;
378
+ browses: z.ZodNumber;
379
+ }, "strip", z.ZodTypeAny, {
380
+ queries: number;
381
+ loads: number;
382
+ browses: number;
383
+ }, {
384
+ queries: number;
385
+ loads: number;
386
+ browses: number;
387
+ }>>;
388
+ errors: z.ZodRecord<z.ZodString, z.ZodNumber>;
389
+ }, "strip", z.ZodTypeAny, {
390
+ tokens: {
391
+ input: number;
392
+ output: number;
393
+ cacheRead: number;
394
+ cacheWrite: number;
395
+ total: number;
396
+ };
397
+ tools: Record<string, number>;
398
+ skills: Record<string, {
399
+ queries: number;
400
+ loads: number;
401
+ browses: number;
402
+ }>;
403
+ errors: Record<string, number>;
404
+ }, {
405
+ tokens: {
406
+ input: number;
407
+ output: number;
408
+ cacheRead: number;
409
+ cacheWrite: number;
410
+ total: number;
411
+ };
412
+ tools: Record<string, number>;
413
+ skills: Record<string, {
414
+ queries: number;
415
+ loads: number;
416
+ browses: number;
417
+ }>;
418
+ errors: Record<string, number>;
419
+ }>;
420
+ }, "strip", z.ZodTypeAny, {
421
+ status: "aborted" | "error" | "ok";
422
+ runId: string;
423
+ agentName: string;
424
+ startedAt: number;
425
+ finishedAt: number;
426
+ delta: {
427
+ tokens: {
428
+ input: number;
429
+ output: number;
430
+ cacheRead: number;
431
+ cacheWrite: number;
432
+ total: number;
433
+ };
434
+ tools: Record<string, number>;
435
+ skills: Record<string, {
436
+ queries: number;
437
+ loads: number;
438
+ browses: number;
439
+ }>;
440
+ errors: Record<string, number>;
441
+ };
442
+ }, {
443
+ status: "aborted" | "error" | "ok";
444
+ runId: string;
445
+ agentName: string;
446
+ startedAt: number;
447
+ finishedAt: number;
448
+ delta: {
449
+ tokens: {
450
+ input: number;
451
+ output: number;
452
+ cacheRead: number;
453
+ cacheWrite: number;
454
+ total: number;
455
+ };
456
+ tools: Record<string, number>;
457
+ skills: Record<string, {
458
+ queries: number;
459
+ loads: number;
460
+ browses: number;
461
+ }>;
462
+ errors: Record<string, number>;
463
+ };
464
+ }>;
465
+ export type RunStats = z.infer<typeof RunStatsSchema>;
466
+ /**
467
+ * Full stats snapshot for one session:
468
+ * - `total` — everything summed across agents and runs.
469
+ * - `byAgent` — per-agent cumulative (mirrors `SessionTokenUsage.byAgent`).
470
+ * - `byRun` — time-ordered per-run deltas. Append-only; never truncated
471
+ * (`events.jsonl` is the ultimate SSOT and is uncapped, so
472
+ * this stays bounded by the same envelope).
473
+ */
474
+ export declare const SessionStatsSchema: z.ZodObject<{
475
+ sessionId: z.ZodString;
476
+ total: z.ZodObject<{
477
+ tokens: z.ZodObject<{
478
+ input: z.ZodNumber;
479
+ output: z.ZodNumber;
480
+ cacheRead: z.ZodNumber;
481
+ cacheWrite: z.ZodNumber;
482
+ total: z.ZodNumber;
483
+ }, "strip", z.ZodTypeAny, {
484
+ input: number;
485
+ output: number;
486
+ cacheRead: number;
487
+ cacheWrite: number;
488
+ total: number;
489
+ }, {
490
+ input: number;
491
+ output: number;
492
+ cacheRead: number;
493
+ cacheWrite: number;
494
+ total: number;
495
+ }>;
496
+ tools: z.ZodRecord<z.ZodString, z.ZodNumber>;
497
+ skills: z.ZodRecord<z.ZodString, z.ZodObject<{
498
+ queries: z.ZodNumber;
499
+ loads: z.ZodNumber;
500
+ browses: z.ZodNumber;
501
+ }, "strip", z.ZodTypeAny, {
502
+ queries: number;
503
+ loads: number;
504
+ browses: number;
505
+ }, {
506
+ queries: number;
507
+ loads: number;
508
+ browses: number;
509
+ }>>;
510
+ errors: z.ZodRecord<z.ZodString, z.ZodNumber>;
511
+ }, "strip", z.ZodTypeAny, {
512
+ tokens: {
513
+ input: number;
514
+ output: number;
515
+ cacheRead: number;
516
+ cacheWrite: number;
517
+ total: number;
518
+ };
519
+ tools: Record<string, number>;
520
+ skills: Record<string, {
521
+ queries: number;
522
+ loads: number;
523
+ browses: number;
524
+ }>;
525
+ errors: Record<string, number>;
526
+ }, {
527
+ tokens: {
528
+ input: number;
529
+ output: number;
530
+ cacheRead: number;
531
+ cacheWrite: number;
532
+ total: number;
533
+ };
534
+ tools: Record<string, number>;
535
+ skills: Record<string, {
536
+ queries: number;
537
+ loads: number;
538
+ browses: number;
539
+ }>;
540
+ errors: Record<string, number>;
541
+ }>;
542
+ byAgent: z.ZodRecord<z.ZodString, z.ZodObject<{
543
+ tokens: z.ZodObject<{
544
+ input: z.ZodNumber;
545
+ output: z.ZodNumber;
546
+ cacheRead: z.ZodNumber;
547
+ cacheWrite: z.ZodNumber;
548
+ total: z.ZodNumber;
549
+ }, "strip", z.ZodTypeAny, {
550
+ input: number;
551
+ output: number;
552
+ cacheRead: number;
553
+ cacheWrite: number;
554
+ total: number;
555
+ }, {
556
+ input: number;
557
+ output: number;
558
+ cacheRead: number;
559
+ cacheWrite: number;
560
+ total: number;
561
+ }>;
562
+ tools: z.ZodRecord<z.ZodString, z.ZodNumber>;
563
+ skills: z.ZodRecord<z.ZodString, z.ZodObject<{
564
+ queries: z.ZodNumber;
565
+ loads: z.ZodNumber;
566
+ browses: z.ZodNumber;
567
+ }, "strip", z.ZodTypeAny, {
568
+ queries: number;
569
+ loads: number;
570
+ browses: number;
571
+ }, {
572
+ queries: number;
573
+ loads: number;
574
+ browses: number;
575
+ }>>;
576
+ errors: z.ZodRecord<z.ZodString, z.ZodNumber>;
577
+ }, "strip", z.ZodTypeAny, {
578
+ tokens: {
579
+ input: number;
580
+ output: number;
581
+ cacheRead: number;
582
+ cacheWrite: number;
583
+ total: number;
584
+ };
585
+ tools: Record<string, number>;
586
+ skills: Record<string, {
587
+ queries: number;
588
+ loads: number;
589
+ browses: number;
590
+ }>;
591
+ errors: Record<string, number>;
592
+ }, {
593
+ tokens: {
594
+ input: number;
595
+ output: number;
596
+ cacheRead: number;
597
+ cacheWrite: number;
598
+ total: number;
599
+ };
600
+ tools: Record<string, number>;
601
+ skills: Record<string, {
602
+ queries: number;
603
+ loads: number;
604
+ browses: number;
605
+ }>;
606
+ errors: Record<string, number>;
607
+ }>>;
608
+ byRun: z.ZodArray<z.ZodObject<{
609
+ runId: z.ZodString;
610
+ agentName: z.ZodString;
611
+ startedAt: z.ZodNumber;
612
+ finishedAt: z.ZodNumber;
613
+ status: z.ZodEnum<["ok", "error", "aborted"]>;
614
+ delta: z.ZodObject<{
615
+ tokens: z.ZodObject<{
616
+ input: z.ZodNumber;
617
+ output: z.ZodNumber;
618
+ cacheRead: z.ZodNumber;
619
+ cacheWrite: z.ZodNumber;
620
+ total: z.ZodNumber;
621
+ }, "strip", z.ZodTypeAny, {
622
+ input: number;
623
+ output: number;
624
+ cacheRead: number;
625
+ cacheWrite: number;
626
+ total: number;
627
+ }, {
628
+ input: number;
629
+ output: number;
630
+ cacheRead: number;
631
+ cacheWrite: number;
632
+ total: number;
633
+ }>;
634
+ tools: z.ZodRecord<z.ZodString, z.ZodNumber>;
635
+ skills: z.ZodRecord<z.ZodString, z.ZodObject<{
636
+ queries: z.ZodNumber;
637
+ loads: z.ZodNumber;
638
+ browses: z.ZodNumber;
639
+ }, "strip", z.ZodTypeAny, {
640
+ queries: number;
641
+ loads: number;
642
+ browses: number;
643
+ }, {
644
+ queries: number;
645
+ loads: number;
646
+ browses: number;
647
+ }>>;
648
+ errors: z.ZodRecord<z.ZodString, z.ZodNumber>;
649
+ }, "strip", z.ZodTypeAny, {
650
+ tokens: {
651
+ input: number;
652
+ output: number;
653
+ cacheRead: number;
654
+ cacheWrite: number;
655
+ total: number;
656
+ };
657
+ tools: Record<string, number>;
658
+ skills: Record<string, {
659
+ queries: number;
660
+ loads: number;
661
+ browses: number;
662
+ }>;
663
+ errors: Record<string, number>;
664
+ }, {
665
+ tokens: {
666
+ input: number;
667
+ output: number;
668
+ cacheRead: number;
669
+ cacheWrite: number;
670
+ total: number;
671
+ };
672
+ tools: Record<string, number>;
673
+ skills: Record<string, {
674
+ queries: number;
675
+ loads: number;
676
+ browses: number;
677
+ }>;
678
+ errors: Record<string, number>;
679
+ }>;
680
+ }, "strip", z.ZodTypeAny, {
681
+ status: "aborted" | "error" | "ok";
682
+ runId: string;
683
+ agentName: string;
684
+ startedAt: number;
685
+ finishedAt: number;
686
+ delta: {
687
+ tokens: {
688
+ input: number;
689
+ output: number;
690
+ cacheRead: number;
691
+ cacheWrite: number;
692
+ total: number;
693
+ };
694
+ tools: Record<string, number>;
695
+ skills: Record<string, {
696
+ queries: number;
697
+ loads: number;
698
+ browses: number;
699
+ }>;
700
+ errors: Record<string, number>;
701
+ };
702
+ }, {
703
+ status: "aborted" | "error" | "ok";
704
+ runId: string;
705
+ agentName: string;
706
+ startedAt: number;
707
+ finishedAt: number;
708
+ delta: {
709
+ tokens: {
710
+ input: number;
711
+ output: number;
712
+ cacheRead: number;
713
+ cacheWrite: number;
714
+ total: number;
715
+ };
716
+ tools: Record<string, number>;
717
+ skills: Record<string, {
718
+ queries: number;
719
+ loads: number;
720
+ browses: number;
721
+ }>;
722
+ errors: Record<string, number>;
723
+ };
724
+ }>, "many">;
725
+ }, "strip", z.ZodTypeAny, {
726
+ total: {
727
+ tokens: {
728
+ input: number;
729
+ output: number;
730
+ cacheRead: number;
731
+ cacheWrite: number;
732
+ total: number;
733
+ };
734
+ tools: Record<string, number>;
735
+ skills: Record<string, {
736
+ queries: number;
737
+ loads: number;
738
+ browses: number;
739
+ }>;
740
+ errors: Record<string, number>;
741
+ };
742
+ byAgent: Record<string, {
743
+ tokens: {
744
+ input: number;
745
+ output: number;
746
+ cacheRead: number;
747
+ cacheWrite: number;
748
+ total: number;
749
+ };
750
+ tools: Record<string, number>;
751
+ skills: Record<string, {
752
+ queries: number;
753
+ loads: number;
754
+ browses: number;
755
+ }>;
756
+ errors: Record<string, number>;
757
+ }>;
758
+ sessionId: string;
759
+ byRun: {
760
+ status: "aborted" | "error" | "ok";
761
+ runId: string;
762
+ agentName: string;
763
+ startedAt: number;
764
+ finishedAt: number;
765
+ delta: {
766
+ tokens: {
767
+ input: number;
768
+ output: number;
769
+ cacheRead: number;
770
+ cacheWrite: number;
771
+ total: number;
772
+ };
773
+ tools: Record<string, number>;
774
+ skills: Record<string, {
775
+ queries: number;
776
+ loads: number;
777
+ browses: number;
778
+ }>;
779
+ errors: Record<string, number>;
780
+ };
781
+ }[];
782
+ }, {
783
+ total: {
784
+ tokens: {
785
+ input: number;
786
+ output: number;
787
+ cacheRead: number;
788
+ cacheWrite: number;
789
+ total: number;
790
+ };
791
+ tools: Record<string, number>;
792
+ skills: Record<string, {
793
+ queries: number;
794
+ loads: number;
795
+ browses: number;
796
+ }>;
797
+ errors: Record<string, number>;
798
+ };
799
+ byAgent: Record<string, {
800
+ tokens: {
801
+ input: number;
802
+ output: number;
803
+ cacheRead: number;
804
+ cacheWrite: number;
805
+ total: number;
806
+ };
807
+ tools: Record<string, number>;
808
+ skills: Record<string, {
809
+ queries: number;
810
+ loads: number;
811
+ browses: number;
812
+ }>;
813
+ errors: Record<string, number>;
814
+ }>;
815
+ sessionId: string;
816
+ byRun: {
817
+ status: "aborted" | "error" | "ok";
818
+ runId: string;
819
+ agentName: string;
820
+ startedAt: number;
821
+ finishedAt: number;
822
+ delta: {
823
+ tokens: {
824
+ input: number;
825
+ output: number;
826
+ cacheRead: number;
827
+ cacheWrite: number;
828
+ total: number;
829
+ };
830
+ tools: Record<string, number>;
831
+ skills: Record<string, {
832
+ queries: number;
833
+ loads: number;
834
+ browses: number;
835
+ }>;
836
+ errors: Record<string, number>;
837
+ };
838
+ }[];
839
+ }>;
840
+ export type SessionStats = z.infer<typeof SessionStatsSchema>;
208
841
  /**
209
842
  * Authoritative live session state. Identical shape across SSE first frame
210
843
  * (`CUSTOM:session_state`), push events, and `GET /sessions/:id/state`.
@@ -214,11 +847,11 @@ export declare const SessionStateSnapshotSchema: z.ZodObject<{
214
847
  active: z.ZodBoolean;
215
848
  runId: z.ZodNullable<z.ZodString>;
216
849
  }, "strip", z.ZodTypeAny, {
217
- active: boolean;
218
850
  runId: string | null;
219
- }, {
220
851
  active: boolean;
852
+ }, {
221
853
  runId: string | null;
854
+ active: boolean;
222
855
  }>;
223
856
  agents: z.ZodArray<z.ZodObject<{
224
857
  name: z.ZodString;
@@ -240,6 +873,8 @@ export declare const SessionStateSnapshotSchema: z.ZodObject<{
240
873
  alive?: boolean | undefined;
241
874
  }>, "many">;
242
875
  lastActivityTs: z.ZodString;
876
+ /** Frozen when the session is created and persisted across restore. */
877
+ domainResources: z.ZodOptional<z.ZodEnum<["full", "base"]>>;
243
878
  /**
244
879
  * Cumulative real token usage for this session (total + per-agent). Optional
245
880
  * for forward/backward compat: a frame from an older runtime, or before the
@@ -317,8 +952,8 @@ export declare const SessionStateSnapshotSchema: z.ZodObject<{
317
952
  }>>;
318
953
  }, "strip", z.ZodTypeAny, {
319
954
  runState: {
320
- active: boolean;
321
955
  runId: string | null;
956
+ active: boolean;
322
957
  };
323
958
  agents: {
324
959
  status: string;
@@ -328,6 +963,7 @@ export declare const SessionStateSnapshotSchema: z.ZodObject<{
328
963
  alive?: boolean | undefined;
329
964
  }[];
330
965
  lastActivityTs: string;
966
+ domainResources?: "full" | "base" | undefined;
331
967
  tokenUsage?: {
332
968
  total: {
333
969
  input: number;
@@ -346,8 +982,8 @@ export declare const SessionStateSnapshotSchema: z.ZodObject<{
346
982
  } | undefined;
347
983
  }, {
348
984
  runState: {
349
- active: boolean;
350
985
  runId: string | null;
986
+ active: boolean;
351
987
  };
352
988
  agents: {
353
989
  status: string;
@@ -357,6 +993,7 @@ export declare const SessionStateSnapshotSchema: z.ZodObject<{
357
993
  alive?: boolean | undefined;
358
994
  }[];
359
995
  lastActivityTs: string;
996
+ domainResources?: "full" | "base" | undefined;
360
997
  tokenUsage?: {
361
998
  total: {
362
999
  input: number;
@@ -479,10 +1116,10 @@ export declare const TraceNodeSchema: z.ZodObject<{
479
1116
  toolCalls: z.ZodArray<z.ZodString, "many">;
480
1117
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
481
1118
  }, "strip", z.ZodTypeAny, {
482
- id: string;
483
- title: string;
484
1119
  type: string;
485
1120
  status: string;
1121
+ id: string;
1122
+ title: string;
486
1123
  parents: {
487
1124
  id: string;
488
1125
  relation?: string | undefined;
@@ -514,10 +1151,10 @@ export declare const TraceNodeSchema: z.ZodObject<{
514
1151
  errorMessage?: string | undefined;
515
1152
  metadata?: Record<string, unknown> | undefined;
516
1153
  }, {
517
- id: string;
518
- title: string;
519
1154
  type: string;
520
1155
  status: string;
1156
+ id: string;
1157
+ title: string;
521
1158
  parents: {
522
1159
  id: string;
523
1160
  relation?: string | undefined;
@@ -630,10 +1267,10 @@ export declare const TraceGraphSchema: z.ZodObject<{
630
1267
  toolCalls: z.ZodArray<z.ZodString, "many">;
631
1268
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
632
1269
  }, "strip", z.ZodTypeAny, {
633
- id: string;
634
- title: string;
635
1270
  type: string;
636
1271
  status: string;
1272
+ id: string;
1273
+ title: string;
637
1274
  parents: {
638
1275
  id: string;
639
1276
  relation?: string | undefined;
@@ -665,10 +1302,10 @@ export declare const TraceGraphSchema: z.ZodObject<{
665
1302
  errorMessage?: string | undefined;
666
1303
  metadata?: Record<string, unknown> | undefined;
667
1304
  }, {
668
- id: string;
669
- title: string;
670
1305
  type: string;
671
1306
  status: string;
1307
+ id: string;
1308
+ title: string;
672
1309
  parents: {
673
1310
  id: string;
674
1311
  relation?: string | undefined;
@@ -711,10 +1348,10 @@ export declare const TraceGraphSchema: z.ZodObject<{
711
1348
  [k: string]: unknown;
712
1349
  };
713
1350
  nodes: {
714
- id: string;
715
- title: string;
716
1351
  type: string;
717
1352
  status: string;
1353
+ id: string;
1354
+ title: string;
718
1355
  parents: {
719
1356
  id: string;
720
1357
  relation?: string | undefined;
@@ -757,10 +1394,10 @@ export declare const TraceGraphSchema: z.ZodObject<{
757
1394
  [k: string]: unknown;
758
1395
  };
759
1396
  nodes: {
760
- id: string;
761
- title: string;
762
1397
  type: string;
763
1398
  status: string;
1399
+ id: string;
1400
+ title: string;
764
1401
  parents: {
765
1402
  id: string;
766
1403
  relation?: string | undefined;