opencode-swarm 7.139.5 → 7.139.7

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 (87) hide show
  1. package/.opencode/skills/brainstorm/SKILL.md +8 -101
  2. package/.opencode/skills/execute/SKILL.md +10 -9
  3. package/.opencode/skills/issue-ingest/SKILL.md +1 -1
  4. package/.opencode/skills/plan/SKILL.md +40 -97
  5. package/.opencode/skills/specify/SKILL.md +3 -89
  6. package/.opencode/skills/swarm-pr-review/SKILL.md +62 -6
  7. package/.opencode/skills/swarm-pr-review/references/prompt-templates.md +44 -6
  8. package/dist/agents/architect.d.ts +2 -3
  9. package/dist/agents/explorer.d.ts +1 -1
  10. package/dist/cli/{config-doctor-jgv6h8hd.js → config-doctor-pc48vfzg.js} +3 -3
  11. package/dist/cli/{core-aj5g7an6.js → core-jtj9j6z5.js} +2 -2
  12. package/dist/cli/{curation-policy-9a8xmh4x.js → curation-policy-2rh3zysm.js} +6 -6
  13. package/dist/cli/{curator-llm-factory-7c5s2cdm.js → curator-llm-factory-de10hnhj.js} +28 -28
  14. package/dist/cli/{curator-xhzdk0qy.js → curator-tm9rp9yx.js} +28 -28
  15. package/dist/cli/{evidence-summary-service-g82bsjqa.js → evidence-summary-service-nfdc1ht9.js} +9 -8
  16. package/dist/cli/{explorer-swjc297z.js → explorer-e9h66egs.js} +1 -1
  17. package/dist/cli/{gate-evidence-72cgrvs2.js → gate-evidence-46qeyfc1.js} +4 -4
  18. package/dist/cli/{guardrail-explain-vw1kz4k1.js → guardrail-explain-979dxbd5.js} +29 -29
  19. package/dist/cli/{guardrail-log-j91e1s6q.js → guardrail-log-wxa8janm.js} +4 -4
  20. package/dist/cli/{hive-promoter-5rk01jea.js → hive-promoter-w4ezne1c.js} +28 -28
  21. package/dist/cli/{index-sd657fkp.js → index-1m1ksyqt.js} +1 -1
  22. package/dist/cli/{index-hhgbbceq.js → index-3r61js2q.js} +4 -4
  23. package/dist/cli/{index-gee0y2d8.js → index-3w0kxqyy.js} +2 -2
  24. package/dist/cli/{index-wqk50bv0.js → index-4tjk6k4a.js} +4 -4
  25. package/dist/cli/{index-9xczz1yh.js → index-6d60gctc.js} +2 -2
  26. package/dist/cli/{index-0cyqmr36.js → index-7f4jhdhw.js} +2 -2
  27. package/dist/cli/{index-z0tt5j2s.js → index-92j14gdt.js} +2 -2
  28. package/dist/cli/{index-xmhhhjjw.js → index-adyxbmt5.js} +3 -3
  29. package/dist/cli/{index-j77frjq8.js → index-b9rd29ge.js} +1 -1
  30. package/dist/cli/{index-6nzmp937.js → index-brh827g0.js} +442 -27
  31. package/dist/cli/{index-9rbwfydj.js → index-cp592623.js} +6 -6
  32. package/dist/cli/{index-1kz6da87.js → index-d181x9zr.js} +2 -1
  33. package/dist/cli/{index-jtg7gtky.js → index-f7wq4q9r.js} +5 -5
  34. package/dist/cli/{index-6r522srn.js → index-h2waehqq.js} +1 -1
  35. package/dist/cli/{index-6z0a940s.js → index-hbnsmnb0.js} +2 -2
  36. package/dist/cli/{index-s0qc4gj6.js → index-hfvxhk4z.js} +1 -1
  37. package/dist/cli/{index-w9tezcdd.js → index-j0gy1ggg.js} +2 -2
  38. package/dist/cli/{index-0xkjhgrf.js → index-jfjnn408.js} +1 -1
  39. package/dist/cli/{index-r2bggfra.js → index-k4tcdnvd.js} +3 -3
  40. package/dist/cli/{index-6rxgb5r9.js → index-kbfsp07d.js} +16 -6
  41. package/dist/cli/{index-5z2xps64.js → index-n0pja0qs.js} +2 -2
  42. package/dist/cli/{index-px7z3r1c.js → index-n4x9racs.js} +3 -3
  43. package/dist/cli/{index-2ga0zt4s.js → index-nxs7r6sd.js} +1532 -972
  44. package/dist/cli/{index-4wjk296r.js → index-r4t92q32.js} +2 -2
  45. package/dist/cli/{index-33skgk1a.js → index-rs1f1bh0.js} +1 -1
  46. package/dist/cli/{index-h2zm446q.js → index-rvr1p73g.js} +2 -2
  47. package/dist/cli/{index-rsrx77fg.js → index-ry0hgg3m.js} +3 -3
  48. package/dist/cli/{index-9jr92bff.js → index-sd7ajhb5.js} +1 -1
  49. package/dist/cli/{index-fb11cwqr.js → index-ssjm3458.js} +2 -2
  50. package/dist/cli/{index-6mjf4vr1.js → index-v2xrer41.js} +16 -29
  51. package/dist/cli/{index-ngfw3sd4.js → index-vx6mwms2.js} +30 -30
  52. package/dist/cli/{index-nrx08gcr.js → index-yyyk63kk.js} +2 -2
  53. package/dist/cli/index.js +28 -28
  54. package/dist/cli/{knowledge-escalator-rhycg2rh.js → knowledge-escalator-kyejsd7z.js} +7 -7
  55. package/dist/cli/{knowledge-events-yjkszs87.js → knowledge-events-n5z7w8x2.js} +5 -5
  56. package/dist/cli/{knowledge-link-bmbatt8s.js → knowledge-link-q46k9adx.js} +4 -4
  57. package/dist/cli/{knowledge-store-qe7geq48.js → knowledge-store-s65wnc1m.js} +5 -5
  58. package/dist/cli/{knowledge-validator-rwptbkpz.js → knowledge-validator-cgtmhqya.js} +8 -8
  59. package/dist/cli/{pending-delegations-7ayryxbg.js → pending-delegations-qzrx38y9.js} +3 -3
  60. package/dist/cli/{pr-subscriptions-w5y08ebc.js → pr-subscriptions-5s59h4dd.js} +3 -3
  61. package/dist/cli/{runner-h7vmgkth.js → runner-y78d7ryb.js} +5 -5
  62. package/dist/cli/{scan-cursor-v1zkh6st.js → scan-cursor-6z3rbdxp.js} +6 -6
  63. package/dist/cli/{schema-9v8wgmxf.js → schema-fvj8smjz.js} +2 -2
  64. package/dist/cli/{scope-persistence-tj6qway9.js → scope-persistence-dr1msqxw.js} +5 -5
  65. package/dist/cli/{skill-generator-a91bxwv2.js → skill-generator-9kzsefn1.js} +9 -9
  66. package/dist/cli/{telemetry-62cn5t24.js → telemetry-sc57xtb0.js} +1 -1
  67. package/dist/cli/{worktree-collision-ownership-hs5c2qzp.js → worktree-collision-ownership-7a8e6gr9.js} +3 -3
  68. package/dist/config/plan-schema.d.ts +2 -0
  69. package/dist/db/index.d.ts +1 -1
  70. package/dist/db/qa-gate-profile.d.ts +86 -2
  71. package/dist/db/task-checkpoint-receipt.d.ts +27 -0
  72. package/dist/hooks/pr-workflow-gate.d.ts +2 -2
  73. package/dist/index.js +453 -363
  74. package/dist/plan/manager.d.ts +4 -0
  75. package/dist/qa-gate/recovery.d.ts +6 -0
  76. package/dist/services/export-service.d.ts +2 -6
  77. package/dist/services/handoff-service.d.ts +2 -6
  78. package/dist/tools/checkpoint.d.ts +17 -7
  79. package/dist/tools/dispatch-lanes.d.ts +3 -6
  80. package/dist/tools/get-approved-plan.d.ts +8 -6
  81. package/dist/tools/get-qa-gate-profile.d.ts +7 -3
  82. package/dist/tools/phase-complete/gates/gate-helpers.d.ts +1 -0
  83. package/dist/tools/qa-gate-plan-identity.d.ts +28 -0
  84. package/dist/tools/save-plan.d.ts +3 -14
  85. package/dist/tools/set-qa-gates.d.ts +13 -8
  86. package/dist/tools/write-drift-evidence.d.ts +2 -0
  87. package/package.json +1 -1
@@ -6,10 +6,10 @@ import {
6
6
  } from "./index-ae75rja9.js";
7
7
  import {
8
8
  resolveKnowledgeStoreDir
9
- } from "./index-33skgk1a.js";
9
+ } from "./index-rs1f1bh0.js";
10
10
  import {
11
11
  atomicWriteFile
12
- } from "./index-6r522srn.js";
12
+ } from "./index-h2waehqq.js";
13
13
  import {
14
14
  readCachedParsedFile
15
15
  } from "./index-ed5ykebp.js";
@@ -702,7 +702,7 @@ async function applyConfidenceFloorAction(directory, touched, options) {
702
702
  const recovered = touched.filter((e) => e.confidence > CONFIDENCE_FLOOR + FLOOR_EPSILON && e.confidence_floor_demoted);
703
703
  if (atFloor.length === 0 && recovered.length === 0)
704
704
  return;
705
- const { readKnowledgeCounterRollups, effectiveRetrievalOutcomes } = await import("./knowledge-events-yjkszs87.js");
705
+ const { readKnowledgeCounterRollups, effectiveRetrievalOutcomes } = await import("./knowledge-events-n5z7w8x2.js");
706
706
  const rollups = await readKnowledgeCounterRollups(directory);
707
707
  const flagIds = new Set;
708
708
  for (const e of atFloor) {
@@ -769,11 +769,11 @@ async function applyConfidenceFloorAction(directory, touched, options) {
769
769
  });
770
770
  }
771
771
  if (action === "quarantine" && toQuarantine.length > 0) {
772
- const { quarantineEntry } = await import("./knowledge-validator-rwptbkpz.js");
773
- const { KnowledgeConfigSchema } = await import("./schema-9v8wgmxf.js");
772
+ const { quarantineEntry } = await import("./knowledge-validator-cgtmhqya.js");
773
+ const { KnowledgeConfigSchema } = await import("./schema-fvj8smjz.js");
774
774
  let config;
775
775
  try {
776
- const { loadPluginConfigWithMeta } = await import("./index-hhgbbceq.js");
776
+ const { loadPluginConfigWithMeta } = await import("./index-3r61js2q.js");
777
777
  const { config: loadedConfig } = loadPluginConfigWithMeta(directory);
778
778
  config = KnowledgeConfigSchema.parse(loadedConfig.knowledge ?? {});
779
779
  } catch {
@@ -11,7 +11,8 @@ var ExecutionProfileSchema = exports_external.object({
11
11
  max_concurrent_tasks: exports_external.number().int().min(1).max(64).default(10),
12
12
  council_parallel: exports_external.boolean().default(true),
13
13
  locked: exports_external.boolean().default(false),
14
- auto_proceed: exports_external.boolean().default(false)
14
+ auto_proceed: exports_external.boolean().default(false),
15
+ commit_after_each_completed_task: exports_external.boolean().default(false)
15
16
  });
16
17
  var TaskStatusSchema = exports_external.enum([
17
18
  "pending",
@@ -6,13 +6,13 @@ import {
6
6
  resolveSwarmKnowledgePath,
7
7
  transactKnowledge,
8
8
  wordBigrams
9
- } from "./index-9rbwfydj.js";
9
+ } from "./index-cp592623.js";
10
10
  import {
11
11
  countEntryContradictionsInWindow,
12
12
  countEntryViolationsInWindow,
13
13
  readKnowledgeEvents,
14
14
  recordKnowledgeEvent
15
- } from "./index-px7z3r1c.js";
15
+ } from "./index-n4x9racs.js";
16
16
  import {
17
17
  init_knowledge_types,
18
18
  isActiveStatus
@@ -190,11 +190,11 @@ async function maybeQuarantineOnContradiction(directory, entryId, threshold, win
190
190
  alreadyInactive: true
191
191
  };
192
192
  }
193
- const { quarantineEntry } = await import("./knowledge-validator-rwptbkpz.js");
193
+ const { quarantineEntry } = await import("./knowledge-validator-cgtmhqya.js");
194
194
  let policyConfig;
195
195
  try {
196
- const { KnowledgeConfigSchema } = await import("./schema-9v8wgmxf.js");
197
- const { loadPluginConfigWithMeta } = await import("./index-hhgbbceq.js");
196
+ const { KnowledgeConfigSchema } = await import("./schema-fvj8smjz.js");
197
+ const { loadPluginConfigWithMeta } = await import("./index-3r61js2q.js");
198
198
  const { config: loadedConfig } = loadPluginConfigWithMeta(directory);
199
199
  policyConfig = KnowledgeConfigSchema.parse(loadedConfig.knowledge ?? {});
200
200
  } catch {
@@ -4,7 +4,7 @@ import {
4
4
  } from "./index-ed5ykebp.js";
5
5
  import {
6
6
  withEvidenceLock
7
- } from "./index-s0qc4gj6.js";
7
+ } from "./index-hfvxhk4z.js";
8
8
  import {
9
9
  bunWrite
10
10
  } from "./index-4nt52yr9.js";
@@ -12,7 +12,7 @@ import {
12
12
  import {
13
13
  SWARM_WORKTREE_DIR_NAME,
14
14
  init_constants
15
- } from "./index-4wjk296r.js";
15
+ } from "./index-r4t92q32.js";
16
16
  import {
17
17
  __require
18
18
  } from "./index-a76rekgs.js";
@@ -86,7 +86,7 @@ var _internals = {
86
86
  symlinkSync: fs.symlinkSync
87
87
  },
88
88
  writeScopeToDisk: async (directory, taskId, files) => {
89
- const { writeScopeToDisk: realWrite } = await import("./scope-persistence-tj6qway9.js");
89
+ const { writeScopeToDisk: realWrite } = await import("./scope-persistence-dr1msqxw.js");
90
90
  return realWrite(directory, taskId, files);
91
91
  },
92
92
  writeLaneProfileToDisk: async (_worktreePath, _laneIndex, _envOverrides) => {
@@ -8,7 +8,7 @@ import {
8
8
  } from "./index-zgwm4ryv.js";
9
9
  import {
10
10
  emit
11
- } from "./index-rsrx77fg.js";
11
+ } from "./index-ry0hgg3m.js";
12
12
  import {
13
13
  __toESM
14
14
  } from "./index-a76rekgs.js";
@@ -15,10 +15,10 @@ import {
15
15
  import {
16
16
  init_schema,
17
17
  stripKnownSwarmPrefix
18
- } from "./index-z0tt5j2s.js";
18
+ } from "./index-92j14gdt.js";
19
19
  import {
20
20
  init_constants
21
- } from "./index-4wjk296r.js";
21
+ } from "./index-r4t92q32.js";
22
22
  import {
23
23
  __commonJS,
24
24
  __toESM
@@ -4,7 +4,7 @@ import {
4
4
  } from "./index-k46me75h.js";
5
5
  import {
6
6
  withEvidenceLock
7
- } from "./index-s0qc4gj6.js";
7
+ } from "./index-hfvxhk4z.js";
8
8
  import {
9
9
  log
10
10
  } from "./index-zgwm4ryv.js";
@@ -2,18 +2,18 @@
2
2
  import {
3
3
  ALLOWED_SKILL_PATH_PREFIXES,
4
4
  validateSkillPath
5
- } from "./index-wqk50bv0.js";
5
+ } from "./index-4tjk6k4a.js";
6
6
  import {
7
7
  computeOutcomeSignal,
8
8
  readKnowledge,
9
9
  resolveHiveKnowledgePath,
10
10
  resolveSwarmKnowledgePath,
11
11
  transactKnowledge
12
- } from "./index-9rbwfydj.js";
12
+ } from "./index-cp592623.js";
13
13
  import {
14
14
  effectiveRetrievalOutcomes,
15
15
  readKnowledgeCounterRollups
16
- } from "./index-px7z3r1c.js";
16
+ } from "./index-n4x9racs.js";
17
17
  import {
18
18
  advisoryWarn,
19
19
  init_warning_buffer
@@ -2,12 +2,12 @@
2
2
  import {
3
3
  assertProjectRoot,
4
4
  withEvidenceLock
5
- } from "./index-s0qc4gj6.js";
5
+ } from "./index-hfvxhk4z.js";
6
6
  import {
7
7
  ExecutionProfileSchema,
8
8
  PlanSchema,
9
9
  TaskStatusSchema
10
- } from "./index-1kz6da87.js";
10
+ } from "./index-d181x9zr.js";
11
11
  import {
12
12
  criticalWarn,
13
13
  init_logger,
@@ -15,12 +15,16 @@ import {
15
15
  } from "./index-zgwm4ryv.js";
16
16
  import {
17
17
  emit
18
- } from "./index-rsrx77fg.js";
18
+ } from "./index-ry0hgg3m.js";
19
19
 
20
20
  // src/plan/utils.ts
21
+ import { createHash } from "crypto";
21
22
  function derivePlanId(plan) {
22
23
  return `${plan.swarm}-${plan.title}`.replace(/[^a-zA-Z0-9-_]/g, "_");
23
24
  }
25
+ function derivePlanIdentityHash(plan) {
26
+ return createHash("sha256").update(JSON.stringify([plan.swarm, plan.title]), "utf8").digest("hex");
27
+ }
24
28
 
25
29
  // src/plan/ledger.ts
26
30
  import * as crypto from "crypto";
@@ -61,7 +65,10 @@ function computePlanHash(plan) {
61
65
  swarm: plan.swarm,
62
66
  current_phase: plan.current_phase,
63
67
  migration_status: plan.migration_status,
64
- execution_profile: plan.execution_profile,
68
+ execution_profile: plan.execution_profile ? {
69
+ ...plan.execution_profile,
70
+ commit_after_each_completed_task: plan.execution_profile.commit_after_each_completed_task === true ? true : undefined
71
+ } : undefined,
65
72
  phases: plan.phases.map((phase) => ({
66
73
  id: phase.id,
67
74
  name: phase.name,
@@ -91,7 +98,10 @@ function computePlanStructureHash(plan) {
91
98
  swarm: plan.swarm,
92
99
  current_phase: plan.current_phase,
93
100
  migration_status: plan.migration_status,
94
- execution_profile: plan.execution_profile,
101
+ execution_profile: plan.execution_profile ? {
102
+ ...plan.execution_profile,
103
+ commit_after_each_completed_task: plan.execution_profile.commit_after_each_completed_task === true ? true : undefined
104
+ } : undefined,
95
105
  phases: plan.phases.map((phase) => ({
96
106
  id: phase.id,
97
107
  name: phase.name,
@@ -548,4 +558,4 @@ function findLastApprovedSnapshot(events, expectedPlanId, extraFilter) {
548
558
  return null;
549
559
  }
550
560
 
551
- export { derivePlanId, LedgerStaleWriterError, computePlanHash, computePlanStructureHash, computeCurrentPlanHash, ledgerExists, getLatestLedgerSeq, readLedgerEvents, initLedger, appendLedgerEvent, takeSnapshotWithRetry, takeSnapshotEvent, replayFromLedger, replayFromLedgerWithStatus, loadLastApprovedPlan };
561
+ export { derivePlanId, derivePlanIdentityHash, LedgerStaleWriterError, computePlanHash, computePlanStructureHash, computeCurrentPlanHash, ledgerExists, getLatestLedgerSeq, readLedgerEvents, initLedger, appendLedgerEvent, takeSnapshotWithRetry, takeSnapshotEvent, replayFromLedger, replayFromLedgerWithStatus, loadLastApprovedPlan };
@@ -3,10 +3,10 @@ import {
3
3
  atomicWriteFile,
4
4
  taskEvidencePath,
5
5
  withTaskEvidenceLock
6
- } from "./index-6r522srn.js";
6
+ } from "./index-h2waehqq.js";
7
7
  import {
8
8
  telemetry
9
- } from "./index-rsrx77fg.js";
9
+ } from "./index-ry0hgg3m.js";
10
10
  import {
11
11
  exports_external,
12
12
  init_zod
@@ -4,10 +4,10 @@ import {
4
4
  } from "./index-ae75rja9.js";
5
5
  import {
6
6
  resolveKnowledgeStoreDir
7
- } from "./index-33skgk1a.js";
7
+ } from "./index-rs1f1bh0.js";
8
8
  import {
9
9
  atomicWriteFile
10
- } from "./index-6r522srn.js";
10
+ } from "./index-h2waehqq.js";
11
11
  import {
12
12
  require_proper_lockfile
13
13
  } from "./index-7g4c7s5r.js";
@@ -628,7 +628,7 @@ async function applyKnowledgeVerdictFeedback(directory, options) {
628
628
  deltas.push({ id, delta });
629
629
  }
630
630
  if (deltas.length > 0) {
631
- const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-qe7geq48.js");
631
+ const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-s65wnc1m.js");
632
632
  await bumpKnowledgeConfidenceBatch(directory, deltas, options?.floorOptions);
633
633
  }
634
634
  return {