opencode-swarm 7.165.0 → 7.166.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 (95) 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/delegation-cost-identity.d.ts +41 -0
  4. package/dist/background/delegation-lifecycle.d.ts +24 -5
  5. package/dist/background/pending-delegations.d.ts +2 -0
  6. package/dist/background/pr-monitor-worker.d.ts +60 -6
  7. package/dist/background/pr-subscriptions.d.ts +13 -0
  8. package/dist/cli/{capability-probe-5wa7mcp6.js → capability-probe-faqefhah.js} +2 -1
  9. package/dist/cli/{coder-settlement-89nt4j7g.js → coder-settlement-ydg2jfrk.js} +8 -8
  10. package/dist/cli/{config-doctor-gm6f5chm.js → config-doctor-drqx6tzc.js} +2 -2
  11. package/dist/cli/{core-91p43zwj.js → core-x6sftfwt.js} +1 -1
  12. package/dist/cli/{curation-policy-bqpmry2n.js → curation-policy-jtzwz6bc.js} +4 -4
  13. package/dist/cli/{curator-drift-hbc3w5zj.js → curator-drift-2vwtkegg.js} +2 -2
  14. package/dist/cli/{curator-4bs2hmy9.js → curator-kg2h8jjf.js} +34 -34
  15. package/dist/cli/curator-llm-factory-7znajprp.js +70 -0
  16. package/dist/cli/{evidence-summary-service-g1xd8egd.js → evidence-summary-service-ry5ebnmq.js} +15 -15
  17. package/dist/cli/{gate-evidence-gdmgsz7c.js → gate-evidence-qgeceqy8.js} +5 -5
  18. package/dist/cli/guardrail-explain-jdv4n2j3.js +71 -0
  19. package/dist/cli/{guardrail-log-nyggdv04.js → guardrail-log-s7c3rpde.js} +7 -7
  20. package/dist/cli/{guardrail-reset-rp9jq0gj.js → guardrail-reset-4nmy7xas.js} +34 -34
  21. package/dist/cli/{hive-promoter-39xb4tx2.js → hive-promoter-w5tsgttc.js} +34 -34
  22. package/dist/cli/{index-tqw8w2n5.js → index-17yszqs5.js} +1 -1
  23. package/dist/cli/{index-qzvry1n1.js → index-289epdpc.js} +36 -36
  24. package/dist/cli/{index-7h94rfem.js → index-2dvk153d.js} +14 -12
  25. package/dist/cli/{index-p7hdp3rp.js → index-2rm5x9ps.js} +1 -1
  26. package/dist/cli/{index-xwbn7c8m.js → index-2v17wb75.js} +2 -2
  27. package/dist/cli/{index-y1zhpfk8.js → index-30f4fe30.js} +4 -4
  28. package/dist/cli/{index-n3pjcks8.js → index-359djbj1.js} +5 -5
  29. package/dist/cli/{index-4gmt79q9.js → index-4mpdy32j.js} +1 -1
  30. package/dist/cli/{index-afpkqsdb.js → index-52jfm5s0.js} +13 -6
  31. package/dist/cli/{index-6m24v15v.js → index-79sr3fd1.js} +2 -2
  32. package/dist/cli/{index-dh5th4jn.js → index-8hqkrd2j.js} +1 -1
  33. package/dist/cli/{index-3xyjvx24.js → index-8m12y79g.js} +11 -9
  34. package/dist/cli/{index-e6n7cemz.js → index-8n62bphd.js} +11 -7
  35. package/dist/cli/{index-hdakb4n9.js → index-9hy5q7gp.js} +15 -12
  36. package/dist/cli/{index-2k53pfnc.js → index-a5w71m8f.js} +4 -4
  37. package/dist/cli/{index-6rx1rdaq.js → index-a7rw4g4s.js} +1 -1
  38. package/dist/cli/{index-w6988bbc.js → index-aftapk6j.js} +75 -1
  39. package/dist/cli/{index-hwz46jj7.js → index-an89qzd9.js} +2074 -545
  40. package/dist/cli/{index-58be2gtd.js → index-apxaa755.js} +2 -2
  41. package/dist/cli/{index-j2svfhzk.js → index-axf65x87.js} +1 -1
  42. package/dist/cli/{index-g8wdekzz.js → index-bw7r2b2m.js} +2 -2
  43. package/dist/cli/{index-ajknebrc.js → index-c20gf089.js} +1 -1
  44. package/dist/cli/{index-ptsqnxwd.js → index-czr3jcg6.js} +20 -10
  45. package/dist/cli/{index-jre6tm3v.js → index-edm41q4j.js} +1 -1
  46. package/dist/cli/{index-r5hj3nfe.js → index-ejf6w8vw.js} +2 -2
  47. package/dist/cli/{index-c4ddtrqg.js → index-fywshabz.js} +6 -6
  48. package/dist/cli/{index-6be5caj8.js → index-hrkamw9q.js} +3 -3
  49. package/dist/cli/{index-f36hy1x4.js → index-hvk3zs62.js} +1 -1
  50. package/dist/cli/{index-5ebgzb5a.js → index-hwj25q9r.js} +78 -53
  51. package/dist/cli/{index-gn6ybsc4.js → index-jc9cxh90.js} +7 -7
  52. package/dist/cli/{index-e45htt92.js → index-jx9f4ke1.js} +1 -1
  53. package/dist/cli/{index-zycp24b9.js → index-mg43w8p2.js} +1 -1
  54. package/dist/cli/{index-0e9jh9c7.js → index-nb924ar6.js} +2 -2
  55. package/dist/cli/{index-k1ntjzmf.js → index-p04pa9c9.js} +1 -1
  56. package/dist/cli/{index-4fwbbad3.js → index-q1r1cfww.js} +46 -17
  57. package/dist/cli/{index-5ythtd9t.js → index-qkq56zyr.js} +11 -11
  58. package/dist/cli/{index-1v6vc90w.js → index-rkn17q5e.js} +3 -3
  59. package/dist/cli/{index-556ja8an.js → index-yzjaj53h.js} +9 -2
  60. package/dist/cli/index.js +34 -34
  61. package/dist/cli/{knowledge-escalator-eq07pcj3.js → knowledge-escalator-xdzmr31d.js} +10 -10
  62. package/dist/cli/{knowledge-events-rv9q9mkm.js → knowledge-events-1t1t0bv7.js} +8 -8
  63. package/dist/cli/{knowledge-link-dgvbqjqg.js → knowledge-link-1zykfk1p.js} +3 -3
  64. package/dist/cli/{knowledge-store-cxcr0ttk.js → knowledge-store-m2snb0xg.js} +4 -4
  65. package/dist/cli/{knowledge-validator-8qtd9ys0.js → knowledge-validator-tf7yq2pd.js} +6 -6
  66. package/dist/cli/{pending-delegations-dp3g8e7k.js → pending-delegations-jr8hwxrz.js} +11 -9
  67. package/dist/cli/{pr-subscriptions-3vx06rar.js → pr-subscriptions-ca1xmf9r.js} +13 -9
  68. package/dist/cli/{pr-workflow-gate-bbet0apk.js → pr-workflow-gate-fb1dj0zx.js} +34 -34
  69. package/dist/cli/{runner-0e3bjeev.js → runner-j3acybhs.js} +4 -4
  70. package/dist/cli/{scan-cursor-zwm0xng7.js → scan-cursor-3gdvy0ym.js} +5 -5
  71. package/dist/cli/{schema-ebfxgya0.js → schema-mzb1354k.js} +1 -1
  72. package/dist/cli/{scope-persistence-6c55akfz.js → scope-persistence-c4n21b5n.js} +14 -14
  73. package/dist/cli/{skill-generator-mv5jxzsh.js → skill-generator-dvpvwt8k.js} +12 -12
  74. package/dist/cli/{snapshot-coordination-init-n556wa18.js → snapshot-coordination-init-g7v63zcm.js} +34 -34
  75. package/dist/cli/{telemetry-a1yvjerj.js → telemetry-9h1z2w9d.js} +1 -1
  76. package/dist/cli/{worktree-collision-ownership-pp4z4z8p.js → worktree-collision-ownership-k15qrpy9.js} +9 -9
  77. package/dist/cli/{worktree-isolation-69hz9dgg.js → worktree-isolation-y7ec1pm5.js} +34 -34
  78. package/dist/commands/pr-monitor-status.d.ts +2 -0
  79. package/dist/commands/registry.d.ts +8 -0
  80. package/dist/commands/report.d.ts +36 -0
  81. package/dist/db/observability-event-store.d.ts +162 -0
  82. package/dist/git/pr.d.ts +23 -25
  83. package/dist/hooks/context-capsule-inject.d.ts +3 -0
  84. package/dist/index.d.ts +6 -1
  85. package/dist/index.js +522 -429
  86. package/dist/observability/catalog.d.ts +8 -4
  87. package/dist/sandbox/executor.d.ts +10 -0
  88. package/dist/sandbox/win32/runner-client.d.ts +7 -0
  89. package/dist/services/context-attribution.d.ts +69 -0
  90. package/dist/services/cost-accounting.d.ts +2 -0
  91. package/dist/telemetry.d.ts +10 -2
  92. package/opencode-swarm.schema.json +1 -1
  93. package/package.json +1 -1
  94. package/dist/cli/curator-llm-factory-fhbjwar0.js +0 -70
  95. package/dist/cli/guardrail-explain-1nfbtpgg.js +0 -71
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  init_loader,
4
4
  loadPluginConfigWithMeta
5
- } from "./index-zycp24b9.js";
5
+ } from "./index-mg43w8p2.js";
6
6
  import {
7
7
  init_schema
8
- } from "./index-0e9jh9c7.js";
8
+ } from "./index-nb924ar6.js";
9
9
  import {
10
10
  DEFAULT_WORKTREE_ISOLATION_CONFIG,
11
11
  init_constants
@@ -9,7 +9,7 @@ import {
9
9
  pseudonymousRef,
10
10
  resolveLineageSalt,
11
11
  telemetry
12
- } from "./index-5ebgzb5a.js";
12
+ } from "./index-hwj25q9r.js";
13
13
 
14
14
  // src/health/learning-health.ts
15
15
  import { promises as fs } from "fs";
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  readKnowledge,
4
4
  transactKnowledge
5
- } from "./index-c4ddtrqg.js";
5
+ } from "./index-fywshabz.js";
6
6
  import {
7
7
  resolveKnowledgeStoreDir
8
- } from "./index-6rx1rdaq.js";
8
+ } from "./index-a7rw4g4s.js";
9
9
  import {
10
10
  init_git_executable,
11
11
  resolveGitExecutableAsync
@@ -7,7 +7,7 @@ import {
7
7
  readLinkPointer,
8
8
  resolveKnowledgeStoreDir,
9
9
  resolveLinkDir
10
- } from "./index-6rx1rdaq.js";
10
+ } from "./index-a7rw4g4s.js";
11
11
 
12
12
  // src/knowledge/curation-policy.ts
13
13
  import { appendFile, mkdir as mkdir2, readFile as readFile2 } from "fs/promises";
@@ -8,14 +8,14 @@ import {
8
8
  listCoordinationStates,
9
9
  transitionCoordinationState,
10
10
  withCoordinationTransaction
11
- } from "./index-e45htt92.js";
11
+ } from "./index-jx9f4ke1.js";
12
12
  import {
13
13
  getProjectDb,
14
14
  projectDbExists
15
- } from "./index-w6988bbc.js";
15
+ } from "./index-aftapk6j.js";
16
16
  import {
17
17
  observeStoreHealth
18
- } from "./index-j2svfhzk.js";
18
+ } from "./index-axf65x87.js";
19
19
  import {
20
20
  canonicalRootKey,
21
21
  canonicalRootKeyFresh,
@@ -23,13 +23,13 @@ import {
23
23
  } from "./index-7qefgq4j.js";
24
24
  import {
25
25
  withEvidenceLock
26
- } from "./index-jre6tm3v.js";
26
+ } from "./index-edm41q4j.js";
27
27
  import {
28
28
  atomicWriteSwarmFileSync
29
29
  } from "./index-gy0nyfbw.js";
30
30
  import {
31
31
  telemetry
32
- } from "./index-5ebgzb5a.js";
32
+ } from "./index-hwj25q9r.js";
33
33
  import {
34
34
  exports_external,
35
35
  init_zod
@@ -285,16 +285,26 @@ function buildCoordinationProjectionCheckpoint(directory, view, baseCheckpoint)
285
285
  checkpoint.rootPath = path.resolve(directory);
286
286
  return checkpoint;
287
287
  }
288
+
289
+ class PrSubscriptionCapacityError extends Error {
290
+ constructor(message) {
291
+ super(message);
292
+ this.name = "PrSubscriptionCapacityError";
293
+ }
294
+ }
295
+ function isPrSubscriptionCapacityError(err) {
296
+ return err instanceof PrSubscriptionCapacityError;
297
+ }
288
298
  function assertCoordinationProjectionCapacity(directory, view, baseCheckpoint) {
289
299
  const checkpoint = buildCoordinationProjectionCheckpoint(directory, view, baseCheckpoint);
290
300
  const recordCount = Object.keys(checkpoint.records).length;
291
301
  if (recordCount > PR_SUBSCRIPTION_LIMITS.maxCheckpointRecords) {
292
- throw new Error(`PR subscription store over checkpoint capacity: ${recordCount} records > ${PR_SUBSCRIPTION_LIMITS.maxCheckpointRecords}. The folded state exceeds the bounded checkpoint \u2014 archive or split .swarm/pr-monitor/subscriptions.jsonl (subscriptions can be re-created with /swarm pr subscribe), then remove it.`);
302
+ throw new PrSubscriptionCapacityError(`PR subscription store over checkpoint capacity: ${recordCount} records > ${PR_SUBSCRIPTION_LIMITS.maxCheckpointRecords}. The folded state exceeds the bounded checkpoint \u2014 archive or split .swarm/pr-monitor/subscriptions.jsonl (subscriptions can be re-created with /swarm pr subscribe), then remove it.`);
293
303
  }
294
304
  const contentBytes = Buffer.byteLength(`${JSON.stringify(checkpoint)}
295
305
  `, "utf-8");
296
306
  if (contentBytes > PR_SUBSCRIPTION_LIMITS.checkpointHardReadBytes) {
297
- throw new Error(`PR subscription store over checkpoint capacity: ${contentBytes} bytes > ${PR_SUBSCRIPTION_LIMITS.checkpointHardReadBytes}. The folded state exceeds the bounded checkpoint \u2014 archive or split .swarm/pr-monitor/subscriptions.jsonl (subscriptions can be re-created with /swarm pr subscribe), then remove it.`);
307
+ throw new PrSubscriptionCapacityError(`PR subscription store over checkpoint capacity: ${contentBytes} bytes > ${PR_SUBSCRIPTION_LIMITS.checkpointHardReadBytes}. The folded state exceeds the bounded checkpoint \u2014 archive or split .swarm/pr-monitor/subscriptions.jsonl (subscriptions can be re-created with /swarm pr subscribe), then remove it.`);
298
308
  }
299
309
  }
300
310
  function prepareCoordinationPersistence(directory, view, baseCheckpoint) {
@@ -1013,13 +1023,13 @@ function snapshotUpdateHasChanges(match, updates) {
1013
1023
  function writeCheckpointFile(directory, checkpoint) {
1014
1024
  const recordCount = Object.keys(checkpoint.records).length;
1015
1025
  if (recordCount > PR_SUBSCRIPTION_LIMITS.maxCheckpointRecords) {
1016
- throw new Error(`PR subscription store over checkpoint capacity: ${recordCount} records > ${PR_SUBSCRIPTION_LIMITS.maxCheckpointRecords}. The folded state exceeds the bounded checkpoint \u2014 archive or split .swarm/pr-monitor/subscriptions.jsonl (subscriptions can be re-created with /swarm pr subscribe), then remove it.`);
1026
+ throw new PrSubscriptionCapacityError(`PR subscription store over checkpoint capacity: ${recordCount} records > ${PR_SUBSCRIPTION_LIMITS.maxCheckpointRecords}. The folded state exceeds the bounded checkpoint \u2014 archive or split .swarm/pr-monitor/subscriptions.jsonl (subscriptions can be re-created with /swarm pr subscribe), then remove it.`);
1017
1027
  }
1018
1028
  const content = `${JSON.stringify(checkpoint)}
1019
1029
  `;
1020
1030
  const contentBytes = Buffer.byteLength(content, "utf-8");
1021
1031
  if (contentBytes > PR_SUBSCRIPTION_LIMITS.checkpointHardReadBytes) {
1022
- throw new Error(`PR subscription store over checkpoint capacity: ${contentBytes} bytes > ${PR_SUBSCRIPTION_LIMITS.checkpointHardReadBytes}. The folded state exceeds the bounded checkpoint \u2014 archive or split .swarm/pr-monitor/subscriptions.jsonl (subscriptions can be re-created with /swarm pr subscribe), then remove it.`);
1032
+ throw new PrSubscriptionCapacityError(`PR subscription store over checkpoint capacity: ${contentBytes} bytes > ${PR_SUBSCRIPTION_LIMITS.checkpointHardReadBytes}. The folded state exceeds the bounded checkpoint \u2014 archive or split .swarm/pr-monitor/subscriptions.jsonl (subscriptions can be re-created with /swarm pr subscribe), then remove it.`);
1023
1033
  }
1024
1034
  if (contentBytes > PR_SUBSCRIPTION_LIMITS.maxCheckpointBytes) {
1025
1035
  log(`[pr-monitor] checkpoint pressure: ${contentBytes}/${PR_SUBSCRIPTION_LIMITS.maxCheckpointBytes} bytes`);
@@ -2419,4 +2429,4 @@ var _internals = {
2419
2429
  writeCheckpointFile
2420
2430
  };
2421
2431
 
2422
- export { PR_SUBSCRIPTIONS_FILE, PR_SUBSCRIPTIONS_CHECKPOINT_FILE, PR_SUBSCRIPTIONS_AUDIT_FILE, PR_SUBSCRIPTION_LIMITS, setOnSubscriptionCreated, buildCorrelationId, subscribe, unsubscribe, listActive, lookupByPr, updateSnapshot, sweepStale, getPrSubscriptionHealth, _internals };
2432
+ export { PR_SUBSCRIPTIONS_FILE, PR_SUBSCRIPTIONS_CHECKPOINT_FILE, PR_SUBSCRIPTIONS_AUDIT_FILE, PR_SUBSCRIPTION_LIMITS, setOnSubscriptionCreated, PrSubscriptionCapacityError, isPrSubscriptionCapacityError, buildCorrelationId, subscribe, unsubscribe, listActive, lookupByPr, updateSnapshot, sweepStale, getPrSubscriptionHealth, _internals };
@@ -4,7 +4,7 @@ import {
4
4
  } from "./index-gy0nyfbw.js";
5
5
  import {
6
6
  emit
7
- } from "./index-5ebgzb5a.js";
7
+ } from "./index-hwj25q9r.js";
8
8
  import {
9
9
  require_proper_lockfile
10
10
  } from "./index-7g4c7s5r.js";
@@ -14,14 +14,14 @@ import {
14
14
  detectWindowsWrites,
15
15
  getSharedClassifierGuardrailBlock,
16
16
  resolveWriteTargets
17
- } from "./index-hwz46jj7.js";
17
+ } from "./index-an89qzd9.js";
18
18
  import {
19
19
  checkFileAuthority,
20
20
  classifyFile,
21
21
  isInDeclaredScope,
22
22
  redactPath,
23
23
  redactShellCommand
24
- } from "./index-hdakb4n9.js";
24
+ } from "./index-9hy5q7gp.js";
25
25
 
26
26
  // src/services/guardrail-explain-service.ts
27
27
  import path from "path";
@@ -6,10 +6,10 @@ import {
6
6
  } from "./index-ae75rja9.js";
7
7
  import {
8
8
  resolveKnowledgeStoreDir
9
- } from "./index-6rx1rdaq.js";
9
+ } from "./index-a7rw4g4s.js";
10
10
  import {
11
11
  atomicWriteFile
12
- } from "./index-jre6tm3v.js";
12
+ } from "./index-edm41q4j.js";
13
13
  import {
14
14
  readCachedParsedFile
15
15
  } from "./index-gy0nyfbw.js";
@@ -713,7 +713,7 @@ async function applyConfidenceFloorAction(directory, touched, options) {
713
713
  const {
714
714
  readAuthoritativeKnowledgeCounterRollups,
715
715
  effectiveRetrievalOutcomes
716
- } = await import("./knowledge-events-rv9q9mkm.js");
716
+ } = await import("./knowledge-events-1t1t0bv7.js");
717
717
  const rollups = await readAuthoritativeKnowledgeCounterRollups(directory);
718
718
  const flagIds = new Set;
719
719
  for (const e of atFloor) {
@@ -780,11 +780,11 @@ async function applyConfidenceFloorAction(directory, touched, options) {
780
780
  });
781
781
  }
782
782
  if (action === "quarantine" && toQuarantine.length > 0) {
783
- const { quarantineEntry } = await import("./knowledge-validator-8qtd9ys0.js");
784
- const { KnowledgeConfigSchema } = await import("./schema-ebfxgya0.js");
783
+ const { quarantineEntry } = await import("./knowledge-validator-tf7yq2pd.js");
784
+ const { KnowledgeConfigSchema } = await import("./schema-mzb1354k.js");
785
785
  let config;
786
786
  try {
787
- const { loadPluginConfigWithMeta } = await import("./index-1v6vc90w.js");
787
+ const { loadPluginConfigWithMeta } = await import("./index-rkn17q5e.js");
788
788
  const { config: loadedConfig } = loadPluginConfigWithMeta(directory);
789
789
  config = KnowledgeConfigSchema.parse(loadedConfig.knowledge ?? {});
790
790
  } catch {
@@ -5,18 +5,18 @@ import {
5
5
  import {
6
6
  effectiveRetrievalOutcomes,
7
7
  readAuthoritativeKnowledgeCounterRollups
8
- } from "./index-gn6ybsc4.js";
8
+ } from "./index-jc9cxh90.js";
9
9
  import {
10
10
  ALLOWED_SKILL_PATH_PREFIXES,
11
11
  validateSkillPath
12
- } from "./index-2k53pfnc.js";
12
+ } from "./index-a5w71m8f.js";
13
13
  import {
14
14
  computeOutcomeSignal,
15
15
  readKnowledge,
16
16
  resolveHiveKnowledgePath,
17
17
  resolveSwarmKnowledgePath,
18
18
  transactKnowledge
19
- } from "./index-c4ddtrqg.js";
19
+ } from "./index-fywshabz.js";
20
20
  import {
21
21
  canonicalRootKeyFresh
22
22
  } from "./index-7qefgq4j.js";
@@ -9,7 +9,7 @@ import {
9
9
  readEvaluationRun,
10
10
  saveEvaluationRun,
11
11
  saveTaskSetSnapshot
12
- } from "./index-tqw8w2n5.js";
12
+ } from "./index-17yszqs5.js";
13
13
  import {
14
14
  canonicalHash,
15
15
  computeCandidateInputContentHash,