@sensigo/realm 0.37.0 → 0.39.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/adapter-utils.d.ts +31 -0
- package/dist/adapters/adapter-utils.d.ts.map +1 -1
- package/dist/adapters/adapter-utils.js +16 -0
- package/dist/adapters/adapter-utils.js.map +1 -1
- package/dist/adapters/airtable-adapter.d.ts.map +1 -1
- package/dist/adapters/airtable-adapter.js +25 -14
- package/dist/adapters/airtable-adapter.js.map +1 -1
- package/dist/adapters/gorgias-adapter.d.ts.map +1 -1
- package/dist/adapters/gorgias-adapter.js +7 -3
- package/dist/adapters/gorgias-adapter.js.map +1 -1
- package/dist/adapters/notion-adapter.d.ts.map +1 -1
- package/dist/adapters/notion-adapter.js +10 -6
- package/dist/adapters/notion-adapter.js.map +1 -1
- package/dist/adapters/slack-adapter.d.ts.map +1 -1
- package/dist/adapters/slack-adapter.js +8 -2
- package/dist/adapters/slack-adapter.js.map +1 -1
- package/dist/engine/abandon-run.d.ts.map +1 -1
- package/dist/engine/abandon-run.js +5 -7
- package/dist/engine/abandon-run.js.map +1 -1
- package/dist/engine/apply-resume.d.ts.map +1 -1
- package/dist/engine/apply-resume.js +13 -1
- package/dist/engine/apply-resume.js.map +1 -1
- package/dist/engine/eligibility.d.ts +109 -2
- package/dist/engine/eligibility.d.ts.map +1 -1
- package/dist/engine/eligibility.js +306 -16
- package/dist/engine/eligibility.js.map +1 -1
- package/dist/engine/execution-loop.d.ts.map +1 -1
- package/dist/engine/execution-loop.js +199 -34
- package/dist/engine/execution-loop.js.map +1 -1
- package/dist/engine/run-health.d.ts.map +1 -1
- package/dist/engine/run-health.js.map +1 -1
- package/dist/engine/settlement.d.ts +61 -6
- package/dist/engine/settlement.d.ts.map +1 -1
- package/dist/engine/settlement.js +190 -25
- package/dist/engine/settlement.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -2
- package/dist/index.js.map +1 -1
- package/dist/store/json-file-store.d.ts +9 -2
- package/dist/store/json-file-store.d.ts.map +1 -1
- package/dist/store/json-file-store.js +76 -0
- package/dist/store/json-file-store.js.map +1 -1
- package/dist/store/seal-integrity.d.ts +9 -0
- package/dist/store/seal-integrity.d.ts.map +1 -0
- package/dist/store/seal-integrity.js +249 -0
- package/dist/store/seal-integrity.js.map +1 -0
- package/dist/store/store-interface.d.ts +47 -2
- package/dist/store/store-interface.d.ts.map +1 -1
- package/dist/types/run-record.d.ts +123 -6
- package/dist/types/run-record.d.ts.map +1 -1
- package/dist/types/run-record.js +25 -1
- package/dist/types/run-record.js.map +1 -1
- package/dist/types/workflow-error.d.ts +1 -1
- package/dist/types/workflow-error.d.ts.map +1 -1
- package/dist/types/workflow-error.js.map +1 -1
- package/dist/workflow/diagnostics.d.ts +10 -0
- package/dist/workflow/diagnostics.d.ts.map +1 -1
- package/dist/workflow/diagnostics.js +1 -1
- package/dist/workflow/diagnostics.js.map +1 -1
- package/dist/workflow/yaml-loader.d.ts.map +1 -1
- package/dist/workflow/yaml-loader.js +141 -1
- package/dist/workflow/yaml-loader.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
import { SEAL_ARMS } from '../types/run-record.js';
|
|
2
|
+
import { WorkflowError } from '../types/workflow-error.js';
|
|
3
|
+
import { armToPhase, classifyForCoherence } from '../engine/eligibility.js';
|
|
4
|
+
/**
|
|
5
|
+
* The four seal-integrity clauses plus the `SEAL_COHERENT` check (issue #367, design rev 3 §6-L2).
|
|
6
|
+
* Call from every store write tail that persists `next` over `stored`. Throws on violation;
|
|
7
|
+
* returns on every honest write — including the entire pre-#367 legacy population within a
|
|
8
|
+
* single-version fleet (the mixed-fleet caveat is a named residual, not a solved case).
|
|
9
|
+
*/
|
|
10
|
+
export function assertSealIntegrity(stored, next) {
|
|
11
|
+
// Clause 1 — STATE_SEAL_UNSTAMPED (forward, TRANSITION-scoped): a fresh seal must name its arm.
|
|
12
|
+
// Legacy terminal records re-written while terminal are exempt (stored is already terminal).
|
|
13
|
+
if (stored.terminal_state !== true &&
|
|
14
|
+
next.terminal_state === true &&
|
|
15
|
+
next.sealed_by === undefined) {
|
|
16
|
+
throw new WorkflowError(`Run '${next.id}' sealed without sealed_by — every fresh seal (non-terminal → terminal ` +
|
|
17
|
+
`write) must name its seal arm`, {
|
|
18
|
+
code: 'STATE_SEAL_UNSTAMPED',
|
|
19
|
+
category: 'STATE',
|
|
20
|
+
agentAction: 'report_to_user',
|
|
21
|
+
retryable: false,
|
|
22
|
+
details: { runId: next.id },
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
// Clause 2 — STATE_SEAL_ORPHANED (reverse, TRANSITION-scoped): a terminal -> live transition
|
|
26
|
+
// that RETAINS the stamp is an in-version stripper bug, caught the moment it happens. The
|
|
27
|
+
// unconditional form is rejected: it would wedge every old-binary-resume orphan on every
|
|
28
|
+
// subsequent write; those orphans instead derive live and self-heal at the next settle.
|
|
29
|
+
if (stored.terminal_state === true &&
|
|
30
|
+
next.terminal_state !== true &&
|
|
31
|
+
next.sealed_by !== undefined) {
|
|
32
|
+
throw new WorkflowError(`Run '${next.id}' carries sealed_by on a non-terminal write — a resume/strip path failed ` +
|
|
33
|
+
`to remove it in the same write`, {
|
|
34
|
+
code: 'STATE_SEAL_ORPHANED',
|
|
35
|
+
category: 'STATE',
|
|
36
|
+
agentAction: 'report_to_user',
|
|
37
|
+
retryable: false,
|
|
38
|
+
details: { runId: next.id, arm: next.sealed_by.arm },
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
// Clause 3 — STATE_SEAL_ERASED (cross-time): a stored stamp must survive every terminal
|
|
42
|
+
// rewrite, or a field-enumerating rewriter drains the stamped population back to prose
|
|
43
|
+
// silently. Zero legacy cost by construction — no pre-#367 stored record carries sealed_by.
|
|
44
|
+
if (stored.sealed_by !== undefined &&
|
|
45
|
+
next.terminal_state === true &&
|
|
46
|
+
next.sealed_by === undefined) {
|
|
47
|
+
throw new WorkflowError(`Run '${next.id}' terminal rewrite drops sealed_by (was '${stored.sealed_by.arm}') — ` +
|
|
48
|
+
`stamps are erase-proof while terminal`, {
|
|
49
|
+
code: 'STATE_SEAL_ERASED',
|
|
50
|
+
category: 'STATE',
|
|
51
|
+
agentAction: 'report_to_user',
|
|
52
|
+
retryable: false,
|
|
53
|
+
details: { runId: next.id, erased_arm: stored.sealed_by.arm },
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
// Clause 4 — STATE_SEAL_UNKNOWN_ARM: an arm outside SEAL_ARMS never persists through this
|
|
57
|
+
// store (the read side falls through to the classifier; the write side is loud).
|
|
58
|
+
if (next.sealed_by !== undefined &&
|
|
59
|
+
!SEAL_ARMS.includes(next.sealed_by.arm)) {
|
|
60
|
+
throw new WorkflowError(`Run '${next.id}' carries unknown seal arm '${next.sealed_by.arm}' — not in SEAL_ARMS`, {
|
|
61
|
+
code: 'STATE_SEAL_UNKNOWN_ARM',
|
|
62
|
+
category: 'STATE',
|
|
63
|
+
agentAction: 'report_to_user',
|
|
64
|
+
retryable: false,
|
|
65
|
+
details: { runId: next.id, arm: next.sealed_by.arm },
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
// Clause 6 — STATE_SEAL_REWRITTEN: a stored arm may not be CHANGED while the run stays terminal,
|
|
69
|
+
// EXCEPT by an adjudication write carrying truthful provenance. Executed before this clause
|
|
70
|
+
// existed: a plain `update()` flipped `complete` to `gate_resolution_complete`, dropped the
|
|
71
|
+
// `classified` marker and reset the retention clock, all silently — the re-attribution this
|
|
72
|
+
// design exists to end, live at its own boundary.
|
|
73
|
+
//
|
|
74
|
+
// The adjudication key is published as a day-one contract rather than added later, because the
|
|
75
|
+
// law that ships with the major says arm changes are refused; amending it afterwards would
|
|
76
|
+
// loosen a published guarantee under external implementers.
|
|
77
|
+
//
|
|
78
|
+
// A RULING SUPERSEDES THE RECORD'S OWN PROSE. The key opens this clause AND exempts the
|
|
79
|
+
// coherence audit below — permanently, on any write of a seal that carries a ruling, not just on
|
|
80
|
+
// the write that records it. The earlier reading (key opens clause 6 only; the verb co-rewrites
|
|
81
|
+
// prose for cross-phase rulings) was reversed on executed evidence: a truthful same-arm
|
|
82
|
+
// acknowledgment on a scarred record — the commonest parked case — was refused as incoherent, so
|
|
83
|
+
// the channel built for closing parked records could not touch its main customer.
|
|
84
|
+
//
|
|
85
|
+
// The prose is never rewritten to match a ruling. It is historical evidence of what the engine
|
|
86
|
+
// said at the time; the ruling resolves the disagreement without falsifying the record.
|
|
87
|
+
// Rule 3 lives OUTSIDE the both-terminal guard below, and that placement is the point: a FRESH
|
|
88
|
+
// seal is a non-terminal -> terminal write, so a rule scoped to both-terminal would never see the
|
|
89
|
+
// fabrication it exists to refuse. (It did not, until the cell for it reddened.)
|
|
90
|
+
if (next.terminal_state === true &&
|
|
91
|
+
stored.sealed_by === undefined &&
|
|
92
|
+
next.sealed_by?.adjudicated !== undefined) {
|
|
93
|
+
// Two scopes, and BOTH are load-bearing:
|
|
94
|
+
//
|
|
95
|
+
// `previous_arm: null` is the ONLY truthful provenance for a first stamp — there was no prior
|
|
96
|
+
// arm, and saying so is the operator's honest claim when they place a record the classifier
|
|
97
|
+
// refused to place. Any non-null claim here is a fabrication.
|
|
98
|
+
//
|
|
99
|
+
// And it is lawful only on a record that was ALREADY TERMINAL — the parked-legacy population.
|
|
100
|
+
// A live run reaching its first seal cannot have been ruled on — nothing had happened yet to
|
|
101
|
+
// rule on. Without this half, `null` would legalise adjudication provenance on every fresh
|
|
102
|
+
// seal in the engine.
|
|
103
|
+
const claimed = next.sealed_by.adjudicated.previous_arm;
|
|
104
|
+
if (claimed !== null || stored.terminal_state !== true) {
|
|
105
|
+
throw new WorkflowError(claimed !== null
|
|
106
|
+
? `Run '${next.id}' claims adjudication from '${claimed}' on a record that had no seal ` +
|
|
107
|
+
`arm — a first stamp's only truthful provenance is previous_arm: null`
|
|
108
|
+
: `Run '${next.id}' carries adjudication provenance on a LIVE run's first seal — only ` +
|
|
109
|
+
`an already-terminal record can have been ruled on`, {
|
|
110
|
+
code: 'STATE_SEAL_REWRITTEN',
|
|
111
|
+
category: 'STATE',
|
|
112
|
+
agentAction: 'report_to_user',
|
|
113
|
+
retryable: false,
|
|
114
|
+
details: { runId: next.id, claimed_previous_arm: claimed },
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
if (stored.terminal_state === true && next.terminal_state === true) {
|
|
119
|
+
const storedArm = stored.sealed_by?.arm;
|
|
120
|
+
const nextSeal = next.sealed_by;
|
|
121
|
+
const adjudication = nextSeal?.adjudicated;
|
|
122
|
+
const storedAdjudication = stored.sealed_by?.adjudicated;
|
|
123
|
+
// A ruling is NEW-OR-CHANGED when any of its fields differ from the stored one; an untouched
|
|
124
|
+
// record spreading its own provenance forward is not making a claim.
|
|
125
|
+
//
|
|
126
|
+
// FIELD-WISE, not by serialised bytes: a store whose round trip reorders JSON keys — Postgres
|
|
127
|
+
// `jsonb` does exactly this, and it is a consumer on the punch list — would otherwise see an
|
|
128
|
+
// honest spread as a fresh claim and refuse it. A ruling's identity is what it says, not the
|
|
129
|
+
// byte order it came back in.
|
|
130
|
+
const provenanceIsNew = adjudication !== undefined &&
|
|
131
|
+
(storedAdjudication === undefined ||
|
|
132
|
+
adjudication.by !== storedAdjudication.by ||
|
|
133
|
+
adjudication.at !== storedAdjudication.at ||
|
|
134
|
+
adjudication.previous_arm !== storedAdjudication.previous_arm ||
|
|
135
|
+
adjudication.reason !== storedAdjudication.reason);
|
|
136
|
+
// (Rule 3 — no fabricated first-seal adjudication — is hoisted above; see its comment.)
|
|
137
|
+
// Rule 2 — truthfulness binds EVERY provenance write, same-arm included. Without this, a
|
|
138
|
+
// same-arm write could mint provenance naming any arm at all, and the "chain is one-step
|
|
139
|
+
// walkable" guarantee that justifies the single slot would be worthless.
|
|
140
|
+
if (storedArm !== undefined && provenanceIsNew && adjudication.previous_arm !== storedArm) {
|
|
141
|
+
throw new WorkflowError(`Run '${next.id}' claims adjudication from '${adjudication.previous_arm}' but the stored ` +
|
|
142
|
+
`arm is '${storedArm}' — a seal rewrite is lawful only with TRUTHFUL provenance`, {
|
|
143
|
+
code: 'STATE_SEAL_REWRITTEN',
|
|
144
|
+
category: 'STATE',
|
|
145
|
+
agentAction: 'report_to_user',
|
|
146
|
+
retryable: false,
|
|
147
|
+
details: {
|
|
148
|
+
runId: next.id,
|
|
149
|
+
stored_arm: storedArm,
|
|
150
|
+
claimed_previous_arm: adjudication.previous_arm,
|
|
151
|
+
...(nextSeal !== undefined ? { next_arm: nextSeal.arm } : {}),
|
|
152
|
+
},
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
// Rule 4 — provenance is erase-proof while terminal, for the same reason the arm is: a ruling
|
|
156
|
+
// that can be quietly dropped is a ruling nobody can rely on afterwards.
|
|
157
|
+
if (storedAdjudication !== undefined && nextSeal !== undefined && adjudication === undefined) {
|
|
158
|
+
throw new WorkflowError(`Run '${next.id}' drops its adjudication provenance (ruled by ` +
|
|
159
|
+
`'${storedAdjudication.by}') — a recorded ruling is erase-proof while terminal`, {
|
|
160
|
+
code: 'STATE_SEAL_REWRITTEN',
|
|
161
|
+
category: 'STATE',
|
|
162
|
+
agentAction: 'report_to_user',
|
|
163
|
+
retryable: false,
|
|
164
|
+
details: { runId: next.id, erased_ruling_by: storedAdjudication.by },
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
// Rule 1 — the arm changed. Lawful only with truthful provenance, which rule 2 has already
|
|
168
|
+
// verified; anything else is the silent rewrite.
|
|
169
|
+
//
|
|
170
|
+
// (Rev 1 of this clause also carried a "stored had none, or differs" conjunct here. It is
|
|
171
|
+
// DELETED deliberately: once rule 2 binds every provenance write, the state it guarded is
|
|
172
|
+
// unreachable in any lawful history, and the conjunct was comparator-ambiguous dead code.
|
|
173
|
+
// Recorded so nobody re-adds it looking at the flip case alone.)
|
|
174
|
+
if (storedArm !== undefined && nextSeal !== undefined && nextSeal.arm !== storedArm) {
|
|
175
|
+
// Riding a PRIOR ruling's provenance is a rewrite, not an adjudication. Without this, a
|
|
176
|
+
// write could flip the arm while spreading the stored ruling forward untouched and pass
|
|
177
|
+
// every other rule — and once the coherence audit stops blocking such a write (it is exempt
|
|
178
|
+
// now, by design), nothing else would. A genuine ruling mints fresh provenance, which rule 2
|
|
179
|
+
// has already checked for truthfulness. Honest spreads never change the arm, so no lawful
|
|
180
|
+
// path is affected.
|
|
181
|
+
if (adjudication !== undefined && !provenanceIsNew) {
|
|
182
|
+
throw new WorkflowError(`Run '${next.id}' changes its seal arm ('${storedArm}' -> '${nextSeal.arm}') while ` +
|
|
183
|
+
`carrying a PRIOR ruling unchanged — an arm change must carry a NEW ruling; riding a ` +
|
|
184
|
+
`prior ruling's provenance is a rewrite`, {
|
|
185
|
+
code: 'STATE_SEAL_REWRITTEN',
|
|
186
|
+
category: 'STATE',
|
|
187
|
+
agentAction: 'report_to_user',
|
|
188
|
+
retryable: false,
|
|
189
|
+
details: { runId: next.id, stored_arm: storedArm, next_arm: nextSeal.arm },
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
if (adjudication === undefined) {
|
|
193
|
+
throw new WorkflowError(`Run '${next.id}' rewrites its seal arm ('${storedArm}' -> '${nextSeal.arm}') — a ` +
|
|
194
|
+
`recorded seal is immutable while the run is terminal, except by an adjudication ` +
|
|
195
|
+
`write carrying truthful provenance`, {
|
|
196
|
+
code: 'STATE_SEAL_REWRITTEN',
|
|
197
|
+
category: 'STATE',
|
|
198
|
+
agentAction: 'report_to_user',
|
|
199
|
+
retryable: false,
|
|
200
|
+
details: { runId: next.id, stored_arm: storedArm, next_arm: nextSeal.arm },
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
// SEAL_COHERENT — on any terminal write carrying a stamp: the record's OWN markers/prose,
|
|
206
|
+
// classified as if unstamped, must agree with the arm AT PHASE LEVEL (the classifier
|
|
207
|
+
// legitimately cannot tell `complete` from `gate_resolution_complete` — that granularity is
|
|
208
|
+
// exactly what the arm adds). This catches the old-binary re-seal channel, where a stale arm is
|
|
209
|
+
// preserved by spread over a record whose prose now says otherwise, at the next new-binary
|
|
210
|
+
// write. An unclassifiable record passes — never guess.
|
|
211
|
+
//
|
|
212
|
+
// The comparator is `classifyForCoherence`, NOT the full classifier: it omits the
|
|
213
|
+
// abandoned-marker branch, the sole measured false-positive source (a record legitimately
|
|
214
|
+
// carrying `abandoned_at` from an earlier life would contradict an honest arm). The
|
|
215
|
+
// aborted-marker branch stays live, because the reason-less `guard_abort` re-seal is
|
|
216
|
+
// marker-only-visible and would otherwise go uncaught. Named blindness: a stale arm on a record
|
|
217
|
+
// carrying `abandoned_at` is invisible here — that is BOTH abandon-class arms,
|
|
218
|
+
// `abandon_requested` AND `cleanup_sweep`. Their observer is the migrate sweep's incoherent
|
|
219
|
+
// bucket in a later PR, which uses the FULL classifier.
|
|
220
|
+
//
|
|
221
|
+
// EXEMPTION (issue #367 part 4): a seal carrying an adjudication is skipped entirely. This audit
|
|
222
|
+
// exists to catch SILENT drift — a stale arm riding a spread, a mis-stamped writer. A ruling is
|
|
223
|
+
// the opposite of silent: loud, attributed, and erase-proof while terminal. It is PERMANENT
|
|
224
|
+
// rather than scoped to the ruling write, because a ruled-but-scarred record has to stay
|
|
225
|
+
// writable afterwards; exempting only the ruling write would wedge the record one write later.
|
|
226
|
+
//
|
|
227
|
+
// NAMED BLINDNESS, beside the abandoned-marker one: prose drift on an already-adjudicated record
|
|
228
|
+
// is unwatched here AND at the migrate audit, which short-circuits ruled records too. Accepted —
|
|
229
|
+
// the ruling supersedes prose by contract, and store-level tampering is outside this threat
|
|
230
|
+
// model. A fabricated ruling is not silent: it names who made it and when.
|
|
231
|
+
if (next.terminal_state === true &&
|
|
232
|
+
next.sealed_by !== undefined &&
|
|
233
|
+
next.sealed_by.adjudicated === undefined) {
|
|
234
|
+
const { sealed_by: _stamp, ...sansStamp } = next;
|
|
235
|
+
const classified = classifyForCoherence(sansStamp);
|
|
236
|
+
if (classified !== undefined && armToPhase(classified) !== armToPhase(next.sealed_by.arm)) {
|
|
237
|
+
throw new WorkflowError(`Run '${next.id}' seal arm '${next.sealed_by.arm}' (phase ` +
|
|
238
|
+
`'${armToPhase(next.sealed_by.arm)}') disagrees with the record's own markers/prose ` +
|
|
239
|
+
`(classify: '${classified}', phase '${armToPhase(classified)}') — stale or mis-stamped arm`, {
|
|
240
|
+
code: 'STATE_SEAL_INCOHERENT',
|
|
241
|
+
category: 'STATE',
|
|
242
|
+
agentAction: 'report_to_user',
|
|
243
|
+
retryable: false,
|
|
244
|
+
details: { runId: next.id, arm: next.sealed_by.arm, classified_arm: classified },
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
//# sourceMappingURL=seal-integrity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"seal-integrity.js","sourceRoot":"","sources":["../../src/store/seal-integrity.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAE5E;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAAC,MAAiB,EAAE,IAAe;IACpE,gGAAgG;IAChG,6FAA6F;IAC7F,IACE,MAAM,CAAC,cAAc,KAAK,IAAI;QAC9B,IAAI,CAAC,cAAc,KAAK,IAAI;QAC5B,IAAI,CAAC,SAAS,KAAK,SAAS,EAC5B,CAAC;QACD,MAAM,IAAI,aAAa,CACrB,QAAQ,IAAI,CAAC,EAAE,yEAAyE;YACtF,+BAA+B,EACjC;YACE,IAAI,EAAE,sBAAsB;YAC5B,QAAQ,EAAE,OAAO;YACjB,WAAW,EAAE,gBAAgB;YAC7B,SAAS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;IACF,iGAAiG;IACjG,gGAAgG;IAChG,4FAA4F;IAC5F,yFAAyF;IACzF,+FAA+F;IAC/F,EAAE;IACF,iGAAiG;IACjG,iGAAiG;IACjG,4FAA4F;IAC5F,2EAA2E;IAC3E,IACE,IAAI,CAAC,cAAc,KAAK,IAAI;QAC5B,IAAI,CAAC,SAAS,KAAK,SAAS;QAC5B,IAAI,CAAC,SAAS,CAAC,WAAW,KAAK,SAAS,EACxC,CAAC;QACD,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,SAAS,EAAE,GAAG,IAAI,CAAC;QACjD,MAAM,UAAU,GAAG,oBAAoB,CAAC,SAAS,CAAC,CAAC;QACnD,IAAI,UAAU,KAAK,SAAS,IAAI,UAAU,CAAC,UAAU,CAAC,KAAK,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC;YAC1F,MAAM,IAAI,aAAa,CACrB,QAAQ,IAAI,CAAC,EAAE,eAAe,IAAI,CAAC,SAAS,CAAC,GAAG,WAAW;gBACzD,IAAI,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,mDAAmD;gBACrF,eAAe,UAAU,aAAa,UAAU,CAAC,UAAU,CAAC,+BAA+B,EAC7F;gBACE,IAAI,EAAE,uBAAuB;gBAC7B,QAAQ,EAAE,OAAO;gBACjB,WAAW,EAAE,gBAAgB;gBAC7B,SAAS,EAAE,KAAK;gBAChB,OAAO,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,EAAE,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,cAAc,EAAE,UAAU,EAAE;aACjF,CACF,CAAC;QACJ,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RunRecord } from '../types/run-record.js';
|
|
1
|
+
import type { RunRecord, SealedBy } from '../types/run-record.js';
|
|
2
2
|
import type { WorkflowDefinition } from '../types/workflow-definition.js';
|
|
3
3
|
import type { SettlementDelta, SettlementResult } from '../types/settlement.js';
|
|
4
4
|
/**
|
|
@@ -43,7 +43,7 @@ import type { SettlementDelta, SettlementResult } from '../types/settlement.js';
|
|
|
43
43
|
* bumping it forces every full-set-declaring store's own fidelity TCK to grow two new cases at
|
|
44
44
|
* the SAME compile, so a store cannot silently drift out of sync with what settleStep needs.
|
|
45
45
|
*/
|
|
46
|
-
export type LoadBearingRunRecordField = 'capability_blocks' | 'workflow_context_snapshots' | 'extension_identity' | 'validation_rejections' | 'defaulted_steps' | 'settled' | 'finalizer_ledger';
|
|
46
|
+
export type LoadBearingRunRecordField = 'capability_blocks' | 'workflow_context_snapshots' | 'extension_identity' | 'validation_rejections' | 'defaulted_steps' | 'settled' | 'finalizer_ledger' | 'sealed_by';
|
|
47
47
|
export interface CreateRunOptions {
|
|
48
48
|
workflowId: string;
|
|
49
49
|
workflowVersion: number;
|
|
@@ -178,5 +178,50 @@ export interface RunStore {
|
|
|
178
178
|
settleStep?(runId: string, delta: SettlementDelta, definition: WorkflowDefinition, options?: {
|
|
179
179
|
now?: Date;
|
|
180
180
|
}): Promise<SettlementResult>;
|
|
181
|
+
/**
|
|
182
|
+
* Issue #367 (part 3): write a `sealed_by` stamp onto an ALREADY-TERMINAL record — the migration
|
|
183
|
+
* vehicle's only write verb. Optional and dormant, exactly like {@link RunStore.settleStep}: a
|
|
184
|
+
* store that does not declare it is refused by `realm run migrate --stamp-seals`, with a pointer
|
|
185
|
+
* to its own tooling, rather than silently doing nothing.
|
|
186
|
+
*
|
|
187
|
+
* Four checks, in this order:
|
|
188
|
+
*
|
|
189
|
+
* 1. `expectedVersion` must match the stored version, or it THROWS `STATE_SNAPSHOT_MISMATCH` —
|
|
190
|
+
* `update()`-parity. A version move means someone else wrote while the sweep was reading, and
|
|
191
|
+
* the sweep's classification was made against a record that no longer exists.
|
|
192
|
+
* 2. An already-stamped record RETURNS `{stamped: false, reason: 'already_stamped'}`.
|
|
193
|
+
* 3. A non-terminal record RETURNS `{stamped: false, reason: 'not_terminal'}`.
|
|
194
|
+
* 4. Anything else is a real write, and the store's own seal-integrity boundary runs on it like
|
|
195
|
+
* on any other tail — so an incoherent stamp is refused there too.
|
|
196
|
+
*
|
|
197
|
+
* **Predicate refusals RETURN; infra THROWS** — the same rule stated for `settleStep` above. A
|
|
198
|
+
* record that is already stamped is not an exceptional condition.
|
|
199
|
+
*
|
|
200
|
+
* **`updated_at` is BYTE-PRESERVED, and `version` is bumped.** That split is the whole reason
|
|
201
|
+
* this verb exists instead of a plain `update()`. The two clocks have disjoint consumers:
|
|
202
|
+
* `version` is read only by the CAS protocol, `updated_at` only by retention, sorting and
|
|
203
|
+
* display. Preserving BOTH makes the stamp silently erasable — a writer holding a pre-stamp
|
|
204
|
+
* snapshot passes the CAS and wipes it (executed). Preserving NEITHER resets the retention
|
|
205
|
+
* clock on every record it touches, which is precisely the harm `gc --heal` causes and this
|
|
206
|
+
* vehicle exists to avoid. Stamping is not activity.
|
|
207
|
+
*
|
|
208
|
+
* `run_phase` is re-derived in the same write, like every other write tail. For the startup-death
|
|
209
|
+
* population whose derived phase MOVED with #367, that is the clock-preserving materialisation
|
|
210
|
+
* `--heal` cannot do.
|
|
211
|
+
*/
|
|
212
|
+
stampSeal?(runId: string, sealedBy: SealedBy, expectedVersion: number): Promise<StampSealResult>;
|
|
181
213
|
}
|
|
214
|
+
/**
|
|
215
|
+
* Issue #367 (part 3): the outcome of a {@link RunStore.stampSeal} attempt. Both refusal reasons
|
|
216
|
+
* are PREDICATE outcomes, returned rather than thrown, and both carry the record as it stands so
|
|
217
|
+
* the caller can report on it without a second read.
|
|
218
|
+
*/
|
|
219
|
+
export type StampSealResult = {
|
|
220
|
+
stamped: true;
|
|
221
|
+
run: RunRecord;
|
|
222
|
+
} | {
|
|
223
|
+
stamped: false;
|
|
224
|
+
reason: 'already_stamped' | 'not_terminal';
|
|
225
|
+
run: RunRecord;
|
|
226
|
+
};
|
|
182
227
|
//# sourceMappingURL=store-interface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store-interface.d.ts","sourceRoot":"","sources":["../../src/store/store-interface.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"store-interface.d.ts","sourceRoot":"","sources":["../../src/store/store-interface.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAEhF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,MAAM,MAAM,yBAAyB,GACjC,mBAAmB,GACnB,4BAA4B,GAC5B,oBAAoB,GACpB,uBAAuB,GACvB,iBAAiB,GACjB,SAAS,GACT,kBAAkB,GAIlB,WAAW,CAAC;AAEhB,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,gIAAgI;IAChI,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,sEAAsE;IACtE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;;;OAOG;IACH,eAAe,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,iBAAiB,GAAG,OAAO,CAAC;IACnE;;;;OAIG;IACH,WAAW,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC;CACvC;AAED,MAAM,WAAW,QAAQ;IACvB;;;;;;;OAOG;IACH,cAAc,EAAE,OAAO,CAAC;IAExB;;;;;;;;;;;;;;;OAeG;IACH,QAAQ,CAAC,wBAAwB,CAAC,EAAE,WAAW,CAAC,yBAAyB,CAA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G,EAAE,SAAS,CAAA;CAAE,CAAC"}
|
|
@@ -576,6 +576,92 @@ export type SkipDetail = {
|
|
|
576
576
|
kind: 'gate_expired';
|
|
577
577
|
gate_id: string;
|
|
578
578
|
};
|
|
579
|
+
/**
|
|
580
|
+
* Issue #367: the closed, runtime-visible seal-arm vocabulary — the source of truth for
|
|
581
|
+
* {@link SealArm} (the `VALID_PHASES` pattern: the const array is the runtime enumeration, the
|
|
582
|
+
* type derives from it). One value per terminal seal-site function-branch in the 21-path census.
|
|
583
|
+
*
|
|
584
|
+
* APPEND-ONLY (the Tekton lesson, design rev 3 §3): an arm's meaning never changes; changed seal
|
|
585
|
+
* behaviour mints a NEW arm. That rule is what keeps every stored `sealed_by.arm` decodable
|
|
586
|
+
* forever, and what makes a future #378 resolution land as a mapping/arm ADDITION rather than as
|
|
587
|
+
* a rewrite of stored records.
|
|
588
|
+
*/
|
|
589
|
+
export declare const SEAL_ARMS: readonly ["complete", "gate_resolution_complete", "guard_pass_complete", "gate_expiry_default", "step_failure", "guard_resolution_error", "spawn_failure", "extensions_load_failure", "handler_abort", "guard_abort", "gate_expiry_abort", "abandon_requested", "cleanup_sweep"];
|
|
590
|
+
/**
|
|
591
|
+
* Issue #367: the MECHANICAL identity of the code edge that sealed a run. Never a judgement about
|
|
592
|
+
* whether the run was good or bad: `arm -> RunPhase` and `arm -> outcome` are engine-owned total
|
|
593
|
+
* functions over this value (`eligibility.ts`) — changing either changes a JUDGEMENT; it never
|
|
594
|
+
* moves a stored record.
|
|
595
|
+
*/
|
|
596
|
+
export type SealArm = (typeof SEAL_ARMS)[number];
|
|
597
|
+
/**
|
|
598
|
+
* Issue #367: who sealed this run — the recorded FACT `deriveRunPhase` prefers over every marker
|
|
599
|
+
* and over the terminal-reason prose.
|
|
600
|
+
*/
|
|
601
|
+
export interface SealedBy {
|
|
602
|
+
arm: SealArm;
|
|
603
|
+
/**
|
|
604
|
+
* The step whose settlement closed the run. ABSENT (never an `''` sentinel — a fabricated value
|
|
605
|
+
* violates the false-attestation doctrine) for the run-scoped arms (`abandon_requested`,
|
|
606
|
+
* `cleanup_sweep`, `spawn_failure`, `extensions_load_failure`) and for any stamp whose step is
|
|
607
|
+
* unknowable.
|
|
608
|
+
*/
|
|
609
|
+
step?: string;
|
|
610
|
+
/**
|
|
611
|
+
* Provenance: set by the MIGRATE VEHICLE only (`realm run migrate --stamp-seals`), NEVER by a
|
|
612
|
+
* seal-site writer — a classifier-minted stamp must stay distinguishable from a writer-asserted
|
|
613
|
+
* one forever. Absent on every fresh seal; present on every record the vehicle stamped.
|
|
614
|
+
*/
|
|
615
|
+
classified?: true;
|
|
616
|
+
/**
|
|
617
|
+
* Issue #367: the record of a HUMAN RULING on this run's arm — and the only lawful way an arm
|
|
618
|
+
* changes while the run is terminal. Every other rewrite is refused (`STATE_SEAL_REWRITTEN`),
|
|
619
|
+
* because re-attributing what sealed a run is the silent re-attribution this design exists to
|
|
620
|
+
* end.
|
|
621
|
+
*
|
|
622
|
+
* This provenance IS the key that opens that refusal, so it is held to the same standard as the
|
|
623
|
+
* fact it explains: `previous_arm` must truthfully name the arm being overwritten, and a write
|
|
624
|
+
* whose `previous_arm` lies is refused exactly as hard as one carrying no provenance at all.
|
|
625
|
+
*
|
|
626
|
+
* A truthful SAME-arm adjudication is lawful and meaningful — it is the "I looked at this and
|
|
627
|
+
* ruled it stays as it is" acknowledgment, which is how a parked record that turns out to be
|
|
628
|
+
* correctly stamped gets closed out rather than re-examined forever.
|
|
629
|
+
*
|
|
630
|
+
* **A ruling SUPERSEDES the record's own prose.** The coherence audit exists to catch SILENT
|
|
631
|
+
* drift; a ruling is none of those things — it is loud, attributed, and erase-proof while
|
|
632
|
+
* terminal — so a seal carrying one is exempt from that audit permanently, not just on the write
|
|
633
|
+
* that records it. The prose is NEVER rewritten to match: it is historical evidence of what the
|
|
634
|
+
* engine said at the time, and the ruling resolves the disagreement without falsifying it.
|
|
635
|
+
*
|
|
636
|
+
* ONE SLOT, and the loss is deliberate: a second ruling overwrites the first. The chain stays
|
|
637
|
+
* one-step-walkable because `previous_arm` is enforced truthful, and a full ruling history is
|
|
638
|
+
* machinery with no customer today. Like the arm itself, this field is erase-proof WHILE
|
|
639
|
+
* TERMINAL — and that scope is the whole claim: resuming a run lawfully voids the seal, and the
|
|
640
|
+
* ruling goes with it, because the sealed state it ruled on no longer exists. Resume discloses
|
|
641
|
+
* that rather than doing it silently.
|
|
642
|
+
*
|
|
643
|
+
* Nothing in the engine writes it. The operator verb that will is boarded on #367; this contract
|
|
644
|
+
* ships with the major so that law never has to be loosened afterwards.
|
|
645
|
+
*/
|
|
646
|
+
adjudicated?: {
|
|
647
|
+
/** Who ruled — the operator identity as given. Never fabricated, never defaulted. */
|
|
648
|
+
by: string;
|
|
649
|
+
/** ISO-8601 timestamp of the ruling. */
|
|
650
|
+
at: string;
|
|
651
|
+
/**
|
|
652
|
+
* The arm this ruling overwrote, enforced truthful at the store boundary.
|
|
653
|
+
*
|
|
654
|
+
* `null` is the truthful statement "no arm existed before this ruling" — an operator's FIRST
|
|
655
|
+
* stamp of a parked record the classifier refused to place. It is not a wildcard: `null` on a
|
|
656
|
+
* record that HAD an arm is a lie, and the boundary refuses it exactly like any other lie. It
|
|
657
|
+
* is lawful only on a record that was ALREADY terminal; a live run's first seal can never have
|
|
658
|
+
* been adjudicated.
|
|
659
|
+
*/
|
|
660
|
+
previous_arm: SealArm | null;
|
|
661
|
+
/** The operator's stated reason, verbatim. */
|
|
662
|
+
reason?: string;
|
|
663
|
+
};
|
|
664
|
+
}
|
|
579
665
|
export interface RunRecord {
|
|
580
666
|
id: string;
|
|
581
667
|
workflow_id: string;
|
|
@@ -623,7 +709,10 @@ export interface RunRecord {
|
|
|
623
709
|
capability_blocks?: Record<string, CapabilityBlock>;
|
|
624
710
|
/**
|
|
625
711
|
* Derived convenience field — set by the engine on every write, read by CLI and get_run_state.
|
|
626
|
-
*
|
|
712
|
+
* NEVER an input to control flow: re-derive with `deriveRunPhase` rather than reading this
|
|
713
|
+
* (issue #279's PHASE_IS_GENERATED law; a persisted value can be stale).
|
|
714
|
+
* Issue #367: the derivation's FIRST input is now `sealed_by.arm`; the four step sets,
|
|
715
|
+
* `terminal_state`, `pending_gate` and the markers serve the legacy population beneath it.
|
|
627
716
|
*/
|
|
628
717
|
run_phase: RunPhase;
|
|
629
718
|
version: number;
|
|
@@ -656,12 +745,38 @@ export interface RunRecord {
|
|
|
656
745
|
created_at: string;
|
|
657
746
|
updated_at: string;
|
|
658
747
|
terminal_state: boolean;
|
|
748
|
+
/**
|
|
749
|
+
* The run's one-line cause, as a HUMAN SENTENCE — rendered from what the sealing writer knew,
|
|
750
|
+
* for an operator to read. Issue #367: on records carrying {@link RunRecord.sealed_by} it is no
|
|
751
|
+
* longer a machine oracle; `deriveRunPhase` reads the arm. It stays the oracle for the legacy
|
|
752
|
+
* population only, via `classifyLegacySeal`, and every new consumer should key on the arm.
|
|
753
|
+
* Multi-failure runs list every failed step (issue #373).
|
|
754
|
+
*/
|
|
659
755
|
terminal_reason?: string;
|
|
756
|
+
/**
|
|
757
|
+
* Issue #367: which arm of the engine sealed this run — the recorded fact `deriveRunPhase`
|
|
758
|
+
* derives from FIRST, ahead of the markers and the terminal-reason prose (which are asserted
|
|
759
|
+
* congruent, not consulted, once a stamp exists). FLAT OPTIONAL: written in the SAME object
|
|
760
|
+
* literal as the `terminal_state: true` flip by every seal site; stripped in the same write by
|
|
761
|
+
* every resume/re-drive path; enforced at the store boundary (`assertSealIntegrity` — see the
|
|
762
|
+
* `STATE_SEAL_*` codes), never by the type system (a deleted writer stamp is 0 type errors —
|
|
763
|
+
* the dead-end class two earlier revisions died on). Absent on every record written before
|
|
764
|
+
* #367 — `classifyLegacySeal` is the permanent read oracle for those, so correctness never
|
|
765
|
+
* depends on a migration having run.
|
|
766
|
+
*
|
|
767
|
+
* The vocabulary is APPEND-ONLY (see {@link SEAL_ARMS}).
|
|
768
|
+
*
|
|
769
|
+
* NOT the finalizer-selection variable: `deriveEffectiveTriggers` remains `mintOutcome`-driven
|
|
770
|
+
* and the two may diverge by design.
|
|
771
|
+
*/
|
|
772
|
+
sealed_by?: SealedBy;
|
|
660
773
|
pending_gate?: PendingGate;
|
|
661
774
|
/**
|
|
662
|
-
* Set by the engine when a guard step fires. Contains the name of the guard step
|
|
663
|
-
*
|
|
664
|
-
*
|
|
775
|
+
* Set by the engine when a guard step fires. Contains the name of the guard step that caused
|
|
776
|
+
* the abort and its evaluated conditions, and is surfaced by get_run_state. Issue #367: it is
|
|
777
|
+
* ASSERTED CONGRUENT with `sealed_by` by the transforms (`SEAL_MARKERS_AGREE`) rather than read
|
|
778
|
+
* by `deriveRunPhase` — on a stamped record the arm derives the phase; on the legacy population
|
|
779
|
+
* this marker is still a derivation input via `classifyLegacySeal` and the ladder beneath it.
|
|
665
780
|
*/
|
|
666
781
|
aborted_at?: {
|
|
667
782
|
step_id: string;
|
|
@@ -674,8 +789,10 @@ export interface RunRecord {
|
|
|
674
789
|
};
|
|
675
790
|
/**
|
|
676
791
|
* ISO timestamp set when a run is explicitly abandoned via `abandon_run` / `realm run abandon` /
|
|
677
|
-
* `realm run cleanup`.
|
|
678
|
-
*
|
|
792
|
+
* `realm run cleanup`. Issue #367: ASSERTED CONGRUENT with `sealed_by` by the transforms
|
|
793
|
+
* (`SEAL_MARKERS_AGREE`), not read by `deriveRunPhase` on a stamped record — the arm derives
|
|
794
|
+
* there. On the legacy population its presence still makes `abandoned` the derived phase
|
|
795
|
+
* regardless of `failed_steps` / `terminal_reason` (mirrors `aborted_at`).
|
|
679
796
|
*/
|
|
680
797
|
abandoned_at?: string;
|
|
681
798
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-record.d.ts","sourceRoot":"","sources":["../../src/types/run-record.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACtE,OA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E,MAAM,CACvB,MAAM,EACN;QACE,MAAM,EAAE,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,QAAQ,CAAC;QACtD,IAAI,EAAE,MAAM,CAAC;QACb,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CACF,CAAC;CACH"}
|
package/dist/types/run-record.js
CHANGED
|
@@ -1,2 +1,26 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Issue #367: the closed, runtime-visible seal-arm vocabulary — the source of truth for
|
|
3
|
+
* {@link SealArm} (the `VALID_PHASES` pattern: the const array is the runtime enumeration, the
|
|
4
|
+
* type derives from it). One value per terminal seal-site function-branch in the 21-path census.
|
|
5
|
+
*
|
|
6
|
+
* APPEND-ONLY (the Tekton lesson, design rev 3 §3): an arm's meaning never changes; changed seal
|
|
7
|
+
* behaviour mints a NEW arm. That rule is what keeps every stored `sealed_by.arm` decodable
|
|
8
|
+
* forever, and what makes a future #378 resolution land as a mapping/arm ADDITION rather than as
|
|
9
|
+
* a rewrite of stored records.
|
|
10
|
+
*/
|
|
11
|
+
export const SEAL_ARMS = [
|
|
12
|
+
'complete',
|
|
13
|
+
'gate_resolution_complete',
|
|
14
|
+
'guard_pass_complete',
|
|
15
|
+
'gate_expiry_default',
|
|
16
|
+
'step_failure',
|
|
17
|
+
'guard_resolution_error',
|
|
18
|
+
'spawn_failure',
|
|
19
|
+
'extensions_load_failure',
|
|
20
|
+
'handler_abort',
|
|
21
|
+
'guard_abort',
|
|
22
|
+
'gate_expiry_abort',
|
|
23
|
+
'abandon_requested',
|
|
24
|
+
'cleanup_sweep',
|
|
25
|
+
];
|
|
2
26
|
//# sourceMappingURL=run-record.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-record.js","sourceRoot":"","sources":["../../src/types/run-record.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"run-record.js","sourceRoot":"","sources":["../../src/types/run-record.ts"],"names":[],"mappings":"AAglBA;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,UAAU;IACV,0BAA0B;IAC1B,qBAAqB;IACrB,qBAAqB;IACrB,cAAc;IACd,wBAAwB;IACxB,eAAe;IACf,yBAAyB;IACzB,eAAe;IACf,aAAa;IACb,mBAAmB;IACnB,mBAAmB;IACnB,eAAe;CACP,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export type ErrorCategory = 'NETWORK' | 'SERVICE' | 'STATE' | 'VALIDATION' | 'ENGINE' | 'RESOURCE';
|
|
2
2
|
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' | 'STEP_NOT_FOUND' | 'GUARD_RESOLUTION_ERROR' | 'INPUT_MAP_DEPTH_EXCEEDED' | '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';
|
|
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
4
|
export interface WorkflowErrorOptions {
|
|
5
5
|
code: ErrorCode;
|
|
6
6
|
category: ErrorCategory;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-error.d.ts","sourceRoot":"","sources":["../../src/types/workflow-error.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,YAAY,GAAG,QAAQ,GAAG,UAAU,CAAC;AAEnG,MAAM,MAAM,WAAW,GACnB,gBAAgB,GAChB,eAAe,GACf,sBAAsB,GACtB,MAAM,GACN,gBAAgB,GAChB,kBAAkB,CAAC;AAEvB,MAAM,MAAM,SAAS,GAEjB,iBAAiB,GACjB,qBAAqB,GACrB,oBAAoB,GACpB,0BAA0B,GAE1B,kBAAkB,GAClB,kBAAkB,GAClB,sBAAsB,GACtB,qBAAqB,GACrB,mBAAmB,GACnB,0BAA0B,GAE1B,6BAA6B,GAE7B,eAAe,GACf,2BAA2B,GAC3B,qBAAqB,GACrB,0BAA0B,GAC1B,oBAAoB,GACpB,yBAAyB,GACzB,kBAAkB,GAIlB,gBAAgB,GAChB,yBAAyB,GAMzB,uBAAuB,GACvB,qBAAqB,GACrB,4BAA4B,GAC5B,yBAAyB,GAKzB,4BAA4B,GAG5B,kBAAkB,GAClB,oBAAoB,GACpB,0BAA0B,GAC1B,4BAA4B,GAC5B,cAAc,GAEd,yBAAyB,GACzB,0BAA0B,GAC1B,yBAAyB,GAIzB,sBAAsB,GACtB,4BAA4B,GAC5B,0BAA0B,GAC1B,4BAA4B,GAC5B,0BAA0B,GAC1B,2BAA2B,GAC3B,wBAAwB,GACxB,4BAA4B,GAC5B,wBAAwB,GACxB,oBAAoB,GAEpB,iBAAiB,GACjB,qBAAqB,GAIrB,+BAA+B,GAC/B,uBAAuB,GACvB,+BAA+B,GAC/B,yBAAyB,GACzB,uBAAuB,GACvB,+BAA+B,GAC/B,oBAAoB,GACpB,yBAAyB,GACzB,2BAA2B,GAC3B,gBAAgB,GAChB,wBAAwB,GACxB,2BAA2B,GAC3B,wBAAwB,GACxB,cAAc,GACd,cAAc,GACd,sBAAsB,GACtB,oBAAoB,
|
|
1
|
+
{"version":3,"file":"workflow-error.d.ts","sourceRoot":"","sources":["../../src/types/workflow-error.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,YAAY,GAAG,QAAQ,GAAG,UAAU,CAAC;AAEnG,MAAM,MAAM,WAAW,GACnB,gBAAgB,GAChB,eAAe,GACf,sBAAsB,GACtB,MAAM,GACN,gBAAgB,GAChB,kBAAkB,CAAC;AAEvB,MAAM,MAAM,SAAS,GAEjB,iBAAiB,GACjB,qBAAqB,GACrB,oBAAoB,GACpB,0BAA0B,GAE1B,kBAAkB,GAClB,kBAAkB,GAClB,sBAAsB,GACtB,qBAAqB,GACrB,mBAAmB,GACnB,0BAA0B,GAE1B,6BA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MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,qBAAa,aAAc,SAAQ,KAAK;IACtC,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC;IACjC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAClC,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC1C,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;gBAElB,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,oBAAoB;CAa3D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-error.js","sourceRoot":"","sources":["../../src/types/workflow-error.ts"],"names":[],"mappings":"AAAA,kEAAkE;
|
|
1
|
+
{"version":3,"file":"workflow-error.js","sourceRoot":"","sources":["../../src/types/workflow-error.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAoLlE,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;IAE9B,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;IAChF,CAAC;CACF"}
|