opencode-swarm 6.51.0 → 6.53.1

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/README.md CHANGED
@@ -1154,6 +1154,7 @@ Control how tool outputs are summarized for LLM context.
1154
1154
  | `/swarm knowledge quarantine [id]` | Move a knowledge entry to quarantine |
1155
1155
  | `/swarm knowledge restore [id]` | Restore a quarantined knowledge entry |
1156
1156
  | `/swarm turbo` | Enable turbo mode for the current session (bypasses QA gates) |
1157
+ | `/swarm full-auto` | Toggle Full-Auto Mode for the current session [on|off] |
1157
1158
  | `/swarm checkpoint` | Save a git checkpoint for the current state |
1158
1159
 
1159
1160
  </details>
package/dist/cli/index.js CHANGED
@@ -36577,6 +36577,37 @@ async function handleExportCommand(directory, _args) {
36577
36577
  const exportData = await getExportData(directory);
36578
36578
  return formatExportMarkdown(exportData);
36579
36579
  }
36580
+ // src/commands/full-auto.ts
36581
+ async function handleFullAutoCommand(_directory, args, sessionID) {
36582
+ if (!sessionID || sessionID.trim() === "") {
36583
+ return "Error: No active session context. Full-Auto Mode requires an active session. Use /swarm full-auto from within an OpenCode session, or start a session first.";
36584
+ }
36585
+ const session = getAgentSession(sessionID);
36586
+ if (!session) {
36587
+ return "Error: No active session. Full-Auto Mode requires an active session to operate.";
36588
+ }
36589
+ const arg = args[0]?.toLowerCase();
36590
+ let newFullAutoMode;
36591
+ let feedback;
36592
+ if (arg === "on") {
36593
+ newFullAutoMode = true;
36594
+ feedback = "Full-Auto Mode enabled";
36595
+ } else if (arg === "off") {
36596
+ newFullAutoMode = false;
36597
+ feedback = "Full-Auto Mode disabled";
36598
+ } else {
36599
+ newFullAutoMode = !session.fullAutoMode;
36600
+ feedback = newFullAutoMode ? "Full-Auto Mode enabled" : "Full-Auto Mode disabled";
36601
+ }
36602
+ session.fullAutoMode = newFullAutoMode;
36603
+ if (!newFullAutoMode) {
36604
+ session.fullAutoInteractionCount = 0;
36605
+ session.fullAutoDeadlockCount = 0;
36606
+ session.fullAutoLastQuestionHash = null;
36607
+ }
36608
+ return feedback;
36609
+ }
36610
+
36580
36611
  // src/commands/handoff.ts
36581
36612
  init_utils2();
36582
36613
  import crypto4 from "crypto";
@@ -41922,6 +41953,10 @@ var COMMAND_REGISTRY = {
41922
41953
  handler: (ctx) => handleTurboCommand(ctx.directory, ctx.args, ctx.sessionID),
41923
41954
  description: "Toggle Turbo Mode for the active session [on|off]"
41924
41955
  },
41956
+ "full-auto": {
41957
+ handler: (ctx) => handleFullAutoCommand(ctx.directory, ctx.args, ctx.sessionID),
41958
+ description: "Toggle Full-Auto Mode for the active session [on|off]"
41959
+ },
41925
41960
  "write-retro": {
41926
41961
  handler: (ctx) => handleWriteRetroCommand(ctx.directory, ctx.args),
41927
41962
  description: "Write a retrospective evidence bundle for a completed phase <json>"
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Tests for Full-Auto Mode command registration in src/commands/index.ts.
3
+ * Verifies import, export, help text, and registry routing for /swarm full-auto.
4
+ */
5
+ export {};
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Tests for empty sessionID handling in handleFullAutoCommand.
3
+ * Tests the CLI wiring fix where empty sessionID returns proper error message.
4
+ */
5
+ export {};
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Handles the /swarm full-auto command.
3
+ * Toggles Full-Auto Mode on or off for the active session.
4
+ *
5
+ * @param directory - Project directory (unused but kept for consistency with other commands)
6
+ * @param args - Optional argument: "on" | "off" | undefined (toggle behavior)
7
+ * @param sessionID - Session ID for accessing active session state
8
+ * @returns Feedback message about Full-Auto Mode state
9
+ */
10
+ export declare function handleFullAutoCommand(_directory: string, args: string[], sessionID: string): Promise<string>;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Regression Tests for Full-Auto Mode Integration.
3
+ *
4
+ * Covers the integration surfaces unique to full-auto mode:
5
+ * 1. /swarm full-auto command toggle, on, off
6
+ * 2. hasActiveFullAuto() - session-scoped and global-fallback behavior
7
+ * 3. System-enhancer hook injects FULL-AUTO MODE ACTIVE banner (Path A and global)
8
+ * 4. Counter reset side-effects are visible after disable
9
+ */
10
+ export {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Tests for handleFullAutoCommand function.
3
+ * Tests the /swarm full-auto command toggle functionality,
4
+ * including the unique counter-reset behavior on disable.
5
+ */
6
+ export {};
@@ -13,6 +13,7 @@ export { handleDiagnoseCommand } from './diagnose';
13
13
  export { handleDoctorCommand } from './doctor';
14
14
  export { handleEvidenceCommand, handleEvidenceSummaryCommand, } from './evidence';
15
15
  export { handleExportCommand } from './export';
16
+ export { handleFullAutoCommand } from './full-auto';
16
17
  export { handleHandoffCommand } from './handoff';
17
18
  export { handleHistoryCommand } from './history';
18
19
  export { handleKnowledgeListCommand, handleKnowledgeMigrateCommand, handleKnowledgeQuarantineCommand, handleKnowledgeRestoreCommand, } from './knowledge';
@@ -132,6 +132,10 @@ export declare const COMMAND_REGISTRY: {
132
132
  readonly handler: (ctx: CommandContext) => Promise<string>;
133
133
  readonly description: "Toggle Turbo Mode for the active session [on|off]";
134
134
  };
135
+ readonly 'full-auto': {
136
+ readonly handler: (ctx: CommandContext) => Promise<string>;
137
+ readonly description: "Toggle Full-Auto Mode for the active session [on|off]";
138
+ };
135
139
  readonly 'write-retro': {
136
140
  readonly handler: (ctx: CommandContext) => Promise<string>;
137
141
  readonly description: "Write a retrospective evidence bundle for a completed phase <json>";
package/dist/index.js CHANGED
@@ -16016,7 +16016,7 @@ function startAgentSession(sessionId, agentName, staleDurationMs = 7200000, dire
16016
16016
  scopeViolationDetected: false,
16017
16017
  modifiedFilesThisCoderTask: [],
16018
16018
  turboMode: false,
16019
- fullAutoMode: swarmState.fullAutoEnabledInConfig,
16019
+ fullAutoMode: false,
16020
16020
  fullAutoInteractionCount: 0,
16021
16021
  fullAutoDeadlockCount: 0,
16022
16022
  fullAutoLastQuestionHash: null,
@@ -47173,6 +47173,38 @@ async function handleExportCommand(directory, _args) {
47173
47173
  const exportData = await getExportData(directory);
47174
47174
  return formatExportMarkdown(exportData);
47175
47175
  }
47176
+ // src/commands/full-auto.ts
47177
+ init_state();
47178
+ async function handleFullAutoCommand(_directory, args2, sessionID) {
47179
+ if (!sessionID || sessionID.trim() === "") {
47180
+ return "Error: No active session context. Full-Auto Mode requires an active session. Use /swarm full-auto from within an OpenCode session, or start a session first.";
47181
+ }
47182
+ const session = getAgentSession(sessionID);
47183
+ if (!session) {
47184
+ return "Error: No active session. Full-Auto Mode requires an active session to operate.";
47185
+ }
47186
+ const arg = args2[0]?.toLowerCase();
47187
+ let newFullAutoMode;
47188
+ let feedback;
47189
+ if (arg === "on") {
47190
+ newFullAutoMode = true;
47191
+ feedback = "Full-Auto Mode enabled";
47192
+ } else if (arg === "off") {
47193
+ newFullAutoMode = false;
47194
+ feedback = "Full-Auto Mode disabled";
47195
+ } else {
47196
+ newFullAutoMode = !session.fullAutoMode;
47197
+ feedback = newFullAutoMode ? "Full-Auto Mode enabled" : "Full-Auto Mode disabled";
47198
+ }
47199
+ session.fullAutoMode = newFullAutoMode;
47200
+ if (!newFullAutoMode) {
47201
+ session.fullAutoInteractionCount = 0;
47202
+ session.fullAutoDeadlockCount = 0;
47203
+ session.fullAutoLastQuestionHash = null;
47204
+ }
47205
+ return feedback;
47206
+ }
47207
+
47176
47208
  // src/commands/handoff.ts
47177
47209
  init_utils2();
47178
47210
  import crypto4 from "crypto";
@@ -50150,6 +50182,10 @@ var COMMAND_REGISTRY = {
50150
50182
  handler: (ctx) => handleTurboCommand(ctx.directory, ctx.args, ctx.sessionID),
50151
50183
  description: "Toggle Turbo Mode for the active session [on|off]"
50152
50184
  },
50185
+ "full-auto": {
50186
+ handler: (ctx) => handleFullAutoCommand(ctx.directory, ctx.args, ctx.sessionID),
50187
+ description: "Toggle Full-Auto Mode for the active session [on|off]"
50188
+ },
50153
50189
  "write-retro": {
50154
50190
  handler: (ctx) => handleWriteRetroCommand(ctx.directory, ctx.args),
50155
50191
  description: "Write a retrospective evidence bundle for a completed phase <json>"
@@ -72757,6 +72793,10 @@ var OpenCodeSwarm = async (ctx) => {
72757
72793
  template: "/swarm turbo",
72758
72794
  description: "Use /swarm turbo to enable turbo mode for faster execution"
72759
72795
  },
72796
+ "swarm-full-auto": {
72797
+ template: "/swarm full-auto $ARGUMENTS",
72798
+ description: "Use /swarm full-auto to toggle Full-Auto Mode for the active session [on|off]"
72799
+ },
72760
72800
  "swarm-write-retro": {
72761
72801
  template: "/swarm write-retro $ARGUMENTS",
72762
72802
  description: "Use /swarm write-retro to manually write a phase retrospective"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "6.51.0",
3
+ "version": "6.53.1",
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",