@ai-hero/sandcastle 0.1.4 → 0.1.5

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
@@ -117,14 +117,14 @@ console.log(result.branch); // target branch name
117
117
 
118
118
  ## How it works
119
119
 
120
- Sandcastle uses a worktree-based architecture for direct, zero-sync agent execution:
120
+ Sandcastle uses a worktree-based architecture for agent execution:
121
121
 
122
- - **Worktree**: Sandcastle creates a git worktree on the host at `.sandcastle/worktrees/`. The worktree is a real checkout of your repo — no copying or bundling required.
122
+ - **Worktree**: Sandcastle creates a git worktree on the host at `.sandcastle/worktrees/`. The worktree is a just a normal `git worktree`.
123
123
  - **Bind-mount**: The worktree directory is bind-mounted into the sandbox container as the agent's working directory. The agent writes directly to the host filesystem through the mount.
124
124
  - **No sync needed**: Because the agent writes directly to the host filesystem, there are no sync-in or sync-out operations. Commits made by the agent are immediately visible on the host.
125
125
  - **Merge back**: After the run completes, the temp worktree branch is fast-forward merged back to the target branch, and the worktree is cleaned up.
126
126
 
127
- This approach eliminates the complexity of patch-based sync and ensures the agent always works with the exact repo state on the host.
127
+ From your point of view, you just run `sandcastle.run({ branch: 'foo' })`, and get a commit on branch `foo` once it's complete. All 100% local.
128
128
 
129
129
  ## Prompts
130
130
 
@@ -171,9 +171,11 @@ for (let iteration = 1; iteration <= MAX_ITERATIONS; iteration++) {
171
171
  // Single branch — merge directly without spinning up a merge agent.
172
172
  const { execSync } = await import("node:child_process");
173
173
  const branch = completedBranches[0]!;
174
+ const issue = completedIssues[0]!;
174
175
  console.log(`\nSingle branch — merging ${branch} directly.`);
175
176
  execSync(`git merge ${branch}`, { stdio: "inherit" });
176
- console.log("\nBranch merged.");
177
+ execSync(`gh issue close ${issue.number}`, { stdio: "inherit" });
178
+ console.log(`\nBranch merged and issue #${issue.number} closed.`);
177
179
  } else {
178
180
  // -------------------------------------------------------------------------
179
181
  // Phase 3: Merge
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-hero/sandcastle",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "CLI for orchestrating AI agents in isolated sandbox environments",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",