opencode-swarm 6.29.4 → 6.29.5

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.
package/dist/cli/index.js CHANGED
@@ -31005,6 +31005,7 @@ function serializeAgentSession(s) {
31005
31005
  lastCompletedPhaseAgentsDispatched,
31006
31006
  qaSkipCount: s.qaSkipCount ?? 0,
31007
31007
  qaSkipTaskIds: s.qaSkipTaskIds ?? [],
31008
+ pendingAdvisoryMessages: s.pendingAdvisoryMessages ?? [],
31008
31009
  taskWorkflowStates: Object.fromEntries(s.taskWorkflowStates ?? new Map),
31009
31010
  ...s.scopeViolationDetected !== undefined && {
31010
31011
  scopeViolationDetected: s.scopeViolationDetected
package/dist/index.js CHANGED
@@ -46385,6 +46385,7 @@ function serializeAgentSession(s) {
46385
46385
  lastCompletedPhaseAgentsDispatched,
46386
46386
  qaSkipCount: s.qaSkipCount ?? 0,
46387
46387
  qaSkipTaskIds: s.qaSkipTaskIds ?? [],
46388
+ pendingAdvisoryMessages: s.pendingAdvisoryMessages ?? [],
46388
46389
  taskWorkflowStates: Object.fromEntries(s.taskWorkflowStates ?? new Map),
46389
46390
  ...s.scopeViolationDetected !== undefined && {
46390
46391
  scopeViolationDetected: s.scopeViolationDetected
@@ -49871,7 +49872,7 @@ ${pending.message}
49871
49872
  }
49872
49873
  }
49873
49874
  if (isArchitectSession && (session?.pendingAdvisoryMessages?.length ?? 0) > 0) {
49874
- const advisories = session.pendingAdvisoryMessages;
49875
+ const advisories = session.pendingAdvisoryMessages ?? [];
49875
49876
  let targetMsg = systemMessages[0];
49876
49877
  if (!targetMsg) {
49877
49878
  const newMsg = {
@@ -50819,9 +50820,9 @@ function createPhaseMonitorHook(directory, preflightManager, curatorRunner = run
50819
50820
  const initResult = await curatorRunner(directory, curatorConfig);
50820
50821
  if (initResult.briefing) {
50821
50822
  const briefingPath = path31.join(directory, ".swarm", "curator-briefing.md");
50822
- const fs18 = await import("fs");
50823
- fs18.mkdirSync(path31.dirname(briefingPath), { recursive: true });
50824
- fs18.writeFileSync(briefingPath, initResult.briefing, "utf-8");
50823
+ const { mkdir: mkdir4, writeFile: writeFile4 } = await import("fs/promises");
50824
+ await mkdir4(path31.dirname(briefingPath), { recursive: true });
50825
+ await writeFile4(briefingPath, initResult.briefing, "utf-8");
50825
50826
  }
50826
50827
  }
50827
50828
  } catch {}
@@ -53569,15 +53570,14 @@ function createKnowledgeInjectorHook(directory, config3) {
53569
53570
  currentPhase: phaseDescription
53570
53571
  };
53571
53572
  const entries = await readMergedKnowledge(directory, config3, context);
53573
+ let freshPreamble = null;
53572
53574
  try {
53573
53575
  const driftReports = await readPriorDriftReports(directory);
53574
53576
  if (driftReports.length > 0) {
53575
53577
  const latestReport = driftReports[driftReports.length - 1];
53576
53578
  const driftText = buildDriftInjectionText(latestReport, 500);
53577
53579
  if (driftText) {
53578
- cachedInjectionText = cachedInjectionText ? `${driftText}
53579
-
53580
- ${cachedInjectionText}` : driftText;
53580
+ freshPreamble = driftText;
53581
53581
  }
53582
53582
  }
53583
53583
  } catch {}
@@ -53585,14 +53585,15 @@ ${cachedInjectionText}` : driftText;
53585
53585
  const briefingContent = await readSwarmFileAsync(directory, "curator-briefing.md");
53586
53586
  if (briefingContent) {
53587
53587
  const truncatedBriefing = briefingContent.slice(0, 500);
53588
- cachedInjectionText = cachedInjectionText ? `<curator_briefing>${truncatedBriefing}</curator_briefing>
53588
+ freshPreamble = freshPreamble ? `<curator_briefing>${truncatedBriefing}</curator_briefing>
53589
53589
 
53590
- ${cachedInjectionText}` : `<curator_briefing>${truncatedBriefing}</curator_briefing>`;
53590
+ ${freshPreamble}` : `<curator_briefing>${truncatedBriefing}</curator_briefing>`;
53591
53591
  }
53592
53592
  } catch {}
53593
53593
  if (entries.length === 0) {
53594
- if (cachedInjectionText === null)
53594
+ if (freshPreamble === null)
53595
53595
  return;
53596
+ cachedInjectionText = freshPreamble;
53596
53597
  injectKnowledgeMessage(output, cachedInjectionText);
53597
53598
  return;
53598
53599
  }
@@ -53614,7 +53615,7 @@ ${cachedInjectionText}` : `<curator_briefing>${truncatedBriefing}</curator_brief
53614
53615
  "These are lessons learned from this project and past projects. Consider them as context but use your judgment \u2014 they may not all apply."
53615
53616
  ].join(`
53616
53617
  `);
53617
- let injectionText = cachedInjectionText ? `${cachedInjectionText}
53618
+ let injectionText = freshPreamble ? `${freshPreamble}
53618
53619
 
53619
53620
  ${knowledgeSection}` : knowledgeSection;
53620
53621
  if (runMemory) {
@@ -53926,7 +53927,8 @@ function deserializeAgentSession(s) {
53926
53927
  declaredCoderScope: null,
53927
53928
  lastScopeViolation: null,
53928
53929
  scopeViolationDetected: s.scopeViolationDetected,
53929
- modifiedFilesThisCoderTask: []
53930
+ modifiedFilesThisCoderTask: [],
53931
+ pendingAdvisoryMessages: s.pendingAdvisoryMessages ?? []
53930
53932
  };
53931
53933
  }
53932
53934
  async function readSnapshot(directory) {
@@ -37,6 +37,7 @@ export interface SerializedAgentSession {
37
37
  lastCompletedPhaseAgentsDispatched: string[];
38
38
  qaSkipCount: number;
39
39
  qaSkipTaskIds: string[];
40
+ pendingAdvisoryMessages: string[];
40
41
  taskWorkflowStates?: Record<string, string>;
41
42
  /** Flag for one-shot scope violation warning injection (omitted when undefined for additive-only schema) */
42
43
  scopeViolationDetected?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "6.29.4",
3
+ "version": "6.29.5",
4
4
  "description": "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",