@isoplan/protocol 0.14.0 → 0.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -152,6 +152,13 @@ export declare const HelloMessageSchema: z.ZodObject<{
152
152
  * hidden (a start's `hidden`), in a clone Isoplan keeps for itself. The server sends `hidden` only to
153
153
  * a runner that says it: a runner from before 0.14.0 drops the field it doesn't know and would start
154
154
  * the session in the person's own checkout.
155
+ * `canCreateExpertsFromSuggestions` (protocol 0.15.0, isoplan-app#328): this runner suggests creating
156
+ * an expert where a session would have been helped by one, and creates it when a person confirms
157
+ * (see `expert-creation-suggestion`). It sends `expert-creation-suggestion`,
158
+ * `expert-creation-suggestion-ended` and `expert-creation-progress`, and takes
159
+ * `expert-creation-suggestion-dismissals`, `draft-office-wide-expert-creation-suggestion`,
160
+ * `create-expert-from-suggestion` and `expert-creation-suggestion-ended`; the server sends none of
161
+ * these to a runner that didn't say it.
155
162
  */
156
163
  export declare const RunnerHelloMessageSchema: z.ZodObject<{
157
164
  type: z.ZodLiteral<"runner">;
@@ -180,6 +187,7 @@ export declare const RunnerHelloMessageSchema: z.ZodObject<{
180
187
  }>>>;
181
188
  experts: z.ZodOptional<z.ZodLiteral<true>>;
182
189
  hiddenStarts: z.ZodOptional<z.ZodLiteral<true>>;
190
+ canCreateExpertsFromSuggestions: z.ZodOptional<z.ZodLiteral<true>>;
183
191
  }, z.core.$strip>;
184
192
  /** All of the session's facts. Sent on connect and on repair. */
185
193
  export declare const FullMessageSchema: z.ZodObject<{
@@ -316,6 +324,7 @@ export declare const FullMessageSchema: z.ZodObject<{
316
324
  agent: z.ZodString;
317
325
  at: z.ZodISODateTime;
318
326
  text: z.ZodString;
327
+ cut: z.ZodOptional<z.ZodLiteral<true>>;
319
328
  withheld: z.ZodOptional<z.ZodObject<{
320
329
  id: z.ZodString;
321
330
  }, z.core.$strip>>;
@@ -366,6 +375,19 @@ export declare const FullMessageSchema: z.ZodObject<{
366
375
  moreAgents: z.ZodOptional<z.ZodNumber>;
367
376
  extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
368
377
  }, z.core.$strip>>>;
378
+ areas: z.ZodOptional<z.ZodArray<z.ZodObject<{
379
+ project: z.ZodOptional<z.ZodObject<{
380
+ id: z.ZodString;
381
+ name: z.ZodString;
382
+ }, z.core.$strip>>;
383
+ away: z.ZodOptional<z.ZodBoolean>;
384
+ folder: z.ZodString;
385
+ reads: z.ZodNumber;
386
+ searches: z.ZodNumber;
387
+ tokens: z.ZodNumber;
388
+ ms: z.ZodNumber;
389
+ corrections: z.ZodNumber;
390
+ }, z.core.$strip>>>;
369
391
  }, z.core.$strip>;
370
392
  }, z.core.$strip>;
371
393
  /** What changed since the last message. `seq` goes up by one per message, so a gap shows. */
@@ -503,6 +525,7 @@ export declare const ChangesMessageSchema: z.ZodObject<{
503
525
  agent: z.ZodString;
504
526
  at: z.ZodISODateTime;
505
527
  text: z.ZodString;
528
+ cut: z.ZodOptional<z.ZodLiteral<true>>;
506
529
  withheld: z.ZodOptional<z.ZodObject<{
507
530
  id: z.ZodString;
508
531
  }, z.core.$strip>>;
@@ -553,6 +576,19 @@ export declare const ChangesMessageSchema: z.ZodObject<{
553
576
  moreAgents: z.ZodOptional<z.ZodNumber>;
554
577
  extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
555
578
  }, z.core.$strip>>>;
579
+ areas: z.ZodOptional<z.ZodArray<z.ZodObject<{
580
+ project: z.ZodOptional<z.ZodObject<{
581
+ id: z.ZodString;
582
+ name: z.ZodString;
583
+ }, z.core.$strip>>;
584
+ away: z.ZodOptional<z.ZodBoolean>;
585
+ folder: z.ZodString;
586
+ reads: z.ZodNumber;
587
+ searches: z.ZodNumber;
588
+ tokens: z.ZodNumber;
589
+ ms: z.ZodNumber;
590
+ corrections: z.ZodNumber;
591
+ }, z.core.$strip>>>;
556
592
  }, z.core.$strip>;
557
593
  remove: z.ZodObject<{
558
594
  agents: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -638,10 +674,19 @@ export declare const ExpertCapSchema: z.ZodEnum<{
638
674
  "asker-open": "asker-open";
639
675
  "expert-tokens": "expert-tokens";
640
676
  }>;
677
+ /** The most folders or globs an expert's area names (protocol 0.15.0). */
678
+ export declare const MAX_AREA_PATHS = 20;
679
+ /**
680
+ * An expert's name as people read it, from its key: the key's words, split on dashes, each
681
+ * capitalised, then "Expert" (`pairing` is "Pairing Expert", `pairing-tokens` "Pairing Tokens Expert").
682
+ */
683
+ export declare const expertDisplayName: (key: string) => string;
641
684
  /**
642
685
  * One expert a runner hosts, as it lists it to an office server whose list takes its repo. `senior`
643
686
  * (protocol 0.14.0): it has a senior generation, which its junior can ask (see `expert-senior`);
644
- * absent from an older runner. An older server ignores it.
687
+ * absent from an older runner. `areas` (protocol 0.15.0): the folders and globs of its repo it
688
+ * covers, from its file, so the office never suggests creating an expert on a folder one already covers;
689
+ * absent from an older runner, or when its file names none. An older server ignores both.
645
690
  */
646
691
  export declare const ExpertListingSchema: z.ZodObject<{
647
692
  name: z.ZodString;
@@ -656,6 +701,7 @@ export declare const ExpertListingSchema: z.ZodObject<{
656
701
  starting: "starting";
657
702
  }>;
658
703
  senior: z.ZodOptional<z.ZodBoolean>;
704
+ areas: z.ZodOptional<z.ZodArray<z.ZodString>>;
659
705
  }, z.core.$strip>;
660
706
  /** One expert a session may ask: `repo` is its project's short name, `host` the hosting person's name. */
661
707
  export declare const ExpertRightSchema: z.ZodObject<{
@@ -915,6 +961,7 @@ export declare const ExpertsMessageSchema: z.ZodObject<{
915
961
  starting: "starting";
916
962
  }>;
917
963
  senior: z.ZodOptional<z.ZodBoolean>;
964
+ areas: z.ZodOptional<z.ZodArray<z.ZodString>>;
918
965
  }, z.core.$strip>>;
919
966
  }, z.core.$strip>;
920
967
  /**
@@ -946,6 +993,98 @@ export declare const AskExpertMessageSchema: z.ZodObject<{
946
993
  blocking: z.ZodBoolean;
947
994
  key: z.ZodString;
948
995
  }, z.core.$strip>;
996
+ /** The most sessions a `draft-office-wide-expert-creation-suggestion` names. */
997
+ export declare const MAX_EXPERT_CREATION_SUGGESTION_SESSIONS = 20;
998
+ /** The most dismissed areas an `expert-creation-suggestion-dismissals` lists. */
999
+ export declare const MAX_EXPERT_CREATION_SUGGESTION_DISMISSALS = 1000;
1000
+ /**
1001
+ * A runner suggests creating an expert (protocol 0.15.0), once per session and folder, for a session
1002
+ * in a repo the office takes. `session` is the session that showed the need (for an office-wide one,
1003
+ * the latest that searched the area), `project` its repo, and `folder` the folder whose signals passed
1004
+ * their threshold, which dismissals name. `scope`: `session`, from that session's own signals, or
1005
+ * `office`, in answer to a `draft-office-wide-expert-creation-suggestion`, whose `request` is then its
1006
+ * `id`. The draft: `key`, the expert's name (shown as `expertDisplayName(key)`), `subject`, `area`
1007
+ * and `proof`, as the runner's local model wrote them and the secret check passed them. `why`, the
1008
+ * signals that passed their thresholds, each other one 0: `share`, the share of the session's context
1009
+ * spent reading and searching the folder (0 to 1), and `tokens`, those tokens, which are one signal;
1010
+ * `minutes`, the time spent there; `corrections`, the person's corrections there. `at`: when it was
1011
+ * suggested. Of its text, only these leave the machine, under ADR 0004's case for an expert creation
1012
+ * suggestion's draft.
1013
+ */
1014
+ export declare const ExpertCreationSuggestionMessageSchema: z.ZodObject<{
1015
+ type: z.ZodLiteral<"expert-creation-suggestion">;
1016
+ v: z.ZodLiteral<1>;
1017
+ id: z.ZodString;
1018
+ session: z.ZodString;
1019
+ project: z.ZodObject<{
1020
+ id: z.ZodString;
1021
+ name: z.ZodString;
1022
+ }, z.core.$strip>;
1023
+ folder: z.ZodString;
1024
+ scope: z.ZodEnum<{
1025
+ office: "office";
1026
+ session: "session";
1027
+ }>;
1028
+ key: z.ZodString;
1029
+ subject: z.ZodString;
1030
+ area: z.ZodArray<z.ZodString>;
1031
+ proof: z.ZodObject<{
1032
+ question: z.ZodString;
1033
+ answer: z.ZodString;
1034
+ }, z.core.$strip>;
1035
+ why: z.ZodObject<{
1036
+ share: z.ZodNumber;
1037
+ tokens: z.ZodNumber;
1038
+ minutes: z.ZodNumber;
1039
+ corrections: z.ZodNumber;
1040
+ }, z.core.$strip>;
1041
+ at: z.ZodISODateTime;
1042
+ }, z.core.$strip>;
1043
+ /**
1044
+ * A runner ends its expert creation suggestion `id` itself (protocol 0.15.0): `withdrawn`, it took the
1045
+ * suggestion back before anyone created the expert or dismissed it; `no-draft`, it couldn't draft the
1046
+ * office-wide suggestion the `draft-office-wide-expert-creation-suggestion` of that id asked for (the
1047
+ * secret check matched, or its model gave no usable draft).
1048
+ */
1049
+ export declare const RunnerExpertCreationSuggestionEndedMessageSchema: z.ZodObject<{
1050
+ type: z.ZodLiteral<"expert-creation-suggestion-ended">;
1051
+ v: z.ZodLiteral<1>;
1052
+ id: z.ZodString;
1053
+ why: z.ZodEnum<{
1054
+ "no-draft": "no-draft";
1055
+ withdrawn: "withdrawn";
1056
+ }>;
1057
+ }, z.core.$strip>;
1058
+ /**
1059
+ * Where creating an expert stands on the runner that took the `create-expert-from-suggestion` request
1060
+ * `request`, for the expert creation suggestion `expertCreationSuggestionId` (protocol 0.15.0), sent
1061
+ * as each state is reached: `cloning`, it prepares the expert's own clone of the repo; `grounding`,
1062
+ * the expert reads what its subject rests on, as any expert grounds (its area decides only which
1063
+ * folders it covers, for expert creation suggestions); `proof`, it answers its
1064
+ * proof question; `ready`, it answers questions; `failed`, it stopped, with `detail` in the runner's
1065
+ * own words (no checkout of the repo on this machine, a key already used here, a failed proof).
1066
+ */
1067
+ export declare const ExpertCreationProgressStateSchema: z.ZodEnum<{
1068
+ cloning: "cloning";
1069
+ failed: "failed";
1070
+ grounding: "grounding";
1071
+ proof: "proof";
1072
+ ready: "ready";
1073
+ }>;
1074
+ export declare const ExpertCreationProgressMessageSchema: z.ZodObject<{
1075
+ type: z.ZodLiteral<"expert-creation-progress">;
1076
+ v: z.ZodLiteral<1>;
1077
+ request: z.ZodString;
1078
+ expertCreationSuggestionId: z.ZodString;
1079
+ state: z.ZodEnum<{
1080
+ cloning: "cloning";
1081
+ failed: "failed";
1082
+ grounding: "grounding";
1083
+ proof: "proof";
1084
+ ready: "ready";
1085
+ }>;
1086
+ detail: z.ZodOptional<z.ZodString>;
1087
+ }, z.core.$strip>;
949
1088
  /**
950
1089
  * What a runner says of the driven sessions it holds (protocol 0.5.0), sent only by a runner that said
951
1090
  * `drive`. `started`, `output` (for an output request or a release) and `handed-back` answer a `drive`
@@ -1232,6 +1371,7 @@ export declare const DataLayerMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
1232
1371
  }>>>;
1233
1372
  experts: z.ZodOptional<z.ZodLiteral<true>>;
1234
1373
  hiddenStarts: z.ZodOptional<z.ZodLiteral<true>>;
1374
+ canCreateExpertsFromSuggestions: z.ZodOptional<z.ZodLiteral<true>>;
1235
1375
  }, z.core.$strip>, z.ZodObject<{
1236
1376
  type: z.ZodLiteral<"full">;
1237
1377
  v: z.ZodLiteral<1>;
@@ -1366,6 +1506,7 @@ export declare const DataLayerMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
1366
1506
  agent: z.ZodString;
1367
1507
  at: z.ZodISODateTime;
1368
1508
  text: z.ZodString;
1509
+ cut: z.ZodOptional<z.ZodLiteral<true>>;
1369
1510
  withheld: z.ZodOptional<z.ZodObject<{
1370
1511
  id: z.ZodString;
1371
1512
  }, z.core.$strip>>;
@@ -1416,6 +1557,19 @@ export declare const DataLayerMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
1416
1557
  moreAgents: z.ZodOptional<z.ZodNumber>;
1417
1558
  extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1418
1559
  }, z.core.$strip>>>;
1560
+ areas: z.ZodOptional<z.ZodArray<z.ZodObject<{
1561
+ project: z.ZodOptional<z.ZodObject<{
1562
+ id: z.ZodString;
1563
+ name: z.ZodString;
1564
+ }, z.core.$strip>>;
1565
+ away: z.ZodOptional<z.ZodBoolean>;
1566
+ folder: z.ZodString;
1567
+ reads: z.ZodNumber;
1568
+ searches: z.ZodNumber;
1569
+ tokens: z.ZodNumber;
1570
+ ms: z.ZodNumber;
1571
+ corrections: z.ZodNumber;
1572
+ }, z.core.$strip>>>;
1419
1573
  }, z.core.$strip>;
1420
1574
  }, z.core.$strip>, z.ZodObject<{
1421
1575
  type: z.ZodLiteral<"changes">;
@@ -1551,6 +1705,7 @@ export declare const DataLayerMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
1551
1705
  agent: z.ZodString;
1552
1706
  at: z.ZodISODateTime;
1553
1707
  text: z.ZodString;
1708
+ cut: z.ZodOptional<z.ZodLiteral<true>>;
1554
1709
  withheld: z.ZodOptional<z.ZodObject<{
1555
1710
  id: z.ZodString;
1556
1711
  }, z.core.$strip>>;
@@ -1601,6 +1756,19 @@ export declare const DataLayerMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
1601
1756
  moreAgents: z.ZodOptional<z.ZodNumber>;
1602
1757
  extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1603
1758
  }, z.core.$strip>>>;
1759
+ areas: z.ZodOptional<z.ZodArray<z.ZodObject<{
1760
+ project: z.ZodOptional<z.ZodObject<{
1761
+ id: z.ZodString;
1762
+ name: z.ZodString;
1763
+ }, z.core.$strip>>;
1764
+ away: z.ZodOptional<z.ZodBoolean>;
1765
+ folder: z.ZodString;
1766
+ reads: z.ZodNumber;
1767
+ searches: z.ZodNumber;
1768
+ tokens: z.ZodNumber;
1769
+ ms: z.ZodNumber;
1770
+ corrections: z.ZodNumber;
1771
+ }, z.core.$strip>>>;
1604
1772
  }, z.core.$strip>;
1605
1773
  remove: z.ZodObject<{
1606
1774
  agents: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -2014,6 +2182,7 @@ export declare const DataLayerMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
2014
2182
  starting: "starting";
2015
2183
  }>;
2016
2184
  senior: z.ZodOptional<z.ZodBoolean>;
2185
+ areas: z.ZodOptional<z.ZodArray<z.ZodString>>;
2017
2186
  }, z.core.$strip>>;
2018
2187
  }, z.core.$strip>, z.ZodObject<{
2019
2188
  type: z.ZodLiteral<"ask-expert">;
@@ -2026,6 +2195,55 @@ export declare const DataLayerMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
2026
2195
  type: z.ZodLiteral<"expert-senior">;
2027
2196
  v: z.ZodLiteral<1>;
2028
2197
  id: z.ZodString;
2198
+ }, z.core.$strip>, z.ZodObject<{
2199
+ type: z.ZodLiteral<"expert-creation-suggestion">;
2200
+ v: z.ZodLiteral<1>;
2201
+ id: z.ZodString;
2202
+ session: z.ZodString;
2203
+ project: z.ZodObject<{
2204
+ id: z.ZodString;
2205
+ name: z.ZodString;
2206
+ }, z.core.$strip>;
2207
+ folder: z.ZodString;
2208
+ scope: z.ZodEnum<{
2209
+ office: "office";
2210
+ session: "session";
2211
+ }>;
2212
+ key: z.ZodString;
2213
+ subject: z.ZodString;
2214
+ area: z.ZodArray<z.ZodString>;
2215
+ proof: z.ZodObject<{
2216
+ question: z.ZodString;
2217
+ answer: z.ZodString;
2218
+ }, z.core.$strip>;
2219
+ why: z.ZodObject<{
2220
+ share: z.ZodNumber;
2221
+ tokens: z.ZodNumber;
2222
+ minutes: z.ZodNumber;
2223
+ corrections: z.ZodNumber;
2224
+ }, z.core.$strip>;
2225
+ at: z.ZodISODateTime;
2226
+ }, z.core.$strip>, z.ZodObject<{
2227
+ type: z.ZodLiteral<"expert-creation-suggestion-ended">;
2228
+ v: z.ZodLiteral<1>;
2229
+ id: z.ZodString;
2230
+ why: z.ZodEnum<{
2231
+ "no-draft": "no-draft";
2232
+ withdrawn: "withdrawn";
2233
+ }>;
2234
+ }, z.core.$strip>, z.ZodObject<{
2235
+ type: z.ZodLiteral<"expert-creation-progress">;
2236
+ v: z.ZodLiteral<1>;
2237
+ request: z.ZodString;
2238
+ expertCreationSuggestionId: z.ZodString;
2239
+ state: z.ZodEnum<{
2240
+ cloning: "cloning";
2241
+ failed: "failed";
2242
+ grounding: "grounding";
2243
+ proof: "proof";
2244
+ ready: "ready";
2245
+ }>;
2246
+ detail: z.ZodOptional<z.ZodString>;
2029
2247
  }, z.core.$strip>], "type">;
2030
2248
  /** Asks the data layer to send its facts in full. */
2031
2249
  export declare const RepairMessageSchema: z.ZodObject<{
@@ -2462,6 +2680,98 @@ export declare const DrivePolicyMessageSchema: z.ZodObject<{
2462
2680
  v: z.ZodLiteral<1>;
2463
2681
  bypassAllowed: z.ZodArray<z.ZodString>;
2464
2682
  }, z.core.$strip>;
2683
+ /**
2684
+ * Create the expert the expert creation suggestion `expertCreationSuggestionId` drafted (protocol
2685
+ * 0.15.0), as the person who confirmed it (`by`) set it on the floor, sent to the runner of the
2686
+ * computer they chose, one of their own, which checks `by` is its own person. The runner finds its
2687
+ * checkout of `project`, writes the expert file `key` with `subject`, `model`, `area` and `proof`, and
2688
+ * answers with `expert-creation-progress` under `request`. Nothing is queued: the server refuses at
2689
+ * once when that runner isn't linked.
2690
+ */
2691
+ export declare const CreateExpertFromSuggestionMessageSchema: z.ZodObject<{
2692
+ type: z.ZodLiteral<"create-expert-from-suggestion">;
2693
+ v: z.ZodLiteral<1>;
2694
+ request: z.ZodString;
2695
+ expertCreationSuggestionId: z.ZodString;
2696
+ key: z.ZodString;
2697
+ subject: z.ZodString;
2698
+ model: z.ZodString;
2699
+ project: z.ZodObject<{
2700
+ id: z.ZodString;
2701
+ name: z.ZodString;
2702
+ }, z.core.$strip>;
2703
+ area: z.ZodArray<z.ZodString>;
2704
+ proof: z.ZodObject<{
2705
+ question: z.ZodString;
2706
+ answer: z.ZodString;
2707
+ }, z.core.$strip>;
2708
+ by: z.ZodObject<{
2709
+ id: z.ZodString;
2710
+ name: z.ZodString;
2711
+ }, z.core.$strip>;
2712
+ }, z.core.$strip>;
2713
+ /**
2714
+ * Draft an office-wide expert creation suggestion on `folder` of `project` (protocol 0.15.0), which
2715
+ * several sessions searched within the period: sent to the runner of the latest of them. `sessions`:
2716
+ * those on this runner's machine, newest first, whose work in the folder the draft is made from; the
2717
+ * first is the suggestion's `session`. The runner answers with `expert-creation-suggestion`, scope
2718
+ * `office`, whose `id` is `request`, or with `expert-creation-suggestion-ended` `no-draft`.
2719
+ * `searchedBySessions` and `searchWindowDays` let the runner say why it is office-wide.
2720
+ */
2721
+ export declare const DraftOfficeWideExpertCreationSuggestionMessageSchema: z.ZodObject<{
2722
+ type: z.ZodLiteral<"draft-office-wide-expert-creation-suggestion">;
2723
+ v: z.ZodLiteral<1>;
2724
+ request: z.ZodString;
2725
+ project: z.ZodObject<{
2726
+ id: z.ZodString;
2727
+ name: z.ZodString;
2728
+ }, z.core.$strip>;
2729
+ folder: z.ZodString;
2730
+ sessions: z.ZodArray<z.ZodString>;
2731
+ searchedBySessions: z.ZodNumber;
2732
+ searchWindowDays: z.ZodNumber;
2733
+ }, z.core.$strip>;
2734
+ /**
2735
+ * The areas this runner's person dismissed (protocol 0.15.0), the whole list each time: sent to a
2736
+ * runner that said `canCreateExpertsFromSuggestions` once its hello is let in, even an empty one, and
2737
+ * whenever the list changes. The runner suggests no expert on an area it lists, and sends none of its
2738
+ * expert creation suggestion messages on a connection before the connection's first one (see
2739
+ * `expert-creation-suggestion`).
2740
+ */
2741
+ export declare const ExpertCreationSuggestionDismissalsMessageSchema: z.ZodObject<{
2742
+ type: z.ZodLiteral<"expert-creation-suggestion-dismissals">;
2743
+ v: z.ZodLiteral<1>;
2744
+ dismissals: z.ZodArray<z.ZodObject<{
2745
+ project: z.ZodString;
2746
+ folder: z.ZodString;
2747
+ until: z.ZodOptional<z.ZodISODateTime>;
2748
+ forever: z.ZodOptional<z.ZodLiteral<true>>;
2749
+ }, z.core.$strip>>;
2750
+ }, z.core.$strip>;
2751
+ /**
2752
+ * How the expert creation suggestion `id` ended (protocol 0.15.0), sent to the runner that sent it:
2753
+ * `made`, once the expert `key` is created and ready (with the key the person set, which may differ
2754
+ * from the draft's), so the runner can tell the session that showed the need; `dismissed`, by a person
2755
+ * on the floor, and only that; `refused`, the office won't keep it (its repo isn't taken there, the
2756
+ * session is someone else's, it names an id the office didn't ask for, and the like); `expired`,
2757
+ * unopened or with no expert created for the period the server keeps expert creation suggestions.
2758
+ */
2759
+ export declare const ServerExpertCreationSuggestionEndedMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
2760
+ type: z.ZodLiteral<"expert-creation-suggestion-ended">;
2761
+ v: z.ZodLiteral<1>;
2762
+ id: z.ZodString;
2763
+ why: z.ZodLiteral<"made">;
2764
+ key: z.ZodString;
2765
+ }, z.core.$strip>, z.ZodObject<{
2766
+ type: z.ZodLiteral<"expert-creation-suggestion-ended">;
2767
+ v: z.ZodLiteral<1>;
2768
+ id: z.ZodString;
2769
+ why: z.ZodEnum<{
2770
+ dismissed: "dismissed";
2771
+ expired: "expired";
2772
+ refused: "refused";
2773
+ }>;
2774
+ }, z.core.$strip>], "why">;
2465
2775
  export declare const OfficeServerMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
2466
2776
  type: z.ZodLiteral<"repair">;
2467
2777
  v: z.ZodLiteral<1>;
@@ -2789,7 +3099,64 @@ export declare const OfficeServerMessageSchema: z.ZodDiscriminatedUnion<[z.ZodOb
2789
3099
  v: z.ZodLiteral<1>;
2790
3100
  listed: z.ZodArray<z.ZodString>;
2791
3101
  expertSenior: z.ZodOptional<z.ZodLiteral<true>>;
2792
- }, z.core.$strip>], "type">;
3102
+ }, z.core.$strip>, z.ZodObject<{
3103
+ type: z.ZodLiteral<"create-expert-from-suggestion">;
3104
+ v: z.ZodLiteral<1>;
3105
+ request: z.ZodString;
3106
+ expertCreationSuggestionId: z.ZodString;
3107
+ key: z.ZodString;
3108
+ subject: z.ZodString;
3109
+ model: z.ZodString;
3110
+ project: z.ZodObject<{
3111
+ id: z.ZodString;
3112
+ name: z.ZodString;
3113
+ }, z.core.$strip>;
3114
+ area: z.ZodArray<z.ZodString>;
3115
+ proof: z.ZodObject<{
3116
+ question: z.ZodString;
3117
+ answer: z.ZodString;
3118
+ }, z.core.$strip>;
3119
+ by: z.ZodObject<{
3120
+ id: z.ZodString;
3121
+ name: z.ZodString;
3122
+ }, z.core.$strip>;
3123
+ }, z.core.$strip>, z.ZodObject<{
3124
+ type: z.ZodLiteral<"draft-office-wide-expert-creation-suggestion">;
3125
+ v: z.ZodLiteral<1>;
3126
+ request: z.ZodString;
3127
+ project: z.ZodObject<{
3128
+ id: z.ZodString;
3129
+ name: z.ZodString;
3130
+ }, z.core.$strip>;
3131
+ folder: z.ZodString;
3132
+ sessions: z.ZodArray<z.ZodString>;
3133
+ searchedBySessions: z.ZodNumber;
3134
+ searchWindowDays: z.ZodNumber;
3135
+ }, z.core.$strip>, z.ZodObject<{
3136
+ type: z.ZodLiteral<"expert-creation-suggestion-dismissals">;
3137
+ v: z.ZodLiteral<1>;
3138
+ dismissals: z.ZodArray<z.ZodObject<{
3139
+ project: z.ZodString;
3140
+ folder: z.ZodString;
3141
+ until: z.ZodOptional<z.ZodISODateTime>;
3142
+ forever: z.ZodOptional<z.ZodLiteral<true>>;
3143
+ }, z.core.$strip>>;
3144
+ }, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
3145
+ type: z.ZodLiteral<"expert-creation-suggestion-ended">;
3146
+ v: z.ZodLiteral<1>;
3147
+ id: z.ZodString;
3148
+ why: z.ZodLiteral<"made">;
3149
+ key: z.ZodString;
3150
+ }, z.core.$strip>, z.ZodObject<{
3151
+ type: z.ZodLiteral<"expert-creation-suggestion-ended">;
3152
+ v: z.ZodLiteral<1>;
3153
+ id: z.ZodString;
3154
+ why: z.ZodEnum<{
3155
+ dismissed: "dismissed";
3156
+ expired: "expired";
3157
+ refused: "refused";
3158
+ }>;
3159
+ }, z.core.$strip>], "why">], "type">;
2793
3160
  export type HandoffRepo = z.infer<typeof HandoffRepoSchema>;
2794
3161
  export type Handoff = z.infer<typeof HandoffSchema>;
2795
3162
  export type HelloMessage = z.infer<typeof HelloMessageSchema>;
@@ -2844,6 +3211,15 @@ export type AskExpertMessage = z.infer<typeof AskExpertMessageSchema>;
2844
3211
  export type ExpertRightsMessage = z.infer<typeof ExpertRightsMessageSchema>;
2845
3212
  export type HostingMessage = z.infer<typeof HostingMessageSchema>;
2846
3213
  export type ExpertSeniorMessage = z.infer<typeof ExpertSeniorMessageSchema>;
3214
+ export type ExpertCreationSuggestionMessage = z.infer<typeof ExpertCreationSuggestionMessageSchema>;
3215
+ export type RunnerExpertCreationSuggestionEndedMessage = z.infer<typeof RunnerExpertCreationSuggestionEndedMessageSchema>;
3216
+ export type ExpertCreationProgressState = z.infer<typeof ExpertCreationProgressStateSchema>;
3217
+ export type ExpertCreationProgressMessage = z.infer<typeof ExpertCreationProgressMessageSchema>;
3218
+ export type CreateExpertFromSuggestionMessage = z.infer<typeof CreateExpertFromSuggestionMessageSchema>;
3219
+ export type DraftOfficeWideExpertCreationSuggestionMessage = z.infer<typeof DraftOfficeWideExpertCreationSuggestionMessageSchema>;
3220
+ export type ExpertCreationSuggestionDismissalsMessage = z.infer<typeof ExpertCreationSuggestionDismissalsMessageSchema>;
3221
+ export type ExpertCreationSuggestionDismissal = ExpertCreationSuggestionDismissalsMessage["dismissals"][number];
3222
+ export type ServerExpertCreationSuggestionEndedMessage = z.infer<typeof ServerExpertCreationSuggestionEndedMessageSchema>;
2847
3223
  /**
2848
3224
  * The reasons the floor shows for a refused drive request: a runner's, and `offline`, the server's
2849
3225
  * own, for a request it refused at once because the owner's runner isn't linked (nothing is queued).