bamboo-agents 0.1.5-dev.45.7146777 → 0.1.5-dev.46.a33345f

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.45.7146777
1
+ 0.1.5-dev.46.a33345f
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.45.7146777";
3040
+ VERSION = "0.1.5-dev.46.a33345f";
3041
3041
  }
3042
3042
  });
3043
3043
 
@@ -16479,6 +16479,17 @@ async function buildCommandSchema(program3, cliVersion, commandName) {
16479
16479
  const manifest = await buildManifest(program3, cliVersion);
16480
16480
  return manifest.commands.find((c) => c.name === commandName) ?? null;
16481
16481
  }
16482
+ function resolveIntrospection(rawArgs, operands) {
16483
+ if (operands.length > 0) return null;
16484
+ if (rawArgs.includes("--describe")) return { mode: "describe" };
16485
+ const schemaIdx = rawArgs.indexOf("--schema");
16486
+ if (schemaIdx !== -1) {
16487
+ const command = rawArgs[schemaIdx + 1];
16488
+ if (!command || command.startsWith("--")) return { mode: "schema-missing" };
16489
+ return { mode: "schema", command };
16490
+ }
16491
+ return null;
16492
+ }
16482
16493
 
16483
16494
  // src/index.ts
16484
16495
  var program2 = new Command();
@@ -16578,29 +16589,29 @@ onboarding.command("status").description("Composite onboarding gate (activation
16578
16589
  await runOnboardingStatus2(options);
16579
16590
  });
16580
16591
  (async () => {
16581
- const { operands, unknown: unknownArgs } = program2.parseOptions(
16582
- process.argv.slice(2)
16583
- );
16584
16592
  const rawArgs = process.argv.slice(2);
16585
- const describeIdx = rawArgs.indexOf("--describe");
16586
- const schemaIdx = rawArgs.indexOf("--schema");
16587
- if (describeIdx !== -1) {
16593
+ const { operands } = program2.parseOptions(rawArgs);
16594
+ const introspection = resolveIntrospection(rawArgs, operands);
16595
+ if (introspection?.mode === "describe") {
16588
16596
  const manifest = await buildManifest(program2, VERSION);
16589
16597
  process.stdout.write(JSON.stringify(manifest, null, 2) + "\n");
16590
16598
  process.exit(0);
16591
16599
  }
16592
- if (schemaIdx !== -1) {
16593
- const commandName = rawArgs[schemaIdx + 1];
16594
- if (!commandName || commandName.startsWith("--")) {
16595
- process.stderr.write(
16596
- "bamboo-agents: --schema requires a command name, e.g. --schema history\n"
16597
- );
16598
- process.exit(1);
16599
- }
16600
- const entry = await buildCommandSchema(program2, VERSION, commandName);
16600
+ if (introspection?.mode === "schema-missing") {
16601
+ process.stderr.write(
16602
+ "bamboo-agents: --schema requires a command name, e.g. --schema history\n"
16603
+ );
16604
+ process.exit(1);
16605
+ }
16606
+ if (introspection?.mode === "schema") {
16607
+ const entry = await buildCommandSchema(
16608
+ program2,
16609
+ VERSION,
16610
+ introspection.command
16611
+ );
16601
16612
  if (entry === null) {
16602
16613
  process.stderr.write(
16603
- `bamboo-agents: unknown command '${commandName}'. Run --describe for the full list.
16614
+ `bamboo-agents: unknown command '${introspection.command}'. Run --describe for the full list.
16604
16615
  `
16605
16616
  );
16606
16617
  process.exit(1);