bamboo-agents 0.1.5-dev.43.f469566 → 0.1.5-dev.44.fc84729

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.43.f469566
1
+ 0.1.5-dev.44.fc84729
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.43.f469566";
3040
+ VERSION = "0.1.5-dev.44.fc84729";
3041
3041
  }
3042
3042
  });
3043
3043
 
@@ -7147,6 +7147,160 @@ var init_zod = __esm({
7147
7147
  }
7148
7148
  });
7149
7149
 
7150
+ // ../../src/lib/api-contracts/cli/history.ts
7151
+ var history_exports = {};
7152
+ __export(history_exports, {
7153
+ HistoryEntrySchema: () => HistoryEntrySchema,
7154
+ HistoryResponseSchema: () => HistoryResponseSchema
7155
+ });
7156
+ var HistoryEntrySchema, HistoryResponseSchema;
7157
+ var init_history = __esm({
7158
+ "../../src/lib/api-contracts/cli/history.ts"() {
7159
+ init_zod();
7160
+ HistoryEntrySchema = external_exports.object({
7161
+ tool_name: external_exports.string().nullable(),
7162
+ status: external_exports.string(),
7163
+ timestamp: external_exports.string(),
7164
+ duration_ms: external_exports.number().nullable()
7165
+ });
7166
+ HistoryResponseSchema = external_exports.object({
7167
+ entries: external_exports.array(HistoryEntrySchema),
7168
+ count: external_exports.number()
7169
+ });
7170
+ }
7171
+ });
7172
+
7173
+ // ../../src/lib/api-contracts/cli/changes.ts
7174
+ var changes_exports = {};
7175
+ __export(changes_exports, {
7176
+ ChangeEntrySchema: () => ChangeEntrySchema,
7177
+ ChangesResponseSchema: () => ChangesResponseSchema
7178
+ });
7179
+ var ChangeEntrySchema, ChangesResponseSchema;
7180
+ var init_changes = __esm({
7181
+ "../../src/lib/api-contracts/cli/changes.ts"() {
7182
+ init_zod();
7183
+ ChangeEntrySchema = external_exports.object({
7184
+ id: external_exports.string(),
7185
+ tool_name: external_exports.string().nullable(),
7186
+ action: external_exports.string().nullable(),
7187
+ entity_type: external_exports.string().nullable(),
7188
+ entity_id: external_exports.string().nullable(),
7189
+ entity_name: external_exports.string().nullable(),
7190
+ agent: external_exports.string().nullable(),
7191
+ brand_id: external_exports.string().nullable(),
7192
+ timestamp: external_exports.string()
7193
+ });
7194
+ ChangesResponseSchema = external_exports.object({
7195
+ entries: external_exports.array(ChangeEntrySchema),
7196
+ count: external_exports.number()
7197
+ });
7198
+ }
7199
+ });
7200
+
7201
+ // ../../src/lib/api-contracts/cli/knowledge-slots.ts
7202
+ var knowledge_slots_exports = {};
7203
+ __export(knowledge_slots_exports, {
7204
+ KnowledgeDimensionSchema: () => KnowledgeDimensionSchema,
7205
+ KnowledgeSlotKindSchema: () => KnowledgeSlotKindSchema,
7206
+ KnowledgeSlotsResponseSchema: () => KnowledgeSlotsResponseSchema
7207
+ });
7208
+ var KnowledgeSlotKindSchema, KnowledgeDimensionSchema, KnowledgeSlotsResponseSchema;
7209
+ var init_knowledge_slots = __esm({
7210
+ "../../src/lib/api-contracts/cli/knowledge-slots.ts"() {
7211
+ init_zod();
7212
+ KnowledgeSlotKindSchema = external_exports.object({
7213
+ /** Directory taxonomy: knowledge | memory | context | skills | scheduled_tasks | instructions | identity */
7214
+ kind: external_exports.string(),
7215
+ /** Scope this kind may be written at. */
7216
+ scope: external_exports.enum(["org", "brand", "agent"]),
7217
+ /**
7218
+ * Example workspace-relative path, derived from the server's
7219
+ * `resolveRepoPathByKind`. Uses `{brand}` / `{agent}` placeholders the
7220
+ * skill substitutes from its workspace config. `example.md` stands in
7221
+ * for the caller-chosen filename.
7222
+ */
7223
+ example_path: external_exports.string(),
7224
+ /**
7225
+ * True when the filename is pinned by the server (instructions/identity)
7226
+ * and the caller's filename is ignored.
7227
+ */
7228
+ filename_pinned: external_exports.boolean()
7229
+ });
7230
+ KnowledgeDimensionSchema = external_exports.object({
7231
+ key: external_exports.string(),
7232
+ label: external_exports.string(),
7233
+ tags: external_exports.array(external_exports.string())
7234
+ });
7235
+ KnowledgeSlotsResponseSchema = external_exports.object({
7236
+ /** Spec §3 filename regex (source string) the skill validates against before writing. */
7237
+ filename_regex: external_exports.string(),
7238
+ /** Every (kind × allowed-scope) with its canonical path pattern. */
7239
+ kinds: external_exports.array(KnowledgeSlotKindSchema),
7240
+ /** The knowledge dimensions, for metadata tagging. */
7241
+ dimensions: external_exports.array(KnowledgeDimensionSchema)
7242
+ });
7243
+ }
7244
+ });
7245
+
7246
+ // ../../src/lib/api-contracts/cli/knowledge-save.ts
7247
+ var knowledge_save_exports = {};
7248
+ __export(knowledge_save_exports, {
7249
+ KnowledgeSaveRequestSchema: () => KnowledgeSaveRequestSchema,
7250
+ KnowledgeSaveResponseSchema: () => KnowledgeSaveResponseSchema
7251
+ });
7252
+ var KnowledgeSaveRequestSchema, KnowledgeSaveResponseSchema;
7253
+ var init_knowledge_save = __esm({
7254
+ "../../src/lib/api-contracts/cli/knowledge-save.ts"() {
7255
+ init_zod();
7256
+ KnowledgeSaveRequestSchema = external_exports.object({
7257
+ /** Canonical repo path, e.g. `brands/acme/knowledge/competitors.md`. Derived by the caller from `knowledge slots`. */
7258
+ path: external_exports.string().min(1).max(512),
7259
+ /** UTF-8 file content. Ignored when `delete` is true. */
7260
+ content: external_exports.string(),
7261
+ /** Emit as a git-level deletion instead of a content write. */
7262
+ delete: external_exports.boolean().optional(),
7263
+ /** Human-readable summary surfaced in the PR body / commit trailer. */
7264
+ intent: external_exports.string().max(500).optional()
7265
+ });
7266
+ KnowledgeSaveResponseSchema = external_exports.object({
7267
+ /** Routing outcome from `executeKnowledgeWrite`. */
7268
+ routed: external_exports.enum(["auto", "queued", "submitted", "rejected", "noop"]),
7269
+ classification: external_exports.enum(["self_only", "cross_scope", "forbidden"]),
7270
+ /** Present when a PR was opened (queued/submitted, or auto via queue-PR). */
7271
+ pr_url: external_exports.string().optional(),
7272
+ pr_number: external_exports.number().optional(),
7273
+ /** Present on `rejected` / `noop` — short machine-friendly reason. */
7274
+ reason: external_exports.string().optional()
7275
+ });
7276
+ }
7277
+ });
7278
+
7279
+ // ../../src/lib/api-contracts/cli/onboarding-status.ts
7280
+ var onboarding_status_exports = {};
7281
+ __export(onboarding_status_exports, {
7282
+ OnboardingStatusResponseSchema: () => OnboardingStatusResponseSchema
7283
+ });
7284
+ var OnboardingStatusResponseSchema;
7285
+ var init_onboarding_status = __esm({
7286
+ "../../src/lib/api-contracts/cli/onboarding-status.ts"() {
7287
+ init_zod();
7288
+ OnboardingStatusResponseSchema = external_exports.object({
7289
+ composite_gate: external_exports.object({
7290
+ passed: external_exports.boolean(),
7291
+ knowledge_ok: external_exports.boolean(),
7292
+ activation_ok: external_exports.boolean()
7293
+ }),
7294
+ health: external_exports.object({
7295
+ grade: external_exports.enum(["A", "B", "C", "D", "F"]).nullable(),
7296
+ score: external_exports.number().nullable()
7297
+ }),
7298
+ /** Raw `compute_onboarding_status` payload (shape owned by the RPC). */
7299
+ milestones: external_exports.unknown().nullable()
7300
+ });
7301
+ }
7302
+ });
7303
+
7150
7304
  // src/lib/paths.ts
7151
7305
  import { homedir } from "node:os";
7152
7306
  import { join } from "node:path";
@@ -11980,135 +12134,6 @@ var init_agents = __esm({
11980
12134
  }
11981
12135
  });
11982
12136
 
11983
- // ../../src/lib/api-contracts/cli/knowledge-slots.ts
11984
- var KnowledgeSlotKindSchema, KnowledgeDimensionSchema, KnowledgeSlotsResponseSchema;
11985
- var init_knowledge_slots = __esm({
11986
- "../../src/lib/api-contracts/cli/knowledge-slots.ts"() {
11987
- init_zod();
11988
- KnowledgeSlotKindSchema = external_exports.object({
11989
- /** Directory taxonomy: knowledge | memory | context | skills | scheduled_tasks | instructions | identity */
11990
- kind: external_exports.string(),
11991
- /** Scope this kind may be written at. */
11992
- scope: external_exports.enum(["org", "brand", "agent"]),
11993
- /**
11994
- * Example workspace-relative path, derived from the server's
11995
- * `resolveRepoPathByKind`. Uses `{brand}` / `{agent}` placeholders the
11996
- * skill substitutes from its workspace config. `example.md` stands in
11997
- * for the caller-chosen filename.
11998
- */
11999
- example_path: external_exports.string(),
12000
- /**
12001
- * True when the filename is pinned by the server (instructions/identity)
12002
- * and the caller's filename is ignored.
12003
- */
12004
- filename_pinned: external_exports.boolean()
12005
- });
12006
- KnowledgeDimensionSchema = external_exports.object({
12007
- key: external_exports.string(),
12008
- label: external_exports.string(),
12009
- tags: external_exports.array(external_exports.string())
12010
- });
12011
- KnowledgeSlotsResponseSchema = external_exports.object({
12012
- /** Spec §3 filename regex (source string) the skill validates against before writing. */
12013
- filename_regex: external_exports.string(),
12014
- /** Every (kind × allowed-scope) with its canonical path pattern. */
12015
- kinds: external_exports.array(KnowledgeSlotKindSchema),
12016
- /** The knowledge dimensions, for metadata tagging. */
12017
- dimensions: external_exports.array(KnowledgeDimensionSchema)
12018
- });
12019
- }
12020
- });
12021
-
12022
- // ../../src/lib/api-contracts/cli/knowledge-save.ts
12023
- var KnowledgeSaveRequestSchema, KnowledgeSaveResponseSchema;
12024
- var init_knowledge_save = __esm({
12025
- "../../src/lib/api-contracts/cli/knowledge-save.ts"() {
12026
- init_zod();
12027
- KnowledgeSaveRequestSchema = external_exports.object({
12028
- /** Canonical repo path, e.g. `brands/acme/knowledge/competitors.md`. Derived by the caller from `knowledge slots`. */
12029
- path: external_exports.string().min(1).max(512),
12030
- /** UTF-8 file content. Ignored when `delete` is true. */
12031
- content: external_exports.string(),
12032
- /** Emit as a git-level deletion instead of a content write. */
12033
- delete: external_exports.boolean().optional(),
12034
- /** Human-readable summary surfaced in the PR body / commit trailer. */
12035
- intent: external_exports.string().max(500).optional()
12036
- });
12037
- KnowledgeSaveResponseSchema = external_exports.object({
12038
- /** Routing outcome from `executeKnowledgeWrite`. */
12039
- routed: external_exports.enum(["auto", "queued", "submitted", "rejected", "noop"]),
12040
- classification: external_exports.enum(["self_only", "cross_scope", "forbidden"]),
12041
- /** Present when a PR was opened (queued/submitted, or auto via queue-PR). */
12042
- pr_url: external_exports.string().optional(),
12043
- pr_number: external_exports.number().optional(),
12044
- /** Present on `rejected` / `noop` — short machine-friendly reason. */
12045
- reason: external_exports.string().optional()
12046
- });
12047
- }
12048
- });
12049
-
12050
- // ../../src/lib/api-contracts/cli/history.ts
12051
- var HistoryEntrySchema, HistoryResponseSchema;
12052
- var init_history = __esm({
12053
- "../../src/lib/api-contracts/cli/history.ts"() {
12054
- init_zod();
12055
- HistoryEntrySchema = external_exports.object({
12056
- tool_name: external_exports.string().nullable(),
12057
- status: external_exports.string(),
12058
- timestamp: external_exports.string(),
12059
- duration_ms: external_exports.number().nullable()
12060
- });
12061
- HistoryResponseSchema = external_exports.object({
12062
- entries: external_exports.array(HistoryEntrySchema),
12063
- count: external_exports.number()
12064
- });
12065
- }
12066
- });
12067
-
12068
- // ../../src/lib/api-contracts/cli/changes.ts
12069
- var ChangeEntrySchema, ChangesResponseSchema;
12070
- var init_changes = __esm({
12071
- "../../src/lib/api-contracts/cli/changes.ts"() {
12072
- init_zod();
12073
- ChangeEntrySchema = external_exports.object({
12074
- id: external_exports.string(),
12075
- tool_name: external_exports.string().nullable(),
12076
- action: external_exports.string().nullable(),
12077
- entity_type: external_exports.string().nullable(),
12078
- entity_id: external_exports.string().nullable(),
12079
- entity_name: external_exports.string().nullable(),
12080
- agent: external_exports.string().nullable(),
12081
- brand_id: external_exports.string().nullable(),
12082
- timestamp: external_exports.string()
12083
- });
12084
- ChangesResponseSchema = external_exports.object({
12085
- entries: external_exports.array(ChangeEntrySchema),
12086
- count: external_exports.number()
12087
- });
12088
- }
12089
- });
12090
-
12091
- // ../../src/lib/api-contracts/cli/onboarding-status.ts
12092
- var OnboardingStatusResponseSchema;
12093
- var init_onboarding_status = __esm({
12094
- "../../src/lib/api-contracts/cli/onboarding-status.ts"() {
12095
- init_zod();
12096
- OnboardingStatusResponseSchema = external_exports.object({
12097
- composite_gate: external_exports.object({
12098
- passed: external_exports.boolean(),
12099
- knowledge_ok: external_exports.boolean(),
12100
- activation_ok: external_exports.boolean()
12101
- }),
12102
- health: external_exports.object({
12103
- grade: external_exports.enum(["A", "B", "C", "D", "F"]).nullable(),
12104
- score: external_exports.number().nullable()
12105
- }),
12106
- /** Raw `compute_onboarding_status` payload (shape owned by the RPC). */
12107
- milestones: external_exports.unknown().nullable()
12108
- });
12109
- }
12110
- });
12111
-
12112
12137
  // ../../src/lib/api-contracts/cli/context-health.ts
12113
12138
  var ScopeKindSchema, ScopeSchema, CriterionMetricsSchema, StatusSchema, CriterionContributionSchema, CriterionResultSchema, BucketScoresSchema, ResolvedScopeSchema, GapsSchema, ContextHealthResponseSchema;
12114
12139
  var init_context_health = __esm({
@@ -15888,8 +15913,8 @@ var init_knowledge = __esm({
15888
15913
  });
15889
15914
 
15890
15915
  // src/commands/history.ts
15891
- var history_exports = {};
15892
- __export(history_exports, {
15916
+ var history_exports2 = {};
15917
+ __export(history_exports2, {
15893
15918
  runChanges: () => runChanges,
15894
15919
  runHistory: () => runHistory
15895
15920
  });
@@ -16107,8 +16132,152 @@ var {
16107
16132
 
16108
16133
  // src/index.ts
16109
16134
  init_version();
16135
+
16136
+ // src/lib/describe.ts
16137
+ function zodToJsonSchema(schema) {
16138
+ const s = schema;
16139
+ const typeName = s?._def?.typeName ?? "";
16140
+ switch (typeName) {
16141
+ case "ZodString":
16142
+ return { type: "string" };
16143
+ case "ZodNumber":
16144
+ return { type: "number" };
16145
+ case "ZodBoolean":
16146
+ return { type: "boolean" };
16147
+ case "ZodUnknown":
16148
+ case "ZodAny":
16149
+ return {};
16150
+ case "ZodEnum": {
16151
+ const values = s._def.values;
16152
+ return { type: "string", enum: values };
16153
+ }
16154
+ case "ZodLiteral":
16155
+ return { const: s._def.value };
16156
+ case "ZodNull":
16157
+ return { type: "null" };
16158
+ case "ZodNullable": {
16159
+ const inner = zodToJsonSchema(s._def.innerType);
16160
+ if (!inner) return null;
16161
+ return { anyOf: [inner, { type: "null" }] };
16162
+ }
16163
+ case "ZodOptional": {
16164
+ return zodToJsonSchema(s._def.innerType);
16165
+ }
16166
+ case "ZodArray": {
16167
+ const items = zodToJsonSchema(s._def.type);
16168
+ return items ? { type: "array", items } : { type: "array" };
16169
+ }
16170
+ case "ZodObject": {
16171
+ const shape = s._def.shape();
16172
+ const properties = {};
16173
+ const required = [];
16174
+ for (const [key, value] of Object.entries(shape)) {
16175
+ const fieldSchema = zodToJsonSchema(value);
16176
+ if (fieldSchema !== null) {
16177
+ properties[key] = fieldSchema;
16178
+ }
16179
+ const fieldTypeName = value?._def?.typeName ?? "";
16180
+ if (fieldTypeName !== "ZodOptional") {
16181
+ required.push(key);
16182
+ }
16183
+ }
16184
+ const result = { type: "object", properties };
16185
+ if (required.length > 0) {
16186
+ result.required = required;
16187
+ }
16188
+ return result;
16189
+ }
16190
+ default:
16191
+ return null;
16192
+ }
16193
+ }
16194
+ async function loadOutputSchemas() {
16195
+ const map = /* @__PURE__ */ new Map();
16196
+ try {
16197
+ const [history, changes, knowledgeSlots, knowledgeSave, onboarding2] = await Promise.all([
16198
+ Promise.resolve().then(() => (init_history(), history_exports)).catch(() => null),
16199
+ Promise.resolve().then(() => (init_changes(), changes_exports)).catch(() => null),
16200
+ Promise.resolve().then(() => (init_knowledge_slots(), knowledge_slots_exports)).catch(() => null),
16201
+ Promise.resolve().then(() => (init_knowledge_save(), knowledge_save_exports)).catch(() => null),
16202
+ Promise.resolve().then(() => (init_onboarding_status(), onboarding_status_exports)).catch(() => null)
16203
+ ]);
16204
+ if (history?.HistoryResponseSchema) {
16205
+ const s = zodToJsonSchema(history.HistoryResponseSchema);
16206
+ if (s) map.set("history", s);
16207
+ }
16208
+ if (changes?.ChangesResponseSchema) {
16209
+ const s = zodToJsonSchema(changes.ChangesResponseSchema);
16210
+ if (s) map.set("changes", s);
16211
+ }
16212
+ if (knowledgeSlots?.KnowledgeSlotsResponseSchema) {
16213
+ const s = zodToJsonSchema(knowledgeSlots.KnowledgeSlotsResponseSchema);
16214
+ if (s) map.set("knowledge slots", s);
16215
+ }
16216
+ if (knowledgeSave?.KnowledgeSaveResponseSchema) {
16217
+ const s = zodToJsonSchema(knowledgeSave.KnowledgeSaveResponseSchema);
16218
+ if (s) map.set("knowledge save", s);
16219
+ }
16220
+ if (onboarding2?.OnboardingStatusResponseSchema) {
16221
+ const s = zodToJsonSchema(onboarding2.OnboardingStatusResponseSchema);
16222
+ if (s) map.set("onboarding status", s);
16223
+ }
16224
+ } catch {
16225
+ }
16226
+ return map;
16227
+ }
16228
+ function serializeOption(opt) {
16229
+ const mandatory = opt.mandatory;
16230
+ return {
16231
+ flag: opt.flags,
16232
+ description: opt.description ?? "",
16233
+ required: mandatory === true,
16234
+ type: opt.required || opt.optional ? "string" : "boolean"
16235
+ };
16236
+ }
16237
+ function serializeArgument(arg) {
16238
+ return {
16239
+ name: arg.name(),
16240
+ description: arg.description ?? "",
16241
+ required: arg.required,
16242
+ variadic: arg.variadic
16243
+ };
16244
+ }
16245
+ function flattenCommands(cmd, prefix) {
16246
+ const results = [];
16247
+ for (const child of cmd.commands) {
16248
+ const fullName = prefix ? `${prefix} ${child.name()}` : child.name();
16249
+ results.push({ fullName, cmd: child });
16250
+ if (child.commands.length > 0) {
16251
+ results.push(...flattenCommands(child, fullName));
16252
+ }
16253
+ }
16254
+ return results;
16255
+ }
16256
+ async function buildManifest(program3, cliVersion) {
16257
+ const outputSchemas = await loadOutputSchemas();
16258
+ const flat = flattenCommands(program3, "");
16259
+ const commands = flat.map(({ fullName, cmd }) => ({
16260
+ name: fullName,
16261
+ description: cmd.description() ?? "",
16262
+ arguments: cmd.registeredArguments.map(serializeArgument),
16263
+ options: cmd.options.map(serializeOption),
16264
+ output_schema: outputSchemas.get(fullName) ?? null
16265
+ }));
16266
+ return {
16267
+ version: 1,
16268
+ cli: program3.name(),
16269
+ cli_version: cliVersion,
16270
+ commands
16271
+ };
16272
+ }
16273
+ async function buildCommandSchema(program3, cliVersion, commandName) {
16274
+ const manifest = await buildManifest(program3, cliVersion);
16275
+ return manifest.commands.find((c) => c.name === commandName) ?? null;
16276
+ }
16277
+
16278
+ // src/index.ts
16110
16279
  var program2 = new Command();
16111
- program2.name("bamboo-agents").description("Set up your local Bamboo workspace and drop into Claude.").version(VERSION).option("--no-sync", "Skip the auto-sync git pull on this command");
16280
+ program2.name("bamboo-agents").description("Set up your local Bamboo workspace and drop into Claude.").version(VERSION).option("--no-sync", "Skip the auto-sync git pull on this command").option("--describe", "Emit full JSON manifest of every CLI command (machine introspection)").option("--schema <command>", "Emit JSON schema for one command by name, e.g. 'history' or 'knowledge save'");
16112
16281
  program2.action(async () => {
16113
16282
  const { runOrchestrator: runOrchestrator2 } = await Promise.resolve().then(() => (init_orchestrator(), orchestrator_exports));
16114
16283
  await runOrchestrator2();
@@ -16184,12 +16353,12 @@ knowledge.command("save").description("Save a knowledge file (routed write \u201
16184
16353
  await runKnowledgeSave2(options);
16185
16354
  });
16186
16355
  program2.command("history").description("Recent workspace actions (reverse-chronological)").option("--limit <n>", "Max entries (default 20, max 100)").option("--json", "Emit raw JSON for agent consumption").option("--no-sync", "Skip the auto-sync git pull on this command").action(async (options) => {
16187
- const { runHistory: runHistory2 } = await Promise.resolve().then(() => (init_history2(), history_exports));
16356
+ const { runHistory: runHistory2 } = await Promise.resolve().then(() => (init_history2(), history_exports2));
16188
16357
  await runHistory2(options);
16189
16358
  });
16190
16359
  program2.command("changes").description("Structured change log \u2014 what was created/updated/deleted").option("--limit <n>", "Max entries (default 20, max 100)").option("--brand <id>", "Filter to one brand_id").option("--since <iso>", "Only changes at/after this ISO timestamp").option("--entity-type <type>", "Filter by entity type").option("--json", "Emit raw JSON for agent consumption").option("--no-sync", "Skip the auto-sync git pull on this command").action(
16191
16360
  async (options) => {
16192
- const { runChanges: runChanges2 } = await Promise.resolve().then(() => (init_history2(), history_exports));
16361
+ const { runChanges: runChanges2 } = await Promise.resolve().then(() => (init_history2(), history_exports2));
16193
16362
  await runChanges2(options);
16194
16363
  }
16195
16364
  );
@@ -16203,7 +16372,39 @@ onboarding.command("status").description("Composite onboarding gate (activation
16203
16372
  const { runOnboardingStatus: runOnboardingStatus2 } = await Promise.resolve().then(() => (init_onboarding(), onboarding_exports));
16204
16373
  await runOnboardingStatus2(options);
16205
16374
  });
16206
- program2.parseAsync(process.argv).catch((err) => {
16375
+ (async () => {
16376
+ const { operands, unknown: unknownArgs } = program2.parseOptions(
16377
+ process.argv.slice(2)
16378
+ );
16379
+ const rawArgs = process.argv.slice(2);
16380
+ const describeIdx = rawArgs.indexOf("--describe");
16381
+ const schemaIdx = rawArgs.indexOf("--schema");
16382
+ if (describeIdx !== -1) {
16383
+ const manifest = await buildManifest(program2, VERSION);
16384
+ process.stdout.write(JSON.stringify(manifest, null, 2) + "\n");
16385
+ process.exit(0);
16386
+ }
16387
+ if (schemaIdx !== -1) {
16388
+ const commandName = rawArgs[schemaIdx + 1];
16389
+ if (!commandName || commandName.startsWith("--")) {
16390
+ process.stderr.write(
16391
+ "bamboo-agents: --schema requires a command name, e.g. --schema history\n"
16392
+ );
16393
+ process.exit(1);
16394
+ }
16395
+ const entry = await buildCommandSchema(program2, VERSION, commandName);
16396
+ if (entry === null) {
16397
+ process.stderr.write(
16398
+ `bamboo-agents: unknown command '${commandName}'. Run --describe for the full list.
16399
+ `
16400
+ );
16401
+ process.exit(1);
16402
+ }
16403
+ process.stdout.write(JSON.stringify(entry, null, 2) + "\n");
16404
+ process.exit(0);
16405
+ }
16406
+ await program2.parseAsync(process.argv);
16407
+ })().catch((err) => {
16207
16408
  const message = err instanceof Error ? err.message : String(err);
16208
16409
  console.error(`bamboo-agents: ${message}`);
16209
16410
  process.exit(1);