fwdloop 0.27.0 → 0.29.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/README.md +1 -1
- package/bin/fwdloop +54 -13
- package/package.json +3 -3
- package/src/ask.js +1 -1
- package/src/audit-fold.js +9 -1
- package/src/authoring.js +22 -5
- package/src/canrun.js +19 -16
- package/src/checked.js +5 -2
- package/src/checkpick.js +257 -0
- package/src/checkwords.js +24 -0
- package/src/closers.js +8 -1
- package/src/config.js +18 -0
- package/src/declaration.js +85 -5
- package/src/drafter.js +143 -47
- package/src/flow.js +2 -1
- package/src/launcher.js +4 -2
- package/src/learn.js +1 -1
- package/src/learnstore.js +8 -7
- package/src/mcp-checks.js +50 -0
- package/src/mcp-pick.js +33 -0
- package/src/mcp-sources.js +84 -0
- package/src/mcp-use.js +54 -0
- package/src/memo.js +120 -0
- package/src/model-step.js +89 -17
- package/src/natural.js +23 -0
- package/src/pageask.js +9 -6
- package/src/pagedropwords.js +9 -0
- package/src/panel/author.js +50 -28
- package/src/panel/authorcard.js +86 -2
- package/src/panel/authorflows.js +18 -14
- package/src/panel/authortrigger.js +241 -84
- package/src/panel/data.js +99 -11
- package/src/panel/index.html +683 -210
- package/src/panel/jobgrid.js +127 -0
- package/src/panel/result.js +28 -7
- package/src/panel/scheduler.js +8 -2
- package/src/panel/server.js +17 -7
- package/src/panel/settings.js +119 -4
- package/src/panel/tickets.js +12 -7
- package/src/pickrecord.js +146 -0
- package/src/plain-checks.js +1 -0
- package/src/primitives.js +34 -5
- package/src/provider.js +4 -1
- package/src/runfile.js +4 -2
- package/src/runner.js +170 -45
- package/src/send.js +71 -4
- package/src/setup.js +13 -1
- package/src/summary-words.js +15 -3
- package/src/ticket-draft.js +40 -42
- package/src/ticket-labels.js +10 -0
- package/src/ticket-mcp.js +33 -10
- package/src/ticket-next.js +33 -0
- package/src/ticket-shape.js +9 -0
- package/src/trigger-clock.js +4 -4
- package/src/trigger-files.js +3 -3
- package/src/trigger-tickets.js +41 -12
- package/types/ask.d.ts +2 -1
- package/types/audit-fold.d.ts +13 -2
- package/types/authoring.d.ts +10 -2
- package/types/canrun.d.ts +5 -12
- package/types/checked.d.ts +7 -2
- package/types/checkpick.d.ts +149 -0
- package/types/checkwords.d.ts +14 -0
- package/types/closers.d.ts +2 -1
- package/types/config.d.ts +6 -0
- package/types/declaration.d.ts +17 -0
- package/types/drafter.d.ts +446 -50
- package/types/learn.d.ts +1 -0
- package/types/learnstore.d.ts +2 -3
- package/types/mcp-checks.d.ts +8 -0
- package/types/mcp-pick.d.ts +23 -0
- package/types/mcp-sources.d.ts +51 -0
- package/types/mcp-use.d.ts +12 -0
- package/types/memo.d.ts +15 -0
- package/types/model-step.d.ts +5 -0
- package/types/natural.d.ts +2 -0
- package/types/pageask.d.ts +9 -2
- package/types/pagedropwords.d.ts +1 -0
- package/types/panel/author.d.ts +37 -1
- package/types/panel/authorcard.d.ts +52 -0
- package/types/panel/authorflows.d.ts +9 -1
- package/types/panel/authortrigger.d.ts +73 -7
- package/types/panel/data.d.ts +56 -2
- package/types/panel/jobgrid.d.ts +109 -0
- package/types/panel/result.d.ts +9 -3
- package/types/panel/server.d.ts +5 -1
- package/types/panel/settings.d.ts +3 -2
- package/types/panel/tickets.d.ts +26 -4
- package/types/pickrecord.d.ts +88 -0
- package/types/primitives.d.ts +15 -2
- package/types/runfile.d.ts +7 -2
- package/types/runner.d.ts +128 -77
- package/types/send.d.ts +10 -2
- package/types/setup.d.ts +1 -56
- package/types/summary-words.d.ts +22 -3
- package/types/ticket-draft.d.ts +40 -32
- package/types/ticket-labels.d.ts +6 -0
- package/types/ticket-mcp.d.ts +18 -1
- package/types/ticket-next.d.ts +23 -0
- package/types/ticket-shape.d.ts +5 -0
- package/types/trigger-clock.d.ts +4 -3
- package/types/trigger-files.d.ts +1 -1
- package/types/trigger-tickets.d.ts +18 -4
- package/src/attemptdiff.js +0 -118
- package/types/attemptdiff.d.ts +0 -38
package/types/drafter.d.ts
CHANGED
|
@@ -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
|
-
*
|
|
5
|
-
* @param {any[]} menu @param {{sheets?: Record<string, {header: string[]}>, ticket?: {
|
|
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
|
-
|
|
12
|
+
flowType: "mcp" | "tickets";
|
|
13
|
+
tools: string[];
|
|
13
14
|
};
|
|
14
15
|
}): {
|
|
15
16
|
type: string;
|
|
@@ -47,26 +48,219 @@ export function buildDeclarationSchema(menu: any[], { sheets, ticket }?: {
|
|
|
47
48
|
};
|
|
48
49
|
description: string;
|
|
49
50
|
};
|
|
50
|
-
|
|
51
|
+
ticketFilter?: undefined;
|
|
52
|
+
ticketWatch?: undefined;
|
|
53
|
+
steps: {
|
|
51
54
|
type: string;
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
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
|
+
cited: Readonly<{
|
|
95
|
+
type: "object";
|
|
96
|
+
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";
|
|
97
|
+
properties: {
|
|
98
|
+
source: {
|
|
99
|
+
type: string;
|
|
100
|
+
description: string;
|
|
101
|
+
};
|
|
102
|
+
facts: {
|
|
103
|
+
type: string;
|
|
104
|
+
minItems: number;
|
|
105
|
+
maxItems: number;
|
|
106
|
+
description: string;
|
|
107
|
+
items: {
|
|
108
|
+
type: string;
|
|
109
|
+
properties: {
|
|
110
|
+
name: {
|
|
111
|
+
type: string;
|
|
112
|
+
description: string;
|
|
113
|
+
};
|
|
114
|
+
shape: {
|
|
115
|
+
type: string;
|
|
116
|
+
enum: string[];
|
|
117
|
+
};
|
|
118
|
+
unit: {
|
|
119
|
+
type: string[];
|
|
120
|
+
items: {
|
|
121
|
+
type: string;
|
|
122
|
+
};
|
|
123
|
+
description: string;
|
|
124
|
+
};
|
|
125
|
+
currency: {
|
|
126
|
+
type: string[];
|
|
127
|
+
items: {
|
|
128
|
+
type: string;
|
|
129
|
+
};
|
|
130
|
+
description: string;
|
|
131
|
+
};
|
|
132
|
+
phrase: {
|
|
133
|
+
type: string;
|
|
134
|
+
description: string;
|
|
135
|
+
};
|
|
136
|
+
anchor: {
|
|
137
|
+
type: string;
|
|
138
|
+
description: string;
|
|
139
|
+
};
|
|
140
|
+
until: {
|
|
141
|
+
type: string;
|
|
142
|
+
description: string;
|
|
143
|
+
};
|
|
144
|
+
rule: {
|
|
145
|
+
type: string;
|
|
146
|
+
description: string;
|
|
147
|
+
properties: {
|
|
148
|
+
op: {
|
|
149
|
+
type: string;
|
|
150
|
+
enum: string[];
|
|
151
|
+
};
|
|
152
|
+
value: {};
|
|
153
|
+
lo: {};
|
|
154
|
+
hi: {};
|
|
155
|
+
};
|
|
156
|
+
required: string[];
|
|
157
|
+
additionalProperties: boolean;
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
required: string[];
|
|
161
|
+
additionalProperties: boolean;
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
count: {
|
|
165
|
+
type: string;
|
|
166
|
+
description: string;
|
|
167
|
+
properties: {
|
|
168
|
+
min: {
|
|
169
|
+
type: string;
|
|
170
|
+
minimum: number;
|
|
171
|
+
};
|
|
172
|
+
max: {
|
|
173
|
+
type: string;
|
|
174
|
+
minimum: number;
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
additionalProperties: boolean;
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
required: string[];
|
|
181
|
+
additionalProperties: false;
|
|
182
|
+
}>;
|
|
183
|
+
columns: Readonly<{
|
|
184
|
+
type: "array";
|
|
185
|
+
minItems: 1;
|
|
186
|
+
maxItems: 10;
|
|
187
|
+
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";
|
|
188
|
+
items: {
|
|
189
|
+
type: string;
|
|
190
|
+
properties: {
|
|
191
|
+
source: {
|
|
192
|
+
type: string;
|
|
193
|
+
description: string;
|
|
194
|
+
};
|
|
195
|
+
column: {
|
|
196
|
+
type: string;
|
|
197
|
+
description: string;
|
|
198
|
+
};
|
|
199
|
+
};
|
|
200
|
+
required: string[];
|
|
201
|
+
additionalProperties: boolean;
|
|
202
|
+
};
|
|
203
|
+
}>;
|
|
204
|
+
};
|
|
205
|
+
required: string[];
|
|
206
|
+
additionalProperties: boolean;
|
|
207
|
+
};
|
|
208
|
+
mcpTools?: {
|
|
209
|
+
type: string;
|
|
210
|
+
items: {
|
|
211
|
+
type: string;
|
|
212
|
+
enum: string[];
|
|
213
|
+
};
|
|
214
|
+
description: string;
|
|
215
|
+
} | undefined;
|
|
216
|
+
primitives: {
|
|
217
|
+
type: string;
|
|
218
|
+
items: {
|
|
219
|
+
type: string;
|
|
220
|
+
enum: any[];
|
|
221
|
+
};
|
|
222
|
+
description: string;
|
|
223
|
+
};
|
|
56
224
|
};
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
225
|
+
required: string[];
|
|
226
|
+
additionalProperties: boolean;
|
|
227
|
+
};
|
|
228
|
+
};
|
|
229
|
+
} | {
|
|
230
|
+
guardrailClasses: {
|
|
231
|
+
type: string;
|
|
232
|
+
additionalProperties: {
|
|
233
|
+
type: string;
|
|
234
|
+
enum: string[];
|
|
235
|
+
};
|
|
236
|
+
description: string;
|
|
237
|
+
};
|
|
238
|
+
unjudgeable: {
|
|
239
|
+
type: string;
|
|
240
|
+
additionalProperties: {
|
|
241
|
+
type: string;
|
|
242
|
+
};
|
|
243
|
+
description: string;
|
|
244
|
+
};
|
|
245
|
+
refused: {
|
|
246
|
+
type: string;
|
|
247
|
+
items: {
|
|
248
|
+
type: string;
|
|
249
|
+
properties: {
|
|
250
|
+
line: {
|
|
60
251
|
type: string;
|
|
61
|
-
|
|
252
|
+
};
|
|
253
|
+
reason: {
|
|
254
|
+
type: string;
|
|
255
|
+
minLength: number;
|
|
62
256
|
};
|
|
63
257
|
};
|
|
258
|
+
required: string[];
|
|
259
|
+
additionalProperties: boolean;
|
|
64
260
|
};
|
|
65
|
-
required: string[];
|
|
66
|
-
additionalProperties: boolean;
|
|
67
261
|
description: string;
|
|
68
|
-
}
|
|
69
|
-
ticketFilter
|
|
262
|
+
};
|
|
263
|
+
ticketFilter: {
|
|
70
264
|
type: string;
|
|
71
265
|
properties: {
|
|
72
266
|
priority: {
|
|
@@ -87,15 +281,15 @@ export function buildDeclarationSchema(menu: any[], { sheets, ticket }?: {
|
|
|
87
281
|
};
|
|
88
282
|
additionalProperties: boolean;
|
|
89
283
|
description: string;
|
|
90
|
-
}
|
|
91
|
-
ticketWatch
|
|
284
|
+
};
|
|
285
|
+
ticketWatch: {
|
|
92
286
|
type: string;
|
|
93
287
|
items: {
|
|
94
288
|
type: string;
|
|
95
289
|
enum: string[];
|
|
96
290
|
};
|
|
97
291
|
description: string;
|
|
98
|
-
}
|
|
292
|
+
};
|
|
99
293
|
steps: {
|
|
100
294
|
type: string;
|
|
101
295
|
minItems: number;
|
|
@@ -137,12 +331,6 @@ export function buildDeclarationSchema(menu: any[], { sheets, ticket }?: {
|
|
|
137
331
|
enum: string[];
|
|
138
332
|
description: string;
|
|
139
333
|
};
|
|
140
|
-
shape: {
|
|
141
|
-
type: string;
|
|
142
|
-
properties: {};
|
|
143
|
-
additionalProperties: boolean;
|
|
144
|
-
description: string;
|
|
145
|
-
};
|
|
146
334
|
cited: Readonly<{
|
|
147
335
|
type: "object";
|
|
148
336
|
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";
|
|
@@ -283,14 +471,15 @@ export function buildDeclarationSchema(menu: any[], { sheets, ticket }?: {
|
|
|
283
471
|
additionalProperties: boolean;
|
|
284
472
|
};
|
|
285
473
|
/** 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?: {
|
|
474
|
+
/** @param {any[]} menu @param {{questions?: boolean, sheets?: Record<string, {header: string[]}>|undefined, ticket?: {flowType: 'mcp'|'tickets', tools: string[]}}} [o] */
|
|
287
475
|
export function buildRoundSchema(menu: any[], { questions, sheets, ticket }?: {
|
|
288
476
|
questions?: boolean;
|
|
289
477
|
sheets?: Record<string, {
|
|
290
478
|
header: string[];
|
|
291
479
|
}> | undefined;
|
|
292
480
|
ticket?: {
|
|
293
|
-
|
|
481
|
+
flowType: "mcp" | "tickets";
|
|
482
|
+
tools: string[];
|
|
294
483
|
};
|
|
295
484
|
}): {
|
|
296
485
|
properties: {
|
|
@@ -334,26 +523,226 @@ export function buildRoundSchema(menu: any[], { questions, sheets, ticket }?: {
|
|
|
334
523
|
};
|
|
335
524
|
description: string;
|
|
336
525
|
};
|
|
337
|
-
|
|
526
|
+
ticketFilter?: undefined;
|
|
527
|
+
ticketWatch?: undefined;
|
|
528
|
+
steps: {
|
|
338
529
|
type: string;
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
530
|
+
minItems: number;
|
|
531
|
+
items: {
|
|
532
|
+
type: string;
|
|
533
|
+
properties: {
|
|
534
|
+
reads: {
|
|
535
|
+
type: string;
|
|
536
|
+
items: {
|
|
537
|
+
type: string;
|
|
538
|
+
};
|
|
539
|
+
description: string;
|
|
540
|
+
};
|
|
541
|
+
emits: {
|
|
542
|
+
type: string;
|
|
543
|
+
minLength: number;
|
|
544
|
+
description: string;
|
|
545
|
+
};
|
|
546
|
+
fromLine: {
|
|
547
|
+
type: string[];
|
|
548
|
+
description: string;
|
|
549
|
+
};
|
|
550
|
+
picks: {
|
|
551
|
+
type: string;
|
|
552
|
+
additionalProperties: {
|
|
553
|
+
type: string;
|
|
554
|
+
items: {
|
|
555
|
+
type: string;
|
|
556
|
+
};
|
|
557
|
+
};
|
|
558
|
+
description: string;
|
|
559
|
+
};
|
|
560
|
+
close: {
|
|
561
|
+
type: string;
|
|
562
|
+
properties: {
|
|
563
|
+
sheet?: Record<string, any> | undefined;
|
|
564
|
+
class: {
|
|
565
|
+
type: string;
|
|
566
|
+
enum: string[];
|
|
567
|
+
description: string;
|
|
568
|
+
};
|
|
569
|
+
cited: Readonly<{
|
|
570
|
+
type: "object";
|
|
571
|
+
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";
|
|
572
|
+
properties: {
|
|
573
|
+
source: {
|
|
574
|
+
type: string;
|
|
575
|
+
description: string;
|
|
576
|
+
};
|
|
577
|
+
facts: {
|
|
578
|
+
type: string;
|
|
579
|
+
minItems: number;
|
|
580
|
+
maxItems: number;
|
|
581
|
+
description: string;
|
|
582
|
+
items: {
|
|
583
|
+
type: string;
|
|
584
|
+
properties: {
|
|
585
|
+
name: {
|
|
586
|
+
type: string;
|
|
587
|
+
description: string;
|
|
588
|
+
};
|
|
589
|
+
shape: {
|
|
590
|
+
type: string;
|
|
591
|
+
enum: string[];
|
|
592
|
+
};
|
|
593
|
+
unit: {
|
|
594
|
+
type: string[];
|
|
595
|
+
items: {
|
|
596
|
+
type: string;
|
|
597
|
+
};
|
|
598
|
+
description: string;
|
|
599
|
+
};
|
|
600
|
+
currency: {
|
|
601
|
+
type: string[];
|
|
602
|
+
items: {
|
|
603
|
+
type: string;
|
|
604
|
+
};
|
|
605
|
+
description: string;
|
|
606
|
+
};
|
|
607
|
+
phrase: {
|
|
608
|
+
type: string;
|
|
609
|
+
description: string;
|
|
610
|
+
};
|
|
611
|
+
anchor: {
|
|
612
|
+
type: string;
|
|
613
|
+
description: string;
|
|
614
|
+
};
|
|
615
|
+
until: {
|
|
616
|
+
type: string;
|
|
617
|
+
description: string;
|
|
618
|
+
};
|
|
619
|
+
rule: {
|
|
620
|
+
type: string;
|
|
621
|
+
description: string;
|
|
622
|
+
properties: {
|
|
623
|
+
op: {
|
|
624
|
+
type: string;
|
|
625
|
+
enum: string[];
|
|
626
|
+
};
|
|
627
|
+
value: {};
|
|
628
|
+
lo: {};
|
|
629
|
+
hi: {};
|
|
630
|
+
};
|
|
631
|
+
required: string[];
|
|
632
|
+
additionalProperties: boolean;
|
|
633
|
+
};
|
|
634
|
+
};
|
|
635
|
+
required: string[];
|
|
636
|
+
additionalProperties: boolean;
|
|
637
|
+
};
|
|
638
|
+
};
|
|
639
|
+
count: {
|
|
640
|
+
type: string;
|
|
641
|
+
description: string;
|
|
642
|
+
properties: {
|
|
643
|
+
min: {
|
|
644
|
+
type: string;
|
|
645
|
+
minimum: number;
|
|
646
|
+
};
|
|
647
|
+
max: {
|
|
648
|
+
type: string;
|
|
649
|
+
minimum: number;
|
|
650
|
+
};
|
|
651
|
+
};
|
|
652
|
+
additionalProperties: boolean;
|
|
653
|
+
};
|
|
654
|
+
};
|
|
655
|
+
required: string[];
|
|
656
|
+
additionalProperties: false;
|
|
657
|
+
}>;
|
|
658
|
+
columns: Readonly<{
|
|
659
|
+
type: "array";
|
|
660
|
+
minItems: 1;
|
|
661
|
+
maxItems: 10;
|
|
662
|
+
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";
|
|
663
|
+
items: {
|
|
664
|
+
type: string;
|
|
665
|
+
properties: {
|
|
666
|
+
source: {
|
|
667
|
+
type: string;
|
|
668
|
+
description: string;
|
|
669
|
+
};
|
|
670
|
+
column: {
|
|
671
|
+
type: string;
|
|
672
|
+
description: string;
|
|
673
|
+
};
|
|
674
|
+
};
|
|
675
|
+
required: string[];
|
|
676
|
+
additionalProperties: boolean;
|
|
677
|
+
};
|
|
678
|
+
}>;
|
|
679
|
+
};
|
|
680
|
+
required: string[];
|
|
681
|
+
additionalProperties: boolean;
|
|
682
|
+
};
|
|
683
|
+
mcpTools?: {
|
|
684
|
+
type: string;
|
|
685
|
+
items: {
|
|
686
|
+
type: string;
|
|
687
|
+
enum: string[];
|
|
688
|
+
};
|
|
689
|
+
description: string;
|
|
690
|
+
} | undefined;
|
|
691
|
+
primitives: {
|
|
692
|
+
type: string;
|
|
693
|
+
items: {
|
|
694
|
+
type: string;
|
|
695
|
+
enum: any[];
|
|
696
|
+
};
|
|
697
|
+
description: string;
|
|
698
|
+
};
|
|
343
699
|
};
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
700
|
+
required: string[];
|
|
701
|
+
additionalProperties: boolean;
|
|
702
|
+
};
|
|
703
|
+
};
|
|
704
|
+
} | {
|
|
705
|
+
notChecked: {
|
|
706
|
+
type: string;
|
|
707
|
+
items: {
|
|
708
|
+
type: string;
|
|
709
|
+
};
|
|
710
|
+
description: string;
|
|
711
|
+
};
|
|
712
|
+
guardrailClasses: {
|
|
713
|
+
type: string;
|
|
714
|
+
additionalProperties: {
|
|
715
|
+
type: string;
|
|
716
|
+
enum: string[];
|
|
717
|
+
};
|
|
718
|
+
description: string;
|
|
719
|
+
};
|
|
720
|
+
unjudgeable: {
|
|
721
|
+
type: string;
|
|
722
|
+
additionalProperties: {
|
|
723
|
+
type: string;
|
|
724
|
+
};
|
|
725
|
+
description: string;
|
|
726
|
+
};
|
|
727
|
+
refused: {
|
|
728
|
+
type: string;
|
|
729
|
+
items: {
|
|
730
|
+
type: string;
|
|
731
|
+
properties: {
|
|
732
|
+
line: {
|
|
347
733
|
type: string;
|
|
348
|
-
|
|
734
|
+
};
|
|
735
|
+
reason: {
|
|
736
|
+
type: string;
|
|
737
|
+
minLength: number;
|
|
349
738
|
};
|
|
350
739
|
};
|
|
740
|
+
required: string[];
|
|
741
|
+
additionalProperties: boolean;
|
|
351
742
|
};
|
|
352
|
-
required: string[];
|
|
353
|
-
additionalProperties: boolean;
|
|
354
743
|
description: string;
|
|
355
|
-
}
|
|
356
|
-
ticketFilter
|
|
744
|
+
};
|
|
745
|
+
ticketFilter: {
|
|
357
746
|
type: string;
|
|
358
747
|
properties: {
|
|
359
748
|
priority: {
|
|
@@ -374,15 +763,15 @@ export function buildRoundSchema(menu: any[], { questions, sheets, ticket }?: {
|
|
|
374
763
|
};
|
|
375
764
|
additionalProperties: boolean;
|
|
376
765
|
description: string;
|
|
377
|
-
}
|
|
378
|
-
ticketWatch
|
|
766
|
+
};
|
|
767
|
+
ticketWatch: {
|
|
379
768
|
type: string;
|
|
380
769
|
items: {
|
|
381
770
|
type: string;
|
|
382
771
|
enum: string[];
|
|
383
772
|
};
|
|
384
773
|
description: string;
|
|
385
|
-
}
|
|
774
|
+
};
|
|
386
775
|
steps: {
|
|
387
776
|
type: string;
|
|
388
777
|
minItems: number;
|
|
@@ -424,12 +813,6 @@ export function buildRoundSchema(menu: any[], { questions, sheets, ticket }?: {
|
|
|
424
813
|
enum: string[];
|
|
425
814
|
description: string;
|
|
426
815
|
};
|
|
427
|
-
shape: {
|
|
428
|
-
type: string;
|
|
429
|
-
properties: {};
|
|
430
|
-
additionalProperties: boolean;
|
|
431
|
-
description: string;
|
|
432
|
-
};
|
|
433
816
|
cited: Readonly<{
|
|
434
817
|
type: "object";
|
|
435
818
|
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";
|
|
@@ -613,7 +996,7 @@ export function goalForLine(fromLine: any, lines: any): any;
|
|
|
613
996
|
* `learnHints` (M8 item 5a): the earlier runs' notes block (src/learnstore.js hintsForRun), appended to the drafter's system prompt; null = nothing.
|
|
614
997
|
* `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
998
|
*/
|
|
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, }: {
|
|
999
|
+
export function draft({ proseText, slot, model, provider: injected, rates: injectedRates, modelId: injectedModelId, env, priorSpend, skills, makeProviderFn, onBook, offerQuestions, draftThinking, draftDir, fetchPage, leftRules, checkPicks, carriedPicks, onPickRecord, learnHints, mcpServers, flowType, mcp, }: {
|
|
617
1000
|
proseText: any;
|
|
618
1001
|
slot: any;
|
|
619
1002
|
model: any;
|
|
@@ -633,11 +1016,24 @@ export function draft({ proseText, slot, model, provider: injected, rates: injec
|
|
|
633
1016
|
line: number;
|
|
634
1017
|
rule: number;
|
|
635
1018
|
}[] | undefined;
|
|
1019
|
+
checkPicks?: import("./checkpick.js").Pick[] | undefined;
|
|
1020
|
+
carriedPicks?: import("./pickrecord.js").Entry[] | undefined;
|
|
1021
|
+
onPickRecord?: ((r: {
|
|
1022
|
+
picks: import("./pickrecord.js").Entry[];
|
|
1023
|
+
kept: {
|
|
1024
|
+
line: number;
|
|
1025
|
+
rule: number;
|
|
1026
|
+
ruleText: string;
|
|
1027
|
+
check: Record<string, any> | null;
|
|
1028
|
+
}[];
|
|
1029
|
+
}) => void) | null | undefined;
|
|
636
1030
|
learnHints?: {
|
|
637
1031
|
text: string;
|
|
638
1032
|
ids: string[];
|
|
639
1033
|
} | null | undefined;
|
|
640
1034
|
mcpServers?: string[] | undefined;
|
|
1035
|
+
flowType?: "mcp" | "plain" | "tickets" | undefined;
|
|
1036
|
+
mcp?: any;
|
|
641
1037
|
}): Promise<{
|
|
642
1038
|
ok: boolean;
|
|
643
1039
|
declaration: object | null;
|
package/types/learn.d.ts
CHANGED
|
@@ -343,6 +343,7 @@ export const SUSPECT_KEEP: 100;
|
|
|
343
343
|
* src/authoring.js; a test fails if the two drift apart). Anything else in a bracket is NOT a kind.
|
|
344
344
|
*/
|
|
345
345
|
export const ALLOWED_KINDS: readonly string[];
|
|
346
|
+
export function nameOf(g: string): string;
|
|
346
347
|
export function keyOfCard(c: {
|
|
347
348
|
check: string;
|
|
348
349
|
kinds: string[];
|
package/types/learnstore.d.ts
CHANGED
|
@@ -110,15 +110,14 @@ export function eventsOfRun(runDir: string, workflow: string): {
|
|
|
110
110
|
* with a signed ask included; there is no hold. It runs whether `learningHints` is on or off. `questions` (bareloop's stageQuestionsByName) is, here, the failing check's own text from
|
|
111
111
|
* the run's diary.jsonl, so a check with no checks row there (a run from before am29) has no `meaning`.
|
|
112
112
|
* Borrowed-from: bareloop src/learnstore.js@v0.47.0:124 (learnAtRunEnd).
|
|
113
|
-
* @param {{home?: string, workflow: string, runId: string, runDir: string,
|
|
113
|
+
* @param {{home?: string, workflow: string, runId: string, runDir: string, now?: Date}} o
|
|
114
114
|
* @returns {{wrote: boolean, counted: number, held: number, problem: string|null, noise: string|null, cards: number}}
|
|
115
115
|
*/
|
|
116
|
-
export function learnAtRunEnd({ home, workflow, runId, runDir,
|
|
116
|
+
export function learnAtRunEnd({ home, workflow, runId, runDir, now }: {
|
|
117
117
|
home?: string;
|
|
118
118
|
workflow: string;
|
|
119
119
|
runId: string;
|
|
120
120
|
runDir: string;
|
|
121
|
-
specHash: string | null;
|
|
122
121
|
now?: Date;
|
|
123
122
|
}): {
|
|
124
123
|
wrote: boolean;
|
|
@@ -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";
|