opencode-swarm 7.174.0 → 7.175.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/binaries/win32-arm64/swarm-sandbox-runner.exe +0 -0
- package/binaries/win32-x64/swarm-sandbox-runner.exe +0 -0
- package/dist/background/pending-delegations.d.ts +10 -0
- package/dist/background/pr-review-contract.d.ts +3 -0
- package/dist/background/status-artifact.d.ts +24 -1
- package/dist/cli/{coder-settlement-pwct8te4.js → coder-settlement-f2n9yp7a.js} +7 -7
- package/dist/cli/{config-doctor-tnta65bf.js → config-doctor-zcyz614n.js} +2 -2
- package/dist/cli/{core-421gbna2.js → core-jar8cmzf.js} +1 -1
- package/dist/cli/{curation-policy-dw25zm05.js → curation-policy-e5p147bb.js} +4 -4
- package/dist/cli/{curator-yrhc4epa.js → curator-3xfz7wdp.js} +28 -28
- package/dist/cli/{curator-llm-factory-4e73613g.js → curator-llm-factory-rc7cqtx8.js} +28 -28
- package/dist/cli/{evidence-summary-service-f4vem356.js → evidence-summary-service-bpe04ngj.js} +11 -11
- package/dist/cli/{gate-evidence-t2dyfvc4.js → gate-evidence-pyzzafp3.js} +4 -4
- package/dist/cli/{guardrail-explain-hf5gawe2.js → guardrail-explain-ncrw7k8h.js} +29 -29
- package/dist/cli/{guardrail-log-9dkyvdbw.js → guardrail-log-nn2t8xyd.js} +6 -6
- package/dist/cli/{guardrail-reset-26bxnh2e.js → guardrail-reset-3c3c7e5e.js} +28 -28
- package/dist/cli/{hive-promoter-6s6xbq5x.js → hive-promoter-xfbabpnm.js} +28 -28
- package/dist/cli/{index-ddz0a0ew.js → index-20q20gpd.js} +1 -1
- package/dist/cli/{index-cw1nbtvh.js → index-2dv07mw2.js} +1 -1
- package/dist/cli/{index-bf6w27sb.js → index-4rm5saxs.js} +3 -3
- package/dist/cli/{index-dfey3jpn.js → index-6yqszgky.js} +2 -2
- package/dist/cli/{index-9gpf4tt4.js → index-8bbhh3kx.js} +7 -7
- package/dist/cli/{index-rjjtn1w5.js → index-96hz14wr.js} +2 -2
- package/dist/cli/{index-3yw5h3bt.js → index-98r0bh1c.js} +1 -1
- package/dist/cli/{index-fagcasf8.js → index-9gpe25nr.js} +5 -5
- package/dist/cli/{index-jd2f7thw.js → index-ar3ve24w.js} +503 -255
- package/dist/cli/{index-nxnmy2da.js → index-bmk77mpq.js} +4 -4
- package/dist/cli/{index-mjtja1wq.js → index-cpgh76bk.js} +1 -1
- package/dist/cli/{index-py58gern.js → index-d0wq7paf.js} +6 -6
- package/dist/cli/{index-s6wb6sjk.js → index-ddvva9fn.js} +4 -4
- package/dist/cli/{index-v8ykb3hq.js → index-fzvh6trw.js} +7 -7
- package/dist/cli/{index-snd34n1y.js → index-gtej1br8.js} +3 -3
- package/dist/cli/{index-dfd6d64k.js → index-hdwdapp6.js} +30 -30
- package/dist/cli/{index-23fwhwrb.js → index-hej0z0sm.js} +28 -28
- package/dist/cli/{index-mmnk7nt1.js → index-hqmr21qx.js} +1 -1
- package/dist/cli/{index-hkx8tqa4.js → index-j1yd2gbz.js} +4 -4
- package/dist/cli/{index-vsvdh976.js → index-jgkva4r4.js} +1 -1
- package/dist/cli/{index-nwew2anc.js → index-jn3m9s61.js} +1 -1
- package/dist/cli/{index-qc4nvg0m.js → index-m6bsy0jb.js} +3 -3
- package/dist/cli/{index-kyakvkpk.js → index-mat5rawf.js} +2 -1
- package/dist/cli/{index-rgvg7d6k.js → index-n5jac8z9.js} +1 -1
- package/dist/cli/{index-m8c44754.js → index-nr96hbpy.js} +3 -3
- package/dist/cli/{index-8d3qzvbb.js → index-ppb5krpy.js} +2 -2
- package/dist/cli/{index-5prgmf00.js → index-qz6ee73z.js} +3 -3
- package/dist/cli/{index-vwjfm0s6.js → index-tr9jz898.js} +3 -3
- package/dist/cli/{index-6v1cz898.js → index-vqjkr1kd.js} +1 -1
- package/dist/cli/{index-2qawngxn.js → index-vt9a5rbg.js} +13 -6
- package/dist/cli/{index-saw0ambb.js → index-yk3es7m2.js} +16 -10
- package/dist/cli/{index-e4g3487s.js → index-zpygn1tn.js} +1 -1
- package/dist/cli/{index-0c7y177k.js → index-zz40vfbz.js} +2 -2
- package/dist/cli/index.js +29 -29
- package/dist/cli/{knowledge-escalator-bra0fkfm.js → knowledge-escalator-2zjpwg0q.js} +10 -10
- package/dist/cli/{knowledge-events-v4hq7wr9.js → knowledge-events-gp2ckzqm.js} +8 -8
- package/dist/cli/{knowledge-link-dw12x2ns.js → knowledge-link-s77cyqxk.js} +3 -3
- package/dist/cli/{knowledge-store-3hx2896s.js → knowledge-store-kd88k067.js} +4 -4
- package/dist/cli/{knowledge-validator-9wj31ym5.js → knowledge-validator-22t16mba.js} +6 -6
- package/dist/cli/{mcp-d7yptqpg.js → mcp-1fjc89yp.js} +1 -1
- package/dist/cli/{pending-delegations-8ghc75b2.js → pending-delegations-k4hfqz12.js} +6 -6
- package/dist/cli/{pr-subscriptions-yceed093.js → pr-subscriptions-8g6w41vz.js} +6 -6
- package/dist/cli/{pr-workflow-gate-sc4c4cmk.js → pr-workflow-gate-kb3e709n.js} +28 -28
- package/dist/cli/{runner-k1pmc3z8.js → runner-nzppg2ky.js} +4 -4
- package/dist/cli/{scan-cursor-mtja4626.js → scan-cursor-erm49azh.js} +5 -5
- package/dist/cli/{schema-x2nb18fg.js → schema-kts10txe.js} +1 -1
- package/dist/cli/{scope-persistence-tafxf6yz.js → scope-persistence-krnvsmsz.js} +10 -10
- package/dist/cli/{server-hk378mzc.js → server-9bqh036q.js} +28 -28
- package/dist/cli/{skill-generator-vz5vtgk6.js → skill-generator-7q75h2kr.js} +12 -12
- package/dist/cli/{snapshot-coordination-init-8x5n1q8c.js → snapshot-coordination-init-bw9mn21x.js} +28 -28
- package/dist/cli/{telemetry-m580862y.js → telemetry-7bk8ps5p.js} +1 -1
- package/dist/cli/{worktree-collision-ownership-cfx1tsaf.js → worktree-collision-ownership-ajagwzh8.js} +6 -6
- package/dist/cli/{worktree-isolation-t3fm1c5w.js → worktree-isolation-rmqp04fx.js} +28 -28
- package/dist/commands/registry.d.ts +1 -1
- package/dist/hooks/pr-workflow-gate.d.ts +6 -0
- package/dist/index.js +108 -107
- package/dist/pr-review/types.d.ts +8 -0
- package/dist/tools/dispatch-lanes.d.ts +29 -0
- package/dist/workflow/coder-settlement.d.ts +7 -0
- package/dist/workflow/recovery-invocation.d.ts +35 -0
- package/dist/workflow/stage-a-repair.d.ts +17 -0
- package/dist/workflow/task-recovery-status.d.ts +61 -0
- package/package.json +2 -1
|
@@ -155,6 +155,14 @@ export type PrReviewEvent = {
|
|
|
155
155
|
semanticEnvelopeDigest: string;
|
|
156
156
|
outcome: 'CLEAN' | 'FINDINGS' | 'INCOMPLETE';
|
|
157
157
|
existingReceiptDigest?: string | undefined;
|
|
158
|
+
/**
|
|
159
|
+
* Provenance marker on the reducer event. Currently no consumer reads
|
|
160
|
+
* this field — the durable provenance record is the receipt-side
|
|
161
|
+
* `submittedBy` / `submittedByParentSessionId` (see
|
|
162
|
+
* `PrReviewResultReceiptSchema`). Kept for ledger parity with the
|
|
163
|
+
* receipt.
|
|
164
|
+
*/
|
|
165
|
+
submittedBy?: 'workflow_parent' | undefined;
|
|
158
166
|
} | {
|
|
159
167
|
type: 'circuit_advance_requested';
|
|
160
168
|
nowMs: number;
|
|
@@ -364,6 +364,7 @@ export declare const _internals: {
|
|
|
364
364
|
};
|
|
365
365
|
export declare const _test_exports: {
|
|
366
366
|
validatePrReviewMicroDispatch: typeof validatePrReviewMicroDispatch;
|
|
367
|
+
resolveCollectExpectedWorkflowIdentity: typeof resolveCollectExpectedWorkflowIdentity;
|
|
367
368
|
applyCommonPrompt: typeof applyCommonPrompt;
|
|
368
369
|
applyExplorerFormatSuffix: typeof applyExplorerFormatSuffix;
|
|
369
370
|
applyPrWorkflowPromptContract: typeof applyPrWorkflowPromptContract;
|
|
@@ -526,6 +527,34 @@ type LaneDiagnostics = Map<string, Set<string>>;
|
|
|
526
527
|
*/
|
|
527
528
|
declare function assembleCollectionDiagnostics(hostTimeouts: ReadonlySet<string>, settleFailureLogs: LaneDiagnostics, collectionResourceFailures: LaneDiagnostics): string[];
|
|
528
529
|
declare function addLaneDiagnostic(diagnostics: LaneDiagnostics, laneLabel: string, message: string): void;
|
|
530
|
+
/**
|
|
531
|
+
* Issue #2585 live-proof defect (found by AC11 case-01 against the real host,
|
|
532
|
+
* present byte-identically on main 3ea01cbc7): the collect-time discovery
|
|
533
|
+
* validation built its `expected` WITHOUT the workflow identity triple, so
|
|
534
|
+
* `validateExactStructuredReceiptCoverage` rejected EVERY child-submitted
|
|
535
|
+
* structured receipt with `missing live workflow instance/revision/base
|
|
536
|
+
* identity` — deterministic, prompt-insensitive, unrepairable from the
|
|
537
|
+
* orchestrator — and every base dimension settled as a contract failure
|
|
538
|
+
* (NO_COVERAGE → forced INCOMPLETE). The dispatch-side record carries the
|
|
539
|
+
* instance (jobId binding) and revision (workflowGeneration); the live gate
|
|
540
|
+
* state of the dispatching parent carries the merge-base. Derive the triple
|
|
541
|
+
* from those two authoritative sources instead of leaving it undefined.
|
|
542
|
+
*
|
|
543
|
+
* Pure: exported through `_test_exports` for the regression test. Returns
|
|
544
|
+
* undefined whenever any leg is missing — callers then keep the validator's
|
|
545
|
+
* explicit missing-identity rejection (today's behavior) rather than guessing.
|
|
546
|
+
*/
|
|
547
|
+
/** Minimal structural slice of the PR_REVIEW gate state the identity needs. */
|
|
548
|
+
interface PrReviewCollectParentStateSlice {
|
|
549
|
+
mode?: string;
|
|
550
|
+
workflowInstanceId?: string;
|
|
551
|
+
prReviewBaseSha?: string;
|
|
552
|
+
}
|
|
553
|
+
export declare function resolveCollectExpectedWorkflowIdentity(record: BackgroundDelegationRecord, parentState: PrReviewCollectParentStateSlice | null): {
|
|
554
|
+
workflowInstanceId: string;
|
|
555
|
+
workflowRevision: number;
|
|
556
|
+
baseSha: string;
|
|
557
|
+
} | undefined;
|
|
529
558
|
declare function consumePrReviewReceiptAppendFailureLog(loggedFailures: Set<string>, parentSessionId: string, correlationId: string): boolean;
|
|
530
559
|
declare function startAsyncLanePrompt(args: {
|
|
531
560
|
session: SessionOps;
|
|
@@ -114,6 +114,13 @@ export interface CoderSettlementWalState {
|
|
|
114
114
|
ownedInProcess: boolean;
|
|
115
115
|
/** A different, still-alive host process owns the dispatch. Never force-releasable from here. */
|
|
116
116
|
ownedByLiveForeignPid: boolean;
|
|
117
|
+
/**
|
|
118
|
+
* Generation fence the dispatch declared on its WAL (issue #2665): the
|
|
119
|
+
* workflow generation the owning transition expected to CAS against.
|
|
120
|
+
* Retained through recovery status so a stale-generation receipt is
|
|
121
|
+
* visible without re-reading the WAL bytes.
|
|
122
|
+
*/
|
|
123
|
+
expectedGeneration?: number;
|
|
117
124
|
}
|
|
118
125
|
/**
|
|
119
126
|
* Bounded inventory of durable coder-settlement WALs for diagnostics and
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Static recovery-invocation guidance (issue #2665).
|
|
3
|
+
*
|
|
4
|
+
* One shell-correct form per supported shell for the recovery entry points,
|
|
5
|
+
* plus the category glossary and the deterministic-repair boundary text the
|
|
6
|
+
* operator runbook publishes. Everything here is a module constant: this
|
|
7
|
+
* module MUST NOT read environment variables or the host platform, or any
|
|
8
|
+
* environment signal to choose an invocation string — the contract is
|
|
9
|
+
* documented per shell, never sniffed (issue #2665 AC3: "without introducing
|
|
10
|
+
* a new heuristic path detector"; the anti-detection source scan lives in
|
|
11
|
+
* tests/unit/workflow/task-recovery-status.test.ts).
|
|
12
|
+
*/
|
|
13
|
+
/** The compact operator runbook that carries the full guidance. */
|
|
14
|
+
export declare const RECOVERY_RUNBOOK_DOC_PATH = "docs/troubleshooting/recovery-runbook.md";
|
|
15
|
+
export interface RecoveryInvocationForm {
|
|
16
|
+
/** Shell or entry surface the form is correct for. */
|
|
17
|
+
surface: 'host' | 'powershell' | 'git-bash' | 'cli';
|
|
18
|
+
/** Shell-correct invocation string (placeholders in angle brackets). */
|
|
19
|
+
invocation: string;
|
|
20
|
+
/** One-line explanation, including the known friction where relevant. */
|
|
21
|
+
note: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Shell-correct invocations for `/swarm recover <task_id>`.
|
|
25
|
+
*
|
|
26
|
+
* The Git Bash form doubles the leading slash of the `/swarm ...` message
|
|
27
|
+
* argument: MSYS path conversion rewrites a single leading-slash argument to
|
|
28
|
+
* a path under the Git install root (`C:/Program Files/Git/swarm ...`) before
|
|
29
|
+
* the host ever sees it. Setting `MSYS_NO_PATHCONV=1` for the whole
|
|
30
|
+
* invocation is NOT shell-correct because `--dir /c/...` arguments then stop
|
|
31
|
+
* converting too.
|
|
32
|
+
*/
|
|
33
|
+
export declare const RECOVERY_INVOCATIONS: readonly RecoveryInvocationForm[];
|
|
34
|
+
/** One-line per-shell quick forms for operator-facing output surfaces. */
|
|
35
|
+
export declare function renderRecoveryInvocationQuickForms(docPath?: string): string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type TaskRecoveryStatus } from './task-recovery-status.js';
|
|
1
2
|
export type StageARepairOutcome = {
|
|
2
3
|
taskId: string;
|
|
3
4
|
outcome: 'repaired';
|
|
@@ -26,6 +27,22 @@ export type PreCheckGreennessResult = {
|
|
|
26
27
|
green: false;
|
|
27
28
|
reason: 'no_pre_check_bundles' | 'pre_check_failed_or_stale';
|
|
28
29
|
};
|
|
30
|
+
export interface StageAScanResult {
|
|
31
|
+
/** One entry per enumerated task, classified in the shared #2665 vocabulary. */
|
|
32
|
+
results: TaskRecoveryStatus[];
|
|
33
|
+
truncated: boolean;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Read-only wedge scan (issue #2665): classifies every enumerated task via
|
|
37
|
+
* the shared recovery vocabulary WITHOUT emitting transitions, writing
|
|
38
|
+
* evidence, or appending events. Tasks whose evidence cannot be read are
|
|
39
|
+
* skipped (their failure surfaces through the repair path's per-task error
|
|
40
|
+
* outcomes and the diagnose evidence checks). `repairAllowed` is true only
|
|
41
|
+
* for the `live_wedge` category with green post-settlement pre-check proof.
|
|
42
|
+
*/
|
|
43
|
+
export declare function scanWedgedStageA(directory: string, options?: {
|
|
44
|
+
taskIds?: string[];
|
|
45
|
+
}): Promise<StageAScanResult>;
|
|
29
46
|
/**
|
|
30
47
|
* Repair path for tasks already wedged at `coder_delegated`
|
|
31
48
|
* (TASK_WORKFLOW_STAGE_A_REQUIRED post-reset wedge). For each flat task
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Task recovery status classification (issue #2665).
|
|
3
|
+
*
|
|
4
|
+
* Pure classification over facts the durable receipts already carry: the
|
|
5
|
+
* coder-settlement WAL inventory (`CoderSettlementWalState`), the per-task
|
|
6
|
+
* evidence workflow snapshot, and (for the wedge class) the Stage A scan.
|
|
7
|
+
* This module never reads the filesystem, never writes state, and never
|
|
8
|
+
* repairs anything — it is the "task/generation-specific missing explanation"
|
|
9
|
+
* that connects status and repair to the same transition receipts
|
|
10
|
+
* (`transitionId` + `generation`), per the issue's scope quote: add the
|
|
11
|
+
* explanation, not another recovery engine.
|
|
12
|
+
*/
|
|
13
|
+
import type { TaskEvidence, TaskWorkflowSnapshot } from '../gate-evidence.js';
|
|
14
|
+
import type { CoderSettlementWalState } from './coder-settlement.js';
|
|
15
|
+
export type TaskRecoveryCategory = 'healthy' | 'missing' | 'stale' | 'ambiguous' | 'corrupt' | 'live_wedge';
|
|
16
|
+
export interface TaskRecoveryStatus {
|
|
17
|
+
taskId: string;
|
|
18
|
+
category: TaskRecoveryCategory;
|
|
19
|
+
/** Workflow generation from the durable evidence snapshot, when one exists. */
|
|
20
|
+
generation?: number;
|
|
21
|
+
/** Owning transition id from the settlement WAL / evidence chain tip. */
|
|
22
|
+
transitionId?: string;
|
|
23
|
+
/** Deterministic repair allowed without an operator assertion? */
|
|
24
|
+
repairAllowed: boolean;
|
|
25
|
+
/** An external (process/provider) effect may still be in flight or unresolved. */
|
|
26
|
+
uncertainExternalEffect: boolean;
|
|
27
|
+
explanation: string;
|
|
28
|
+
/** Host-command-path form; per-shell forms live in recovery-invocation.ts. */
|
|
29
|
+
suggestedNextCommand: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Classify one settlement-WAL entry against the task's workflow snapshot.
|
|
33
|
+
*
|
|
34
|
+
* Category mapping (issue #2665 AC1 vocabulary):
|
|
35
|
+
* - `unreadable` → corrupt (facts corrupt; recovery refuses, never rewrites)
|
|
36
|
+
* - owned in this process / by a live foreign pid → ambiguous (external
|
|
37
|
+
* effect stays uncertain; never force a foreign owner)
|
|
38
|
+
* - `DISPATCHED`/`PREPARED` with a dead owner → stale (deterministic repair)
|
|
39
|
+
* - terminal → healthy
|
|
40
|
+
*
|
|
41
|
+
* When the WAL records an `expectedGeneration` that disagrees with the
|
|
42
|
+
* workflow snapshot's generation, the stale explanation names the generation
|
|
43
|
+
* conflict explicitly — the settle path's CAS already refuses stale and
|
|
44
|
+
* foreign receipts; this makes that refusal visible in status.
|
|
45
|
+
*/
|
|
46
|
+
export declare function classifySettlementWalState(entry: CoderSettlementWalState, workflow: TaskWorkflowSnapshot | null): TaskRecoveryStatus;
|
|
47
|
+
/**
|
|
48
|
+
* Classify a task's evidence-workflow state for recovery purposes. The
|
|
49
|
+
* `live_wedge` class is the "live-shaped task wedge" of issue #2665 AC2:
|
|
50
|
+
* the workflow sits at `coder_delegated` with no pre_check gate proof —
|
|
51
|
+
* deterministically repairable by the Stage A repair (which never re-runs
|
|
52
|
+
* the coder and never edits evidence speculatively) when green
|
|
53
|
+
* post-settlement pre-check proof exists.
|
|
54
|
+
*/
|
|
55
|
+
export declare function classifyEvidenceRecoveryTask(taskId: string, evidence: TaskEvidence | null, greenPreCheck: boolean | null): TaskRecoveryStatus;
|
|
56
|
+
/**
|
|
57
|
+
* One diagnose-detail line per non-healthy task. Healthy tasks are rendered
|
|
58
|
+
* by their COUNT only (never a per-task line) so no category token can
|
|
59
|
+
* attach to a healthy task id (plan-critic B1).
|
|
60
|
+
*/
|
|
61
|
+
export declare function renderTaskRecoveryLine(status: TaskRecoveryStatus): string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-swarm",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.175.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",
|
|
@@ -111,6 +111,7 @@
|
|
|
111
111
|
"package:smoke": "node scripts/package-smoke.mjs",
|
|
112
112
|
"prepare": "bun run build",
|
|
113
113
|
"repro:704": "node scripts/repro-704.mjs",
|
|
114
|
+
"repro:2669": "node scripts/repro-2669.mjs",
|
|
114
115
|
"repro:1144": "bun scripts/repro-1144.mjs",
|
|
115
116
|
"repro:1873": "bun build scripts/repro-1873-entry.ts --outdir dist-build-test/repro-1873 --target node --format esm && node scripts/repro-1873.mjs",
|
|
116
117
|
"repro:2487": "bun build scripts/repro-2487-parity-entry.ts --outdir dist-build-test/repro-2487 --target node --format esm && node scripts/repro-2487-parity.mjs",
|