opencode-swarm 7.114.4 → 7.114.6

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 (39) hide show
  1. package/.opencode/skills/execute/SKILL.md +12 -14
  2. package/.opencode/skills/swarm-pr-review/SKILL.md +136 -78
  3. package/README.md +2 -1
  4. package/dist/agents/explorer.d.ts +1 -1
  5. package/dist/background/candidate-parser.d.ts +30 -0
  6. package/dist/background/candidate-sidecar-store.d.ts +4 -3
  7. package/dist/cli/{config-doctor-xbdfrbwt.js → config-doctor-jy3mdh9t.js} +2 -2
  8. package/dist/cli/{curator-llm-factory-5ewe7qy1.js → curator-llm-factory-jrnqg90s.js} +10 -10
  9. package/dist/cli/{curator-15zwszy5.js → curator-vk9ec2kf.js} +10 -10
  10. package/dist/cli/{explorer-t5srbq64.js → explorer-jp0nen03.js} +1 -1
  11. package/dist/cli/{guardrail-explain-3156qxy0.js → guardrail-explain-vf89cv01.js} +11 -11
  12. package/dist/cli/{guardrail-log-qfc2j0tb.js → guardrail-log-84wnx273.js} +3 -3
  13. package/dist/cli/{hive-promoter-g2tkarz8.js → hive-promoter-0b4ny2mp.js} +10 -10
  14. package/dist/cli/{index-hg82gptk.js → index-5ac7rv03.js} +42 -34
  15. package/dist/cli/{index-xbe1wtme.js → index-7jmrbp68.js} +1 -1
  16. package/dist/cli/{index-h7q1bvzm.js → index-7stsmndb.js} +3 -3
  17. package/dist/cli/{index-0q7rrh59.js → index-91qesget.js} +14 -9
  18. package/dist/cli/{index-2148358e.js → index-9bsmzfk3.js} +1 -1
  19. package/dist/cli/{index-147ja18h.js → index-a45jq4b7.js} +4 -0
  20. package/dist/cli/{index-qzqx2qky.js → index-kjbfry6m.js} +1 -1
  21. package/dist/cli/{index-1gcw6azm.js → index-pzhkry3t.js} +12 -12
  22. package/dist/cli/{index-43khae15.js → index-qrnhvhmg.js} +1 -1
  23. package/dist/cli/{index-g59h53s6.js → index-tmcr6svp.js} +2 -2
  24. package/dist/cli/{index-mr4whary.js → index-vjvdvjd3.js} +3 -3
  25. package/dist/cli/{index-jt58s751.js → index-vxv732ex.js} +8 -4
  26. package/dist/cli/{index-g6va6n3t.js → index-yfedche9.js} +1 -1
  27. package/dist/cli/index.js +10 -10
  28. package/dist/cli/{knowledge-escalator-0q1p6br7.js → knowledge-escalator-qn7ew687.js} +3 -3
  29. package/dist/cli/{knowledge-events-9518gzsp.js → knowledge-events-k2xsz5bh.js} +1 -1
  30. package/dist/cli/{knowledge-store-k5rab79h.js → knowledge-store-ksa1dr2z.js} +1 -1
  31. package/dist/cli/{knowledge-validator-csay9wqj.js → knowledge-validator-2knz0d2t.js} +2 -2
  32. package/dist/cli/{schema-e5kd993s.js → schema-aymfdrsb.js} +1 -1
  33. package/dist/cli/{skill-generator-z01sjppf.js → skill-generator-w6qd9mde.js} +4 -4
  34. package/dist/index.js +45 -37
  35. package/dist/tools/index.d.ts +1 -0
  36. package/dist/tools/manifest.d.ts +1 -0
  37. package/dist/tools/tool-metadata.d.ts +4 -0
  38. package/dist/tools/write-pr-review-trigger-eval.d.ts +74 -0
  39. package/package.json +1 -1
@@ -27,6 +27,11 @@ declare const ParseFlagsSchema: z.ZodObject<{
27
27
  degraded: z.ZodBoolean;
28
28
  row_format_version: z.ZodNumber;
29
29
  producer: z.ZodOptional<z.ZodString>;
30
+ expected_family: z.ZodOptional<z.ZodEnum<{
31
+ micro_lane: "micro_lane";
32
+ base_explorer: "base_explorer";
33
+ }>>;
34
+ expected_micro_lane: z.ZodOptional<z.ZodString>;
30
35
  }, z.core.$strict>;
31
36
  export type ArtifactInput = z.infer<typeof ArtifactInputSchema>;
32
37
  export type ParseFlags = z.infer<typeof ParseFlagsSchema>;
@@ -66,6 +71,28 @@ export interface CandidateRecord {
66
71
  invariant_violated: string | null;
67
72
  confidence: string | null;
68
73
  }
74
+ /** A machine-readable attestation that a complete micro-lane found no candidates. */
75
+ export interface CleanAttestationRecord {
76
+ record_type: 'clean_attestation';
77
+ row_format_family: 'micro_lane';
78
+ row_format_version: number;
79
+ record_version: {
80
+ major: number;
81
+ minor: number;
82
+ };
83
+ source_output_ref: string;
84
+ source_batch_id: string;
85
+ source_lane_id: string;
86
+ source_agent: string;
87
+ source_digest: string;
88
+ extracted_from_partial_source: false;
89
+ sessionId?: string;
90
+ parentSessionId?: string;
91
+ producer?: string;
92
+ micro_lane: string;
93
+ coverage_scope: string;
94
+ evidence: string;
95
+ }
69
96
  /**
70
97
  * One invocation-envelope record per parseCandidates call.
71
98
  * Part of the return value but not persisted to a sidecar in this phase.
@@ -90,6 +117,7 @@ export interface InvocationEnvelope {
90
117
  candidate_count: number;
91
118
  parse_errors: number;
92
119
  malformed_rows: number;
120
+ clean_attestation_count: number;
93
121
  }
94
122
  /**
95
123
  * Detail record for a required-field violation inside a data row.
@@ -119,6 +147,7 @@ export interface DiagnosticsSummary {
119
147
  degraded_source_count: number;
120
148
  incomplete_source_count: number;
121
149
  format_families_detected: string[];
150
+ clean_attestation_count: number;
122
151
  format_mismatch_hint?: string;
123
152
  }
124
153
  /**
@@ -128,6 +157,7 @@ export interface ParseResult {
128
157
  error?: string;
129
158
  error_code?: string;
130
159
  candidates: CandidateRecord[];
160
+ clean_attestation?: CleanAttestationRecord;
131
161
  invocation_envelope: InvocationEnvelope;
132
162
  diagnostics: DiagnosticsSummary;
133
163
  }
@@ -30,8 +30,8 @@ export interface SidecarStoreOptions {
30
30
  */
31
31
  export declare function sanitizeString(value: string): string;
32
32
  /**
33
- * Append an invocation envelope followed by zero or more candidate records
34
- * to the sidecar JSONL file for the given batch.
33
+ * Append an invocation envelope, an optional CLEAN attestation, and zero or
34
+ * more candidate records to the sidecar JSONL file for the given batch.
35
35
  *
36
36
  * The envelope is always the first record in the append batch (SC-015).
37
37
  * Cross-skill coexistence is enabled via the `producer` field on the
@@ -51,6 +51,7 @@ export declare function sanitizeString(value: string): string;
51
51
  * @param batchId The batch identifier (used to derive batchDigest when not provided).
52
52
  * @param envelope The invocation envelope record (validated before write).
53
53
  * @param candidates Candidate records to append after the envelope (validated before write).
54
+ * @param cleanAttestation Optional CLEAN attestation written after the envelope.
54
55
  * @throws If schema validation fails, lock acquisition fails, or the filesystem write fails.
55
56
  */
56
- export declare function appendToSidecar(options: SidecarStoreOptions, batchId: string, envelope: unknown, candidates: unknown[]): void;
57
+ export declare function appendToSidecar(options: SidecarStoreOptions, batchId: string, envelope: unknown, candidates: unknown[], cleanAttestation?: unknown): void;
@@ -12,8 +12,8 @@ import {
12
12
  shouldRunOnStartup,
13
13
  writeBackupArtifact,
14
14
  writeDoctorArtifact
15
- } from "./index-2148358e.js";
16
- import"./index-147ja18h.js";
15
+ } from "./index-9bsmzfk3.js";
16
+ import"./index-a45jq4b7.js";
17
17
  import"./index-bfwt3abw.js";
18
18
  import"./index-5e4e2hvv.js";
19
19
  import"./index-p0arc26j.js";
@@ -1,23 +1,23 @@
1
1
  // @bun
2
2
  import {
3
3
  createCuratorLLMDelegate
4
- } from "./index-hg82gptk.js";
5
- import"./index-g6va6n3t.js";
4
+ } from "./index-5ac7rv03.js";
5
+ import"./index-yfedche9.js";
6
6
  import"./index-c8s9a3zh.js";
7
- import"./index-2148358e.js";
8
- import"./index-147ja18h.js";
7
+ import"./index-9bsmzfk3.js";
8
+ import"./index-a45jq4b7.js";
9
9
  import"./index-f6y341yk.js";
10
10
  import"./index-scww5b77.js";
11
11
  import"./index-ga4ta3cr.js";
12
12
  import"./index-80jkseqw.js";
13
- import"./index-mr4whary.js";
14
- import"./index-43khae15.js";
15
- import"./index-h7q1bvzm.js";
16
- import"./index-qzqx2qky.js";
17
- import"./index-0q7rrh59.js";
13
+ import"./index-vjvdvjd3.js";
14
+ import"./index-qrnhvhmg.js";
15
+ import"./index-7stsmndb.js";
16
+ import"./index-kjbfry6m.js";
17
+ import"./index-91qesget.js";
18
18
  import"./index-bfwt3abw.js";
19
19
  import"./index-g40r5d08.js";
20
- import"./index-jt58s751.js";
20
+ import"./index-vxv732ex.js";
21
21
  import"./index-8fwhhayc.js";
22
22
  import"./index-q1exe2b3.js";
23
23
  import"./index-n6fa2hhk.js";
@@ -14,23 +14,23 @@ import {
14
14
  runCuratorInit,
15
15
  runCuratorPhase,
16
16
  writeCuratorSummary
17
- } from "./index-hg82gptk.js";
18
- import"./index-g6va6n3t.js";
17
+ } from "./index-5ac7rv03.js";
18
+ import"./index-yfedche9.js";
19
19
  import"./index-c8s9a3zh.js";
20
- import"./index-2148358e.js";
21
- import"./index-147ja18h.js";
20
+ import"./index-9bsmzfk3.js";
21
+ import"./index-a45jq4b7.js";
22
22
  import"./index-f6y341yk.js";
23
23
  import"./index-scww5b77.js";
24
24
  import"./index-ga4ta3cr.js";
25
25
  import"./index-80jkseqw.js";
26
- import"./index-mr4whary.js";
27
- import"./index-43khae15.js";
28
- import"./index-h7q1bvzm.js";
29
- import"./index-qzqx2qky.js";
30
- import"./index-0q7rrh59.js";
26
+ import"./index-vjvdvjd3.js";
27
+ import"./index-qrnhvhmg.js";
28
+ import"./index-7stsmndb.js";
29
+ import"./index-kjbfry6m.js";
30
+ import"./index-91qesget.js";
31
31
  import"./index-bfwt3abw.js";
32
32
  import"./index-g40r5d08.js";
33
- import"./index-jt58s751.js";
33
+ import"./index-vxv732ex.js";
34
34
  import"./index-8fwhhayc.js";
35
35
  import"./index-q1exe2b3.js";
36
36
  import"./index-n6fa2hhk.js";
@@ -6,7 +6,7 @@ import {
6
6
  CURATOR_POSTMORTEM_PROMPT,
7
7
  EXPLORER_PROMPT,
8
8
  createExplorerAgent
9
- } from "./index-jt58s751.js";
9
+ } from "./index-vxv732ex.js";
10
10
  import"./index-a76rekgs.js";
11
11
  export {
12
12
  createExplorerAgent,
@@ -1,24 +1,24 @@
1
1
  // @bun
2
2
  import {
3
3
  handleGuardrailExplain
4
- } from "./index-g59h53s6.js";
5
- import"./index-hg82gptk.js";
6
- import"./index-g6va6n3t.js";
4
+ } from "./index-tmcr6svp.js";
5
+ import"./index-5ac7rv03.js";
6
+ import"./index-yfedche9.js";
7
7
  import"./index-c8s9a3zh.js";
8
- import"./index-2148358e.js";
9
- import"./index-147ja18h.js";
8
+ import"./index-9bsmzfk3.js";
9
+ import"./index-a45jq4b7.js";
10
10
  import"./index-f6y341yk.js";
11
11
  import"./index-scww5b77.js";
12
12
  import"./index-ga4ta3cr.js";
13
13
  import"./index-80jkseqw.js";
14
- import"./index-mr4whary.js";
15
- import"./index-43khae15.js";
16
- import"./index-h7q1bvzm.js";
17
- import"./index-qzqx2qky.js";
18
- import"./index-0q7rrh59.js";
14
+ import"./index-vjvdvjd3.js";
15
+ import"./index-qrnhvhmg.js";
16
+ import"./index-7stsmndb.js";
17
+ import"./index-kjbfry6m.js";
18
+ import"./index-91qesget.js";
19
19
  import"./index-bfwt3abw.js";
20
20
  import"./index-g40r5d08.js";
21
- import"./index-jt58s751.js";
21
+ import"./index-vxv732ex.js";
22
22
  import"./index-8fwhhayc.js";
23
23
  import"./index-q1exe2b3.js";
24
24
  import"./index-n6fa2hhk.js";
@@ -1,9 +1,9 @@
1
1
  // @bun
2
2
  import {
3
3
  handleGuardrailLog
4
- } from "./index-xbe1wtme.js";
5
- import"./index-g6va6n3t.js";
6
- import"./index-147ja18h.js";
4
+ } from "./index-7jmrbp68.js";
5
+ import"./index-yfedche9.js";
6
+ import"./index-a45jq4b7.js";
7
7
  import"./index-bfwt3abw.js";
8
8
  import"./index-5e4e2hvv.js";
9
9
  import"./index-p0arc26j.js";
@@ -6,23 +6,23 @@ import {
6
6
  isHiveEligible,
7
7
  promoteFromSwarm,
8
8
  promoteToHive
9
- } from "./index-hg82gptk.js";
10
- import"./index-g6va6n3t.js";
9
+ } from "./index-5ac7rv03.js";
10
+ import"./index-yfedche9.js";
11
11
  import"./index-c8s9a3zh.js";
12
- import"./index-2148358e.js";
13
- import"./index-147ja18h.js";
12
+ import"./index-9bsmzfk3.js";
13
+ import"./index-a45jq4b7.js";
14
14
  import"./index-f6y341yk.js";
15
15
  import"./index-scww5b77.js";
16
16
  import"./index-ga4ta3cr.js";
17
17
  import"./index-80jkseqw.js";
18
- import"./index-mr4whary.js";
19
- import"./index-43khae15.js";
20
- import"./index-h7q1bvzm.js";
21
- import"./index-qzqx2qky.js";
22
- import"./index-0q7rrh59.js";
18
+ import"./index-vjvdvjd3.js";
19
+ import"./index-qrnhvhmg.js";
20
+ import"./index-7stsmndb.js";
21
+ import"./index-kjbfry6m.js";
22
+ import"./index-91qesget.js";
23
23
  import"./index-bfwt3abw.js";
24
24
  import"./index-g40r5d08.js";
25
- import"./index-jt58s751.js";
25
+ import"./index-vxv732ex.js";
26
26
  import"./index-8fwhhayc.js";
27
27
  import"./index-q1exe2b3.js";
28
28
  import"./index-n6fa2hhk.js";
@@ -7,7 +7,7 @@ import {
7
7
  readDoctorArtifact,
8
8
  removeStraySwarmDir,
9
9
  runConfigDoctor
10
- } from "./index-2148358e.js";
10
+ } from "./index-9bsmzfk3.js";
11
11
  import {
12
12
  AGENT_TOOL_MAP,
13
13
  ALL_SUBAGENT_NAMES,
@@ -23,7 +23,7 @@ import {
23
23
  getCanonicalAgentRole,
24
24
  resolveExternalSkillsConfig,
25
25
  stripKnownSwarmPrefix
26
- } from "./index-147ja18h.js";
26
+ } from "./index-a45jq4b7.js";
27
27
  import {
28
28
  MAX_TRANSIENT_RETRIES,
29
29
  PlanSchema,
@@ -111,7 +111,7 @@ import {
111
111
  retireSkill,
112
112
  selectCandidateEntries,
113
113
  syncBundledProjectSkillsIfMissingAsync
114
- } from "./index-mr4whary.js";
114
+ } from "./index-vjvdvjd3.js";
115
115
  import {
116
116
  appendUnactionable,
117
117
  quarantineEntry,
@@ -121,10 +121,10 @@ import {
121
121
  validateActionability,
122
122
  validateActionableFields,
123
123
  validateLesson
124
- } from "./index-43khae15.js";
124
+ } from "./index-qrnhvhmg.js";
125
125
  import {
126
126
  readRecentEscalations
127
- } from "./index-h7q1bvzm.js";
127
+ } from "./index-7stsmndb.js";
128
128
  import {
129
129
  effectiveRetrievalOutcomes,
130
130
  readKnowledgeCounterRollups,
@@ -132,7 +132,7 @@ import {
132
132
  recordHiveKnowledgeEvent,
133
133
  recordKnowledgeEvent,
134
134
  resolveKnowledgeEventsPath
135
- } from "./index-qzqx2qky.js";
135
+ } from "./index-kjbfry6m.js";
136
136
  import {
137
137
  appendKnowledge,
138
138
  appendRejectedLesson,
@@ -156,7 +156,7 @@ import {
156
156
  rewriteKnowledge,
157
157
  transactFile,
158
158
  transactKnowledge
159
- } from "./index-0q7rrh59.js";
159
+ } from "./index-91qesget.js";
160
160
  import {
161
161
  KNOWLEDGE_SCHEMA_VERSION,
162
162
  OUTCOME_BLOCK_THRESHOLD,
@@ -175,7 +175,7 @@ import {
175
175
  CURATOR_INIT_PROMPT,
176
176
  CURATOR_PHASE_PROMPT,
177
177
  READ_ONLY_LANE_GUIDANCE
178
- } from "./index-jt58s751.js";
178
+ } from "./index-vxv732ex.js";
179
179
  import {
180
180
  SandboxCapabilityProbe,
181
181
  init_capability_probe
@@ -474,6 +474,7 @@ init_logger();
474
474
 
475
475
  // src/hooks/delegation-gate/worktree-isolation.ts
476
476
  init_executor();
477
+ init_logger();
477
478
  // src/worktree/merge.ts
478
479
  var _internals4 = {
479
480
  bunSpawn,
@@ -7718,6 +7719,7 @@ async function writeArchiveTombstoneAndInvalidateSkills(ctx) {
7718
7719
  }
7719
7720
 
7720
7721
  // src/hooks/skill-usage-log.ts
7722
+ init_logger();
7721
7723
  import * as crypto2 from "crypto";
7722
7724
  import * as fs5 from "fs";
7723
7725
  import * as path15 from "path";
@@ -8125,7 +8127,7 @@ async function resolveSourceKnowledgeIds(directory, skillPath) {
8125
8127
  const content = _internals10.readFileSync(absolute, "utf-8");
8126
8128
  return parseGeneratedFromKnowledge(content);
8127
8129
  } catch (err) {
8128
- console.warn("[skill-usage-log] resolveSourceKnowledgeIds failed (fail-open):", err instanceof Error ? err.message : String(err));
8130
+ log("[skill-usage-log] resolveSourceKnowledgeIds failed (fail-open):", err instanceof Error ? err.message : String(err));
8129
8131
  return [];
8130
8132
  }
8131
8133
  }
@@ -8220,7 +8222,7 @@ async function applySkillUsageFeedback(directory, options) {
8220
8222
  appendFeedbackAppliedMarker(directory, processedEntryIds);
8221
8223
  }
8222
8224
  } catch (err) {
8223
- console.warn("[skill-usage-log] applySkillUsageFeedback failed (fail-open):", err instanceof Error ? err.message : String(err));
8225
+ log("[skill-usage-log] applySkillUsageFeedback failed (fail-open):", err instanceof Error ? err.message : String(err));
8224
8226
  }
8225
8227
  return { processed, bumps };
8226
8228
  }
@@ -9190,7 +9192,7 @@ async function runCuratorPhase(directory, phase, agentsDispatched, config, knowl
9190
9192
  }
9191
9193
  if (config.skill_generation_enabled === true && skillCandidates.length > 0) {
9192
9194
  try {
9193
- const skillModule = await import("./skill-generator-z01sjppf.js");
9195
+ const skillModule = await import("./skill-generator-w6qd9mde.js");
9194
9196
  for (const cand of skillCandidates) {
9195
9197
  if (cand.confidence < (config.min_skill_confidence ?? DEFAULT_SKILL_MIN_CONFIDENCE)) {
9196
9198
  continue;
@@ -9471,7 +9473,7 @@ async function applyCuratorKnowledgeUpdates(directory, recommendations, knowledg
9471
9473
  } catch {}
9472
9474
  }
9473
9475
  if (contradictedEntries.length > 0 && knowledgeConfig.contradiction_threshold_action === "quarantine") {
9474
- const { maybeQuarantineOnContradiction } = await import("./knowledge-escalator-0q1p6br7.js");
9476
+ const { maybeQuarantineOnContradiction } = await import("./knowledge-escalator-qn7ew687.js");
9475
9477
  for (const { id } of contradictedEntries) {
9476
9478
  try {
9477
9479
  await maybeQuarantineOnContradiction(directory, id, knowledgeConfig.contradiction_quarantine_threshold, knowledgeConfig.contradiction_quarantine_window_days);
@@ -10298,7 +10300,7 @@ async function runCuratorPostMortem(directory, options = {}) {
10298
10300
  let actionResult;
10299
10301
  if (options.llmDelegate) {
10300
10302
  try {
10301
- const { CURATOR_POSTMORTEM_PROMPT } = await import("./explorer-t5srbq64.js");
10303
+ const { CURATOR_POSTMORTEM_PROMPT } = await import("./explorer-jp0nen03.js");
10302
10304
  const userInput = assembleLLMInput(effectivePlanId, scope, options.sessionID, planSummary, knowledgeSummary, curatorDigest, proposals, unactionable, retrospectives, driftReports);
10303
10305
  const ac = new AbortController;
10304
10306
  const timer = setTimeout(() => ac.abort(), options.llmTimeoutMs ?? 300000);
@@ -10428,15 +10430,15 @@ var _internals12 = {
10428
10430
  verifyPostMortemKnowledgeActions,
10429
10431
  repairPostMortemActions,
10430
10432
  loadDefaultKnowledgeConfig: async () => {
10431
- const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-e5kd993s.js");
10433
+ const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-aymfdrsb.js");
10432
10434
  return KnowledgeConfigSchema2.parse({});
10433
10435
  },
10434
10436
  applyCuratorKnowledgeUpdates: async (directory, recommendations, knowledgeConfig) => {
10435
- const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-15zwszy5.js");
10437
+ const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-vk9ec2kf.js");
10436
10438
  return applyCuratorKnowledgeUpdates2(directory, recommendations, knowledgeConfig);
10437
10439
  },
10438
10440
  checkHivePromotions: async (entries, knowledgeConfig) => {
10439
- const { checkHivePromotions } = await import("./hive-promoter-g2tkarz8.js");
10441
+ const { checkHivePromotions } = await import("./hive-promoter-0b4ny2mp.js");
10440
10442
  return checkHivePromotions(entries, knowledgeConfig);
10441
10443
  },
10442
10444
  applyProposalTriage: async (directory, triage) => {
@@ -10445,7 +10447,7 @@ var _internals12 = {
10445
10447
  activateProposal,
10446
10448
  listSkills: listSkills2,
10447
10449
  sanitizeSlug
10448
- } = await import("./skill-generator-z01sjppf.js");
10450
+ } = await import("./skill-generator-w6qd9mde.js");
10449
10451
  const result = {
10450
10452
  approved: [],
10451
10453
  rejected: [],
@@ -15482,7 +15484,7 @@ async function runFinalizeStage(ctx) {
15482
15484
  }
15483
15485
  }
15484
15486
  try {
15485
- const { CuratorConfigSchema: CCS } = await import("./schema-e5kd993s.js");
15487
+ const { CuratorConfigSchema: CCS } = await import("./schema-aymfdrsb.js");
15486
15488
  const { config: pmLoadedConfig } = _internals20.loadPluginConfigWithMeta(ctx.directory);
15487
15489
  const curatorCfg = CCS.parse(pmLoadedConfig.curator ?? {});
15488
15490
  if (curatorCfg.enabled && curatorCfg.postmortem_enabled) {
@@ -17596,9 +17598,9 @@ var _internals24 = {
17596
17598
  readSwarmFileAsync,
17597
17599
  loadCuratorDeps: async () => {
17598
17600
  const [{ CuratorConfigSchema }, curator, { createCuratorLLMDelegate: createCuratorLLMDelegate2 }] = await Promise.all([
17599
- import("./schema-e5kd993s.js"),
17600
- import("./curator-15zwszy5.js"),
17601
- import("./curator-llm-factory-5ewe7qy1.js")
17601
+ import("./schema-aymfdrsb.js"),
17602
+ import("./curator-vk9ec2kf.js"),
17603
+ import("./curator-llm-factory-jrnqg90s.js")
17602
17604
  ]);
17603
17605
  return { CuratorConfigSchema, curator, createCuratorLLMDelegate: createCuratorLLMDelegate2 };
17604
17606
  }
@@ -18094,7 +18096,7 @@ import { fileURLToPath } from "url";
18094
18096
  // package.json
18095
18097
  var package_default = {
18096
18098
  name: "opencode-swarm",
18097
- version: "7.114.4",
18099
+ version: "7.114.6",
18098
18100
  description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
18099
18101
  main: "dist/index.js",
18100
18102
  types: "dist/index.d.ts",
@@ -19563,7 +19565,7 @@ async function handleDoctorCommand(directory, args) {
19563
19565
  const result = runConfigDoctor(config, directory);
19564
19566
  let output;
19565
19567
  if (enableAutoFix && result.hasAutoFixableIssues) {
19566
- const { runConfigDoctorWithFixes } = await import("./config-doctor-xbdfrbwt.js");
19568
+ const { runConfigDoctorWithFixes } = await import("./config-doctor-jy3mdh9t.js");
19567
19569
  const fixResult = await runConfigDoctorWithFixes(directory, config, true);
19568
19570
  output = formatDoctorMarkdown(fixResult.result);
19569
19571
  } else {
@@ -30405,6 +30407,7 @@ import * as path58 from "path";
30405
30407
  // src/prm/trajectory-store.ts
30406
30408
  import * as fs25 from "fs/promises";
30407
30409
  import * as path56 from "path";
30410
+ init_logger();
30408
30411
  var MAX_TRACKED_TRAJECTORY_SESSIONS = 500;
30409
30412
  function getTrajectoryPath(sessionId, directory) {
30410
30413
  const relativePath = path56.join("trajectories", `${sessionId}.jsonl`);
@@ -30452,7 +30455,7 @@ async function readTrajectory(sessionId, directory) {
30452
30455
  if (err.code === "ENOENT") {
30453
30456
  return [];
30454
30457
  }
30455
- console.warn(`[trajectory-store] Failed to read trajectory: ${err}`);
30458
+ log(`[trajectory-store] Failed to read trajectory: ${err}`);
30456
30459
  return [];
30457
30460
  }
30458
30461
  }
@@ -30891,9 +30894,13 @@ function detectPatterns(trajectory, config, lastProcessedStep = 0) {
30891
30894
  patternsChecked: 5
30892
30895
  };
30893
30896
  }
30897
+ // src/prm/index.ts
30898
+ init_logger();
30899
+
30894
30900
  // src/prm/replay.ts
30895
30901
  import { promises as fs26 } from "fs";
30896
30902
  import path57 from "path";
30903
+ init_logger();
30897
30904
  function isPathSafe(targetPath, basePath) {
30898
30905
  const resolvedTarget = path57.resolve(targetPath);
30899
30906
  const resolvedBase = path57.resolve(basePath);
@@ -30920,20 +30927,20 @@ async function startReplayRecording(sessionID, directory) {
30920
30927
  const filename = `${safeSessionID}-${Date.now()}.jsonl`;
30921
30928
  const filepath = path57.join(replayDir, filename);
30922
30929
  if (!isPathSafe(filepath, replayDir)) {
30923
- console.warn(`[replay] Invalid path detected - path traversal attempt blocked for session ${sessionID}`);
30930
+ advisoryWarn(`[replay] Invalid path detected - path traversal attempt blocked for session ${sessionID}`);
30924
30931
  return null;
30925
30932
  }
30926
30933
  await fs26.mkdir(replayDir, { recursive: true });
30927
30934
  return filepath;
30928
30935
  } catch (err) {
30929
- console.warn(`[replay] Failed to start recording for session ${sessionID}: ${err}`);
30936
+ log(`[replay] Failed to start recording for session ${sessionID}: ${err}`);
30930
30937
  return null;
30931
30938
  }
30932
30939
  }
30933
30940
  async function recordReplayEntry(artifactPath, sessionID, entry) {
30934
30941
  try {
30935
30942
  if (!isWithinReplaysDir(artifactPath)) {
30936
- console.warn(`[replay] Invalid artifact path - not within .swarm/replays/: ${artifactPath}`);
30943
+ log(`[replay] Invalid artifact path - not within .swarm/replays/: ${artifactPath}`);
30937
30944
  return;
30938
30945
  }
30939
30946
  const fullEntry = {
@@ -30945,7 +30952,7 @@ async function recordReplayEntry(artifactPath, sessionID, entry) {
30945
30952
  `;
30946
30953
  await fs26.appendFile(artifactPath, line, "utf-8");
30947
30954
  } catch (err) {
30948
- console.warn(`[replay] Failed to record entry: ${err}`);
30955
+ log(`[replay] Failed to record entry: ${err}`);
30949
30956
  }
30950
30957
  }
30951
30958
 
@@ -32211,6 +32218,7 @@ function getCompactionMetrics(sessionId) {
32211
32218
  }
32212
32219
 
32213
32220
  // src/services/context-budget-service.ts
32221
+ init_logger();
32214
32222
  var DEFAULT_CONTEXT_BUDGET_CONFIG = {
32215
32223
  enabled: true,
32216
32224
  budgetTokens: 40000,
@@ -32984,7 +32992,7 @@ function buildDetailedHelp(commandName, entry) {
32984
32992
  async function handleHelpCommand(ctx) {
32985
32993
  const targetCommand = ctx.args.join(" ");
32986
32994
  if (!targetCommand) {
32987
- const { buildHelpText } = await import("./index-1gcw6azm.js");
32995
+ const { buildHelpText } = await import("./index-pzhkry3t.js");
32988
32996
  return buildHelpText();
32989
32997
  }
32990
32998
  const tokens = targetCommand.split(/\s+/);
@@ -32993,7 +33001,7 @@ async function handleHelpCommand(ctx) {
32993
33001
  return _internals49.buildDetailedHelp(resolved.key, resolved.entry);
32994
33002
  }
32995
33003
  const similar = _internals49.findSimilarCommands(targetCommand);
32996
- const { buildHelpText: fullHelp } = await import("./index-1gcw6azm.js");
33004
+ const { buildHelpText: fullHelp } = await import("./index-pzhkry3t.js");
32997
33005
  if (similar.length > 0) {
32998
33006
  return `Command '/swarm ${targetCommand}' not found.
32999
33007
 
@@ -33126,7 +33134,7 @@ var COMMAND_REGISTRY = {
33126
33134
  },
33127
33135
  "guardrail explain": {
33128
33136
  handler: async (ctx) => {
33129
- const { handleGuardrailExplain } = await import("./guardrail-explain-3156qxy0.js");
33137
+ const { handleGuardrailExplain } = await import("./guardrail-explain-vf89cv01.js");
33130
33138
  return handleGuardrailExplain(ctx.directory, ctx.args);
33131
33139
  },
33132
33140
  description: "Dry-run: show what the guardrails would do to a command or write target (executes nothing)",
@@ -33136,7 +33144,7 @@ var COMMAND_REGISTRY = {
33136
33144
  },
33137
33145
  "guardrail-explain": {
33138
33146
  handler: async (ctx) => {
33139
- const { handleGuardrailExplain } = await import("./guardrail-explain-3156qxy0.js");
33147
+ const { handleGuardrailExplain } = await import("./guardrail-explain-vf89cv01.js");
33140
33148
  return handleGuardrailExplain(ctx.directory, ctx.args);
33141
33149
  },
33142
33150
  description: "Dry-run: show what the guardrails would do to a command or write target (executes nothing)",
@@ -33146,7 +33154,7 @@ var COMMAND_REGISTRY = {
33146
33154
  },
33147
33155
  "guardrail-log": {
33148
33156
  handler: async (ctx) => {
33149
- const { handleGuardrailLog } = await import("./guardrail-log-qfc2j0tb.js");
33157
+ const { handleGuardrailLog } = await import("./guardrail-log-84wnx273.js");
33150
33158
  return handleGuardrailLog(ctx.directory, ctx.args);
33151
33159
  },
33152
33160
  description: "Read the guardrail decision log (use --blocks-only for blocks)",
@@ -38380,7 +38388,7 @@ async function maybeSuggestWorktreeLink(directory, sessionId) {
38380
38388
  return;
38381
38389
  const worktrees = await countWorktrees(directory);
38382
38390
  if (worktrees > 1) {
38383
- console.warn(`[opencode-swarm] Detected ${worktrees} git worktrees of this repo. ` + "Run `/swarm link` in each to share swarm knowledge across them " + "(or `/swarm link <name>` to share with similar projects).");
38391
+ advisoryWarn(`[opencode-swarm] Detected ${worktrees} git worktrees of this repo. ` + "Run `/swarm link` in each to share swarm knowledge across them " + "(or `/swarm link <name>` to share with similar projects).");
38384
38392
  }
38385
38393
  } catch {}
38386
38394
  }
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  redactPath,
4
4
  redactShellCommand
5
- } from "./index-g6va6n3t.js";
5
+ } from "./index-yfedche9.js";
6
6
 
7
7
  // src/services/guardrail-log-service.ts
8
8
  import * as fs from "fs/promises";
@@ -4,7 +4,7 @@ import {
4
4
  countEntryViolationsInWindow,
5
5
  readKnowledgeEvents,
6
6
  recordKnowledgeEvent
7
- } from "./index-qzqx2qky.js";
7
+ } from "./index-kjbfry6m.js";
8
8
  import {
9
9
  jaccardBigram,
10
10
  readKnowledge,
@@ -12,7 +12,7 @@ import {
12
12
  resolveSwarmKnowledgePath,
13
13
  transactKnowledge,
14
14
  wordBigrams
15
- } from "./index-0q7rrh59.js";
15
+ } from "./index-91qesget.js";
16
16
  import {
17
17
  isActiveStatus
18
18
  } from "./index-bfwt3abw.js";
@@ -188,7 +188,7 @@ async function maybeQuarantineOnContradiction(directory, entryId, threshold, win
188
188
  alreadyInactive: true
189
189
  };
190
190
  }
191
- const { quarantineEntry } = await import("./knowledge-validator-csay9wqj.js");
191
+ const { quarantineEntry } = await import("./knowledge-validator-2knz0d2t.js");
192
192
  await quarantineEntry(directory, entryId, `repeat_contradiction: ${count} contradicted events in ${windowDays}d`, "auto");
193
193
  return { quarantined: true, entryId, contradictionsInWindow: count };
194
194
  } catch {