bamboo-agents 0.1.5-dev.30 → 0.1.5-dev.31

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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.5-dev.30
1
+ 0.1.5-dev.31
package/dist/index.js CHANGED
@@ -3037,7 +3037,7 @@ var VERSION;
3037
3037
  var init_version = __esm({
3038
3038
  "src/version.ts"() {
3039
3039
  "use strict";
3040
- VERSION = "0.1.5-dev.30";
3040
+ VERSION = "0.1.5-dev.31";
3041
3041
  }
3042
3042
  });
3043
3043
 
@@ -13281,58 +13281,16 @@ var init_magic_moment_phase = __esm({
13281
13281
  }
13282
13282
  });
13283
13283
 
13284
- // src/lib/claude-desktop.ts
13285
- import { execFile as execFile7 } from "node:child_process";
13286
- import { platform as platform3 } from "node:os";
13287
- import { promisify as promisify7 } from "node:util";
13288
- async function detectClaudeDesktop() {
13289
- const plat = platform3();
13290
- if (plat === "darwin") return await detectMacOS();
13291
- if (plat === "win32") return await detectWindows();
13292
- return { kind: "unsupported_platform" };
13293
- }
13294
- async function detectMacOS() {
13295
- try {
13296
- const { stdout } = await execFileP2(
13297
- "mdfind",
13298
- [`kMDItemCFBundleIdentifier == "${MACOS_BUNDLE_ID}"`],
13299
- { encoding: "utf8" }
13300
- );
13301
- return stdout.trim().length > 0 ? { kind: "installed" } : { kind: "missing" };
13302
- } catch {
13303
- return { kind: "missing" };
13304
- }
13305
- }
13306
- async function detectWindows() {
13307
- try {
13308
- await execFileP2(
13309
- "reg",
13310
- ["query", "HKCU\\Software\\Classes\\claude"],
13311
- { encoding: "utf8" }
13312
- );
13313
- return { kind: "installed" };
13314
- } catch {
13315
- return { kind: "missing" };
13316
- }
13317
- }
13318
- var execFileP2, MACOS_BUNDLE_ID;
13319
- var init_claude_desktop = __esm({
13320
- "src/lib/claude-desktop.ts"() {
13321
- "use strict";
13322
- execFileP2 = promisify7(execFile7);
13323
- MACOS_BUNDLE_ID = "com.anthropic.claudefordesktop";
13324
- }
13325
- });
13326
-
13327
13284
  // src/lib/phases-impl/open-phase.ts
13328
- var DOWNLOAD_URL, openSpec;
13285
+ function isCodingAgentInvocation() {
13286
+ return Boolean(process.env.CLAUDECODE || process.env.CLAUDE_CODE_ENTRYPOINT);
13287
+ }
13288
+ var openSpec;
13329
13289
  var init_open_phase = __esm({
13330
13290
  "src/lib/phases-impl/open-phase.ts"() {
13331
13291
  "use strict";
13332
13292
  init_open();
13333
13293
  init_api();
13334
- init_claude_desktop();
13335
- DOWNLOAD_URL = "https://claude.com/download";
13336
13294
  openSpec = {
13337
13295
  name: "open",
13338
13296
  async probe(ctx) {
@@ -13343,26 +13301,9 @@ var init_open_phase = __esm({
13343
13301
  reason: "Internal: openPhase probe called without a config."
13344
13302
  };
13345
13303
  }
13346
- const status = await detectClaudeDesktop();
13347
- if (status.kind === "missing") {
13348
- return {
13349
- status: "needs_action",
13350
- summary: "(Claude Desktop missing)",
13351
- reason: `Claude Desktop isn't installed. Get it at ${DOWNLOAD_URL}, then re-run.
13352
- Your workspace is cloned at ${ctx.config.repo_path}.`
13353
- };
13354
- }
13355
- if (status.kind === "unsupported_platform") {
13356
- return {
13357
- status: "needs_action",
13358
- summary: "(Linux \u2014 Claude Desktop unavailable)",
13359
- reason: `Claude Desktop isn't available on Linux yet.
13360
- Your workspace is cloned at: ${ctx.config.repo_path}`
13361
- };
13362
- }
13363
13304
  return {
13364
13305
  status: "needs_work",
13365
- summary: "launch Claude Code"
13306
+ summary: "hand off to next surface"
13366
13307
  };
13367
13308
  },
13368
13309
  async execute(ctx) {
@@ -13372,11 +13313,16 @@ var init_open_phase = __esm({
13372
13313
  reason: "Internal: openPhase.execute called without a config."
13373
13314
  };
13374
13315
  }
13375
- const url = `claude://code/new?folder=${encodeURIComponent(ctx.config.repo_path)}`;
13376
- await open_default(url);
13377
- console.log(`Opening Claude Code at ${ctx.config.repo_path}\u2026`);
13378
- console.log("(Claude Desktop will ask you to trust the folder the first time.)");
13379
- const dashboardUrl = `${apiBase()}/app`;
13316
+ if (isCodingAgentInvocation()) {
13317
+ console.log("");
13318
+ console.log(` Workspace ready at: ${ctx.config.repo_path}`);
13319
+ console.log(` To continue, run: cd ${ctx.config.repo_path}`);
13320
+ return {
13321
+ kind: "advanced",
13322
+ summary: `Workspace at ${ctx.config.repo_path}`
13323
+ };
13324
+ }
13325
+ const dashboardUrl = ctx.agentId ? `${apiBase()}/app/agents/${ctx.agentId}?tab=context&source=cli-onboarding` : `${apiBase()}/app`;
13380
13326
  console.log("");
13381
13327
  console.log(` \u2192 Continue setup at ${dashboardUrl}`);
13382
13328
  try {
@@ -13385,7 +13331,7 @@ var init_open_phase = __esm({
13385
13331
  }
13386
13332
  return {
13387
13333
  kind: "advanced",
13388
- summary: `Launching Claude Code at ${ctx.config.repo_path}`
13334
+ summary: `Continue at ${dashboardUrl}`
13389
13335
  };
13390
13336
  }
13391
13337
  };
@@ -13541,6 +13487,49 @@ var init_orchestrator = __esm({
13541
13487
  }
13542
13488
  });
13543
13489
 
13490
+ // src/lib/claude-desktop.ts
13491
+ import { execFile as execFile7 } from "node:child_process";
13492
+ import { platform as platform3 } from "node:os";
13493
+ import { promisify as promisify7 } from "node:util";
13494
+ async function detectClaudeDesktop() {
13495
+ const plat = platform3();
13496
+ if (plat === "darwin") return await detectMacOS();
13497
+ if (plat === "win32") return await detectWindows();
13498
+ return { kind: "unsupported_platform" };
13499
+ }
13500
+ async function detectMacOS() {
13501
+ try {
13502
+ const { stdout } = await execFileP2(
13503
+ "mdfind",
13504
+ [`kMDItemCFBundleIdentifier == "${MACOS_BUNDLE_ID}"`],
13505
+ { encoding: "utf8" }
13506
+ );
13507
+ return stdout.trim().length > 0 ? { kind: "installed" } : { kind: "missing" };
13508
+ } catch {
13509
+ return { kind: "missing" };
13510
+ }
13511
+ }
13512
+ async function detectWindows() {
13513
+ try {
13514
+ await execFileP2(
13515
+ "reg",
13516
+ ["query", "HKCU\\Software\\Classes\\claude"],
13517
+ { encoding: "utf8" }
13518
+ );
13519
+ return { kind: "installed" };
13520
+ } catch {
13521
+ return { kind: "missing" };
13522
+ }
13523
+ }
13524
+ var execFileP2, MACOS_BUNDLE_ID;
13525
+ var init_claude_desktop = __esm({
13526
+ "src/lib/claude-desktop.ts"() {
13527
+ "use strict";
13528
+ execFileP2 = promisify7(execFile7);
13529
+ MACOS_BUNDLE_ID = "com.anthropic.claudefordesktop";
13530
+ }
13531
+ });
13532
+
13544
13533
  // src/commands/open.ts
13545
13534
  var open_exports = {};
13546
13535
  __export(open_exports, {
@@ -13555,7 +13544,7 @@ async function runOpen() {
13555
13544
  const status = await detectClaudeDesktop();
13556
13545
  if (status.kind === "missing") {
13557
13546
  console.error(
13558
- `Claude Desktop isn't installed. Get it at ${DOWNLOAD_URL2}, then re-run \`bamboo-agents open\`.`
13547
+ `Claude Desktop isn't installed. Get it at ${DOWNLOAD_URL}, then re-run \`bamboo-agents open\`.`
13559
13548
  );
13560
13549
  console.error(`(Your workspace is cloned at ${cfg.repo_path}.)`);
13561
13550
  process.exit(1);
@@ -13572,14 +13561,14 @@ async function runOpen() {
13572
13561
  console.log(`Opening Claude Code at ${cfg.repo_path}\u2026`);
13573
13562
  console.log("(Claude Desktop will ask you to trust the folder the first time.)");
13574
13563
  }
13575
- var DOWNLOAD_URL2;
13564
+ var DOWNLOAD_URL;
13576
13565
  var init_open2 = __esm({
13577
13566
  "src/commands/open.ts"() {
13578
13567
  "use strict";
13579
13568
  init_open();
13580
13569
  init_claude_desktop();
13581
13570
  init_state();
13582
- DOWNLOAD_URL2 = "https://claude.com/download";
13571
+ DOWNLOAD_URL = "https://claude.com/download";
13583
13572
  }
13584
13573
  });
13585
13574