@telora/daemon 0.20.78 → 0.20.89
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/build-info.json +2 -2
- package/dist/ai-inspection-context.d.ts.map +1 -1
- package/dist/ai-inspection-context.js +4 -2
- package/dist/ai-inspection-context.js.map +1 -1
- package/dist/audit-prompt.d.ts.map +1 -1
- package/dist/audit-prompt.js +9 -5
- package/dist/audit-prompt.js.map +1 -1
- package/dist/completion/completion-decision.d.ts +3 -29
- package/dist/completion/completion-decision.d.ts.map +1 -1
- package/dist/completion/completion-decision.js +3 -15
- package/dist/completion/completion-decision.js.map +1 -1
- package/dist/completion/event-phases.d.ts +0 -8
- package/dist/completion/event-phases.d.ts.map +1 -1
- package/dist/completion/event-phases.js +4 -52
- package/dist/completion/event-phases.js.map +1 -1
- package/dist/completion/event.d.ts +1 -11
- package/dist/completion/event.d.ts.map +1 -1
- package/dist/completion/event.js +1 -3
- package/dist/completion/event.js.map +1 -1
- package/dist/delivery-artifacts.d.ts.map +1 -1
- package/dist/delivery-artifacts.js +9 -8
- package/dist/delivery-artifacts.js.map +1 -1
- package/dist/prompt-sections/execution-sections.d.ts.map +1 -1
- package/dist/prompt-sections/execution-sections.js +44 -3
- package/dist/prompt-sections/execution-sections.js.map +1 -1
- package/dist/prompt-sections/scoping-sections.d.ts.map +1 -1
- package/dist/prompt-sections/scoping-sections.js +8 -0
- package/dist/prompt-sections/scoping-sections.js.map +1 -1
- package/dist/queries/deliveries.d.ts +20 -153
- package/dist/queries/deliveries.d.ts.map +1 -1
- package/dist/queries/deliveries.js +26 -0
- package/dist/queries/deliveries.js.map +1 -1
- package/dist/queries/delivery-gate-state.d.ts +192 -0
- package/dist/queries/delivery-gate-state.d.ts.map +1 -0
- package/dist/queries/delivery-gate-state.js +23 -0
- package/dist/queries/delivery-gate-state.js.map +1 -0
- package/dist/queries/holds.d.ts +52 -59
- package/dist/queries/holds.d.ts.map +1 -1
- package/dist/queries/holds.js +60 -68
- package/dist/queries/holds.js.map +1 -1
- package/dist/queries/issues.d.ts +2 -2
- package/dist/queries/issues.d.ts.map +1 -1
- package/dist/queries/issues.js +2 -2
- package/dist/queries/issues.js.map +1 -1
- package/dist/reality-pole.d.ts +5 -3
- package/dist/reality-pole.d.ts.map +1 -1
- package/dist/reality-pole.js +13 -4
- package/dist/reality-pole.js.map +1 -1
- package/dist/resolvers/git-diff-against-base.d.ts.map +1 -1
- package/dist/resolvers/git-diff-against-base.js +12 -5
- package/dist/resolvers/git-diff-against-base.js.map +1 -1
- package/dist/resolvers/index.d.ts +1 -1
- package/dist/resolvers/index.d.ts.map +1 -1
- package/dist/resolvers/index.js +1 -1
- package/dist/resolvers/index.js.map +1 -1
- package/dist/resolvers/shared/git-diff.d.ts +147 -26
- package/dist/resolvers/shared/git-diff.d.ts.map +1 -1
- package/dist/resolvers/shared/git-diff.js +275 -35
- package/dist/resolvers/shared/git-diff.js.map +1 -1
- package/dist/templates/claude-md.d.ts +1 -1
- package/dist/templates/claude-md.d.ts.map +1 -1
- package/dist/templates/claude-md.js +20 -0
- package/dist/templates/claude-md.js.map +1 -1
- package/dist/verification-deps.d.ts +151 -0
- package/dist/verification-deps.d.ts.map +1 -0
- package/dist/verification-deps.js +19 -0
- package/dist/verification-deps.js.map +1 -0
- package/dist/verification-engine.d.ts +10 -112
- package/dist/verification-engine.d.ts.map +1 -1
- package/dist/verification-engine.js +84 -30
- package/dist/verification-engine.js.map +1 -1
- package/dist/verification-evidence.d.ts +33 -1
- package/dist/verification-evidence.d.ts.map +1 -1
- package/dist/verification-evidence.js +55 -13
- package/dist/verification-evidence.js.map +1 -1
- package/dist/verification-feedback.d.ts +31 -27
- package/dist/verification-feedback.d.ts.map +1 -1
- package/dist/verification-feedback.js +76 -85
- package/dist/verification-feedback.js.map +1 -1
- package/dist/verify-restatement.d.ts +12 -9
- package/dist/verify-restatement.d.ts.map +1 -1
- package/dist/verify-restatement.js +11 -9
- package/dist/verify-restatement.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The shape of `org_nodes.gate_state` on a delivery row, plus the per-origin
|
|
3
|
+
* detail records that hang off it.
|
|
4
|
+
*
|
|
5
|
+
* Split out of `queries/deliveries.ts` (which holds the API calls) because these
|
|
6
|
+
* are the vocabulary of the verify gate, not of any one query: the verification
|
|
7
|
+
* engine, the feedback/re-work path, the operator- and external-hold gates, and
|
|
8
|
+
* the stall detectors all read and write them. Keeping them here lets those
|
|
9
|
+
* modules depend on the gate's vocabulary without pulling in the query layer.
|
|
10
|
+
*
|
|
11
|
+
* The one rule that shapes every type below: each way the gate can hold a
|
|
12
|
+
* delivery gets its OWN key. A shell-command failure (`verification`), a
|
|
13
|
+
* declared-vs-achieved gap (`shortfallReconciliation`), an unvouchable evidence
|
|
14
|
+
* bundle (`evidenceUnavailable`), an operator hold, and an external dependency
|
|
15
|
+
* are distinct facts about distinct things, and a reader must be able to tell
|
|
16
|
+
* "the gate was blind" from "the work fell short" without inspecting fields.
|
|
17
|
+
*
|
|
18
|
+
* Re-exported from `queries/deliveries.ts`, so both import paths resolve.
|
|
19
|
+
*
|
|
20
|
+
* @module queries/delivery-gate-state
|
|
21
|
+
*/
|
|
22
|
+
/**
|
|
23
|
+
* Detail attached to gate_state when a daemon-side deterministic verification
|
|
24
|
+
* run fails. Carries the failing-test names (parsed from the run output) and a
|
|
25
|
+
* pointer to the persistent full-log file so the feedback loop -- dashboard
|
|
26
|
+
* "Waiting on", live-session inject, and the requeue/respawn prompt -- can
|
|
27
|
+
* surface WHAT failed and WHERE to read it, without a cold re-run.
|
|
28
|
+
*/
|
|
29
|
+
export interface VerificationFailureDetail {
|
|
30
|
+
/**
|
|
31
|
+
* Failing-test ids that GATE this delivery. When baseline-diff attribution ran,
|
|
32
|
+
* these are the NEW failures the focus introduced; otherwise all parsed failures.
|
|
33
|
+
*/
|
|
34
|
+
failingTests: string[];
|
|
35
|
+
/**
|
|
36
|
+
* Failing tests that pre-exist on the focus base -- recorded, non-blocking
|
|
37
|
+
* (they do not gate the focus). Absent when attribution did not run.
|
|
38
|
+
*/
|
|
39
|
+
preExisting?: string[];
|
|
40
|
+
/** Absolute path to the persistent full-log file, or null when none was written. */
|
|
41
|
+
logPath: string | null;
|
|
42
|
+
/** Process exit code of the failed run, or null. */
|
|
43
|
+
exitCode: number | null;
|
|
44
|
+
/** ISO timestamp of the failing run. */
|
|
45
|
+
failedAt: string;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Detail attached to gate_state when the verify-shortfall RECONCILIATION (not a
|
|
49
|
+
* deterministic shell run) holds the flip: the achieved outcome fell short of
|
|
50
|
+
* the declared desired effect for one or more targeted nodes. Distinct from
|
|
51
|
+
* VerificationFailureDetail on purpose -- a shortfall hold has no exitCode /
|
|
52
|
+
* failingTests (the deterministic check may well have passed), it has a
|
|
53
|
+
* declared-vs-achieved gap. Keeping it under its own key prevents a reader from
|
|
54
|
+
* seeing a passed:false deterministic_verification whose exitCode is 0.
|
|
55
|
+
*/
|
|
56
|
+
export interface ShortfallReconciliationDetail {
|
|
57
|
+
/** ISO timestamp of the reconciliation that held the gate. */
|
|
58
|
+
heldAt: string;
|
|
59
|
+
/** The per-target declared/achieved/reason gaps that withheld the flip. */
|
|
60
|
+
shortfalls: Array<{
|
|
61
|
+
nodeId: string;
|
|
62
|
+
declared: string;
|
|
63
|
+
achieved: string;
|
|
64
|
+
reason: string;
|
|
65
|
+
/** The diff evidence grounding the shortfall, when the judge cited one. */
|
|
66
|
+
diffCitation?: string;
|
|
67
|
+
}>;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Detail attached to gate_state when the verify path could NOT vouch for the
|
|
71
|
+
* evidence it was handed -- an INSTRUMENT FAULT, not a verdict about the work.
|
|
72
|
+
* Two flavours, both BLIND:
|
|
73
|
+
* - EMPTY : no diff / changed-files / inspection finding at all.
|
|
74
|
+
* - INCOMPLETE (half-blind): a non-empty bundle whose resolved diff range does
|
|
75
|
+
* NOT cover the delivery's recorded commit set, so a verdict would judge the
|
|
76
|
+
* work against only part of it. `coverage` is populated in this case.
|
|
77
|
+
* Distinct from VerificationFailureDetail (a shell command failed) and from
|
|
78
|
+
* ShortfallReconciliationDetail (the work fell short of intent): here the
|
|
79
|
+
* reconciliation cannot see the whole delivery, so it must not render any
|
|
80
|
+
* verdict. The delivery is held in `verify` (never routed to verify_failed, so
|
|
81
|
+
* no iteration is consumed) and a first-occurrence escalation names the fault.
|
|
82
|
+
*/
|
|
83
|
+
export interface EvidenceUnavailableDetail {
|
|
84
|
+
/** ISO timestamp the instrument-fault hold was recorded. */
|
|
85
|
+
heldAt: string;
|
|
86
|
+
/** Which evidence slots were empty (named, so the hold describes the fault, not the work). */
|
|
87
|
+
missing: string[];
|
|
88
|
+
/**
|
|
89
|
+
* Commits the delivery branch is ahead of the integration base. 0 => the
|
|
90
|
+
* branch already merged / did no work; > 0 => a broken diff MEASUREMENT
|
|
91
|
+
* (commits present but the diff resolved empty). Carried for operator triage.
|
|
92
|
+
*/
|
|
93
|
+
commitsAhead: number;
|
|
94
|
+
/**
|
|
95
|
+
* Populated for a HALF-BLIND (incomplete) hold: the resolved range covered
|
|
96
|
+
* only `covered` of the delivery's `recorded` commits. Absent for a plain
|
|
97
|
+
* empty-bundle hold, so the empty case is byte-unchanged.
|
|
98
|
+
*/
|
|
99
|
+
coverage?: {
|
|
100
|
+
/** How many commits the durable record (focus_merges.commit_shas) names. */
|
|
101
|
+
recorded: number;
|
|
102
|
+
/** How many of those the resolved diff range actually covered. */
|
|
103
|
+
covered: number;
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Shape written into product_deliveries.gate_state when guard evaluation
|
|
108
|
+
* blocks a stage transition. Cleared (set to null) when guards pass.
|
|
109
|
+
*
|
|
110
|
+
* `verification` is populated when the block is a daemon-side deterministic
|
|
111
|
+
* verification failure (Harness-Owned Delivery Verification), carrying the
|
|
112
|
+
* failing tests + log path for the feedback loop; absent for guard-only gates.
|
|
113
|
+
*
|
|
114
|
+
* `shortfallReconciliation` is populated when the block is a verify-shortfall
|
|
115
|
+
* reconciliation hold (declared-vs-achieved gap), NOT a deterministic run; the
|
|
116
|
+
* two are mutually exclusive origins and never share the deterministic guard.
|
|
117
|
+
*/
|
|
118
|
+
export interface DeliveryGateState {
|
|
119
|
+
blocking: Array<{
|
|
120
|
+
guardName: string;
|
|
121
|
+
passed: boolean;
|
|
122
|
+
}>;
|
|
123
|
+
warnings: Array<{
|
|
124
|
+
guardName: string;
|
|
125
|
+
passed: boolean;
|
|
126
|
+
}>;
|
|
127
|
+
evaluatedAt: string;
|
|
128
|
+
verification?: VerificationFailureDetail;
|
|
129
|
+
shortfallReconciliation?: ShortfallReconciliationDetail;
|
|
130
|
+
/**
|
|
131
|
+
* Populated when the verify path was handed no evidence it could judge the
|
|
132
|
+
* work against (an instrument fault). Kept under its own key -- never
|
|
133
|
+
* conflated with `verification` (a shell failure) or `shortfallReconciliation`
|
|
134
|
+
* (a work shortfall) -- so a reader can tell "the gate was blind" from "the
|
|
135
|
+
* work fell short". The blocking guard is `verify_evidence_unavailable`.
|
|
136
|
+
*/
|
|
137
|
+
evidenceUnavailable?: EvidenceUnavailableDetail;
|
|
138
|
+
/**
|
|
139
|
+
* Undisposed shortfall drift proposal ids holding this delivery in verify.
|
|
140
|
+
*
|
|
141
|
+
* Kept OUT of `blocking` on purpose: that array is guard-verdict data
|
|
142
|
+
* (guardName + passed), and a shortfall hold is not a guard. Synthesizing a
|
|
143
|
+
* fake guardName to smuggle the ids through would make `blocking` lie about
|
|
144
|
+
* what a guard is. `formatGateBlockers` is the single place that merges the
|
|
145
|
+
* two for display.
|
|
146
|
+
*
|
|
147
|
+
* Absent for guard-only gates. Written by the review-exit shortfall hold and
|
|
148
|
+
* cleared, like the rest of gate_state, when the delivery finally routes.
|
|
149
|
+
*/
|
|
150
|
+
shortfallProposalIds?: string[];
|
|
151
|
+
/**
|
|
152
|
+
* The open operator-blocked escalation (disposition needs_operator /
|
|
153
|
+
* external_wait, any kind) holding this delivery in verify. Written by the
|
|
154
|
+
* operator-hold gate (operator-hold.ts) so the board can name what the
|
|
155
|
+
* delivery is waiting on without a second escalation being filed; cleared,
|
|
156
|
+
* like the rest of gate_state, when the delivery finally routes. When the hold
|
|
157
|
+
* read itself failed (fail-closed), escalationId is null and readFailed is
|
|
158
|
+
* true -- the delivery is still held, just without a specific escalation to
|
|
159
|
+
* name. Like shortfallProposalIds, kept OUT of `blocking` (a hold is not a
|
|
160
|
+
* guard verdict).
|
|
161
|
+
*/
|
|
162
|
+
operatorHold?: {
|
|
163
|
+
escalationId: string | null;
|
|
164
|
+
escalationKind: string | null;
|
|
165
|
+
disposition: string | null;
|
|
166
|
+
readFailed?: boolean;
|
|
167
|
+
};
|
|
168
|
+
/**
|
|
169
|
+
* An irreducibly-external dependency holding this delivery in verify, carried
|
|
170
|
+
* as durable STATE rather than an agent_escalations row (external-hold.ts).
|
|
171
|
+
* The blocking condition and what would clear it live here, attached to the
|
|
172
|
+
* delivery they block; the hold clears by re-evaluating that condition (a
|
|
173
|
+
* re-read of reality), not by a human resolving an inbox item. Kept OUT of
|
|
174
|
+
* `blocking` for the same reason as operatorHold/shortfallProposalIds: a hold
|
|
175
|
+
* is not a guard verdict. Cleared, like the rest of gate_state, when the
|
|
176
|
+
* delivery finally routes.
|
|
177
|
+
*/
|
|
178
|
+
externalHold?: ExternalHoldState;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* The durable external-hold state on a delivery's gate_state. Distinct from an
|
|
182
|
+
* agent_escalations row: an external dependency is state, not an inbox event.
|
|
183
|
+
*/
|
|
184
|
+
export interface ExternalHoldState {
|
|
185
|
+
/** What is blocking -- the irreducibly-external dependency. */
|
|
186
|
+
condition: string;
|
|
187
|
+
/** The condition that, when re-read as true, clears the hold. */
|
|
188
|
+
clearsWhen: string;
|
|
189
|
+
/** ISO timestamp the hold was declared. */
|
|
190
|
+
declaredAt: string;
|
|
191
|
+
}
|
|
192
|
+
//# sourceMappingURL=delivery-gate-state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delivery-gate-state.d.ts","sourceRoot":"","sources":["../../src/queries/delivery-gate-state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH;;;;;;GAMG;AACH,MAAM,WAAW,yBAAyB;IACxC;;;OAGG;IACH,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,oFAAoF;IACpF,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,oDAAoD;IACpD,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,wCAAwC;IACxC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,6BAA6B;IAC5C,8DAA8D;IAC9D,MAAM,EAAE,MAAM,CAAC;IACf,2EAA2E;IAC3E,UAAU,EAAE,KAAK,CAAC;QAChB,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC;QACf,2EAA2E;QAC3E,YAAY,CAAC,EAAE,MAAM,CAAC;KACvB,CAAC,CAAC;CACJ;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,yBAAyB;IACxC,4DAA4D;IAC5D,MAAM,EAAE,MAAM,CAAC;IACf,8FAA8F;IAC9F,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB;;;;OAIG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,QAAQ,CAAC,EAAE;QACT,4EAA4E;QAC5E,QAAQ,EAAE,MAAM,CAAC;QACjB,kEAAkE;QAClE,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;CACH;AAED;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,KAAK,CAAC;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IACxD,QAAQ,EAAE,KAAK,CAAC;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IACxD,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,yBAAyB,CAAC;IACzC,uBAAuB,CAAC,EAAE,6BAA6B,CAAC;IACxD;;;;;;OAMG;IACH,mBAAmB,CAAC,EAAE,yBAAyB,CAAC;IAChD;;;;;;;;;;;OAWG;IACH,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAChC;;;;;;;;;;OAUG;IACH,YAAY,CAAC,EAAE;QACb,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;QAC5B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;QAC9B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;QAC3B,UAAU,CAAC,EAAE,OAAO,CAAC;KACtB,CAAC;IACF;;;;;;;;;OASG;IACH,YAAY,CAAC,EAAE,iBAAiB,CAAC;CAClC;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,+DAA+D;IAC/D,SAAS,EAAE,MAAM,CAAC;IAClB,iEAAiE;IACjE,UAAU,EAAE,MAAM,CAAC;IACnB,2CAA2C;IAC3C,UAAU,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The shape of `org_nodes.gate_state` on a delivery row, plus the per-origin
|
|
3
|
+
* detail records that hang off it.
|
|
4
|
+
*
|
|
5
|
+
* Split out of `queries/deliveries.ts` (which holds the API calls) because these
|
|
6
|
+
* are the vocabulary of the verify gate, not of any one query: the verification
|
|
7
|
+
* engine, the feedback/re-work path, the operator- and external-hold gates, and
|
|
8
|
+
* the stall detectors all read and write them. Keeping them here lets those
|
|
9
|
+
* modules depend on the gate's vocabulary without pulling in the query layer.
|
|
10
|
+
*
|
|
11
|
+
* The one rule that shapes every type below: each way the gate can hold a
|
|
12
|
+
* delivery gets its OWN key. A shell-command failure (`verification`), a
|
|
13
|
+
* declared-vs-achieved gap (`shortfallReconciliation`), an unvouchable evidence
|
|
14
|
+
* bundle (`evidenceUnavailable`), an operator hold, and an external dependency
|
|
15
|
+
* are distinct facts about distinct things, and a reader must be able to tell
|
|
16
|
+
* "the gate was blind" from "the work fell short" without inspecting fields.
|
|
17
|
+
*
|
|
18
|
+
* Re-exported from `queries/deliveries.ts`, so both import paths resolve.
|
|
19
|
+
*
|
|
20
|
+
* @module queries/delivery-gate-state
|
|
21
|
+
*/
|
|
22
|
+
export {};
|
|
23
|
+
//# sourceMappingURL=delivery-gate-state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delivery-gate-state.js","sourceRoot":"","sources":["../../src/queries/delivery-gate-state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG"}
|
package/dist/queries/holds.d.ts
CHANGED
|
@@ -11,9 +11,11 @@
|
|
|
11
11
|
* question the daemon reads back to the asking agent. Fails OPEN at its
|
|
12
12
|
* call site.
|
|
13
13
|
*
|
|
14
|
-
* Plus
|
|
15
|
-
* ABOUT a delivery's own cycling,
|
|
16
|
-
*
|
|
14
|
+
* Plus two exclusion families the operator predicate drops: SELF_REPORT_STALL_HOLD_KINDS
|
|
15
|
+
* (machine-filed alarms ABOUT a delivery's own cycling, so an alarm cannot
|
|
16
|
+
* constitute the condition it reports) and REFUSED_OPERATOR_HOLD_KINDS (kinds that
|
|
17
|
+
* name no human-only act -- refused at their filing surface and routed to bounded
|
|
18
|
+
* re-work; a legacy row must not hold a delivery out of done).
|
|
17
19
|
*
|
|
18
20
|
* Extracted from queries/issues.ts to keep that file under the daemon
|
|
19
21
|
* file-size limit -- the self-referential-alarm fix pushed it to 844. Bodies
|
|
@@ -58,28 +60,39 @@ export declare const OPERATOR_HOLD_DISPOSITIONS: readonly string[];
|
|
|
58
60
|
* silence it, and resolving one let the detector file the next on the following
|
|
59
61
|
* tick.
|
|
60
62
|
*
|
|
61
|
-
* ENUMERATION -- every machine-filed, delivery-anchored needs_operator kind,
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
63
|
+
* ENUMERATION -- every machine-filed, delivery-anchored needs_operator kind,
|
|
64
|
+
* tested against ONE governing rule ("A hold must name a human act", 2026-07-28):
|
|
65
|
+
* does the kind name a specific act ONLY a human can perform? A kind that names
|
|
66
|
+
* one is a GENUINE hold and stays. A kind that names none must NOT hold a
|
|
67
|
+
* delivery out of done: it is refused at its filing surface and routed into the
|
|
68
|
+
* machine's own bounded re-work path, and any legacy row is EXCLUDED from this
|
|
69
|
+
* predicate. (This rule GOVERNS -- it supersedes the older fixpoint-only test,
|
|
70
|
+
* which read a kind's legitimacy from its re-arm behaviour; the two disagreed on
|
|
71
|
+
* verify_evidence_unavailable and this rule is the one that wins.) The parallel
|
|
72
|
+
* self-referential-alarm exclusion still applies too: an alarm ABOUT a delivery's
|
|
73
|
+
* own cycling cannot constitute the hold it reports.
|
|
68
74
|
*
|
|
69
75
|
* verify_gate_unclearable (stall-detectors.ts) -- SELF-REFERENTIAL. Trigger
|
|
70
76
|
* (iteration_count) is monotonic and re-arms every tick while non-terminal;
|
|
71
|
-
* silenced only by done/cancelled, which the hold blocks.
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
77
|
+
* silenced only by done/cancelled, which the hold blocks. It IS the sole
|
|
78
|
+
* surviving human residue of the bounded re-work cap, and it names a human
|
|
79
|
+
* act (an operator must decide the unclearable delivery's fate), so it holds
|
|
80
|
+
* -- but it must not hold ITSELF, hence the exclusion below. EXCLUDE from the
|
|
81
|
+
* predicate for its own delivery (SELF_REPORT_STALL_HOLD_KINDS).
|
|
82
|
+
* verify_evidence_unavailable (verification-feedback.ts) -- NAMES NO HUMAN ACT.
|
|
83
|
+
* Its ask was "fix the diff range / confirm the merge / clear the delivery" --
|
|
84
|
+
* the gate reporting its own BLINDNESS, not work an operator must do. As of
|
|
85
|
+
* "A hold must name a human act" it is refused at the filing surface (nothing
|
|
86
|
+
* files it; the empty-bundle path re-enters bounded verify_failed re-work in
|
|
87
|
+
* verification-engine/feedback) and any legacy open row is EXCLUDED here
|
|
88
|
+
* (REFUSED_OPERATOR_HOLD_KINDS) so it cannot hold a delivery out of done.
|
|
89
|
+
* REFUSED + ROUTED, no longer a hold.
|
|
90
|
+
* schema_drift_blocked (listener-auto-advance.ts) -- an operator must apply a
|
|
91
|
+
* migration (a human-only act on external reality). KEEP.
|
|
79
92
|
* advance_blocked (delivery-advance-block.ts) -- dirty worktree / lockfile
|
|
80
|
-
* state an operator or agent must resolve. KEEP.
|
|
93
|
+
* state an operator or agent must resolve on the host. KEEP.
|
|
81
94
|
* cd_push_failed (ci-escalation.ts) / ci_run_red (ci-sensor-loop.ts) --
|
|
82
|
-
* external CI/CD state. KEEP.
|
|
95
|
+
* external CI/CD state a human must act on. KEEP.
|
|
83
96
|
* propagation_stale (staleness-sensor.ts) -- external propagation state. KEEP.
|
|
84
97
|
*
|
|
85
98
|
* (Focus-anchored kinds -- merge_conflict, merge_refused_dirty,
|
|
@@ -94,6 +107,25 @@ export declare const OPERATOR_HOLD_DISPOSITIONS: readonly string[];
|
|
|
94
107
|
* with stall-detectors.VERIFY_GATE_UNCLEARABLE_KIND and the DB CHECK.
|
|
95
108
|
*/
|
|
96
109
|
export declare const SELF_REPORT_STALL_HOLD_KINDS: readonly string[];
|
|
110
|
+
/**
|
|
111
|
+
* escalation_kind discriminators that are REFUSED at their filing surface and
|
|
112
|
+
* routed into the machine's own bounded re-work path because they NAME NO ACT
|
|
113
|
+
* ONLY A HUMAN CAN PERFORM ("A hold must name a human act", 2026-07-28). Nothing
|
|
114
|
+
* files these anymore, but a LEGACY row opened before the filing refusal deployed
|
|
115
|
+
* must not hold its delivery out of done -- so it is excluded from the
|
|
116
|
+
* operator-hold predicate here, and the delivery clears itself via re-work
|
|
117
|
+
* instead of parking on a human inbox.
|
|
118
|
+
*
|
|
119
|
+
* verify_evidence_unavailable -- the verify gate reporting its own blindness
|
|
120
|
+
* (empty judgeable bundle). Its ask named no human-only act; the empty-bundle
|
|
121
|
+
* path now re-enters bounded verify_failed re-work (verification-feedback.ts
|
|
122
|
+
* requeueEvidenceUnavailableAsRework), and verify_gate_unclearable (the
|
|
123
|
+
* iteration cap) is the sole surviving human residue.
|
|
124
|
+
*
|
|
125
|
+
* Daemon-local string literal for the same node:test module-mock-loader reason as
|
|
126
|
+
* SELF_REPORT_STALL_HOLD_KINDS / OPERATOR_HOLD_DISPOSITIONS above.
|
|
127
|
+
*/
|
|
128
|
+
export declare const REFUSED_OPERATOR_HOLD_KINDS: readonly string[];
|
|
97
129
|
/** The open operator-hold escalation a delivery is blocked on (for gate_state). */
|
|
98
130
|
export interface OperatorHoldEscalation {
|
|
99
131
|
id: string;
|
|
@@ -135,43 +167,4 @@ export declare function findOpenOperatorHoldForDelivery(deliveryId: string, focu
|
|
|
135
167
|
* only need to know whether the hold exists (not which escalation it is).
|
|
136
168
|
*/
|
|
137
169
|
export declare function hasOpenOperatorHoldForDelivery(deliveryId: string, focusId?: string): Promise<boolean>;
|
|
138
|
-
/**
|
|
139
|
-
* The escalation dispositions that mean "a human must STEER before this team's
|
|
140
|
-
* work can proceed": needs_intent (scope/direction/priority) and
|
|
141
|
-
* needs_clarification (ambiguity to resolve). These are exactly the two the
|
|
142
|
-
* escalation tool documents as answerable via the `answer` field -- a DIRECTED
|
|
143
|
-
* question the daemon reads back to the asking agent, distinct from the
|
|
144
|
-
* operator-hold dispositions (needs_operator / external_wait, a blocked-on-reality
|
|
145
|
-
* signal) and agent_resolvable (no human at all).
|
|
146
|
-
*
|
|
147
|
-
* Daemon-local literals for the same reason as OPERATOR_HOLD_DISPOSITIONS above:
|
|
148
|
-
* a bare `@telora/*` value import in a query module pulled into a mocked
|
|
149
|
-
* node:test fails to resolve under the module-mock loader. The canonical enum is
|
|
150
|
-
* packages/daemon-core/src/disposition.ts and the DB CHECK on
|
|
151
|
-
* agent_escalations.disposition is the real constraint; these strings must stay
|
|
152
|
-
* in sync with it.
|
|
153
|
-
*/
|
|
154
|
-
export declare const DIRECTED_HOLD_DISPOSITIONS: readonly string[];
|
|
155
|
-
/**
|
|
156
|
-
* Returns the OPEN (pending|in_review) DIRECTED-hold escalation anchored to the
|
|
157
|
-
* given delivery, or null when none is open. Disposition-keyed sibling of
|
|
158
|
-
* findOpenOperatorHoldForDelivery, keyed on DIRECTED_HOLD_DISPOSITIONS
|
|
159
|
-
* (needs_intent / needs_clarification) instead of the operator-hold set.
|
|
160
|
-
*
|
|
161
|
-
* This is the vocabulary the completion-event no-progress guard previously
|
|
162
|
-
* lacked: a team parked on its own unanswered directed question could not be
|
|
163
|
-
* told apart from a team that has stalled, so the scope-coverage guard counted
|
|
164
|
-
* the wait as no-progress, re-engaged the team (real model spend), and
|
|
165
|
-
* eventually filed a team_failure ON TOP of the question.
|
|
166
|
-
*
|
|
167
|
-
* FAIL DIRECTION IS THE OPPOSITE of findOpenOperatorHoldForDelivery. The
|
|
168
|
-
* operator-hold gate's CALLER fails CLOSED (a lookup error => held) because a
|
|
169
|
-
* missed hold lets an operator-blocked delivery reach done. HERE the consuming
|
|
170
|
-
* guard must fail OPEN: a lookup error must NOT suppress a genuine stall
|
|
171
|
-
* escalation, so the caller treats an error as "not blocked". This function
|
|
172
|
-
* still reports what it finds and THROWS on a hard API error; the fail-open
|
|
173
|
-
* decision lives at the call site (completion/event-phases.computeCompletionFacts),
|
|
174
|
-
* which catches and defaults to not-blocked.
|
|
175
|
-
*/
|
|
176
|
-
export declare function findOpenDirectedHoldForDelivery(deliveryId: string, focusId?: string): Promise<OperatorHoldEscalation | null>;
|
|
177
170
|
//# sourceMappingURL=holds.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"holds.d.ts","sourceRoot":"","sources":["../../src/queries/holds.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"holds.d.ts","sourceRoot":"","sources":["../../src/queries/holds.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAIH,yEAAyE;AACzE,eAAO,MAAM,wBAAwB,EAAE,WAAW,CAAC,MAAM,CAAqC,CAAC;AAE/F;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,0BAA0B,EAAE,SAAS,MAAM,EAGvD,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6DG;AACH,eAAO,MAAM,4BAA4B,EAAE,SAAS,MAAM,EAEzD,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,2BAA2B,EAAE,SAAS,MAAM,EAExD,CAAC;AAEF,mFAAmF;AACnF,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAsB,+BAA+B,CACnD,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,MAAM,GACf,OAAO,CAAC,sBAAsB,GAAG,IAAI,CAAC,CAWxC;AAED;;;GAGG;AACH,wBAAsB,8BAA8B,CAClD,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,MAAM,GACf,OAAO,CAAC,OAAO,CAAC,CAElB"}
|
package/dist/queries/holds.js
CHANGED
|
@@ -11,9 +11,11 @@
|
|
|
11
11
|
* question the daemon reads back to the asking agent. Fails OPEN at its
|
|
12
12
|
* call site.
|
|
13
13
|
*
|
|
14
|
-
* Plus
|
|
15
|
-
* ABOUT a delivery's own cycling,
|
|
16
|
-
*
|
|
14
|
+
* Plus two exclusion families the operator predicate drops: SELF_REPORT_STALL_HOLD_KINDS
|
|
15
|
+
* (machine-filed alarms ABOUT a delivery's own cycling, so an alarm cannot
|
|
16
|
+
* constitute the condition it reports) and REFUSED_OPERATOR_HOLD_KINDS (kinds that
|
|
17
|
+
* name no human-only act -- refused at their filing surface and routed to bounded
|
|
18
|
+
* re-work; a legacy row must not hold a delivery out of done).
|
|
17
19
|
*
|
|
18
20
|
* Extracted from queries/issues.ts to keep that file under the daemon
|
|
19
21
|
* file-size limit -- the self-referential-alarm fix pushed it to 844. Bodies
|
|
@@ -62,28 +64,39 @@ export const OPERATOR_HOLD_DISPOSITIONS = [
|
|
|
62
64
|
* silence it, and resolving one let the detector file the next on the following
|
|
63
65
|
* tick.
|
|
64
66
|
*
|
|
65
|
-
* ENUMERATION -- every machine-filed, delivery-anchored needs_operator kind,
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
67
|
+
* ENUMERATION -- every machine-filed, delivery-anchored needs_operator kind,
|
|
68
|
+
* tested against ONE governing rule ("A hold must name a human act", 2026-07-28):
|
|
69
|
+
* does the kind name a specific act ONLY a human can perform? A kind that names
|
|
70
|
+
* one is a GENUINE hold and stays. A kind that names none must NOT hold a
|
|
71
|
+
* delivery out of done: it is refused at its filing surface and routed into the
|
|
72
|
+
* machine's own bounded re-work path, and any legacy row is EXCLUDED from this
|
|
73
|
+
* predicate. (This rule GOVERNS -- it supersedes the older fixpoint-only test,
|
|
74
|
+
* which read a kind's legitimacy from its re-arm behaviour; the two disagreed on
|
|
75
|
+
* verify_evidence_unavailable and this rule is the one that wins.) The parallel
|
|
76
|
+
* self-referential-alarm exclusion still applies too: an alarm ABOUT a delivery's
|
|
77
|
+
* own cycling cannot constitute the hold it reports.
|
|
72
78
|
*
|
|
73
79
|
* verify_gate_unclearable (stall-detectors.ts) -- SELF-REFERENTIAL. Trigger
|
|
74
80
|
* (iteration_count) is monotonic and re-arms every tick while non-terminal;
|
|
75
|
-
* silenced only by done/cancelled, which the hold blocks.
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
81
|
+
* silenced only by done/cancelled, which the hold blocks. It IS the sole
|
|
82
|
+
* surviving human residue of the bounded re-work cap, and it names a human
|
|
83
|
+
* act (an operator must decide the unclearable delivery's fate), so it holds
|
|
84
|
+
* -- but it must not hold ITSELF, hence the exclusion below. EXCLUDE from the
|
|
85
|
+
* predicate for its own delivery (SELF_REPORT_STALL_HOLD_KINDS).
|
|
86
|
+
* verify_evidence_unavailable (verification-feedback.ts) -- NAMES NO HUMAN ACT.
|
|
87
|
+
* Its ask was "fix the diff range / confirm the merge / clear the delivery" --
|
|
88
|
+
* the gate reporting its own BLINDNESS, not work an operator must do. As of
|
|
89
|
+
* "A hold must name a human act" it is refused at the filing surface (nothing
|
|
90
|
+
* files it; the empty-bundle path re-enters bounded verify_failed re-work in
|
|
91
|
+
* verification-engine/feedback) and any legacy open row is EXCLUDED here
|
|
92
|
+
* (REFUSED_OPERATOR_HOLD_KINDS) so it cannot hold a delivery out of done.
|
|
93
|
+
* REFUSED + ROUTED, no longer a hold.
|
|
94
|
+
* schema_drift_blocked (listener-auto-advance.ts) -- an operator must apply a
|
|
95
|
+
* migration (a human-only act on external reality). KEEP.
|
|
83
96
|
* advance_blocked (delivery-advance-block.ts) -- dirty worktree / lockfile
|
|
84
|
-
* state an operator or agent must resolve. KEEP.
|
|
97
|
+
* state an operator or agent must resolve on the host. KEEP.
|
|
85
98
|
* cd_push_failed (ci-escalation.ts) / ci_run_red (ci-sensor-loop.ts) --
|
|
86
|
-
* external CI/CD state. KEEP.
|
|
99
|
+
* external CI/CD state a human must act on. KEEP.
|
|
87
100
|
* propagation_stale (staleness-sensor.ts) -- external propagation state. KEEP.
|
|
88
101
|
*
|
|
89
102
|
* (Focus-anchored kinds -- merge_conflict, merge_refused_dirty,
|
|
@@ -100,6 +113,27 @@ export const OPERATOR_HOLD_DISPOSITIONS = [
|
|
|
100
113
|
export const SELF_REPORT_STALL_HOLD_KINDS = [
|
|
101
114
|
'verify_gate_unclearable',
|
|
102
115
|
];
|
|
116
|
+
/**
|
|
117
|
+
* escalation_kind discriminators that are REFUSED at their filing surface and
|
|
118
|
+
* routed into the machine's own bounded re-work path because they NAME NO ACT
|
|
119
|
+
* ONLY A HUMAN CAN PERFORM ("A hold must name a human act", 2026-07-28). Nothing
|
|
120
|
+
* files these anymore, but a LEGACY row opened before the filing refusal deployed
|
|
121
|
+
* must not hold its delivery out of done -- so it is excluded from the
|
|
122
|
+
* operator-hold predicate here, and the delivery clears itself via re-work
|
|
123
|
+
* instead of parking on a human inbox.
|
|
124
|
+
*
|
|
125
|
+
* verify_evidence_unavailable -- the verify gate reporting its own blindness
|
|
126
|
+
* (empty judgeable bundle). Its ask named no human-only act; the empty-bundle
|
|
127
|
+
* path now re-enters bounded verify_failed re-work (verification-feedback.ts
|
|
128
|
+
* requeueEvidenceUnavailableAsRework), and verify_gate_unclearable (the
|
|
129
|
+
* iteration cap) is the sole surviving human residue.
|
|
130
|
+
*
|
|
131
|
+
* Daemon-local string literal for the same node:test module-mock-loader reason as
|
|
132
|
+
* SELF_REPORT_STALL_HOLD_KINDS / OPERATOR_HOLD_DISPOSITIONS above.
|
|
133
|
+
*/
|
|
134
|
+
export const REFUSED_OPERATOR_HOLD_KINDS = [
|
|
135
|
+
'verify_evidence_unavailable',
|
|
136
|
+
];
|
|
103
137
|
/**
|
|
104
138
|
* Returns the OPEN (pending|in_review) operator-hold escalation anchored to the
|
|
105
139
|
* given delivery, or null when none is open.
|
|
@@ -131,9 +165,11 @@ export const SELF_REPORT_STALL_HOLD_KINDS = [
|
|
|
131
165
|
*/
|
|
132
166
|
export async function findOpenOperatorHoldForDelivery(deliveryId, focusId) {
|
|
133
167
|
return findOpenHoldForDelivery(deliveryId, OPERATOR_HOLD_DISPOSITIONS, focusId,
|
|
134
|
-
//
|
|
135
|
-
// the predicate that holds it
|
|
136
|
-
|
|
168
|
+
// Two exclusions: (1) a machine-filed alarm ABOUT this delivery's own cycling
|
|
169
|
+
// must not satisfy the predicate that holds it (SELF_REPORT_STALL_HOLD_KINDS);
|
|
170
|
+
// (2) a kind that names no human-only act must not hold at all -- a legacy row
|
|
171
|
+
// is dropped and the delivery clears itself via re-work (REFUSED_OPERATOR_HOLD_KINDS).
|
|
172
|
+
new Set([...SELF_REPORT_STALL_HOLD_KINDS, ...REFUSED_OPERATOR_HOLD_KINDS]));
|
|
137
173
|
}
|
|
138
174
|
/**
|
|
139
175
|
* Boolean convenience over findOpenOperatorHoldForDelivery for call sites that
|
|
@@ -142,53 +178,9 @@ export async function findOpenOperatorHoldForDelivery(deliveryId, focusId) {
|
|
|
142
178
|
export async function hasOpenOperatorHoldForDelivery(deliveryId, focusId) {
|
|
143
179
|
return (await findOpenOperatorHoldForDelivery(deliveryId, focusId)) !== null;
|
|
144
180
|
}
|
|
145
|
-
/**
|
|
146
|
-
* The escalation dispositions that mean "a human must STEER before this team's
|
|
147
|
-
* work can proceed": needs_intent (scope/direction/priority) and
|
|
148
|
-
* needs_clarification (ambiguity to resolve). These are exactly the two the
|
|
149
|
-
* escalation tool documents as answerable via the `answer` field -- a DIRECTED
|
|
150
|
-
* question the daemon reads back to the asking agent, distinct from the
|
|
151
|
-
* operator-hold dispositions (needs_operator / external_wait, a blocked-on-reality
|
|
152
|
-
* signal) and agent_resolvable (no human at all).
|
|
153
|
-
*
|
|
154
|
-
* Daemon-local literals for the same reason as OPERATOR_HOLD_DISPOSITIONS above:
|
|
155
|
-
* a bare `@telora/*` value import in a query module pulled into a mocked
|
|
156
|
-
* node:test fails to resolve under the module-mock loader. The canonical enum is
|
|
157
|
-
* packages/daemon-core/src/disposition.ts and the DB CHECK on
|
|
158
|
-
* agent_escalations.disposition is the real constraint; these strings must stay
|
|
159
|
-
* in sync with it.
|
|
160
|
-
*/
|
|
161
|
-
export const DIRECTED_HOLD_DISPOSITIONS = [
|
|
162
|
-
'needs_intent',
|
|
163
|
-
'needs_clarification',
|
|
164
|
-
];
|
|
165
|
-
/**
|
|
166
|
-
* Returns the OPEN (pending|in_review) DIRECTED-hold escalation anchored to the
|
|
167
|
-
* given delivery, or null when none is open. Disposition-keyed sibling of
|
|
168
|
-
* findOpenOperatorHoldForDelivery, keyed on DIRECTED_HOLD_DISPOSITIONS
|
|
169
|
-
* (needs_intent / needs_clarification) instead of the operator-hold set.
|
|
170
|
-
*
|
|
171
|
-
* This is the vocabulary the completion-event no-progress guard previously
|
|
172
|
-
* lacked: a team parked on its own unanswered directed question could not be
|
|
173
|
-
* told apart from a team that has stalled, so the scope-coverage guard counted
|
|
174
|
-
* the wait as no-progress, re-engaged the team (real model spend), and
|
|
175
|
-
* eventually filed a team_failure ON TOP of the question.
|
|
176
|
-
*
|
|
177
|
-
* FAIL DIRECTION IS THE OPPOSITE of findOpenOperatorHoldForDelivery. The
|
|
178
|
-
* operator-hold gate's CALLER fails CLOSED (a lookup error => held) because a
|
|
179
|
-
* missed hold lets an operator-blocked delivery reach done. HERE the consuming
|
|
180
|
-
* guard must fail OPEN: a lookup error must NOT suppress a genuine stall
|
|
181
|
-
* escalation, so the caller treats an error as "not blocked". This function
|
|
182
|
-
* still reports what it finds and THROWS on a hard API error; the fail-open
|
|
183
|
-
* decision lives at the call site (completion/event-phases.computeCompletionFacts),
|
|
184
|
-
* which catches and defaults to not-blocked.
|
|
185
|
-
*/
|
|
186
|
-
export async function findOpenDirectedHoldForDelivery(deliveryId, focusId) {
|
|
187
|
-
return findOpenHoldForDelivery(deliveryId, DIRECTED_HOLD_DISPOSITIONS, focusId);
|
|
188
|
-
}
|
|
189
181
|
/**
|
|
190
182
|
* Shared body for the disposition-keyed open-hold lookups
|
|
191
|
-
* (findOpenOperatorHoldForDelivery
|
|
183
|
+
* (findOpenOperatorHoldForDelivery). Reads the
|
|
192
184
|
* newest 500 open (pending|in_review) escalations -- narrowed server-side by
|
|
193
185
|
* focusId when supplied, the same busy-org paging concern the sibling lookups
|
|
194
186
|
* address -- and returns the first whose delivery matches (typed delivery_id
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"holds.js","sourceRoot":"","sources":["../../src/queries/holds.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"holds.js","sourceRoot":"","sources":["../../src/queries/holds.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,yEAAyE;AACzE,MAAM,CAAC,MAAM,wBAAwB,GAAwB,IAAI,GAAG,CAAC,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC;AAE/F;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAsB;IAC3D,gBAAgB;IAChB,eAAe;CAChB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6DG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAsB;IAC7D,yBAAyB;CAC1B,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAsB;IAC5D,6BAA6B;CAC9B,CAAC;AASF;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,CAAC,KAAK,UAAU,+BAA+B,CACnD,UAAkB,EAClB,OAAgB;IAEhB,OAAO,uBAAuB,CAC5B,UAAU,EACV,0BAA0B,EAC1B,OAAO;IACP,8EAA8E;IAC9E,+EAA+E;IAC/E,+EAA+E;IAC/E,uFAAuF;IACvF,IAAI,GA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,KAAK,UAAU,IAAI,IAAI,EAAE,UAAU,KAAK,UAAU,CAAC;QACjE,IAAI,eAAe,IAAI,WAAW,KAAK,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,CAAC;YACxE,MAAM,IAAI,GACR,CAAC,OAAO,CAAC,CAAC,cAAc,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC;gBAChE,CAAC,OAAO,IAAI,EAAE,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAE,IAAI,CAAC,IAAe,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;YAClE,uEAAuE;YACvE,IAAI,YAAY,IAAI,IAAI,KAAK,IAAI,IAAI,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC;gBAAE,SAAS;YACtE,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,cAAc,EAAE,CAAC,CAAC,cAAc,IAAI,IAAI,EAAE,WAAW,EAAE,CAAC;QAC7E,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/dist/queries/issues.d.ts
CHANGED
|
@@ -147,8 +147,8 @@ export declare function hasOpenTeamFailureEscalation(focusId: string): Promise<b
|
|
|
147
147
|
* polls files exactly one open escalation instead of one per tick.
|
|
148
148
|
*/
|
|
149
149
|
export declare function hasOpenEscalationForDelivery(deliveryId: string, escalationKind: string): Promise<boolean>;
|
|
150
|
-
import { OPERATOR_HOLD_DISPOSITIONS, SELF_REPORT_STALL_HOLD_KINDS,
|
|
151
|
-
export { OPERATOR_HOLD_DISPOSITIONS, SELF_REPORT_STALL_HOLD_KINDS,
|
|
150
|
+
import { OPERATOR_HOLD_DISPOSITIONS, SELF_REPORT_STALL_HOLD_KINDS, REFUSED_OPERATOR_HOLD_KINDS, findOpenOperatorHoldForDelivery, hasOpenOperatorHoldForDelivery, type OperatorHoldEscalation } from './holds.js';
|
|
151
|
+
export { OPERATOR_HOLD_DISPOSITIONS, SELF_REPORT_STALL_HOLD_KINDS, REFUSED_OPERATOR_HOLD_KINDS, findOpenOperatorHoldForDelivery, hasOpenOperatorHoldForDelivery, };
|
|
152
152
|
export type { OperatorHoldEscalation };
|
|
153
153
|
/**
|
|
154
154
|
* escalation_kind discriminators for the two focus-merge worktree-dirty
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"issues.d.ts","sourceRoot":"","sources":["../../src/queries/issues.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAIL,mBAAmB,EACpB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAqB,KAAK,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAkBvF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,KAAK,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEpD;;GAEG;AACH,wBAAsB,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC,CAO/E;AAED;;GAEG;AACH,wBAAsB,uBAAuB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAOjF;AAED;;;GAGG;AACH,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAYtF;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,cAAc,EAAE,MAAM,CAAC;IACvB,uHAAuH;IACvH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB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AG,IAAI,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,SAAS,4BAA4B,EAAE,GAC5C,mBAAmB,EAAE,CAavB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,+BAA+B,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAMrG;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAsB,oBAAoB,CACxC,KAAK,EAAE,MAAM,EACb,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,OAAO,CAAC,CAgBlB;AAED;;GAEG;AACH,wBAAsB,sBAAsB,CAC1C,YAAY,EAAE,MAAM,EACpB,eAAe,CAAC,EAAE,MAAM,GACvB,OAAO,CAAC,IAAI,CAAC,CAQf;AAED;;GAEG;AACH,wBAAsB,WAAW,CAC/B,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,MAAM,GAAG,IAAI,EAC1B,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,GAAG,IAAI,GACtB,OAAO,CAAC,MAAM,CAAC,CAejB"}
|
package/dist/queries/issues.js
CHANGED
|
@@ -171,10 +171,10 @@ export async function hasOpenEscalationForDelivery(deliveryId, escalationKind) {
|
|
|
171
171
|
return meta?.kind === escalationKind && meta?.deliveryId === deliveryId;
|
|
172
172
|
});
|
|
173
173
|
}
|
|
174
|
-
import { OPEN_ESCALATION_STATUSES, OPERATOR_HOLD_DISPOSITIONS, SELF_REPORT_STALL_HOLD_KINDS,
|
|
174
|
+
import { OPEN_ESCALATION_STATUSES, OPERATOR_HOLD_DISPOSITIONS, SELF_REPORT_STALL_HOLD_KINDS, REFUSED_OPERATOR_HOLD_KINDS, findOpenOperatorHoldForDelivery, hasOpenOperatorHoldForDelivery, } from './holds.js';
|
|
175
175
|
// The delivery hold-lookup family moved to queries/holds.ts (file-size limit).
|
|
176
176
|
// Re-exported here so every existing importer of queries/issues.js keeps working.
|
|
177
|
-
export { OPERATOR_HOLD_DISPOSITIONS, SELF_REPORT_STALL_HOLD_KINDS,
|
|
177
|
+
export { OPERATOR_HOLD_DISPOSITIONS, SELF_REPORT_STALL_HOLD_KINDS, REFUSED_OPERATOR_HOLD_KINDS, findOpenOperatorHoldForDelivery, hasOpenOperatorHoldForDelivery, };
|
|
178
178
|
/**
|
|
179
179
|
* escalation_kind discriminators for the two focus-merge worktree-dirty
|
|
180
180
|
* classes. Declared as daemon-local string constants (not imported from
|