opencode-swarm 7.107.6 → 7.109.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 (84) hide show
  1. package/.opencode/skills/clarify-spec/SKILL.md +15 -9
  2. package/.opencode/skills/critic-gate/SKILL.md +10 -4
  3. package/.opencode/skills/phase-wrap/SKILL.md +2 -2
  4. package/.opencode/skills/plan/SKILL.md +23 -11
  5. package/.opencode/skills/specify/SKILL.md +27 -9
  6. package/dist/cli/{capability-probe-wsjzcp48.js → capability-probe-sh9bwh39.js} +2 -1
  7. package/dist/cli/{config-doctor-kdq3vae4.js → config-doctor-q354tb2w.js} +2 -2
  8. package/dist/cli/core-vev13ej2.js +34 -0
  9. package/dist/cli/{curator-jpwvkpdv.js → curator-3efwdf9x.js} +25 -21
  10. package/dist/cli/{curator-drift-ed7p5mfy.js → curator-drift-169wgaxn.js} +4 -4
  11. package/dist/cli/curator-llm-factory-nttpcx4b.js +40 -0
  12. package/dist/cli/{dispatch-anmxxhen.js → dispatch-zr1xja4t.js} +2 -2
  13. package/dist/cli/{evidence-summary-service-6zsgw7x7.js → evidence-summary-service-j7jwf20f.js} +10 -8
  14. package/dist/cli/{gate-evidence-pgr7d942.js → gate-evidence-v6ds8rcp.js} +5 -4
  15. package/dist/cli/guardrail-explain-e85gbj0r.js +41 -0
  16. package/dist/cli/{guardrail-log-fjypsmek.js → guardrail-log-8mqqsssq.js} +4 -4
  17. package/dist/cli/hive-promoter-rc6z2x8f.js +48 -0
  18. package/dist/cli/{index-9b7qp18e.js → index-1cn967sa.js} +2 -2
  19. package/dist/cli/{index-h28wfp7n.js → index-1mjzvkzj.js} +29 -25
  20. package/dist/cli/{index-n1sptn1w.js → index-2nt4mq9n.js} +1 -1
  21. package/dist/cli/{index-57rthc1z.js → index-3e7jajwe.js} +2 -2
  22. package/dist/cli/{index-bq8kd9r9.js → index-5gnp8fyw.js} +3 -3
  23. package/dist/cli/index-5mkc2f9z.js +154 -0
  24. package/dist/cli/{index-0kxc7t16.js → index-6jng9c8t.js} +1 -1
  25. package/dist/cli/{index-b9v501fr.js → index-7xgqky26.js} +33 -5
  26. package/dist/cli/{index-4r5z8sgw.js → index-85bacexr.js} +2 -2
  27. package/dist/cli/{index-bpgqbwmf.js → index-9qxntjtx.js} +6 -6
  28. package/dist/cli/index-f1qyj61w.js +418 -0
  29. package/dist/cli/{index-wvxhynxq.js → index-fm7xz1ne.js} +1 -1
  30. package/dist/cli/{index-dfdg4ws5.js → index-fz1jgbvw.js} +6 -6
  31. package/dist/cli/{index-pchpahdf.js → index-h4c4rrwx.js} +20 -3
  32. package/dist/cli/{index-kxm3bdjh.js → index-mmny81g1.js} +6 -6
  33. package/dist/cli/{index-v4fcn4tr.js → index-q1exe2b3.js} +2 -198
  34. package/dist/cli/{index-57ymmh7h.js → index-r3j3458j.js} +4 -4
  35. package/dist/cli/{index-91j1sqzm.js → index-scww5b77.js} +47 -0
  36. package/dist/cli/{index-572t1qff.js → index-vb5t1kvs.js} +1477 -2045
  37. package/dist/cli/{index-3naa2ajc.js → index-vvk2g744.js} +10 -156
  38. package/dist/cli/{index-zej8cy0j.js → index-vx76tcxe.js} +1 -1
  39. package/dist/cli/{index-6h82c2h0.js → index-wfq4r95s.js} +1057 -193
  40. package/dist/cli/{index-xmarctsf.js → index-wg0665ft.js} +7 -7
  41. package/dist/cli/{index-4vsgp5a8.js → index-wj4jeavn.js} +1 -1
  42. package/dist/cli/index-wvrj16f0.js +206 -0
  43. package/dist/cli/index-x2q0gnt8.js +254 -0
  44. package/dist/cli/{index-xg18az81.js → index-yw8qpf51.js} +1 -1
  45. package/dist/cli/index.js +25 -21
  46. package/dist/cli/{knowledge-escalator-3sgwrgy9.js → knowledge-escalator-6v7sjprx.js} +8 -7
  47. package/dist/cli/{knowledge-events-kfc6xmkw.js → knowledge-events-6n3x3he2.js} +6 -5
  48. package/dist/cli/{knowledge-store-kyacem71.js → knowledge-store-exkw6yb1.js} +6 -5
  49. package/dist/cli/{knowledge-validator-ez3ws8ef.js → knowledge-validator-exymfcb9.js} +7 -6
  50. package/dist/cli/{pending-delegations-vfnpm8zt.js → pending-delegations-yyz3fcfn.js} +5 -4
  51. package/dist/cli/{pr-subscriptions-bpvazmsw.js → pr-subscriptions-vv8byxe6.js} +6 -5
  52. package/dist/cli/{schema-x0ekqzvs.js → schema-x17zmd03.js} +1 -1
  53. package/dist/cli/scope-persistence-6m5nsp1r.js +20 -0
  54. package/dist/cli/{skill-generator-x83re96d.js → skill-generator-mx9br4ty.js} +9 -8
  55. package/dist/commands/_shared/url-security.d.ts +13 -3
  56. package/dist/commands/close.d.ts +11 -0
  57. package/dist/commands/lanes.d.ts +35 -0
  58. package/dist/commands/registry.d.ts +9 -2
  59. package/dist/commands/sdd.d.ts +10 -0
  60. package/dist/config/schema.d.ts +102 -0
  61. package/dist/git/branch.d.ts +53 -7
  62. package/dist/git/index.d.ts +5 -1
  63. package/dist/git/pr.d.ts +35 -2
  64. package/dist/hooks/delegation-gate/worktree-isolation.d.ts +118 -2
  65. package/dist/hooks/delegation-gate/worktree-merge-status.d.ts +17 -0
  66. package/dist/hooks/init-orphan-recovery-advisory.d.ts +58 -0
  67. package/dist/hooks/init-orphan-recovery.d.ts +65 -0
  68. package/dist/index.js +452 -436
  69. package/dist/sandbox/executor.d.ts +11 -1
  70. package/dist/sandbox/linux/bubblewrap-executor.d.ts +3 -1
  71. package/dist/sandbox/macos/sandbox-exec-executor.d.ts +3 -1
  72. package/dist/sandbox/win32/native-sandbox-executor.d.ts +1 -1
  73. package/dist/sandbox/win32/restricted-environment-executor.d.ts +4 -1
  74. package/dist/sdd/effective-spec.d.ts +21 -0
  75. package/dist/turbo/lean/runner.d.ts +11 -20
  76. package/dist/turbo/lean/worktree.d.ts +9 -3
  77. package/dist/utils/bun-compat.d.ts +30 -0
  78. package/dist/worktree/core.d.ts +55 -0
  79. package/dist/worktree/merge.d.ts +5 -1
  80. package/dist/worktree/types.d.ts +38 -0
  81. package/package.json +1 -1
  82. package/dist/cli/curator-llm-factory-9y15npd5.js +0 -36
  83. package/dist/cli/guardrail-explain-jk0amzae.js +0 -37
  84. package/dist/cli/hive-promoter-j2krbdn9.js +0 -44
@@ -1,11 +1,7 @@
1
1
  // @bun
2
- import {
3
- emit
4
- } from "./index-vn263hqt.js";
5
2
  import {
6
3
  __commonJS,
7
- __require,
8
- __toESM
4
+ __require
9
5
  } from "./index-a76rekgs.js";
10
6
 
11
7
  // node_modules/graceful-fs/polyfills.js
@@ -1081,7 +1077,7 @@ var require_signal_exit = __commonJS((exports, module) => {
1081
1077
  emitter.count -= 1;
1082
1078
  };
1083
1079
  module.exports.unload = unload;
1084
- emit2 = function emit3(event, code, signal) {
1080
+ emit = function emit2(event, code, signal) {
1085
1081
  if (emitter.emitted[event]) {
1086
1082
  return;
1087
1083
  }
@@ -1097,8 +1093,8 @@ var require_signal_exit = __commonJS((exports, module) => {
1097
1093
  var listeners = process2.listeners(sig);
1098
1094
  if (listeners.length === emitter.count) {
1099
1095
  unload();
1100
- emit2("exit", null, sig);
1101
- emit2("afterexit", null, sig);
1096
+ emit("exit", null, sig);
1097
+ emit("afterexit", null, sig);
1102
1098
  if (isWin && sig === "SIGHUP") {
1103
1099
  sig = "SIGINT";
1104
1100
  }
@@ -1134,8 +1130,8 @@ var require_signal_exit = __commonJS((exports, module) => {
1134
1130
  return;
1135
1131
  }
1136
1132
  process2.exitCode = code || 0;
1137
- emit2("exit", process2.exitCode, null);
1138
- emit2("afterexit", process2.exitCode, null);
1133
+ emit("exit", process2.exitCode, null);
1134
+ emit("afterexit", process2.exitCode, null);
1139
1135
  originalProcessReallyExit.call(process2, process2.exitCode);
1140
1136
  };
1141
1137
  originalProcessEmit = process2.emit;
@@ -1145,8 +1141,8 @@ var require_signal_exit = __commonJS((exports, module) => {
1145
1141
  process2.exitCode = arg;
1146
1142
  }
1147
1143
  var ret = originalProcessEmit.apply(this, arguments);
1148
- emit2("exit", process2.exitCode, null);
1149
- emit2("afterexit", process2.exitCode, null);
1144
+ emit("exit", process2.exitCode, null);
1145
+ emit("afterexit", process2.exitCode, null);
1150
1146
  return ret;
1151
1147
  } else {
1152
1148
  return originalProcessEmit.apply(this, arguments);
@@ -1159,7 +1155,7 @@ var require_signal_exit = __commonJS((exports, module) => {
1159
1155
  var EE;
1160
1156
  var emitter;
1161
1157
  var unload;
1162
- var emit2;
1158
+ var emit;
1163
1159
  var sigListeners;
1164
1160
  var loaded;
1165
1161
  var load;
@@ -1528,146 +1524,4 @@ var require_proper_lockfile = __commonJS((exports, module) => {
1528
1524
  module.exports.checkSync = checkSync;
1529
1525
  });
1530
1526
 
1531
- // src/parallel/file-locks.ts
1532
- var import_proper_lockfile = __toESM(require_proper_lockfile(), 1);
1533
- import * as fs from "fs";
1534
- import * as path from "path";
1535
- var LOCKS_DIR = ".swarm/locks";
1536
- var LOCK_TIMEOUT_MS = 5 * 60 * 1000;
1537
- var _internals = {
1538
- tryAcquireLock,
1539
- writeFile: fs.promises.writeFile
1540
- };
1541
- function getLockFilePath(directory, filePath) {
1542
- const normalized = path.resolve(directory, filePath);
1543
- const baseDir = path.resolve(directory) + path.sep;
1544
- const pathOk = process.platform === "win32" ? normalized.toLowerCase().startsWith(baseDir.toLowerCase()) : normalized.startsWith(baseDir);
1545
- if (!pathOk) {
1546
- throw new Error("Invalid file path: path traversal not allowed");
1547
- }
1548
- const pathForHash = process.platform === "win32" ? normalized.toLowerCase() : normalized;
1549
- const hash = Buffer.from(pathForHash).toString("base64").replace(/[/+=]/g, "_");
1550
- const lockPath = path.join(directory, LOCKS_DIR, `${hash}.lock`);
1551
- if (process.platform === "win32") {
1552
- const oldHash = Buffer.from(normalized).toString("base64").replace(/[/+=]/g, "_");
1553
- const oldLockPath = path.join(directory, LOCKS_DIR, `${oldHash}.lock`);
1554
- if (fs.existsSync(oldLockPath)) {
1555
- return oldLockPath;
1556
- }
1557
- }
1558
- return lockPath;
1559
- }
1560
- async function tryAcquireLock(directory, filePath, agent, taskId) {
1561
- const lockPath = getLockFilePath(directory, filePath);
1562
- const locksDir = path.dirname(lockPath);
1563
- if (!fs.existsSync(locksDir)) {
1564
- fs.mkdirSync(locksDir, { recursive: true });
1565
- }
1566
- if (!fs.existsSync(lockPath)) {
1567
- fs.writeFileSync(lockPath, "", "utf-8");
1568
- }
1569
- let release;
1570
- try {
1571
- release = await import_proper_lockfile.default.lock(lockPath, {
1572
- stale: LOCK_TIMEOUT_MS,
1573
- retries: {
1574
- retries: 5,
1575
- minTimeout: 10,
1576
- maxTimeout: 500,
1577
- factor: 2
1578
- },
1579
- realpath: false
1580
- });
1581
- } catch (err) {
1582
- const code = err.code;
1583
- if (code === "ELOCKED" || code === "EEXIST") {
1584
- return { acquired: false };
1585
- }
1586
- throw err;
1587
- }
1588
- const lock = {
1589
- filePath,
1590
- agent,
1591
- taskId,
1592
- timestamp: new Date().toISOString(),
1593
- expiresAt: Date.now() + LOCK_TIMEOUT_MS,
1594
- _release: release
1595
- };
1596
- return { acquired: true, lock };
1597
- }
1598
-
1599
- // src/evidence/lock.ts
1600
- class EvidenceLockTimeoutError extends Error {
1601
- directory;
1602
- evidencePath;
1603
- agent;
1604
- taskId;
1605
- constructor(directory, evidencePath, agent, taskId, timeoutMs) {
1606
- super(`Evidence lock timeout after ${timeoutMs}ms for ${evidencePath} (agent=${agent}, task=${taskId})`);
1607
- this.name = "EvidenceLockTimeoutError";
1608
- this.directory = directory;
1609
- this.evidencePath = evidencePath;
1610
- this.agent = agent;
1611
- this.taskId = taskId;
1612
- }
1613
- }
1614
- var BACKOFF_START_MS = 50;
1615
- var BACKOFF_MAX_MS = 2000;
1616
- var BACKOFF_JITTER_RATIO = 0.25;
1617
- function backoffMs(attempt) {
1618
- const base = Math.min(BACKOFF_START_MS * 2 ** attempt, BACKOFF_MAX_MS);
1619
- const jitter = base * BACKOFF_JITTER_RATIO * (Math.random() * 2 - 1);
1620
- return Math.max(1, Math.round(base + jitter));
1621
- }
1622
- async function withEvidenceLock(directory, evidencePath, agent, taskId, fn, timeoutMs = 60000) {
1623
- const deadline = Date.now() + timeoutMs;
1624
- let attempt = 0;
1625
- while (true) {
1626
- const result = await tryAcquireLock(directory, evidencePath, agent, taskId);
1627
- if (result.acquired) {
1628
- const lock = result.lock;
1629
- if (attempt > 0) {
1630
- emit("evidence_lock_stale_recovered", {
1631
- directory,
1632
- evidencePath,
1633
- agent,
1634
- taskId,
1635
- attempt
1636
- });
1637
- }
1638
- emit("evidence_lock_acquired", {
1639
- directory,
1640
- evidencePath,
1641
- agent,
1642
- taskId,
1643
- attempt
1644
- });
1645
- try {
1646
- return await fn();
1647
- } finally {
1648
- if (lock._release) {
1649
- try {
1650
- await lock._release();
1651
- } catch {}
1652
- }
1653
- }
1654
- }
1655
- if (Date.now() >= deadline) {
1656
- throw new EvidenceLockTimeoutError(directory, evidencePath, agent, taskId, timeoutMs);
1657
- }
1658
- emit("evidence_lock_contended", {
1659
- directory,
1660
- evidencePath,
1661
- agent,
1662
- taskId,
1663
- attempt
1664
- });
1665
- const delay = Math.min(backoffMs(attempt), deadline - Date.now());
1666
- if (delay > 0) {
1667
- await new Promise((resolve2) => setTimeout(resolve2, delay));
1668
- }
1669
- attempt++;
1670
- }
1671
- }
1672
-
1673
- export { require_proper_lockfile, tryAcquireLock, withEvidenceLock };
1527
+ export { require_proper_lockfile };
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  redactPath,
4
4
  redactShellCommand
5
- } from "./index-4vsgp5a8.js";
5
+ } from "./index-wj4jeavn.js";
6
6
 
7
7
  // src/services/guardrail-log-service.ts
8
8
  import * as fs from "fs/promises";