@tablation/crew 0.75.2 → 0.75.4

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.
Files changed (2) hide show
  1. package/dist/cli.js +21 -15
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -2571,8 +2571,8 @@ function parseOneRoute(c, where, file, base, stateDir, raw, missing, crewHome, t
2571
2571
  }
2572
2572
  const hasRepos = Object.keys(repoDirs).length > 0;
2573
2573
  const reposBasePath = expand(String(c?.reposBasePath ?? raw.ship?.reposBasePath ?? DEFAULT_REPOS_BASE_PATH), base);
2574
- const dirIsCloneBase = !c?.dir && !hasRepos && c?.repos && typeof c.repos === "object" && !Array.isArray(c.repos);
2575
- const dir = c?.dir ? expand(String(c.dir), base) : hasRepos ? Object.values(repoDirs)[0] : dirIsCloneBase ? join9(reposBasePath, splitRoute(route)[0]) : missing.req(void 0, `${where}.dir (or ${where}.repos)`) ?? "";
2574
+ const dirIsCloneBase = !c?.dir && !hasRepos && !Array.isArray(c?.repos);
2575
+ const dir = c?.dir ? expand(String(c.dir), base) : hasRepos ? Object.values(repoDirs)[0] : dirIsCloneBase ? join9(reposBasePath, splitRoute(route)[0]) : "";
2576
2576
  const weight = c?.weight === void 0 ? void 0 : Number(c.weight);
2577
2577
  if (weight !== void 0 && !(Number.isFinite(weight) && weight > 0)) {
2578
2578
  missing.add(`${where}.weight must be a positive number (got "${c?.weight}")`);
@@ -10846,7 +10846,7 @@ function renderShipBlock(a) {
10846
10846
  agent: { bin: a.agentBin },
10847
10847
  ...a.extraPath ? { extraPath: a.extraPath } : {}
10848
10848
  }
10849
- });
10849
+ }, { lineWidth: 0 });
10850
10850
  }
10851
10851
  function renderFullConfig(a, routeBlock) {
10852
10852
  return `${renderShipBlock(a)}
@@ -13967,23 +13967,18 @@ async function createOperatorRow(o, found) {
13967
13967
  }
13968
13968
  }
13969
13969
  function renderConnection(d, route, dir, opts = {}) {
13970
- const apiKeyFileLine = opts.keychainBacked ? ` # apiKey: resolved automatically from the OS keychain (crew connect) \u2014 no apiKeyFile needed` : opts.apiKeyFile ? ` apiKeyFile: "${opts.apiKeyFile}"` : ` apiKeyFile: "REPLACE \u2014 a file holding this workspace's key"`;
13970
+ const apiKeyFileLine = opts.keychainBacked ? "" : opts.apiKeyFile ? ` apiKeyFile: "${opts.apiKeyFile}"` : ` apiKeyFile: "REPLACE \u2014 a file holding this workspace's key"`;
13971
13971
  const apiKeyVarLine = opts.keychainBacked ? "" : opts.apiKeyVar ? `
13972
13972
  apiKeyVar: ${opts.apiKeyVar}` : `
13973
13973
  apiKeyVar: REPLACE_KEY_VAR`;
13974
+ const baseUrlLine = opts.baseUrl ? opts.baseUrl.replace(/\/+$/, "") === DEFAULT_BASE_URL ? "" : ` baseUrl: "${opts.baseUrl}"
13975
+ ` : ' baseUrl: "REPLACE \u2014 the same baseUrl as your other routes"\n';
13976
+ const keyLines = [apiKeyFileLine, apiKeyVarLine.replace(/^\n/, "")].filter(Boolean).join("\n");
13974
13977
  return ` - route: ${route}
13975
- enabled: false # arm it deliberately, once doctor is green
13978
+ enabled: false # set to true once \`crew doctor\` is green
13976
13979
  ${opts.area ? ` area: "${opts.area}"
13977
- ` : ""} ${dir === null ? "repos: {} # `crew repos clone` / `crew repos add` fill this in" : `dir: "${dir}"`}
13978
- # worktreePrefix: omitted \u2014 each repo derives its own from its checkout's
13979
- # directory name (ISSUE-400). Only set this if every repo this route
13980
- # serves genuinely wants the SAME prefix, which is rare once an area has
13981
- # more than one repo.
13982
- # What a host must be to build this \u2014 unix, macos, linux, or windows \u2014
13983
- # belongs in each repo's own .crew.yaml, not here (see docs/REPO_SPEC.md).
13984
- baseUrl: ${opts.baseUrl ? `"${opts.baseUrl}"` : '"REPLACE \u2014 the same baseUrl as your other routes"'}
13985
- ${opts.hostPassengers ? " hostPassengers: true\n" : ""}${apiKeyFileLine}${apiKeyVarLine}
13986
- `;
13980
+ ` : ""}${dir === null ? "" : ` dir: "${dir}"
13981
+ `}${baseUrlLine}${opts.hostPassengers ? " hostPassengers: true\n" : ""}${keyLines ? keyLines + "\n" : ""}`;
13987
13982
  }
13988
13983
 
13989
13984
  // src/cli.ts
@@ -19561,6 +19556,17 @@ Signed in as ${result.identity.email} \u2014 minted an API key in workspace "${r
19561
19556
  if (!wroteConfig) process.stderr.write(`(${wizard.configPath} appeared while connecting \u2014 leaving it alone)
19562
19557
  `);
19563
19558
  }
19559
+ if (!dryRun) {
19560
+ if (wroteConfig) {
19561
+ connectEvents.emit("config", `wrote ${wizard.configPath}`, { written: true, path: wizard.configPath });
19562
+ } else if (wizard && writeFirstRun) {
19563
+ connectEvents.emit("config", `${wizard.configPath} appeared while connecting; left alone`, { written: false, path: wizard.configPath, reason: "appeared while connecting" });
19564
+ } else if (wizard) {
19565
+ connectEvents.emit("config", `no key file or keychain entry to name; ${wizard.configPath} not written`, { written: false, path: wizard.configPath, reason: "no-key" });
19566
+ } else {
19567
+ connectEvents.emit("config", `${cfg.configFile} already exists; left alone`, { written: false, path: cfg.configFile, reason: "exists" });
19568
+ }
19569
+ }
19564
19570
  if (!wroteConfig) (connectEvents.json ? process.stderr : process.stdout).write(routeBlock);
19565
19571
  if (!flag("no-mcp") && apiKey) {
19566
19572
  const replace = value("mcp") === "replace";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tablation/crew",
3
- "version": "0.75.2",
3
+ "version": "0.75.4",
4
4
  "description": "A standing team of headless agents that picks work off a Tablation board, does it on a machine you control, and reports back.",
5
5
  "type": "module",
6
6
  "license": "MIT",