opencode-swarm 7.145.1 → 7.146.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/.opencode/skills/phase-wrap/SKILL.md +3 -2
- package/README.md +5 -1
- package/dist/cli/{config-doctor-96jmxr7s.js → config-doctor-vs6hvbew.js} +3 -3
- package/dist/cli/{core-w78pc1hh.js → core-jvvm935f.js} +2 -2
- package/dist/cli/{curation-policy-smyc2mrm.js → curation-policy-xv0j8zyt.js} +6 -6
- package/dist/cli/{curator-59hzdxrv.js → curator-5bxh1djq.js} +28 -28
- package/dist/cli/{curator-llm-factory-g794pv51.js → curator-llm-factory-pe6skby4.js} +28 -28
- package/dist/cli/{evidence-summary-service-41m0cna6.js → evidence-summary-service-6m9jmzk8.js} +12 -12
- package/dist/cli/{gate-evidence-7aywx7qa.js → gate-evidence-84sfx6g8.js} +7 -7
- package/dist/cli/{guardrail-explain-j88dhm6w.js → guardrail-explain-jhbxq8yb.js} +29 -29
- package/dist/cli/{guardrail-log-xcb3ke8s.js → guardrail-log-vpbp3rm4.js} +4 -4
- package/dist/cli/{hive-promoter-nnnx5692.js → hive-promoter-mmmfszv8.js} +28 -28
- package/dist/cli/{index-34tawmyx.js → index-0a0asz2s.js} +1 -1
- package/dist/cli/{index-2qrd8mfa.js → index-4p3qfb05.js} +1 -1
- package/dist/cli/{index-gey2257h.js → index-5e5a1y2r.js} +1 -1
- package/dist/cli/{index-17e73wac.js → index-5qwmpamg.js} +1 -1
- package/dist/cli/{index-41t3hgaa.js → index-92cxd0r1.js} +247 -29
- package/dist/cli/{index-rtkttser.js → index-97psh79d.js} +1 -1
- package/dist/cli/{index-gf03198s.js → index-bghwrr59.js} +1 -1
- package/dist/cli/{index-tw8ck794.js → index-bma2wrqx.js} +2 -2
- package/dist/cli/{index-v3y3qg48.js → index-cpg98bh1.js} +17 -1
- package/dist/cli/{index-kxzgnz2h.js → index-d4e6wpkg.js} +14 -7
- package/dist/cli/{index-sfemjcb8.js → index-f17j50dx.js} +5 -5
- package/dist/cli/{index-7axx11dt.js → index-fay8h6v8.js} +25 -5
- package/dist/cli/{index-19v4tccw.js → index-fyr2wbvz.js} +2 -2
- package/dist/cli/{index-cqfp05jb.js → index-fzqhn96z.js} +3 -3
- package/dist/cli/{index-mrkgxfeh.js → index-g3xt1d16.js} +4 -4
- package/dist/cli/{index-evpgszmp.js → index-gxbhp7sx.js} +2 -2
- package/dist/cli/{index-mpf01swm.js → index-j20fzn0w.js} +2 -2
- package/dist/cli/{index-xz4x17z0.js → index-j43qndgc.js} +30 -30
- package/dist/cli/{index-neh8azwc.js → index-jfcgnvg6.js} +3 -3
- package/dist/cli/{index-qpke2x5h.js → index-kfmee1cr.js} +6 -6
- package/dist/cli/{index-4evasm2b.js → index-kggqpefz.js} +5 -5
- package/dist/cli/{index-90w06fqr.js → index-kwxp0z0n.js} +4 -4
- package/dist/cli/{index-b7ntt9cw.js → index-n6ke10ck.js} +4 -4
- package/dist/cli/{index-fwnhh6s7.js → index-nsr5b69r.js} +2 -2
- package/dist/cli/{index-bst6epnr.js → index-pz2py5v7.js} +1876 -1065
- package/dist/cli/{index-8ef23wex.js → index-q2mvacjr.js} +4 -4
- package/dist/cli/{index-dppzthm9.js → index-qyvjp0bq.js} +2 -2
- package/dist/cli/{index-tm0bezd9.js → index-s8qyaqs2.js} +1 -1
- package/dist/cli/{index-ymyke19q.js → index-vk15nbh4.js} +2 -2
- package/dist/cli/{index-dzan8czb.js → index-x8pm918t.js} +1 -1
- package/dist/cli/{index-ff66fbjt.js → index-zd1mfygt.js} +177 -29
- package/dist/cli/{index-zpp507z0.js → index-zsmsy1dh.js} +2 -2
- package/dist/cli/index.js +28 -28
- package/dist/cli/{knowledge-escalator-s6acdpwj.js → knowledge-escalator-c9p3w12b.js} +12 -12
- package/dist/cli/{knowledge-events-jprkz49t.js → knowledge-events-d201414m.js} +10 -10
- package/dist/cli/{knowledge-link-zvtmj756.js → knowledge-link-82ew2yc4.js} +5 -5
- package/dist/cli/{knowledge-store-mc4awds4.js → knowledge-store-ds45k9th.js} +6 -6
- package/dist/cli/{knowledge-validator-pe4ncrvj.js → knowledge-validator-707vsncy.js} +8 -8
- package/dist/cli/{model-preflight-77dwxfv5.js → model-preflight-7ea00h34.js} +1 -1
- package/dist/cli/{pending-delegations-epzht3d7.js → pending-delegations-kkrczqv7.js} +3 -3
- package/dist/cli/{pr-subscriptions-2ahy8g87.js → pr-subscriptions-2xn238xt.js} +3 -3
- package/dist/cli/{runner-ra9pjhp2.js → runner-pqsf809k.js} +6 -6
- package/dist/cli/{scan-cursor-hdzhqwzj.js → scan-cursor-znhqb8xa.js} +7 -7
- package/dist/cli/{schema-pg85z06v.js → schema-dnnm0p40.js} +2 -2
- package/dist/cli/{scope-persistence-v8we8ja7.js → scope-persistence-4n24a1e2.js} +8 -8
- package/dist/cli/{skill-generator-ctskfct2.js → skill-generator-5s0p3y8k.js} +14 -14
- package/dist/cli/{telemetry-c21dgffc.js → telemetry-t109dhv7.js} +1 -1
- package/dist/cli/{worktree-collision-ownership-f7se4wbf.js → worktree-collision-ownership-2jtg2my1.js} +3 -3
- package/dist/cli/{worktree-isolation-j4qb7mgb.js → worktree-isolation-1v2mythh.js} +28 -28
- package/dist/commands/memory.d.ts +8 -0
- package/dist/commands/registry.d.ts +8 -0
- package/dist/config/schema.d.ts +16 -2
- package/dist/evidence/task-gate-repair.d.ts +26 -0
- package/dist/evidence/task-gate-requirements.d.ts +20 -0
- package/dist/gate-evidence.d.ts +7 -0
- package/dist/hooks/knowledge-receipt-ledger-storage.d.ts +2 -0
- package/dist/hooks/knowledge-receipt-ledger.d.ts +72 -3
- package/dist/hooks/knowledge-receipt-observability.d.ts +1 -1
- package/dist/hooks/phase-complete-directive-gate.d.ts +9 -0
- package/dist/index.js +593 -537
- package/dist/memory/config.d.ts +20 -0
- package/dist/memory/errors.d.ts +14 -0
- package/dist/memory/gateway.d.ts +32 -0
- package/dist/memory/index.d.ts +3 -2
- package/dist/memory/pii.d.ts +66 -0
- package/dist/memory/prompt-block.d.ts +1 -1
- package/dist/memory/provider.d.ts +15 -0
- package/dist/memory/redaction.d.ts +31 -8
- package/dist/memory/schema.d.ts +18 -0
- package/dist/memory/sentinel.d.ts +12 -0
- package/dist/memory/sqlite-provider.d.ts +93 -0
- package/dist/memory/types.d.ts +9 -0
- package/dist/plan/manager.d.ts +8 -0
- package/dist/review/diff-source.d.ts +30 -0
- package/dist/review/engine.d.ts +1 -0
- package/dist/review/evidence.d.ts +16 -2
- package/dist/review/phase-runner.d.ts +1 -0
- package/dist/tools/completion-verify.d.ts +2 -0
- package/dist/tools/convene-council.d.ts +1 -1
- package/dist/tools/index.d.ts +4 -0
- package/dist/tools/manifest.d.ts +4 -0
- package/dist/tools/phase-complete/gates/final-review-gate.d.ts +3 -3
- package/dist/tools/phase-complete/gates/types.d.ts +2 -2
- package/dist/tools/phase-complete/preflight-report.d.ts +66 -0
- package/dist/tools/phase-complete/snapshot-identity.d.ts +1 -0
- package/dist/tools/phase-complete.d.ts +66 -3
- package/dist/tools/record-directive-override.d.ts +14 -0
- package/dist/tools/repair-gate-evidence.d.ts +6 -0
- package/dist/tools/repair-knowledge-receipt-ledger.d.ts +27 -0
- package/dist/tools/run-phase-review.d.ts +37 -0
- package/dist/tools/submit-phase-council-verdicts.d.ts +1 -1
- package/dist/tools/tool-metadata.d.ts +32 -16
- package/dist/tools/write-final-council-evidence.d.ts +1 -1
- package/dist/tools/write-retro.d.ts +2 -0
- package/package.json +12 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { atomicWriteFsynced, type ReceiptLedgerPaths, type ReceiptStoreErrorCode } from './knowledge-receipt-ledger-storage.js';
|
|
1
|
+
import { appendFsynced, atomicWriteFsynced, type ReceiptLedgerPaths, type ReceiptStoreErrorCode } from './knowledge-receipt-ledger-storage.js';
|
|
2
2
|
import { type KnowledgeReceiptTransitionObservation } from './knowledge-receipt-observability.js';
|
|
3
3
|
/**
|
|
4
4
|
* Canonical terminal-outcome vocabulary for the authoritative receipt ledger
|
|
@@ -27,7 +27,7 @@ export declare const RECEIPT_TERMINAL_OUTCOMES: ReadonlySet<ReceiptOutcome>;
|
|
|
27
27
|
* preserved as `'unknown'` and is never coerced to delegate, ignored, or any
|
|
28
28
|
* other class. New producers must stamp one of the closed values below.
|
|
29
29
|
*/
|
|
30
|
-
export type ReceiptSourceCode = 'delegate' | 'reviewer' | 'architect' | 'architect_marker' | 'test_engineer' | 'phase_override' | '
|
|
30
|
+
export type ReceiptSourceCode = 'delegate' | 'reviewer' | 'architect' | 'architect_marker' | 'test_engineer' | 'phase_override' | 'application_gate_staleness_release' | 'application_gate_denial_limit_release' | 'manual' | 'migration' | 'unknown';
|
|
31
31
|
/** Closed set form of {@link ReceiptSourceCode}. */
|
|
32
32
|
export declare const CANONICAL_RECEIPT_SOURCES: ReadonlySet<string>;
|
|
33
33
|
/**
|
|
@@ -65,6 +65,13 @@ export interface ReceiptApplicationMarker {
|
|
|
65
65
|
event_id: string;
|
|
66
66
|
committed_at: string;
|
|
67
67
|
}
|
|
68
|
+
export interface ReceiptGateRelease {
|
|
69
|
+
source: string;
|
|
70
|
+
reason?: string;
|
|
71
|
+
event_id: string;
|
|
72
|
+
committed_at: string;
|
|
73
|
+
membership_event_id: string;
|
|
74
|
+
}
|
|
68
75
|
export interface ReceiptMembership {
|
|
69
76
|
trace_id: string;
|
|
70
77
|
entry_id: string;
|
|
@@ -84,11 +91,24 @@ export interface ReceiptMembership {
|
|
|
84
91
|
/** Append-only audited terminal transitions; `terminal` is the current gate state. */
|
|
85
92
|
terminal_history?: ReceiptTerminal[];
|
|
86
93
|
application_marker?: ReceiptApplicationMarker;
|
|
94
|
+
gate_release?: ReceiptGateRelease;
|
|
87
95
|
cohort_id?: string;
|
|
88
96
|
source_link_id?: string;
|
|
89
97
|
exposure_kind: ReceiptExposureKind;
|
|
90
98
|
origin: 'v2' | 'legacy';
|
|
91
99
|
}
|
|
100
|
+
export interface ReceiptRepairUncertainty {
|
|
101
|
+
phase: string;
|
|
102
|
+
session_id: string;
|
|
103
|
+
task_id?: string;
|
|
104
|
+
reason: string;
|
|
105
|
+
repair_id: string;
|
|
106
|
+
installed_at: string;
|
|
107
|
+
raw_journal_sha256: string;
|
|
108
|
+
raw_journal_bytes: number;
|
|
109
|
+
salvage_through_seq: number;
|
|
110
|
+
salvage_through_hash: string;
|
|
111
|
+
}
|
|
92
112
|
export type ReceiptExposureKind = 'architect_directive' | 'delegate_directive' | 'manual_recall' | 'legacy_unknown';
|
|
93
113
|
interface EmptyTrace {
|
|
94
114
|
trace_id: string;
|
|
@@ -122,7 +142,7 @@ interface ReceiptAuditSummary {
|
|
|
122
142
|
entry_ids?: string[];
|
|
123
143
|
reason_codes?: string[];
|
|
124
144
|
}
|
|
125
|
-
export type ReceiptTransitionKind = 'membership_committed' | 'empty_retrieval_committed' | 'terminal_committed' | 'terminal_attempt_rejected' | 'terminal_attempt_idempotent' | 'authorized_transition_committed' | 'application_marker_committed' | 'phase_close_intent' | 'phase_closed' | 'legacy_imported' | 'legacy_unverifiable' | 'cutover_completed' | 'checkpoint';
|
|
145
|
+
export type ReceiptTransitionKind = 'membership_committed' | 'empty_retrieval_committed' | 'terminal_committed' | 'terminal_attempt_rejected' | 'terminal_attempt_idempotent' | 'authorized_transition_committed' | 'application_marker_committed' | 'gate_release_committed' | 'phase_close_intent' | 'phase_closed' | 'repair_uncertainty_installed' | 'repair_uncertainty_cleared' | 'legacy_imported' | 'legacy_unverifiable' | 'cutover_completed' | 'checkpoint';
|
|
126
146
|
interface LedgerState {
|
|
127
147
|
memberships: Map<string, ReceiptMembership>;
|
|
128
148
|
traceIds: Set<string>;
|
|
@@ -132,6 +152,7 @@ interface LedgerState {
|
|
|
132
152
|
legacyTraceRegistry: Set<string>;
|
|
133
153
|
legacyUnverifiableTraceIds: Set<string>;
|
|
134
154
|
phaseLifecycle: Map<string, PhaseLifecycle>;
|
|
155
|
+
repairUncertainties: Map<string, ReceiptRepairUncertainty>;
|
|
135
156
|
auditTail: ReceiptAuditSummary[];
|
|
136
157
|
lastSeq: number;
|
|
137
158
|
lastHash: string;
|
|
@@ -149,6 +170,25 @@ export type ReceiptLedgerResult<T> = ({
|
|
|
149
170
|
ok: true;
|
|
150
171
|
} & T) | ReceiptUnavailable;
|
|
151
172
|
declare function writeSnapshot(paths: ReceiptLedgerPaths, state: LedgerState): Promise<void>;
|
|
173
|
+
export interface RepairKnowledgeReceiptLedgerInput {
|
|
174
|
+
phase: string;
|
|
175
|
+
session_id: string;
|
|
176
|
+
task_id?: string;
|
|
177
|
+
reason: string;
|
|
178
|
+
grace_days?: number;
|
|
179
|
+
}
|
|
180
|
+
export interface ReceiptRepairReevaluationProof {
|
|
181
|
+
repair_id: string;
|
|
182
|
+
/** Exact producer assertion that this retrieval covered the full repaired scope. */
|
|
183
|
+
scope_complete: boolean;
|
|
184
|
+
}
|
|
185
|
+
export declare function repairKnowledgeReceiptLedger(directory: string, input: RepairKnowledgeReceiptLedgerInput): Promise<ReceiptLedgerResult<{
|
|
186
|
+
status: 'validated_projection' | 'repaired_authority' | 'pending_re_evaluation';
|
|
187
|
+
pending_re_evaluation: boolean;
|
|
188
|
+
repair_id?: string;
|
|
189
|
+
salvage_through_seq: number;
|
|
190
|
+
salvage_through_hash: string;
|
|
191
|
+
}>>;
|
|
152
192
|
export interface CommitDisplayedMembershipInput {
|
|
153
193
|
trace_id: string;
|
|
154
194
|
session_id: string;
|
|
@@ -166,6 +206,8 @@ export interface CommitDisplayedMembershipInput {
|
|
|
166
206
|
source_link_id?: string;
|
|
167
207
|
/** Producer provenance used by application gates; omitted callers fail closed. */
|
|
168
208
|
exposure_kind?: ReceiptExposureKind;
|
|
209
|
+
/** Explicit repair-bound proof; ordinary retrievals intentionally omit this. */
|
|
210
|
+
repair_re_evaluation?: ReceiptRepairReevaluationProof;
|
|
169
211
|
}
|
|
170
212
|
export declare function commitDisplayedMembership(directory: string, input: CommitDisplayedMembershipInput): Promise<ReceiptLedgerResult<{
|
|
171
213
|
event_id: string;
|
|
@@ -261,6 +303,31 @@ declare function commitApplicationMarkerBatch(directory: string, input: Applicat
|
|
|
261
303
|
reason: string;
|
|
262
304
|
}>;
|
|
263
305
|
}>>;
|
|
306
|
+
export interface GateReleaseBatchInput {
|
|
307
|
+
trace_id: string;
|
|
308
|
+
session_id: string;
|
|
309
|
+
grace_days?: number;
|
|
310
|
+
items: Array<{
|
|
311
|
+
entry_id: string;
|
|
312
|
+
source?: string;
|
|
313
|
+
reason?: string;
|
|
314
|
+
}>;
|
|
315
|
+
}
|
|
316
|
+
export declare function commitGateReleaseBatch(directory: string, input: GateReleaseBatchInput): Promise<ReceiptLedgerResult<{
|
|
317
|
+
committed: Array<{
|
|
318
|
+
entry_id: string;
|
|
319
|
+
event_id: string;
|
|
320
|
+
membership_event_id: string;
|
|
321
|
+
}>;
|
|
322
|
+
idempotent: Array<{
|
|
323
|
+
entry_id: string;
|
|
324
|
+
event_id: string;
|
|
325
|
+
}>;
|
|
326
|
+
rejected: Array<{
|
|
327
|
+
entry_id: string;
|
|
328
|
+
reason: string;
|
|
329
|
+
}>;
|
|
330
|
+
}>>;
|
|
264
331
|
export interface ApplicationOutcomeBatchInput {
|
|
265
332
|
trace_id: string;
|
|
266
333
|
session_id: string;
|
|
@@ -334,10 +401,12 @@ export declare const _internals: {
|
|
|
334
401
|
nowMs: () => number;
|
|
335
402
|
writeSnapshot: typeof writeSnapshot;
|
|
336
403
|
atomicWriteFsynced: typeof atomicWriteFsynced;
|
|
404
|
+
appendFsynced: typeof appendFsynced;
|
|
337
405
|
/** Test-only migration fixture for pre-atomic marker-only state. */
|
|
338
406
|
commitApplicationMarkerBatch: typeof commitApplicationMarkerBatch;
|
|
339
407
|
maxJournalRecords: number;
|
|
340
408
|
maxArchiveRecords: number;
|
|
341
409
|
maxArchiveBytes: number;
|
|
410
|
+
maxRepairQuarantineRecords: number;
|
|
342
411
|
};
|
|
343
412
|
export {};
|
|
@@ -21,7 +21,7 @@ export declare const RECEIPT_SEMANTICS_VERSION = 2;
|
|
|
21
21
|
* `no_relevant` tombstone that closes an empty retrieval (not a terminal).
|
|
22
22
|
*/
|
|
23
23
|
export type ReceiptObservationOutcome = ReceiptOutcome | 'no_relevant';
|
|
24
|
-
export type KnowledgeReceiptObservedTransition = 'membership_committed' | 'empty_retrieval_committed' | 'terminal_committed' | 'terminal_attempt_rejected' | 'terminal_attempt_idempotent' | 'authorized_transition_committed' | 'application_marker_committed' | 'phase_close_intent' | 'phase_closed' | 'legacy_imported' | 'legacy_unverifiable' | 'cutover_completed' | 'checkpoint';
|
|
24
|
+
export type KnowledgeReceiptObservedTransition = 'membership_committed' | 'empty_retrieval_committed' | 'terminal_committed' | 'terminal_attempt_rejected' | 'terminal_attempt_idempotent' | 'authorized_transition_committed' | 'application_marker_committed' | 'gate_release_committed' | 'phase_close_intent' | 'phase_closed' | 'repair_uncertainty_installed' | 'repair_uncertainty_cleared' | 'legacy_imported' | 'legacy_unverifiable' | 'cutover_completed' | 'checkpoint';
|
|
25
25
|
export type KnowledgeReceiptObservationReasonCode = 'committed' | 'idempotent' | 'trace_not_found' | 'id_not_in_trace' | 'wrong_session' | 'wrong_phase' | 'wrong_task' | 'duplicate_conflicting_terminal' | 'event_id_conflict' | 'invalid_outcome' | 'empty_receipt' | 'lock_timeout' | 'store_unavailable' | 'store_corrupt' | 'legacy_unverifiable' | 'unauthorized_transition';
|
|
26
26
|
export interface KnowledgeReceiptTransitionObservation {
|
|
27
27
|
transition: KnowledgeReceiptObservedTransition;
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
* surfaces as a block, never a silent pass.
|
|
18
18
|
*/
|
|
19
19
|
export type DirectiveBlockReason = 'no_verdict' | 'unremediated_violation';
|
|
20
|
+
export type DirectiveGateFailureCode = 'RECEIPT_MISSING' | 'RECEIPT_CORRUPT' | 'RECEIPT_LOCK_TIMEOUT' | 'RECEIPT_WRONG_ROOT' | 'RECEIPT_PERMISSION' | 'RECEIPT_TRANSIENT' | 'RECEIPT_STORE_UNAVAILABLE';
|
|
20
21
|
export interface DirectiveGateResult {
|
|
21
22
|
blocked: boolean;
|
|
22
23
|
unresolved: Array<{
|
|
@@ -27,6 +28,14 @@ export interface DirectiveGateResult {
|
|
|
27
28
|
overridden: string[];
|
|
28
29
|
/** True when the gate could not read its inputs (fail-closed → blocked). */
|
|
29
30
|
failedClosed: boolean;
|
|
31
|
+
failure?: {
|
|
32
|
+
code: DirectiveGateFailureCode;
|
|
33
|
+
action_id: 'knowledge_receipt' | 'phase_complete' | 'repair_knowledge_receipt_ledger';
|
|
34
|
+
};
|
|
35
|
+
recovery?: {
|
|
36
|
+
kind: 'tool' | 'retry';
|
|
37
|
+
action: 'knowledge_receipt' | 'phase_complete' | 'repair_knowledge_receipt_ledger';
|
|
38
|
+
};
|
|
30
39
|
}
|
|
31
40
|
/**
|
|
32
41
|
* Evaluate all critical directives shown during the phase. Fail-closed.
|