opencode-swarm 6.22.19 → 6.22.20

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.
@@ -13,8 +13,10 @@ export type CuratorInitRunner = (directory: string, config: CuratorConfig) => Pr
13
13
  * Creates a hook that monitors plan phase transitions and triggers preflight.
14
14
  *
15
15
  * @param directory - Project directory (where .swarm/ lives)
16
- * @param preflightManager - The PreflightTriggerManager to call on phase change
16
+ * @param preflightManager - Optional PreflightTriggerManager to call on phase change.
17
+ * When undefined, preflight checks are skipped but curator initialization still runs
18
+ * at session start (useful when knowledge.enabled but phase_preflight is disabled).
17
19
  * @param curatorRunner - Optional curator init runner (defaults to runCuratorInit; injectable for tests)
18
20
  * @returns A safeHook-wrapped system.transform handler
19
21
  */
20
- export declare function createPhaseMonitorHook(directory: string, preflightManager: PreflightTriggerManager, curatorRunner?: CuratorInitRunner): (input: unknown, output: unknown) => Promise<void>;
22
+ export declare function createPhaseMonitorHook(directory: string, preflightManager?: PreflightTriggerManager, curatorRunner?: CuratorInitRunner): (input: unknown, output: unknown) => Promise<void>;
package/dist/index.js CHANGED
@@ -39880,8 +39880,8 @@ When writing output consumed by other agents, prefix with:
39880
39880
  [FOR: agent1, agent2] \u2014 relevant to specific agents
39881
39881
  [FOR: ALL] \u2014 relevant to all agents
39882
39882
  Examples:
39883
- [FOR: {{AGENT_PREFIX}}reviewer, {{AGENT_PREFIX}}test_engineer] "Added validation \u2014 needs safety check"
39884
- [FOR: {{AGENT_PREFIX}}architect] "Research: Tree-sitter supports TypeScript AST"
39883
+ [FOR: reviewer, test_engineer] "Added validation \u2014 needs safety check"
39884
+ [FOR: architect] "Research: Tree-sitter supports TypeScript AST"
39885
39885
  [FOR: ALL] "Breaking change: StateManager renamed"
39886
39886
  This tag is informational in v6.19; v6.20 will use for context filtering.
39887
39887
  `;
@@ -49221,7 +49221,9 @@ function createPhaseMonitorHook(directory, preflightManager, curatorRunner = run
49221
49221
  const phase = plan.phases.find((p) => p.id === previousPhase);
49222
49222
  const completedTasks = phase?.tasks.filter((t) => t.status === "completed").length ?? 0;
49223
49223
  const totalTasks = phase?.tasks.length ?? 0;
49224
- await preflightManager.checkAndTrigger(currentPhase, completedTasks, totalTasks);
49224
+ if (preflightManager) {
49225
+ await preflightManager.checkAndTrigger(currentPhase, completedTasks, totalTasks);
49226
+ }
49225
49227
  }
49226
49228
  };
49227
49229
  return safeHook(handler);
@@ -61098,7 +61100,7 @@ var OpenCodeSwarm = async (ctx) => {
61098
61100
  const activityHooks = createAgentActivityHooks(config3, ctx.directory);
61099
61101
  const delegationGateHooks = createDelegationGateHook(config3);
61100
61102
  const delegationSanitizerHook = createDelegationSanitizerHook(ctx.directory);
61101
- const guardrailsFallback = config3.guardrails?.enabled === false ? { ...config3.guardrails, enabled: false } : loadedFromFile ? config3.guardrails ?? {} : config3.guardrails;
61103
+ const guardrailsFallback = config3.guardrails?.enabled === false ? { ...config3.guardrails, enabled: false } : config3.guardrails ?? {};
61102
61104
  const guardrailsConfig = GuardrailsConfigSchema.parse(guardrailsFallback);
61103
61105
  if (loadedFromFile && guardrailsConfig.enabled === false) {
61104
61106
  console.warn("");
@@ -61379,7 +61381,7 @@ var OpenCodeSwarm = async (ctx) => {
61379
61381
  ].filter((fn) => Boolean(fn))),
61380
61382
  "experimental.chat.system.transform": composeHandlers(...[
61381
61383
  systemEnhancerHook["experimental.chat.system.transform"],
61382
- automationConfig.capabilities?.phase_preflight === true && preflightTriggerManager ? createPhaseMonitorHook(ctx.directory, preflightTriggerManager) : undefined
61384
+ automationConfig.capabilities?.phase_preflight === true && preflightTriggerManager ? createPhaseMonitorHook(ctx.directory, preflightTriggerManager) : knowledgeConfig.enabled ? createPhaseMonitorHook(ctx.directory) : undefined
61383
61385
  ].filter(Boolean)),
61384
61386
  "experimental.session.compacting": compactionHook["experimental.session.compacting"],
61385
61387
  "command.execute.before": safeHook(commandHandler),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "6.22.19",
3
+ "version": "6.22.20",
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",