opencode-swarm 7.123.0 → 7.124.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 (88) hide show
  1. package/README.md +3 -0
  2. package/dist/cli/{config-doctor-3ksh1534.js → config-doctor-53mnpeke.js} +6 -6
  3. package/dist/cli/{core-cwgb7ev8.js → core-d38hc85b.js} +4 -4
  4. package/dist/cli/{curation-policy-4j4qce5a.js → curation-policy-ny033330.js} +2 -2
  5. package/dist/cli/{curator-drift-6b2fjsgr.js → curator-drift-h9a2sjvf.js} +7 -7
  6. package/dist/cli/curator-llm-factory-e0tjz8qq.js +53 -0
  7. package/dist/cli/{curator-tkyn9bzz.js → curator-nvn1pdq6.js} +30 -29
  8. package/dist/cli/{dispatch-07jgc3hn.js → dispatch-f4hj1cj7.js} +3 -3
  9. package/dist/cli/{evidence-summary-service-96ndczbk.js → evidence-summary-service-9hq7n9k9.js} +12 -12
  10. package/dist/cli/{gate-evidence-xqks3kk2.js → gate-evidence-cy2te3x8.js} +2 -2
  11. package/dist/cli/guardrail-explain-d3dd57nf.js +54 -0
  12. package/dist/cli/guardrail-log-3q2z9axs.js +16 -0
  13. package/dist/cli/{hive-promoter-y5wsztkc.js → hive-promoter-9gbpepgm.js} +30 -29
  14. package/dist/cli/index-134d35c1.js +116 -0
  15. package/dist/cli/{index-cqsak7bf.js → index-13d2g7k9.js} +1 -1
  16. package/dist/cli/{index-m1abzg93.js → index-1kz6da87.js} +4 -2
  17. package/dist/cli/{index-22e127jw.js → index-23zsx7dm.js} +5 -3
  18. package/dist/cli/{index-kzj3fp7c.js → index-2445sx3d.js} +1 -1
  19. package/dist/cli/{index-ctpgsj84.js → index-2tn5h2zp.js} +1 -1
  20. package/dist/cli/{index-n2712byd.js → index-2x4maxte.js} +8 -5
  21. package/dist/cli/{index-6xnxz6z0.js → index-3x761jqv.js} +4 -2
  22. package/dist/cli/{index-3rr0ese8.js → index-3yyr4ynk.js} +41 -9
  23. package/dist/cli/{index-7cspygmb.js → index-4rzzzjtg.js} +11 -8
  24. package/dist/cli/{index-nprawcc0.js → index-6n2jpz7x.js} +1 -1
  25. package/dist/cli/{index-7g91saha.js → index-8pz0ypxz.js} +38 -31
  26. package/dist/cli/index-bk5tah7q.js +19 -0
  27. package/dist/cli/{index-293f68mj.js → index-bpmtbmy9.js} +4680 -4342
  28. package/dist/cli/index-c6crt5rs.js +2494 -0
  29. package/dist/cli/{index-19zn67q6.js → index-e19mxn9f.js} +5 -1
  30. package/dist/cli/{index-hns7xjm7.js → index-eeg04r0x.js} +4 -2
  31. package/dist/cli/{index-ye3fndsw.js → index-gacm5s2n.js} +9 -5
  32. package/dist/cli/{index-d6h5hq91.js → index-gnvg72y1.js} +2 -2
  33. package/dist/cli/{index-17eybc3z.js → index-htbjqftb.js} +1 -1
  34. package/dist/cli/{index-vcgfqd8f.js → index-k5jrywpr.js} +4 -2
  35. package/dist/cli/{index-jyrhy4ww.js → index-mkkx1a4f.js} +2435 -1435
  36. package/dist/cli/{index-gnp9x6se.js → index-n832052r.js} +4 -2
  37. package/dist/cli/{index-6sgqnvpw.js → index-qd77aft9.js} +2 -2
  38. package/dist/cli/{index-816rkp4y.js → index-s9mj4rb9.js} +5 -3
  39. package/dist/cli/{index-q00e4s1s.js → index-tyg0zezw.js} +11 -7
  40. package/dist/cli/{index-gw3m5fw0.js → index-v2rdhwx8.js} +5 -3
  41. package/dist/cli/{index-det5jwfk.js → index-v5ecczts.js} +5 -1
  42. package/dist/cli/{index-2j25br0p.js → index-wqwpzhv1.js} +9 -9
  43. package/dist/cli/{index-dywekeen.js → index-x2mmnrnx.js} +1 -1
  44. package/dist/cli/{index-j9kxwshw.js → index-z0m4angq.js} +8 -6
  45. package/dist/cli/{index-5e4e2hvv.js → index-z6xqpmqg.js} +4 -0
  46. package/dist/cli/{index-m0bmh3w0.js → index-zjedv2bd.js} +2 -2
  47. package/dist/cli/{index-p0arc26j.js → index-zjygnfay.js} +7 -2
  48. package/dist/cli/index.js +33 -30
  49. package/dist/cli/{knowledge-escalator-dyxsm78k.js → knowledge-escalator-r1s01m3z.js} +4 -4
  50. package/dist/cli/{knowledge-events-36q6nvae.js → knowledge-events-a9hmxvke.js} +1 -1
  51. package/dist/cli/{knowledge-store-e07b4s54.js → knowledge-store-jt31br5k.js} +2 -2
  52. package/dist/cli/{knowledge-validator-sfyf7wn2.js → knowledge-validator-9vrwxr3z.js} +5 -5
  53. package/dist/cli/{pending-delegations-68cbaqv2.js → pending-delegations-e3bcqj77.js} +7 -5
  54. package/dist/cli/{pr-subscriptions-x653151h.js → pr-subscriptions-bxpqde8w.js} +5 -5
  55. package/dist/cli/{scan-cursor-hm0aqqae.js → scan-cursor-bkjtsawg.js} +3 -3
  56. package/dist/cli/{schema-13bnng2n.js → schema-y3z416z7.js} +7 -4
  57. package/dist/cli/{scope-persistence-d9erwnvb.js → scope-persistence-habn4q8a.js} +4 -4
  58. package/dist/cli/{skill-generator-63r20a9k.js → skill-generator-794hyndw.js} +7 -7
  59. package/dist/cli/sqlite-loader-r1kgt2pq.js +12 -0
  60. package/dist/commands/memory-link.d.ts +28 -0
  61. package/dist/commands/registry.d.ts +25 -0
  62. package/dist/config/schema.d.ts +6 -0
  63. package/dist/index.js +330 -317
  64. package/dist/knowledge/family-migration-shared.d.ts +24 -0
  65. package/dist/knowledge/family-migration.d.ts +5 -0
  66. package/dist/memory/config.d.ts +11 -0
  67. package/dist/memory/consolidation-log.d.ts +8 -2
  68. package/dist/memory/finalize-reward-sweep.d.ts +2 -1
  69. package/dist/memory/gateway.d.ts +13 -0
  70. package/dist/memory/index.d.ts +4 -2
  71. package/dist/memory/local-jsonl-provider.d.ts +25 -1
  72. package/dist/memory/memory-family-manifest.d.ts +52 -0
  73. package/dist/memory/memory-family-migration.d.ts +94 -0
  74. package/dist/memory/memory-link.d.ts +103 -0
  75. package/dist/memory/provider-pool.d.ts +35 -0
  76. package/dist/memory/redaction.d.ts +31 -0
  77. package/dist/memory/schema.d.ts +21 -0
  78. package/dist/memory/sqlite-provider.d.ts +58 -1
  79. package/dist/memory/storage-root.d.ts +93 -0
  80. package/dist/memory/types.d.ts +20 -1
  81. package/dist/services/knowledge-diagnostics.d.ts +25 -0
  82. package/dist/services/status-service.d.ts +16 -0
  83. package/package.json +1 -1
  84. package/dist/cli/curator-llm-factory-mfvd4sqx.js +0 -52
  85. package/dist/cli/guardrail-explain-4vytbchb.js +0 -53
  86. package/dist/cli/guardrail-log-z291m4gw.js +0 -16
  87. package/dist/cli/index-4rhcth7a.js +0 -14
  88. package/dist/cli/index-wr8qgpz5.js +0 -2463
@@ -8,8 +8,9 @@ import {
8
8
  resolveKnowledgeStoreDir
9
9
  } from "./index-q27bajqb.js";
10
10
  import {
11
+ init_knowledge_types,
11
12
  isActiveStatus
12
- } from "./index-4rhcth7a.js";
13
+ } from "./index-bk5tah7q.js";
13
14
  import {
14
15
  init_logger,
15
16
  log
@@ -38,6 +39,7 @@ import * as path from "path";
38
39
  init_logger();
39
40
 
40
41
  // src/hooks/knowledge-reinforcement.ts
42
+ init_knowledge_types();
41
43
  function isActiveSwarmKnowledgeEntry(entry) {
42
44
  return isActiveStatus(entry.status);
43
45
  }
@@ -72,6 +74,7 @@ function reinforceSwarmKnowledgeEntry(entry, confirmation) {
72
74
  }
73
75
 
74
76
  // src/hooks/knowledge-store.ts
77
+ init_knowledge_types();
75
78
  var KNOWLEDGE_JSONL_CACHE_NAMESPACE = "knowledge-jsonl:normalized:v1";
76
79
  function getPlatformConfigDir() {
77
80
  const platform = process.platform;
@@ -647,7 +650,7 @@ async function applyConfidenceFloorAction(directory, touched, options) {
647
650
  const recovered = touched.filter((e) => e.confidence > CONFIDENCE_FLOOR + FLOOR_EPSILON && e.confidence_floor_demoted);
648
651
  if (atFloor.length === 0 && recovered.length === 0)
649
652
  return;
650
- const { readKnowledgeCounterRollups, effectiveRetrievalOutcomes } = await import("./knowledge-events-36q6nvae.js");
653
+ const { readKnowledgeCounterRollups, effectiveRetrievalOutcomes } = await import("./knowledge-events-a9hmxvke.js");
651
654
  const rollups = await readKnowledgeCounterRollups(directory);
652
655
  const flagIds = new Set;
653
656
  for (const e of atFloor) {
@@ -714,11 +717,11 @@ async function applyConfidenceFloorAction(directory, touched, options) {
714
717
  });
715
718
  }
716
719
  if (action === "quarantine" && toQuarantine.length > 0) {
717
- const { quarantineEntry } = await import("./knowledge-validator-sfyf7wn2.js");
718
- const { KnowledgeConfigSchema } = await import("./schema-13bnng2n.js");
720
+ const { quarantineEntry } = await import("./knowledge-validator-9vrwxr3z.js");
721
+ const { KnowledgeConfigSchema } = await import("./schema-y3z416z7.js");
719
722
  let config;
720
723
  try {
721
- const { loadPluginConfigWithMeta } = await import("./index-2j25br0p.js");
724
+ const { loadPluginConfigWithMeta } = await import("./index-wqwpzhv1.js");
722
725
  const { config: loadedConfig } = loadPluginConfigWithMeta(directory);
723
726
  config = KnowledgeConfigSchema.parse(loadedConfig.knowledge ?? {});
724
727
  } catch {
@@ -8,10 +8,12 @@ import {
8
8
  telemetry
9
9
  } from "./index-q2rrv0cy.js";
10
10
  import {
11
- exports_external
12
- } from "./index-293f68mj.js";
11
+ exports_external,
12
+ init_zod
13
+ } from "./index-bpmtbmy9.js";
13
14
 
14
15
  // src/gate-evidence.ts
16
+ init_zod();
15
17
  import { mkdirSync, readFileSync, realpathSync } from "fs";
16
18
  import * as path from "path";
17
19
 
@@ -5,22 +5,39 @@ import {
5
5
  GATE_CONFIG_KNOWN_SECTION_KEYS,
6
6
  GateConfigSchema,
7
7
  PluginConfigSchema,
8
+ init_constants,
9
+ init_schema,
8
10
  resolveExternalSkillsConfig
9
- } from "./index-wr8qgpz5.js";
11
+ } from "./index-c6crt5rs.js";
10
12
  import {
11
- advisoryWarn
12
- } from "./index-ye3fndsw.js";
13
+ advisoryWarn,
14
+ init_warning_buffer
15
+ } from "./index-gacm5s2n.js";
13
16
  import {
14
- deepMerge
15
- } from "./index-p0arc26j.js";
17
+ MAX_MERGE_DEPTH,
18
+ deepMerge,
19
+ init_merge
20
+ } from "./index-zjygnfay.js";
21
+ import {
22
+ __esm,
23
+ __export
24
+ } from "./index-a76rekgs.js";
25
+
16
26
  // src/config/loader.ts
27
+ var exports_loader = {};
28
+ __export(exports_loader, {
29
+ loadPluginConfigWithMetaAsync: () => loadPluginConfigWithMetaAsync,
30
+ loadPluginConfigWithMeta: () => loadPluginConfigWithMeta,
31
+ loadPluginConfig: () => loadPluginConfig,
32
+ loadAgentPrompt: () => loadAgentPrompt,
33
+ deepMerge: () => deepMerge,
34
+ MAX_MERGE_DEPTH: () => MAX_MERGE_DEPTH,
35
+ MAX_CONFIG_FILE_BYTES: () => MAX_CONFIG_FILE_BYTES
36
+ });
17
37
  import * as fs from "fs";
18
38
  import * as fsPromises from "fs/promises";
19
39
  import * as os from "os";
20
40
  import * as path from "path";
21
- var CONFIG_FILENAME = "opencode-swarm.json";
22
- var PROMPTS_DIR_NAME = "opencode-swarm";
23
- var MAX_CONFIG_FILE_BYTES = 102400;
24
41
  function getUserConfigDir() {
25
42
  return process.env.XDG_CONFIG_HOME || path.join(os.homedir(), ".config");
26
43
  }
@@ -361,7 +378,22 @@ function loadAgentPrompt(agentName) {
361
378
  }
362
379
  return result;
363
380
  }
381
+ var CONFIG_FILENAME = "opencode-swarm.json", PROMPTS_DIR_NAME = "opencode-swarm", MAX_CONFIG_FILE_BYTES = 102400;
382
+ var init_loader = __esm(() => {
383
+ init_warning_buffer();
384
+ init_schema();
385
+ init_merge();
386
+ init_merge();
387
+ });
388
+
389
+ // src/config/index.ts
390
+ init_constants();
391
+ init_loader();
392
+ init_loader();
393
+ init_schema();
394
+
364
395
  // src/config/worktree-isolation-config.ts
396
+ init_constants();
365
397
  function resolveWorktreeIsolationConfig(config) {
366
398
  if (config.worktree) {
367
399
  return { ...DEFAULT_WORKTREE_ISOLATION_CONFIG, ...config.worktree };
@@ -383,4 +415,4 @@ function resolveWorktreeIsolationConfig(config) {
383
415
  // src/config/index.ts
384
416
  var _internals = { loadPluginConfigWithMeta };
385
417
 
386
- export { loadPluginConfig, loadPluginConfigWithMeta, loadPluginConfigWithMetaAsync, loadAgentPrompt, resolveWorktreeIsolationConfig, _internals };
418
+ export { loadPluginConfig, loadPluginConfigWithMeta, loadPluginConfigWithMetaAsync, loadAgentPrompt, exports_loader, init_loader, resolveWorktreeIsolationConfig, _internals };
@@ -1,12 +1,12 @@
1
1
  // @bun
2
2
  import {
3
3
  readEffectiveSpecSync
4
- } from "./index-816rkp4y.js";
4
+ } from "./index-s9mj4rb9.js";
5
5
  import {
6
6
  EVIDENCE_MAX_JSON_BYTES,
7
7
  EvidenceBundleSchema,
8
8
  EvidenceSchema
9
- } from "./index-vcgfqd8f.js";
9
+ } from "./index-k5jrywpr.js";
10
10
  import {
11
11
  _internals,
12
12
  buildDefaultPolicy,
@@ -29,14 +29,14 @@ import {
29
29
  replayFromLedgerWithStatus,
30
30
  takeSnapshotEvent,
31
31
  takeSnapshotWithRetry
32
- } from "./index-ctpgsj84.js";
32
+ } from "./index-2tn5h2zp.js";
33
33
  import {
34
34
  PlanSchema
35
- } from "./index-m1abzg93.js";
35
+ } from "./index-1kz6da87.js";
36
36
  import {
37
37
  readSwarmFileAsync,
38
38
  validateSwarmPath
39
- } from "./index-kzj3fp7c.js";
39
+ } from "./index-2445sx3d.js";
40
40
  import {
41
41
  criticalWarn,
42
42
  error,
@@ -48,7 +48,7 @@ import {
48
48
  readTaskEvidence,
49
49
  readTaskEvidenceRaw,
50
50
  sanitizeTaskId
51
- } from "./index-6xnxz6z0.js";
51
+ } from "./index-3x761jqv.js";
52
52
  import {
53
53
  atomicWriteFile
54
54
  } from "./index-7mkpsw6g.js";
@@ -63,8 +63,9 @@ import {
63
63
  } from "./index-q2rrv0cy.js";
64
64
  import {
65
65
  ZodError,
66
- exports_external
67
- } from "./index-293f68mj.js";
66
+ exports_external,
67
+ init_zod
68
+ } from "./index-bpmtbmy9.js";
68
69
  import {
69
70
  bunHash,
70
71
  bunWrite,
@@ -3421,6 +3422,7 @@ function migrateLegacyPlan(planContent, swarmId) {
3421
3422
  }
3422
3423
 
3423
3424
  // src/evidence/manager.ts
3425
+ init_zod();
3424
3426
  import {
3425
3427
  mkdirSync as mkdirSync5,
3426
3428
  readdirSync as readdirSync2,
@@ -3437,6 +3439,7 @@ import * as fs5 from "fs/promises";
3437
3439
  import * as path11 from "path";
3438
3440
 
3439
3441
  // src/evaluation/contracts.ts
3442
+ init_zod();
3440
3443
  var IdentifierSchema = exports_external.string().min(1).max(160).regex(/^[A-Za-z0-9][A-Za-z0-9._-]*$/);
3441
3444
  var Sha256Schema = exports_external.string().regex(/^[a-f0-9]{64}$/);
3442
3445
  var IsoDateSchema = exports_external.iso.datetime({ offset: true });
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  simpleGlobToRegex
4
- } from "./index-5e4e2hvv.js";
4
+ } from "./index-z6xqpmqg.js";
5
5
  import {
6
6
  warn
7
7
  } from "./index-zgwm4ryv.js";
@@ -1,10 +1,10 @@
1
1
  // @bun
2
2
  import {
3
3
  handleGuardrailExplain
4
- } from "./index-6sgqnvpw.js";
4
+ } from "./index-qd77aft9.js";
5
5
  import {
6
6
  handleGuardrailLog
7
- } from "./index-17eybc3z.js";
7
+ } from "./index-htbjqftb.js";
8
8
  import {
9
9
  COMMAND_REGISTRY,
10
10
  SWARM_COMMAND_TOOL_ALLOWLIST,
@@ -83,56 +83,63 @@ import {
83
83
  handleWriteRetroCommand,
84
84
  normalizeSwarmCommandInput,
85
85
  resolveCommand
86
- } from "./index-jyrhy4ww.js";
87
- import"./index-19zn67q6.js";
88
- import"./index-det5jwfk.js";
89
- import"./index-7cspygmb.js";
86
+ } from "./index-mkkx1a4f.js";
87
+ import"./index-e19mxn9f.js";
88
+ import"./index-v5ecczts.js";
89
+ import"./index-4rzzzjtg.js";
90
90
  import"./index-4905hd2m.js";
91
- import"./index-nprawcc0.js";
92
- import"./index-q00e4s1s.js";
93
- import"./index-j9kxwshw.js";
94
- import"./index-hns7xjm7.js";
91
+ import"./index-134d35c1.js";
92
+ import"./index-6n2jpz7x.js";
93
+ import"./index-tyg0zezw.js";
94
+ import"./index-z0m4angq.js";
95
+ import"./index-eeg04r0x.js";
95
96
  import"./index-vxv732ex.js";
96
97
  import"./index-c8s9a3zh.js";
97
- import"./index-816rkp4y.js";
98
- import"./index-22e127jw.js";
99
- import"./index-m0bmh3w0.js";
100
- import"./index-cqsak7bf.js";
98
+ import"./index-s9mj4rb9.js";
99
+ import"./index-23zsx7dm.js";
100
+ import"./index-zjedv2bd.js";
101
+ import"./index-13d2g7k9.js";
101
102
  import"./index-rtry5xyf.js";
102
- import"./index-n2712byd.js";
103
- import"./index-dywekeen.js";
103
+ import"./index-2x4maxte.js";
104
+ import"./index-x2mmnrnx.js";
104
105
  import"./index-ae75rja9.js";
105
106
  import"./index-q27bajqb.js";
106
- import"./index-3rr0ese8.js";
107
- import"./index-vcgfqd8f.js";
108
- import"./index-gnp9x6se.js";
107
+ import"./index-3yyr4ynk.js";
108
+ import"./index-k5jrywpr.js";
109
+ import"./index-n832052r.js";
109
110
  import {
110
111
  AGENT_TOOL_MAP,
111
112
  ORCHESTRATOR_NAME,
113
+ init_constants,
114
+ init_schema,
112
115
  stripKnownSwarmPrefix
113
- } from "./index-wr8qgpz5.js";
114
- import"./index-4rhcth7a.js";
116
+ } from "./index-c6crt5rs.js";
117
+ import"./index-bk5tah7q.js";
115
118
  import"./index-8fwhhayc.js";
116
119
  import"./index-q1exe2b3.js";
117
- import"./index-d6h5hq91.js";
118
- import"./index-ctpgsj84.js";
119
- import"./index-m1abzg93.js";
120
- import"./index-gw3m5fw0.js";
121
- import"./index-ye3fndsw.js";
122
- import"./index-kzj3fp7c.js";
123
- import"./index-5e4e2hvv.js";
124
- import"./index-p0arc26j.js";
120
+ import"./index-gnvg72y1.js";
121
+ import"./index-2tn5h2zp.js";
122
+ import"./index-1kz6da87.js";
123
+ import"./index-v2rdhwx8.js";
124
+ import"./index-gacm5s2n.js";
125
+ import"./index-2445sx3d.js";
126
+ import"./index-z6xqpmqg.js";
127
+ import"./index-zjygnfay.js";
125
128
  import"./index-zgwm4ryv.js";
126
129
  import"./index-dqh3zhhc.js";
127
- import"./index-6xnxz6z0.js";
130
+ import"./index-3x761jqv.js";
128
131
  import"./index-7mkpsw6g.js";
129
132
  import"./index-fsrp8wp3.js";
130
133
  import"./index-76kvm9z5.js";
131
134
  import"./index-q2rrv0cy.js";
132
- import"./index-293f68mj.js";
135
+ import"./index-bpmtbmy9.js";
133
136
  import"./index-7g4c7s5r.js";
134
137
  import"./index-qe3v54nb.js";
135
138
  import"./index-a76rekgs.js";
139
+
140
+ // src/commands/index.ts
141
+ init_constants();
142
+ init_schema();
136
143
  // src/commands/command-names.ts
137
144
  var COMMAND_NAMES = Object.freeze(Object.keys(COMMAND_REGISTRY));
138
145
  var COMMAND_NAME_SET = new Set(COMMAND_NAMES);
@@ -0,0 +1,19 @@
1
+ // @bun
2
+ import {
3
+ __esm
4
+ } from "./index-a76rekgs.js";
5
+
6
+ // src/hooks/knowledge-types.ts
7
+ function isActiveStatus(status) {
8
+ return !INACTIVE_STATUSES.has(status ?? "");
9
+ }
10
+ var KNOWLEDGE_SCHEMA_VERSION = 3, INACTIVE_STATUSES, OUTCOME_BLOCK_THRESHOLD = -0.3;
11
+ var init_knowledge_types = __esm(() => {
12
+ INACTIVE_STATUSES = new Set([
13
+ "archived",
14
+ "quarantined",
15
+ "quarantined_unactionable"
16
+ ]);
17
+ });
18
+
19
+ export { KNOWLEDGE_SCHEMA_VERSION, OUTCOME_BLOCK_THRESHOLD, isActiveStatus, init_knowledge_types };