fwdloop 0.33.0 → 0.34.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/bin/fwdloop +14 -2
- package/package.json +1 -1
- package/src/auditchecks.js +6 -4
- package/src/authoring.js +4 -3
- package/src/blockasks.js +3 -2
- package/src/blockassemble.js +40 -21
- package/src/blockdraft.js +8 -13
- package/src/blockpick.js +11 -1
- package/src/checkblock.js +95 -56
- package/src/checklist.js +1 -1
- package/src/checklistsign.js +1 -1
- package/src/checkpick.js +7 -73
- package/src/declaration.js +9 -7
- package/src/drafter.js +152 -130
- package/src/noteask.js +62 -0
- package/src/pageask.js +5 -68
- package/src/pagedry.js +27 -4
- package/src/pagerules.js +19 -3
- package/src/panel/author.js +3 -3
- package/src/panel/authorcard.js +34 -11
- package/src/panel/index.html +7 -1
- package/src/pickrecord.js +42 -54
- package/src/planrebuild.js +16 -6
- package/src/rowedit.js +35 -5
- package/src/rubricstep.js +9 -1
- package/src/setup.js +1 -1
- package/src/sheetblock.js +17 -7
- package/src/sheetbuild.js +151 -0
- package/src/sheetchecks.js +3 -2
- package/src/sheetfind.js +4 -4
- package/src/sheetlook.js +14 -3
- package/src/sheetoffer.js +50 -5
- package/src/sheetrows.js +18 -2
- package/src/ticket-draft.js +4 -21
- package/src/ticketrows.js +100 -0
- package/types/auditchecks.d.ts +2 -1
- package/types/authoring.d.ts +4 -2
- package/types/blockasks.d.ts +1 -2
- package/types/blockassemble.d.ts +20 -3
- package/types/blockdraft.d.ts +4 -12
- package/types/blockpick.d.ts +5 -0
- package/types/checkblock.d.ts +32 -17
- package/types/checklist.d.ts +3 -3
- package/types/checkpick.d.ts +4 -34
- package/types/declaration.d.ts +7 -0
- package/types/drafter.d.ts +15 -355
- package/types/noteask.d.ts +52 -0
- package/types/pageask.d.ts +0 -35
- package/types/pagedry.d.ts +13 -0
- package/types/pagerules.d.ts +7 -0
- package/types/panel/authorcard.d.ts +13 -8
- package/types/panel/authorflows.d.ts +4 -4
- package/types/panel/data.d.ts +1 -1
- package/types/pickrecord.d.ts +47 -13
- package/types/rowedit.d.ts +16 -1
- package/types/rubricstep.d.ts +3 -0
- package/types/sheetblock.d.ts +11 -4
- package/types/sheetbuild.d.ts +84 -0
- package/types/sheetchecks.d.ts +2 -1
- package/types/sheetfind.d.ts +2 -2
- package/types/sheetoffer.d.ts +26 -1
- package/types/sheetrows.d.ts +8 -0
- package/types/ticket-draft.d.ts +3 -49
- package/types/ticketrows.d.ts +61 -0
- package/src/repairs.js +0 -38
- package/types/repairs.d.ts +0 -13
package/src/sheetrows.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
// Words are fwd's existing sheet-check words (src/sheetblock.js `sheetPlainText`); nothing here words a check. What this throws away: the check's fields (id, claim, range ...); a row keeps its line, tag, part and key.
|
|
7
7
|
import { sheetLineBlocks, sheetPlainText } from './sheetblock.js';
|
|
8
8
|
import { closePartsOf } from './checklistsign.js';
|
|
9
|
-
import {
|
|
9
|
+
import { isDeepStrictEqual } from 'node:util';
|
|
10
10
|
|
|
11
11
|
const isRec = (/** @type {unknown} */ v) => v !== null && typeof v === 'object' && !Array.isArray(v);
|
|
12
12
|
|
|
@@ -34,7 +34,7 @@ export function sheetRowsOf({ declaration, lines, csvRoles }) {
|
|
|
34
34
|
const block = sheetLineBlocks({ declaration: { steps: [st] }, lines, csvRoles })[0];
|
|
35
35
|
if (!block) return;
|
|
36
36
|
block.checked.forEach((e, j) => {
|
|
37
|
-
const by =
|
|
37
|
+
const by = /** @type {'you'|'agent'} */ (e.by);
|
|
38
38
|
const key = sheetRowKey(st.fromLine, e.id);
|
|
39
39
|
const nums = Array.isArray(st.close.sheet[j]?.covers) ? st.close.sheet[j].covers.filter((/** @type {unknown} */ x) => Number.isInteger(x) && /** @type {number} */ (x) >= 1 && /** @type {number} */ (x) <= block.guardrails.length) : [];
|
|
40
40
|
signed.push({
|
|
@@ -58,6 +58,22 @@ export function withSheetCard(card, sheet, dropped = []) {
|
|
|
58
58
|
/** the dropped sheet checks the picks record keeps: `{key, line, index, check, text}` @returns {any[]} */
|
|
59
59
|
export const droppedSheetOf = (/** @type {any} */ record) => (isRec(record) && Array.isArray(record.sheetDropped) ? record.sheetDropped.filter((d) => isRec(d) && typeof d.key === 'string' && isRec(d.check) && Number.isInteger(d.line)) : []);
|
|
60
60
|
|
|
61
|
+
/** the fields that say what a check is: all but the names code gives it (id, claim) and the rules it covers */
|
|
62
|
+
const checkBody = (/** @type {any} */ c) => { const { id: _i, claim: _c, covers: _v, ...rest } = c; return rest; };
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* M17 am3: the key of the check of the line that IS a dropped one (same typed fields; code names every check, so an id says nothing across drafts), or null. A Revise keeps a Drop only for the very same check.
|
|
66
|
+
* @param {any} declaration @param {{line: number, check: any}} d a record of `droppedSheetOf` @returns {string|null}
|
|
67
|
+
*/
|
|
68
|
+
export function keyOfSameCheck(declaration, d) {
|
|
69
|
+
for (const st of isRec(declaration) && Array.isArray(declaration.steps) ? declaration.steps : []) {
|
|
70
|
+
if (!isRec(st) || st.fromLine !== d.line || !isRec(st.close) || !Array.isArray(st.close.sheet)) continue;
|
|
71
|
+
const hit = st.close.sheet.find((/** @type {any} */ c) => isRec(c) && isDeepStrictEqual(checkBody(c), checkBody(d.check)));
|
|
72
|
+
if (hit) return sheetRowKey(d.line, String(hit.id));
|
|
73
|
+
}
|
|
74
|
+
return null;
|
|
75
|
+
}
|
|
76
|
+
|
|
61
77
|
/**
|
|
62
78
|
* The person's Drop or Add on a sheet row, applied to the declaration (a copy). Same words as the block's own refusals (src/checkblock.js `rowChoice`).
|
|
63
79
|
* @param {{declaration: any, lines: any[], csvRoles: string[], op: 'drop'|'add', key: string, dropped: any[]}} o
|
package/src/ticket-draft.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// M12 piece 3 (docs/wiki/the-module-ladder.md, "M12 scope (restart)" item 4): what the DRAFTER is told about a ticket role, and what it may suggest.
|
|
2
2
|
// A ticket role is a signed page input (`source <role> = page:<address>`) whose address is a GitHub issues list: it is never fetched at draft (one ticket is read
|
|
3
|
-
// per run through the job's MCP tools). The drafter may SUGGEST the job's `mcp`/`mcpTools` (issue_read), and
|
|
3
|
+
// per run through the job's MCP tools). The drafter may SUGGEST the job's `mcp`/`mcpTools` (issue_read), and (M17 am6) suggests the `ticketFilter` / `ticketWatch` as an edit of the list's row-edit turn, never as a top-level field; code proves it (src/ticketrows.js), a human
|
|
4
4
|
// signs it and code decides at run. The first facts line is F90c's, the line that made the drafter read a ticket role at all (FINDINGS F90c, F92).
|
|
5
5
|
import { discoverServers } from 'bare-agent/mcp';
|
|
6
6
|
import { startableMcpServers } from './mcp-sources.js';
|
|
@@ -30,8 +30,6 @@ export function ticketFactsLines(role) {
|
|
|
30
30
|
`- ${role}: one ticket's text (a signed input, already frozen at run start; read it by listing "${role}" in a step's reads, do not fetch it)`,
|
|
31
31
|
` A step that reads "${role}" still lists "read" in its primitives: the ticket is frozen, but reading it is a grant.`,
|
|
32
32
|
` Flow type: Tickets. The ticket is already frozen under "${role}" by the job's own tools ("${TICKET_TOOL}" reads it, "${LOOK_TOOL}" looks for new ones); no step needs them. A step lists a tool in "mcpTools" ONLY if that step calls the tool live; leave "mcpTools" out of every other step. The job's server and tool list are set by the program, not by you.`,
|
|
33
|
-
' When a guardrail names a priority or a label (for example "priority P1 only", "only tickets with priority P1 count", "only issues labelled bug"), you MUST add a top-level "ticketFilter": {"priority": [P0 to P3 values], "labels": [label names]} for it; leave it out only when no guardrail names a priority or a label, and such a guardrail stays hitl. A human signs it and code decides at run; never invent a label.',
|
|
34
|
-
' You may SUGGEST a top-level "ticketWatch": ["state", "labels"] (one or both) ONLY for a guardrail that says to run a ticket again when its state or its labels change. Any other thing to watch cannot be put there: leave it out and it stays hitl.',
|
|
35
33
|
];
|
|
36
34
|
}
|
|
37
35
|
|
|
@@ -47,28 +45,13 @@ export function mcpFactsLines(server, tools) {
|
|
|
47
45
|
export const LOOK_TOOL = 'list_issues';
|
|
48
46
|
|
|
49
47
|
/**
|
|
50
|
-
* The schema parts a job with an MCP adds (M13 piece 4): per-step `mcpTools` (an enum of the job's tool names) for MCP (generic) and Tickets, and
|
|
51
|
-
*
|
|
48
|
+
* The schema parts a job with an MCP adds (M13 piece 4): per-step `mcpTools` (an enum of the job's tool names) for MCP (generic) and Tickets, and no top-level `ticketFilter` or `ticketWatch` (M17 am6: they are checks on the list, suggested in the
|
|
49
|
+
* row-edit turn, src/rowedit.js; a draft that carries one is refused). The job's own `mcp` block and `flowType` are NOT offered: code sets them.
|
|
52
50
|
* @param {{flowType: 'mcp'|'tickets', tools: string[]}} o
|
|
53
51
|
*/
|
|
54
52
|
export function ticketSchemaParts({ flowType, tools }) {
|
|
55
53
|
const step = { mcpTools: { type: 'array', items: { type: 'string', enum: tools }, description: 'the MCP tools this step calls LIVE (exact names); omit on every step that calls none' } };
|
|
56
|
-
|
|
57
|
-
return {
|
|
58
|
-
top: {
|
|
59
|
-
ticketFilter: {
|
|
60
|
-
type: 'object',
|
|
61
|
-
properties: {
|
|
62
|
-
priority: { type: 'array', items: { type: 'string', enum: ['P0', 'P1', 'P2', 'P3'] }, description: 'priorities a ticket must have; only when a guardrail names them' },
|
|
63
|
-
labels: { type: 'array', items: { type: 'string' }, description: 'label names, one of which a ticket must carry; only when a guardrail names them' },
|
|
64
|
-
},
|
|
65
|
-
additionalProperties: false,
|
|
66
|
-
description: 'required when a guardrail names a priority or a label: put those values here; leave it out only when no guardrail names one',
|
|
67
|
-
},
|
|
68
|
-
ticketWatch: { type: 'array', items: { type: 'string', enum: ['state', 'labels'] }, description: 'optional: suggest only for a guardrail that says to run a ticket again when its state or its labels change' },
|
|
69
|
-
},
|
|
70
|
-
step,
|
|
71
|
-
};
|
|
54
|
+
return { top: {}, step };
|
|
72
55
|
}
|
|
73
56
|
|
|
74
57
|
/**
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
// M17 am6 (docs/wiki/the-module-ladder.md): a Tickets `~` rule about which tickets to take ("priority P1 only") or what to watch ("run a ticket again when its state changes") is a ROW on the list.
|
|
2
|
+
// Its check is the job's `ticketFilter` or `ticketWatch`. The AI suggests the value as an edit of the row-edit turn (src/rowedit.js); code proves it with the declaration's own readers
|
|
3
|
+
// (src/declaration.js checkTicketFilter / checkTicketWatch) and writes the declaration's field from it, only when a rule of that kind is on the job. This file is the ONE writer of a ticket row,
|
|
4
|
+
// its signed fields, its card words and its proof. A job with no ticket rows (a plan signed before M17) is not examined: its filter and watch run exactly as signed.
|
|
5
|
+
// What this throws away: the filter's and watch's values (they stay in the declaration); a row keeps its line, rule number, tag, state and reason.
|
|
6
|
+
import { checkTicketFilter, checkTicketWatch, isCountGuardrail } from './declaration.js';
|
|
7
|
+
|
|
8
|
+
const isRec = (/** @type {unknown} */ v) => v !== null && typeof v === 'object' && !Array.isArray(v);
|
|
9
|
+
|
|
10
|
+
/** @type {readonly ('ticketFilter'|'ticketWatch')[]} */
|
|
11
|
+
export const TICKET_FIELDS = Object.freeze(['ticketFilter', 'ticketWatch']);
|
|
12
|
+
/** the Not-checked reason of a ticket rule no legal value was suggested for (the block's own noPick sentence is used by the caller's words) */
|
|
13
|
+
export const NO_VALUE_WHY = 'No check was picked for it, so you judge it at the Ask.';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Which signed field a Tickets rule is the check of: `ticketWatch` (a state or labels change), `ticketFilter` (a priority P0 to P3 or a label), or null (a content rule or a count).
|
|
17
|
+
* @param {string} t the rule's words @returns {'ticketFilter'|'ticketWatch'|null}
|
|
18
|
+
*/
|
|
19
|
+
export function ticketRuleField(t) {
|
|
20
|
+
if (isCountGuardrail(t)) return null;
|
|
21
|
+
if (/\b(?:state|labels)\b[^;]*\bchange/i.test(t)) return 'ticketWatch';
|
|
22
|
+
if (/\bp[0-3]\b/i.test(t) || /\blabel(?:l?ed|s)?\b/i.test(t)) return 'ticketFilter';
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* The reds of a suggested value, by the declaration's own readers (a stand-in declaration with an `mcp` block so only the value is judged). Empty = legal.
|
|
28
|
+
* @param {'ticketFilter'|'ticketWatch'} field @param {unknown} value @returns {string[]}
|
|
29
|
+
*/
|
|
30
|
+
export function proposalReds(field, value) {
|
|
31
|
+
/** @type {string[]} */
|
|
32
|
+
const reds = [];
|
|
33
|
+
const d = { mcp: {}, [field]: value };
|
|
34
|
+
if (field === 'ticketFilter') checkTicketFilter(d, reds); else checkTicketWatch(d, reds);
|
|
35
|
+
return reds;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** the words a value is drawn with: the readout's own (src/authoring.js) @param {'ticketFilter'|'ticketWatch'} field @param {any} v */
|
|
39
|
+
export function ticketWords(field, v) {
|
|
40
|
+
if (field === 'ticketWatch') return `ticket watch: ${(Array.isArray(v) ? v : []).join(', ')}`;
|
|
41
|
+
const parts = [...(v?.priority?.length ? [`priority ${v.priority.join(', ')}`] : []), ...(v?.labels?.length ? [`labels ${v.labels.join(', ')}`] : [])];
|
|
42
|
+
return `ticket filter: ${parts.join(' · ')}`;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/** the key of a ticket row @param {number} line @param {number} rule @param {string} field */
|
|
46
|
+
export const ticketRowKey = (line, rule, field) => `L${line}.ticket.${field}.${rule}`;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* The ticket rows of a Tickets declaration: one per `~` rule of a filter or watch kind. Built when the declaration holds that field; else Not checked (the person judges it at the Ask).
|
|
50
|
+
* @param {{declaration: any, lines: {n: number, guardrail?: string|null}[]}} o `lines` = the signed lines (a line's `guardrail` is its `; `-joined `~` rules)
|
|
51
|
+
* @returns {{signed: Record<string, any>[], card: {key: string, line: number, by: 'you', state: string, text: string, reason: string|null, drop: false}[], notChecked: {line: number, rule: string, reason: string}[]}}
|
|
52
|
+
*/
|
|
53
|
+
export function ticketRowsOf({ declaration, lines }) {
|
|
54
|
+
/** @type {Record<string, any>[]} */ const signed = [];
|
|
55
|
+
/** @type {any[]} */ const card = [];
|
|
56
|
+
/** @type {{line: number, rule: string, reason: string}[]} */ const notChecked = [];
|
|
57
|
+
if (!isRec(declaration) || declaration.flowType !== 'tickets') return { signed, card, notChecked };
|
|
58
|
+
for (const l of lines) {
|
|
59
|
+
const rules = typeof l.guardrail === 'string' ? l.guardrail.split('; ').map((s) => s.trim()).filter(Boolean) : [];
|
|
60
|
+
rules.forEach((t, i) => {
|
|
61
|
+
const field = ticketRuleField(t);
|
|
62
|
+
if (field === null) return;
|
|
63
|
+
const key = ticketRowKey(l.n, i + 1, field);
|
|
64
|
+
const has = Object.hasOwn(declaration, field);
|
|
65
|
+
signed.push({ line: l.n, key, from: 'rule', by: 'you', kind: 'ticket', state: has ? 'built' : 'not-checked', rule: i + 1, field, ...(has ? {} : { reason: NO_VALUE_WHY }) });
|
|
66
|
+
card.push({ key, line: l.n, by: 'you', state: has ? 'built' : 'not-checked', text: has ? `"${t}" -> ${ticketWords(field, declaration[field])}` : `"${t}"`, reason: has ? null : NO_VALUE_WHY, drop: false });
|
|
67
|
+
if (!has) notChecked.push({ line: l.n, rule: t, reason: NO_VALUE_WHY });
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
return { signed, card, notChecked };
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* The list of a declaration with its ticket rows after the block's rows. A declaration with none keeps its list exactly as it was.
|
|
75
|
+
* @param {{declaration: any, lines: any[]}} o @returns {{declaration: any, tickets: ReturnType<typeof ticketRowsOf>}}
|
|
76
|
+
*/
|
|
77
|
+
export function withTicketRows({ declaration, lines }) {
|
|
78
|
+
const base = Array.isArray(declaration.checkList) ? declaration.checkList.filter((/** @type {any} */ r) => !(isRec(r) && r.kind === 'ticket')) : undefined;
|
|
79
|
+
const tickets = ticketRowsOf({ declaration, lines });
|
|
80
|
+
if (tickets.signed.length === 0) return { declaration, tickets };
|
|
81
|
+
return { declaration: { ...declaration, checkList: [...(base ?? []), ...tickets.signed] }, tickets };
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* The proof of a plan whose list has ticket rows (a plan with none is not examined): a built ticket row needs the declaration's field, and a field the declaration holds needs a built row for it.
|
|
86
|
+
* @param {any} declaration @returns {string[]}
|
|
87
|
+
*/
|
|
88
|
+
export function ticketListReds(declaration) {
|
|
89
|
+
const list = isRec(declaration) && Array.isArray(declaration.checkList) ? declaration.checkList.filter((/** @type {any} */ r) => isRec(r) && r.kind === 'ticket') : [];
|
|
90
|
+
if (list.length === 0) return [];
|
|
91
|
+
/** @type {string[]} */
|
|
92
|
+
const reds = [];
|
|
93
|
+
for (const f of TICKET_FIELDS) {
|
|
94
|
+
const built = list.some((/** @type {any} */ r) => r.field === f && r.state === 'built');
|
|
95
|
+
const has = Object.hasOwn(declaration, f);
|
|
96
|
+
if (built && !has) reds.push(`declaration: checkList: a row says "${f}" is its check, but the plan has no "${f}". Nothing was signed - draft again.`);
|
|
97
|
+
if (has && !built) reds.push(`declaration: "${f}" is not the check of any rule on the list. Nothing was signed - draft again.`);
|
|
98
|
+
}
|
|
99
|
+
return reds;
|
|
100
|
+
}
|
package/types/auditchecks.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @param {any} declaration the signed plan @param {any[]} diary the run's `checks` rows (src/diary.js readChecks) @param {{items?: string[], by?: Record<string, string>}|null} notChecked the sign row's Not-checked block
|
|
3
3
|
* @param {{lines?: any[], csvRoles?: string[]}} [sheet] the signed job lines and CSV roles: a plan whose list has sheet rows (M16 am4) shows them here, tagged by where each comes from (hamr 2026-11-14)
|
|
4
|
-
* @returns {{checks: AuditCheckRow[], notChecked: AuditCheckRow[], always: AuditCheckRow[]}|null} null for a plan with no list (it keeps its own Audit rows)
|
|
4
|
+
* @returns {{checks: AuditCheckRow[], notChecked: AuditCheckRow[], readNotes: string[], always: AuditCheckRow[]}|null} null for a plan with no list (it keeps its own Audit rows)
|
|
5
5
|
* @typedef {{text: string, by: 'you'|'agent'|'default'|null, result: 'passed'|'failed'|'none'|'not-checked'}} AuditCheckRow
|
|
6
6
|
*/
|
|
7
7
|
export function auditChecksOf(declaration: any, diary: any[], notChecked: {
|
|
@@ -13,6 +13,7 @@ export function auditChecksOf(declaration: any, diary: any[], notChecked: {
|
|
|
13
13
|
}): {
|
|
14
14
|
checks: AuditCheckRow[];
|
|
15
15
|
notChecked: AuditCheckRow[];
|
|
16
|
+
readNotes: string[];
|
|
16
17
|
always: AuditCheckRow[];
|
|
17
18
|
} | null;
|
|
18
19
|
/** the words of a row no result was recorded for: never "passed" */
|
package/types/authoring.d.ts
CHANGED
|
@@ -113,7 +113,7 @@ export function writePlanFiles(dir: string, files: Record<string, string>, opts?
|
|
|
113
113
|
* Test seam: `provider`/`rates`/`modelId` are injected; without them a live provider is built.
|
|
114
114
|
* `onResult({ ok })` (M4d am32): called once, after the spend is booked and just before the result files are written (the CLI gives its monthly hold back there).
|
|
115
115
|
*/
|
|
116
|
-
export function draftToDir({ proseFile, dir, root, name, slot, model, draftThinking, keyNames, env, provider, rates, modelId, noQuestions, onResult, fetchPage, leftRules, checkPicks, carriedPicks, carriedChoices, carriedSheetDropped, proseRead, flowType, mcpServer, mcpPick, mcpServers, }: {
|
|
116
|
+
export function draftToDir({ proseFile, dir, root, name, slot, model, draftThinking, keyNames, env, provider, rates, modelId, noQuestions, onResult, fetchPage, leftRules, columnAnswers, carriedColumns, checkPicks, carriedPicks, carriedChoices, carriedSheetDropped, proseRead, flowType, mcpServer, mcpPick, mcpServers, }: {
|
|
117
117
|
proseFile: any;
|
|
118
118
|
dir: any;
|
|
119
119
|
root: any;
|
|
@@ -130,12 +130,14 @@ export function draftToDir({ proseFile, dir, root, name, slot, model, draftThink
|
|
|
130
130
|
onResult: any;
|
|
131
131
|
fetchPage: any;
|
|
132
132
|
leftRules: any;
|
|
133
|
+
columnAnswers: any;
|
|
134
|
+
carriedColumns: any;
|
|
133
135
|
checkPicks: any;
|
|
134
136
|
carriedPicks: any;
|
|
135
137
|
carriedChoices: any;
|
|
136
138
|
carriedSheetDropped: any;
|
|
137
139
|
proseRead: any;
|
|
138
|
-
flowType?: "
|
|
140
|
+
flowType?: "tickets" | "mcp" | "plain" | undefined;
|
|
139
141
|
mcpServer?: string | undefined;
|
|
140
142
|
mcpPick?: any;
|
|
141
143
|
mcpServers?: string[] | undefined;
|
package/types/blockasks.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @typedef {{key: string, rowKey: string, line: number, rule: number, source: 'look', ask: 'reading'|'cant-check'|'no-check'|'check', ruleText: string, question: string, counted: boolean, reading?: string, check?: Record<string, any
|
|
1
|
+
/** @typedef {{key: string, rowKey: string, line: number, rule: number, source: 'look', ask: 'reading'|'cant-check'|'no-check'|'check', ruleText: string, question: string, counted: boolean, reading?: string, check?: Record<string, any>}} BlockAsk */
|
|
2
2
|
/**
|
|
3
3
|
* The questions the block has open, in the order the person meets them: the look's readings, then the look's can't-checks, then the pick path's asks (a proposal or a can't-check about a rule the pick path owns) in rule order (a proposal is not counted toward the 3-ask cap).
|
|
4
4
|
* A can't-check about a rule the PICK path owns (`scoped`: src/checkpick.js scopedRules, every `~` rule of a file job) is the pick path's own ask, `no-check`, in fwd's words (a "Line N, guardrail ...: I can't check this" ask
|
|
@@ -33,5 +33,4 @@ export type BlockAsk = {
|
|
|
33
33
|
counted: boolean;
|
|
34
34
|
reading?: string;
|
|
35
35
|
check?: Record<string, any>;
|
|
36
|
-
pairRule?: number;
|
|
37
36
|
};
|
package/types/blockassemble.d.ts
CHANGED
|
@@ -11,11 +11,11 @@ export function pickedOf(part: Record<string, any>): {
|
|
|
11
11
|
rule: any;
|
|
12
12
|
};
|
|
13
13
|
/**
|
|
14
|
-
* @param {{declaration: Record<string, any>, block: import('./checkblock.js').CheckBlock, lines: {n: number, guardrail?: string|null}[], lineSet: Set<number>}} o
|
|
15
|
-
* `lineSet` = the lines the block was given; `lines` = the signed lines (a guardrail decides the class)
|
|
14
|
+
* @param {{declaration: Record<string, any>, block: import('./checkblock.js').CheckBlock, lines: {n: number, guardrail?: string|null}[], lineSet: Set<number>, askLines?: Set<number>}} o
|
|
15
|
+
* `lineSet` = the lines the block was given; `lines` = the signed lines (a guardrail decides the class); `askLines` = the signed Ask lines: each `~` rule on one is a Not-checked line here, never skipped (M17 am5 item 2)
|
|
16
16
|
* @returns {{declaration: Record<string, any>, notChecked: string[], notCheckedBy: Record<string, 'you'|'agent'|'default'>, built: Set<number>}} `built` = the lines that got a check from the block (a red naming one of them is a fault of the build)
|
|
17
17
|
*/
|
|
18
|
-
export function assembleFromBlock({ declaration, block, lines, lineSet }: {
|
|
18
|
+
export function assembleFromBlock({ declaration, block, lines, lineSet, askLines }: {
|
|
19
19
|
declaration: Record<string, any>;
|
|
20
20
|
block: import("./checkblock.js").CheckBlock;
|
|
21
21
|
lines: {
|
|
@@ -23,11 +23,28 @@ export function assembleFromBlock({ declaration, block, lines, lineSet }: {
|
|
|
23
23
|
guardrail?: string | null;
|
|
24
24
|
}[];
|
|
25
25
|
lineSet: Set<number>;
|
|
26
|
+
askLines?: Set<number>;
|
|
26
27
|
}): {
|
|
27
28
|
declaration: Record<string, any>;
|
|
28
29
|
notChecked: string[];
|
|
29
30
|
notCheckedBy: Record<string, "you" | "agent" | "default">;
|
|
30
31
|
built: Set<number>;
|
|
31
32
|
};
|
|
33
|
+
/**
|
|
34
|
+
* M17 am5 / P5: a green sheet step the builder (src/sheetbuild.js) reported as holding no built check has nothing to check it: its close becomes `hitl` (the class is decided here, never in the sheet files),
|
|
35
|
+
* the class on its line follows, and its rules are the Not-checked lines the builder gave. A plan signed before M17 is never passed through here.
|
|
36
|
+
* @param {Record<string, any>} declaration @param {{line: number, lost: string[]}[]} unbuilt
|
|
37
|
+
* @returns {{declaration: Record<string, any>, lines: number[], lost: string[]}}
|
|
38
|
+
*/
|
|
39
|
+
export function closeUnbuiltSheetSteps(declaration: Record<string, any>, unbuilt: {
|
|
40
|
+
line: number;
|
|
41
|
+
lost: string[];
|
|
42
|
+
}[]): {
|
|
43
|
+
declaration: Record<string, any>;
|
|
44
|
+
lines: number[];
|
|
45
|
+
lost: string[];
|
|
46
|
+
};
|
|
47
|
+
/** M17 am5 item 2 (D3): the reason a `~` rule on a signed Ask line is Not checked, the signed words */
|
|
48
|
+
export const ASK_LINE_REASON: "you judge it at the Ask";
|
|
32
49
|
/** what a row says when its check cannot ride a line that has no guardrail of its own (the class of a line comes from its guardrail) */
|
|
33
50
|
export const NO_GUARDRAIL_WORDS: "This line has no guardrail of yours, so a check on it cannot be signed; you judge it at the Ask.";
|
package/types/blockdraft.d.ts
CHANGED
|
@@ -9,10 +9,9 @@ export function isBuildFault(red: string, builtLines: number[]): boolean;
|
|
|
9
9
|
/**
|
|
10
10
|
* The block of a draft (M16 item 2): the person's `~` rules and `$` defaults, then the look's facts, then the picks the person made (kept from the last draft, and just answered), reconciled once.
|
|
11
11
|
* Fresh answers go through `carry` like the kept ones (the draft is a child process: the answer comes back as a pick or a left rule), and are not marked "kept".
|
|
12
|
-
*
|
|
13
|
-
* @param {{leaveOut?: {line: number, rule: number}[], texts: Record<string, string>, jobLines: any[], look: {facts: any[], dropped: any[]}, kept: {picks: any[], left: any[], askRules: any[]}, fresh: {picks: any[], left: {line: number, rule: number}[]}, asks: boolean, countScope: (t: string) => boolean, scoped?: {line: number, rule: number}[]}} o
|
|
12
|
+
* @param {{leaveOut?: {line: number, rule: number}[], texts: Record<string, string>, jobLines: any[], look: {facts: any[], dropped: any[]}, kept: {picks: any[], left: any[], askRules: any[]}, fresh: {picks: any[], left: {line: number, rule: number}[]}, asks: boolean, countScope: (t: string) => boolean}} o
|
|
14
13
|
*/
|
|
15
|
-
export function setUpBlock({ texts, jobLines, look, kept, fresh, asks, countScope,
|
|
14
|
+
export function setUpBlock({ texts, jobLines, look, kept, fresh, asks, countScope, leaveOut }: {
|
|
16
15
|
leaveOut?: {
|
|
17
16
|
line: number;
|
|
18
17
|
rule: number;
|
|
@@ -37,25 +36,18 @@ export function setUpBlock({ texts, jobLines, look, kept, fresh, asks, countScop
|
|
|
37
36
|
};
|
|
38
37
|
asks: boolean;
|
|
39
38
|
countScope: (t: string) => boolean;
|
|
40
|
-
scoped?: {
|
|
41
|
-
line: number;
|
|
42
|
-
rule: number;
|
|
43
|
-
}[];
|
|
44
39
|
}): import("./checkblock.js").CheckBlock;
|
|
45
40
|
/** the `add` pre-edits of the ledger-suggest call (bareloop authorjob.js@v0.56.0: a count or a phrase; anything else is not an edit) @param {any[]} extra */
|
|
46
41
|
export function ledgerEdits(extra: any[]): any[];
|
|
47
42
|
/**
|
|
48
43
|
* M16 item 4 ("Tickets `ticketFilter` and `ticketWatch` stay as they are"): the rules of a Tickets job that are not the block's. Before M16 only a count guardrail of such a job (it signs a
|
|
49
44
|
* ticket page input, which routes its guardrails: src/checkpick.js codeScope) was picked or asked; every other rule ("priority P1 only", "run a ticket again when its state changes") was the
|
|
50
|
-
* declaration's own typed ticketFilter / ticketWatch, never asked and never listed as Not checked.
|
|
51
|
-
* @param {string} flowType @param {{n: number, rules?: string[]}[]} jobLines @
|
|
45
|
+
* declaration's own typed ticketFilter / ticketWatch, never asked and never listed as Not checked. Since M17 am6 these rules are ticket rows (src/ticketrows.js), so one the look tied to a fact is left out of the block too: it shows once, as the ticket row.
|
|
46
|
+
* @param {string} flowType @param {{n: number, rules?: string[]}[]} jobLines @returns {{line: number, rule: number}[]}
|
|
52
47
|
*/
|
|
53
48
|
export function ticketLeaveOut(flowType: string, jobLines: {
|
|
54
49
|
n: number;
|
|
55
50
|
rules?: string[];
|
|
56
|
-
}[], facts: {
|
|
57
|
-
line: number;
|
|
58
|
-
forRule?: number;
|
|
59
51
|
}[]): {
|
|
60
52
|
line: number;
|
|
61
53
|
rule: number;
|
package/types/blockpick.d.ts
CHANGED
|
@@ -21,6 +21,11 @@ export function keepOrDrop(guardrail: string, sug: any): {
|
|
|
21
21
|
kept: false;
|
|
22
22
|
why: string;
|
|
23
23
|
};
|
|
24
|
+
/**
|
|
25
|
+
* The check a counting rule's own words already ARE ("exactly 3 list items" -> listItems 3), or null. No obvious asks (hamr 2026-11-14): such a rule is settled as written, never proposed back to the person.
|
|
26
|
+
* @param {string} text @returns {Record<string, any>|null}
|
|
27
|
+
*/
|
|
28
|
+
export function obviousCheck(text: string): Record<string, any> | null;
|
|
24
29
|
/**
|
|
25
30
|
* The check CODE proposes for a count rule when the call yields none (R10, ours; fwd has no such fallback): a bullets / list-items / points count -> listItems N (exact; "at most / up to / no more than / fewer than / under / below" -> maxListItems, "at least / minimum / no fewer than / more than" -> minListItems, F315), a lines count ->
|
|
26
31
|
* maxLines N, ONE word number -> minWords N when the rule says "at least / minimum / more than", else maxWords N. A section count names no sections, so none is built; a rule naming two different counts ("3 bullets under 80 words") is not built either; a rule with
|
package/types/checkblock.d.ts
CHANGED
|
@@ -14,7 +14,6 @@ export function renderCard(rows: Row[]): {
|
|
|
14
14
|
*/
|
|
15
15
|
/** the card's fixed words, one spelling (the renderer reads them; a test reads them too) */
|
|
16
16
|
export const CARD_T: Readonly<{
|
|
17
|
-
agreed: "you agreed:";
|
|
18
17
|
count: "result count";
|
|
19
18
|
cited: "every claim is backed by a quote copied from";
|
|
20
19
|
theInput: "the input";
|
|
@@ -86,10 +85,14 @@ export class CheckBlock {
|
|
|
86
85
|
deltaLog: any[];
|
|
87
86
|
/** @type {any} */
|
|
88
87
|
closeCache: any;
|
|
88
|
+
/** @type {Map<number, 'yes'|'no'|'failed'>} the note question's answer per facts-only line (src/noteask.js; code decides what it means) */
|
|
89
|
+
notes: Map<number, "yes" | "no" | "failed">;
|
|
89
90
|
textOf(source: string | undefined): string;
|
|
90
91
|
/** @param {number} line @param {string} [kind] */
|
|
91
92
|
rowsOn(line: number, kind?: string): Row[];
|
|
92
93
|
ruleRows(line: number): Row[];
|
|
94
|
+
/** does a `~` rule's own row say it is Not checked? Then its row is the ONE place the rule is said (its reason: the look's sentence, or the person's Drop) @param {number} line @param {number} rule */
|
|
95
|
+
saysRule(line: number, rule: number): boolean;
|
|
93
96
|
/** every word the person wrote on a line: the line and its `~` rules */
|
|
94
97
|
said(line: number): string;
|
|
95
98
|
/** @param {Row} r @returns {Row} the row as stored (a repeated key gets `#2`) */
|
|
@@ -115,8 +118,6 @@ export class CheckBlock {
|
|
|
115
118
|
takeJobWord(r: Row): void;
|
|
116
119
|
/** are the row's words (or its count number, or the name it asks for a fact by) in the job line or its `~` rules? Normalised, case-insensitive */
|
|
117
120
|
inJob(r: Row): any;
|
|
118
|
-
/** a `~` line an agreed answer wrote (or a carried pair partner) is checked by the rule it was agreed from: one check, both numbers */
|
|
119
|
-
matchFollow(r: Row): void;
|
|
120
121
|
/** a `!` count row is built unless a `~` rule on its line already names the number */
|
|
121
122
|
matchCount(r: Row): void;
|
|
122
123
|
matchRule(r: Row): void;
|
|
@@ -132,8 +133,6 @@ export class CheckBlock {
|
|
|
132
133
|
n: number;
|
|
133
134
|
text: string;
|
|
134
135
|
}, lineParts: any[], lineRows: string[][], factLines: Set<number>): void;
|
|
135
|
-
/** the follow rows of a row (its agreed or carried `~` lines) */
|
|
136
|
-
followsOf(r: Row): Row[];
|
|
137
136
|
/**
|
|
138
137
|
* The fact(s) a fact-like row builds, checked alone through the bareguard shapes and against the facts already on the line.
|
|
139
138
|
* @param {Row} r @param {any[]} onLine the facts already built on this line @returns {{fresh: any[], src: string, names: string[]} | {why: string}}
|
|
@@ -149,6 +148,20 @@ export class CheckBlock {
|
|
|
149
148
|
buildDefaults(l: {
|
|
150
149
|
n: number;
|
|
151
150
|
}, lineParts: any[], lineRows: string[][], factLines: Set<number>): void;
|
|
151
|
+
/**
|
|
152
|
+
* The `$` note row of a facts-only line: the one note question said yes -> a countable nonEmpty text part sits beside the facts (the existing keep-both shape), so the brief
|
|
153
|
+
* is FACTS AND TEXT and text-present is floored; no -> nothing; the call failed -> a Not checked row in plain words. One owner of the row and its part.
|
|
154
|
+
*/
|
|
155
|
+
buildNote(l: {
|
|
156
|
+
n: number;
|
|
157
|
+
}, lineParts: any[], lineRows: string[][]): void;
|
|
158
|
+
/** the job lines that ended up facts-only (a fact part and no text beside it): the lines the note question is about. Reconciles first. @returns {number[]} */
|
|
159
|
+
factOnlyLines(): number[];
|
|
160
|
+
/** the note question's answers, `{line, answer: 'yes'|'no'|'failed'}`; the whole list is reconciled again @param {{line: number, answer: 'yes'|'no'|'failed'}[]} answers */
|
|
161
|
+
setNotes(answers: {
|
|
162
|
+
line: number;
|
|
163
|
+
answer: "yes" | "no" | "failed";
|
|
164
|
+
}[]): void;
|
|
152
165
|
ask(): any[];
|
|
153
166
|
hasOpenQuestions(): boolean;
|
|
154
167
|
hasPendingDelta(): boolean;
|
|
@@ -159,31 +172,33 @@ export class CheckBlock {
|
|
|
159
172
|
ok: false;
|
|
160
173
|
why: string;
|
|
161
174
|
};
|
|
162
|
-
/** the `~` row `partner` is checked by `source` (one check, both rule numbers) */
|
|
163
|
-
follow(source: Row, partner: Row): void;
|
|
164
175
|
/**
|
|
165
|
-
*
|
|
166
|
-
*
|
|
167
|
-
|
|
168
|
-
|
|
176
|
+
* The job lines as the list now holds them: every line's `~` rules are the rule rows' own words, in rule order (a replaced rule keeps its place and number). ONE owner of the job text after an answer.
|
|
177
|
+
* @template {{n: number, text: string}} L @param {L[]} jobLines @returns {(L & {rule: string, rules: string[]})[]}
|
|
178
|
+
*/
|
|
179
|
+
jobLinesView<L extends {
|
|
180
|
+
n: number;
|
|
181
|
+
text: string;
|
|
182
|
+
}>(jobLines: L[]): (L & {
|
|
183
|
+
rule: string;
|
|
184
|
+
rules: string[];
|
|
185
|
+
})[];
|
|
186
|
+
/**
|
|
187
|
+
* Revise keeps the picks of the last draft (am17/am18, `src/pickrecord.js` `matchRecord`): a kept pick settles its rule (its words are the final rule's words) and a kept left rule is left.
|
|
188
|
+
* @param {{picks?: {line: number, rule: number, check: any, own?: boolean}[], left?: {line: number, rule: number}[]}} kept
|
|
169
189
|
*/
|
|
170
190
|
carry({ picks, left }: {
|
|
171
191
|
picks?: {
|
|
172
192
|
line: number;
|
|
173
193
|
rule: number;
|
|
174
194
|
check: any;
|
|
175
|
-
added?: string;
|
|
176
195
|
own?: boolean;
|
|
177
196
|
}[];
|
|
178
197
|
left?: {
|
|
179
198
|
line: number;
|
|
180
199
|
rule: number;
|
|
181
200
|
}[];
|
|
182
|
-
}
|
|
183
|
-
line: number;
|
|
184
|
-
rule: number;
|
|
185
|
-
pairRule?: number;
|
|
186
|
-
}[]): void;
|
|
201
|
+
}): void;
|
|
187
202
|
/** @param {{label?: string, pre?: boolean, edits?: any[]}} delta `pre` = a reply that is not a drafter try (the suggest call): it does not count against the tries */
|
|
188
203
|
applyDelta(delta: {
|
|
189
204
|
label?: string;
|
package/types/checklist.d.ts
CHANGED
|
@@ -29,11 +29,11 @@ export function isEmptyList(rows: Row[]): boolean;
|
|
|
29
29
|
export function ledgerRecord(rows: Row[]): ({
|
|
30
30
|
key: string;
|
|
31
31
|
line: number;
|
|
32
|
-
rowKind: "
|
|
32
|
+
rowKind: "rule" | "numbers" | "fact" | "phrase" | "cited" | "count" | "floor" | "note";
|
|
33
33
|
from: "default" | "agent" | "rule" | "look" | "pick";
|
|
34
34
|
by: "default" | "agent" | "you";
|
|
35
35
|
words: string[];
|
|
36
|
-
state: "dropped" | "built" | "
|
|
36
|
+
state: "dropped" | "built" | "not-checked" | "listed";
|
|
37
37
|
reason: string | null;
|
|
38
38
|
} | {
|
|
39
39
|
key: string;
|
|
@@ -92,7 +92,7 @@ export const LEDGER_SCHEMA: Readonly<{
|
|
|
92
92
|
export type Row = {
|
|
93
93
|
key: string;
|
|
94
94
|
line: number;
|
|
95
|
-
kind: "rule" | "fact" | "cited" | "count" | "phrase" | "numbers" | "floor";
|
|
95
|
+
kind: "rule" | "fact" | "cited" | "count" | "phrase" | "numbers" | "note" | "floor";
|
|
96
96
|
from: "rule" | "pick" | "look" | "agent" | "default";
|
|
97
97
|
by: "you" | "agent" | "default";
|
|
98
98
|
words: string[];
|
package/types/checkpick.d.ts
CHANGED
|
@@ -73,10 +73,9 @@ export function countCheck(text: string): Record<string, any> | null;
|
|
|
73
73
|
* The asks for the rows: `Line n, guardrail "<…>": I propose <check in plain words>.` for a kept check, `Line n, guardrail "<…>": I can't check this. Your own words, or
|
|
74
74
|
* Not checked?` when nothing was kept. A proposal is not counted toward am1's cap; a can't-check ask is (am16 (5)).
|
|
75
75
|
* @param {ReturnType<typeof rowsFromAnswer>} rows
|
|
76
|
-
* @returns {{
|
|
76
|
+
* @returns {{line: number, rule: number, source: 'look', ask: 'check'|'no-check', ruleText: string, question: string, reading?: string, check?: Record<string, any>, counted: boolean}[]}
|
|
77
77
|
*/
|
|
78
78
|
export function checkAsks(rows: ReturnType<typeof rowsFromAnswer>): {
|
|
79
|
-
pairRule?: number;
|
|
80
79
|
line: number;
|
|
81
80
|
rule: number;
|
|
82
81
|
source: "look";
|
|
@@ -88,37 +87,9 @@ export function checkAsks(rows: ReturnType<typeof rowsFromAnswer>): {
|
|
|
88
87
|
counted: boolean;
|
|
89
88
|
}[];
|
|
90
89
|
/**
|
|
91
|
-
* @typedef {{line: number, rule: number, check: Record<string, any>|null,
|
|
92
|
-
* `check` = the check the person agreed to (null for their own words); `
|
|
90
|
+
* @typedef {{line: number, rule: number, check: Record<string, any>|null, own?: boolean}} Pick
|
|
91
|
+
* `check` = the check the person agreed to (null for their own words); `own` = their own words
|
|
93
92
|
*/
|
|
94
|
-
/**
|
|
95
|
-
* Settle every scoped rule against the person's answers: a rule with a picked check is checked; the `~` line an agree wrote is covered by that pick; every other
|
|
96
|
-
* rule is Not checked, with the reason (`person-left` = they chose it, `own-words` = they gave their own words, `no-pick` = nothing was picked).
|
|
97
|
-
* @param {ReturnType<typeof scopedRules>} rules @param {Pick[]} picks @param {{line: number, rule: number}[]} left
|
|
98
|
-
* @returns {{checks: Map<number, Record<string, any>[]>, notes: {line: number, rule: number, text: string, reason: 'person-left'|'own-words'|'no-pick'}[]}}
|
|
99
|
-
*/
|
|
100
|
-
export function settleRules(rules: ReturnType<typeof scopedRules>, picks: Pick[], left: {
|
|
101
|
-
line: number;
|
|
102
|
-
rule: number;
|
|
103
|
-
}[]): {
|
|
104
|
-
checks: Map<number, Record<string, any>[]>;
|
|
105
|
-
notes: {
|
|
106
|
-
line: number;
|
|
107
|
-
rule: number;
|
|
108
|
-
text: string;
|
|
109
|
-
reason: "person-left" | "own-words" | "no-pick";
|
|
110
|
-
}[];
|
|
111
|
-
};
|
|
112
|
-
/**
|
|
113
|
-
* Overwrite the drafter's check on every step of a line this call settles (a green step, which another signed part settles, is left alone): a line with picked checks
|
|
114
|
-
* is softgreen and carries exactly those checks; a line with none is hitl. Whatever `close.shape` the drafter wrote is gone. Pure: returns a new declaration.
|
|
115
|
-
* @param {any} declaration @param {ReturnType<typeof scopedRules>} rules @param {ReturnType<typeof settleRules>} settled
|
|
116
|
-
* @param {(note: {line: number, reason: 'person-left'|'own-words'|'no-pick'}) => string} sentence the one table's words for a reason
|
|
117
|
-
*/
|
|
118
|
-
export function applyPicks(declaration: any, rules: ReturnType<typeof scopedRules>, settled: ReturnType<typeof settleRules>, sentence: (note: {
|
|
119
|
-
line: number;
|
|
120
|
-
reason: "person-left" | "own-words" | "no-pick";
|
|
121
|
-
}) => string): any;
|
|
122
93
|
/**
|
|
123
94
|
* M10 am27 (4) RETENTION record of one draft (record only, counts, no words). Per job line: `aiParts` = the cited facts the drafter wrote on that line (a `cited` close counts once per
|
|
124
95
|
* fact, at least 1), `kept` = how many are still in the final declaration, `dropped` = what code removed, `picks` = the line has the person's picks; `classAsked` / `classFinal`
|
|
@@ -170,13 +141,12 @@ export const SUGGEST_SCHEMA: Readonly<{
|
|
|
170
141
|
export const CANT_CHECK_WORDS: "I can't check this. Your own words, or Not checked?";
|
|
171
142
|
export function HOW_TO_ANSWER(line: number, agree: boolean): string;
|
|
172
143
|
/**
|
|
173
|
-
* `check` = the check the person agreed to (null for their own words); `
|
|
144
|
+
* `check` = the check the person agreed to (null for their own words); `own` = their own words
|
|
174
145
|
*/
|
|
175
146
|
export type Pick = {
|
|
176
147
|
line: number;
|
|
177
148
|
rule: number;
|
|
178
149
|
check: Record<string, any> | null;
|
|
179
|
-
added?: string;
|
|
180
150
|
own?: boolean;
|
|
181
151
|
};
|
|
182
152
|
import { plainWords } from './checkwords.js';
|
package/types/declaration.d.ts
CHANGED
|
@@ -4,6 +4,13 @@
|
|
|
4
4
|
* @param {Record<string, any>} declaration @returns {'plain'|'mcp'|'tickets'}
|
|
5
5
|
*/
|
|
6
6
|
export function flowTypeOf(declaration: Record<string, any>): "plain" | "mcp" | "tickets";
|
|
7
|
+
/** M12 piece 3 (item 4): the signed label filter, `ticketFilter: {priority?: ['P0'..'P3'], labels?: [names]}`; optional, and only on a job that lists MCP tools.
|
|
8
|
+
* Pure data: code decides at run (src/ticket-labels.js); the drafter may only suggest it and a human signs it.
|
|
9
|
+
* @param {Record<string, any>} declaration @param {string[]} reds */
|
|
10
|
+
export function checkTicketFilter(declaration: Record<string, any>, reds: string[]): void;
|
|
11
|
+
/** M12 piece 3 (signed item 7): the ticket fields a schedule may watch, `ticketWatch: ['state'|'labels']`; optional, only on a job that lists MCP tools, typed values only.
|
|
12
|
+
* The scheduler compares (src/trigger-tickets.js); the drafter may suggest, a human signs. @param {Record<string, any>} declaration @param {string[]} reds */
|
|
13
|
+
export function checkTicketWatch(declaration: Record<string, any>, reds: string[]): void;
|
|
7
14
|
/**
|
|
8
15
|
* A small, pure walker over `declaration.steps` for callers that only want
|
|
9
16
|
* the shape-key verdict (e.g. poc/m1/slot-batch.mjs's `shape` column) —
|