opencode-swarm 7.106.0 → 7.107.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.
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  handleGuardrailExplain
4
- } from "./index-7dtekwvd.js";
4
+ } from "./index-wa6at603.js";
5
5
  import {
6
6
  handleGuardrailLog
7
7
  } from "./index-w8dzxnx4.js";
@@ -80,7 +80,7 @@ import {
80
80
  handleWriteRetroCommand,
81
81
  normalizeSwarmCommandInput,
82
82
  resolveCommand
83
- } from "./index-f4yjypa4.js";
83
+ } from "./index-fhw0jm5c.js";
84
84
  import"./index-fxtrk7y8.js";
85
85
  import"./index-ydgy7vg5.js";
86
86
  import"./index-vwyjkzgs.js";
@@ -91,7 +91,7 @@ import {
91
91
  ORCHESTRATOR_NAME,
92
92
  stripKnownSwarmPrefix
93
93
  } from "./index-2560cctg.js";
94
- import"./index-k2rmw9sz.js";
94
+ import"./index-25pev4e7.js";
95
95
  import"./index-8w4d325g.js";
96
96
  import"./index-v4fcn4tr.js";
97
97
  import"./index-r8f89sm9.js";
@@ -12,7 +12,7 @@ import {
12
12
  detectPosixWrites,
13
13
  detectWindowsWrites,
14
14
  resolveWriteTargets
15
- } from "./index-f4yjypa4.js";
15
+ } from "./index-fhw0jm5c.js";
16
16
  import {
17
17
  checkFileAuthority,
18
18
  classifyFile,
package/dist/cli/index.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  getPluginLockFilePaths,
8
8
  package_default,
9
9
  resolveCommand
10
- } from "./index-f4yjypa4.js";
10
+ } from "./index-fhw0jm5c.js";
11
11
  import"./index-fxtrk7y8.js";
12
12
  import"./index-ydgy7vg5.js";
13
13
  import"./index-vwyjkzgs.js";
@@ -16,7 +16,7 @@ import"./index-esg1554h.js";
16
16
  import {
17
17
  DEFAULT_AGENT_CONFIGS
18
18
  } from "./index-2560cctg.js";
19
- import"./index-k2rmw9sz.js";
19
+ import"./index-25pev4e7.js";
20
20
  import"./index-8w4d325g.js";
21
21
  import"./index-v4fcn4tr.js";
22
22
  import"./index-r8f89sm9.js";
@@ -1,3 +1,13 @@
1
+ import { type OrphanCleanupResult } from '../worktree/merge';
2
+ /**
3
+ * _internals DI seam for testing reset-session without spawning real git processes.
4
+ * Production code calls `_internals.cleanupOrphanedBranches(...)` so tests can
5
+ * replace the function on this object without touching the real worktree/merge
6
+ * module. Mutations are file-scoped and trivially restorable via afterEach.
7
+ */
8
+ export declare const _internals: {
9
+ cleanupOrphanedBranches: (directory: string, activeSessionIds: string[]) => Promise<OrphanCleanupResult>;
10
+ };
1
11
  /**
2
12
  * Handles the /swarm reset-session command.
3
13
  * Deletes only the session state file (.swarm/session/state.json)
@@ -10,7 +10,7 @@
10
10
  */
11
11
  import type { PluginConfig } from '../../config';
12
12
  import type { WorktreeHandle } from '../../worktree';
13
- import { attemptMergeBackFromDirty, postMergeCleanup, provisionWorktree, removeWorktree } from '../../worktree';
13
+ import { attemptMergeBackFromDirty, cleanupOrphanedBranches, postMergeCleanup, provisionWorktree, removeWorktree, startupOrphanRecovery } from '../../worktree';
14
14
  export declare const MAX_TRACKED_STANDARD_WORKTREE_CALLS = 256;
15
15
  export interface StandardWorktreeDispatch {
16
16
  callID: string;
@@ -45,4 +45,6 @@ export declare const _internals: {
45
45
  removeWorktree: typeof removeWorktree;
46
46
  attemptMergeBackFromDirty: typeof attemptMergeBackFromDirty;
47
47
  postMergeCleanup: typeof postMergeCleanup;
48
+ startupOrphanRecovery: typeof startupOrphanRecovery;
49
+ cleanupOrphanedBranches: typeof cleanupOrphanedBranches;
48
50
  };
@@ -27,7 +27,9 @@ export declare const _internals: {
27
27
  export declare const SPEC_DRIFT_BLOCKED_TOOLS: Set<string>;
28
28
  /**
29
29
  * Throw SPEC_DRIFT_BLOCK if the tool is on the block-list and the
30
- * spec-staleness marker file exists.
30
+ * spec-staleness marker file exists. The error message includes a unified
31
+ * diff of the recorded vs current spec content so the user can see what
32
+ * changed (FR-001).
31
33
  */
32
34
  export declare function enforceSpecDriftGate(directory: string | undefined, toolName: string): void;
33
35
  /**
@@ -20,6 +20,10 @@ export declare function buildSpecDriftAdvisory(args: {
20
20
  reason: string;
21
21
  currentHash: string | null;
22
22
  storedHash: string;
23
+ diff?: {
24
+ diff: string;
25
+ changedSections: string[];
26
+ } | null;
23
27
  midLoadRemovals?: {
24
28
  count: number;
25
29
  source: string;