@ai-hero/sandcastle 0.7.0 → 0.9.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 +17 -13
- package/dist/index.d.ts +17 -0
- package/dist/index.js +92 -19
- package/dist/index.js.map +1 -1
- package/dist/main.js +28 -13
- package/dist/main.js.map +1 -1
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -18359,9 +18359,11 @@ var AGENT_REGISTRY = [
|
|
|
18359
18359
|
defaultModel: "claude-opus-4-7",
|
|
18360
18360
|
factoryImport: "claudeCode",
|
|
18361
18361
|
dockerfileTemplate: CLAUDE_CODE_DOCKERFILE,
|
|
18362
|
-
envExample: `#
|
|
18363
|
-
#
|
|
18364
|
-
|
|
18362
|
+
envExample: `# Claude Code OAuth token \u2014 get one by running \`claude setup-token\` on your host.
|
|
18363
|
+
# Lets the agent use your Claude subscription instead of an API key.
|
|
18364
|
+
CLAUDE_CODE_OAUTH_TOKEN=
|
|
18365
|
+
# Or use an Anthropic API key instead \u2014 uncomment and fill in:
|
|
18366
|
+
# ANTHROPIC_API_KEY=`,
|
|
18365
18367
|
setupCommand: `claude "$(cat ${SETUP_ISSUE_TRACKER_PATH})"`
|
|
18366
18368
|
},
|
|
18367
18369
|
{
|
|
@@ -18377,7 +18379,7 @@ ANTHROPIC_API_KEY=`,
|
|
|
18377
18379
|
{
|
|
18378
18380
|
name: "codex",
|
|
18379
18381
|
label: "Codex",
|
|
18380
|
-
defaultModel: "gpt-5.4
|
|
18382
|
+
defaultModel: "gpt-5.4",
|
|
18381
18383
|
factoryImport: "codex",
|
|
18382
18384
|
dockerfileTemplate: CODEX_DOCKERFILE,
|
|
18383
18385
|
envExample: `# OpenAI API key
|
|
@@ -18403,7 +18405,7 @@ CURSOR_API_KEY=`,
|
|
|
18403
18405
|
dockerfileTemplate: OPENCODE_DOCKERFILE,
|
|
18404
18406
|
envExample: `# OpenCode API key
|
|
18405
18407
|
OPENCODE_API_KEY=`,
|
|
18406
|
-
setupCommand: `opencode
|
|
18408
|
+
setupCommand: `opencode --prompt "$(cat ${SETUP_ISSUE_TRACKER_PATH})"`
|
|
18407
18409
|
},
|
|
18408
18410
|
{
|
|
18409
18411
|
name: "copilot",
|
|
@@ -18518,26 +18520,39 @@ function getNextStepsLines(template, mainFilename, issueTracker, agent, packageM
|
|
|
18518
18520
|
];
|
|
18519
18521
|
}
|
|
18520
18522
|
if (template === "blank") {
|
|
18521
|
-
|
|
18523
|
+
const lines2 = [
|
|
18522
18524
|
"Next steps:",
|
|
18523
|
-
`1. Set the required env vars in .sandcastle/.env (see .sandcastle/.env.example)
|
|
18524
|
-
|
|
18525
|
+
`1. Set the required env vars in .sandcastle/.env (see .sandcastle/.env.example)`
|
|
18526
|
+
];
|
|
18527
|
+
if (agent.name === "claude-code") {
|
|
18528
|
+
lines2.push(
|
|
18529
|
+
" To use your Claude subscription instead of an API key, run `claude setup-token` on your host and paste the result into CLAUDE_CODE_OAUTH_TOKEN."
|
|
18530
|
+
);
|
|
18531
|
+
}
|
|
18532
|
+
lines2.push(
|
|
18525
18533
|
"2. Read and customize .sandcastle/prompt.md to describe what you want the agent to do",
|
|
18526
18534
|
`3. Customize .sandcastle/${mainFilename} \u2014 it uses the JS API (\`run()\`) to control how the agent runs`,
|
|
18527
18535
|
`4. Add "sandcastle": "npx tsx .sandcastle/${mainFilename}" to your package.json scripts`,
|
|
18528
18536
|
"5. Run `npm run sandcastle` to start the agent"
|
|
18529
|
-
|
|
18537
|
+
);
|
|
18538
|
+
return lines2;
|
|
18530
18539
|
} else {
|
|
18531
18540
|
const hasReviewer = template.includes("review");
|
|
18532
18541
|
const usesPlanSchema = getTemplateDependencies(template).includes("zod");
|
|
18533
18542
|
let step = 1;
|
|
18534
18543
|
const lines2 = [
|
|
18535
18544
|
"Next steps:",
|
|
18536
|
-
`${step++}. Set the required env vars in .sandcastle/.env (see .sandcastle/.env.example)
|
|
18537
|
-
|
|
18545
|
+
`${step++}. Set the required env vars in .sandcastle/.env (see .sandcastle/.env.example)`
|
|
18546
|
+
];
|
|
18547
|
+
if (agent.name === "claude-code") {
|
|
18548
|
+
lines2.push(
|
|
18549
|
+
" To use your Claude subscription instead of an API key, run `claude setup-token` on your host and paste the result into CLAUDE_CODE_OAUTH_TOKEN."
|
|
18550
|
+
);
|
|
18551
|
+
}
|
|
18552
|
+
lines2.push(
|
|
18538
18553
|
`${step++}. Add "sandcastle": "npx tsx .sandcastle/${mainFilename}" to your package.json scripts`,
|
|
18539
18554
|
`${step++}. Templates use \`copyToWorktree: ["node_modules"]\` to copy your host node_modules into the sandbox for fast startup \u2014 the \`npm install\` in the onSandboxReady hook is a safety net for platform-specific binaries. Adjust both if you use a different package manager`
|
|
18540
|
-
|
|
18555
|
+
);
|
|
18541
18556
|
if (usesPlanSchema) {
|
|
18542
18557
|
lines2.push(
|
|
18543
18558
|
`${step++}. Install a schema validator for the planner's \`<plan>\` output \u2014 the template uses Zod (\`${addDependencyCommand(packageManager, "zod")}\`), but Valibot, ArkType, or any Standard Schema library works (https://standardschema.dev)`
|
|
@@ -18799,7 +18814,7 @@ var scaffold = (repoDir, options3) => Effect_exports.gen(function* () {
|
|
|
18799
18814
|
}
|
|
18800
18815
|
return { mainFilename };
|
|
18801
18816
|
});
|
|
18802
|
-
var VERSION = "0.
|
|
18817
|
+
var VERSION = "0.9.0" ;
|
|
18803
18818
|
|
|
18804
18819
|
// src/cli.ts
|
|
18805
18820
|
var imageNameOption = Options_exports.text("image-name").pipe(
|