opencode-swarm 7.142.0 → 7.143.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.
Files changed (75) hide show
  1. package/.opencode/skills/execute/SKILL.md +1 -1
  2. package/.opencode/skills/phase-wrap/SKILL.md +2 -2
  3. package/dist/cli/{config-doctor-7xqerhnw.js → config-doctor-t1r5qwxk.js} +2 -2
  4. package/dist/cli/{core-nwmpg9t8.js → core-e30p4vz9.js} +1 -1
  5. package/dist/cli/{curation-policy-bzk13bj2.js → curation-policy-pkb2eeb1.js} +6 -6
  6. package/dist/cli/{curator-3wsaz7ay.js → curator-ctasdmmq.js} +29 -29
  7. package/dist/cli/curator-drift-49p3jnte.js +1 -1
  8. package/dist/cli/{curator-llm-factory-kbkddqk2.js → curator-llm-factory-y9xg7k6k.js} +29 -29
  9. package/dist/cli/{evidence-summary-service-wwfvpvxq.js → evidence-summary-service-7bmg5r8y.js} +13 -11
  10. package/dist/cli/{gate-evidence-3mazsjrq.js → gate-evidence-1v0cj4c6.js} +9 -5
  11. package/dist/cli/{guardrail-explain-rmz1yjzw.js → guardrail-explain-6x9psbwz.js} +30 -30
  12. package/dist/cli/{guardrail-log-8m4dnkgd.js → guardrail-log-pma4m8vr.js} +4 -4
  13. package/dist/cli/{hive-promoter-ss8dm52r.js → hive-promoter-g16grej1.js} +29 -29
  14. package/dist/cli/{index-kkxt9g8d.js → index-15h4dpsn.js} +3 -3
  15. package/dist/cli/{index-ae0j9qpc.js → index-1g473508.js} +31 -31
  16. package/dist/cli/{index-67vxmh1v.js → index-28jr28fg.js} +9 -9
  17. package/dist/cli/{index-vwyamc2d.js → index-2n8y67b4.js} +2 -2
  18. package/dist/cli/{index-ad93kz8m.js → index-336ra397.js} +1 -1
  19. package/dist/cli/{index-8g5aa1s7.js → index-6texwk9p.js} +2 -2
  20. package/dist/cli/{index-520ev2d7.js → index-7c4bxgdh.js} +1 -1
  21. package/dist/cli/{index-99eftm6b.js → index-82m5kwtd.js} +1 -1
  22. package/dist/cli/{index-mbeqw4cb.js → index-96h1v2jw.js} +1 -1
  23. package/dist/cli/{index-eytxcbm8.js → index-9v53ez3a.js} +6 -6
  24. package/dist/cli/{index-em1kfnss.js → index-erfnw81g.js} +3 -3
  25. package/dist/cli/index-fhxh447f.js +1372 -0
  26. package/dist/cli/{index-z7eeq0tt.js → index-fprxtq3q.js} +137 -36
  27. package/dist/cli/{index-e4y7mfp0.js → index-g0pbvfhw.js} +1 -1
  28. package/dist/cli/{index-hncahn40.js → index-htmsm37t.js} +5 -5
  29. package/dist/cli/{index-bd2h7r2w.js → index-k31en0ja.js} +3 -3
  30. package/dist/cli/{index-0dvx8f03.js → index-k92cagmt.js} +2 -2
  31. package/dist/cli/{index-26ynh10w.js → index-keskta0w.js} +9 -9
  32. package/dist/cli/{index-tzbd5050.js → index-kxpz3ncd.js} +4 -4
  33. package/dist/cli/{index-56knmbwf.js → index-m4v9kab1.js} +2615 -2048
  34. package/dist/cli/{index-2p3h7det.js → index-n96ay8w4.js} +1 -1
  35. package/dist/cli/{index-v8f3wa0e.js → index-q8st0mtw.js} +1 -1
  36. package/dist/cli/{index-sh3r66tt.js → index-r0tn9kpa.js} +1 -1
  37. package/dist/cli/{index-338zfvff.js → index-s2rcz51a.js} +1 -1
  38. package/dist/cli/{index-hgydkvty.js → index-s89y08tk.js} +2 -2
  39. package/dist/cli/{index-amepv9dh.js → index-sb16w4wj.js} +212 -10
  40. package/dist/cli/{index-ycd63sz3.js → index-tq5s07ta.js} +1 -1
  41. package/dist/cli/{index-gcn7tsr3.js → index-w7x7qxz2.js} +1 -1
  42. package/dist/cli/{index-7c5xtcfm.js → index-x6qq39e9.js} +3 -3
  43. package/dist/cli/{index-78p6nvcv.js → index-y9h2vqf6.js} +1 -1
  44. package/dist/cli/index.js +29 -29
  45. package/dist/cli/{knowledge-escalator-w235g6ce.js → knowledge-escalator-1b2hmcgn.js} +12 -12
  46. package/dist/cli/{knowledge-events-amn94djz.js → knowledge-events-vx4fqjzb.js} +10 -10
  47. package/dist/cli/{knowledge-link-xned4jbm.js → knowledge-link-fn5j3r4q.js} +5 -5
  48. package/dist/cli/{knowledge-store-3vb855ta.js → knowledge-store-t2qyr4yr.js} +6 -6
  49. package/dist/cli/{knowledge-validator-a8c185hw.js → knowledge-validator-c7871bjc.js} +8 -8
  50. package/dist/cli/{pending-delegations-8ccjby4b.js → pending-delegations-0hb97ps1.js} +4 -4
  51. package/dist/cli/{pr-subscriptions-gn7r3bg7.js → pr-subscriptions-b63t252j.js} +4 -4
  52. package/dist/cli/{runner-rhgkhy5e.js → runner-hrg7h2h4.js} +6 -6
  53. package/dist/cli/{scan-cursor-vjbjm140.js → scan-cursor-pnbpfjjc.js} +7 -7
  54. package/dist/cli/{schema-dd8mzm6k.js → schema-47xpcghn.js} +1 -1
  55. package/dist/cli/{scope-persistence-8j8d4874.js → scope-persistence-wxx1jpfw.js} +6 -6
  56. package/dist/cli/{skill-generator-a4apb7c2.js → skill-generator-s456hfta.js} +14 -14
  57. package/dist/cli/{telemetry-k9nxy24s.js → telemetry-xyfb5vm8.js} +1 -1
  58. package/dist/cli/{worktree-collision-ownership-183jk2dv.js → worktree-collision-ownership-ymdxetnn.js} +4 -4
  59. package/dist/cli/{worktree-isolation-j71zz7g9.js → worktree-isolation-d0xgp705.js} +29 -29
  60. package/dist/commands/close.d.ts +20 -2
  61. package/dist/gate-evidence.d.ts +24 -1
  62. package/dist/hooks/delegation-gate.d.ts +65 -0
  63. package/dist/index.js +462 -458
  64. package/dist/plan/ledger.d.ts +31 -1
  65. package/dist/plan/manager.d.ts +1 -0
  66. package/dist/state.d.ts +1 -1
  67. package/dist/workflow/close-terminal.d.ts +22 -0
  68. package/dist/workflow/coder-settlement.d.ts +0 -23
  69. package/dist/workflow/task-repair.d.ts +1 -0
  70. package/dist/workflow/task-terminal.d.ts +18 -23
  71. package/dist/workflow/workflow-wal-file.d.ts +20 -0
  72. package/dist/workflow/workflow-wal-schema.d.ts +67 -0
  73. package/dist/worktree/merge.d.ts +17 -0
  74. package/package.json +1 -1
  75. package/dist/cli/index-h2vpk15y.js +0 -623
@@ -62,6 +62,16 @@ export type LedgerEventInput = Omit<LedgerEvent, 'seq' | 'timestamp' | 'plan_has
62
62
  export interface SnapshotEventPayload {
63
63
  plan: Plan;
64
64
  payload_hash: string;
65
+ plan_epoch?: string;
66
+ root_event_hash?: string;
67
+ }
68
+ export interface PlanEpochIdentity {
69
+ planId: string;
70
+ planIdentityHash: string;
71
+ planEpoch: string;
72
+ rootEventHash: string;
73
+ payloadHash: string;
74
+ source: 'root' | 'plan_epoch_adopted';
65
75
  }
66
76
  /**
67
77
  * Error thrown when a writer attempts to append to the ledger with stale state.
@@ -173,6 +183,23 @@ export declare function readLedgerEvents(directory: string): Promise<LedgerEvent
173
183
  * @param planId - Unique identifier for the plan
174
184
  */
175
185
  export declare function initLedger(directory: string, planId: string, initialPlanHash?: string, initialPlan?: Plan): Promise<void>;
186
+ /**
187
+ * Read and validate the current plan epoch identity without creating,
188
+ * adopting, or appending any ledger state.
189
+ *
190
+ * Returns null when the ledger is absent or when a legacy ledger has not yet
191
+ * adopted an epoch. Invalid or conflicting epoch metadata still fails closed.
192
+ */
193
+ export declare function readPlanEpochIdentity(directory: string, authoritativePlan: Plan): Promise<PlanEpochIdentity | null>;
194
+ /**
195
+ * Return the persisted plan epoch for the authoritative ledger root, adopting
196
+ * one backward-readable snapshot when a legacy root predates the epoch field.
197
+ *
198
+ * The caller is expected to already hold the higher-level plan lock. This
199
+ * helper acquires only the ledger append lock so concurrent adopters serialize
200
+ * to one adoption snapshot.
201
+ */
202
+ export declare function getOrAdoptPlanEpochUnderLock(directory: string, authoritativePlan: Plan): Promise<PlanEpochIdentity>;
176
203
  /**
177
204
  * Append a new event to the ledger.
178
205
  * Uses atomic write: write to temp file then rename.
@@ -390,7 +417,9 @@ export interface LedgerIntegrityResult {
390
417
  * @param directory - The working directory
391
418
  * @returns LedgerIntegrityResult with events, truncated flag, and bad suffix
392
419
  */
393
- export declare function readLedgerEventsWithIntegrity(directory: string): Promise<LedgerIntegrityResult>;
420
+ export declare function readLedgerEventsWithIntegrity(directory: string, options?: {
421
+ failClosedOnReadError?: boolean;
422
+ }): Promise<LedgerIntegrityResult>;
394
423
  /**
395
424
  * Result of a {@link quarantineLedgerSuffix} call.
396
425
  */
@@ -516,5 +545,6 @@ export declare const _internals: {
516
545
  getPlanJsonPath: typeof getPlanJsonPath;
517
546
  writeFileFsyncedThenRename: typeof writeFileFsyncedThenRename;
518
547
  fsyncRecoveryDirectory: typeof fsyncRecoveryDirectory;
548
+ randomUUID: () => `${string}-${string}-${string}-${string}-${string}`;
519
549
  };
520
550
  export {};
@@ -214,6 +214,7 @@ export declare function isTaskSettled(directory: string, taskId: string): Promis
214
214
  export declare function updateTaskStatus(directory: string, taskId: string, status: TaskStatus, options?: {
215
215
  force?: boolean;
216
216
  planLockAlreadyHeld?: boolean;
217
+ terminalReconciliation?: boolean;
217
218
  }): Promise<Plan>;
218
219
  /**
219
220
  * Generate deterministic markdown view from plan object.
package/dist/state.d.ts CHANGED
@@ -64,7 +64,7 @@ export interface PrSubscriptionState {
64
64
  * Per-task workflow state for gate progression tracking.
65
65
  * Transitions must be forward-only: idle → coder_delegated → pre_check_passed → reviewer_run → tests_run → complete
66
66
  */
67
- export type TaskWorkflowState = 'idle' | 'coder_delegated' | 'pre_check_passed' | 'reviewer_run' | 'tests_run' | 'rework_required' | 'complete' | 'blocked';
67
+ export type TaskWorkflowState = 'idle' | 'coder_delegated' | 'pre_check_passed' | 'reviewer_run' | 'tests_run' | 'rework_required' | 'complete' | 'blocked' | 'closed';
68
68
  export interface TaskWorkflowCacheEntry {
69
69
  generation: number;
70
70
  retryCount: number;
@@ -0,0 +1,22 @@
1
+ import type { Plan } from '../config/plan-schema.js';
2
+ export interface CloseTerminalResult {
3
+ plan: Plan;
4
+ closedTaskIds: string[];
5
+ preservedCompletedTaskIds: string[];
6
+ closedPhaseIds: number[];
7
+ /**
8
+ * Tasks whose terminal state was settled as a QA-exempt forced completion — either
9
+ * recorded as such by this reconciliation, or already carrying `forcedCompletion`
10
+ * in durable evidence from an earlier one. Surfaced so `/swarm close` can report
11
+ * that these tasks did not pass the normal gates; without it a forced completion is
12
+ * indistinguishable from a genuinely reviewed and tested one.
13
+ */
14
+ forcedCompletionTaskIds: string[];
15
+ }
16
+ /** Reconcile `/swarm close` intent with exact-task workflow authority. */
17
+ export declare function reconcileCloseTerminalState(directory: string, targetPlan: Plan, options: {
18
+ actor: string;
19
+ requestedClosedTaskIds: string[];
20
+ closedPhaseIds: number[];
21
+ originalStatuses?: Map<string, string>;
22
+ }): Promise<CloseTerminalResult>;
@@ -1,32 +1,11 @@
1
1
  import type { BackgroundTaskChangeContext, BackgroundWorktreeDescriptor } from '../background/pending-delegations.js';
2
2
  import { type TaskEvidence } from '../gate-evidence.js';
3
3
  import type { MergeOperationProvenance } from '../worktree/merge.js';
4
- type CoderSettlementState = 'ABORTED' | 'COMMITTED' | 'DISPATCHED' | 'PREPARED';
5
- interface CoderSettlementWal {
6
- version: 1;
7
- state: CoderSettlementState;
8
- taskId: string;
9
- transitionId: string;
10
- actor: string;
11
- processId: number;
12
- runtimeId: string;
13
- expectedGeneration: number;
14
- context: BackgroundTaskChangeContext;
15
- worktree?: BackgroundWorktreeDescriptor;
16
- observedFiles?: string[];
17
- mergeProvenance?: MergeOperationProvenance;
18
- accepted?: boolean;
19
- testEngineerExempt?: boolean;
20
- settlementFailed?: boolean;
21
- cleanupComplete?: boolean;
22
- recordedAt: string;
23
- }
24
4
  export interface CoderSettlementResult {
25
5
  evidence: TaskEvidence;
26
6
  accepted: boolean;
27
7
  alreadyApplied: boolean;
28
8
  }
29
- declare function parseWal(raw: string): CoderSettlementWal;
30
9
  export declare function beginCoderSettlement(options: {
31
10
  directory: string;
32
11
  taskId: string;
@@ -56,7 +35,5 @@ export declare function recoverCoderSettlement(directory: string, taskId: string
56
35
  export declare function releaseCoderDispatchOwnership(directory: string, taskId: string, transitionId: string): void;
57
36
  export declare function assertNoUnsettledCoderDispatch(directory: string, taskId: string): Promise<void>;
58
37
  export declare const _internals: {
59
- parseWal: typeof parseWal;
60
38
  liveDispatches: Set<string>;
61
39
  };
62
- export {};
@@ -10,6 +10,7 @@ export interface TaskRepairResult<TPlan> {
10
10
  * the task. This reads only the exact per-task WAL path; it never scans.
11
11
  */
12
12
  export declare function recoverPreparedTaskRepair(directory: string, taskId: string, actor: string): Promise<TaskRepairResult<NonNullable<Awaited<ReturnType<typeof loadPlanJsonOnly>>>> | null>;
13
+ export declare function recoverPreparedTaskRepairUnderPlanLock(directory: string, taskId: string, actor: string, currentPlan: NonNullable<Awaited<ReturnType<typeof loadPlanJsonOnly>>>): Promise<TaskRepairResult<NonNullable<Awaited<ReturnType<typeof loadPlanJsonOnly>>>> | null>;
13
14
  /**
14
15
  * Execute or lazily finish one exact-task repair while the caller holds the
15
16
  * plan lock. Lock ordering is therefore always plan -> exact task evidence.
@@ -1,28 +1,12 @@
1
1
  import type { Plan } from '../config/plan-schema.js';
2
2
  import { type TaskEvidence, withTaskEvidenceTransaction } from '../gate-evidence.js';
3
- import type { TaskWorkflowState } from '../state.js';
4
- type TerminalPlanStatus = 'blocked' | 'completed';
5
- type TerminalWorkflowState = 'blocked' | 'complete';
6
- type TerminalWalState = 'ABORTED' | 'COMMITTED' | 'PREPARED';
7
- interface TaskTerminalWal {
8
- version: 1;
9
- state: TerminalWalState;
10
- taskId: string;
11
- transitionId: string;
12
- actor: string;
13
- oldPlanStatus: string;
14
- newPlanStatus: TerminalPlanStatus;
15
- oldWorkflowState: TaskWorkflowState;
16
- newWorkflowState: TerminalWorkflowState;
17
- generation: number;
18
- qaExempt: boolean;
19
- recordedAt: string;
20
- }
3
+ import type { TaskTerminalWal, TerminalPlanStatus } from './workflow-wal-schema.js';
21
4
  export interface TaskTerminalResult<TPlan> {
22
5
  plan: TPlan;
23
6
  evidence: TaskEvidence;
24
7
  alreadyApplied: boolean;
25
8
  transitionId: string;
9
+ targetStatus: TerminalPlanStatus;
26
10
  }
27
11
  declare function applyTerminalEvidence(transaction: Parameters<Parameters<typeof withTaskEvidenceTransaction>[3]>[0], wal: TaskTerminalWal): Promise<TaskEvidence>;
28
12
  /** Narrow dependency-injection seam for crash-window failure tests. */
@@ -30,12 +14,16 @@ export declare const _internals: {
30
14
  applyTerminalEvidence: typeof applyTerminalEvidence;
31
15
  };
32
16
  /**
33
- * Lazily close the only recoverable terminal crash window: the plan was
34
- * persisted to completed/blocked after PREPARED, but exact-task evidence was
35
- * not. A PREPARED record whose plan and evidence are both still old is safely
36
- * aborted rather than executing an abandoned status request.
17
+ * Lazily close a recoverable terminal crash window: the WAL is PREPARED but the
18
+ * plan/evidence pair it describes has not settled. A v1 record whose plan and
19
+ * evidence are both still old is safely aborted rather than executing an
20
+ * abandoned completed/blocked request. A v2 (close) record is instead
21
+ * force-forwarded even from old plan and old evidence — its plan-epoch identity
22
+ * is re-verified first, and abandoning it would leave a task the caller already
23
+ * closed silently open.
37
24
  */
38
25
  export declare function recoverPreparedTaskTerminal(directory: string, taskId: string, actor: string): Promise<TaskTerminalResult<Plan> | null>;
26
+ export declare function recoverPreparedTaskTerminalUnderPlanLock(directory: string, taskId: string, actor: string, currentPlan: Plan): Promise<TaskTerminalResult<Plan> | null>;
39
27
  /** Commit a terminal plan/evidence transition while the caller holds plan.json. */
40
28
  export declare function commitTaskTerminalUnderPlanLock<TPlan>(options: {
41
29
  directory: string;
@@ -45,8 +33,15 @@ export declare function commitTaskTerminalUnderPlanLock<TPlan>(options: {
45
33
  currentPlanStatus: string;
46
34
  targetStatus: TerminalPlanStatus;
47
35
  qaExempt: boolean;
36
+ resolveTerminal?: (evidence: TaskEvidence | null) => {
37
+ targetStatus: TerminalPlanStatus;
38
+ qaExempt: boolean;
39
+ preserveEvidence?: boolean;
40
+ };
41
+ planIdentityHash?: string;
42
+ planEpoch?: string;
48
43
  currentPlan: TPlan;
49
44
  validateEvidence?: (evidence: TaskEvidence | null) => Promise<void> | void;
50
- updatePlan: () => Promise<TPlan>;
45
+ updatePlan: (targetStatus: TerminalPlanStatus) => Promise<TPlan>;
51
46
  }): Promise<TaskTerminalResult<TPlan>>;
52
47
  export {};
@@ -0,0 +1,20 @@
1
+ import * as fs from 'node:fs';
2
+ import { type FileHandle } from 'node:fs/promises';
3
+ import { type CoderSettlementWal, type TaskRepairWal, type TaskTerminalWal } from './workflow-wal-schema.js';
4
+ type WorkflowWalKind = 'coder-settlement' | 'task-repair' | 'task-terminal';
5
+ type WorkflowWalByKind = {
6
+ 'coder-settlement': CoderSettlementWal;
7
+ 'task-repair': TaskRepairWal;
8
+ 'task-terminal': TaskTerminalWal;
9
+ };
10
+ type OpenFile = (filePath: string, flags: string) => Promise<FileHandle>;
11
+ export declare const _internals: {
12
+ openFile: OpenFile;
13
+ openFileSync: typeof fs.openSync;
14
+ readFileSync: typeof fs.readSync;
15
+ closeFileSync: typeof fs.closeSync;
16
+ };
17
+ export declare function readWorkflowWalFile<K extends WorkflowWalKind>(kind: K, filePath: string, expectedTaskId: string): Promise<WorkflowWalByKind[K] | null>;
18
+ export declare function readWorkflowWalFileSync<K extends WorkflowWalKind>(kind: K, filePath: string, expectedTaskId: string): WorkflowWalByKind[K] | null;
19
+ export declare function writeWorkflowWalFile(kind: WorkflowWalKind, filePath: string, wal: CoderSettlementWal | TaskRepairWal | TaskTerminalWal): Promise<void>;
20
+ export {};
@@ -0,0 +1,67 @@
1
+ import type { BackgroundTaskChangeContext, BackgroundWorktreeDescriptor } from '../background/pending-delegations.js';
2
+ import type { TaskWorkflowState } from '../state.js';
3
+ import { type MergeOperationProvenance } from '../worktree/merge.js';
4
+ export type CoderSettlementState = 'ABORTED' | 'COMMITTED' | 'DISPATCHED' | 'PREPARED';
5
+ export interface CoderSettlementWal {
6
+ version: 1;
7
+ state: CoderSettlementState;
8
+ taskId: string;
9
+ transitionId: string;
10
+ actor: string;
11
+ processId: number;
12
+ runtimeId: string;
13
+ expectedGeneration: number;
14
+ context: BackgroundTaskChangeContext;
15
+ worktree?: BackgroundWorktreeDescriptor;
16
+ observedFiles?: string[];
17
+ mergeProvenance?: MergeOperationProvenance;
18
+ accepted?: boolean;
19
+ testEngineerExempt?: boolean;
20
+ settlementFailed?: boolean;
21
+ cleanupComplete?: boolean;
22
+ recordedAt: string;
23
+ }
24
+ export type RepairWalState = 'ABORTED' | 'COMMITTED' | 'PREPARED';
25
+ export interface TaskRepairWal {
26
+ version: 1;
27
+ state: RepairWalState;
28
+ taskId: string;
29
+ transitionId: string;
30
+ reason: string;
31
+ actor: string;
32
+ oldPlanStatus: string;
33
+ newPlanStatus: 'in_progress';
34
+ oldWorkflowState: string;
35
+ newWorkflowState: 'idle';
36
+ oldGeneration: number;
37
+ generation: number;
38
+ recordedAt: string;
39
+ }
40
+ export type TerminalWalState = 'ABORTED' | 'COMMITTED' | 'PREPARED';
41
+ export type TerminalPlanStatus = 'blocked' | 'closed' | 'completed';
42
+ export type TerminalWorkflowState = 'blocked' | 'closed' | 'complete';
43
+ export interface TaskTerminalWalV1 {
44
+ version: 1;
45
+ state: TerminalWalState;
46
+ taskId: string;
47
+ transitionId: string;
48
+ actor: string;
49
+ oldPlanStatus: string;
50
+ newPlanStatus: 'blocked' | 'completed';
51
+ oldWorkflowState: TaskWorkflowState;
52
+ newWorkflowState: 'blocked' | 'complete';
53
+ generation: number;
54
+ qaExempt: boolean;
55
+ recordedAt: string;
56
+ }
57
+ export interface TaskTerminalWalV2 extends Omit<TaskTerminalWalV1, 'version' | 'newPlanStatus' | 'newWorkflowState'> {
58
+ version: 2;
59
+ newPlanStatus: 'closed' | 'completed';
60
+ newWorkflowState: 'closed' | 'complete';
61
+ planIdentityHash: string;
62
+ planEpoch: string;
63
+ }
64
+ export type TaskTerminalWal = TaskTerminalWalV1 | TaskTerminalWalV2;
65
+ export declare function parseCoderSettlementWal(raw: string, filePath: string, expectedTaskId?: string): CoderSettlementWal;
66
+ export declare function parseTaskRepairWal(raw: string, filePath: string, expectedTaskId?: string): TaskRepairWal;
67
+ export declare function parseTaskTerminalWal(raw: string, filePath: string, expectedTaskId?: string): TaskTerminalWal;
@@ -99,6 +99,23 @@ export interface MergeOperationProvenance {
99
99
  branchName: string;
100
100
  strategy: MergeStrategy;
101
101
  }
102
+ /**
103
+ * Git object ids as written by `git rev-parse HEAD`: sha1 (40) today, sha256 (64)
104
+ * under the sha256 object format. Abbreviated ids are deliberately rejected —
105
+ * nothing in this codebase persists them. Constraining the shape also makes a
106
+ * leading `-` structurally impossible for values later passed to git as
107
+ * revisions, which matters because neither sink below passes a separator that
108
+ * would protect one today: the `git log` call's `--` sits after the range and
109
+ * separates pathspecs rather than options, and the
110
+ * `git merge-base --is-ancestor` call passes the revision bare. (Both commands
111
+ * would accept `--`/`--end-of-options` before the operand, so sink-side
112
+ * hardening is also available; this pattern guards the value itself.)
113
+ *
114
+ * Owned here beside `MergeOperationProvenance` because this module defines the
115
+ * struct whose head fields reach git argv; `workflow-wal-schema.ts` re-imports
116
+ * it so the two validation surfaces for the same values cannot drift apart.
117
+ */
118
+ export declare const GIT_OBJECT_ID_PATTERN: RegExp;
102
119
  export type MergeReconciliationResult = {
103
120
  landed: true;
104
121
  method: 'ancestry' | 'cherry-pick-trailer';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "7.142.0",
3
+ "version": "7.143.0",
4
4
  "description": "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",