@ai-hero/sandcastle 0.1.5 → 0.1.6

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.
@@ -167,45 +167,34 @@ for (let iteration = 1; iteration <= MAX_ITERATIONS; iteration++) {
167
167
  continue;
168
168
  }
169
169
 
170
- if (completedBranches.length === 1) {
171
- // Single branch — merge directly without spinning up a merge agent.
172
- const { execSync } = await import("node:child_process");
173
- const branch = completedBranches[0]!;
174
- const issue = completedIssues[0]!;
175
- console.log(`\nSingle branch — merging ${branch} directly.`);
176
- execSync(`git merge ${branch}`, { stdio: "inherit" });
177
- execSync(`gh issue close ${issue.number}`, { stdio: "inherit" });
178
- console.log(`\nBranch merged and issue #${issue.number} closed.`);
179
- } else {
180
- // -------------------------------------------------------------------------
181
- // Phase 3: Merge
182
- //
183
- // One sonnet agent merges all completed branches into the current branch,
184
- // resolving any conflicts and running tests to confirm everything still works.
185
- //
186
- // The {{BRANCHES}} and {{ISSUES}} prompt arguments are lists that the agent
187
- // uses to know which branches to merge and which issues to close.
188
- // -------------------------------------------------------------------------
189
- await sandcastle.run({
190
- hooks,
191
- copyToSandbox,
192
- name: "merger",
193
- maxIterations: 10,
194
- // Sonnet is sufficient for merge conflict resolution.
195
- model: "claude-sonnet-4-6",
196
- promptFile: "./.sandcastle/merge-prompt.md",
197
- promptArgs: {
198
- // A markdown list of branch names, one per line.
199
- BRANCHES: completedBranches.map((b) => `- ${b}`).join("\n"),
200
- // A markdown list of issue numbers and titles, one per line.
201
- ISSUES: completedIssues
202
- .map((i) => `- #${i.number}: ${i.title}`)
203
- .join("\n"),
204
- },
205
- });
206
-
207
- console.log("\nBranches merged.");
208
- }
170
+ // -------------------------------------------------------------------------
171
+ // Phase 3: Merge
172
+ //
173
+ // One sonnet agent merges all completed branches into the current branch,
174
+ // resolving any conflicts and running tests to confirm everything still works.
175
+ //
176
+ // The {{BRANCHES}} and {{ISSUES}} prompt arguments are lists that the agent
177
+ // uses to know which branches to merge and which issues to close.
178
+ // -------------------------------------------------------------------------
179
+ await sandcastle.run({
180
+ hooks,
181
+ copyToSandbox,
182
+ name: "merger",
183
+ maxIterations: 10,
184
+ // Sonnet is sufficient for merge conflict resolution.
185
+ model: "claude-sonnet-4-6",
186
+ promptFile: "./.sandcastle/merge-prompt.md",
187
+ promptArgs: {
188
+ // A markdown list of branch names, one per line.
189
+ BRANCHES: completedBranches.map((b) => `- ${b}`).join("\n"),
190
+ // A markdown list of issue numbers and titles, one per line.
191
+ ISSUES: completedIssues
192
+ .map((i) => `- #${i.number}: ${i.title}`)
193
+ .join("\n"),
194
+ },
195
+ });
196
+
197
+ console.log("\nBranches merged.");
209
198
  }
210
199
 
211
200
  console.log("\nAll done.");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-hero/sandcastle",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "CLI for orchestrating AI agents in isolated sandbox environments",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",