opencode-swarm 7.160.2 → 7.161.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/background/delegation-lifecycle.d.ts +374 -0
- package/dist/background/pending-delegations.d.ts +6 -0
- package/dist/cli/{coder-settlement-gzar5ypz.js → coder-settlement-nayk1bbf.js} +8 -8
- package/dist/cli/{config-doctor-ancn1sj7.js → config-doctor-b1w7yvcs.js} +2 -2
- package/dist/cli/{core-bhmqtxev.js → core-whesnhpf.js} +1 -1
- package/dist/cli/{curation-policy-47przjwg.js → curation-policy-ej9xc0cd.js} +5 -5
- package/dist/cli/{curator-sgmynbpm.js → curator-1rzb285s.js} +29 -29
- package/dist/cli/{curator-llm-factory-6mw01jx1.js → curator-llm-factory-bqfkaq6y.js} +29 -29
- package/dist/cli/{evidence-summary-service-1pcfsqhv.js → evidence-summary-service-ma8drpv5.js} +12 -12
- package/dist/cli/{gate-evidence-w0kjqmew.js → gate-evidence-7eh82zs0.js} +5 -5
- package/dist/cli/{guardrail-explain-k99eje1y.js → guardrail-explain-em2mqz9a.js} +30 -30
- package/dist/cli/{guardrail-log-md5gcpk7.js → guardrail-log-845tfrwb.js} +6 -6
- package/dist/cli/{guardrail-reset-3385eqmq.js → guardrail-reset-091xw53a.js} +29 -29
- package/dist/cli/{hive-promoter-r0ekyn5m.js → hive-promoter-kx8t5em3.js} +29 -29
- package/dist/cli/{index-vv760pbg.js → index-14dgnwmh.js} +2 -2
- package/dist/cli/{index-k0qy284k.js → index-3cxfqdpv.js} +3 -3
- package/dist/cli/{index-vsy942dt.js → index-52f67bbh.js} +31 -31
- package/dist/cli/{index-yd6y4qr7.js → index-54jznpq7.js} +1 -1
- package/dist/cli/{index-7h2armwf.js → index-7619tk9a.js} +2 -2
- package/dist/cli/{index-am5bz6mf.js → index-7qera0f6.js} +2 -2
- package/dist/cli/{index-re338hf1.js → index-93pf824c.js} +3 -3
- package/dist/cli/{index-xsd7y4hp.js → index-ambz0ryy.js} +4 -4
- package/dist/cli/{index-prv20xq6.js → index-c6zyqgpq.js} +1 -1
- package/dist/cli/{index-war2dt6a.js → index-d1h4sf8f.js} +6 -6
- package/dist/cli/{index-7ezv5j23.js → index-d8st72j7.js} +1 -1
- package/dist/cli/{index-nk498mx6.js → index-dq41vsf9.js} +2 -2
- package/dist/cli/{index-2123hwbj.js → index-et1jpj6z.js} +3 -3
- package/dist/cli/{index-717pmdce.js → index-etdtfhhv.js} +1 -1
- package/dist/cli/{index-zbnf26br.js → index-f4dmccpd.js} +7 -7
- package/dist/cli/{index-znf683sm.js → index-f5axf6vq.js} +1 -1
- package/dist/cli/{index-dke4wzkn.js → index-fx3em0dr.js} +17 -1
- package/dist/cli/{index-3a35tt6a.js → index-gkv7s4xy.js} +8 -8
- package/dist/cli/{index-xtwny1ae.js → index-h6wtxzvm.js} +1 -1
- package/dist/cli/{index-mmr96pwr.js → index-k55td019.js} +1 -1
- package/dist/cli/{index-k50kxd3w.js → index-mbktm1ah.js} +7 -4
- package/dist/cli/{index-yp81ebrx.js → index-mj6ndvee.js} +4 -4
- package/dist/cli/{index-b5adxpy6.js → index-nqbqkx4c.js} +1 -1
- package/dist/cli/{index-s7w6ntw6.js → index-qjge2m9r.js} +63 -63
- package/dist/cli/{index-j3ss86kf.js → index-s33ee2w3.js} +1 -1
- package/dist/cli/{index-4dcz9fpn.js → index-t81fmfjj.js} +4 -4
- package/dist/cli/{index-xkmzsfg5.js → index-trmqq4wm.js} +2 -2
- package/dist/cli/{index-4d8cq6e1.js → index-w9g58t3j.js} +5 -5
- package/dist/cli/{index-5xfx5sbw.js → index-wrtgyvre.js} +5 -5
- package/dist/cli/{index-kqzba6ex.js → index-xy0e0r5f.js} +1 -1
- package/dist/cli/{index-5th50g17.js → index-y0ra2v4w.js} +3 -3
- package/dist/cli/{index-497a3hhj.js → index-y14mwbk8.js} +3 -3
- package/dist/cli/{index-6scakreq.js → index-zkgrayya.js} +1 -1
- package/dist/cli/index.js +29 -29
- package/dist/cli/{knowledge-escalator-saekqp8t.js → knowledge-escalator-9eqpsbw5.js} +11 -11
- package/dist/cli/{knowledge-events-ej8yz3yq.js → knowledge-events-a8r4ej12.js} +9 -9
- package/dist/cli/{knowledge-link-xezm8hr3.js → knowledge-link-8knefv8x.js} +4 -4
- package/dist/cli/{knowledge-store-3jamj5n4.js → knowledge-store-ydzeppv7.js} +5 -5
- package/dist/cli/{knowledge-validator-26w2mvqv.js → knowledge-validator-mnv58he9.js} +7 -7
- package/dist/cli/{pending-delegations-7xak7g59.js → pending-delegations-9mwmrwwm.js} +6 -4
- package/dist/cli/{pr-review-reentry-authorization-v97q63q4.js → pr-review-reentry-authorization-h1ssfq37.js} +29 -29
- package/dist/cli/{pr-subscriptions-asjevc5p.js → pr-subscriptions-3zwthnan.js} +4 -4
- package/dist/cli/{runner-wsdcy2d6.js → runner-fzgkd6m1.js} +5 -5
- package/dist/cli/{scan-cursor-1agr50f8.js → scan-cursor-5rmaqw2t.js} +6 -6
- package/dist/cli/{schema-z0ygrqgy.js → schema-72vpr9xy.js} +1 -1
- package/dist/cli/{scope-persistence-tncg38by.js → scope-persistence-39mwns79.js} +8 -8
- package/dist/cli/{skill-generator-jq20a09m.js → skill-generator-9aay0t53.js} +13 -13
- package/dist/cli/{telemetry-gpr9s3sm.js → telemetry-cmbjv240.js} +1 -1
- package/dist/cli/{worktree-collision-ownership-b9cp9zvw.js → worktree-collision-ownership-ybhktnq4.js} +4 -4
- package/dist/cli/{worktree-isolation-dzyxf8hn.js → worktree-isolation-w8ett6bs.js} +29 -29
- package/dist/config/evidence-schema.d.ts +2 -2
- package/dist/config/schema.d.ts +7 -7
- package/dist/hooks/delegate-ack-collector.d.ts +74 -0
- package/dist/hooks/knowledge-injector.d.ts +12 -1
- package/dist/index.js +93 -93
- package/dist/learning/admission.d.ts +2 -2
- package/dist/memory/schema.d.ts +3 -3
- package/dist/observability/catalog.d.ts +2 -2
- package/dist/prm/types.d.ts +9 -0
- package/dist/telemetry.d.ts +9 -1
- package/dist/tools/repo-graph/retrieval-router.d.ts +57 -0
- package/dist/tools/repo-graph.d.ts +2 -0
- package/dist/tools/repo-map.d.ts +202 -0
- package/dist/tools/search.d.ts +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,374 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared Task/lane delegation lifecycle operations (issue #2045).
|
|
3
|
+
*
|
|
4
|
+
* Task-tool delegations and `dispatch_lanes` lanes both persist their state in
|
|
5
|
+
* the background-delegations ledger and both record their start through
|
|
6
|
+
* `recordPendingDelegationDetailed`; before issue #2045 only the Task side
|
|
7
|
+
* settled terminals through `claimTerminalResult`, leaving lanes with the
|
|
8
|
+
* weaker status-only `appendDelegationTransition` write. This module gives
|
|
9
|
+
* lanes the same exactly-once terminal semantics — `settleDelegationTerminal`
|
|
10
|
+
* wraps the SAME `claimTerminalResult` primitive the Task completion observer
|
|
11
|
+
* calls directly (one claim implementation, no second lifecycle state machine)
|
|
12
|
+
* — and emits the lane-side terminal observations the Task side produces
|
|
13
|
+
* through its `tool.execute.*` hooks (cost telemetry, trajectory, knowledge
|
|
14
|
+
* receipt reconciliation), so equivalent Task and lane dispatches leave
|
|
15
|
+
* equivalent lifecycle facts behind.
|
|
16
|
+
*
|
|
17
|
+
* Every observation is fail-open and split into two durability classes — see
|
|
18
|
+
* the `settleDelegationTerminal` docstring for the contract: AUTHORITATIVE
|
|
19
|
+
* ledger-committed receipts re-run on `duplicate` replays (crash recovery),
|
|
20
|
+
* while DIAGNOSTIC observations run only on `claimed` (exactly-once-at-emit).
|
|
21
|
+
*/
|
|
22
|
+
import { type PricingConfig } from '../services/cost-accounting.js';
|
|
23
|
+
import { type BackgroundDelegationRecord, type BackgroundDelegationResult, type BackgroundTerminalResult, claimTerminalResult, findByCorrelationId } from './pending-delegations.js';
|
|
24
|
+
/** Terminal statuses a shared settle may establish (mirrors Task semantics). */
|
|
25
|
+
export type DelegationTerminalStatus = 'completed' | 'error' | 'cancelled';
|
|
26
|
+
/**
|
|
27
|
+
* Why `settleDelegationTerminal` returned without a fresh claim.
|
|
28
|
+
*
|
|
29
|
+
* `already_terminal_without_event` is deliberately distinct from `conflict`:
|
|
30
|
+
* a record terminalized WITHOUT an immutable event (the 30-minute stale sweep
|
|
31
|
+
* or a legacy status-only writer won the race) is a benign outcome that must
|
|
32
|
+
* not tick the late-terminal audit — the audit belongs to the writer that
|
|
33
|
+
* owns the conflicting *event*, and there is none.
|
|
34
|
+
*/
|
|
35
|
+
export type DelegationSettleKind = 'claimed' | 'duplicate' | 'conflict' | 'already_terminal_without_event' | 'not_open' | 'missing';
|
|
36
|
+
export interface DelegationSettleOutcome {
|
|
37
|
+
kind: DelegationSettleKind;
|
|
38
|
+
record?: BackgroundDelegationRecord;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Settle outcomes that mean "the work item is already durably terminal; the
|
|
42
|
+
* caller's benign already-terminal handling applies" (no retry, no failure
|
|
43
|
+
* diagnostic — the race was routine).
|
|
44
|
+
*/
|
|
45
|
+
export declare function isBenignSettleOutcome(kind: DelegationSettleKind): boolean;
|
|
46
|
+
export interface DelegationTerminalInput {
|
|
47
|
+
status: DelegationTerminalStatus;
|
|
48
|
+
result: BackgroundDelegationResult;
|
|
49
|
+
}
|
|
50
|
+
export interface DelegationObservationInput {
|
|
51
|
+
/** Full lane/delegate transcript text; drives knowledge reconciliation. */
|
|
52
|
+
transcript?: string;
|
|
53
|
+
/** Raw cost-evidence source (assistant info/metadata), when available. */
|
|
54
|
+
costRaw?: unknown;
|
|
55
|
+
/** Configured model for cost projection fallback. */
|
|
56
|
+
model?: string;
|
|
57
|
+
/** Pricing config for normalized cost estimation. */
|
|
58
|
+
pricing?: PricingConfig;
|
|
59
|
+
/** Wall-clock dispatch start (ms epoch), for trajectory elapsed_ms. */
|
|
60
|
+
startedAt?: number;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Build the immutable terminal event for a delegation record. The eventId is
|
|
64
|
+
* derived from trusted correlation + immutable result metadata (no timestamps,
|
|
65
|
+
* no process state), so a replayed observation of the same result claims
|
|
66
|
+
* idempotently and a different result is a distinct, auditable event.
|
|
67
|
+
*/
|
|
68
|
+
export declare function buildDelegationTerminal(record: Pick<BackgroundDelegationRecord, 'correlationId' | 'jobId'>, terminal: DelegationTerminalInput, now: number): BackgroundTerminalResult;
|
|
69
|
+
/**
|
|
70
|
+
* Settle a delegation terminal exactly once through the shared claim, then —
|
|
71
|
+
* only on a fresh `claimed` disposition — run the terminal observations.
|
|
72
|
+
*
|
|
73
|
+
* Durability model (final-critic challenge, crash between claim and
|
|
74
|
+
* observations):
|
|
75
|
+
* - The AUTHORITATIVE receipts (validator/ledger-committed delegate ACK
|
|
76
|
+
* terminals, unacknowledged-critical violations, and reviewer verdicts) are
|
|
77
|
+
* re-run on `duplicate` replays: the receipt ledger's terminal authority is
|
|
78
|
+
* idempotent (same-outcome replays are `idempotent_skips`), so a replay
|
|
79
|
+
* after a crash closes the receipts exactly once — a lane whose observation
|
|
80
|
+
* pass died mid-flight recovers on any later settle replay (restart,
|
|
81
|
+
* concurrent collector).
|
|
82
|
+
* - The DIAGNOSTIC observations are exactly-once-at-emit on `claimed` only —
|
|
83
|
+
* they have no deduplicating sink, and re-emitting them on replay would
|
|
84
|
+
* duplicate records. This covers cost telemetry, trajectory, AND the
|
|
85
|
+
* audit-only non-critical `unacknowledged` knowledge observation (which
|
|
86
|
+
* bypasses the receipt ledger). It is the same crash window the Task
|
|
87
|
+
* transport's `tool.execute.*` hook emissions have always had (documented
|
|
88
|
+
* transport parity, not a regression).
|
|
89
|
+
*
|
|
90
|
+
* See {@link DelegationSettleKind} for the non-claim outcomes; callers map
|
|
91
|
+
* `duplicate`/`conflict`/`already_terminal_without_event` to their benign
|
|
92
|
+
* already-terminal handling and `missing`/`not_open` to their
|
|
93
|
+
* settle-failure diagnostics.
|
|
94
|
+
*/
|
|
95
|
+
export declare function settleDelegationTerminal(directory: string, record: BackgroundDelegationRecord, terminal: DelegationTerminalInput, observations?: DelegationObservationInput, now?: number): Promise<DelegationSettleOutcome>;
|
|
96
|
+
/**
|
|
97
|
+
* Emit the `delegation_begin` pairing observation when a lane/delegation start
|
|
98
|
+
* record lands (issue #2045 Task/lane cost-event parity). Best-effort.
|
|
99
|
+
*/
|
|
100
|
+
export declare function emitDelegationBegin(record: Pick<BackgroundDelegationRecord, 'parentSessionId' | 'swarmPrefixedAgent' | 'planTaskId'>): void;
|
|
101
|
+
/**
|
|
102
|
+
* Canonical cost-record identity material for a lane/delegation terminal.
|
|
103
|
+
* Joining back to the delegation record uses exactly these record fields —
|
|
104
|
+
* never agent-name matching. The `lane:` discriminator keeps lane identities
|
|
105
|
+
* disjoint from Task-tool records, whose material is `${sessionId}\0${callID}`.
|
|
106
|
+
*/
|
|
107
|
+
export declare function delegationCostRecordMaterial(record: Pick<BackgroundDelegationRecord, 'parentSessionId' | 'callID' | 'laneId'>): string;
|
|
108
|
+
/** Bounded per-pass cap for terminal-lane receipt recovery (crash window). */
|
|
109
|
+
export declare const MAX_TERMINAL_LANE_RECEIPT_RECOVERY = 64;
|
|
110
|
+
/**
|
|
111
|
+
* Pre-record admission deadline for the directory-wide recovery pass
|
|
112
|
+
* (session-close hook): checked before EACH reconciliation, bounding how many
|
|
113
|
+
* records a pass may START — not the enumeration read/sort or an
|
|
114
|
+
* already-started reconciliation.
|
|
115
|
+
*/
|
|
116
|
+
export declare const TERMINAL_LANE_RECEIPT_RECOVERY_DEADLINE_MS = 5000;
|
|
117
|
+
export interface TerminalLaneReceiptRecoveryResult {
|
|
118
|
+
/** Terminal lane records whose receipt reconciliation replay was attempted. */
|
|
119
|
+
recovered: number;
|
|
120
|
+
/** True when the pass ended before every candidate was attempted. */
|
|
121
|
+
exhaustedBudget: boolean;
|
|
122
|
+
}
|
|
123
|
+
export interface RecoverTerminalLaneReceiptsOptions {
|
|
124
|
+
/**
|
|
125
|
+
* Admission budget for STARTING a reconciliation. Default 5s; the pass
|
|
126
|
+
* stops cleanly before the next record when exhausted. Does not bound the
|
|
127
|
+
* enumeration or an in-flight reconciliation.
|
|
128
|
+
*/
|
|
129
|
+
deadlineMs?: number;
|
|
130
|
+
/** Test seam for the clock. */
|
|
131
|
+
now?: () => number;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Durable crash-recovery pass for terminal lane records (final-critic
|
|
135
|
+
* challenge): a lane whose terminal claim landed but whose observation pass
|
|
136
|
+
* died is TERMINAL, so the collector's active-record filter skips it forever —
|
|
137
|
+
* the duplicate-replay path in {@link settleDelegationTerminal} would never be
|
|
138
|
+
* entered again on its own. This pass re-enters it: the durable transcript
|
|
139
|
+
* (`terminalResult.result.text`, persisted by the claim) is replayed through
|
|
140
|
+
* the ledger-idempotent receipt reconciliation in replay mode — authoritative
|
|
141
|
+
* receipts close exactly once; diagnostics never re-emit.
|
|
142
|
+
*
|
|
143
|
+
* Production wiring: (a) `collect_lane_results` runs it once per invocation
|
|
144
|
+
* over the batch's terminal records (the async-lane restart path — a batch is
|
|
145
|
+
* at most MAX_LANES records, so batch mode needs no cursor), and (b) the
|
|
146
|
+
* session-close maintenance trigger runs it directory-wide, which is what
|
|
147
|
+
* recovers BLOCKING lane records that have no collector.
|
|
148
|
+
*
|
|
149
|
+
* Forward progress (final-critic round 3): the directory-wide pass is bounded
|
|
150
|
+
* by a record cap and a pre-record admission deadline (checked before EACH
|
|
151
|
+
* reconciliation; it does not bound the candidate enumeration read/sort or an
|
|
152
|
+
* already-started reconciliation — those are bounded by the ledger read and
|
|
153
|
+
* the cap), and it persists an advancing
|
|
154
|
+
* cursor (`.swarm/lane-receipt-recovery-cursor.json`, ordered by
|
|
155
|
+
* `(updatedAt, correlationId)`), so each pass resumes after the last processed
|
|
156
|
+
* record and wraps to the oldest once the end is reached. Guarantees, stated
|
|
157
|
+
* exactly: under steady arrivals a candidate whose terminal commits with an
|
|
158
|
+
* ordering key OLDER than the cursor's position (a lock-contention straggler)
|
|
159
|
+
* is skipped until the next wrap — so a straggler is deferred, not lost, and
|
|
160
|
+
* an idle drain (a pass with nothing after the cursor) wraps immediately.
|
|
161
|
+
* Replays are ledger-idempotent, so a lost, stale, or wrapped cursor only
|
|
162
|
+
* causes harmless rework. Fail-open per record; never throws.
|
|
163
|
+
*/
|
|
164
|
+
export declare function recoverTerminalLaneReceipts(directory: string, records?: readonly BackgroundDelegationRecord[], options?: RecoverTerminalLaneReceiptsOptions): Promise<TerminalLaneReceiptRecoveryResult>;
|
|
165
|
+
/**
|
|
166
|
+
* Test seam (repo convention): the telemetry sink and the claim are injectable
|
|
167
|
+
* so tests can stub them without `mock.module`.
|
|
168
|
+
*/
|
|
169
|
+
export declare const _internals: {
|
|
170
|
+
claimTerminalResult: typeof claimTerminalResult;
|
|
171
|
+
findByCorrelationId: typeof findByCorrelationId;
|
|
172
|
+
telemetry: {
|
|
173
|
+
sessionStarted(sessionId: string, agentName: string): void;
|
|
174
|
+
sessionEnded(sessionId: string, reason: string): void;
|
|
175
|
+
agentActivated(sessionId: string, agentName: string, oldName?: string): void;
|
|
176
|
+
delegationBegin(sessionId: string, agentName: string, taskId: string): void;
|
|
177
|
+
delegationEnd(sessionId: string, agentName: string, taskId: string, result: string, costFields?: Partial<import("../services/cost-accounting.js").DelegationCostFields>): void;
|
|
178
|
+
taskStateChanged(sessionId: string, taskId: string, newState: string, oldState?: string): void;
|
|
179
|
+
gatePassed(sessionId: string, gate: string, taskId: string): void;
|
|
180
|
+
gateParseError(taskId: string, error: Error): void;
|
|
181
|
+
gateFailed(sessionId: string, gate: string, taskId: string, reason: string): void;
|
|
182
|
+
reviewerGateDecision(sessionId: string, taskId: string, blocked: boolean, reasonCode: import("../telemetry.js").ReviewerGateReasonCode, evidenceKind: import("../telemetry.js").ReviewerGateEvidenceKind): void;
|
|
183
|
+
phaseChanged(sessionId: string, oldPhase: number, newPhase: number): void;
|
|
184
|
+
budgetUpdated(sessionId: string, budgetPct: number, agentName: string): void;
|
|
185
|
+
contextPruned(data: {
|
|
186
|
+
sessionId: string;
|
|
187
|
+
agentName: string;
|
|
188
|
+
trigger: "agent_switch" | "critical_threshold";
|
|
189
|
+
usageSource: "provider" | "estimated";
|
|
190
|
+
beforeTokens: number;
|
|
191
|
+
afterTokens: number;
|
|
192
|
+
modelLimit: number;
|
|
193
|
+
maskedMessages: number;
|
|
194
|
+
maskedToolParts: number;
|
|
195
|
+
maskedTokensFreed: number;
|
|
196
|
+
prunedMessages: number;
|
|
197
|
+
prunedTextParts: number;
|
|
198
|
+
prunedToolParts: number;
|
|
199
|
+
prunedTokensFreed: number;
|
|
200
|
+
}): void;
|
|
201
|
+
modelFallback(sessionId: string, agentName: string, fromModel: string, toModel: string, reason: string): void;
|
|
202
|
+
modelUnresolved(agentName: string, model: string, detail: string): void;
|
|
203
|
+
hardLimitHit(sessionId: string, agentName: string, limitType: string, value: number): void;
|
|
204
|
+
revisionLimitHit(sessionId: string, agentName: string): void;
|
|
205
|
+
loopDetected(sessionId: string, agentName: string, loopType: string): void;
|
|
206
|
+
noOpStrongWarning(sessionId: string, agentName: string, count: number, threshold: number): void;
|
|
207
|
+
gateDenialLoop(sessionId: string, tool: string, code: string, count: number): void;
|
|
208
|
+
executionStallWarning(sessionId: string, count: number, threshold: number): void;
|
|
209
|
+
executionStallDenied(sessionId: string, tool: string, count: number, threshold: number): void;
|
|
210
|
+
swarmInternalsReadDenied(sessionId: string, tool: string, target: string): void;
|
|
211
|
+
scopeViolation(sessionId: string, agentName: string, file: string, reason: string): void;
|
|
212
|
+
qaSkipViolation(sessionId: string, agentName: string, skipCount: number): void;
|
|
213
|
+
heartbeat(sessionId: string): void;
|
|
214
|
+
turboModeChanged(sessionId: string, enabled: boolean, agentName: string): void;
|
|
215
|
+
autoOversightEscalation(sessionId: string, reason: string, interactionCount: number, deadlockCount: number, phase?: number): void;
|
|
216
|
+
environmentDetected(sessionId: string, hostOS: string, shellFamily: string, executionMode: string): void;
|
|
217
|
+
prmPatternDetected(sessionId: string, pattern: string, severity: string, category: string, stepRange: [number, number]): void;
|
|
218
|
+
prmCourseCorrectionInjected(sessionId: string, pattern: string, level: number): void;
|
|
219
|
+
prmEscalationTriggered(sessionId: string, pattern: string, level: number, occurrenceCount: number): void;
|
|
220
|
+
prmHardStop(sessionId: string, pattern: string, level: number, occurrenceCount: number): void;
|
|
221
|
+
closeArchiveResult(data: {
|
|
222
|
+
archive_valid: boolean;
|
|
223
|
+
archive_empty: boolean;
|
|
224
|
+
file_count: number;
|
|
225
|
+
bundle: string;
|
|
226
|
+
artifacts: Array<{
|
|
227
|
+
artifact: string;
|
|
228
|
+
requiredness: string;
|
|
229
|
+
attempt: string;
|
|
230
|
+
validation: string;
|
|
231
|
+
source_disposition: string;
|
|
232
|
+
method: string;
|
|
233
|
+
reason_code: string;
|
|
234
|
+
row_counts?: {
|
|
235
|
+
schema_migrations_max_version: number | null;
|
|
236
|
+
project_constraints: number;
|
|
237
|
+
qa_gate_profile: number;
|
|
238
|
+
};
|
|
239
|
+
}>;
|
|
240
|
+
}): void;
|
|
241
|
+
residueHealth(data: {
|
|
242
|
+
trigger: string;
|
|
243
|
+
scanned: number;
|
|
244
|
+
matched: number;
|
|
245
|
+
eligible: number;
|
|
246
|
+
ambiguous: number;
|
|
247
|
+
quarantined: number;
|
|
248
|
+
preserved: number;
|
|
249
|
+
total_bytes: number;
|
|
250
|
+
oldest_age_ms: number;
|
|
251
|
+
grammar_counts: Record<string, number>;
|
|
252
|
+
}): void;
|
|
253
|
+
contextTelemetryHealth(data: {
|
|
254
|
+
trigger: "compaction" | "close";
|
|
255
|
+
accepted_count: number;
|
|
256
|
+
compacted_count: number;
|
|
257
|
+
retained_count: number;
|
|
258
|
+
dropped_count: number;
|
|
259
|
+
corrupt_count: number;
|
|
260
|
+
oldest_timestamp: string | null;
|
|
261
|
+
newest_timestamp: string | null;
|
|
262
|
+
bytes: number;
|
|
263
|
+
limit_bytes: number;
|
|
264
|
+
}): void;
|
|
265
|
+
skillUsageHealth(data: {
|
|
266
|
+
trigger: "compaction" | "migration" | "consumption" | "pressure";
|
|
267
|
+
accepted: number;
|
|
268
|
+
compacted: number;
|
|
269
|
+
dropped: number;
|
|
270
|
+
skills_dropped: number;
|
|
271
|
+
corrupt: number;
|
|
272
|
+
pending_retained: number;
|
|
273
|
+
uncertain_retained: number;
|
|
274
|
+
uncertain_expired: number;
|
|
275
|
+
pending_evicted: number;
|
|
276
|
+
no_source_knowledge: number;
|
|
277
|
+
no_matching_knowledge: number;
|
|
278
|
+
bump_retry: number;
|
|
279
|
+
bump_unrecoverable: number;
|
|
280
|
+
bump_applied_zero: number;
|
|
281
|
+
pressure: number;
|
|
282
|
+
curator_skipped: number;
|
|
283
|
+
bytes: number;
|
|
284
|
+
limit_bytes: number;
|
|
285
|
+
oldest_timestamp: string | null;
|
|
286
|
+
newest_timestamp: string | null;
|
|
287
|
+
coverage: boolean;
|
|
288
|
+
}): void;
|
|
289
|
+
coreEventsHealth(data: {
|
|
290
|
+
trigger: "compaction" | "close";
|
|
291
|
+
accepted_count: number;
|
|
292
|
+
compacted_count: number;
|
|
293
|
+
retained_count: number;
|
|
294
|
+
dropped_count: number;
|
|
295
|
+
corrupt_count: number;
|
|
296
|
+
authority_index_count: number;
|
|
297
|
+
authority_evicted_count: number;
|
|
298
|
+
oldest_timestamp: string | null;
|
|
299
|
+
newest_timestamp: string | null;
|
|
300
|
+
bytes: number;
|
|
301
|
+
limit_bytes: number;
|
|
302
|
+
}): void;
|
|
303
|
+
shellAuditHealth(data: {
|
|
304
|
+
trigger: "compaction" | "close";
|
|
305
|
+
accepted_count: number;
|
|
306
|
+
compacted_count: number;
|
|
307
|
+
retained_count: number;
|
|
308
|
+
dropped_count: number;
|
|
309
|
+
corrupt_count: number;
|
|
310
|
+
oldest_timestamp: string | null;
|
|
311
|
+
newest_timestamp: string | null;
|
|
312
|
+
bytes: number;
|
|
313
|
+
limit_bytes: number;
|
|
314
|
+
}): void;
|
|
315
|
+
trajectoryHealth(data: {
|
|
316
|
+
trigger: "compaction" | "cleanup" | "append_skip";
|
|
317
|
+
retained_count: number;
|
|
318
|
+
dropped_count: number;
|
|
319
|
+
corrupt_count: number;
|
|
320
|
+
skipped_lock_count: number;
|
|
321
|
+
bytes: number;
|
|
322
|
+
limit_bytes: number;
|
|
323
|
+
}): void;
|
|
324
|
+
prSubscriptionHealth(data: {
|
|
325
|
+
trigger: "compact" | "migrate-complete" | "archive" | "foreign-rebind" | "corrupt-quarantine";
|
|
326
|
+
active_count: number;
|
|
327
|
+
terminal_count: number;
|
|
328
|
+
compactions: number;
|
|
329
|
+
corrupt_count: number;
|
|
330
|
+
dropped_audit_count: number;
|
|
331
|
+
recovery_resets: number;
|
|
332
|
+
checkpoint_bytes: number;
|
|
333
|
+
limit_bytes: number;
|
|
334
|
+
}): void;
|
|
335
|
+
learningHealthAlarm(data: {
|
|
336
|
+
alarm: string;
|
|
337
|
+
transition: "raised" | "sustained" | "recovered";
|
|
338
|
+
severity: "warning" | "critical";
|
|
339
|
+
scope_class: "session" | "identity" | "project";
|
|
340
|
+
session_ref?: string;
|
|
341
|
+
model?: string;
|
|
342
|
+
provider?: string;
|
|
343
|
+
window_ms: number;
|
|
344
|
+
coverage_facts: number;
|
|
345
|
+
raise_facts: number;
|
|
346
|
+
age_ms: number;
|
|
347
|
+
limit_source?: string;
|
|
348
|
+
denominator_fallback?: boolean;
|
|
349
|
+
pressure_pct?: number;
|
|
350
|
+
band?: string;
|
|
351
|
+
share_pct?: number;
|
|
352
|
+
field_count?: number;
|
|
353
|
+
non_field_count?: number;
|
|
354
|
+
store?: string;
|
|
355
|
+
dropped?: number;
|
|
356
|
+
corrupt?: number;
|
|
357
|
+
retained?: number;
|
|
358
|
+
accepted?: number;
|
|
359
|
+
gap_type?: "membership_to_terminal" | "terminal_to_application";
|
|
360
|
+
role?: string;
|
|
361
|
+
phase?: number;
|
|
362
|
+
reason?: string;
|
|
363
|
+
}): void;
|
|
364
|
+
prmHardStopDelivered(sessionId: string, pattern: string, level: number, occurrenceCount: number): void;
|
|
365
|
+
retrievalRouted(sessionId: string, data: {
|
|
366
|
+
mode: "graph" | "lexical" | "semantic" | "security" | "test" | "hybrid";
|
|
367
|
+
graph_hit: boolean;
|
|
368
|
+
fallback_reason: string | null;
|
|
369
|
+
token_budget_requested: number;
|
|
370
|
+
token_budget_used: number;
|
|
371
|
+
omitted_context_count: number;
|
|
372
|
+
}): void;
|
|
373
|
+
};
|
|
374
|
+
};
|
|
@@ -711,6 +711,12 @@ export declare function findByBatchId(directory: string, batchId: string, opts?:
|
|
|
711
711
|
parentSessionId?: string;
|
|
712
712
|
}): BackgroundDelegationRecord[];
|
|
713
713
|
export declare function findOpenAsyncLaneBatches(directory: string): BackgroundDelegationRecord[];
|
|
714
|
+
/**
|
|
715
|
+
* Public alias of the internal terminal predicate so shared lifecycle callers
|
|
716
|
+
* (issue #2045: `delegation-lifecycle.ts`) classify post-claim re-reads with
|
|
717
|
+
* the exact same status set as the store's own guards — never a second copy.
|
|
718
|
+
*/
|
|
719
|
+
export declare function isTerminalDelegationStatus(status: BackgroundDelegationStatus): boolean;
|
|
714
720
|
/**
|
|
715
721
|
* Public stale sweep: acquires the store lock and marks overdue pendings as `stale`.
|
|
716
722
|
* Best-effort; returns the number swept (0 on lock timeout / error).
|
|
@@ -13,27 +13,27 @@ import {
|
|
|
13
13
|
releaseCoderDispatchOwnership,
|
|
14
14
|
settleCoderDispatch,
|
|
15
15
|
transferCoderSettlementToBackground
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-w9g58t3j.js";
|
|
17
17
|
import"./index-3f7hqtgg.js";
|
|
18
18
|
import"./index-awjx0wgk.js";
|
|
19
|
-
import"./index-
|
|
20
|
-
import"./index-
|
|
19
|
+
import"./index-t81fmfjj.js";
|
|
20
|
+
import"./index-xy0e0r5f.js";
|
|
21
21
|
import"./index-ddszzne4.js";
|
|
22
|
-
import"./index-
|
|
22
|
+
import"./index-7619tk9a.js";
|
|
23
23
|
import"./index-556ja8an.js";
|
|
24
24
|
import"./index-dtn0pne5.js";
|
|
25
25
|
import"./index-z6xqpmqg.js";
|
|
26
26
|
import"./index-r3mvsbtq.js";
|
|
27
27
|
import"./index-9e6fdz2h.js";
|
|
28
28
|
import"./index-4rhhvd1a.js";
|
|
29
|
-
import"./index-
|
|
29
|
+
import"./index-k55td019.js";
|
|
30
30
|
import"./index-c9zp4xwc.js";
|
|
31
31
|
import"./index-zjygnfay.js";
|
|
32
|
-
import"./index-
|
|
33
|
-
import"./index-
|
|
32
|
+
import"./index-d8st72j7.js";
|
|
33
|
+
import"./index-nqbqkx4c.js";
|
|
34
34
|
import"./index-dh5q6z7y.js";
|
|
35
35
|
import"./index-ed5ykebp.js";
|
|
36
|
-
import"./index-
|
|
36
|
+
import"./index-fx3em0dr.js";
|
|
37
37
|
import"./index-7g4c7s5r.js";
|
|
38
38
|
import"./index-bpmtbmy9.js";
|
|
39
39
|
import"./index-zgwm4ryv.js";
|
|
@@ -12,9 +12,9 @@ import {
|
|
|
12
12
|
shouldRunOnStartup,
|
|
13
13
|
writeBackupArtifact,
|
|
14
14
|
writeDoctorArtifact
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-h6wtxzvm.js";
|
|
16
16
|
import"./index-z6xqpmqg.js";
|
|
17
|
-
import"./index-
|
|
17
|
+
import"./index-zkgrayya.js";
|
|
18
18
|
import"./index-c9zp4xwc.js";
|
|
19
19
|
import"./index-zjygnfay.js";
|
|
20
20
|
import"./index-bk5tah7q.js";
|
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
authorizeCuration,
|
|
5
5
|
buildConfigFingerprintInput,
|
|
6
6
|
readCohortConfigFingerprint
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-f5axf6vq.js";
|
|
8
8
|
import"./index-rtry5xyf.js";
|
|
9
|
-
import"./index-
|
|
10
|
-
import"./index-
|
|
11
|
-
import"./index-
|
|
9
|
+
import"./index-c6zyqgpq.js";
|
|
10
|
+
import"./index-d8st72j7.js";
|
|
11
|
+
import"./index-nqbqkx4c.js";
|
|
12
12
|
import"./index-dh5q6z7y.js";
|
|
13
13
|
import"./index-ed5ykebp.js";
|
|
14
|
-
import"./index-
|
|
14
|
+
import"./index-fx3em0dr.js";
|
|
15
15
|
import"./index-7g4c7s5r.js";
|
|
16
16
|
import"./index-bpmtbmy9.js";
|
|
17
17
|
import"./index-zgwm4ryv.js";
|
|
@@ -14,63 +14,63 @@ import {
|
|
|
14
14
|
runCuratorInit,
|
|
15
15
|
runCuratorPhase,
|
|
16
16
|
writeCuratorSummary
|
|
17
|
-
} from "./index-
|
|
18
|
-
import"./index-
|
|
19
|
-
import"./index-
|
|
20
|
-
import"./index-
|
|
21
|
-
import"./index-
|
|
22
|
-
import"./index-
|
|
17
|
+
} from "./index-qjge2m9r.js";
|
|
18
|
+
import"./index-s33ee2w3.js";
|
|
19
|
+
import"./index-et1jpj6z.js";
|
|
20
|
+
import"./index-h6wtxzvm.js";
|
|
21
|
+
import"./index-f4dmccpd.js";
|
|
22
|
+
import"./index-dq41vsf9.js";
|
|
23
23
|
import"./index-txdagbh7.js";
|
|
24
24
|
import"./index-134d35c1.js";
|
|
25
25
|
import"./index-3146wmgv.js";
|
|
26
|
-
import"./index-
|
|
27
|
-
import"./index-
|
|
28
|
-
import"./index-
|
|
26
|
+
import"./index-93pf824c.js";
|
|
27
|
+
import"./index-wrtgyvre.js";
|
|
28
|
+
import"./index-7qera0f6.js";
|
|
29
29
|
import"./index-70ha9e09.js";
|
|
30
30
|
import"./index-c8s9a3zh.js";
|
|
31
31
|
import"./index-9ss2m4rs.js";
|
|
32
|
-
import"./index-
|
|
32
|
+
import"./index-y14mwbk8.js";
|
|
33
33
|
import"./index-zsrtt42s.js";
|
|
34
|
-
import"./index-
|
|
34
|
+
import"./index-w9g58t3j.js";
|
|
35
35
|
import"./index-3f7hqtgg.js";
|
|
36
36
|
import"./index-awjx0wgk.js";
|
|
37
|
-
import"./index-
|
|
38
|
-
import"./index-
|
|
37
|
+
import"./index-mj6ndvee.js";
|
|
38
|
+
import"./index-f5axf6vq.js";
|
|
39
39
|
import"./index-rtry5xyf.js";
|
|
40
|
-
import"./index-
|
|
41
|
-
import"./index-
|
|
42
|
-
import"./index-
|
|
40
|
+
import"./index-t81fmfjj.js";
|
|
41
|
+
import"./index-xy0e0r5f.js";
|
|
42
|
+
import"./index-mbktm1ah.js";
|
|
43
43
|
import"./index-ddszzne4.js";
|
|
44
|
-
import"./index-
|
|
45
|
-
import"./index-
|
|
46
|
-
import"./index-
|
|
44
|
+
import"./index-ambz0ryy.js";
|
|
45
|
+
import"./index-y0ra2v4w.js";
|
|
46
|
+
import"./index-7619tk9a.js";
|
|
47
47
|
import"./index-556ja8an.js";
|
|
48
48
|
import"./index-4fwbbad3.js";
|
|
49
49
|
import"./index-b43rt5ph.js";
|
|
50
50
|
import"./index-q7sjgr1y.js";
|
|
51
|
-
import"./index-
|
|
52
|
-
import"./index-
|
|
53
|
-
import"./index-
|
|
51
|
+
import"./index-d1h4sf8f.js";
|
|
52
|
+
import"./index-gkv7s4xy.js";
|
|
53
|
+
import"./index-trmqq4wm.js";
|
|
54
54
|
import"./index-q8hm27yj.js";
|
|
55
55
|
import"./index-n832052r.js";
|
|
56
56
|
import"./index-dtn0pne5.js";
|
|
57
57
|
import"./index-z6xqpmqg.js";
|
|
58
58
|
import"./index-r3mvsbtq.js";
|
|
59
|
-
import"./index-
|
|
60
|
-
import"./index-
|
|
59
|
+
import"./index-etdtfhhv.js";
|
|
60
|
+
import"./index-zkgrayya.js";
|
|
61
61
|
import"./index-9e6fdz2h.js";
|
|
62
62
|
import"./index-4rhhvd1a.js";
|
|
63
|
-
import"./index-
|
|
63
|
+
import"./index-k55td019.js";
|
|
64
64
|
import"./index-c9zp4xwc.js";
|
|
65
65
|
import"./index-zjygnfay.js";
|
|
66
66
|
import"./index-ae75rja9.js";
|
|
67
|
-
import"./index-
|
|
68
|
-
import"./index-
|
|
67
|
+
import"./index-c6zyqgpq.js";
|
|
68
|
+
import"./index-d8st72j7.js";
|
|
69
69
|
import"./index-bk5tah7q.js";
|
|
70
|
-
import"./index-
|
|
70
|
+
import"./index-nqbqkx4c.js";
|
|
71
71
|
import"./index-dh5q6z7y.js";
|
|
72
72
|
import"./index-ed5ykebp.js";
|
|
73
|
-
import"./index-
|
|
73
|
+
import"./index-fx3em0dr.js";
|
|
74
74
|
import"./index-7g4c7s5r.js";
|
|
75
75
|
import"./index-bpmtbmy9.js";
|
|
76
76
|
import"./index-zgwm4ryv.js";
|
|
@@ -1,63 +1,63 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
createCuratorLLMDelegate
|
|
4
|
-
} from "./index-
|
|
5
|
-
import"./index-
|
|
6
|
-
import"./index-
|
|
7
|
-
import"./index-
|
|
8
|
-
import"./index-
|
|
9
|
-
import"./index-
|
|
4
|
+
} from "./index-qjge2m9r.js";
|
|
5
|
+
import"./index-s33ee2w3.js";
|
|
6
|
+
import"./index-et1jpj6z.js";
|
|
7
|
+
import"./index-h6wtxzvm.js";
|
|
8
|
+
import"./index-f4dmccpd.js";
|
|
9
|
+
import"./index-dq41vsf9.js";
|
|
10
10
|
import"./index-txdagbh7.js";
|
|
11
11
|
import"./index-134d35c1.js";
|
|
12
12
|
import"./index-3146wmgv.js";
|
|
13
|
-
import"./index-
|
|
14
|
-
import"./index-
|
|
15
|
-
import"./index-
|
|
13
|
+
import"./index-93pf824c.js";
|
|
14
|
+
import"./index-wrtgyvre.js";
|
|
15
|
+
import"./index-7qera0f6.js";
|
|
16
16
|
import"./index-70ha9e09.js";
|
|
17
17
|
import"./index-c8s9a3zh.js";
|
|
18
18
|
import"./index-9ss2m4rs.js";
|
|
19
|
-
import"./index-
|
|
19
|
+
import"./index-y14mwbk8.js";
|
|
20
20
|
import"./index-zsrtt42s.js";
|
|
21
|
-
import"./index-
|
|
21
|
+
import"./index-w9g58t3j.js";
|
|
22
22
|
import"./index-3f7hqtgg.js";
|
|
23
23
|
import"./index-awjx0wgk.js";
|
|
24
|
-
import"./index-
|
|
25
|
-
import"./index-
|
|
24
|
+
import"./index-mj6ndvee.js";
|
|
25
|
+
import"./index-f5axf6vq.js";
|
|
26
26
|
import"./index-rtry5xyf.js";
|
|
27
|
-
import"./index-
|
|
28
|
-
import"./index-
|
|
29
|
-
import"./index-
|
|
27
|
+
import"./index-t81fmfjj.js";
|
|
28
|
+
import"./index-xy0e0r5f.js";
|
|
29
|
+
import"./index-mbktm1ah.js";
|
|
30
30
|
import"./index-ddszzne4.js";
|
|
31
|
-
import"./index-
|
|
32
|
-
import"./index-
|
|
33
|
-
import"./index-
|
|
31
|
+
import"./index-ambz0ryy.js";
|
|
32
|
+
import"./index-y0ra2v4w.js";
|
|
33
|
+
import"./index-7619tk9a.js";
|
|
34
34
|
import"./index-556ja8an.js";
|
|
35
35
|
import"./index-4fwbbad3.js";
|
|
36
36
|
import"./index-b43rt5ph.js";
|
|
37
37
|
import"./index-q7sjgr1y.js";
|
|
38
|
-
import"./index-
|
|
39
|
-
import"./index-
|
|
40
|
-
import"./index-
|
|
38
|
+
import"./index-d1h4sf8f.js";
|
|
39
|
+
import"./index-gkv7s4xy.js";
|
|
40
|
+
import"./index-trmqq4wm.js";
|
|
41
41
|
import"./index-q8hm27yj.js";
|
|
42
42
|
import"./index-n832052r.js";
|
|
43
43
|
import"./index-dtn0pne5.js";
|
|
44
44
|
import"./index-z6xqpmqg.js";
|
|
45
45
|
import"./index-r3mvsbtq.js";
|
|
46
|
-
import"./index-
|
|
47
|
-
import"./index-
|
|
46
|
+
import"./index-etdtfhhv.js";
|
|
47
|
+
import"./index-zkgrayya.js";
|
|
48
48
|
import"./index-9e6fdz2h.js";
|
|
49
49
|
import"./index-4rhhvd1a.js";
|
|
50
|
-
import"./index-
|
|
50
|
+
import"./index-k55td019.js";
|
|
51
51
|
import"./index-c9zp4xwc.js";
|
|
52
52
|
import"./index-zjygnfay.js";
|
|
53
53
|
import"./index-ae75rja9.js";
|
|
54
|
-
import"./index-
|
|
55
|
-
import"./index-
|
|
54
|
+
import"./index-c6zyqgpq.js";
|
|
55
|
+
import"./index-d8st72j7.js";
|
|
56
56
|
import"./index-bk5tah7q.js";
|
|
57
|
-
import"./index-
|
|
57
|
+
import"./index-nqbqkx4c.js";
|
|
58
58
|
import"./index-dh5q6z7y.js";
|
|
59
59
|
import"./index-ed5ykebp.js";
|
|
60
|
-
import"./index-
|
|
60
|
+
import"./index-fx3em0dr.js";
|
|
61
61
|
import"./index-7g4c7s5r.js";
|
|
62
62
|
import"./index-bpmtbmy9.js";
|
|
63
63
|
import"./index-zgwm4ryv.js";
|