@sensigo/realm 0.40.0 → 0.42.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/dist/adapters/gorgias-adapter.d.ts.map +1 -1
- package/dist/adapters/gorgias-adapter.js +39 -10
- package/dist/adapters/gorgias-adapter.js.map +1 -1
- package/dist/engine/execution-loop.d.ts.map +1 -1
- package/dist/engine/execution-loop.js +124 -21
- package/dist/engine/execution-loop.js.map +1 -1
- package/dist/engine/run-health.d.ts +1 -1
- package/dist/engine/run-health.d.ts.map +1 -1
- package/dist/engine/run-health.js +49 -4
- package/dist/engine/run-health.js.map +1 -1
- package/dist/index.d.ts +6 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/dist/types/run-record.d.ts +11 -1
- package/dist/types/run-record.d.ts.map +1 -1
- package/dist/types/run-record.js.map +1 -1
- package/dist/types/workflow-definition.d.ts +146 -10
- package/dist/types/workflow-definition.d.ts.map +1 -1
- package/dist/types/workflow-definition.js +225 -0
- package/dist/types/workflow-definition.js.map +1 -1
- package/dist/types/workflow-error.d.ts +45 -1
- package/dist/types/workflow-error.d.ts.map +1 -1
- package/dist/types/workflow-error.js +30 -1
- package/dist/types/workflow-error.js.map +1 -1
- package/dist/workflow/diagnostics.d.ts +19 -15
- package/dist/workflow/diagnostics.d.ts.map +1 -1
- package/dist/workflow/diagnostics.js +19 -28
- package/dist/workflow/diagnostics.js.map +1 -1
- package/dist/workflow/registrar.d.ts +68 -0
- package/dist/workflow/registrar.d.ts.map +1 -1
- package/dist/workflow/registrar.js +92 -5
- package/dist/workflow/registrar.js.map +1 -1
- package/dist/workflow/step-key-registry.d.ts +1258 -0
- package/dist/workflow/step-key-registry.d.ts.map +1 -0
- package/dist/workflow/step-key-registry.js +1217 -0
- package/dist/workflow/step-key-registry.js.map +1 -0
- package/dist/workflow/yaml-loader.d.ts +33 -0
- package/dist/workflow/yaml-loader.d.ts.map +1 -1
- package/dist/workflow/yaml-loader.js +1485 -1242
- package/dist/workflow/yaml-loader.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,3 +1,228 @@
|
|
|
1
|
+
// issue #508 (final correction): a `types/ -> workflow/` edge, added for `buildTrustRefusal`
|
|
2
|
+
// below — audit-verified to create no cycle (`diagnostics.ts` imports only from its own
|
|
3
|
+
// directory's `source-positions.ts`, which imports only `js-yaml`'s types; neither imports
|
|
4
|
+
// anything from this file).
|
|
5
|
+
import { closestKey } from '../workflow/diagnostics.js';
|
|
6
|
+
/**
|
|
7
|
+
* Every value `TrustLevel` declares — the step-level vocabulary. Single-sourced (issue #508):
|
|
8
|
+
* before this, the two-literal gate test (`=== 'human_confirmed' || === 'human_reviewed'`) was
|
|
9
|
+
* copied by hand at FOUR call sites (the engine's gate mint, the protocol generator ×2, the
|
|
10
|
+
* loader's gate-choices check), and NO site validated the value at all — `human_confrimed`,
|
|
11
|
+
* `Human_Confirmed`, `engine_delivered`, `""`, `123`, `null` all loaded clean and ran with no
|
|
12
|
+
* gate. See `classifyStepTrust`/`isGateTrust` below, and `docs/reference/yaml-schema.md`'s
|
|
13
|
+
* `## Trust levels` section for the authoring contract.
|
|
14
|
+
*
|
|
15
|
+
* **`as const satisfies readonly TrustLevel[]` is NORMATIVE, not stylistic.** An explicit
|
|
16
|
+
* `readonly TrustLevel[]` type annotation WIDENS the array's member type to the full `TrustLevel`
|
|
17
|
+
* union regardless of which literals are actually listed — under that annotation, the
|
|
18
|
+
* `Exclude<>`-based drift guards below type-check even with members missing, shipping dead.
|
|
19
|
+
* `as const` preserves the literal tuple type the guards need to see a real difference. This is
|
|
20
|
+
* the house pattern (`KNOWN_STEP_KEYS`/`KNOWN_RETRY_KEYS` above), and verified here by actually
|
|
21
|
+
* deleting a member and confirming a real compile error results (not merely asserted).
|
|
22
|
+
*/
|
|
23
|
+
export const TRUST_LEVELS = [
|
|
24
|
+
'auto',
|
|
25
|
+
'human_confirmed',
|
|
26
|
+
'human_reviewed',
|
|
27
|
+
];
|
|
28
|
+
/** The subset of `TRUST_LEVELS` that actually opens a human gate — `'auto'` is the sole
|
|
29
|
+
* non-gating member of `TrustLevel`. Kept as its OWN array (not derived by filtering
|
|
30
|
+
* `TRUST_LEVELS` at the type level) so a single hardcoded `TRUST_LEVELS` collapse at the mint
|
|
31
|
+
* can never silently widen who gets gated — see `classifyStepTrust`'s arm-order comment for why
|
|
32
|
+
* the drift this guards against is a real, previously-considered mutant shape. */
|
|
33
|
+
export const GATE_TRUST_LEVELS = [
|
|
34
|
+
'human_confirmed',
|
|
35
|
+
'human_reviewed',
|
|
36
|
+
];
|
|
37
|
+
/** Every value `ServiceTrust` declares — the `services: <name>: trust:` vocabulary. A DIFFERENT
|
|
38
|
+
* key from a step's own `trust:` (the dominant real-world confusion this PR's L1 refusal names
|
|
39
|
+
* directly — six of realm's nine shipped examples carried a `ServiceTrust` literal on a step).
|
|
40
|
+
* Minted here, single-sourced, so the loader's own Ajv enum (`yaml-loader.ts`) and this PR's
|
|
41
|
+
* service-trust-confusion refusal can never drift apart into a THIRD hardcoded copy. */
|
|
42
|
+
export const SERVICE_TRUST_LEVELS = [
|
|
43
|
+
'engine_delivered',
|
|
44
|
+
'engine_managed',
|
|
45
|
+
'agent_provided',
|
|
46
|
+
];
|
|
47
|
+
const _trustLevelsMissingCheck = true;
|
|
48
|
+
const _trustLevelsExtraCheck = true;
|
|
49
|
+
const _gateTrustSubsetCheck = true;
|
|
50
|
+
const _serviceTrustLevelsMissingCheck = true;
|
|
51
|
+
const _serviceTrustLevelsExtraCheck = true;
|
|
52
|
+
/**
|
|
53
|
+
* Classifies a step's declared `trust` value against its execution kind. `kind` is
|
|
54
|
+
* `ExecutionMode | undefined` because one real call site (`yaml-loader.ts`'s per-step walk) sees
|
|
55
|
+
* this before `execution` has been validated — a step with `execution: bogus` (or a missing
|
|
56
|
+
* `execution` at all) reaches trust classification before the malformed-kind error is the whole
|
|
57
|
+
* verdict, and `undefined` here must classify as harmlessly as an absent trust value: covered by
|
|
58
|
+
* the FIRST arm below.
|
|
59
|
+
*
|
|
60
|
+
* **Arm order is normative** (issue #508 design review, mutant (iii)): `GATE_TRUST_LEVELS`
|
|
61
|
+
* membership is tested BEFORE the `'auto'` shortcut on auto/agent. With the shortcut checked
|
|
62
|
+
* first, collapsing `GATE_TRUST_LEVELS` into `TRUST_LEVELS` (a plausible single-sourcing
|
|
63
|
+
* shortcut) would change NOTHING observable — 'auto' is caught by its own branch either way,
|
|
64
|
+
* and `TRUST_LEVELS` membership alone can never distinguish 'human_confirmed' from 'auto' when
|
|
65
|
+
* the shortcut already resolved it — making that mutation a GUARANTEED EQUIVALENT MUTANT rather
|
|
66
|
+
* than a real regression test. Testing `GATE_TRUST_LEVELS` first means the collapse is
|
|
67
|
+
* observable: `classifyStepTrust('auto', 'auto')` would flip from `'lawful_no_gate'` to
|
|
68
|
+
* `'gates'`, since `TRUST_LEVELS` (unlike `GATE_TRUST_LEVELS`) contains `'auto'`.
|
|
69
|
+
*/
|
|
70
|
+
export function classifyStepTrust(kind, value) {
|
|
71
|
+
if (value === undefined)
|
|
72
|
+
return 'lawful_no_gate';
|
|
73
|
+
if (kind === 'auto' || kind === 'agent') {
|
|
74
|
+
if (GATE_TRUST_LEVELS.includes(value))
|
|
75
|
+
return 'gates';
|
|
76
|
+
if (value === 'auto')
|
|
77
|
+
return 'lawful_no_gate';
|
|
78
|
+
return 'refuse';
|
|
79
|
+
}
|
|
80
|
+
if (kind === 'finalizer') {
|
|
81
|
+
return value === 'auto' ? 'lawful_no_gate' : 'refuse';
|
|
82
|
+
}
|
|
83
|
+
// guard, and any kind outside the four (undefined, or a value the loader would itself refuse
|
|
84
|
+
// as an invalid `execution`) — trust is never meaningful there, declared or not.
|
|
85
|
+
return 'refuse';
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Pure VALUE question — "is this a gate-opening literal" — for the two call sites that have no
|
|
89
|
+
* kind in scope at all: the engine's gate mint (`execution-loop.ts`, which only ever reaches a
|
|
90
|
+
* step whose kind already passed L1/L2, so the kind conjunct `classifyStepTrust` would add is
|
|
91
|
+
* inert there) and the loader's gate-choices-empty check (`yaml-loader.ts`, evaluated on a raw
|
|
92
|
+
* step object before this file's own kind-narrowing block). `classifyStepTrust` CONSUMES this
|
|
93
|
+
* function for its own 'gates' arm, so there remains exactly one membership fact — passing a
|
|
94
|
+
* fabricated kind to reach a single call site would not be single-sourcing, it would be lying to
|
|
95
|
+
* a parameter to get there.
|
|
96
|
+
*/
|
|
97
|
+
export function isGateTrust(value) {
|
|
98
|
+
return GATE_TRUST_LEVELS.includes(value);
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Renders a `trust` value into prose — the ONE rendering rule every trust-value message shares,
|
|
102
|
+
* exported so a NON-refusal disclosure (the protocol generator's guard/finalizer inert-trust
|
|
103
|
+
* note) can consume it too, rather than hand-rolling its own renderer that could drift from this
|
|
104
|
+
* one. `JSON.stringify`, unconditionally, no exceptions: `String()` makes `''` print as the
|
|
105
|
+
* unreadable `'trust: '` (reads as MISSING, not empty), `null` print as `'trust: null'`
|
|
106
|
+
* (indistinguishable from the three-character string `"null"`), and — worst — an ARRAY print as
|
|
107
|
+
* its own first element (`String(['a','b'])` is `'a,b'`; a value the author declared as a list is
|
|
108
|
+
* shown as if it were a scalar, with no sign anything was ever dropped).
|
|
109
|
+
*/
|
|
110
|
+
export function renderTrustValue(value) {
|
|
111
|
+
return JSON.stringify(value);
|
|
112
|
+
}
|
|
113
|
+
function selectTrustRefusalArm(value) {
|
|
114
|
+
if (SERVICE_TRUST_LEVELS.includes(value))
|
|
115
|
+
return 'service';
|
|
116
|
+
if (value === 'human_notified')
|
|
117
|
+
return 'removed';
|
|
118
|
+
return 'generic';
|
|
119
|
+
}
|
|
120
|
+
function trustRefusalConsequence(surface) {
|
|
121
|
+
switch (surface) {
|
|
122
|
+
case 'load':
|
|
123
|
+
// No error-code mention: L1's throw carries `VALIDATION_WORKFLOW_SCHEMA` (yaml-loader.ts
|
|
124
|
+
// joins every load-time error into one `WorkflowError` under that single code) — never
|
|
125
|
+
// `VALIDATION_TRUST_VALUE`, which is exclusively L2's (execution-loop.ts's) code. Naming
|
|
126
|
+
// it here would be a claim this surface cannot back.
|
|
127
|
+
return ('refused at load: this workflow cannot create a run while the value is wrong, so no ' +
|
|
128
|
+
'step of it — gated or not — ever executes under it');
|
|
129
|
+
case 'dispatch':
|
|
130
|
+
// No inline code mention either, but for the OPPOSITE reason: `error_code` is a real,
|
|
131
|
+
// separate, structured field on the envelope here (`VALIDATION_TRUST_VALUE`, set on the
|
|
132
|
+
// `WorkflowError` this text becomes the message of) — a reader with programmatic access
|
|
133
|
+
// already has it without parsing prose for it.
|
|
134
|
+
return ('refused at dispatch: no gate opens and this step does not run; this run is now ' +
|
|
135
|
+
'parked, non-terminal, until the value is corrected, and any step depending on this ' +
|
|
136
|
+
"one returns 'blocked' in the meantime");
|
|
137
|
+
case 'finding':
|
|
138
|
+
// `RunHealthFinding` has no separate code field the way `dispatch`'s envelope does — the
|
|
139
|
+
// code is only ever visible if it is IN this string.
|
|
140
|
+
return 'the engine will refuse this step at dispatch (VALIDATION_TRUST_VALUE)';
|
|
141
|
+
case 'briefing':
|
|
142
|
+
// Same reasoning as `finding`: `ProtocolStep.agent_involvement` is a bare string, and this
|
|
143
|
+
// is a genuinely true prediction of what L2 will throw if the agent calls execute_step
|
|
144
|
+
// anyway — the code is real information, not decoration.
|
|
145
|
+
return ('calling execute_step here will be refused (VALIDATION_TRUST_VALUE): no gate opens ' +
|
|
146
|
+
'and this step does not run; the run would then park, non-terminal, until the value ' +
|
|
147
|
+
"is corrected, with any step depending on this one returning 'blocked'");
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* The accepted-set / did-you-mean / remedy tail. `kind: 'finalizer'` is the ONE case that
|
|
152
|
+
* replaces this entirely with the finalizer's own kind clause — reachable only on
|
|
153
|
+
* `surface: 'load'` (see `buildTrustRefusal`'s own doc for why `dispatch`/`finding`/`briefing`
|
|
154
|
+
* never see a finalizer step at all): the generic accepted-set-plus-live-run-remedy text would
|
|
155
|
+
* wrongly imply the two human-gate literals are meaningful on a kind that can never gate.
|
|
156
|
+
*/
|
|
157
|
+
function trustRefusalTail(kind, surface, didYouMean) {
|
|
158
|
+
if (kind === 'finalizer') {
|
|
159
|
+
return (`'trust' accepts ${TRUST_LEVELS.join(', ')}, and only 'auto' is meaningful on ` +
|
|
160
|
+
`execution: finalizer steps.`);
|
|
161
|
+
}
|
|
162
|
+
switch (surface) {
|
|
163
|
+
case 'load':
|
|
164
|
+
return (`A step's 'trust' accepts ${TRUST_LEVELS.join(', ')}.` +
|
|
165
|
+
(didYouMean !== undefined ? ` Did you mean '${didYouMean}'?` : '') +
|
|
166
|
+
` Correct the value, then 'realm workflow register <path>' — any run of this ` +
|
|
167
|
+
`workflow picks up the corrected definition on its next attempt at this step.`);
|
|
168
|
+
case 'dispatch':
|
|
169
|
+
return (`A step's 'trust' accepts ${TRUST_LEVELS.join(', ')}.` +
|
|
170
|
+
(didYouMean !== undefined ? ` Did you mean '${didYouMean}'?` : '') +
|
|
171
|
+
` Correct the value, then 'realm workflow register <path>' and retry this step — ` +
|
|
172
|
+
`this run picks up the corrected definition.`);
|
|
173
|
+
case 'finding':
|
|
174
|
+
return (`Accepts ${TRUST_LEVELS.join(', ')}` +
|
|
175
|
+
(didYouMean !== undefined ? `; did you mean '${didYouMean}'?` : '') +
|
|
176
|
+
` — correct the value and 'realm workflow register <path>'.`);
|
|
177
|
+
case 'briefing':
|
|
178
|
+
return (`A step's 'trust' accepts ${TRUST_LEVELS.join(', ')}.` +
|
|
179
|
+
(didYouMean !== undefined ? ` Did you mean '${didYouMean}'?` : '') +
|
|
180
|
+
` Do NOT call execute_step for it; report this to the user, who must correct the ` +
|
|
181
|
+
`workflow definition and re-register it.`);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* The ONE trust-refusal message composer (issue #508 final correction). Four consumers —
|
|
186
|
+
* `yaml-loader.ts`'s load-time refusal (auto/agent, and the finalizer's own non-gate-literal
|
|
187
|
+
* branch), `execution-loop.ts`'s dispatch-time refusal, `run-health.ts`'s `trust_value_invalid`
|
|
188
|
+
* finding, and the protocol generator's pre-dispatch agent briefing — used to hand-compose this
|
|
189
|
+
* text independently, and every defect this issue's prior rounds found (arm divergence across
|
|
190
|
+
* surfaces, mixed bare/quoted value rendering, an array printing as its own first element, a
|
|
191
|
+
* grammar seam where a sentence-ending clause met a lowercase continuation) fell out of that
|
|
192
|
+
* duplication, not out of four separate bugs. This function is the single point where value
|
|
193
|
+
* rendering, arm selection, and the per-surface consequence sentence are assembled — no call site
|
|
194
|
+
* chooses an arm or renders a value on its own again.
|
|
195
|
+
*
|
|
196
|
+
* `kind` only changes the output when `kind === 'finalizer'` — and even then, only reachable on
|
|
197
|
+
* `surface: 'load'`. `dispatch`/`finding`/`briefing` are all scoped, structurally, to
|
|
198
|
+
* `findEligibleSteps`'s auto/agent-only population (see each call site's own comment for why),
|
|
199
|
+
* so a finalizer step's trust value can only ever reach this function through `yaml-loader.ts`'s
|
|
200
|
+
* load-time check. `kind: 'guard'` must never reach this function at all: a guard's blanket
|
|
201
|
+
* `trust` prohibition is a KIND prohibition (the key is the offense, the value is irrelevant),
|
|
202
|
+
* minted by the #517 registry walk, and structurally never routes through a value-refusal
|
|
203
|
+
* composer.
|
|
204
|
+
*/
|
|
205
|
+
export function buildTrustRefusal(args) {
|
|
206
|
+
const { kind, value, step, surface } = args;
|
|
207
|
+
const arm = selectTrustRefusalArm(value);
|
|
208
|
+
// `closestKey` throws a TypeError on `null` — guarded by the `typeof` check, which also
|
|
209
|
+
// correctly excludes every other non-string value (123, [], {}) from the suggestion without a
|
|
210
|
+
// special case for each. Only the generic arm ever suggests: a service-trust value or the
|
|
211
|
+
// retired tombstone are exact membership matches, not near-misses.
|
|
212
|
+
const didYouMean = arm === 'generic' && typeof value === 'string' ? closestKey(value, TRUST_LEVELS) : undefined;
|
|
213
|
+
const rendered = renderTrustValue(value);
|
|
214
|
+
const armClause = arm === 'service'
|
|
215
|
+
? `'trust: ${rendered}' is a SERVICE's trust level (declared under 'services: <name>: ` +
|
|
216
|
+
`trust:'), not a step's`
|
|
217
|
+
: arm === 'removed'
|
|
218
|
+
? `'trust: ${rendered}' was removed (issue #508): it never triggered a notification, ` +
|
|
219
|
+
`it never opened a gate, and most workflows should simply delete the key`
|
|
220
|
+
: `'trust: ${rendered}' is not a recognized value`;
|
|
221
|
+
const prefix = surface === 'load' || surface === 'dispatch' ? `Step '${step}': ` : '';
|
|
222
|
+
const consequence = trustRefusalConsequence(surface);
|
|
223
|
+
const tail = trustRefusalTail(kind, surface, didYouMean);
|
|
224
|
+
return `${prefix}${armClause} — ${consequence}. ${tail}`;
|
|
225
|
+
}
|
|
1
226
|
/**
|
|
2
227
|
* Every key RetryConfig declares. Used by the YAML loader (issue #140) to warn when a `retry:`
|
|
3
228
|
* block declares a key that isn't recognized (misspelling, or a stale field) — same non-breaking
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-definition.js","sourceRoot":"","sources":["../../src/types/workflow-definition.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"workflow-definition.js","sourceRoot":"","sources":["../../src/types/workflow-definition.ts"],"names":[],"mappings":"AAEA,6FAA6F;AAC7F,wFAAwF;AACxF,2FAA2F;AAC3F,4BAA4B;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAiCxD;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,MAAM;IACN,iBAAiB;IACjB,gBAAgB;CACwB,CAAC;AAE3C;;;;mFAImF;AACnF,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,iBAAiB;IACjB,gBAAgB;CACwB,CAAC;AAE3C;;;;yFAIyF;AACzF,MAAM,CAAC,MAAM,oBAAoB,GAAG;I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BAAuB;IACvB,cAAc;IACd,QAAQ;IACR,SAAS;IACT,cAAc;IACd,MAAM;IACN,eAAe;IACf,OAAO;IACP,gBAAgB;IAChB,aAAa;IACb,cAAc;IACd,mBAAmB;IACnB,qBAAqB;CACb,CAAC;AAQX,MAAM,qBAAqB,GAEiD,IAAI,CAAC;AACjF,MAAM,mBAAmB,GAE2D,IAAI,CAAC;AAoGzF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,IAAI;IACJ,MAAM;IACN,aAAa;IACb,SAAS;IACT,eAAe;IACf,UAAU;IACV,UAAU;IACV,aAAa;IACb,WAAW;IACX,OAAO;IACP,cAAc;IACd,YAAY;IACZ,kBAAkB;IAClB,iBAAiB;IACjB,SAAS;CACD,CAAC;AAEX;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,YAAY;IACZ,YAAY;IACZ,mBAAmB;IACnB,gBAAgB;IAChB,QAAQ;IACR,OAAO;IACP,OAAO;CACC,CAAC;AAWX,MAAM,yBAAyB,GAKvB,IAAI,CAAC;AACb,MAAM,uBAAuB,GAKrB,IAAI,CAAC;AACb,MAAM,yBAAyB,GAE4D,IAAI,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import type { LoaderWarning } from '../workflow/diagnostics.js';
|
|
1
2
|
export type ErrorCategory = 'NETWORK' | 'SERVICE' | 'STATE' | 'VALIDATION' | 'ENGINE' | 'RESOURCE';
|
|
2
3
|
export type AgentAction = 'report_to_user' | 'provide_input' | 'resolve_precondition' | 'stop' | 'wait_for_human' | 'wait_and_proceed';
|
|
3
|
-
export type ErrorCode = 'NETWORK_TIMEOUT' | 'NETWORK_UNREACHABLE' | 'NETWORK_DNS_FAILED' | 'NETWORK_CONNECTION_RESET' | 'SERVICE_HTTP_4XX' | 'SERVICE_HTTP_5XX' | 'SERVICE_RATE_LIMITED' | 'SERVICE_AUTH_FAILED' | 'SERVICE_NOT_FOUND' | 'SERVICE_RESPONSE_INVALID' | 'SERVICE_UNEXPECTED_REDIRECT' | 'STATE_BLOCKED' | 'STATE_PRECONDITION_FAILED' | 'STATE_RUN_NOT_FOUND' | 'STATE_WORKFLOW_NOT_FOUND' | 'STATE_RUN_TERMINAL' | 'STATE_SNAPSHOT_MISMATCH' | 'STATE_RUN_LOCKED' | 'STATE_RUN_BUSY' | 'STATE_TRANSITION_DENIED' | 'STATE_RUN_RESURRECTED' | 'STATE_LEGACY_FORMAT' | 'STATE_STEP_ALREADY_CLAIMED' | 'STATE_STEP_NOT_ELIGIBLE' | 'STATE_STEP_ALREADY_SETTLED' | 'STATE_CLAIM_LOST' | 'STATE_RUN_DIVERGED' | 'STATE_RUN_ALREADY_ACTIVE' | 'STATE_IDEMPOTENCY_KEY_USED' | 'RUN_ABORTING' | 'VALIDATION_INPUT_SCHEMA' | 'VALIDATION_OUTPUT_SCHEMA' | 'VALIDATION_TRACE_SCHEMA' | 'VALIDATION_EXHAUSTED' | 'VALIDATION_WORKFLOW_SCHEMA' | 'VALIDATION_HASH_MISMATCH' | 'VALIDATION_QUOTE_NOT_FOUND' | 'VALIDATION_FIELD_UNKNOWN' | 'VALIDATION_FIELD_EXCLUDED' | 'VALIDATION_EMPTY_VALUE' | 'VALIDATION_BATCH_TOO_LARGE' | 'VALIDATION_BATCH_ITEMS' | 'STEP_HANDLER_ERROR' | 'ENGINE_INTERNAL' | 'ENGINE_STORE_FAILED' | 'ENGINE_ARTIFACT_DELETE_FAILED' | 'ENGINE_ADAPTER_FAILED' | 'ENGINE_ADAPTER_NOT_REGISTERED' | 'ENGINE_PROCESSOR_FAILED' | 'ENGINE_HANDLER_FAILED' | 'ENGINE_HANDLER_NOT_REGISTERED' | 'ENGINE_STEP_FAILED' | 'ENGINE_GATE_OPEN_FAILED' | 'GATE_MESSAGE_UNRESOLVABLE' | 'FILTER_UNKNOWN' | 'ADAPTER_OP_UNSUPPORTED' | 'ADAPTER_VALIDATION_FAILED' | 'ADAPTER_REQUEST_FAILED' | 'STEP_TIMEOUT' | 'STEP_ABORTED' | 'STEP_RETRY_EXHAUSTED' | 'STATE_STEP_PENDING' | 'STATE_SEAL_UNSTAMPED' | 'STATE_SEAL_ORPHANED' | 'STATE_SEAL_ERASED' | 'STATE_SEAL_UNKNOWN_ARM' | 'STATE_SEAL_INCOHERENT' | 'STATE_SEAL_REWRITTEN' | 'STEP_NOT_FOUND' | 'GUARD_RESOLUTION_ERROR' | 'INPUT_MAP_DEPTH_EXCEEDED' | 'INPUT_MAP_UNKNOWN_DIRECTIVE' | 'RESOURCE_FETCH_FAILED' | 'RESOURCE_TOO_LARGE' | 'RESOURCE_FORMAT_INVALID' | 'RESOURCE_NOT_ACCESSIBLE' | 'BUFFER_FULL' | 'TRACE_CAPABILITY_INCONSISTENT' | 'MCP_CONNECTION_FAILED' | 'MCP_TOOL_NOT_FOUND' | 'MCP_TOOL_NAME_COLLISION';
|
|
4
|
+
export type ErrorCode = 'NETWORK_TIMEOUT' | 'NETWORK_UNREACHABLE' | 'NETWORK_DNS_FAILED' | 'NETWORK_CONNECTION_RESET' | 'SERVICE_HTTP_4XX' | 'SERVICE_HTTP_5XX' | 'SERVICE_RATE_LIMITED' | 'SERVICE_AUTH_FAILED' | 'SERVICE_NOT_FOUND' | 'SERVICE_RESPONSE_INVALID' | 'SERVICE_UNEXPECTED_REDIRECT' | 'STATE_BLOCKED' | 'STATE_PRECONDITION_FAILED' | 'STATE_RUN_NOT_FOUND' | 'STATE_WORKFLOW_NOT_FOUND' | 'STATE_RUN_TERMINAL' | 'STATE_SNAPSHOT_MISMATCH' | 'STATE_RUN_LOCKED' | 'STATE_RUN_BUSY' | 'STATE_TRANSITION_DENIED' | 'STATE_RUN_RESURRECTED' | 'STATE_LEGACY_FORMAT' | 'STATE_STEP_ALREADY_CLAIMED' | 'STATE_STEP_NOT_ELIGIBLE' | 'STATE_STEP_ALREADY_SETTLED' | 'STATE_CLAIM_LOST' | 'STATE_RUN_DIVERGED' | 'STATE_RUN_ALREADY_ACTIVE' | 'STATE_IDEMPOTENCY_KEY_USED' | 'RUN_ABORTING' | 'VALIDATION_INPUT_SCHEMA' | 'VALIDATION_OUTPUT_SCHEMA' | 'VALIDATION_TRACE_SCHEMA' | 'VALIDATION_EXHAUSTED' | 'VALIDATION_WORKFLOW_SCHEMA' | 'VALIDATION_HASH_MISMATCH' | 'VALIDATION_QUOTE_NOT_FOUND' | 'VALIDATION_FIELD_UNKNOWN' | 'VALIDATION_FIELD_EXCLUDED' | 'VALIDATION_EMPTY_VALUE' | 'VALIDATION_BATCH_TOO_LARGE' | 'VALIDATION_BATCH_ITEMS' | 'VALIDATION_TRUST_VALUE' | 'STEP_HANDLER_ERROR' | 'ENGINE_INTERNAL' | 'ENGINE_STORE_FAILED' | 'ENGINE_ARTIFACT_DELETE_FAILED' | 'ENGINE_ADAPTER_FAILED' | 'ENGINE_ADAPTER_NOT_REGISTERED' | 'ENGINE_PROCESSOR_FAILED' | 'ENGINE_HANDLER_FAILED' | 'ENGINE_HANDLER_NOT_REGISTERED' | 'ENGINE_STEP_FAILED' | 'ENGINE_GATE_OPEN_FAILED' | 'GATE_MESSAGE_UNRESOLVABLE' | 'FILTER_UNKNOWN' | 'ADAPTER_OP_UNSUPPORTED' | 'ADAPTER_VALIDATION_FAILED' | 'ADAPTER_REQUEST_FAILED' | 'STEP_TIMEOUT' | 'STEP_ABORTED' | 'STEP_RETRY_EXHAUSTED' | 'STATE_STEP_PENDING' | 'STATE_SEAL_UNSTAMPED' | 'STATE_SEAL_ORPHANED' | 'STATE_SEAL_ERASED' | 'STATE_SEAL_UNKNOWN_ARM' | 'STATE_SEAL_INCOHERENT' | 'STATE_SEAL_REWRITTEN' | 'STEP_NOT_FOUND' | 'GUARD_RESOLUTION_ERROR' | 'INPUT_MAP_DEPTH_EXCEEDED' | 'INPUT_MAP_UNKNOWN_DIRECTIVE' | 'RESOURCE_FETCH_FAILED' | 'RESOURCE_TOO_LARGE' | 'RESOURCE_FORMAT_INVALID' | 'RESOURCE_NOT_ACCESSIBLE' | 'BUFFER_FULL' | 'TRACE_CAPABILITY_INCONSISTENT' | 'MCP_CONNECTION_FAILED' | 'MCP_TOOL_NOT_FOUND' | 'MCP_TOOL_NAME_COLLISION';
|
|
4
5
|
export interface WorkflowErrorOptions {
|
|
5
6
|
code: ErrorCode;
|
|
6
7
|
category: ErrorCategory;
|
|
@@ -10,6 +11,23 @@ export interface WorkflowErrorOptions {
|
|
|
10
11
|
stepId?: string;
|
|
11
12
|
attempt?: number;
|
|
12
13
|
retry_after?: number;
|
|
14
|
+
/**
|
|
15
|
+
* issue #424: the loader warnings that were live when this error was thrown. Present only on
|
|
16
|
+
* loader errors, and only when there were any.
|
|
17
|
+
*
|
|
18
|
+
* No current call site populates this — every attachment goes through
|
|
19
|
+
* `attachLoaderWarnings` after construction, because the throw sites are spread across two
|
|
20
|
+
* files and the warnings array is not in scope at most of them. The option exists so the
|
|
21
|
+
* options shape mirrors the fields 1:1 (the `stepId`/`retry_after` convention) and so direct
|
|
22
|
+
* construction stays possible.
|
|
23
|
+
*/
|
|
24
|
+
warnings?: readonly LoaderWarning[];
|
|
25
|
+
/**
|
|
26
|
+
* issue #425: the individual error strings this message was joined from. Unlike `warnings`
|
|
27
|
+
* above, THIS sibling is populated at construction — the collectors that join them are the
|
|
28
|
+
* only place the individual strings still exist.
|
|
29
|
+
*/
|
|
30
|
+
errors?: readonly string[];
|
|
13
31
|
}
|
|
14
32
|
export declare class WorkflowError extends Error {
|
|
15
33
|
readonly code: ErrorCode;
|
|
@@ -21,6 +39,32 @@ export declare class WorkflowError extends Error {
|
|
|
21
39
|
readonly timestamp: string;
|
|
22
40
|
readonly attempt: number;
|
|
23
41
|
readonly retry_after?: number;
|
|
42
|
+
/**
|
|
43
|
+
* issue #424: the loader warnings live at the moment this error was thrown — a typo hint, a
|
|
44
|
+
* retry advisory — so a caller rendering the failure can show the whole defect set at once
|
|
45
|
+
* instead of revealing the next layer on each fix.
|
|
46
|
+
*
|
|
47
|
+
* The SLOT is writable because the loader attaches it after construction (see
|
|
48
|
+
* `attachLoaderWarnings` in yaml-loader.ts): the throw sites are spread across two files, and
|
|
49
|
+
* two chokepoints catching-and-attaching cover them all — including every future one — where
|
|
50
|
+
* per-site construction would not. The VALUE stays readonly, and the helper attaches at most
|
|
51
|
+
* once, so an inner chokepoint's attachment survives an outer one.
|
|
52
|
+
*
|
|
53
|
+
* ABSENT rather than `[]` when there were no warnings: "this error carried none" and "nobody
|
|
54
|
+
* looked" are different facts and the channel keeps them different.
|
|
55
|
+
*/
|
|
56
|
+
warnings?: readonly LoaderWarning[];
|
|
57
|
+
/**
|
|
58
|
+
* issue #425: the errors this message was joined from, one per element, before `join('; ')`
|
|
59
|
+
* flattened them. A collector accumulates several problems and throws once, so a reader gets
|
|
60
|
+
* one paragraph-long line with the boundaries only implied by punctuation — and a message can
|
|
61
|
+
* itself contain a semicolon (the #413 four-clause text does), so splitting the joined string
|
|
62
|
+
* back apart is not a recoverable operation. Kept here instead, and the render walks the array.
|
|
63
|
+
*
|
|
64
|
+
* ABSENT rather than `[]` on a single-error throw, so a caller can tell "there was one" from
|
|
65
|
+
* "there was a list" without counting.
|
|
66
|
+
*/
|
|
67
|
+
errors?: readonly string[];
|
|
24
68
|
constructor(message: string, options: WorkflowErrorOptions);
|
|
25
69
|
}
|
|
26
70
|
//# sourceMappingURL=workflow-error.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-error.d.ts","sourceRoot":"","sources":["../../src/types/workflow-error.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"workflow-error.d.ts","sourceRoot":"","sources":["../../src/types/workflow-error.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAEhE,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,YAAY,GAAG,QAAQ,GAAG,UAAU,CAAC;AAEnG,MAAM,MAAM,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e3D"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
// Structured, categorized error class used throughout the engine.
|
|
2
1
|
export class WorkflowError extends Error {
|
|
3
2
|
code;
|
|
4
3
|
category;
|
|
@@ -9,6 +8,32 @@ export class WorkflowError extends Error {
|
|
|
9
8
|
timestamp;
|
|
10
9
|
attempt;
|
|
11
10
|
retry_after;
|
|
11
|
+
/**
|
|
12
|
+
* issue #424: the loader warnings live at the moment this error was thrown — a typo hint, a
|
|
13
|
+
* retry advisory — so a caller rendering the failure can show the whole defect set at once
|
|
14
|
+
* instead of revealing the next layer on each fix.
|
|
15
|
+
*
|
|
16
|
+
* The SLOT is writable because the loader attaches it after construction (see
|
|
17
|
+
* `attachLoaderWarnings` in yaml-loader.ts): the throw sites are spread across two files, and
|
|
18
|
+
* two chokepoints catching-and-attaching cover them all — including every future one — where
|
|
19
|
+
* per-site construction would not. The VALUE stays readonly, and the helper attaches at most
|
|
20
|
+
* once, so an inner chokepoint's attachment survives an outer one.
|
|
21
|
+
*
|
|
22
|
+
* ABSENT rather than `[]` when there were no warnings: "this error carried none" and "nobody
|
|
23
|
+
* looked" are different facts and the channel keeps them different.
|
|
24
|
+
*/
|
|
25
|
+
warnings;
|
|
26
|
+
/**
|
|
27
|
+
* issue #425: the errors this message was joined from, one per element, before `join('; ')`
|
|
28
|
+
* flattened them. A collector accumulates several problems and throws once, so a reader gets
|
|
29
|
+
* one paragraph-long line with the boundaries only implied by punctuation — and a message can
|
|
30
|
+
* itself contain a semicolon (the #413 four-clause text does), so splitting the joined string
|
|
31
|
+
* back apart is not a recoverable operation. Kept here instead, and the render walks the array.
|
|
32
|
+
*
|
|
33
|
+
* ABSENT rather than `[]` on a single-error throw, so a caller can tell "there was one" from
|
|
34
|
+
* "there was a list" without counting.
|
|
35
|
+
*/
|
|
36
|
+
errors;
|
|
12
37
|
constructor(message, options) {
|
|
13
38
|
super(message);
|
|
14
39
|
this.name = 'WorkflowError';
|
|
@@ -23,6 +48,10 @@ export class WorkflowError extends Error {
|
|
|
23
48
|
this.attempt = options.attempt ?? 1;
|
|
24
49
|
if (options.retry_after !== undefined)
|
|
25
50
|
this.retry_after = options.retry_after;
|
|
51
|
+
if (options.warnings !== undefined)
|
|
52
|
+
this.warnings = options.warnings;
|
|
53
|
+
if (options.errors !== undefined)
|
|
54
|
+
this.errors = options.errors;
|
|
26
55
|
}
|
|
27
56
|
}
|
|
28
57
|
//# sourceMappingURL=workflow-error.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-error.js","sourceRoot":"","sources":["../../src/types/workflow-error.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"workflow-error.js","sourceRoot":"","sources":["../../src/types/workflow-error.ts"],"names":[],"mappings":"AA6MA,MAAM,OAAO,aAAc,SAAQ,KAAK;IAC7B,IAAI,CAAY;IAChB,QAAQ,CAAgB;IACxB,WAAW,CAAc;IACzB,SAAS,CAAU;IACnB,OAAO,CAA0B;IACjC,MAAM,CAAU;IAChB,SAAS,CAAS;IAClB,OAAO,CAAS;IAChB,WAAW,CAAU;IAC9B;;;;;;;;;;;;;OAaG;IACH,QAAQ,CAA4B;IACpC;;;;;;;;;OASG;IACH,MAAM,CAAqB;IAE3B,YAAY,OAAe,EAAE,OAA6B;QACxD,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;QAC5B,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;QACzB,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;QACjC,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;QACvC,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;QACnC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC;QACrC,IAAI,OAAO,CAAC,MAAM,KAAK,SAAS;YAAE,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;QAC/D,IAAI,CAAC,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;QAC1C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,CAAC,CAAC;QACpC,IAAI,OAAO,CAAC,WAAW,KAAK,SAAS;YAAE,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;QAC9E,IAAI,OAAO,CAAC,QAAQ,KAAK,SAAS;YAAE,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;QACrE,IAAI,OAAO,CAAC,MAAM,KAAK,SAAS;YAAE,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IACjE,CAAC;CACF"}
|
|
@@ -6,11 +6,13 @@
|
|
|
6
6
|
import type { SourcePosition } from './source-positions.js';
|
|
7
7
|
export type WarningCode = 'UNKNOWN_WORKFLOW_KEY' | 'UNKNOWN_STEP_KEY' | 'UNKNOWN_CREATE_WORKFLOW_KEY' | 'IDEMPOTENT_INERT_IN_FINALIZER' | 'DUAL_SCHEMA_DECLARED' | 'RETRY_NO_TIMEOUT' | 'EXTENSION_SENTINEL' | 'UNKNOWN_RETRY_KEY' | 'ON_TIMEOUT_SINGLE_ATTEMPT' | 'TOTAL_TIMEOUT_BELOW_ATTEMPT' | 'TOTAL_TIMEOUT_NON_AUTO' | 'RETRY_INERT_NON_AUTO' | 'UNKNOWN_VALIDATION_EXHAUSTION_KEY' | 'DEAD_VALIDATION_EXHAUSTION_CONFIG' | 'UNKNOWN_GATE_KEY' | 'DEAD_GATE_CONFIG';
|
|
8
8
|
/**
|
|
9
|
-
* A single structured diagnostic. `message` is the full human-readable text
|
|
10
|
-
* unknown-key
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
9
|
+
* A single structured diagnostic. `message` is the full human-readable text, minted once at the
|
|
10
|
+
* source (`findUnknownKeys` below, for the unknown-key family) — `renderLoaderWarning` never
|
|
11
|
+
* reconstructs it from the structured fields; it only ECHOES `message` verbatim, prefixed with
|
|
12
|
+
* `⚠ `. `scope`/`id`/`step`/`key`/`did_you_mean` are populated only by the unknown-key family and
|
|
13
|
+
* exist for consumers that want the PARTS (a machine reader, a different renderer), not for
|
|
14
|
+
* `renderLoaderWarning` to recompose from — that would risk a second, drifting copy of the same
|
|
15
|
+
* prose. Other codes carry just `code`/`severity`/`message`.
|
|
14
16
|
*/
|
|
15
17
|
export interface LoaderWarning {
|
|
16
18
|
code: WarningCode;
|
|
@@ -105,16 +107,18 @@ export declare function findUnknownKeys(obj: Record<string, unknown>, allowList:
|
|
|
105
107
|
* yaml-loader.ts, and the CLI's `printLoaderWarnings` helper) renders through this, never by
|
|
106
108
|
* hand-rolling a `⚠ ` string itself.
|
|
107
109
|
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
* a
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
*
|
|
110
|
+
* THE LAW (issue #444): every warning renders as `⚠ ` + its message, verbatim, whatever its
|
|
111
|
+
* code. One grammar, one owner.
|
|
112
|
+
*
|
|
113
|
+
* It used to be three grammars in four homes: the six unknown-key codes were prefixed here, two
|
|
114
|
+
* CLI mints baked a two-space `⚠ ` into the message itself, and the remaining advisory codes
|
|
115
|
+
* rendered bare — so one `validate` run could print a prefixed line, an unprefixed line and a
|
|
116
|
+
* double-spaced line in the same block. The prefix belongs to the renderer because the renderer
|
|
117
|
+
* is the only place that knows it is rendering; a mint knows only what it is warning about.
|
|
118
|
+
*
|
|
119
|
+
* The obligation that comes with owning it: a MINT MUST NOT carry a prefix of its own, or the
|
|
120
|
+
* two compose into `⚠ ⚠ …` — the #417 double-prefix class. Each producer has a hygiene cell
|
|
121
|
+
* asserting its message does not start with `⚠`.
|
|
118
122
|
*/
|
|
119
123
|
export declare function renderLoaderWarning(w: LoaderWarning): string;
|
|
120
124
|
//# sourceMappingURL=diagnostics.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnostics.d.ts","sourceRoot":"","sources":["../../src/workflow/diagnostics.ts"],"names":[],"mappings":"AAQA;;;;GAIG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,MAAM,WAAW,GACnB,sBAAsB,GACtB,kBAAkB,GAClB,6BAA6B,GAC7B,+BAA+B,GAC/B,sBAAsB,GACtB,kBAAkB,GAClB,oBAAoB,GAEpB,mBAAmB,GACnB,2BAA2B,GAC3B,6BAA6B,GAC7B,wBAAwB,GAGxB,sBAAsB,GAEtB,mCAAmC,GACnC,mCAAmC,GAInC,kBAAkB,GAClB,kBAAkB,CAAC;AAEvB
|
|
1
|
+
{"version":3,"file":"diagnostics.d.ts","sourceRoot":"","sources":["../../src/workflow/diagnostics.ts"],"names":[],"mappings":"AAQA;;;;GAIG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,MAAM,WAAW,GACnB,sBAAsB,GACtB,kBAAkB,GAClB,6BAA6B,GAC7B,+BAA+B,GAC/B,sBAAsB,GACtB,kBAAkB,GAClB,oBAAoB,GAEpB,mBAAmB,GACnB,2BAA2B,GAC3B,6BAA6B,GAC7B,wBAAwB,GAGxB,sBAAsB,GAEtB,mCAAmC,GACnC,mCAAmC,GAInC,kBAAkB,GAClB,kBAAkB,CAAC;AAEvB;;;;;;;;GAQG;AACH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,WAAW,CAAC;IAClB,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,UAAU,GAAG,MAAM,CAAC;IAC3B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IAC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91
|
/**
|
|
92
92
|
* Builds the templated "unknown key" message text (everything after the `⚠ ` prefix).
|
|
93
93
|
*
|
|
94
|
-
* The position is spliced in HERE, at the mint, rather than at any render site (issue #392)
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
94
|
+
* The position is spliced in HERE, at the mint, rather than at any render site (issue #392):
|
|
95
|
+
* `renderLoaderWarning` is the single source of the `⚠ ` line format and stays byte-untouched, so
|
|
96
|
+
* nothing downstream has to learn about positions. (Issue #540 removed the one other reason this
|
|
97
|
+
* comment used to give — a CLI print-time substitution that rewrote `— ignored` for a refusing
|
|
98
|
+
* boundary, and whose anchor this splice point had to land before. That substitution is gone;
|
|
99
|
+
* `— ignored` now renders unmodified everywhere. See `plans/issue-540/design-d2.md`.)
|
|
100
100
|
*
|
|
101
101
|
* The prose carries the START line only. A human reading an error wants somewhere to look, not a
|
|
102
102
|
* range; the range lives on the structured channel where a span-editing agent can use it.
|
|
@@ -150,34 +150,25 @@ export function findUnknownKeys(obj, allowList, ctx) {
|
|
|
150
150
|
}
|
|
151
151
|
return warnings;
|
|
152
152
|
}
|
|
153
|
-
const UNKNOWN_KEY_CODES = new Set([
|
|
154
|
-
'UNKNOWN_WORKFLOW_KEY',
|
|
155
|
-
'UNKNOWN_STEP_KEY',
|
|
156
|
-
'UNKNOWN_CREATE_WORKFLOW_KEY',
|
|
157
|
-
'UNKNOWN_RETRY_KEY',
|
|
158
|
-
'UNKNOWN_VALIDATION_EXHAUSTION_KEY',
|
|
159
|
-
'UNKNOWN_GATE_KEY',
|
|
160
|
-
]);
|
|
161
153
|
/**
|
|
162
154
|
* The SINGLE source of the `⚠ ` line format — every printer (the core plain wrappers in
|
|
163
155
|
* yaml-loader.ts, and the CLI's `printLoaderWarnings` helper) renders through this, never by
|
|
164
156
|
* hand-rolling a `⚠ ` string itself.
|
|
165
157
|
*
|
|
166
|
-
*
|
|
167
|
-
*
|
|
168
|
-
*
|
|
169
|
-
*
|
|
170
|
-
* a
|
|
171
|
-
*
|
|
172
|
-
*
|
|
173
|
-
*
|
|
174
|
-
*
|
|
175
|
-
*
|
|
158
|
+
* THE LAW (issue #444): every warning renders as `⚠ ` + its message, verbatim, whatever its
|
|
159
|
+
* code. One grammar, one owner.
|
|
160
|
+
*
|
|
161
|
+
* It used to be three grammars in four homes: the six unknown-key codes were prefixed here, two
|
|
162
|
+
* CLI mints baked a two-space `⚠ ` into the message itself, and the remaining advisory codes
|
|
163
|
+
* rendered bare — so one `validate` run could print a prefixed line, an unprefixed line and a
|
|
164
|
+
* double-spaced line in the same block. The prefix belongs to the renderer because the renderer
|
|
165
|
+
* is the only place that knows it is rendering; a mint knows only what it is warning about.
|
|
166
|
+
*
|
|
167
|
+
* The obligation that comes with owning it: a MINT MUST NOT carry a prefix of its own, or the
|
|
168
|
+
* two compose into `⚠ ⚠ …` — the #417 double-prefix class. Each producer has a hygiene cell
|
|
169
|
+
* asserting its message does not start with `⚠`.
|
|
176
170
|
*/
|
|
177
171
|
export function renderLoaderWarning(w) {
|
|
178
|
-
|
|
179
|
-
return `⚠ ${w.message}`;
|
|
180
|
-
}
|
|
181
|
-
return w.message;
|
|
172
|
+
return `⚠ ${w.message}`;
|
|
182
173
|
}
|
|
183
174
|
//# sourceMappingURL=diagnostics.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnostics.js","sourceRoot":"","sources":["../../src/workflow/diagnostics.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,EAAE;AACF,4FAA4F;AAC5F,8FAA8F;AAC9F,gGAAgG;AAChG,gGAAgG;AAChG,+FAA+F;
|
|
1
|
+
{"version":3,"file":"diagnostics.js","sourceRoot":"","sources":["../../src/workflow/diagnostics.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,EAAE;AACF,4FAA4F;AAC5F,8FAA8F;AAC9F,gGAAgG;AAChG,gGAAgG;AAChG,+FAA+F;AAyE/F;;;;;;;;;;;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