@ai-hero/sandcastle 0.8.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/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: `# Anthropic API key
18363
- # If you want to use your Claude subscription instead of an API key, see https://github.com/mattpocock/sandcastle/issues/191
18364
- ANTHROPIC_API_KEY=`,
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
  {
@@ -18518,26 +18520,39 @@ function getNextStepsLines(template, mainFilename, issueTracker, agent, packageM
18518
18520
  ];
18519
18521
  }
18520
18522
  if (template === "blank") {
18521
- return [
18523
+ const lines2 = [
18522
18524
  "Next steps:",
18523
- `1. Set the required env vars in .sandcastle/.env (see .sandcastle/.env.example)`,
18524
- " If you want to use your Claude subscription instead of an API key, see https://github.com/mattpocock/sandcastle/issues/191",
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
- " If you want to use your Claude subscription instead of an API key, see https://github.com/mattpocock/sandcastle/issues/191",
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.8.0" ;
18817
+ var VERSION = "0.9.0" ;
18803
18818
 
18804
18819
  // src/cli.ts
18805
18820
  var imageNameOption = Options_exports.text("image-name").pipe(