@fnndsc/menu 0.9.0 → 0.10.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.
@@ -427,10 +427,74 @@ export declare const watchedMessageSchema: z.ZodObject<{
427
427
  state: "live" | "settled" | "stale";
428
428
  }>;
429
429
  export type WatchedMessage = z.infer<typeof watchedMessageSchema>;
430
+ /**
431
+ * Which listing the session's numbers currently count.
432
+ *
433
+ * A row can be named by the number beside it (`gather add @2,3`), and the
434
+ * numbers belong to the session's most recent ANSWER. A surface has to know
435
+ * WHICH listing that is, or it would light the index pills on a pane whose
436
+ * rows are no longer the ones `@2` would reach — and pills that lie are
437
+ * worse than no pills. Pushed whenever the answer changes, and to a late
438
+ * attacher, the way regard is.
439
+ */
440
+ export declare const numberedMessageSchema: z.ZodObject<{
441
+ type: z.ZodLiteral<"numbered">;
442
+ /** Rises with each answer, so a surface can tell newer from older. */
443
+ id: z.ZodNumber;
444
+ /** The line that produced the answer, which is how a pane recognises its own. */
445
+ source: z.ZodString;
446
+ /** How many rows are numbered. */
447
+ rows: z.ZodNumber;
448
+ /**
449
+ * Each numbered row's handle beside its address.
450
+ *
451
+ * An index says what it counts — `@SER003`, `@STD001`, `@FIL012`,
452
+ * `@DIR004` — one sequence per kind across the answer. A surface finds
453
+ * each of its rows by address and draws the code, rather than counting
454
+ * down the screen, so a sorted or filtered listing still shows each row
455
+ * the handle that reaches it. Capped: a listing of thousands is numbered
456
+ * in the kernel and simply unnumbered on screen.
457
+ */
458
+ handles: z.ZodArray<z.ZodObject<{
459
+ kind: z.ZodString;
460
+ ordinal: z.ZodNumber;
461
+ address: z.ZodString;
462
+ }, "strip", z.ZodTypeAny, {
463
+ kind: string;
464
+ address: string;
465
+ ordinal: number;
466
+ }, {
467
+ kind: string;
468
+ address: string;
469
+ ordinal: number;
470
+ }>, "many">;
471
+ }, "strip", z.ZodTypeAny, {
472
+ id: number;
473
+ type: "numbered";
474
+ rows: number;
475
+ source: string;
476
+ handles: {
477
+ kind: string;
478
+ address: string;
479
+ ordinal: number;
480
+ }[];
481
+ }, {
482
+ id: number;
483
+ type: "numbered";
484
+ rows: number;
485
+ source: string;
486
+ handles: {
487
+ kind: string;
488
+ address: string;
489
+ ordinal: number;
490
+ }[];
491
+ }>;
492
+ export type NumberedMessage = z.infer<typeof numberedMessageSchema>;
430
493
  /**
431
494
  * An event the engine originates on its own — a sampler's refreshed model,
432
- * a watch changing state — rather than in answer to a command. The daemon
433
- * relays it to every surface; it never enters scrollback.
495
+ * a watch changing state, the numbering moving to another listing — rather
496
+ * than in answer to a command. The daemon relays it to every surface; it
497
+ * never enters scrollback.
434
498
  */
435
499
  export type AmbientEvent = {
436
500
  kind: 'envelope';
@@ -439,6 +503,16 @@ export type AmbientEvent = {
439
503
  kind: 'watched';
440
504
  subject: string;
441
505
  state: WatchState;
506
+ } | {
507
+ kind: 'numbered';
508
+ id: number;
509
+ source: string;
510
+ rows: number;
511
+ handles: Array<{
512
+ kind: string;
513
+ ordinal: number;
514
+ address: string;
515
+ }>;
442
516
  };
443
517
  /** Any message a surface may send to the daemon. */
444
518
  export declare const clientMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
@@ -1017,7 +1091,7 @@ export declare const progressMessageSchema: z.ZodObject<{
1017
1091
  itemId?: string | undefined;
1018
1092
  current?: number | undefined;
1019
1093
  percent?: number | undefined;
1020
- unit?: "nodes" | "series" | "bytes" | "files" | "jobs" | undefined;
1094
+ unit?: "nodes" | "jobs" | "series" | "bytes" | "files" | undefined;
1021
1095
  }, {
1022
1096
  id: string;
1023
1097
  type: "progress";
@@ -1347,6 +1421,50 @@ export declare const promptContextSchema: z.ZodObject<{
1347
1421
  failed?: string | undefined;
1348
1422
  }>, "many">>;
1349
1423
  arrived: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
1424
+ landed: z.ZodOptional<z.ZodArray<z.ZodObject<{
1425
+ id: z.ZodNumber;
1426
+ jobs: z.ZodNumber;
1427
+ status: z.ZodString;
1428
+ chain: z.ZodArray<z.ZodString, "many">;
1429
+ groups: z.ZodDefault<z.ZodArray<z.ZodObject<{
1430
+ plugin: z.ZodString;
1431
+ count: z.ZodNumber;
1432
+ status: z.ZodString;
1433
+ parent: z.ZodNullable<z.ZodNumber>;
1434
+ }, "strip", z.ZodTypeAny, {
1435
+ status: string;
1436
+ count: number;
1437
+ plugin: string;
1438
+ parent: number | null;
1439
+ }, {
1440
+ status: string;
1441
+ count: number;
1442
+ plugin: string;
1443
+ parent: number | null;
1444
+ }>, "many">>;
1445
+ }, "strip", z.ZodTypeAny, {
1446
+ id: number;
1447
+ status: string;
1448
+ jobs: number;
1449
+ chain: string[];
1450
+ groups: {
1451
+ status: string;
1452
+ count: number;
1453
+ plugin: string;
1454
+ parent: number | null;
1455
+ }[];
1456
+ }, {
1457
+ id: number;
1458
+ status: string;
1459
+ jobs: number;
1460
+ chain: string[];
1461
+ groups?: {
1462
+ status: string;
1463
+ count: number;
1464
+ plugin: string;
1465
+ parent: number | null;
1466
+ }[] | undefined;
1467
+ }>, "many">>;
1350
1468
  roster: z.ZodOptional<z.ZodEnum<["delta", "full"]>>;
1351
1469
  }, "strip", z.ZodTypeAny, {
1352
1470
  loaded: number;
@@ -1367,6 +1485,18 @@ export declare const promptContextSchema: z.ZodObject<{
1367
1485
  failed?: string | undefined;
1368
1486
  } | undefined;
1369
1487
  arrived?: number[] | undefined;
1488
+ landed?: {
1489
+ id: number;
1490
+ status: string;
1491
+ jobs: number;
1492
+ chain: string[];
1493
+ groups: {
1494
+ status: string;
1495
+ count: number;
1496
+ plugin: string;
1497
+ parent: number | null;
1498
+ }[];
1499
+ }[] | undefined;
1370
1500
  roster?: "delta" | "full" | undefined;
1371
1501
  }, {
1372
1502
  loaded: number;
@@ -1387,6 +1517,18 @@ export declare const promptContextSchema: z.ZodObject<{
1387
1517
  failed?: string | undefined;
1388
1518
  } | undefined;
1389
1519
  arrived?: number[] | undefined;
1520
+ landed?: {
1521
+ id: number;
1522
+ status: string;
1523
+ jobs: number;
1524
+ chain: string[];
1525
+ groups?: {
1526
+ status: string;
1527
+ count: number;
1528
+ plugin: string;
1529
+ parent: number | null;
1530
+ }[] | undefined;
1531
+ }[] | undefined;
1390
1532
  roster?: "delta" | "full" | undefined;
1391
1533
  }>>;
1392
1534
  procIndex: z.ZodOptional<z.ZodObject<{
@@ -1440,6 +1582,18 @@ export declare const promptContextSchema: z.ZodObject<{
1440
1582
  failed?: string | undefined;
1441
1583
  } | undefined;
1442
1584
  arrived?: number[] | undefined;
1585
+ landed?: {
1586
+ id: number;
1587
+ status: string;
1588
+ jobs: number;
1589
+ chain: string[];
1590
+ groups: {
1591
+ status: string;
1592
+ count: number;
1593
+ plugin: string;
1594
+ parent: number | null;
1595
+ }[];
1596
+ }[] | undefined;
1443
1597
  roster?: "delta" | "full" | undefined;
1444
1598
  } | undefined;
1445
1599
  procIndex?: {
@@ -1477,6 +1631,18 @@ export declare const promptContextSchema: z.ZodObject<{
1477
1631
  failed?: string | undefined;
1478
1632
  } | undefined;
1479
1633
  arrived?: number[] | undefined;
1634
+ landed?: {
1635
+ id: number;
1636
+ status: string;
1637
+ jobs: number;
1638
+ chain: string[];
1639
+ groups?: {
1640
+ status: string;
1641
+ count: number;
1642
+ plugin: string;
1643
+ parent: number | null;
1644
+ }[] | undefined;
1645
+ }[] | undefined;
1480
1646
  roster?: "delta" | "full" | undefined;
1481
1647
  } | undefined;
1482
1648
  procIndex?: {
@@ -1544,6 +1710,50 @@ export declare const promptLineMessageSchema: z.ZodObject<{
1544
1710
  failed?: string | undefined;
1545
1711
  }>, "many">>;
1546
1712
  arrived: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
1713
+ landed: z.ZodOptional<z.ZodArray<z.ZodObject<{
1714
+ id: z.ZodNumber;
1715
+ jobs: z.ZodNumber;
1716
+ status: z.ZodString;
1717
+ chain: z.ZodArray<z.ZodString, "many">;
1718
+ groups: z.ZodDefault<z.ZodArray<z.ZodObject<{
1719
+ plugin: z.ZodString;
1720
+ count: z.ZodNumber;
1721
+ status: z.ZodString;
1722
+ parent: z.ZodNullable<z.ZodNumber>;
1723
+ }, "strip", z.ZodTypeAny, {
1724
+ status: string;
1725
+ count: number;
1726
+ plugin: string;
1727
+ parent: number | null;
1728
+ }, {
1729
+ status: string;
1730
+ count: number;
1731
+ plugin: string;
1732
+ parent: number | null;
1733
+ }>, "many">>;
1734
+ }, "strip", z.ZodTypeAny, {
1735
+ id: number;
1736
+ status: string;
1737
+ jobs: number;
1738
+ chain: string[];
1739
+ groups: {
1740
+ status: string;
1741
+ count: number;
1742
+ plugin: string;
1743
+ parent: number | null;
1744
+ }[];
1745
+ }, {
1746
+ id: number;
1747
+ status: string;
1748
+ jobs: number;
1749
+ chain: string[];
1750
+ groups?: {
1751
+ status: string;
1752
+ count: number;
1753
+ plugin: string;
1754
+ parent: number | null;
1755
+ }[] | undefined;
1756
+ }>, "many">>;
1547
1757
  roster: z.ZodOptional<z.ZodEnum<["delta", "full"]>>;
1548
1758
  }, "strip", z.ZodTypeAny, {
1549
1759
  loaded: number;
@@ -1564,6 +1774,18 @@ export declare const promptLineMessageSchema: z.ZodObject<{
1564
1774
  failed?: string | undefined;
1565
1775
  } | undefined;
1566
1776
  arrived?: number[] | undefined;
1777
+ landed?: {
1778
+ id: number;
1779
+ status: string;
1780
+ jobs: number;
1781
+ chain: string[];
1782
+ groups: {
1783
+ status: string;
1784
+ count: number;
1785
+ plugin: string;
1786
+ parent: number | null;
1787
+ }[];
1788
+ }[] | undefined;
1567
1789
  roster?: "delta" | "full" | undefined;
1568
1790
  }, {
1569
1791
  loaded: number;
@@ -1584,6 +1806,18 @@ export declare const promptLineMessageSchema: z.ZodObject<{
1584
1806
  failed?: string | undefined;
1585
1807
  } | undefined;
1586
1808
  arrived?: number[] | undefined;
1809
+ landed?: {
1810
+ id: number;
1811
+ status: string;
1812
+ jobs: number;
1813
+ chain: string[];
1814
+ groups?: {
1815
+ status: string;
1816
+ count: number;
1817
+ plugin: string;
1818
+ parent: number | null;
1819
+ }[] | undefined;
1820
+ }[] | undefined;
1587
1821
  roster?: "delta" | "full" | undefined;
1588
1822
  }>>;
1589
1823
  procIndex: z.ZodOptional<z.ZodObject<{
@@ -1637,6 +1871,18 @@ export declare const promptLineMessageSchema: z.ZodObject<{
1637
1871
  failed?: string | undefined;
1638
1872
  } | undefined;
1639
1873
  arrived?: number[] | undefined;
1874
+ landed?: {
1875
+ id: number;
1876
+ status: string;
1877
+ jobs: number;
1878
+ chain: string[];
1879
+ groups: {
1880
+ status: string;
1881
+ count: number;
1882
+ plugin: string;
1883
+ parent: number | null;
1884
+ }[];
1885
+ }[] | undefined;
1640
1886
  roster?: "delta" | "full" | undefined;
1641
1887
  } | undefined;
1642
1888
  procIndex?: {
@@ -1674,6 +1920,18 @@ export declare const promptLineMessageSchema: z.ZodObject<{
1674
1920
  failed?: string | undefined;
1675
1921
  } | undefined;
1676
1922
  arrived?: number[] | undefined;
1923
+ landed?: {
1924
+ id: number;
1925
+ status: string;
1926
+ jobs: number;
1927
+ chain: string[];
1928
+ groups?: {
1929
+ status: string;
1930
+ count: number;
1931
+ plugin: string;
1932
+ parent: number | null;
1933
+ }[] | undefined;
1934
+ }[] | undefined;
1677
1935
  roster?: "delta" | "full" | undefined;
1678
1936
  } | undefined;
1679
1937
  procIndex?: {
@@ -1714,6 +1972,18 @@ export declare const promptLineMessageSchema: z.ZodObject<{
1714
1972
  failed?: string | undefined;
1715
1973
  } | undefined;
1716
1974
  arrived?: number[] | undefined;
1975
+ landed?: {
1976
+ id: number;
1977
+ status: string;
1978
+ jobs: number;
1979
+ chain: string[];
1980
+ groups: {
1981
+ status: string;
1982
+ count: number;
1983
+ plugin: string;
1984
+ parent: number | null;
1985
+ }[];
1986
+ }[] | undefined;
1717
1987
  roster?: "delta" | "full" | undefined;
1718
1988
  } | undefined;
1719
1989
  procIndex?: {
@@ -1754,6 +2024,18 @@ export declare const promptLineMessageSchema: z.ZodObject<{
1754
2024
  failed?: string | undefined;
1755
2025
  } | undefined;
1756
2026
  arrived?: number[] | undefined;
2027
+ landed?: {
2028
+ id: number;
2029
+ status: string;
2030
+ jobs: number;
2031
+ chain: string[];
2032
+ groups?: {
2033
+ status: string;
2034
+ count: number;
2035
+ plugin: string;
2036
+ parent: number | null;
2037
+ }[] | undefined;
2038
+ }[] | undefined;
1757
2039
  roster?: "delta" | "full" | undefined;
1758
2040
  } | undefined;
1759
2041
  procIndex?: {
@@ -2245,7 +2527,7 @@ export declare const serverMessageSchema: z.ZodDiscriminatedUnion<"type", [z.Zod
2245
2527
  itemId?: string | undefined;
2246
2528
  current?: number | undefined;
2247
2529
  percent?: number | undefined;
2248
- unit?: "nodes" | "series" | "bytes" | "files" | "jobs" | undefined;
2530
+ unit?: "nodes" | "jobs" | "series" | "bytes" | "files" | undefined;
2249
2531
  }, {
2250
2532
  id: string;
2251
2533
  type: "progress";
@@ -2496,6 +2778,50 @@ export declare const serverMessageSchema: z.ZodDiscriminatedUnion<"type", [z.Zod
2496
2778
  failed?: string | undefined;
2497
2779
  }>, "many">>;
2498
2780
  arrived: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
2781
+ landed: z.ZodOptional<z.ZodArray<z.ZodObject<{
2782
+ id: z.ZodNumber;
2783
+ jobs: z.ZodNumber;
2784
+ status: z.ZodString;
2785
+ chain: z.ZodArray<z.ZodString, "many">;
2786
+ groups: z.ZodDefault<z.ZodArray<z.ZodObject<{
2787
+ plugin: z.ZodString;
2788
+ count: z.ZodNumber;
2789
+ status: z.ZodString;
2790
+ parent: z.ZodNullable<z.ZodNumber>;
2791
+ }, "strip", z.ZodTypeAny, {
2792
+ status: string;
2793
+ count: number;
2794
+ plugin: string;
2795
+ parent: number | null;
2796
+ }, {
2797
+ status: string;
2798
+ count: number;
2799
+ plugin: string;
2800
+ parent: number | null;
2801
+ }>, "many">>;
2802
+ }, "strip", z.ZodTypeAny, {
2803
+ id: number;
2804
+ status: string;
2805
+ jobs: number;
2806
+ chain: string[];
2807
+ groups: {
2808
+ status: string;
2809
+ count: number;
2810
+ plugin: string;
2811
+ parent: number | null;
2812
+ }[];
2813
+ }, {
2814
+ id: number;
2815
+ status: string;
2816
+ jobs: number;
2817
+ chain: string[];
2818
+ groups?: {
2819
+ status: string;
2820
+ count: number;
2821
+ plugin: string;
2822
+ parent: number | null;
2823
+ }[] | undefined;
2824
+ }>, "many">>;
2499
2825
  roster: z.ZodOptional<z.ZodEnum<["delta", "full"]>>;
2500
2826
  }, "strip", z.ZodTypeAny, {
2501
2827
  loaded: number;
@@ -2516,6 +2842,18 @@ export declare const serverMessageSchema: z.ZodDiscriminatedUnion<"type", [z.Zod
2516
2842
  failed?: string | undefined;
2517
2843
  } | undefined;
2518
2844
  arrived?: number[] | undefined;
2845
+ landed?: {
2846
+ id: number;
2847
+ status: string;
2848
+ jobs: number;
2849
+ chain: string[];
2850
+ groups: {
2851
+ status: string;
2852
+ count: number;
2853
+ plugin: string;
2854
+ parent: number | null;
2855
+ }[];
2856
+ }[] | undefined;
2519
2857
  roster?: "delta" | "full" | undefined;
2520
2858
  }, {
2521
2859
  loaded: number;
@@ -2536,6 +2874,18 @@ export declare const serverMessageSchema: z.ZodDiscriminatedUnion<"type", [z.Zod
2536
2874
  failed?: string | undefined;
2537
2875
  } | undefined;
2538
2876
  arrived?: number[] | undefined;
2877
+ landed?: {
2878
+ id: number;
2879
+ status: string;
2880
+ jobs: number;
2881
+ chain: string[];
2882
+ groups?: {
2883
+ status: string;
2884
+ count: number;
2885
+ plugin: string;
2886
+ parent: number | null;
2887
+ }[] | undefined;
2888
+ }[] | undefined;
2539
2889
  roster?: "delta" | "full" | undefined;
2540
2890
  }>>;
2541
2891
  procIndex: z.ZodOptional<z.ZodObject<{
@@ -2589,6 +2939,18 @@ export declare const serverMessageSchema: z.ZodDiscriminatedUnion<"type", [z.Zod
2589
2939
  failed?: string | undefined;
2590
2940
  } | undefined;
2591
2941
  arrived?: number[] | undefined;
2942
+ landed?: {
2943
+ id: number;
2944
+ status: string;
2945
+ jobs: number;
2946
+ chain: string[];
2947
+ groups: {
2948
+ status: string;
2949
+ count: number;
2950
+ plugin: string;
2951
+ parent: number | null;
2952
+ }[];
2953
+ }[] | undefined;
2592
2954
  roster?: "delta" | "full" | undefined;
2593
2955
  } | undefined;
2594
2956
  procIndex?: {
@@ -2626,6 +2988,18 @@ export declare const serverMessageSchema: z.ZodDiscriminatedUnion<"type", [z.Zod
2626
2988
  failed?: string | undefined;
2627
2989
  } | undefined;
2628
2990
  arrived?: number[] | undefined;
2991
+ landed?: {
2992
+ id: number;
2993
+ status: string;
2994
+ jobs: number;
2995
+ chain: string[];
2996
+ groups?: {
2997
+ status: string;
2998
+ count: number;
2999
+ plugin: string;
3000
+ parent: number | null;
3001
+ }[] | undefined;
3002
+ }[] | undefined;
2629
3003
  roster?: "delta" | "full" | undefined;
2630
3004
  } | undefined;
2631
3005
  procIndex?: {
@@ -2666,6 +3040,18 @@ export declare const serverMessageSchema: z.ZodDiscriminatedUnion<"type", [z.Zod
2666
3040
  failed?: string | undefined;
2667
3041
  } | undefined;
2668
3042
  arrived?: number[] | undefined;
3043
+ landed?: {
3044
+ id: number;
3045
+ status: string;
3046
+ jobs: number;
3047
+ chain: string[];
3048
+ groups: {
3049
+ status: string;
3050
+ count: number;
3051
+ plugin: string;
3052
+ parent: number | null;
3053
+ }[];
3054
+ }[] | undefined;
2669
3055
  roster?: "delta" | "full" | undefined;
2670
3056
  } | undefined;
2671
3057
  procIndex?: {
@@ -2706,6 +3092,18 @@ export declare const serverMessageSchema: z.ZodDiscriminatedUnion<"type", [z.Zod
2706
3092
  failed?: string | undefined;
2707
3093
  } | undefined;
2708
3094
  arrived?: number[] | undefined;
3095
+ landed?: {
3096
+ id: number;
3097
+ status: string;
3098
+ jobs: number;
3099
+ chain: string[];
3100
+ groups?: {
3101
+ status: string;
3102
+ count: number;
3103
+ plugin: string;
3104
+ parent: number | null;
3105
+ }[] | undefined;
3106
+ }[] | undefined;
2709
3107
  roster?: "delta" | "full" | undefined;
2710
3108
  } | undefined;
2711
3109
  procIndex?: {
@@ -2953,6 +3351,57 @@ export declare const serverMessageSchema: z.ZodDiscriminatedUnion<"type", [z.Zod
2953
3351
  type: "watched";
2954
3352
  subject: string;
2955
3353
  state: "live" | "settled" | "stale";
3354
+ }>, z.ZodObject<{
3355
+ type: z.ZodLiteral<"numbered">;
3356
+ /** Rises with each answer, so a surface can tell newer from older. */
3357
+ id: z.ZodNumber;
3358
+ /** The line that produced the answer, which is how a pane recognises its own. */
3359
+ source: z.ZodString;
3360
+ /** How many rows are numbered. */
3361
+ rows: z.ZodNumber;
3362
+ /**
3363
+ * Each numbered row's handle beside its address.
3364
+ *
3365
+ * An index says what it counts — `@SER003`, `@STD001`, `@FIL012`,
3366
+ * `@DIR004` — one sequence per kind across the answer. A surface finds
3367
+ * each of its rows by address and draws the code, rather than counting
3368
+ * down the screen, so a sorted or filtered listing still shows each row
3369
+ * the handle that reaches it. Capped: a listing of thousands is numbered
3370
+ * in the kernel and simply unnumbered on screen.
3371
+ */
3372
+ handles: z.ZodArray<z.ZodObject<{
3373
+ kind: z.ZodString;
3374
+ ordinal: z.ZodNumber;
3375
+ address: z.ZodString;
3376
+ }, "strip", z.ZodTypeAny, {
3377
+ kind: string;
3378
+ address: string;
3379
+ ordinal: number;
3380
+ }, {
3381
+ kind: string;
3382
+ address: string;
3383
+ ordinal: number;
3384
+ }>, "many">;
3385
+ }, "strip", z.ZodTypeAny, {
3386
+ id: number;
3387
+ type: "numbered";
3388
+ rows: number;
3389
+ source: string;
3390
+ handles: {
3391
+ kind: string;
3392
+ address: string;
3393
+ ordinal: number;
3394
+ }[];
3395
+ }, {
3396
+ id: number;
3397
+ type: "numbered";
3398
+ rows: number;
3399
+ source: string;
3400
+ handles: {
3401
+ kind: string;
3402
+ address: string;
3403
+ ordinal: number;
3404
+ }[];
2956
3405
  }>]>;
2957
3406
  /** A message the daemon sends to a surface. */
2958
3407
  export type ServerMessage = z.infer<typeof serverMessageSchema>;
package/dist/messages.js CHANGED
@@ -196,6 +196,40 @@ export const watchedMessageSchema = z.object({
196
196
  subject: z.string(),
197
197
  state: watchStateSchema,
198
198
  });
199
+ /**
200
+ * Which listing the session's numbers currently count.
201
+ *
202
+ * A row can be named by the number beside it (`gather add @2,3`), and the
203
+ * numbers belong to the session's most recent ANSWER. A surface has to know
204
+ * WHICH listing that is, or it would light the index pills on a pane whose
205
+ * rows are no longer the ones `@2` would reach — and pills that lie are
206
+ * worse than no pills. Pushed whenever the answer changes, and to a late
207
+ * attacher, the way regard is.
208
+ */
209
+ export const numberedMessageSchema = z.object({
210
+ type: z.literal('numbered'),
211
+ /** Rises with each answer, so a surface can tell newer from older. */
212
+ id: z.number(),
213
+ /** The line that produced the answer, which is how a pane recognises its own. */
214
+ source: z.string(),
215
+ /** How many rows are numbered. */
216
+ rows: z.number(),
217
+ /**
218
+ * Each numbered row's handle beside its address.
219
+ *
220
+ * An index says what it counts — `@SER003`, `@STD001`, `@FIL012`,
221
+ * `@DIR004` — one sequence per kind across the answer. A surface finds
222
+ * each of its rows by address and draws the code, rather than counting
223
+ * down the screen, so a sorted or filtered listing still shows each row
224
+ * the handle that reaches it. Capped: a listing of thousands is numbered
225
+ * in the kernel and simply unnumbered on screen.
226
+ */
227
+ handles: z.array(z.object({
228
+ kind: z.string(),
229
+ ordinal: z.number(),
230
+ address: z.string(),
231
+ })),
232
+ });
199
233
  /** Any message a surface may send to the daemon. */
200
234
  export const clientMessageSchema = z.discriminatedUnion('type', [
201
235
  attachMessageSchema,
@@ -443,6 +477,13 @@ export const promptContextSchema = z.object({
443
477
  failed: z.string().optional(),
444
478
  })).optional(),
445
479
  arrived: z.array(z.number()).optional(),
480
+ landed: z.array(z.object({
481
+ id: z.number(),
482
+ jobs: z.number(),
483
+ status: z.string(),
484
+ chain: z.array(z.string()),
485
+ groups: z.array(z.object({ plugin: z.string(), count: z.number(), status: z.string(), parent: z.number().nullable() })).default([]),
486
+ })).optional(),
446
487
  roster: z.enum(['delta', 'full']).optional(),
447
488
  }).optional(),
448
489
  procIndex: z.object({
@@ -566,6 +607,7 @@ export const serverMessageSchema = z.discriminatedUnion('type', [
566
607
  deliverMessageSchema,
567
608
  regardMessageSchema,
568
609
  watchedMessageSchema,
610
+ numberedMessageSchema,
569
611
  ]);
570
612
  /**
571
613
  * The message types this contract build knows. A surface receiving a typed