opencode-swarm 7.179.1 → 7.180.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 (104) hide show
  1. package/binaries/win32-arm64/swarm-sandbox-runner.exe +0 -0
  2. package/binaries/win32-x64/swarm-sandbox-runner.exe +0 -0
  3. package/dist/background/pr-event-subscribers.d.ts +2 -0
  4. package/dist/background/pr-feedback-event-queue.d.ts +7 -0
  5. package/dist/background/pr-feedback-loop.d.ts +162 -0
  6. package/dist/cli/{coder-settlement-f1nmezzv.js → coder-settlement-34z9xgnx.js} +13 -13
  7. package/dist/cli/{config-doctor-ena2803f.js → config-doctor-tkfrwztz.js} +2 -2
  8. package/dist/cli/{core-fcfzme3m.js → core-z9ybzpvr.js} +4 -5
  9. package/dist/cli/{curation-policy-c7mdsf7m.js → curation-policy-gwzmjmt7.js} +6 -5
  10. package/dist/cli/{curator-drift-d93pwt8h.js → curator-drift-3bbn011w.js} +22 -12
  11. package/dist/cli/curator-llm-factory-e162g7xp.js +74 -0
  12. package/dist/cli/{curator-q9s5q9v4.js → curator-zv4qs07j.js} +44 -42
  13. package/dist/cli/{evidence-summary-service-wtj8mkm6.js → evidence-summary-service-wrfth5tr.js} +22 -20
  14. package/dist/cli/{gate-evidence-h83yb8nd.js → gate-evidence-adqbxnm7.js} +8 -8
  15. package/dist/cli/guardrail-explain-dn96802k.js +75 -0
  16. package/dist/cli/{guardrail-log-zf1htf1d.js → guardrail-log-rcza6v3y.js} +6 -6
  17. package/dist/cli/{guardrail-reset-f2p198j3.js → guardrail-reset-fjn42e0n.js} +44 -42
  18. package/dist/cli/hive-promoter-hgqqn7qw.js +89 -0
  19. package/dist/cli/{index-aqpwm350.js → index-06crt1ej.js} +2 -2
  20. package/dist/cli/{index-wrt875kh.js → index-0725jpp7.js} +1 -1
  21. package/dist/cli/{index-f2v90gfc.js → index-0v1rtanv.js} +24 -165
  22. package/dist/cli/{index-q375xdcw.js → index-1hzqyx13.js} +9 -1
  23. package/dist/cli/{index-xy7k7f3k.js → index-1p8fk9jb.js} +2 -2
  24. package/dist/cli/{index-pfg3jwe9.js → index-2h0qng38.js} +3 -3
  25. package/dist/cli/{index-9fb01jk5.js → index-3jap3516.js} +1 -1
  26. package/dist/cli/{index-dz12bshh.js → index-5gmn0a3j.js} +8 -8
  27. package/dist/cli/{index-5d224akk.js → index-5m378633.js} +4 -4
  28. package/dist/cli/{index-0h3cr7pn.js → index-5yc5n4ae.js} +1 -1
  29. package/dist/cli/{index-pn023bf9.js → index-7pj0x345.js} +48 -46
  30. package/dist/cli/{index-w4c2repz.js → index-7w6dnpvc.js} +44 -42
  31. package/dist/cli/{index-zbhvr9st.js → index-8b1f2t5q.js} +8 -10
  32. package/dist/cli/{index-cvg402ha.js → index-91dhg3wr.js} +2 -2
  33. package/dist/cli/{index-3pzwsesm.js → index-92m05mew.js} +2 -2
  34. package/dist/cli/{index-6r92fw88.js → index-93vk5s7v.js} +8 -8
  35. package/dist/cli/{index-ne9zamcs.js → index-989v83pb.js} +1 -1
  36. package/dist/cli/{index-g6nyk713.js → index-aspxz5r5.js} +1 -1
  37. package/dist/cli/index-b9z9gvx0.js +339 -0
  38. package/dist/cli/{index-2b0ktpbf.js → index-bdpgfep1.js} +5 -5
  39. package/dist/cli/{index-nzekzzs2.js → index-bv4b8tpa.js} +5 -5
  40. package/dist/cli/{index-n1tcj1q7.js → index-bx70zs8d.js} +187 -47
  41. package/dist/cli/{index-n2wjrgcs.js → index-caj76d0f.js} +6 -8
  42. package/dist/cli/{index-549wxbe1.js → index-cjapb4hy.js} +1 -1
  43. package/dist/cli/{index-y94vwx2q.js → index-cxgr6ad5.js} +13 -15
  44. package/dist/cli/{index-ajm7ebyd.js → index-dcttq1mn.js} +2 -2
  45. package/dist/cli/{index-9s1xzvnn.js → index-defq2crz.js} +13 -3
  46. package/dist/cli/{index-ky262b73.js → index-dnbqmay5.js} +1606 -895
  47. package/dist/cli/index-ejhxgyvm.js +147 -0
  48. package/dist/cli/{index-epfjc1c1.js → index-ekgc71m1.js} +10 -10
  49. package/dist/cli/{index-s4bkey0q.js → index-gc6h1fmf.js} +4 -4
  50. package/dist/cli/index-gx2vp8gx.js +100 -0
  51. package/dist/cli/{index-h59vsbch.js → index-htrb9ec3.js} +1 -1
  52. package/dist/cli/{index-yfpswnjt.js → index-jmrsfhwq.js} +3 -3
  53. package/dist/cli/{index-rb9jmj30.js → index-jrfv2am8.js} +7 -7
  54. package/dist/cli/{index-pskba939.js → index-jscqefqm.js} +1 -1
  55. package/dist/cli/{index-y98fvmb8.js → index-kp654qcw.js} +32 -17
  56. package/dist/cli/{index-93nx95me.js → index-mhrn7hbb.js} +8 -7
  57. package/dist/cli/{index-h4nh6s8b.js → index-nhxykfyy.js} +1 -1
  58. package/dist/cli/{index-yp25bc9n.js → index-pnt98k7z.js} +7 -7
  59. package/dist/cli/{index-vp9pn7sv.js → index-ret97f1t.js} +5 -5
  60. package/dist/cli/{index-sj29n50e.js → index-v1sc1gxv.js} +6 -6
  61. package/dist/cli/{index-a11ztzs5.js → index-vmthakz0.js} +1 -1
  62. package/dist/cli/{index-b567t0cr.js → index-x6kjbjya.js} +9 -7
  63. package/dist/cli/{index-m1w40kfw.js → index-zptq8mp1.js} +4 -103
  64. package/dist/cli/{index-34bwqcea.js → index-zvxy0mev.js} +1 -1
  65. package/dist/cli/{index-zz7gzw57.js → index-zxdawwc7.js} +88 -4
  66. package/dist/cli/index.js +45 -43
  67. package/dist/cli/{knowledge-escalator-z6tkgrjq.js → knowledge-escalator-x8vcmb6k.js} +16 -15
  68. package/dist/cli/{knowledge-events-2bgefatz.js → knowledge-events-naf9kyyc.js} +14 -13
  69. package/dist/cli/{knowledge-link-gfz47ves.js → knowledge-link-g0q25hqv.js} +5 -4
  70. package/dist/cli/{knowledge-store-1fphg9sa.js → knowledge-store-dnv0ph42.js} +6 -5
  71. package/dist/cli/{knowledge-validator-723h2vck.js → knowledge-validator-a1rfzkmv.js} +8 -7
  72. package/dist/cli/{mcp-xyswgya5.js → mcp-hnb0m05a.js} +1 -1
  73. package/dist/cli/{pending-delegations-5zm19yvv.js → pending-delegations-05p6cmbh.js} +13 -12
  74. package/dist/cli/{pr-subscriptions-5hm6hzv6.js → pr-subscriptions-a2djfzyx.js} +13 -12
  75. package/dist/cli/{pr-workflow-gate-48rzb2bh.js → pr-workflow-gate-wkmx8nr6.js} +46 -42
  76. package/dist/cli/{runner-16b691ba.js → runner-hkbds12j.js} +6 -5
  77. package/dist/cli/{scan-cursor-m28tddrg.js → scan-cursor-4khfn5pm.js} +8 -8
  78. package/dist/cli/{schema-jt9axyj6.js → schema-a5zb02h8.js} +3 -1
  79. package/dist/cli/{scope-persistence-d0358pw7.js → scope-persistence-nsw324ce.js} +18 -17
  80. package/dist/cli/{server-d5jxcbxz.js → server-exj4wt8j.js} +52 -50
  81. package/dist/cli/{skill-generator-qanka67x.js → skill-generator-r2cdtx7b.js} +18 -17
  82. package/dist/cli/{snapshot-coordination-init-mhrq11p8.js → snapshot-coordination-init-sad6q0a2.js} +44 -42
  83. package/dist/cli/speckit-checkoff-46g9sqak.js +31 -0
  84. package/dist/cli/{workspace-snapshot-rfnn80dg.js → workspace-snapshot-4m2ex1ey.js} +4 -5
  85. package/dist/cli/{worktree-collision-ownership-ygdbpexh.js → worktree-collision-ownership-4znkfq1t.js} +16 -16
  86. package/dist/cli/{worktree-isolation-4855f2az.js → worktree-isolation-mv9ee00v.js} +44 -42
  87. package/dist/commands/pr-feedback-loop.d.ts +1 -0
  88. package/dist/commands/registry.d.ts +10 -2
  89. package/dist/config/schema.d.ts +27 -0
  90. package/dist/hooks/delegation-tracker.d.ts +6 -1
  91. package/dist/hooks/pr-workflow-gate.d.ts +1 -1
  92. package/dist/index.js +626 -600
  93. package/dist/sdd/effective-spec.d.ts +35 -22
  94. package/dist/sdd/speckit-checkoff.d.ts +113 -0
  95. package/dist/session/hydration-ownership.d.ts +83 -0
  96. package/dist/session/snapshot-coordination-init.d.ts +2 -1
  97. package/dist/session/snapshot-reader.d.ts +25 -7
  98. package/dist/state.d.ts +32 -2
  99. package/opencode-swarm.schema.json +40 -0
  100. package/package.json +1 -1
  101. package/dist/cli/curator-llm-factory-dds2fnhj.js +0 -72
  102. package/dist/cli/guardrail-explain-qm5wej7v.js +0 -73
  103. package/dist/cli/hive-promoter-1mhx2jh0.js +0 -87
  104. package/dist/cli/index-4ddpvd5c.js +0 -94
@@ -0,0 +1,147 @@
1
+ // @bun
2
+ import {
3
+ require_proper_lockfile
4
+ } from "./index-7g4c7s5r.js";
5
+ import {
6
+ __toESM
7
+ } from "./index-a76rekgs.js";
8
+
9
+ // src/parallel/file-locks.ts
10
+ var import_proper_lockfile = __toESM(require_proper_lockfile(), 1);
11
+ import * as crypto from "crypto";
12
+ import * as fs from "fs";
13
+ import * as path from "path";
14
+ var LOCKS_DIR = ".swarm/locks";
15
+ var LOCK_TIMEOUT_MS = 5 * 60 * 1000;
16
+ var _internals = {
17
+ tryAcquireLock,
18
+ writeFile: fs.promises.writeFile
19
+ };
20
+ function getLockFilePath(directory, filePath) {
21
+ const normalized = path.resolve(directory, filePath);
22
+ const baseDir = path.resolve(directory) + path.sep;
23
+ const pathOk = process.platform === "win32" ? normalized.toLowerCase().startsWith(baseDir.toLowerCase()) : normalized.startsWith(baseDir);
24
+ if (!pathOk) {
25
+ throw new Error("Invalid file path: path traversal not allowed");
26
+ }
27
+ const pathForHash = process.platform === "win32" ? normalized.toLowerCase() : normalized;
28
+ const hash = crypto.createHash("sha256").update(pathForHash).digest("hex");
29
+ const lockPath = path.join(directory, LOCKS_DIR, `${hash}.lock`);
30
+ const legacyPaths = [pathForHash];
31
+ if (process.platform === "win32" && normalized !== pathForHash) {
32
+ legacyPaths.push(normalized);
33
+ }
34
+ for (const legacyPath of legacyPaths) {
35
+ const oldHash = Buffer.from(legacyPath).toString("base64").replace(/[/+=]/g, "_");
36
+ const oldLockPath = path.join(directory, LOCKS_DIR, `${oldHash}.lock`);
37
+ if (fs.existsSync(oldLockPath)) {
38
+ return oldLockPath;
39
+ }
40
+ }
41
+ return lockPath;
42
+ }
43
+ function getMetaPath(lockPath) {
44
+ return `${lockPath.replace(/\.lock$/, "")}.meta`;
45
+ }
46
+ function readMetaFile(metaPath) {
47
+ try {
48
+ const content = fs.readFileSync(metaPath, "utf-8");
49
+ return JSON.parse(content);
50
+ } catch {
51
+ return null;
52
+ }
53
+ }
54
+ async function tryAcquireLock(directory, filePath, agent, taskId) {
55
+ const lockPath = getLockFilePath(directory, filePath);
56
+ const locksDir = path.dirname(lockPath);
57
+ if (!fs.existsSync(locksDir)) {
58
+ fs.mkdirSync(locksDir, { recursive: true });
59
+ }
60
+ if (!fs.existsSync(lockPath)) {
61
+ fs.writeFileSync(lockPath, "", "utf-8");
62
+ }
63
+ let release;
64
+ try {
65
+ release = await import_proper_lockfile.default.lock(lockPath, {
66
+ stale: LOCK_TIMEOUT_MS,
67
+ retries: {
68
+ retries: 5,
69
+ minTimeout: 10,
70
+ maxTimeout: 500,
71
+ factor: 2
72
+ },
73
+ realpath: false
74
+ });
75
+ } catch (err) {
76
+ const code = err.code;
77
+ if (code === "ELOCKED" || code === "EEXIST") {
78
+ return { acquired: false };
79
+ }
80
+ throw err;
81
+ }
82
+ const lock = {
83
+ filePath,
84
+ agent,
85
+ taskId,
86
+ timestamp: new Date().toISOString(),
87
+ expiresAt: Date.now() + LOCK_TIMEOUT_MS,
88
+ _release: release
89
+ };
90
+ return { acquired: true, lock };
91
+ }
92
+ function listActiveLocks(directory) {
93
+ const locksDir = path.join(directory, LOCKS_DIR);
94
+ const locks = [];
95
+ if (!fs.existsSync(locksDir)) {
96
+ return locks;
97
+ }
98
+ const files = fs.readdirSync(locksDir);
99
+ const now = Date.now();
100
+ for (const file of files) {
101
+ if (!file.endsWith(".lock"))
102
+ continue;
103
+ const lockPath = path.join(locksDir, file);
104
+ try {
105
+ const stat = fs.statSync(lockPath);
106
+ if (stat.isFile()) {
107
+ const plLockDir = `${lockPath}.lock`;
108
+ if (fs.existsSync(plLockDir)) {
109
+ const metaPath = getMetaPath(lockPath);
110
+ const meta = readMetaFile(metaPath);
111
+ if (meta) {
112
+ if (meta.expiresAt < now) {
113
+ continue;
114
+ }
115
+ locks.push({
116
+ filePath: meta.originalPath,
117
+ agent: meta.agent,
118
+ taskId: meta.taskId,
119
+ timestamp: meta.acquiredAt,
120
+ expiresAt: meta.expiresAt,
121
+ laneId: meta.laneId
122
+ });
123
+ } else {
124
+ let acquiredAt = Date.now();
125
+ try {
126
+ acquiredAt = fs.statSync(plLockDir).mtimeMs;
127
+ } catch {}
128
+ const expiresAt = acquiredAt + LOCK_TIMEOUT_MS;
129
+ if (expiresAt < now) {
130
+ continue;
131
+ }
132
+ locks.push({
133
+ filePath: lockPath,
134
+ agent: "unknown",
135
+ taskId: "unknown",
136
+ timestamp: new Date(acquiredAt).toISOString(),
137
+ expiresAt
138
+ });
139
+ }
140
+ }
141
+ }
142
+ } catch {}
143
+ }
144
+ return locks;
145
+ }
146
+
147
+ export { tryAcquireLock, listActiveLocks };
@@ -1,36 +1,36 @@
1
1
  // @bun
2
2
  import {
3
3
  validateSwarmPath
4
- } from "./index-s4bkey0q.js";
4
+ } from "./index-gc6h1fmf.js";
5
5
  import {
6
6
  observeReceiptTransition
7
- } from "./index-yfpswnjt.js";
7
+ } from "./index-jmrsfhwq.js";
8
8
  import {
9
9
  resolveHiveEventsPath
10
10
  } from "./index-ae75rja9.js";
11
11
  import {
12
12
  resolveKnowledgeStoreDir
13
- } from "./index-34bwqcea.js";
13
+ } from "./index-zvxy0mev.js";
14
14
  import {
15
15
  assertProjectRoot,
16
16
  atomicWriteFile
17
- } from "./index-f2v90gfc.js";
18
- import {
19
- require_proper_lockfile
20
- } from "./index-7g4c7s5r.js";
17
+ } from "./index-0v1rtanv.js";
21
18
  import {
22
19
  emit
23
20
  } from "./index-qt0793qm.js";
24
21
  import {
25
22
  canonicalRootKey
26
23
  } from "./index-1xnse449.js";
24
+ import {
25
+ require_proper_lockfile
26
+ } from "./index-7g4c7s5r.js";
27
27
  import {
28
28
  loadPluginConfigWithMeta
29
- } from "./index-m1w40kfw.js";
29
+ } from "./index-zptq8mp1.js";
30
30
  import {
31
31
  KnowledgeConfigSchema,
32
32
  init_schema
33
- } from "./index-9s1xzvnn.js";
33
+ } from "./index-defq2crz.js";
34
34
  import {
35
35
  init_logger,
36
36
  warn
@@ -2813,7 +2813,7 @@ async function applyKnowledgeVerdictFeedback(directory, options) {
2813
2813
  }
2814
2814
  let bumps = 0;
2815
2815
  if (deltas.length > 0) {
2816
- const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-1fphg9sa.js");
2816
+ const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-dnv0ph42.js");
2817
2817
  bumps = await bumpKnowledgeConfidenceBatch(directory, deltas, options?.floorOptions);
2818
2818
  }
2819
2819
  return {
@@ -2,15 +2,15 @@
2
2
  import {
3
3
  bunFile
4
4
  } from "./index-2s7dvzff.js";
5
+ import {
6
+ SwarmError
7
+ } from "./index-c1ggtmpm.js";
5
8
  import {
6
9
  RECENT_WRITE_WINDOW_MS,
7
10
  readCachedTextFile,
8
11
  wasObservedToExist,
9
12
  wasRecentlyWrittenByThisProcess
10
- } from "./index-ne9zamcs.js";
11
- import {
12
- SwarmError
13
- } from "./index-c1ggtmpm.js";
13
+ } from "./index-989v83pb.js";
14
14
  import {
15
15
  warn
16
16
  } from "./index-zgwm4ryv.js";
@@ -0,0 +1,100 @@
1
+ // @bun
2
+ import {
3
+ exports_external,
4
+ init_zod
5
+ } from "./index-gknz3bv1.js";
6
+
7
+ // src/config/plan-schema.ts
8
+ init_zod();
9
+ var ExecutionProfileSchema = exports_external.object({
10
+ parallelization_enabled: exports_external.boolean().default(false),
11
+ max_concurrent_tasks: exports_external.number().int().min(1).max(64).default(10),
12
+ council_parallel: exports_external.boolean().default(true),
13
+ locked: exports_external.boolean().default(false),
14
+ auto_proceed: exports_external.boolean().default(false),
15
+ commit_after_each_completed_task: exports_external.boolean().default(false),
16
+ planning_profile: exports_external.enum(["balanced", "strict"]).optional()
17
+ });
18
+ var TaskStatusSchema = exports_external.enum([
19
+ "pending",
20
+ "in_progress",
21
+ "completed",
22
+ "blocked",
23
+ "closed"
24
+ ]);
25
+ var TaskSizeSchema = exports_external.enum(["small", "medium", "large"]);
26
+ var PhaseStatusSchema = exports_external.enum([
27
+ "pending",
28
+ "in_progress",
29
+ "complete",
30
+ "completed",
31
+ "blocked",
32
+ "closed"
33
+ ]);
34
+ var MigrationStatusSchema = exports_external.enum([
35
+ "native",
36
+ "migrated",
37
+ "migration_failed"
38
+ ]);
39
+ var TaskSchema = exports_external.object({
40
+ id: exports_external.string(),
41
+ phase: exports_external.number().int().min(1),
42
+ status: TaskStatusSchema.default("pending"),
43
+ size: TaskSizeSchema.default("small"),
44
+ description: exports_external.string().min(1),
45
+ depends: exports_external.array(exports_external.string()).default([]),
46
+ acceptance: exports_external.string().optional(),
47
+ files_touched: exports_external.array(exports_external.string()).default([]),
48
+ evidence_path: exports_external.string().optional(),
49
+ blocked_reason: exports_external.string().optional(),
50
+ fr_refs: exports_external.array(exports_external.string()).optional()
51
+ });
52
+ var PhaseSchema = exports_external.object({
53
+ id: exports_external.number().int().min(1),
54
+ name: exports_external.string().min(1),
55
+ status: PhaseStatusSchema.default("pending"),
56
+ tasks: exports_external.array(TaskSchema).default([]),
57
+ type: exports_external.enum(["code", "non-code"]).optional(),
58
+ required_agents: exports_external.array(exports_external.string()).optional()
59
+ });
60
+ var PlanSchema = exports_external.object({
61
+ schema_version: exports_external.literal("1.0.0"),
62
+ title: exports_external.string().min(1),
63
+ swarm: exports_external.string().min(1),
64
+ current_phase: exports_external.number().int().min(1).optional(),
65
+ phases: exports_external.array(PhaseSchema).min(1),
66
+ migration_status: MigrationStatusSchema.optional(),
67
+ specMtime: exports_external.string().optional(),
68
+ specHash: exports_external.string().optional(),
69
+ execution_profile: ExecutionProfileSchema.optional()
70
+ });
71
+ function isPhaseStatusTerminal(status) {
72
+ return status === "complete" || status === "completed" || status === "closed";
73
+ }
74
+ function isPhaseEffectivelyTerminal(phase) {
75
+ if (isPhaseStatusTerminal(phase.status))
76
+ return true;
77
+ const tasks = phase.tasks ?? [];
78
+ return tasks.length > 0 && tasks.every((task) => task.status === "completed" || task.status === "closed");
79
+ }
80
+ function resolveActivePhaseId(plan) {
81
+ const cursor = plan.current_phase;
82
+ if (cursor !== undefined) {
83
+ const cursorPhase = plan.phases.find((phase) => phase.id === cursor);
84
+ if (cursorPhase && !isPhaseEffectivelyTerminal(cursorPhase)) {
85
+ return cursorPhase.id;
86
+ }
87
+ }
88
+ const firstNonTerminal = plan.phases.find((phase) => !isPhaseEffectivelyTerminal(phase));
89
+ if (firstNonTerminal)
90
+ return firstNonTerminal.id;
91
+ return plan.phases[plan.phases.length - 1]?.id ?? 1;
92
+ }
93
+ function normalizeCurrentPhaseInPlace(plan) {
94
+ plan.current_phase = resolveActivePhaseId(plan);
95
+ }
96
+ function getCurrentPhase(plan) {
97
+ return resolveActivePhaseId(plan);
98
+ }
99
+
100
+ export { ExecutionProfileSchema, TaskStatusSchema, TaskSizeSchema, PhaseStatusSchema, MigrationStatusSchema, TaskSchema, PhaseSchema, PlanSchema, resolveActivePhaseId, normalizeCurrentPhaseInPlace, getCurrentPhase };
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  observeStoreHealth
4
- } from "./index-yfpswnjt.js";
4
+ } from "./index-jmrsfhwq.js";
5
5
  import {
6
6
  telemetry
7
7
  } from "./index-qt0793qm.js";
@@ -4,12 +4,12 @@ import {
4
4
  resolveLineageSalt,
5
5
  telemetry
6
6
  } from "./index-qt0793qm.js";
7
- import {
8
- atomicWriteSwarmFile
9
- } from "./index-ne9zamcs.js";
10
7
  import {
11
8
  canonicalRootKeyFresh
12
9
  } from "./index-1xnse449.js";
10
+ import {
11
+ atomicWriteSwarmFile
12
+ } from "./index-989v83pb.js";
13
13
 
14
14
  // src/health/learning-health.ts
15
15
  import { promises as fs } from "fs";
@@ -1,10 +1,10 @@
1
1
  // @bun
2
2
  import {
3
3
  computePlanStructureHash
4
- } from "./index-b567t0cr.js";
4
+ } from "./index-x6kjbjya.js";
5
5
  import {
6
6
  appendCoreEventSync
7
- } from "./index-h59vsbch.js";
7
+ } from "./index-htrb9ec3.js";
8
8
  import {
9
9
  deleteCoordinationState,
10
10
  derivePlanId,
@@ -13,27 +13,27 @@ import {
13
13
  transitionCoordinationState,
14
14
  transitionCoordinationStateWithinTransaction,
15
15
  withCoordinationTransaction
16
- } from "./index-a11ztzs5.js";
16
+ } from "./index-vmthakz0.js";
17
17
  import {
18
18
  getProjectDb
19
- } from "./index-nzekzzs2.js";
19
+ } from "./index-bv4b8tpa.js";
20
20
  import {
21
21
  canonicalExistingFilesystemPath,
22
22
  legacyCanonicalExistingFilesystemPath
23
23
  } from "./index-ry16d01s.js";
24
24
  import {
25
25
  assertProjectRoot
26
- } from "./index-f2v90gfc.js";
26
+ } from "./index-0v1rtanv.js";
27
27
  import {
28
28
  require_proper_lockfile
29
29
  } from "./index-7g4c7s5r.js";
30
30
  import {
31
31
  atomicWriteSwarmFile,
32
32
  atomicWriteSwarmFileSync
33
- } from "./index-ne9zamcs.js";
33
+ } from "./index-989v83pb.js";
34
34
  import {
35
35
  PlanSchema
36
- } from "./index-m1w40kfw.js";
36
+ } from "./index-gx2vp8gx.js";
37
37
  import {
38
38
  init_path_identity,
39
39
  unsafePathTextReason
@@ -9,7 +9,7 @@ import {
9
9
  readEvaluationRun,
10
10
  saveEvaluationRun,
11
11
  saveTaskSetSnapshot
12
- } from "./index-g6nyk713.js";
12
+ } from "./index-aspxz5r5.js";
13
13
  import {
14
14
  canonicalHash,
15
15
  computeCandidateInputContentHash,
@@ -3,10 +3,10 @@ import {
3
3
  EvaluationRunV1Schema,
4
4
  GateAuditResultV1Schema,
5
5
  getProtectedEvaluationRunIds
6
- } from "./index-g6nyk713.js";
6
+ } from "./index-aspxz5r5.js";
7
7
  import {
8
8
  readEffectiveSpecSync
9
- } from "./index-n1tcj1q7.js";
9
+ } from "./index-bx70zs8d.js";
10
10
  import {
11
11
  validateWorkspaceRoot
12
12
  } from "./index-6b295cas.js";
@@ -23,13 +23,13 @@ import {
23
23
  readTaskEvidence,
24
24
  readTaskEvidenceRaw,
25
25
  sanitizeTaskId
26
- } from "./index-n2wjrgcs.js";
26
+ } from "./index-caj76d0f.js";
27
27
  import {
28
28
  estimateCharsForTokens,
29
29
  estimateTokens,
30
30
  readSwarmFileAsync,
31
31
  validateSwarmPath
32
- } from "./index-s4bkey0q.js";
32
+ } from "./index-gc6h1fmf.js";
33
33
  import {
34
34
  bunHash,
35
35
  bunWrite,
@@ -58,10 +58,10 @@ import {
58
58
  replayFromLedgerWithStatus,
59
59
  takeSnapshotEvent,
60
60
  takeSnapshotWithRetry
61
- } from "./index-b567t0cr.js";
61
+ } from "./index-x6kjbjya.js";
62
62
  import {
63
63
  appendCoreEventSync
64
- } from "./index-h59vsbch.js";
64
+ } from "./index-htrb9ec3.js";
65
65
  import {
66
66
  derivePlanId,
67
67
  derivePlanIdentityHash,
@@ -69,40 +69,42 @@ import {
69
69
  importCoordinationOnce,
70
70
  listCoordinationStates,
71
71
  transitionCoordinationState
72
- } from "./index-a11ztzs5.js";
72
+ } from "./index-vmthakz0.js";
73
73
  import {
74
74
  DURABILITY_CLASSES,
75
75
  getProjectDb,
76
76
  projectDbExists,
77
77
  withDurabilityClass
78
- } from "./index-nzekzzs2.js";
78
+ } from "./index-bv4b8tpa.js";
79
79
  import {
80
80
  assertProjectRoot,
81
- tryAcquireLock,
82
81
  withEvidenceLock
83
- } from "./index-f2v90gfc.js";
82
+ } from "./index-0v1rtanv.js";
84
83
  import {
85
84
  emit
86
85
  } from "./index-qt0793qm.js";
86
+ import {
87
+ canonicalRootKeyFresh
88
+ } from "./index-1xnse449.js";
89
+ import {
90
+ tryAcquireLock
91
+ } from "./index-ejhxgyvm.js";
87
92
  import {
88
93
  atomicWriteSwarmFileSync,
89
94
  invalidateCachedArtifact,
90
95
  readCachedParsedFile
91
- } from "./index-ne9zamcs.js";
92
- import {
93
- canonicalRootKeyFresh
94
- } from "./index-1xnse449.js";
96
+ } from "./index-989v83pb.js";
95
97
  import {
96
98
  PlanSchema,
97
99
  normalizeCurrentPhaseInPlace,
98
100
  resolveActivePhaseId
99
- } from "./index-m1w40kfw.js";
101
+ } from "./index-gx2vp8gx.js";
100
102
  import {
101
103
  GIT_BINARY_ENV_VAR,
102
104
  describeGitResolution,
103
105
  init_git_executable,
104
106
  resolveGitExecutable
105
- } from "./index-zz7gzw57.js";
107
+ } from "./index-zxdawwc7.js";
106
108
  import {
107
109
  ZodError,
108
110
  init_zod
@@ -2935,6 +2937,19 @@ async function updateTaskStatus(directory, taskId, status, options) {
2935
2937
  warn(`[plan/manager] run-memory record for ${taskId} failed: ${err instanceof Error ? err.message : String(err)}`);
2936
2938
  }
2937
2939
  }
2940
+ if (status === "completed") {
2941
+ try {
2942
+ const completedTask = updatedPlan.phases.flatMap((phase) => phase.tasks).find((candidate) => candidate.id === taskId);
2943
+ const { maybePropagateSpeckitCheckoff } = await import("./speckit-checkoff-46g9sqak.js");
2944
+ await maybePropagateSpeckitCheckoff(directory, {
2945
+ taskId,
2946
+ frRefs: completedTask?.fr_refs ?? [],
2947
+ text: completedTask?.description ?? ""
2948
+ });
2949
+ } catch (err) {
2950
+ warn(`[plan/manager] speckit check-off for ${taskId} failed (non-fatal): ${err instanceof Error ? err.message : String(err)}`);
2951
+ }
2952
+ }
2938
2953
  if (status === "completed" && _internals5.isGitRepo(directory) && _internals5.isEpicModeActiveForProject(directory)) {
2939
2954
  const mergeFailure = _internals5.getWorktreeMergeFailure(taskId);
2940
2955
  if (mergeFailure) {
@@ -2950,7 +2965,7 @@ async function updateTaskStatus(directory, taskId, status, options) {
2950
2965
  break;
2951
2966
  }
2952
2967
  }
2953
- const { readDeclaredScopeFilesFromBindings } = await import("./scope-persistence-d0358pw7.js");
2968
+ const { readDeclaredScopeFilesFromBindings } = await import("./scope-persistence-nsw324ce.js");
2954
2969
  const canonicalScope = readDeclaredScopeFilesFromBindings({
2955
2970
  directory,
2956
2971
  taskId,
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  _internals,
4
4
  resolveWorktreeIsolationConfig
5
- } from "./index-ajm7ebyd.js";
5
+ } from "./index-dcttq1mn.js";
6
6
  import {
7
7
  ApprovalEvidenceSchema,
8
8
  BaseEvidenceSchema,
@@ -27,7 +27,7 @@ import {
27
27
  SpecSectionSchema,
28
28
  SwarmSpecSchema,
29
29
  validateSpecContent
30
- } from "./index-wrt875kh.js";
30
+ } from "./index-0725jpp7.js";
31
31
  import {
32
32
  ExecutionProfileSchema,
33
33
  MigrationStatusSchema,
@@ -36,7 +36,9 @@ import {
36
36
  PlanSchema,
37
37
  TaskSchema,
38
38
  TaskSizeSchema,
39
- TaskStatusSchema,
39
+ TaskStatusSchema
40
+ } from "./index-gx2vp8gx.js";
41
+ import {
40
42
  getSafeDefaultConfigLoadResult,
41
43
  loadAgentPrompt,
42
44
  loadGateOverrides,
@@ -44,9 +46,8 @@ import {
44
46
  loadPluginConfigWithMeta,
45
47
  loadPluginConfigWithMetaAsync,
46
48
  resetConfigAdvisoryDedup
47
- } from "./index-m1w40kfw.js";
48
- import"./index-zz7gzw57.js";
49
- import"./index-4ddpvd5c.js";
49
+ } from "./index-zptq8mp1.js";
50
+ import"./index-zxdawwc7.js";
50
51
  import {
51
52
  AUTO_REVIEW_V8_BURN_IN_DECISION,
52
53
  AgentOverrideConfigSchema,
@@ -71,7 +72,7 @@ import {
71
72
  TurboConfigSchema,
72
73
  WorktreeIsolationConfigSchema,
73
74
  resolveAutoReviewConfig
74
- } from "./index-9s1xzvnn.js";
75
+ } from "./index-defq2crz.js";
75
76
  import {
76
77
  ALL_AGENT_NAMES,
77
78
  ALL_SUBAGENT_NAMES,
@@ -5,7 +5,7 @@ import {
5
5
  batchDurabilityClass,
6
6
  classifyDbWriteError,
7
7
  getProjectDb
8
- } from "./index-nzekzzs2.js";
8
+ } from "./index-bv4b8tpa.js";
9
9
  import {
10
10
  _internals,
11
11
  canonicalRootKeyFresh
@@ -11,16 +11,16 @@ import {
11
11
  } from "./index-ae75rja9.js";
12
12
  import {
13
13
  resolveKnowledgeStoreDir
14
- } from "./index-34bwqcea.js";
14
+ } from "./index-zvxy0mev.js";
15
15
  import {
16
16
  atomicWriteFile
17
- } from "./index-f2v90gfc.js";
17
+ } from "./index-0v1rtanv.js";
18
18
  import {
19
19
  require_proper_lockfile
20
20
  } from "./index-7g4c7s5r.js";
21
21
  import {
22
22
  readCachedParsedFile
23
- } from "./index-ne9zamcs.js";
23
+ } from "./index-989v83pb.js";
24
24
  import {
25
25
  init_knowledge_types,
26
26
  isActiveStatus
@@ -739,7 +739,7 @@ async function applyConfidenceFloorAction(directory, touched, options) {
739
739
  const {
740
740
  readAuthoritativeKnowledgeCounterRollups,
741
741
  effectiveRetrievalOutcomes
742
- } = await import("./knowledge-events-2bgefatz.js");
742
+ } = await import("./knowledge-events-naf9kyyc.js");
743
743
  const rollups = await readAuthoritativeKnowledgeCounterRollups(directory);
744
744
  const flagIds = new Set;
745
745
  for (const e of atFloor) {
@@ -806,11 +806,11 @@ async function applyConfidenceFloorAction(directory, touched, options) {
806
806
  });
807
807
  }
808
808
  if (action === "quarantine" && toQuarantine.length > 0) {
809
- const { quarantineEntry } = await import("./knowledge-validator-723h2vck.js");
810
- const { KnowledgeConfigSchema } = await import("./schema-jt9axyj6.js");
809
+ const { quarantineEntry } = await import("./knowledge-validator-a1rfzkmv.js");
810
+ const { KnowledgeConfigSchema } = await import("./schema-a5zb02h8.js");
811
811
  let config;
812
812
  try {
813
- const { loadPluginConfigWithMeta } = await import("./index-93nx95me.js");
813
+ const { loadPluginConfigWithMeta } = await import("./index-mhrn7hbb.js");
814
814
  const { config: loadedConfig } = loadPluginConfigWithMeta(directory);
815
815
  config = KnowledgeConfigSchema.parse(loadedConfig.knowledge ?? {});
816
816
  } catch {
@@ -3,7 +3,7 @@ import {
3
3
  queryHistoricalOutcomes,
4
4
  readKnowledgeEvents,
5
5
  recordKnowledgeEvent
6
- } from "./index-epfjc1c1.js";
6
+ } from "./index-ekgc71m1.js";
7
7
  import {
8
8
  jaccardBigram,
9
9
  readKnowledge,
@@ -11,7 +11,7 @@ import {
11
11
  resolveSwarmKnowledgePath,
12
12
  transactKnowledge,
13
13
  wordBigrams
14
- } from "./index-yp25bc9n.js";
14
+ } from "./index-pnt98k7z.js";
15
15
  import {
16
16
  init_knowledge_types,
17
17
  isActiveStatus
@@ -224,11 +224,11 @@ async function maybeQuarantineOnContradiction(directory, entryId, threshold, win
224
224
  alreadyInactive: true
225
225
  };
226
226
  }
227
- const { quarantineEntry } = await import("./knowledge-validator-723h2vck.js");
227
+ const { quarantineEntry } = await import("./knowledge-validator-a1rfzkmv.js");
228
228
  let policyConfig;
229
229
  try {
230
- const { KnowledgeConfigSchema } = await import("./schema-jt9axyj6.js");
231
- const { loadPluginConfigWithMeta } = await import("./index-93nx95me.js");
230
+ const { KnowledgeConfigSchema } = await import("./schema-a5zb02h8.js");
231
+ const { loadPluginConfigWithMeta } = await import("./index-mhrn7hbb.js");
232
232
  const { config: loadedConfig } = loadPluginConfigWithMeta(directory);
233
233
  policyConfig = KnowledgeConfigSchema.parse(loadedConfig.knowledge ?? {});
234
234
  } catch {