fwdloop 0.27.0 → 0.28.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.
Files changed (67) hide show
  1. package/bin/fwdloop +27 -8
  2. package/package.json +2 -2
  3. package/src/authoring.js +11 -1
  4. package/src/canrun.js +19 -16
  5. package/src/config.js +18 -0
  6. package/src/declaration.js +32 -2
  7. package/src/drafter.js +29 -14
  8. package/src/flow.js +2 -1
  9. package/src/launcher.js +4 -2
  10. package/src/learnstore.js +2 -1
  11. package/src/mcp-checks.js +50 -0
  12. package/src/mcp-pick.js +33 -0
  13. package/src/mcp-sources.js +84 -0
  14. package/src/mcp-use.js +54 -0
  15. package/src/natural.js +23 -0
  16. package/src/panel/author.js +19 -19
  17. package/src/panel/authorcard.js +35 -0
  18. package/src/panel/authorflows.js +18 -14
  19. package/src/panel/authortrigger.js +241 -84
  20. package/src/panel/data.js +89 -6
  21. package/src/panel/index.html +552 -157
  22. package/src/panel/jobgrid.js +127 -0
  23. package/src/panel/scheduler.js +8 -2
  24. package/src/panel/server.js +15 -6
  25. package/src/panel/settings.js +119 -4
  26. package/src/panel/tickets.js +12 -7
  27. package/src/primitives.js +34 -5
  28. package/src/runner.js +88 -15
  29. package/src/summary-words.js +15 -3
  30. package/src/ticket-draft.js +40 -42
  31. package/src/ticket-labels.js +10 -0
  32. package/src/ticket-mcp.js +33 -10
  33. package/src/ticket-next.js +33 -0
  34. package/src/ticket-shape.js +9 -0
  35. package/src/trigger-clock.js +4 -4
  36. package/src/trigger-files.js +3 -3
  37. package/src/trigger-tickets.js +41 -12
  38. package/types/authoring.d.ts +5 -1
  39. package/types/canrun.d.ts +5 -12
  40. package/types/config.d.ts +6 -0
  41. package/types/declaration.d.ts +8 -0
  42. package/types/drafter.d.ts +447 -38
  43. package/types/mcp-checks.d.ts +8 -0
  44. package/types/mcp-pick.d.ts +23 -0
  45. package/types/mcp-sources.d.ts +51 -0
  46. package/types/mcp-use.d.ts +12 -0
  47. package/types/natural.d.ts +2 -0
  48. package/types/panel/author.d.ts +36 -0
  49. package/types/panel/authorcard.d.ts +11 -0
  50. package/types/panel/authorflows.d.ts +9 -1
  51. package/types/panel/authortrigger.d.ts +73 -7
  52. package/types/panel/data.d.ts +56 -2
  53. package/types/panel/jobgrid.d.ts +109 -0
  54. package/types/panel/server.d.ts +5 -1
  55. package/types/panel/settings.d.ts +3 -2
  56. package/types/panel/tickets.d.ts +26 -4
  57. package/types/primitives.d.ts +15 -2
  58. package/types/runner.d.ts +112 -72
  59. package/types/summary-words.d.ts +22 -3
  60. package/types/ticket-draft.d.ts +40 -32
  61. package/types/ticket-labels.d.ts +6 -0
  62. package/types/ticket-mcp.d.ts +18 -1
  63. package/types/ticket-next.d.ts +23 -0
  64. package/types/ticket-shape.d.ts +5 -0
  65. package/types/trigger-clock.d.ts +4 -3
  66. package/types/trigger-files.d.ts +1 -1
  67. package/types/trigger-tickets.d.ts +18 -4
@@ -1,15 +1,16 @@
1
1
  /**
2
2
  * The forced tool's parameter schema. `menu` = wiredMenu(). `sheets` (M10b piece 3, optional) = the drafting copy's table of each CSV input role: with it a step may carry
3
3
  * `close.sheet`, and every column a check names is an enum of that sheet's exact header (src/sheetoffer.js); without it (no CSV input) no sheet property exists.
4
- * M12 piece 3: `ticket` = `{servers}` when the job signs a ticket list; then the tool may also carry `mcp`, `ticketFilter` and a step's `mcpTools` (src/ticket-draft.js).
5
- * @param {any[]} menu @param {{sheets?: Record<string, {header: string[]}>, ticket?: {servers: string[]}}} [o]
4
+ * M13 piece 4: `ticket` = `{flowType, tools}` for MCP (generic) and Tickets; then a step may carry `mcpTools` (an enum of the job's tools) and, for Tickets, the tool carries `ticketFilter` and `ticketWatch` (src/ticket-draft.js). The job's `mcp` block and `flowType` are set by code, never offered.
5
+ * @param {any[]} menu @param {{sheets?: Record<string, {header: string[]}>, ticket?: {flowType: 'mcp'|'tickets', tools: string[]}}} [o]
6
6
  */
7
7
  export function buildDeclarationSchema(menu: any[], { sheets, ticket }?: {
8
8
  sheets?: Record<string, {
9
9
  header: string[];
10
10
  }>;
11
11
  ticket?: {
12
- servers: string[];
12
+ flowType: "mcp" | "tickets";
13
+ tools: string[];
13
14
  };
14
15
  }): {
15
16
  type: string;
@@ -47,26 +48,225 @@ export function buildDeclarationSchema(menu: any[], { sheets, ticket }?: {
47
48
  };
48
49
  description: string;
49
50
  };
50
- mcp?: {
51
+ ticketFilter?: undefined;
52
+ ticketWatch?: undefined;
53
+ steps: {
51
54
  type: string;
52
- properties: {
53
- server: {
54
- type: string;
55
- enum: string[];
55
+ minItems: number;
56
+ items: {
57
+ type: string;
58
+ properties: {
59
+ reads: {
60
+ type: string;
61
+ items: {
62
+ type: string;
63
+ };
64
+ description: string;
65
+ };
66
+ emits: {
67
+ type: string;
68
+ minLength: number;
69
+ description: string;
70
+ };
71
+ fromLine: {
72
+ type: string[];
73
+ description: string;
74
+ };
75
+ picks: {
76
+ type: string;
77
+ additionalProperties: {
78
+ type: string;
79
+ items: {
80
+ type: string;
81
+ };
82
+ };
83
+ description: string;
84
+ };
85
+ close: {
86
+ type: string;
87
+ properties: {
88
+ sheet?: Record<string, any> | undefined;
89
+ class: {
90
+ type: string;
91
+ enum: string[];
92
+ description: string;
93
+ };
94
+ shape: {
95
+ type: string;
96
+ properties: {};
97
+ additionalProperties: boolean;
98
+ description: string;
99
+ };
100
+ cited: Readonly<{
101
+ type: "object";
102
+ description: "only on a green step that checks quotes from a web page or a document input: the facts every result must hold. Omit on any other step";
103
+ properties: {
104
+ source: {
105
+ type: string;
106
+ description: string;
107
+ };
108
+ facts: {
109
+ type: string;
110
+ minItems: number;
111
+ maxItems: number;
112
+ description: string;
113
+ items: {
114
+ type: string;
115
+ properties: {
116
+ name: {
117
+ type: string;
118
+ description: string;
119
+ };
120
+ shape: {
121
+ type: string;
122
+ enum: string[];
123
+ };
124
+ unit: {
125
+ type: string[];
126
+ items: {
127
+ type: string;
128
+ };
129
+ description: string;
130
+ };
131
+ currency: {
132
+ type: string[];
133
+ items: {
134
+ type: string;
135
+ };
136
+ description: string;
137
+ };
138
+ phrase: {
139
+ type: string;
140
+ description: string;
141
+ };
142
+ anchor: {
143
+ type: string;
144
+ description: string;
145
+ };
146
+ until: {
147
+ type: string;
148
+ description: string;
149
+ };
150
+ rule: {
151
+ type: string;
152
+ description: string;
153
+ properties: {
154
+ op: {
155
+ type: string;
156
+ enum: string[];
157
+ };
158
+ value: {};
159
+ lo: {};
160
+ hi: {};
161
+ };
162
+ required: string[];
163
+ additionalProperties: boolean;
164
+ };
165
+ };
166
+ required: string[];
167
+ additionalProperties: boolean;
168
+ };
169
+ };
170
+ count: {
171
+ type: string;
172
+ description: string;
173
+ properties: {
174
+ min: {
175
+ type: string;
176
+ minimum: number;
177
+ };
178
+ max: {
179
+ type: string;
180
+ minimum: number;
181
+ };
182
+ };
183
+ additionalProperties: boolean;
184
+ };
185
+ };
186
+ required: string[];
187
+ additionalProperties: false;
188
+ }>;
189
+ columns: Readonly<{
190
+ type: "array";
191
+ minItems: 1;
192
+ maxItems: 10;
193
+ description: "only on a green step that reads a CSV input: the exact column names (the sheet's header) its values come from. Omit on any other step";
194
+ items: {
195
+ type: string;
196
+ properties: {
197
+ source: {
198
+ type: string;
199
+ description: string;
200
+ };
201
+ column: {
202
+ type: string;
203
+ description: string;
204
+ };
205
+ };
206
+ required: string[];
207
+ additionalProperties: boolean;
208
+ };
209
+ }>;
210
+ };
211
+ required: string[];
212
+ additionalProperties: boolean;
213
+ };
214
+ mcpTools?: {
215
+ type: string;
216
+ items: {
217
+ type: string;
218
+ enum: string[];
219
+ };
220
+ description: string;
221
+ } | undefined;
222
+ primitives: {
223
+ type: string;
224
+ items: {
225
+ type: string;
226
+ enum: any[];
227
+ };
228
+ description: string;
229
+ };
56
230
  };
57
- tools: {
58
- type: string;
59
- items: {
231
+ required: string[];
232
+ additionalProperties: boolean;
233
+ };
234
+ };
235
+ } | {
236
+ guardrailClasses: {
237
+ type: string;
238
+ additionalProperties: {
239
+ type: string;
240
+ enum: string[];
241
+ };
242
+ description: string;
243
+ };
244
+ unjudgeable: {
245
+ type: string;
246
+ additionalProperties: {
247
+ type: string;
248
+ };
249
+ description: string;
250
+ };
251
+ refused: {
252
+ type: string;
253
+ items: {
254
+ type: string;
255
+ properties: {
256
+ line: {
60
257
  type: string;
61
- enum: string[];
258
+ };
259
+ reason: {
260
+ type: string;
261
+ minLength: number;
62
262
  };
63
263
  };
264
+ required: string[];
265
+ additionalProperties: boolean;
64
266
  };
65
- required: string[];
66
- additionalProperties: boolean;
67
267
  description: string;
68
- } | undefined;
69
- ticketFilter?: {
268
+ };
269
+ ticketFilter: {
70
270
  type: string;
71
271
  properties: {
72
272
  priority: {
@@ -87,15 +287,15 @@ export function buildDeclarationSchema(menu: any[], { sheets, ticket }?: {
87
287
  };
88
288
  additionalProperties: boolean;
89
289
  description: string;
90
- } | undefined;
91
- ticketWatch?: {
290
+ };
291
+ ticketWatch: {
92
292
  type: string;
93
293
  items: {
94
294
  type: string;
95
295
  enum: string[];
96
296
  };
97
297
  description: string;
98
- } | undefined;
298
+ };
99
299
  steps: {
100
300
  type: string;
101
301
  minItems: number;
@@ -283,14 +483,15 @@ export function buildDeclarationSchema(menu: any[], { sheets, ticket }?: {
283
483
  additionalProperties: boolean;
284
484
  };
285
485
  /** The declaration schema plus the optional `notChecked` (every try) and, on try 3 only, `questions`. Neither is in `required`. */
286
- /** @param {any[]} menu @param {{questions?: boolean, sheets?: Record<string, {header: string[]}>|undefined, ticket?: {servers: string[]}}} [o] */
486
+ /** @param {any[]} menu @param {{questions?: boolean, sheets?: Record<string, {header: string[]}>|undefined, ticket?: {flowType: 'mcp'|'tickets', tools: string[]}}} [o] */
287
487
  export function buildRoundSchema(menu: any[], { questions, sheets, ticket }?: {
288
488
  questions?: boolean;
289
489
  sheets?: Record<string, {
290
490
  header: string[];
291
491
  }> | undefined;
292
492
  ticket?: {
293
- servers: string[];
493
+ flowType: "mcp" | "tickets";
494
+ tools: string[];
294
495
  };
295
496
  }): {
296
497
  properties: {
@@ -334,26 +535,232 @@ export function buildRoundSchema(menu: any[], { questions, sheets, ticket }?: {
334
535
  };
335
536
  description: string;
336
537
  };
337
- mcp?: {
538
+ ticketFilter?: undefined;
539
+ ticketWatch?: undefined;
540
+ steps: {
338
541
  type: string;
339
- properties: {
340
- server: {
341
- type: string;
342
- enum: string[];
542
+ minItems: number;
543
+ items: {
544
+ type: string;
545
+ properties: {
546
+ reads: {
547
+ type: string;
548
+ items: {
549
+ type: string;
550
+ };
551
+ description: string;
552
+ };
553
+ emits: {
554
+ type: string;
555
+ minLength: number;
556
+ description: string;
557
+ };
558
+ fromLine: {
559
+ type: string[];
560
+ description: string;
561
+ };
562
+ picks: {
563
+ type: string;
564
+ additionalProperties: {
565
+ type: string;
566
+ items: {
567
+ type: string;
568
+ };
569
+ };
570
+ description: string;
571
+ };
572
+ close: {
573
+ type: string;
574
+ properties: {
575
+ sheet?: Record<string, any> | undefined;
576
+ class: {
577
+ type: string;
578
+ enum: string[];
579
+ description: string;
580
+ };
581
+ shape: {
582
+ type: string;
583
+ properties: {};
584
+ additionalProperties: boolean;
585
+ description: string;
586
+ };
587
+ cited: Readonly<{
588
+ type: "object";
589
+ description: "only on a green step that checks quotes from a web page or a document input: the facts every result must hold. Omit on any other step";
590
+ properties: {
591
+ source: {
592
+ type: string;
593
+ description: string;
594
+ };
595
+ facts: {
596
+ type: string;
597
+ minItems: number;
598
+ maxItems: number;
599
+ description: string;
600
+ items: {
601
+ type: string;
602
+ properties: {
603
+ name: {
604
+ type: string;
605
+ description: string;
606
+ };
607
+ shape: {
608
+ type: string;
609
+ enum: string[];
610
+ };
611
+ unit: {
612
+ type: string[];
613
+ items: {
614
+ type: string;
615
+ };
616
+ description: string;
617
+ };
618
+ currency: {
619
+ type: string[];
620
+ items: {
621
+ type: string;
622
+ };
623
+ description: string;
624
+ };
625
+ phrase: {
626
+ type: string;
627
+ description: string;
628
+ };
629
+ anchor: {
630
+ type: string;
631
+ description: string;
632
+ };
633
+ until: {
634
+ type: string;
635
+ description: string;
636
+ };
637
+ rule: {
638
+ type: string;
639
+ description: string;
640
+ properties: {
641
+ op: {
642
+ type: string;
643
+ enum: string[];
644
+ };
645
+ value: {};
646
+ lo: {};
647
+ hi: {};
648
+ };
649
+ required: string[];
650
+ additionalProperties: boolean;
651
+ };
652
+ };
653
+ required: string[];
654
+ additionalProperties: boolean;
655
+ };
656
+ };
657
+ count: {
658
+ type: string;
659
+ description: string;
660
+ properties: {
661
+ min: {
662
+ type: string;
663
+ minimum: number;
664
+ };
665
+ max: {
666
+ type: string;
667
+ minimum: number;
668
+ };
669
+ };
670
+ additionalProperties: boolean;
671
+ };
672
+ };
673
+ required: string[];
674
+ additionalProperties: false;
675
+ }>;
676
+ columns: Readonly<{
677
+ type: "array";
678
+ minItems: 1;
679
+ maxItems: 10;
680
+ description: "only on a green step that reads a CSV input: the exact column names (the sheet's header) its values come from. Omit on any other step";
681
+ items: {
682
+ type: string;
683
+ properties: {
684
+ source: {
685
+ type: string;
686
+ description: string;
687
+ };
688
+ column: {
689
+ type: string;
690
+ description: string;
691
+ };
692
+ };
693
+ required: string[];
694
+ additionalProperties: boolean;
695
+ };
696
+ }>;
697
+ };
698
+ required: string[];
699
+ additionalProperties: boolean;
700
+ };
701
+ mcpTools?: {
702
+ type: string;
703
+ items: {
704
+ type: string;
705
+ enum: string[];
706
+ };
707
+ description: string;
708
+ } | undefined;
709
+ primitives: {
710
+ type: string;
711
+ items: {
712
+ type: string;
713
+ enum: any[];
714
+ };
715
+ description: string;
716
+ };
343
717
  };
344
- tools: {
345
- type: string;
346
- items: {
718
+ required: string[];
719
+ additionalProperties: boolean;
720
+ };
721
+ };
722
+ } | {
723
+ notChecked: {
724
+ type: string;
725
+ items: {
726
+ type: string;
727
+ };
728
+ description: string;
729
+ };
730
+ guardrailClasses: {
731
+ type: string;
732
+ additionalProperties: {
733
+ type: string;
734
+ enum: string[];
735
+ };
736
+ description: string;
737
+ };
738
+ unjudgeable: {
739
+ type: string;
740
+ additionalProperties: {
741
+ type: string;
742
+ };
743
+ description: string;
744
+ };
745
+ refused: {
746
+ type: string;
747
+ items: {
748
+ type: string;
749
+ properties: {
750
+ line: {
347
751
  type: string;
348
- enum: string[];
752
+ };
753
+ reason: {
754
+ type: string;
755
+ minLength: number;
349
756
  };
350
757
  };
758
+ required: string[];
759
+ additionalProperties: boolean;
351
760
  };
352
- required: string[];
353
- additionalProperties: boolean;
354
761
  description: string;
355
- } | undefined;
356
- ticketFilter?: {
762
+ };
763
+ ticketFilter: {
357
764
  type: string;
358
765
  properties: {
359
766
  priority: {
@@ -374,15 +781,15 @@ export function buildRoundSchema(menu: any[], { questions, sheets, ticket }?: {
374
781
  };
375
782
  additionalProperties: boolean;
376
783
  description: string;
377
- } | undefined;
378
- ticketWatch?: {
784
+ };
785
+ ticketWatch: {
379
786
  type: string;
380
787
  items: {
381
788
  type: string;
382
789
  enum: string[];
383
790
  };
384
791
  description: string;
385
- } | undefined;
792
+ };
386
793
  steps: {
387
794
  type: string;
388
795
  minItems: number;
@@ -613,7 +1020,7 @@ export function goalForLine(fromLine: any, lines: any): any;
613
1020
  * `learnHints` (M8 item 5a): the earlier runs' notes block (src/learnstore.js hintsForRun), appended to the drafter's system prompt; null = nothing.
614
1021
  * `look` / `pageLooks` (M10 item 3) are there when the job signs a web page: the kept facts (with their `reading`, the input a later ask reads), every drop, and per page its address, sha256 and the AI's map. Each drop is also a line in `notChecked`.
615
1022
  */
616
- export function draft({ proseText, slot, model, provider: injected, rates: injectedRates, modelId: injectedModelId, env, priorSpend, skills, makeProviderFn, onBook, offerQuestions, draftThinking, draftDir, fetchPage, leftRules, learnHints, mcpServers, }: {
1023
+ export function draft({ proseText, slot, model, provider: injected, rates: injectedRates, modelId: injectedModelId, env, priorSpend, skills, makeProviderFn, onBook, offerQuestions, draftThinking, draftDir, fetchPage, leftRules, learnHints, mcpServers, flowType, mcp, }: {
617
1024
  proseText: any;
618
1025
  slot: any;
619
1026
  model: any;
@@ -638,6 +1045,8 @@ export function draft({ proseText, slot, model, provider: injected, rates: injec
638
1045
  ids: string[];
639
1046
  } | null | undefined;
640
1047
  mcpServers?: string[] | undefined;
1048
+ flowType?: "mcp" | "plain" | "tickets" | undefined;
1049
+ mcp?: any;
641
1050
  }): Promise<{
642
1051
  ok: boolean;
643
1052
  declaration: object | null;
@@ -0,0 +1,8 @@
1
+ /** append ONE line; throws when it cannot be written @param {string|undefined} home @param {Record<string, any>} entry */
2
+ export function appendMcpCheck(home: string | undefined, entry: Record<string, any>): void;
3
+ /** the newest line per `path\tserver` @param {string|undefined} home @returns {Map<string, any>} */
4
+ export function newestMcpChecks(home: string | undefined): Map<string, any>;
5
+ /** M13 piece 4 (R1): the tool names of the newest OK line (with at least one tool) for this server at this path, or null @param {string|undefined} home @param {string} server @param {string} path @returns {string[]|null} */
6
+ export function newestOkMcpTools(home: string | undefined, server: string, path: string): string[] | null;
7
+ export const MCP_CHECKS_FILE: "mcp-checks.jsonl";
8
+ export function mcpChecksFile(home: string | undefined): string;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * @param {string} server @param {string|undefined|null} home the config home; undefined = the door's decision (`configDoorHome`: a test process with no `FWDLOOP_CONFIG_HOME` has none, so "never checked"; otherwise the default config home); null = none
3
+ * @returns {{ ok: true, server: string, tools: string[] } | { ok: false, say: string }}
4
+ */
5
+ export function mcpPickFor(server: string, home: string | undefined | null): {
6
+ ok: true;
7
+ server: string;
8
+ tools: string[];
9
+ } | {
10
+ ok: false;
11
+ say: string;
12
+ };
13
+ /** `mcpPickFor` at the config home this process uses (a test process with no `FWDLOOP_CONFIG_HOME` has none) @param {string} server */
14
+ export function mcpPickHere(server: string): {
15
+ ok: true;
16
+ server: string;
17
+ tools: string[];
18
+ } | {
19
+ ok: false;
20
+ say: string;
21
+ };
22
+ /** the one refusal for an MCP nobody has checked (or whose check never succeeded) */
23
+ export const NEVER_CHECKED_SAY: "press check tools in Settings > MCP first";
@@ -0,0 +1,51 @@
1
+ /** the added paths in config.json (typed form); none under a test process with no config home, or when config.json is broken (the page says so) @param {string} [home] */
2
+ export function addedMcpPaths(home?: string): {
3
+ paths: string[];
4
+ problem: null;
5
+ } | {
6
+ paths: never[];
7
+ problem: string;
8
+ };
9
+ /**
10
+ * Every place, in order, with the servers found in it.
11
+ * `status`: 'found' (a readable file), 'missing' (no file) or 'not-json' (a file that is not JSON; bare-agent skips it silently).
12
+ * A server: `{name, remote, shadowedBy}`; `shadowedBy` is the shown path of the earlier place that has the same name (the earlier one wins), or null.
13
+ * @param {{ home?: string }} [o] `home` the config home (tests); undefined = the door's
14
+ * @returns {{ places: Array<{ path: string, file: string, added: boolean, status: 'found'|'missing'|'not-json', servers: Array<{name: string, remote: boolean, shadowedBy: string|null}> }>, problem: string|null }}
15
+ */
16
+ export function mcpSources(o?: {
17
+ home?: string;
18
+ }): {
19
+ places: Array<{
20
+ path: string;
21
+ file: string;
22
+ added: boolean;
23
+ status: "found" | "missing" | "not-json";
24
+ servers: Array<{
25
+ name: string;
26
+ remote: boolean;
27
+ shadowedBy: string | null;
28
+ }>;
29
+ }>;
30
+ problem: string | null;
31
+ };
32
+ /**
33
+ * The file that holds the WINNING `server` (the first place in the list that has the name), whether it is remote, or null when no place has it.
34
+ * Every place fwdloop starts an MCP from takes its config file from here.
35
+ * @param {string} server @param {{ home?: string }} [o]
36
+ * @returns {{ file: string, remote: boolean } | null}
37
+ */
38
+ export function mcpConfigFor(server: string, o?: {
39
+ home?: string;
40
+ }): {
41
+ file: string;
42
+ remote: boolean;
43
+ } | null;
44
+ /** the names of the servers that can be started (winners only, remote left out) @param {{ home?: string }} [o] @returns {string[]} */
45
+ export function startableMcpServers(o?: {
46
+ home?: string;
47
+ }): string[];
48
+ export { mcpPathProblem } from "./config.js";
49
+ export function DEFAULT_MCP_PLACES(): string[];
50
+ export function expandMcpPath(p: string): string;
51
+ export function showMcpPath(p: string): string;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @param {string} root the jobs folder (`<root>/<flow>/runs/run-<n>/`)
3
+ * @param {string[]} servers the server names to count for; a step tool row belongs to the LONGEST name that prefixes it with `_`
4
+ * @returns {Map<string, { calls: number, runs: number, last: string|null, denied: number, tools: Map<string, number> }>}
5
+ */
6
+ export function countMcpUse(root: string, servers: string[]): Map<string, {
7
+ calls: number;
8
+ runs: number;
9
+ last: string | null;
10
+ denied: number;
11
+ tools: Map<string, number>;
12
+ }>;
@@ -0,0 +1,2 @@
1
+ /** @param {unknown} x @param {unknown} y @returns {number} negative, 0 or positive, like a sort callback */
2
+ export function compareNatural(x: unknown, y: unknown): number;