@ai-hero/sandcastle 0.4.4 → 0.4.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.
- package/README.md +48 -19
- package/dist/AgentProvider.d.ts +8 -2
- package/dist/AgentProvider.d.ts.map +1 -1
- package/dist/AgentProvider.js +34 -14
- package/dist/AgentProvider.js.map +1 -1
- package/dist/{CopyToSandbox.d.ts → CopyToWorkspace.d.ts} +2 -2
- package/dist/CopyToWorkspace.d.ts.map +1 -0
- package/dist/{CopyToSandbox.js → CopyToWorkspace.js} +2 -2
- package/dist/CopyToWorkspace.js.map +1 -0
- package/dist/ErrorHandler.d.ts.map +1 -1
- package/dist/ErrorHandler.js +3 -0
- package/dist/ErrorHandler.js.map +1 -1
- package/dist/InitService.d.ts +24 -0
- package/dist/InitService.d.ts.map +1 -1
- package/dist/InitService.js +117 -11
- package/dist/InitService.js.map +1 -1
- package/dist/Orchestrator.d.ts.map +1 -1
- package/dist/Orchestrator.js +4 -1
- package/dist/Orchestrator.js.map +1 -1
- package/dist/PodmanLifecycle.d.ts +17 -0
- package/dist/PodmanLifecycle.d.ts.map +1 -0
- package/dist/PodmanLifecycle.js +45 -0
- package/dist/PodmanLifecycle.js.map +1 -0
- package/dist/PromptArgumentSubstitution.d.ts +5 -0
- package/dist/PromptArgumentSubstitution.d.ts.map +1 -1
- package/dist/PromptArgumentSubstitution.js +22 -0
- package/dist/PromptArgumentSubstitution.js.map +1 -1
- package/dist/PromptPreprocessor.d.ts.map +1 -1
- package/dist/PromptPreprocessor.js +6 -0
- package/dist/PromptPreprocessor.js.map +1 -1
- package/dist/SandboxFactory.d.ts +3 -3
- package/dist/SandboxFactory.d.ts.map +1 -1
- package/dist/SandboxFactory.js +3 -3
- package/dist/SandboxFactory.js.map +1 -1
- package/dist/SandboxLifecycle.d.ts.map +1 -1
- package/dist/SandboxLifecycle.js +7 -7
- package/dist/SandboxLifecycle.js.map +1 -1
- package/dist/SandboxProvider.d.ts +73 -1
- package/dist/SandboxProvider.d.ts.map +1 -1
- package/dist/SandboxProvider.js.map +1 -1
- package/dist/cli.d.ts +10 -6
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +113 -113
- package/dist/cli.js.map +1 -1
- package/dist/createSandbox.d.ts +23 -1
- package/dist/createSandbox.d.ts.map +1 -1
- package/dist/createSandbox.js +63 -6
- package/dist/createSandbox.js.map +1 -1
- package/dist/errors.d.ts +9 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +3 -0
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/interactive.d.ts +52 -0
- package/dist/interactive.d.ts.map +1 -0
- package/dist/interactive.js +231 -0
- package/dist/interactive.js.map +1 -0
- package/dist/run.d.ts +1 -1
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +5 -5
- package/dist/run.js.map +1 -1
- package/dist/sandboxes/docker.d.ts.map +1 -1
- package/dist/sandboxes/docker.js +26 -1
- package/dist/sandboxes/docker.js.map +1 -1
- package/dist/sandboxes/no-sandbox.d.ts +25 -0
- package/dist/sandboxes/no-sandbox.d.ts.map +1 -0
- package/dist/sandboxes/no-sandbox.js +91 -0
- package/dist/sandboxes/no-sandbox.js.map +1 -0
- package/dist/sandboxes/podman.d.ts +10 -2
- package/dist/sandboxes/podman.d.ts.map +1 -1
- package/dist/sandboxes/podman.js +79 -11
- package/dist/sandboxes/podman.js.map +1 -1
- package/dist/templates/blank/prompt.md +1 -1
- package/dist/templates/parallel-planner/implement-prompt.md +2 -2
- package/dist/templates/parallel-planner/main.mts +12 -12
- package/dist/templates/parallel-planner/plan-prompt.md +3 -3
- package/dist/templates/parallel-planner-with-review/implement-prompt.md +2 -2
- package/dist/templates/parallel-planner-with-review/main.mts +11 -11
- package/dist/templates/parallel-planner-with-review/plan-prompt.md +3 -3
- package/dist/templates/sequential-reviewer/implement-prompt.md +2 -2
- package/dist/templates/sequential-reviewer/main.mts +3 -3
- package/dist/templates/simple-loop/main.mts +2 -2
- package/dist/templates/simple-loop/prompt.md +2 -2
- package/package.json +8 -2
- package/dist/CopyToSandbox.d.ts.map +0 -1
- package/dist/CopyToSandbox.js.map +0 -1
|
@@ -36,7 +36,7 @@ const hooks = {
|
|
|
36
36
|
// Copy node_modules from the host into the worktree before each sandbox
|
|
37
37
|
// starts. Avoids a full npm install from scratch; the hook above handles
|
|
38
38
|
// platform-specific binaries and any packages added since the last copy.
|
|
39
|
-
const
|
|
39
|
+
const copyToWorkspace = ["node_modules"];
|
|
40
40
|
|
|
41
41
|
// ---------------------------------------------------------------------------
|
|
42
42
|
// Main loop
|
|
@@ -57,7 +57,7 @@ for (let iteration = 1; iteration <= MAX_ITERATIONS; iteration++) {
|
|
|
57
57
|
// -------------------------------------------------------------------------
|
|
58
58
|
const implement = await sandcastle.run({
|
|
59
59
|
hooks,
|
|
60
|
-
|
|
60
|
+
copyToWorkspace,
|
|
61
61
|
sandbox: docker(),
|
|
62
62
|
branchStrategy: { type: "merge-to-head" },
|
|
63
63
|
name: "implementer",
|
|
@@ -86,7 +86,7 @@ for (let iteration = 1; iteration <= MAX_ITERATIONS; iteration++) {
|
|
|
86
86
|
// -------------------------------------------------------------------------
|
|
87
87
|
await sandcastle.run({
|
|
88
88
|
hooks,
|
|
89
|
-
|
|
89
|
+
copyToWorkspace,
|
|
90
90
|
sandbox: docker(),
|
|
91
91
|
branchStrategy: { type: "branch", branch },
|
|
92
92
|
name: "reviewer",
|
|
@@ -28,7 +28,7 @@ await run({
|
|
|
28
28
|
|
|
29
29
|
// Branch strategy — merge-to-head creates a temporary branch for the agent
|
|
30
30
|
// to work on, then merges the result back to HEAD when the run completes.
|
|
31
|
-
// This is required when using
|
|
31
|
+
// This is required when using copyToWorkspace, since head mode bind-mounts
|
|
32
32
|
// the host directory directly (no worktree to copy into).
|
|
33
33
|
branchStrategy: { type: "merge-to-head" },
|
|
34
34
|
|
|
@@ -36,7 +36,7 @@ await run({
|
|
|
36
36
|
// starts. This avoids a full npm install from scratch on every iteration.
|
|
37
37
|
// The onSandboxReady hook still runs npm install as a safety net to handle
|
|
38
38
|
// platform-specific binaries and any packages added since the last copy.
|
|
39
|
-
|
|
39
|
+
copyToWorkspace: ["node_modules"],
|
|
40
40
|
|
|
41
41
|
// Lifecycle hooks — commands that run inside the sandbox at specific points.
|
|
42
42
|
hooks: {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Open issues
|
|
4
4
|
|
|
5
|
-
!`
|
|
5
|
+
!`{{LIST_TASKS_COMMAND}}`
|
|
6
6
|
|
|
7
7
|
## Recent RALPH commits (last 10)
|
|
8
8
|
|
|
@@ -35,7 +35,7 @@ Pick the highest-priority open issue that is not blocked by another open issue.
|
|
|
35
35
|
- List key decisions made
|
|
36
36
|
- List files changed
|
|
37
37
|
- Note any blockers for the next iteration
|
|
38
|
-
6. **Close** — close the issue with `
|
|
38
|
+
6. **Close** — close the issue with `{{CLOSE_TASK_COMMAND}}` explaining what was done.
|
|
39
39
|
|
|
40
40
|
## Rules
|
|
41
41
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-hero/sandcastle",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.6",
|
|
4
4
|
"description": "CLI for orchestrating AI agents in isolated sandbox environments",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -25,6 +25,10 @@
|
|
|
25
25
|
"./sandboxes/daytona": {
|
|
26
26
|
"import": "./dist/sandboxes/daytona.js",
|
|
27
27
|
"types": "./dist/sandboxes/daytona.d.ts"
|
|
28
|
+
},
|
|
29
|
+
"./sandboxes/no-sandbox": {
|
|
30
|
+
"import": "./dist/sandboxes/no-sandbox.js",
|
|
31
|
+
"types": "./dist/sandboxes/no-sandbox.d.ts"
|
|
28
32
|
}
|
|
29
33
|
},
|
|
30
34
|
"bin": {
|
|
@@ -41,7 +45,9 @@
|
|
|
41
45
|
"prepare": "husky",
|
|
42
46
|
"release": "changeset publish",
|
|
43
47
|
"sandcastle": "npm run build && tsx .sandcastle/run.ts",
|
|
44
|
-
"test-
|
|
48
|
+
"test-podman": "npm run build && tsx --env-file=.sandcastle/.env .sandcastle/test-podman.ts",
|
|
49
|
+
"test-vercel": "npm run build && tsx --env-file=.sandcastle/.env .sandcastle/test-vercel.ts",
|
|
50
|
+
"test-interactive": "npm run build && tsx --env-file=.sandcastle/.env .sandcastle/test-interactive.ts"
|
|
45
51
|
},
|
|
46
52
|
"keywords": [
|
|
47
53
|
"cli",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CopyToSandbox.d.ts","sourceRoot":"","sources":["../src/CopyToSandbox.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC;;;;GAIG;AACH,eAAO,MAAM,aAAa,mGAyBtB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CopyToSandbox.js","sourceRoot":"","sources":["../src/CopyToSandbox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAC3B,KAAe,EACf,WAAmB,EACnB,YAAoB,EACQ,EAAE,CAC9B,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IAClB,KAAK,MAAM,YAAY,IAAI,KAAK,EAAE,CAAC;QACjC,MAAM,GAAG,GAAG,IAAI,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC;QAC5C,IAAI,CAA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