opencode-swarm 7.9.0 → 7.10.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.
@@ -76,6 +76,24 @@ declare function detectDefaultRemoteBranch(cwd: string): string | null;
76
76
  export declare function resetToRemoteBranch(cwd: string, options?: {
77
77
  pruneBranches?: boolean;
78
78
  }): ResetToRemoteBranchResult;
79
+ export interface ResetToMainAfterMergeResult {
80
+ success: boolean;
81
+ targetBranch: string;
82
+ previousBranch: string;
83
+ message: string;
84
+ branchDeleted: boolean;
85
+ changesDiscarded: boolean;
86
+ warnings: string[];
87
+ }
88
+ /**
89
+ * Aggressive git reset for post-merge cleanup.
90
+ * Handles the common scenario: feature branch PR merged, local has uncommitted artifacts.
91
+ * Steps: detect default branch → safety check → fetch → checkout → discard changes → reset → delete branch.
92
+ * Safety guard: refuses if current branch has commits not on any remote tracking branch.
93
+ */
94
+ export declare function resetToMainAfterMerge(cwd: string, options?: {
95
+ pruneBranches?: boolean;
96
+ }): ResetToMainAfterMergeResult;
79
97
  /**
80
98
  * DI seam for testability. Contains all test-mocked exports.
81
99
  * Internal calls should use _internals.fn() instead of fn() directly.
@@ -85,5 +103,6 @@ export declare const _internals: {
85
103
  detectDefaultRemoteBranch: typeof detectDefaultRemoteBranch;
86
104
  getDefaultBaseBranch: typeof getDefaultBaseBranch;
87
105
  resetToRemoteBranch: typeof resetToRemoteBranch;
106
+ resetToMainAfterMerge: typeof resetToMainAfterMerge;
88
107
  };
89
108
  export {};