@ai-hero/sandcastle 0.1.8 → 0.2.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.
- package/README.md +151 -30
- package/dist/AgentProvider.d.ts +28 -4
- package/dist/AgentProvider.d.ts.map +1 -1
- package/dist/AgentProvider.js +193 -49
- package/dist/AgentProvider.js.map +1 -1
- package/dist/InitService.d.ts +16 -3
- package/dist/InitService.d.ts.map +1 -1
- package/dist/InitService.js +166 -19
- package/dist/InitService.js.map +1 -1
- package/dist/Orchestrator.d.ts +7 -34
- package/dist/Orchestrator.d.ts.map +1 -1
- package/dist/Orchestrator.js +32 -104
- package/dist/Orchestrator.js.map +1 -1
- package/dist/SandboxFactory.d.ts +8 -4
- package/dist/SandboxFactory.d.ts.map +1 -1
- package/dist/SandboxFactory.js +65 -26
- package/dist/SandboxFactory.js.map +1 -1
- package/dist/WorktreeManager.d.ts +5 -5
- package/dist/WorktreeManager.d.ts.map +1 -1
- package/dist/WorktreeManager.js +8 -8
- package/dist/WorktreeManager.js.map +1 -1
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +75 -27
- package/dist/cli.js.map +1 -1
- package/dist/createSandbox.d.ts +82 -0
- package/dist/createSandbox.d.ts.map +1 -0
- package/dist/createSandbox.js +192 -0
- package/dist/createSandbox.js.map +1 -0
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/run.d.ts +20 -6
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +36 -31
- package/dist/run.js.map +1 -1
- package/dist/templates/blank/.env.example +4 -0
- package/dist/templates/blank/main.ts +2 -1
- package/dist/templates/parallel-planner/.env.example +4 -0
- package/dist/templates/parallel-planner/main.ts +4 -4
- package/dist/templates/sequential-reviewer/.env.example +4 -0
- package/dist/templates/sequential-reviewer/main.ts +3 -3
- package/dist/templates/simple-loop/.env.example +4 -0
- package/dist/templates/simple-loop/main.ts +6 -5
- package/package.json +1 -1
|
@@ -59,7 +59,7 @@ for (let iteration = 1; iteration <= MAX_ITERATIONS; iteration++) {
|
|
|
59
59
|
copyToSandbox,
|
|
60
60
|
name: "implementer",
|
|
61
61
|
maxIterations: 100,
|
|
62
|
-
|
|
62
|
+
agent: sandcastle.claudeCode("claude-sonnet-4-6"),
|
|
63
63
|
promptFile: "./.sandcastle/implement-prompt.md",
|
|
64
64
|
});
|
|
65
65
|
|
|
@@ -86,14 +86,14 @@ for (let iteration = 1; iteration <= MAX_ITERATIONS; iteration++) {
|
|
|
86
86
|
copyToSandbox,
|
|
87
87
|
name: "reviewer",
|
|
88
88
|
maxIterations: 10,
|
|
89
|
-
|
|
89
|
+
agent: sandcastle.claudeCode("claude-sonnet-4-6"),
|
|
90
90
|
promptFile: "./.sandcastle/review-prompt.md",
|
|
91
91
|
// Prompt arguments substitute {{BRANCH}} in review-prompt.md before the
|
|
92
92
|
// agent sees the prompt.
|
|
93
93
|
promptArgs: {
|
|
94
94
|
BRANCH: branch,
|
|
95
95
|
},
|
|
96
|
-
branch,
|
|
96
|
+
worktree: { mode: "branch", branch },
|
|
97
97
|
});
|
|
98
98
|
|
|
99
99
|
console.log("\nReview complete.");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { run } from "@ai-hero/sandcastle";
|
|
1
|
+
import { run, claudeCode } from "@ai-hero/sandcastle";
|
|
2
2
|
|
|
3
3
|
// Simple loop: an agent that picks open GitHub issues one by one and closes them.
|
|
4
4
|
// Run this with: npx tsx .sandcastle/main.ts
|
|
@@ -8,6 +8,11 @@ await run({
|
|
|
8
8
|
// A name for this run, shown as a prefix in log output.
|
|
9
9
|
name: "worker",
|
|
10
10
|
|
|
11
|
+
// The agent provider. Pass a model string to claudeCode() — sonnet balances
|
|
12
|
+
// capability and speed for most tasks. Switch to claude-opus-4-6 for harder
|
|
13
|
+
// problems, or claude-haiku-4-5-20251001 for speed.
|
|
14
|
+
agent: claudeCode("claude-sonnet-4-6"),
|
|
15
|
+
|
|
11
16
|
// Path to the prompt file. Shell expressions inside are evaluated inside the
|
|
12
17
|
// sandbox at the start of each iteration, so the agent always sees fresh data.
|
|
13
18
|
promptFile: "./.sandcastle/prompt.md",
|
|
@@ -17,10 +22,6 @@ await run({
|
|
|
17
22
|
// per run, or set it to 1 for a single-shot mode.
|
|
18
23
|
maxIterations: 3,
|
|
19
24
|
|
|
20
|
-
// The Claude model to use. Sonnet balances capability and speed for most tasks.
|
|
21
|
-
// Switch to claude-opus-4-6 for harder problems, or claude-haiku-4-5 for speed.
|
|
22
|
-
model: "claude-sonnet-4-6",
|
|
23
|
-
|
|
24
25
|
// Copy node_modules from the host into the worktree before the sandbox
|
|
25
26
|
// starts. This avoids a full npm install from scratch on every iteration.
|
|
26
27
|
// The onSandboxReady hook still runs npm install as a safety net to handle
|