@beastmode-develeap/beastmode 0.1.32 → 0.1.34

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/index.js CHANGED
@@ -7250,7 +7250,13 @@ function generateComposeYaml(tag) {
7250
7250
  - ./runs:/app/runs
7251
7251
  - ./daemon/logs:/app/daemon/logs
7252
7252
  - /var/run/docker.sock:/var/run/docker.sock
7253
- - \${PROJECT_DIR:-.}:/app/project
7253
+ # PROJECT_DIR is REQUIRED \u2014 the daemon targets its git remote for
7254
+ # all merge/push/PR operations. Writing without a fallback so
7255
+ # 'docker compose up' fails loudly if the user has deleted the
7256
+ # PROJECT_DIR line from .env instead of silently mounting the
7257
+ # beatmode runtime dir (which has no source code). See
7258
+ # docs/zero-to-productive-readiness.md Gap 1.
7259
+ - \${PROJECT_DIR:?PROJECT_DIR must be set in .env \u2014 run 'beastmode init' to regenerate}:/app/project
7254
7260
  - \${HOME}/.claude:/home/appuser/.claude
7255
7261
  depends_on:
7256
7262
  board:
@@ -7632,6 +7638,44 @@ async function runImageModeInit(name, opts) {
7632
7638
  } else if (uiPassword) {
7633
7639
  success("Board UI password set");
7634
7640
  }
7641
+ let projectPath;
7642
+ if (opts.project) {
7643
+ projectPath = resolve5(opts.project);
7644
+ if (!existsSync17(projectPath)) {
7645
+ error(`--project path does not exist: ${projectPath}`);
7646
+ process.exit(1);
7647
+ }
7648
+ success(`Project path: ${projectPath}`);
7649
+ } else if (opts.yes) {
7650
+ const cwd = resolve5(".");
7651
+ if (!existsSync17(join15(cwd, ".git"))) {
7652
+ error(
7653
+ "--project is required in non-interactive mode (--yes) unless you run from inside a git repository. Pass --project <path> or cd into your project clone first."
7654
+ );
7655
+ process.exit(1);
7656
+ }
7657
+ projectPath = cwd;
7658
+ info(`No --project specified, using current directory: ${projectPath}`);
7659
+ } else {
7660
+ const answer = await inquirer.prompt([
7661
+ {
7662
+ type: "input",
7663
+ name: "project",
7664
+ message: "Path to your project (must be a git clone with an origin remote):",
7665
+ default: ".",
7666
+ validate: (input) => {
7667
+ const p = resolve5(input);
7668
+ if (!existsSync17(p)) return `Directory not found: ${p}`;
7669
+ if (!existsSync17(join15(p, ".git"))) {
7670
+ return `Not a git repo: ${p} (run 'git init' first, or pick a different path)`;
7671
+ }
7672
+ return true;
7673
+ }
7674
+ }
7675
+ ]);
7676
+ projectPath = resolve5(answer.project);
7677
+ success(`Project path: ${projectPath}`);
7678
+ }
7635
7679
  step(2, totalSteps, "Docker Registry");
7636
7680
  if (!isGhcrAuthenticated()) {
7637
7681
  if (githubToken && loginToGhcr(githubToken)) {
@@ -7666,14 +7710,21 @@ async function runImageModeInit(name, opts) {
7666
7710
  "# BeastMode environment \u2014 DO NOT COMMIT",
7667
7711
  `GITHUB_TOKEN=${githubToken}`,
7668
7712
  `BEASTMODE_UI_PASSWORD=${uiPassword}`,
7713
+ "",
7714
+ "# Project repo path \u2014 the daemon's git operations target the git remote of this path.",
7715
+ `PROJECT_DIR=${projectPath}`,
7716
+ "",
7669
7717
  "# Optional: uncomment for faster direct API calls",
7670
7718
  "# ANTHROPIC_API_KEY=sk-ant-...",
7671
- "# Project repo path (set with: beastmode project add /path/to/repo)",
7672
- "# PROJECT_DIR=/path/to/your/project",
7719
+ "",
7720
+ "# Optional: last-resort override if the daemon's auto-resolution",
7721
+ "# (git remote get-url origin) doesn't work for your setup.",
7722
+ "# The daemon handles this automatically in >99% of cases.",
7723
+ "# PROJECT_REPO=owner/repo",
7673
7724
  ""
7674
7725
  ];
7675
7726
  writeFileSync13(join15(targetDir, ".env"), envLines.join("\n"), "utf-8");
7676
- success(".env");
7727
+ success(`.env (PROJECT_DIR=${projectPath})`);
7677
7728
  for (const dir of ["data", "runs", "daemon/logs", ".beastmode", "config"]) {
7678
7729
  mkdirSync12(join15(targetDir, dir), { recursive: true });
7679
7730
  }