bamboo-agents 0.1.15 → 0.1.16

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.15
1
+ 0.1.16
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.15";
3040
+ VERSION = "0.1.16";
3041
3041
  }
3042
3042
  });
3043
3043
 
@@ -13433,6 +13433,10 @@ var init_eval_management = __esm({
13433
13433
  effective_org_id: external_exports.string(),
13434
13434
  real_actor_user_id: external_exports.string().nullable().optional(),
13435
13435
  effective_actor_user_id: external_exports.string().nullable().optional(),
13436
+ actor_kind: external_exports.enum(["agent", "fde"]).optional(),
13437
+ actor_agent_id: external_exports.string().nullable().optional(),
13438
+ operator_key_id: external_exports.string().nullable().optional(),
13439
+ issuer_user_id: external_exports.string().nullable().optional(),
13436
13440
  credential_kind: external_exports.enum(["user_session", "api_key"]).optional(),
13437
13441
  impersonating: external_exports.boolean().optional(),
13438
13442
  acting_in_org: external_exports.boolean().optional(),
@@ -13571,6 +13575,7 @@ var init_eval_management = __esm({
13571
13575
  source_path: external_exports.string().min(1),
13572
13576
  command_id: external_exports.string().min(1),
13573
13577
  already_retired: external_exports.boolean(),
13578
+ set_retired: external_exports.boolean().optional(),
13574
13579
  publication: InvestigationPublicationReceiptSchema
13575
13580
  }).passthrough();
13576
13581
  CaseRefsReceiptSchema = external_exports.object({
@@ -13792,6 +13797,8 @@ var init_inbox_management = __esm({
13792
13797
  "recipient_mismatch",
13793
13798
  "proposal_failed",
13794
13799
  "graph_decision_conflict",
13800
+ "audit_opportunity_requires_customer_wording",
13801
+ "shaping_pending",
13795
13802
  "opportunity_not_decidable",
13796
13803
  "opportunity_applied_receipt_unavailable",
13797
13804
  "opportunity_preflight_failed",
@@ -13820,7 +13827,7 @@ var init_inbox_management = __esm({
13820
13827
  cli_command: "bamboo-agents inbox manage",
13821
13828
  work_item_family: "inbox",
13822
13829
  supported_runtimes: ["cli", "api"],
13823
- authority: "Superadmin session with an explicit customer organization",
13830
+ authority: "Superadmin session with explicit customer organization, or organization-bound operator key",
13824
13831
  approval_required: false,
13825
13832
  side_effect: "none",
13826
13833
  minimum_cli_version: "0.1.8",
@@ -14143,7 +14150,8 @@ var init_inbox_management = __esm({
14143
14150
  "graph_decision_assignee_invalid",
14144
14151
  "graph_decision_invalid",
14145
14152
  "graph_decision_command_id_required",
14146
- "graph_decision_command_id_too_long"
14153
+ "graph_decision_command_id_too_long",
14154
+ "shaping_pending"
14147
14155
  ];
14148
14156
  OPPORTUNITY_MANAGEMENT_BINDINGS = [
14149
14157
  {
@@ -14207,6 +14215,7 @@ var init_inbox_management = __esm({
14207
14215
  "brain_opportunity_stale",
14208
14216
  "brain_opportunity_assignment_target_invalid",
14209
14217
  "missing_assignment",
14218
+ "audit_opportunity_requires_customer_wording",
14210
14219
  "wording_mismatch",
14211
14220
  "recipient_mismatch",
14212
14221
  "graph_decision_conflict",
@@ -14266,6 +14275,7 @@ var init_inbox_management = __esm({
14266
14275
  ...opportunityCommon.error_codes,
14267
14276
  "brain_opportunity_answer_stale_source",
14268
14277
  "brain_opportunity_answer_idempotency_conflict",
14278
+ "shaping_pending",
14269
14279
  "unknown_outcome"
14270
14280
  ]
14271
14281
  }
@@ -14861,7 +14871,13 @@ var init_inbox_management = __esm({
14861
14871
  brand_id: external_exports.string().nullable(),
14862
14872
  brand_name: external_exports.string().nullable()
14863
14873
  }),
14864
- actor: external_exports.object({ user_id: external_exports.string(), role: external_exports.string() }),
14874
+ actor: external_exports.object({
14875
+ user_id: external_exports.string(),
14876
+ role: external_exports.string(),
14877
+ actor_kind: external_exports.enum(["agent", "fde"]).optional(),
14878
+ agent_id: external_exports.string().nullable().optional(),
14879
+ key_id: external_exports.string().optional()
14880
+ }),
14865
14881
  command_id: external_exports.string().nullable(),
14866
14882
  outcome: external_exports.enum(["succeeded", "no_change", "pending", "unknown"])
14867
14883
  });
@@ -15571,6 +15587,7 @@ var init_eval_baseline_promote = __esm({
15571
15587
  demote: external_exports.literal(true),
15572
15588
  brand_id: external_exports.string().uuid(),
15573
15589
  qrels_version: external_exports.string().min(1).describe("The key to empty: its current baseline is tombstoned."),
15590
+ question_set_kind: external_exports.enum(["qrels", "sync_brain"]).default("qrels").describe("The baseline key to tombstone. Absent on an un-upgraded CLI, which means qrels."),
15574
15591
  reason: Reason,
15575
15592
  pr_url: PrUrl
15576
15593
  });
@@ -15583,6 +15600,7 @@ var init_eval_baseline_promote = __esm({
15583
15600
  kind: external_exports.enum(["promote", "demote"]),
15584
15601
  brand_id: external_exports.string().uuid(),
15585
15602
  qrels_version: external_exports.string(),
15603
+ question_set_kind: external_exports.enum(["qrels", "sync_brain"]),
15586
15604
  /** Null after a demotion. */
15587
15605
  run_id: external_exports.string().uuid().nullable(),
15588
15606
  /** What the head pointed at before this row; null when the version had no baseline. */
@@ -15715,12 +15733,19 @@ async function getCliOrganizationScope(session, orgId) {
15715
15733
  });
15716
15734
  if (!res.ok) throw await parseError(res);
15717
15735
  const json = await res.json();
15718
- return external_exports.object({
15736
+ const parsed = external_exports.object({
15719
15737
  scope: external_exports.object({
15720
15738
  effective_org_id: external_exports.string().uuid(),
15721
15739
  effective_org_name: external_exports.string()
15722
- })
15723
- }).parse(json).scope;
15740
+ }),
15741
+ operator: external_exports.object({
15742
+ capability: external_exports.literal("org_operator"),
15743
+ agent_id: external_exports.string().uuid(),
15744
+ key_id: external_exports.string().uuid(),
15745
+ expires_at: external_exports.string()
15746
+ }).optional()
15747
+ }).parse(json);
15748
+ return { ...parsed.scope, ...parsed.operator ? { operator: parsed.operator } : {} };
15724
15749
  }
15725
15750
  async function callInboxManagement(session, orgId, call) {
15726
15751
  const res = await cliApiFetch(`${apiBase()}/api/v1/inbox/manage`, {
@@ -15783,11 +15808,27 @@ async function cliApiFetch(url, init = {}) {
15783
15808
  const headers = new Headers(init.headers);
15784
15809
  headers.set("User-Agent", userAgent());
15785
15810
  headers.set("Bamboo-CLI-Version", VERSION);
15786
- return fetch(url, {
15811
+ const response = await fetch(url, {
15787
15812
  ...init,
15788
15813
  headers,
15789
15814
  signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS)
15790
15815
  });
15816
+ warnIfOperatorKeyNearExpiry(response);
15817
+ return response;
15818
+ }
15819
+ function warnIfOperatorKeyNearExpiry(response) {
15820
+ if (operatorExpiryWarningEmitted) return;
15821
+ const expiresAt = response.headers.get("Bamboo-Operator-Key-Expires-At");
15822
+ if (!expiresAt) return;
15823
+ const remainingMs = Date.parse(expiresAt) - Date.now();
15824
+ if (!Number.isFinite(remainingMs) || remainingMs > 14 * 864e5) return;
15825
+ operatorExpiryWarningEmitted = true;
15826
+ console.error(JSON.stringify({
15827
+ warning: "operator_key_expiring",
15828
+ expires_at: expiresAt,
15829
+ days_remaining: Math.max(0, Math.ceil(remainingMs / 864e5)),
15830
+ action: "Ask an FDE to rotate this agent's organization operator key."
15831
+ }));
15791
15832
  }
15792
15833
  async function getGithubToken(bambooSession) {
15793
15834
  const res = await cliApiFetch(`${apiBase()}/api/auth/github/token`, {
@@ -16505,7 +16546,7 @@ async function postRecEpisode(bambooSession, body) {
16505
16546
  const json = await res.json();
16506
16547
  return CliRecEpisodeResponseSchema.parse(json);
16507
16548
  }
16508
- var PROD_DEFAULT_BASE, DEV_DEFAULT_BASE, REQUEST_TIMEOUT_MS, ApiError, OAuthRelinkStartResponseSchema, ProvisionWorkspaceResponseSchema, FirstAutoInstalledAgentResponseSchema, SkillCatalogEntrySchema, SkillCatalogResponseSchema, SkillSubscriptionsResponseSchema;
16549
+ var PROD_DEFAULT_BASE, DEV_DEFAULT_BASE, REQUEST_TIMEOUT_MS, ApiError, operatorExpiryWarningEmitted, OAuthRelinkStartResponseSchema, ProvisionWorkspaceResponseSchema, FirstAutoInstalledAgentResponseSchema, SkillCatalogEntrySchema, SkillCatalogResponseSchema, SkillSubscriptionsResponseSchema;
16509
16550
  var init_api = __esm({
16510
16551
  "src/lib/api.ts"() {
16511
16552
  "use strict";
@@ -16548,6 +16589,7 @@ var init_api = __esm({
16548
16589
  this.name = "ApiError";
16549
16590
  }
16550
16591
  };
16592
+ operatorExpiryWarningEmitted = false;
16551
16593
  OAuthRelinkStartResponseSchema = external_exports.object({
16552
16594
  relink_url: external_exports.string().url()
16553
16595
  });
@@ -18590,6 +18632,45 @@ var init_orchestrator = __esm({
18590
18632
  }
18591
18633
  });
18592
18634
 
18635
+ // src/commands/auth-status.ts
18636
+ var auth_status_exports = {};
18637
+ __export(auth_status_exports, {
18638
+ runAuthStatus: () => runAuthStatus
18639
+ });
18640
+ async function runAuthStatus(options) {
18641
+ try {
18642
+ const credential = await resolveSession();
18643
+ if (!credential) {
18644
+ emitError({ code: "authentication_required", message: "Set BAMBOO_API_TOKEN or run bamboo-agents login." }, options, 1);
18645
+ return;
18646
+ }
18647
+ const scope = await getCliOrganizationScope(credential);
18648
+ const status = {
18649
+ credential_kind: credential.startsWith("bam_") ? "api_key" : "user_session",
18650
+ organization: { id: scope.effective_org_id, name: scope.effective_org_name },
18651
+ operator: scope.operator ?? null
18652
+ };
18653
+ human(`Organization: ${scope.effective_org_name} (${scope.effective_org_id})`, options);
18654
+ if (scope.operator) {
18655
+ human(`Agent: ${scope.operator.agent_id}`, options);
18656
+ human(`Capability: ${scope.operator.capability}`, options);
18657
+ human(`Key: ${scope.operator.key_id} (expires ${scope.operator.expires_at})`, options);
18658
+ }
18659
+ emitSuccess(status, options);
18660
+ } catch (error) {
18661
+ const value = error;
18662
+ emitError({ code: value.code ?? value.errorCode ?? "auth_status_failed", message: value.message ?? "Could not verify Bamboo authentication." }, options, 1);
18663
+ }
18664
+ }
18665
+ var init_auth_status2 = __esm({
18666
+ "src/commands/auth-status.ts"() {
18667
+ "use strict";
18668
+ init_api();
18669
+ init_credentials();
18670
+ init_output();
18671
+ }
18672
+ });
18673
+
18593
18674
  // src/lib/claude-desktop.ts
18594
18675
  import { execFile as execFile7 } from "node:child_process";
18595
18676
  import { platform as platform4 } from "node:os";
@@ -20952,10 +21033,25 @@ async function resolveOrganizationSelection(requested, listOrganizations) {
20952
21033
  { code: "organization_scope_ambiguous" }
20953
21034
  );
20954
21035
  }
21036
+ async function resolveCredentialOrganization(session, selector) {
21037
+ if (!session.startsWith("bam_")) {
21038
+ if (!selector) throw Object.assign(new Error("Pass the customer organization with --org."), { code: "organization_scope_required" });
21039
+ return resolveOrganizationSelection(selector, () => listInboxOrganizations(session));
21040
+ }
21041
+ const bound = await getCliOrganizationScope(session);
21042
+ if (selector) {
21043
+ const requested = selector.trim().toLowerCase();
21044
+ if (requested !== bound.effective_org_id.toLowerCase() && requested !== bound.effective_org_name.toLowerCase()) {
21045
+ throw Object.assign(new Error("This API key is bound to a different organization."), { code: "organization_scope_mismatch" });
21046
+ }
21047
+ }
21048
+ return { id: bound.effective_org_id, name: bound.effective_org_name };
21049
+ }
20955
21050
  var UUID;
20956
21051
  var init_organization_selection = __esm({
20957
21052
  "src/lib/organization-selection.ts"() {
20958
21053
  "use strict";
21054
+ init_api();
20959
21055
  UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
20960
21056
  }
20961
21057
  });
@@ -20975,13 +21071,6 @@ async function inboxSession() {
20975
21071
  throw Object.assign(new Error("Run `bamboo-agents login` first."), {
20976
21072
  code: "authentication_required"
20977
21073
  });
20978
- if (token.startsWith("bam_"))
20979
- throw Object.assign(
20980
- new Error(
20981
- "Cross-customer Inbox operations require a user session; API keys cannot switch organizations."
20982
- ),
20983
- { code: "organization_scope_required" }
20984
- );
20985
21074
  return token;
20986
21075
  }
20987
21076
  async function inputObject(value) {
@@ -21028,7 +21117,7 @@ async function runInboxOperations(options) {
21028
21117
  async function runInboxOrganizations(options) {
21029
21118
  try {
21030
21119
  const session = await inboxSession();
21031
- const { orgs } = await listInboxOrganizations(session);
21120
+ const { orgs } = session.startsWith("bam_") ? { orgs: [await getCliOrganizationScope(session)].map((scope) => ({ id: scope.effective_org_id, name: scope.effective_org_name, status: "bound" })) } : await listInboxOrganizations(session);
21032
21121
  const query = options.query?.trim() ?? "";
21033
21122
  const normalized = query.toLowerCase();
21034
21123
  const organizations = query ? orgs.filter((org) => org.name.toLowerCase().includes(normalized) || org.id.toLowerCase().includes(normalized)) : orgs;
@@ -21041,10 +21130,7 @@ async function runInboxOrganizations(options) {
21041
21130
  async function runInboxMembers(options) {
21042
21131
  try {
21043
21132
  const session = await inboxSession();
21044
- const organization = await resolveOrganizationSelection(
21045
- options.org,
21046
- () => listInboxOrganizations(session)
21047
- );
21133
+ const organization = await resolveCredentialOrganization(session, options.org);
21048
21134
  const result = await listInboxMembers(session, organization.id);
21049
21135
  if (result.scope.org_id !== organization.id) {
21050
21136
  throw Object.assign(
@@ -21080,10 +21166,7 @@ async function runInboxMembers(options) {
21080
21166
  async function runInboxManage(options) {
21081
21167
  try {
21082
21168
  const session = await inboxSession();
21083
- const organization = await resolveOrganizationSelection(
21084
- options.org,
21085
- () => listInboxOrganizations(session)
21086
- );
21169
+ const organization = await resolveCredentialOrganization(session, options.org);
21087
21170
  const orgId = organization.id;
21088
21171
  if (organization.name) human(`Operating as organization: ${organization.name} (${orgId})`, options);
21089
21172
  if (!InboxManageOperationSchema.safeParse(options.operation).success) {
@@ -21187,7 +21270,7 @@ async function runInboxManage(options) {
21187
21270
  if (!options.approve) {
21188
21271
  throw Object.assign(
21189
21272
  new Error(
21190
- `${options.quiet ? `${previewSummary}. ` : ""}This operation changes customer state. Review the preview, obtain approval for its exact scope, source version, effect, and reversibility, then re-run with --approve.`
21273
+ `${options.quiet ? `${previewSummary}. ` : ""}This operation changes customer state. Review the preview and re-run with --approve to acknowledge its exact scope, source version, effect, and reversibility.`
21191
21274
  ),
21192
21275
  { code: "approval_required" }
21193
21276
  );
@@ -22710,10 +22793,7 @@ import { readFile as readFile10 } from "node:fs/promises";
22710
22793
  async function runEvalScope(options) {
22711
22794
  const session = await requireSession12(options);
22712
22795
  try {
22713
- const organization = await resolveOrganizationSelection(
22714
- options.org,
22715
- () => listInboxOrganizations(session)
22716
- );
22796
+ const organization = await resolveCredentialOrganization(session, options.org);
22717
22797
  const [brandResult, agentResult] = await Promise.all([
22718
22798
  listCliBrands(session, organization.id),
22719
22799
  listCliAgents(session, organization.id)
@@ -22771,10 +22851,7 @@ async function parseInput(value) {
22771
22851
  async function runEvalOperations(options) {
22772
22852
  const session = await requireSession12(options);
22773
22853
  try {
22774
- const organization = options.org ? await resolveOrganizationSelection(
22775
- options.org,
22776
- () => listInboxOrganizations(session)
22777
- ) : null;
22854
+ const organization = options.org || session.startsWith("bam_") ? await resolveCredentialOrganization(session, options.org) : null;
22778
22855
  const catalog = organization ? await getEvalManagementOperations(session, organization.id) : await getEvalManagementOperations(session);
22779
22856
  human("", options);
22780
22857
  for (const binding of catalog.bindings) {
@@ -22813,10 +22890,7 @@ async function runEvalManage(options) {
22813
22890
  const session = await requireSession12(output);
22814
22891
  try {
22815
22892
  const input = await parseInput(options.input);
22816
- const organization = options.org ? await resolveOrganizationSelection(
22817
- options.org,
22818
- () => listInboxOrganizations(session)
22819
- ) : null;
22893
+ const organization = options.org || session.startsWith("bam_") ? await resolveCredentialOrganization(session, options.org) : null;
22820
22894
  const call = EvalManagementCallSchema.parse({
22821
22895
  operation: options.operation,
22822
22896
  input
@@ -22932,9 +23006,10 @@ function caseOutcomeLine(operation, data, publication) {
22932
23006
  if (operation === "case.retire") {
22933
23007
  if (data.already_retired === true)
22934
23008
  return `${sourcePath} was already retired; nothing was written.`;
23009
+ const category = data.set_retired === true ? " and its category (last case)" : "";
22935
23010
  if (status === "pending")
22936
- return `Retirement of ${sourcePath} is queued for publication; the projected case stays active until it merges.`;
22937
- return projected ? `Retired ${sourcePath}: the file is removed and the projected case is inactive.` : `Retired ${sourcePath}: the file is removed, but the projected case has not been marked inactive yet.`;
23011
+ return `Retirement of ${sourcePath}${category} is queued for publication; the projected case stays active until it merges.`;
23012
+ return projected ? `Retired ${sourcePath}${category}: the file is removed and the projected case is inactive.` : `Retired ${sourcePath}${category}: the file is removed, but the projected case has not been marked inactive yet.`;
22938
23013
  }
22939
23014
  const verb = operation === "case.create" ? "Authored" : "Updated";
22940
23015
  const caseId = typeof data.case_id === "string" ? ` (eval_cases ${data.case_id})` : "";
@@ -23100,7 +23175,7 @@ function render(data, opts) {
23100
23175
  human("", opts);
23101
23176
  if (data.kind === "demote") {
23102
23177
  human(
23103
- ` Baseline demoted for qrels_version ${short(data.qrels_version)} (was run ${data.previous_run_id}).`,
23178
+ ` Baseline demoted for qrels_version ${short(data.qrels_version)} (${data.question_set_kind}, was run ${data.previous_run_id}).`,
23104
23179
  opts
23105
23180
  );
23106
23181
  human(
@@ -23109,7 +23184,7 @@ function render(data, opts) {
23109
23184
  );
23110
23185
  } else {
23111
23186
  human(
23112
- ` Baseline promoted: run ${data.run_id} is the reference for qrels_version ${short(data.qrels_version)}` + (data.previous_run_id ? ` (was ${data.previous_run_id}).` : " (the version had none)."),
23187
+ ` Baseline promoted: run ${data.run_id} is the reference for qrels_version ${short(data.qrels_version)} (${data.question_set_kind})` + (data.previous_run_id ? ` (was ${data.previous_run_id}).` : " (the version had none)."),
23113
23188
  opts
23114
23189
  );
23115
23190
  human(" Re-run the PR's retrieval-evals check: it compares flat against its own run.", opts);
@@ -23132,10 +23207,24 @@ async function runEvalPromote(options) {
23132
23207
  );
23133
23208
  return;
23134
23209
  }
23210
+ const kind = options.kind;
23211
+ if (kind !== void 0 && kind !== "qrels" && kind !== "sync_brain") {
23212
+ emitError(
23213
+ {
23214
+ code: "invalid_kind",
23215
+ message: `--kind must be "qrels" or "sync_brain", got "${kind}".`,
23216
+ hint: "Omit --kind to demote the qrels baseline."
23217
+ },
23218
+ opts,
23219
+ 1
23220
+ );
23221
+ return;
23222
+ }
23135
23223
  body = {
23136
23224
  demote: true,
23137
23225
  brand_id: options.brand,
23138
23226
  qrels_version: options.qrelsVersion,
23227
+ ...kind ? { question_set_kind: kind } : {},
23139
23228
  reason: options.reason,
23140
23229
  ...options.pr ? { pr_url: options.pr } : {}
23141
23230
  };
@@ -23691,6 +23780,10 @@ program2.command("login").description("Sign in to Bamboo via your browser (or us
23691
23780
  const { runLogin: runLogin2 } = await Promise.resolve().then(() => (init_login(), login_exports));
23692
23781
  await runLogin2();
23693
23782
  });
23783
+ program2.command("auth").description("Inspect the active Bamboo credential").command("status").description("Show the bound organization, agent, capability, and key expiry").option("--json", "Emit a JSON envelope").option("--quiet", "Suppress human chatter").action(async (options) => {
23784
+ const { runAuthStatus: runAuthStatus2 } = await Promise.resolve().then(() => (init_auth_status2(), auth_status_exports));
23785
+ await runAuthStatus2(options);
23786
+ });
23694
23787
  program2.command("init").description("Clone your workspace + set up git credentials").option(
23695
23788
  "--reset",
23696
23789
  "Delete the existing workspace clone and start over (prompts for confirmation)"
@@ -23768,11 +23861,11 @@ inbox.command("organizations [query]").description("List or search customer orga
23768
23861
  const { runInboxOrganizations: runInboxOrganizations2 } = await Promise.resolve().then(() => (init_inbox_management2(), inbox_management_exports));
23769
23862
  await runInboxOrganizations2({ query, ...options });
23770
23863
  });
23771
- inbox.command("members").description("Find a customer organization's members before assigning an Inbox opportunity").requiredOption("--org <uuid-or-name>", "Explicit customer organization UUID or unique name").option("--query <person>", "Find one member by name, email, or auth user ID").option("--json", "Emit a JSON envelope for agent consumption").option("--fields <list>", "Project only these dotted field paths from data (comma-separated)").option("--quiet", "Suppress human chatter (data/errors only)").action(async (options) => {
23864
+ inbox.command("members").description("Find a customer organization's members before assigning an Inbox opportunity").option("--org <uuid-or-name>", "Customer organization UUID or unique name (required for user sessions)").option("--query <person>", "Find one member by name, email, or auth user ID").option("--json", "Emit a JSON envelope for agent consumption").option("--fields <list>", "Project only these dotted field paths from data (comma-separated)").option("--quiet", "Suppress human chatter (data/errors only)").action(async (options) => {
23772
23865
  const { runInboxMembers: runInboxMembers2 } = await Promise.resolve().then(() => (init_inbox_management2(), inbox_management_exports));
23773
23866
  await runInboxMembers2(options);
23774
23867
  });
23775
- inbox.command("manage").description("Call one catalog-advertised customer Inbox operation").argument("<operation>", "Exact operation name").requiredOption("--input <json-or-@file>", "JSON object, inline or loaded from @path").requiredOption("--org <uuid-or-name>", "Explicit customer organization UUID or unique name").option("--approve", "Confirm the exact displayed mutation after user approval").option("--json", "Emit a JSON envelope for agent consumption").option("--fields <list>", "Project only these dotted field paths from data (comma-separated)").option("--quiet", "Suppress human chatter (data/errors only)").action(async (operation, options) => {
23868
+ inbox.command("manage").description("Call one catalog-advertised customer Inbox operation").argument("<operation>", "Exact operation name").requiredOption("--input <json-or-@file>", "JSON object, inline or loaded from @path").option("--org <uuid-or-name>", "Customer organization UUID or unique name (required for user sessions)").option("--approve", "Confirm the exact displayed mutation after user approval").option("--json", "Emit a JSON envelope for agent consumption").option("--fields <list>", "Project only these dotted field paths from data (comma-separated)").option("--quiet", "Suppress human chatter (data/errors only)").action(async (operation, options) => {
23776
23869
  const { runInboxManage: runInboxManage2 } = await Promise.resolve().then(() => (init_inbox_management2(), inbox_management_exports));
23777
23870
  await runInboxManage2({ operation, ...options });
23778
23871
  });
@@ -23895,7 +23988,7 @@ episode.command("log-rec").description(
23895
23988
  await runEpisodeLogRec2(options);
23896
23989
  });
23897
23990
  var evals = program2.command("eval").description("Evaluation surface \u2014 A/B a candidate skill against its baseline");
23898
- evals.command("scope").description("Resolve one organization and list its authoritative brands and agents").requiredOption("--org <uuid-or-name>", "Customer organization UUID, exact name, or unique name fragment").option("--json", "Emit a JSON envelope for agent consumption").option("--fields <list>", "Project only these dotted field paths from data (comma-separated)").option("--quiet", "Suppress human chatter (data/errors only)").action(async (options) => {
23991
+ evals.command("scope").description("Resolve one organization and list its authoritative brands and agents").option("--org <uuid-or-name>", "Customer organization UUID or name (required for user sessions)").option("--json", "Emit a JSON envelope for agent consumption").option("--fields <list>", "Project only these dotted field paths from data (comma-separated)").option("--quiet", "Suppress human chatter (data/errors only)").action(async (options) => {
23899
23992
  const { runEvalScope: runEvalScope2 } = await Promise.resolve().then(() => (init_eval_management2(), eval_management_exports));
23900
23993
  await runEvalScope2(options);
23901
23994
  });
@@ -23923,7 +24016,7 @@ evals.command("ablate").description(
23923
24016
  );
23924
24017
  evals.command("promote").description(
23925
24018
  "Promote a correctness run as the baseline for its qrels version, or --demote the current one"
23926
- ).argument("[run-id]", "Run id printed by the correctness gate (omit with --demote)").requiredOption("--reason <text>", "Why this run is the reference now \u2014 recorded on the row").option("--pr <url>", "PR URL to record as the promotion's source").option("--demote", "Write a tombstone: the version has no baseline until a human promotes one").option("--brand <id>", "Brand id (with --demote)").option("--qrels-version <hash>", "qrels version to demote (with --demote)").option("--json", "Emit a JSON envelope for agent consumption").option("--fields <list>", "Project only these dotted field paths from data (comma-separated)").option("--quiet", "Suppress human chatter (data/errors only)").option("--no-sync", "Skip the auto-sync git pull on this command").action(
24019
+ ).argument("[run-id]", "Run id printed by the correctness gate (omit with --demote)").requiredOption("--reason <text>", "Why this run is the reference now \u2014 recorded on the row").option("--pr <url>", "PR URL to record as the promotion's source").option("--demote", "Write a tombstone: the version has no baseline until a human promotes one").option("--brand <id>", "Brand id (with --demote)").option("--qrels-version <hash>", "qrels version to demote (with --demote)").option("--kind <kind>", "Question set kind to demote: qrels | sync_brain (with --demote)").option("--json", "Emit a JSON envelope for agent consumption").option("--fields <list>", "Project only these dotted field paths from data (comma-separated)").option("--quiet", "Suppress human chatter (data/errors only)").option("--no-sync", "Skip the auto-sync git pull on this command").action(
23927
24020
  async (runId, options) => {
23928
24021
  const { runEvalPromote: runEvalPromote2 } = await Promise.resolve().then(() => (init_eval_promote(), eval_promote_exports));
23929
24022
  await runEvalPromote2({ runId, ...options });