@wave-ai-os/wave-cli 0.1.88 → 0.2.0

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/index.js CHANGED
@@ -5,7 +5,7 @@ import { CommanderError, InvalidArgumentError } from "commander";
5
5
  import { ZodError } from "zod";
6
6
 
7
7
  // src/cli.ts
8
- import { Command, Option as Option2 } from "commander";
8
+ import { Command, Option as Option3 } from "commander";
9
9
 
10
10
  // src/authStorage.ts
11
11
  import { execFile } from "child_process";
@@ -724,18 +724,18 @@ function errorCodeFromHttpStatus(status) {
724
724
  }
725
725
  return `http_${status}`;
726
726
  }
727
- function messageFromHttpBody(body) {
728
- if (body && typeof body === "object" && !Array.isArray(body)) {
729
- const record = body;
730
- if (typeof record.error === "string" && record.error.trim().length > 0) {
731
- return record.error;
727
+ function messageFromHttpBody(body2) {
728
+ if (body2 && typeof body2 === "object" && !Array.isArray(body2)) {
729
+ const record2 = body2;
730
+ if (typeof record2.error === "string" && record2.error.trim().length > 0) {
731
+ return record2.error;
732
732
  }
733
- if (typeof record.message === "string" && record.message.trim().length > 0) {
734
- return record.message;
733
+ if (typeof record2.message === "string" && record2.message.trim().length > 0) {
734
+ return record2.message;
735
735
  }
736
736
  }
737
- if (typeof body === "string" && body.trim().length > 0) {
738
- return body;
737
+ if (typeof body2 === "string" && body2.trim().length > 0) {
738
+ return body2;
739
739
  }
740
740
  return "GraphQL HTTP request failed.";
741
741
  }
@@ -821,13 +821,13 @@ async function requestGraphqlHttp(params) {
821
821
  const responseRequestId = response.headers.get("x-request-id") ?? params.requestId;
822
822
  const text = await response.text();
823
823
  const payload = text ? parseJsonSafely(text) : null;
824
- const body = payload ?? (text.length > 0 ? text : null);
824
+ const body2 = payload ?? (text.length > 0 ? text : null);
825
825
  const graph = payload && typeof payload === "object" ? payload : {};
826
826
  return {
827
827
  status: response.status,
828
828
  requestId: responseRequestId,
829
829
  retryAfter: response.headers.get("retry-after"),
830
- body,
830
+ body: body2,
831
831
  graph
832
832
  };
833
833
  }
@@ -966,7 +966,7 @@ function buildGraphqlBody(input) {
966
966
  const typeName = hasOverriddenType ? overriddenType.trim() : graphqlTypeForVariable(input, name, value);
967
967
  return `$${name}: ${hasOverriddenType ? typeName : withNonNull(typeName)}`;
968
968
  }).join(", ");
969
- const fieldArgs = variableEntries.map(([name]) => `${name}: $${name}`).join(", ");
969
+ const fieldArgs = input.preserveArgumentNames ? Object.entries(input.variables).filter(([, value]) => value !== void 0).map(([name]) => `${name}: $${toCamelCase(name)}`).join(", ") : variableEntries.map(([name]) => `${name}: $${name}`).join(", ");
970
970
  const signature = variableDecl.length > 0 ? `(${variableDecl})` : "";
971
971
  const args = fieldArgs.length > 0 ? `(${fieldArgs})` : "";
972
972
  const selection = splitSelectionAndFragments(input.selectionSet ?? "");
@@ -982,7 +982,7 @@ async function graphqlRequest(input) {
982
982
  const base = new URL(input.config.baseUrl);
983
983
  const url = new URL("/graphql", base);
984
984
  const requestId = input.config.requestId ?? randomUUID();
985
- const body = buildGraphqlBody(input);
985
+ const body2 = buildGraphqlBody(input);
986
986
  debugLog(
987
987
  input.config,
988
988
  `graphql command=${input.command} op=${input.operationType} field=${input.field} url=${url.toString()} token=${redactForLogs(
@@ -996,7 +996,7 @@ async function graphqlRequest(input) {
996
996
  input,
997
997
  url,
998
998
  requestId,
999
- body,
999
+ body: body2,
1000
1000
  controller
1001
1001
  });
1002
1002
  const responseRequestId = http.requestId;
@@ -1179,34 +1179,40 @@ function isEnvelopeEmittedSignal(error) {
1179
1179
  return error instanceof EnvelopeEmittedSignal;
1180
1180
  }
1181
1181
 
1182
+ // src/commands/taskReadFields.ts
1183
+ var TASK_READ_FIELDS = [
1184
+ "summary",
1185
+ "slug",
1186
+ "description",
1187
+ "notes",
1188
+ "status",
1189
+ "priority",
1190
+ "rank",
1191
+ "dueDate",
1192
+ "createdAt",
1193
+ "updatedAt",
1194
+ "archivedAt",
1195
+ "organizationId",
1196
+ "memberId",
1197
+ "member",
1198
+ "assignee",
1199
+ "creatorId",
1200
+ "projectId",
1201
+ "projectSlug",
1202
+ "taskId",
1203
+ "labelIds",
1204
+ "estimateIds",
1205
+ "subtasksCount",
1206
+ "completedSubtasksCount",
1207
+ "taskType",
1208
+ "parentArchivedAt",
1209
+ "updateVersion"
1210
+ ];
1211
+
1182
1212
  // src/commandRunner.ts
1183
1213
  var RESOURCE_QUERY_FIELDS = {
1184
1214
  tool_config: ["toolKey", "expectations"],
1185
- task: [
1186
- "summary",
1187
- "slug",
1188
- "description",
1189
- "notes",
1190
- "status",
1191
- "priority",
1192
- "rank",
1193
- "dueDate",
1194
- "createdAt",
1195
- "updatedAt",
1196
- "archivedAt",
1197
- "organizationId",
1198
- "memberId",
1199
- "member",
1200
- "assignee",
1201
- "creatorId",
1202
- "projectId",
1203
- "projectSlug",
1204
- "taskId",
1205
- "labelIds",
1206
- "estimateIds",
1207
- "subtasksCount",
1208
- "completedSubtasksCount"
1209
- ],
1215
+ task: TASK_READ_FIELDS,
1210
1216
  issue: [
1211
1217
  "name",
1212
1218
  "slug",
@@ -1263,11 +1269,11 @@ var RESOURCE_QUERY_FIELDS = {
1263
1269
  "workAnniversary",
1264
1270
  "phone",
1265
1271
  "pinned",
1266
- "rocksCount",
1272
+ "goalsCount",
1267
1273
  "measurablesCount",
1268
1274
  "smartKpisCount"
1269
1275
  ],
1270
- rock: [
1276
+ goal: [
1271
1277
  "name",
1272
1278
  "slug",
1273
1279
  "description",
@@ -1282,10 +1288,10 @@ var RESOURCE_QUERY_FIELDS = {
1282
1288
  "organizationId",
1283
1289
  "memberId",
1284
1290
  "creatorId",
1285
- "rockCollectionId",
1286
- "rockCollectionSlug",
1291
+ "goalCollectionId",
1292
+ "goalCollectionSlug",
1287
1293
  "quarterlyObjectiveId",
1288
- "rockType",
1294
+ "goalType",
1289
1295
  "labelIds",
1290
1296
  "milestonesCount",
1291
1297
  "completedMilestonesCount"
@@ -1413,13 +1419,13 @@ var RESOURCE_QUERY_FIELDS = {
1413
1419
  "subTodosCount",
1414
1420
  "completedSubTodosCount"
1415
1421
  ],
1416
- rock_collection: [
1422
+ goal_collection: [
1417
1423
  "name",
1418
1424
  "slug",
1419
1425
  "description",
1420
1426
  "status",
1421
1427
  "priority",
1422
- "rockType",
1428
+ "goalType",
1423
1429
  "createdAt",
1424
1430
  "updatedAt",
1425
1431
  "startDate",
@@ -1618,7 +1624,7 @@ var RESOURCE_QUERY_FIELDS = {
1618
1624
  "status",
1619
1625
  "alignmentScore",
1620
1626
  "alignmentLabel",
1621
- "rocksCount",
1627
+ "goalsCount",
1622
1628
  "measurablesCount",
1623
1629
  "smartKpisCount",
1624
1630
  "createdAt",
@@ -1640,14 +1646,14 @@ var RESOURCE_FIELD_ALIASES = {
1640
1646
  issues: "issue",
1641
1647
  teams: "team",
1642
1648
  members: "member",
1643
- rocks: "rock",
1649
+ goals: "goal",
1644
1650
  meetings: "meeting",
1645
1651
  lists: "list",
1646
1652
  list_items: "list_item",
1647
1653
  issue_groups: "issue_group",
1648
1654
  todo_groups: "todo_group",
1649
1655
  todos: "todo",
1650
- rock_collections: "rock_collection",
1656
+ goal_collections: "goal_collection",
1651
1657
  contents: "content",
1652
1658
  stand_ups: "stand_up",
1653
1659
  headlines: "headline",
@@ -1851,6 +1857,7 @@ async function runGraphqlMutationCommand(input) {
1851
1857
  command: input.command,
1852
1858
  operationName: input.operationName,
1853
1859
  operationType: "mutation",
1860
+ preserveArgumentNames: input.preserveArgumentNames,
1854
1861
  field: input.field,
1855
1862
  variables: input.variables ?? {},
1856
1863
  variableTypes: input.variableTypes,
@@ -2510,12 +2517,12 @@ function asRecord(value) {
2510
2517
  return value && typeof value === "object" && !Array.isArray(value) ? value : null;
2511
2518
  }
2512
2519
  function visibleSearchText(row) {
2513
- const record = asRecord(row);
2514
- if (!record) return "";
2515
- const attributes = asRecord(record.attributes);
2520
+ const record2 = asRecord(row);
2521
+ if (!record2) return "";
2522
+ const attributes = asRecord(record2.attributes);
2516
2523
  const values = [];
2517
2524
  for (const field of SEARCHABLE_VISIBLE_FIELDS) {
2518
- const topLevelValue = record[field];
2525
+ const topLevelValue = record2[field];
2519
2526
  if (typeof topLevelValue === "string") values.push(topLevelValue);
2520
2527
  const attributeValue = attributes?.[field];
2521
2528
  if (typeof attributeValue === "string") values.push(attributeValue);
@@ -2526,11 +2533,11 @@ function matchesSearchQuery(row, query) {
2526
2533
  return visibleSearchText(row).includes(query.toLowerCase());
2527
2534
  }
2528
2535
  function filterListEnvelopeByQuery(payload, query) {
2529
- const record = asRecord(payload);
2530
- if (!record || !Array.isArray(record.data)) return payload;
2531
- const filteredData = record.data.filter((row) => matchesSearchQuery(row, query));
2536
+ const record2 = asRecord(payload);
2537
+ if (!record2 || !Array.isArray(record2.data)) return payload;
2538
+ const filteredData = record2.data.filter((row) => matchesSearchQuery(row, query));
2532
2539
  return {
2533
- ...record,
2540
+ ...record2,
2534
2541
  data: filteredData,
2535
2542
  count: filteredData.length
2536
2543
  };
@@ -2610,6 +2617,9 @@ function parseTaskPriority(value) {
2610
2617
  var projectIdSchema = z3.string().min(1);
2611
2618
  var idSchema = z3.string().min(1);
2612
2619
  var summarySchema = z3.string().min(1);
2620
+ var updateVersionSchema = z3.string().refine((value) => value.trim().length > 0, {
2621
+ message: "Expected update version must not be blank"
2622
+ });
2613
2623
  function parseTaskUpdateJson(raw) {
2614
2624
  try {
2615
2625
  const parsed = JSON.parse(raw);
@@ -2617,7 +2627,7 @@ function parseTaskUpdateJson(raw) {
2617
2627
  throw new Error("JSON payload must be an object.");
2618
2628
  }
2619
2629
  const payload = parsed;
2620
- const task = payload.task;
2630
+ const task = payload["task"];
2621
2631
  if (task && typeof task === "object" && !Array.isArray(task)) {
2622
2632
  return task;
2623
2633
  }
@@ -2720,8 +2730,9 @@ function registerTaskCommands(program) {
2720
2730
  }
2721
2731
  });
2722
2732
  });
2723
- tasks.command("update").requiredOption("--id <id>").option("--summary <summary>").option("--description <description>").option("--status <status>").option("--priority <priority>").option("--due-date <dueDate>").option("--member-id <memberId>").option("--label-ids <labelIds>", "Comma-separated task label ids").option("--data-json <dataJson>", 'JSON object for task updates, e.g. {"task":{"label_ids":["587"]}}').action(async (opts, cmd) => {
2724
- const id = idSchema.parse(opts.id);
2733
+ tasks.command("update").requiredOption("--id <id>").option("--summary <summary>").option("--description <description>").option("--status <status>").option("--priority <priority>").option("--due-date <dueDate>").option("--member-id <memberId>").option("--label-ids <labelIds>", "Comma-separated task label ids").option("--data-json <dataJson>", 'JSON object for task updates, e.g. {"task":{"label_ids":["587"]}}').option("--expected-update-version <version>", "Exact saved update_version; reject stale Task updates").action(async (opts, cmd) => {
2734
+ const id2 = idSchema.parse(opts.id);
2735
+ const expectedUpdateVersion = opts.expectedUpdateVersion === void 0 ? void 0 : updateVersionSchema.parse(opts.expectedUpdateVersion);
2725
2736
  const taskPayload = {
2726
2737
  ...opts.dataJson ? parseTaskUpdateJson(String(opts.dataJson)) : {},
2727
2738
  ...opts.summary ? { summary: String(opts.summary) } : {},
@@ -2746,9 +2757,15 @@ function registerTaskCommands(program) {
2746
2757
  command: "tasks.update",
2747
2758
  runtimeOptions: context.runtimeOptions,
2748
2759
  field: "update_task",
2760
+ ...expectedUpdateVersion === void 0 ? {} : {
2761
+ variableTypes: { expected_update_version: "String!" }
2762
+ },
2749
2763
  variables: {
2750
2764
  organization_id: organizationId,
2751
- task_id: id,
2765
+ task_id: id2,
2766
+ ...expectedUpdateVersion === void 0 ? {} : {
2767
+ expected_update_version: expectedUpdateVersion
2768
+ },
2752
2769
  params: {
2753
2770
  task: taskPayload
2754
2771
  }
@@ -2756,7 +2773,7 @@ function registerTaskCommands(program) {
2756
2773
  });
2757
2774
  });
2758
2775
  tasks.command("destroy").description("Destroy a task by id").requiredOption("--id <id>").action(async (opts, cmd) => {
2759
- const id = idSchema.parse(opts.id);
2776
+ const id2 = idSchema.parse(opts.id);
2760
2777
  const context = await resolveCommandContext(cmd.optsWithGlobals());
2761
2778
  const organizationId = resolveOrganizationId(context.organizationId);
2762
2779
  await runGraphqlMutationCommand({
@@ -2765,7 +2782,7 @@ function registerTaskCommands(program) {
2765
2782
  field: "destroy_task",
2766
2783
  variables: {
2767
2784
  organization_id: organizationId,
2768
- task_id: id
2785
+ task_id: id2
2769
2786
  }
2770
2787
  });
2771
2788
  });
@@ -2807,19 +2824,19 @@ var dtoHelpCatalog = {
2807
2824
  ["archived_at", "string | null"]
2808
2825
  ]
2809
2826
  },
2810
- rock: {
2811
- source: "wave-ui/src/types/rock.ts + wave-api-rb/config/initializers/constants/rock.rb + wave-api-rb/app/models/rock.rb",
2827
+ goal: {
2828
+ source: "wave-ui/src/types/goal.ts + wave-api-rb/config/initializers/constants/goal.rb + wave-api-rb/app/models/goal.rb",
2812
2829
  create: [
2813
2830
  ["name*", "string"],
2814
2831
  ["description", "string"],
2815
2832
  ["notes", "string | null"],
2816
2833
  ["resources_attributes", "ResourceDTO[]"],
2817
2834
  ["member_id", "string"],
2818
- ["rock_type*", "RockType"],
2835
+ ["goal_type*", "GoalType"],
2819
2836
  ["label_ids", "number[]"],
2820
2837
  ["status*", "enum(done|on_track|off_track)"],
2821
2838
  ["due_by", "string"],
2822
- ["rock_collection_id", "string"],
2839
+ ["goal_collection_id", "string"],
2823
2840
  ["priority*", "enum(no_priority|urgent|high|medium|low)"]
2824
2841
  ],
2825
2842
  update: [
@@ -2828,12 +2845,12 @@ var dtoHelpCatalog = {
2828
2845
  ["notes", "string | null"],
2829
2846
  ["resources_attributes", "ResourceDTO[]"],
2830
2847
  ["member_id", "string"],
2831
- ["rock_type*", "RockType"],
2848
+ ["goal_type*", "GoalType"],
2832
2849
  ["label_ids", "number[]"],
2833
2850
  ["status*", "enum(done|on_track|off_track)"],
2834
2851
  ["due_by", "string"],
2835
2852
  ["archived_at", "string"],
2836
- ["rock_collection_id", "string"],
2853
+ ["goal_collection_id", "string"],
2837
2854
  ["priority*", "enum(no_priority|urgent|high|medium|low)"],
2838
2855
  ["rank", "number"],
2839
2856
  ["quarterly_objective_id", "string"]
@@ -3045,14 +3062,14 @@ var dtoHelpCatalog = {
3045
3062
  ["rank", "number"]
3046
3063
  ]
3047
3064
  },
3048
- rock_collection: {
3049
- source: "wave-ui/src/types/rockCollection.ts + wave-api-rb/config/initializers/constants/rock_collection.rb + wave-api-rb/app/models/rock_collection.rb",
3065
+ goal_collection: {
3066
+ source: "wave-ui/src/types/goalCollection.ts + wave-api-rb/config/initializers/constants/goal_collection.rb + wave-api-rb/app/models/goal_collection.rb",
3050
3067
  create: [
3051
3068
  ["name*", "string"],
3052
3069
  ["description", "string"],
3053
3070
  ["member_id", "string"],
3054
3071
  ["teams_ids", "number[]"],
3055
- ["status*", "RockCollectionStatus"],
3072
+ ["status*", "GoalCollectionStatus"],
3056
3073
  ["priority*", "Priority"],
3057
3074
  ["start_date", "string"],
3058
3075
  ["target_date", "string"]
@@ -3592,8 +3609,8 @@ function validateOperationDataJson(operationId2, value) {
3592
3609
  (error) => `Invalid input value for dataJson: ${error}`
3593
3610
  );
3594
3611
  }
3595
- function assertOperationPayload(operationId2, body) {
3596
- const errors = validateOperationDataJson(operationId2, body);
3612
+ function assertOperationPayload(operationId2, body2) {
3613
+ const errors = validateOperationDataJson(operationId2, body2);
3597
3614
  if (errors.length === 0) return;
3598
3615
  throw new CliError({
3599
3616
  message: errors.join(" "),
@@ -3722,11 +3739,11 @@ function parseQueryJson(raw) {
3722
3739
  }
3723
3740
  return parseJsonObject(raw);
3724
3741
  }
3725
- function assertRequiredCreateFields(body, rootKey, requiredFields) {
3742
+ function assertRequiredCreateFields(body2, rootKey, requiredFields) {
3726
3743
  if (!requiredFields || requiredFields.length === 0) {
3727
3744
  return;
3728
3745
  }
3729
- const entity = body[rootKey];
3746
+ const entity = body2[rootKey];
3730
3747
  if (!entity || typeof entity !== "object" || Array.isArray(entity)) {
3731
3748
  throw new CliError({
3732
3749
  message: `Invalid payload. Expected object at "${rootKey}".`,
@@ -3808,7 +3825,7 @@ function registerEntityCrudCommands(program, config) {
3808
3825
  show.option(`--${cliParam} <${cliParam}>`);
3809
3826
  });
3810
3827
  show.action(async (opts, cmd) => {
3811
- const id = idSchema2.parse(opts.id);
3828
+ const id2 = idSchema2.parse(opts.id);
3812
3829
  const context = await resolveCommandContext(cmd.optsWithGlobals());
3813
3830
  const organizationId = resolveOrganizationId(context.organizationId);
3814
3831
  const defaultCommand = `${config.command}.show`;
@@ -3821,14 +3838,14 @@ function registerEntityCrudCommands(program, config) {
3821
3838
  );
3822
3839
  const defaultVariables = normalizeGraphqlVariables2({
3823
3840
  organization_id: organizationId,
3824
- id,
3841
+ id: id2,
3825
3842
  ...mappedShowParams
3826
3843
  });
3827
3844
  const showQuery = config.showQueryFactory ? config.showQueryFactory({
3828
3845
  command: defaultCommand,
3829
3846
  field: defaultField,
3830
3847
  variables: defaultVariables,
3831
- id,
3848
+ id: id2,
3832
3849
  organizationId
3833
3850
  }) : void 0;
3834
3851
  await runGraphqlQueryCommand({
@@ -3846,23 +3863,23 @@ function registerEntityCrudCommands(program, config) {
3846
3863
  entityCommand.command("create").requiredOption("--data-json <dataJson>", createHelp4).action(async (opts, cmd) => {
3847
3864
  const context = await resolveCommandContext(cmd.optsWithGlobals());
3848
3865
  const organizationId = resolveOrganizationId(context.organizationId);
3849
- let body = normalizeBody(String(opts.dataJson), config.rootKey);
3866
+ let body2 = normalizeBody(String(opts.dataJson), config.rootKey);
3850
3867
  if (config.normalizeCreateBody) {
3851
- body = config.normalizeCreateBody(body);
3868
+ body2 = config.normalizeCreateBody(body2);
3852
3869
  }
3853
- assertOperationPayload(`${config.command}.create`, body);
3854
- assertRequiredCreateFields(body, config.rootKey, config.requiredCreateFields);
3870
+ assertOperationPayload(`${config.command}.create`, body2);
3871
+ assertRequiredCreateFields(body2, config.rootKey, config.requiredCreateFields);
3855
3872
  const defaultCommand = `${config.command}.create`;
3856
3873
  const defaultField = `create_${toSingularResourceName(config.resourcePath)}`;
3857
3874
  const defaultVariables = {
3858
3875
  organization_id: organizationId,
3859
- params: body
3876
+ params: body2
3860
3877
  };
3861
3878
  const createMutation = config.createMutationFactory ? config.createMutationFactory({
3862
3879
  command: defaultCommand,
3863
3880
  field: defaultField,
3864
3881
  variables: defaultVariables,
3865
- body,
3882
+ body: body2,
3866
3883
  organizationId
3867
3884
  }) : void 0;
3868
3885
  await runGraphqlMutationCommand({
@@ -3876,14 +3893,14 @@ function registerEntityCrudCommands(program, config) {
3876
3893
  });
3877
3894
  });
3878
3895
  entityCommand.command("update").requiredOption("--id <id>").requiredOption("--data-json <dataJson>", updateHelp5).action(async (opts, cmd) => {
3879
- const id = idSchema2.parse(opts.id);
3896
+ const id2 = idSchema2.parse(opts.id);
3880
3897
  const context = await resolveCommandContext(cmd.optsWithGlobals());
3881
3898
  const organizationId = resolveOrganizationId(context.organizationId);
3882
- let body = normalizeBody(String(opts.dataJson), config.rootKey);
3899
+ let body2 = normalizeBody(String(opts.dataJson), config.rootKey);
3883
3900
  if (config.normalizeUpdateBody) {
3884
- body = config.normalizeUpdateBody(body);
3901
+ body2 = config.normalizeUpdateBody(body2);
3885
3902
  }
3886
- assertOperationPayload(`${config.command}.update`, body);
3903
+ assertOperationPayload(`${config.command}.update`, body2);
3887
3904
  const singular = toSingularResourceName(config.resourcePath);
3888
3905
  await runGraphqlMutationCommand({
3889
3906
  command: `${config.command}.update`,
@@ -3891,14 +3908,14 @@ function registerEntityCrudCommands(program, config) {
3891
3908
  field: `update_${singular}`,
3892
3909
  variables: {
3893
3910
  organization_id: organizationId,
3894
- [`${singular}_id`]: id,
3895
- params: body
3911
+ [`${singular}_id`]: id2,
3912
+ params: body2
3896
3913
  }
3897
3914
  });
3898
3915
  });
3899
3916
  for (const mutation of config.idMutationCommands ?? []) {
3900
3917
  entityCommand.command(mutation.command).description(mutation.description).requiredOption("--id <id>").action(async (opts, cmd) => {
3901
- const id = idSchema2.parse(opts.id);
3918
+ const id2 = idSchema2.parse(opts.id);
3902
3919
  const context = await resolveCommandContext(cmd.optsWithGlobals());
3903
3920
  const organizationId = resolveOrganizationId(context.organizationId);
3904
3921
  await runGraphqlMutationCommand({
@@ -3907,7 +3924,7 @@ function registerEntityCrudCommands(program, config) {
3907
3924
  field: mutation.field,
3908
3925
  variables: {
3909
3926
  organization_id: organizationId,
3910
- [mutation.idVariable]: id
3927
+ [mutation.idVariable]: id2
3911
3928
  }
3912
3929
  });
3913
3930
  });
@@ -3981,28 +3998,28 @@ function parseProjectPriority(value) {
3981
3998
  return parsed.data.toUpperCase();
3982
3999
  }
3983
4000
  function normalizeProjectRowForDisplay(row) {
3984
- const record = asRecord2(row);
3985
- if (!record) return row;
3986
- const attributes = asRecord2(record.attributes);
3987
- const topLevelName = toNonEmptyString(record.name);
3988
- const topLevelTitle = toNonEmptyString(record.title);
4001
+ const record2 = asRecord2(row);
4002
+ if (!record2) return row;
4003
+ const attributes = asRecord2(record2.attributes);
4004
+ const topLevelName = toNonEmptyString(record2.name);
4005
+ const topLevelTitle = toNonEmptyString(record2.title);
3989
4006
  const attributeName = toNonEmptyString(attributes?.name);
3990
4007
  const attributeTitle = toNonEmptyString(attributes?.title);
3991
4008
  if (!topLevelName && !topLevelTitle && !attributeName && !attributeTitle) {
3992
- return record;
4009
+ return record2;
3993
4010
  }
3994
4011
  return {
3995
- ...record,
4012
+ ...record2,
3996
4013
  ...topLevelName ? {} : attributeName ? { name: attributeName } : {},
3997
4014
  ...topLevelTitle ? {} : attributeTitle ? { title: attributeTitle } : {}
3998
4015
  };
3999
4016
  }
4000
4017
  function normalizeProjectsListForDisplay(payload) {
4001
- const record = asRecord2(payload);
4002
- if (!record || !Array.isArray(record.data)) return payload;
4018
+ const record2 = asRecord2(payload);
4019
+ if (!record2 || !Array.isArray(record2.data)) return payload;
4003
4020
  return {
4004
- ...record,
4005
- data: record.data.map((row) => normalizeProjectRowForDisplay(row))
4021
+ ...record2,
4022
+ data: record2.data.map((row) => normalizeProjectRowForDisplay(row))
4006
4023
  };
4007
4024
  }
4008
4025
  function registerProjectCommands(program) {
@@ -4052,7 +4069,7 @@ function registerProjectCommands(program) {
4052
4069
  transformData: normalizeProjectsListForDisplay
4053
4070
  });
4054
4071
  projects.command("show").requiredOption("--id <id>").action(async (opts, cmd) => {
4055
- const id = idSchema3.parse(opts.id);
4072
+ const id2 = idSchema3.parse(opts.id);
4056
4073
  const context = await resolveCommandContext(cmd.optsWithGlobals());
4057
4074
  const organizationId = resolveOrganizationId(context.organizationId);
4058
4075
  await runGraphqlQueryCommand({
@@ -4062,7 +4079,7 @@ function registerProjectCommands(program) {
4062
4079
  field: "project",
4063
4080
  variables: {
4064
4081
  organization_id: organizationId,
4065
- id
4082
+ id: id2
4066
4083
  },
4067
4084
  isShow: true,
4068
4085
  selectionSet: projectShowFullSelectionSet,
@@ -4072,30 +4089,30 @@ function registerProjectCommands(program) {
4072
4089
  projects.command("create").requiredOption("--data-json <dataJson>", projectCreateDataJsonHelp).action(async (opts, cmd) => {
4073
4090
  const context = await resolveCommandContext(cmd.optsWithGlobals());
4074
4091
  const organizationId = resolveOrganizationId(context.organizationId);
4075
- const body = __testables.normalizeBody(String(opts.dataJson), "project");
4092
+ const body2 = __testables.normalizeBody(String(opts.dataJson), "project");
4076
4093
  await runGraphqlMutationCommand({
4077
4094
  command: "projects.create",
4078
4095
  runtimeOptions: context.runtimeOptions,
4079
4096
  field: "create_project",
4080
4097
  variables: {
4081
4098
  organization_id: organizationId,
4082
- params: body
4099
+ params: body2
4083
4100
  }
4084
4101
  });
4085
4102
  });
4086
4103
  projects.command("update").requiredOption("--id <id>").requiredOption("--data-json <dataJson>", projectUpdateDataJsonHelp).action(async (opts, cmd) => {
4087
- const id = idSchema3.parse(opts.id);
4104
+ const id2 = idSchema3.parse(opts.id);
4088
4105
  const context = await resolveCommandContext(cmd.optsWithGlobals());
4089
4106
  const organizationId = resolveOrganizationId(context.organizationId);
4090
- const body = __testables.normalizeBody(String(opts.dataJson), "project");
4107
+ const body2 = __testables.normalizeBody(String(opts.dataJson), "project");
4091
4108
  await runGraphqlMutationCommand({
4092
4109
  command: "projects.update",
4093
4110
  runtimeOptions: context.runtimeOptions,
4094
4111
  field: "update_project",
4095
4112
  variables: {
4096
4113
  organization_id: organizationId,
4097
- project_id: id,
4098
- params: body
4114
+ project_id: id2,
4115
+ params: body2
4099
4116
  },
4100
4117
  variableTypes: {
4101
4118
  organization_id: "ID!",
@@ -4106,30 +4123,30 @@ function registerProjectCommands(program) {
4106
4123
  });
4107
4124
  }
4108
4125
 
4109
- // src/commands/rocks.ts
4126
+ // src/commands/goals.ts
4110
4127
  import { z as z6 } from "zod";
4111
4128
  var idSchema4 = z6.string().min(1);
4112
- var rockCollectionIdSchema = z6.string().min(1);
4113
- var statusSchema = z6.enum(["on_track", "at_risk", "off_track"]);
4114
- var createHelp = buildDataJsonHelp("rock", "create") ?? 'JSON object for rock or {"rock": {...}}';
4115
- var updateHelp = buildDataJsonHelp("rock", "update") ?? 'JSON object for rock or {"rock": {...}}';
4116
- function registerRockCommands(program) {
4117
- const rocks = program.command("rocks").description("Rock operations");
4118
- rocks.command("list").option("--page <page>").option("--per <per>").option("--rock-collection-id <rockCollectionId>").option("--start-date <startDate>").option("--rock-type <rockType>").option("--team-id <teamId>").option("--member-id <memberId>").option("--meeting-id <meetingId>").option("--annual-objective-id <annualObjectiveId>").option("--quarterly-objective-id <quarterlyObjectiveId>").action(async (opts, cmd) => {
4129
+ var goalCollectionIdSchema = z6.string().min(1);
4130
+ var statusSchema = z6.enum(["on_track", "off_track", "done"]);
4131
+ var createHelp = buildDataJsonHelp("goal", "create") ?? 'JSON object for goal or {"goal": {...}}';
4132
+ var updateHelp = buildDataJsonHelp("goal", "update") ?? 'JSON object for goal or {"goal": {...}}';
4133
+ function registerGoalCommands(program) {
4134
+ const goals = program.command("goals").description("Goal operations");
4135
+ goals.command("list").option("--page <page>").option("--per <per>").option("--goal-collection-id <goalCollectionId>").option("--start-date <startDate>").option("--goal-type <goalType>").option("--team-id <teamId>").option("--member-id <memberId>").option("--meeting-id <meetingId>").option("--annual-objective-id <annualObjectiveId>").option("--quarterly-objective-id <quarterlyObjectiveId>").action(async (opts, cmd) => {
4119
4136
  const context = await resolveCommandContext(cmd.optsWithGlobals());
4120
4137
  const organizationId = resolveOrganizationId(context.organizationId);
4121
- const rockCollectionId = opts.rockCollectionId ? rockCollectionIdSchema.parse(opts.rockCollectionId) : void 0;
4138
+ const goalCollectionId = opts.goalCollectionId ? goalCollectionIdSchema.parse(opts.goalCollectionId) : void 0;
4122
4139
  await runGraphqlQueryCommand({
4123
- command: "rocks.list",
4140
+ command: "goals.list",
4124
4141
  runtimeOptions: context.runtimeOptions,
4125
- field: "rocks",
4142
+ field: "goals",
4126
4143
  variables: normalizeGraphqlVariables2({
4127
4144
  organization_id: organizationId,
4128
4145
  page: opts.page,
4129
4146
  per: opts.per,
4130
- rock_collection_id: rockCollectionId,
4147
+ goal_collection_id: goalCollectionId,
4131
4148
  start_date: opts.startDate,
4132
- rock_type: opts.rockType,
4149
+ goal_type: opts.goalType,
4133
4150
  team_id: opts.teamId,
4134
4151
  member_id: opts.memberId,
4135
4152
  meeting_id: opts.meetingId,
@@ -4139,69 +4156,69 @@ function registerRockCommands(program) {
4139
4156
  isList: true
4140
4157
  });
4141
4158
  });
4142
- registerGraphqlSearchCommand(rocks, {
4143
- command: "rocks",
4144
- field: "rocks"
4159
+ registerGraphqlSearchCommand(goals, {
4160
+ command: "goals",
4161
+ field: "goals"
4145
4162
  });
4146
- rocks.command("show").requiredOption("--id <id>").action(async (opts, cmd) => {
4147
- const id = idSchema4.parse(opts.id);
4163
+ goals.command("show").requiredOption("--id <id>").action(async (opts, cmd) => {
4164
+ const id2 = idSchema4.parse(opts.id);
4148
4165
  const context = await resolveCommandContext(cmd.optsWithGlobals());
4149
4166
  const organizationId = resolveOrganizationId(context.organizationId);
4150
4167
  await runGraphqlQueryCommand({
4151
- command: "rocks.show",
4168
+ command: "goals.show",
4152
4169
  runtimeOptions: context.runtimeOptions,
4153
- field: "rock",
4170
+ field: "goal",
4154
4171
  variables: {
4155
4172
  organization_id: organizationId,
4156
- id
4173
+ id: id2
4157
4174
  },
4158
4175
  isShow: true
4159
4176
  });
4160
4177
  });
4161
- rocks.command("update-status").requiredOption("--id <id>").requiredOption("--status <status>").action(async (opts, cmd) => {
4162
- const id = idSchema4.parse(opts.id);
4178
+ goals.command("update-status").requiredOption("--id <id>").requiredOption("--status <status>").action(async (opts, cmd) => {
4179
+ const id2 = idSchema4.parse(opts.id);
4163
4180
  const status = statusSchema.parse(opts.status);
4164
4181
  const context = await resolveCommandContext(cmd.optsWithGlobals());
4165
4182
  const organizationId = resolveOrganizationId(context.organizationId);
4166
4183
  await runGraphqlMutationCommand({
4167
- command: "rocks.update-status",
4184
+ command: "goals.update-status",
4168
4185
  runtimeOptions: context.runtimeOptions,
4169
- field: "update_rock",
4186
+ field: "update_goal",
4170
4187
  variables: {
4171
4188
  organization_id: organizationId,
4172
- rock_id: id,
4173
- params: { rock: { status } }
4189
+ goal_id: id2,
4190
+ params: { goal: { status } }
4174
4191
  }
4175
4192
  });
4176
4193
  });
4177
- rocks.command("create").requiredOption("--data-json <dataJson>", createHelp).action(async (opts, cmd) => {
4194
+ goals.command("create").requiredOption("--data-json <dataJson>", createHelp).action(async (opts, cmd) => {
4178
4195
  const context = await resolveCommandContext(cmd.optsWithGlobals());
4179
4196
  const organizationId = resolveOrganizationId(context.organizationId);
4180
- const body = __testables.normalizeBody(String(opts.dataJson), "rock");
4181
- __testables.assertRequiredCreateFields(body, "rock", ["rock_collection_id"]);
4197
+ const body2 = __testables.normalizeBody(String(opts.dataJson), "goal");
4198
+ __testables.assertRequiredCreateFields(body2, "goal", ["goal_collection_id"]);
4182
4199
  await runGraphqlMutationCommand({
4183
- command: "rocks.create",
4200
+ command: "goals.create",
4184
4201
  runtimeOptions: context.runtimeOptions,
4185
- field: "create_rock",
4202
+ field: "create_goal",
4186
4203
  variables: {
4187
4204
  organization_id: organizationId,
4188
- params: body
4205
+ params: body2
4189
4206
  }
4190
4207
  });
4191
4208
  });
4192
- rocks.command("update").requiredOption("--id <id>").requiredOption("--data-json <dataJson>", updateHelp).action(async (opts, cmd) => {
4193
- const id = idSchema4.parse(opts.id);
4209
+ goals.command("update").requiredOption("--id <id>").requiredOption("--data-json <dataJson>", updateHelp).action(async (opts, cmd) => {
4210
+ const id2 = idSchema4.parse(opts.id);
4194
4211
  const context = await resolveCommandContext(cmd.optsWithGlobals());
4195
4212
  const organizationId = resolveOrganizationId(context.organizationId);
4196
- const body = __testables.normalizeBody(String(opts.dataJson), "rock");
4213
+ const body2 = __testables.normalizeBody(String(opts.dataJson), "goal");
4197
4214
  await runGraphqlMutationCommand({
4198
- command: "rocks.update",
4215
+ command: "goals.update",
4199
4216
  runtimeOptions: context.runtimeOptions,
4200
- field: "update_rock",
4217
+ field: "update_goal",
4201
4218
  variables: {
4202
4219
  organization_id: organizationId,
4203
- rock_id: id,
4204
- params: body
4220
+ goal_id: id2,
4221
+ params: body2
4205
4222
  }
4206
4223
  });
4207
4224
  });
@@ -4263,8 +4280,8 @@ function toStringArray(value, field) {
4263
4280
  const normalized = items.map((item) => String(item).trim()).filter((item) => item.length > 0);
4264
4281
  return normalized.length > 0 ? normalized : void 0;
4265
4282
  }
4266
- function normalizeMeetingCreateBody(body) {
4267
- const entity = body.meeting;
4283
+ function normalizeMeetingCreateBody(body2) {
4284
+ const entity = body2.meeting;
4268
4285
  if (!entity || typeof entity !== "object" || Array.isArray(entity)) {
4269
4286
  throw new CliError({
4270
4287
  message: 'Invalid payload. Expected object at "meeting".',
@@ -4345,7 +4362,7 @@ function normalizeMeetingCreateBody(body) {
4345
4362
  if (teamsIds) {
4346
4363
  meeting.teams_ids = teamsIds;
4347
4364
  }
4348
- return { ...body, meeting };
4365
+ return { ...body2, meeting };
4349
4366
  }
4350
4367
  function registerMeetingCommands(program) {
4351
4368
  const meetings = program.command("meetings").description("Meeting operations");
@@ -4375,7 +4392,7 @@ function registerMeetingCommands(program) {
4375
4392
  field: "meetings"
4376
4393
  });
4377
4394
  meetings.command("show").requiredOption("--id <id>").action(async (opts, cmd) => {
4378
- const id = idSchema5.parse(opts.id);
4395
+ const id2 = idSchema5.parse(opts.id);
4379
4396
  const context = await resolveCommandContext(cmd.optsWithGlobals());
4380
4397
  const organizationId = resolveOrganizationId(context.organizationId);
4381
4398
  await runGraphqlQueryCommand({
@@ -4384,7 +4401,7 @@ function registerMeetingCommands(program) {
4384
4401
  field: "meeting",
4385
4402
  variables: {
4386
4403
  organization_id: organizationId,
4387
- id
4404
+ id: id2
4388
4405
  },
4389
4406
  isShow: true
4390
4407
  });
@@ -4406,7 +4423,7 @@ function registerMeetingCommands(program) {
4406
4423
  });
4407
4424
  });
4408
4425
  meetings.command("notes").requiredOption("--id <id>").requiredOption("--content <content>").action(async (opts, cmd) => {
4409
- const id = idSchema5.parse(opts.id);
4426
+ const id2 = idSchema5.parse(opts.id);
4410
4427
  const notes = notesSchema.parse(opts.content);
4411
4428
  const context = await resolveCommandContext(cmd.optsWithGlobals());
4412
4429
  const organizationId = resolveOrganizationId(context.organizationId);
@@ -4416,7 +4433,7 @@ function registerMeetingCommands(program) {
4416
4433
  field: "update_meeting",
4417
4434
  variables: {
4418
4435
  organization_id: organizationId,
4419
- meeting_id: id,
4436
+ meeting_id: id2,
4420
4437
  params: {
4421
4438
  meeting: {
4422
4439
  notes
@@ -4429,30 +4446,30 @@ function registerMeetingCommands(program) {
4429
4446
  const context = await resolveCommandContext(cmd.optsWithGlobals());
4430
4447
  const organizationId = resolveOrganizationId(context.organizationId);
4431
4448
  const rawBody = __testables.normalizeBody(String(opts.dataJson), "meeting");
4432
- const body = normalizeMeetingCreateBody(rawBody);
4449
+ const body2 = normalizeMeetingCreateBody(rawBody);
4433
4450
  await runGraphqlMutationCommand({
4434
4451
  command: "meetings.create",
4435
4452
  runtimeOptions: context.runtimeOptions,
4436
4453
  field: "create_meeting",
4437
4454
  variables: {
4438
4455
  organization_id: organizationId,
4439
- params: body
4456
+ params: body2
4440
4457
  }
4441
4458
  });
4442
4459
  });
4443
4460
  meetings.command("update").requiredOption("--id <id>").requiredOption("--data-json <dataJson>", updateHelp2).action(async (opts, cmd) => {
4444
- const id = idSchema5.parse(opts.id);
4461
+ const id2 = idSchema5.parse(opts.id);
4445
4462
  const context = await resolveCommandContext(cmd.optsWithGlobals());
4446
4463
  const organizationId = resolveOrganizationId(context.organizationId);
4447
- const body = __testables.normalizeBody(String(opts.dataJson), "meeting");
4464
+ const body2 = __testables.normalizeBody(String(opts.dataJson), "meeting");
4448
4465
  await runGraphqlMutationCommand({
4449
4466
  command: "meetings.update",
4450
4467
  runtimeOptions: context.runtimeOptions,
4451
4468
  field: "update_meeting",
4452
4469
  variables: {
4453
4470
  organization_id: organizationId,
4454
- meeting_id: id,
4455
- params: body
4471
+ meeting_id: id2,
4472
+ params: body2
4456
4473
  }
4457
4474
  });
4458
4475
  });
@@ -4580,7 +4597,7 @@ function registerMemberCommands(program) {
4580
4597
  });
4581
4598
  });
4582
4599
  members.command("show").requiredOption("--id <id>").action(async (opts, cmd) => {
4583
- const id = idSchema6.parse(opts.id);
4600
+ const id2 = idSchema6.parse(opts.id);
4584
4601
  const context = await resolveCommandContext(cmd.optsWithGlobals());
4585
4602
  const organizationId = resolveOrganizationId(context.organizationId);
4586
4603
  await runGraphqlQueryCommand({
@@ -4589,7 +4606,7 @@ function registerMemberCommands(program) {
4589
4606
  field: "member",
4590
4607
  variables: {
4591
4608
  organization_id: organizationId,
4592
- id
4609
+ id: id2
4593
4610
  },
4594
4611
  isShow: true
4595
4612
  });
@@ -4597,30 +4614,30 @@ function registerMemberCommands(program) {
4597
4614
  members.command("create").requiredOption("--data-json <dataJson>", createHelp3).action(async (opts, cmd) => {
4598
4615
  const context = await resolveCommandContext(cmd.optsWithGlobals());
4599
4616
  const organizationId = resolveOrganizationId(context.organizationId);
4600
- const body = __testables.normalizeBody(String(opts.dataJson), "member");
4617
+ const body2 = __testables.normalizeBody(String(opts.dataJson), "member");
4601
4618
  await runGraphqlMutationCommand({
4602
4619
  command: "members.create",
4603
4620
  runtimeOptions: context.runtimeOptions,
4604
4621
  field: "create_member",
4605
4622
  variables: {
4606
4623
  organization_id: organizationId,
4607
- params: body
4624
+ params: body2
4608
4625
  }
4609
4626
  });
4610
4627
  });
4611
4628
  members.command("update").requiredOption("--id <id>").requiredOption("--data-json <dataJson>", updateHelp3).action(async (opts, cmd) => {
4612
- const id = idSchema6.parse(opts.id);
4629
+ const id2 = idSchema6.parse(opts.id);
4613
4630
  const context = await resolveCommandContext(cmd.optsWithGlobals());
4614
4631
  const organizationId = resolveOrganizationId(context.organizationId);
4615
- const body = __testables.normalizeBody(String(opts.dataJson), "member");
4632
+ const body2 = __testables.normalizeBody(String(opts.dataJson), "member");
4616
4633
  await runGraphqlMutationCommand({
4617
4634
  command: "members.update",
4618
4635
  runtimeOptions: context.runtimeOptions,
4619
4636
  field: "update_member",
4620
4637
  variables: {
4621
4638
  organization_id: organizationId,
4622
- member_id: id,
4623
- params: body
4639
+ member_id: id2,
4640
+ params: body2
4624
4641
  }
4625
4642
  });
4626
4643
  });
@@ -4741,7 +4758,7 @@ function registerSkillCommands(program) {
4741
4758
  });
4742
4759
  });
4743
4760
  skills.command("show").description("Read one persisted Skill record by id or slug").requiredOption("--id <idOrSlug>", "Skill id or slug").option("--json", "Emit the stable JSON envelope").action(async (opts, cmd) => {
4744
- const id = idSchema7.parse(opts.id);
4761
+ const id2 = idSchema7.parse(opts.id);
4745
4762
  const context = await resolveCommandContext(cmd.optsWithGlobals());
4746
4763
  const organizationId = resolveOrganizationId(context.organizationId);
4747
4764
  await runGraphqlQueryCommand({
@@ -4751,7 +4768,7 @@ function registerSkillCommands(program) {
4751
4768
  field: "skill",
4752
4769
  variables: {
4753
4770
  organization_id: organizationId,
4754
- id
4771
+ id: id2
4755
4772
  },
4756
4773
  variableTypes: {
4757
4774
  organization_id: "ID!",
@@ -4820,7 +4837,7 @@ function registerIssueCommands(program) {
4820
4837
  field: "issues"
4821
4838
  });
4822
4839
  issues.command("show").requiredOption("--id <id>").action(async (opts, cmd) => {
4823
- const id = idSchema8.parse(opts.id);
4840
+ const id2 = idSchema8.parse(opts.id);
4824
4841
  const context = await resolveCommandContext(cmd.optsWithGlobals());
4825
4842
  const organizationId = resolveOrganizationId(context.organizationId);
4826
4843
  await runGraphqlQueryCommand({
@@ -4829,7 +4846,7 @@ function registerIssueCommands(program) {
4829
4846
  field: "issue",
4830
4847
  variables: {
4831
4848
  organization_id: organizationId,
4832
- id
4849
+ id: id2
4833
4850
  },
4834
4851
  isShow: true
4835
4852
  });
@@ -4862,18 +4879,18 @@ function registerIssueCommands(program) {
4862
4879
  });
4863
4880
  });
4864
4881
  issues.command("update").requiredOption("--id <id>").requiredOption("--data-json <dataJson>", updateHelp4).action(async (opts, cmd) => {
4865
- const id = idSchema8.parse(opts.id);
4882
+ const id2 = idSchema8.parse(opts.id);
4866
4883
  const context = await resolveCommandContext(cmd.optsWithGlobals());
4867
4884
  const organizationId = resolveOrganizationId(context.organizationId);
4868
- const body = __testables.normalizeBody(String(opts.dataJson), "issue");
4885
+ const body2 = __testables.normalizeBody(String(opts.dataJson), "issue");
4869
4886
  await runGraphqlMutationCommand({
4870
4887
  command: "issues.update",
4871
4888
  runtimeOptions: context.runtimeOptions,
4872
4889
  field: "update_issue",
4873
4890
  variables: {
4874
4891
  organization_id: organizationId,
4875
- issue_id: id,
4876
- params: body
4892
+ issue_id: id2,
4893
+ params: body2
4877
4894
  }
4878
4895
  });
4879
4896
  });
@@ -4973,12 +4990,12 @@ var SMART_KPI_NAMES = [
4973
4990
  "total_card_impressions",
4974
4991
  "total_card_clicks",
4975
4992
  "total_card_click_rate",
4976
- "rock_total_new_rock_groups",
4977
- "rock_total_rock_groups",
4978
- "rock_total_new_rocks",
4979
- "rock_total_new_milestones",
4980
- "rock_total_completed_milestones",
4981
- "rock_total_incomplete_milestones",
4993
+ "goal_total_new_goal_groups",
4994
+ "goal_total_goal_groups",
4995
+ "goal_total_new_goals",
4996
+ "goal_total_new_milestones",
4997
+ "goal_total_completed_milestones",
4998
+ "goal_total_incomplete_milestones",
4982
4999
  "project_total_projects",
4983
5000
  "project_total_new_projects",
4984
5001
  "project_total_new_tasks",
@@ -5091,8 +5108,8 @@ var SCORECARD_TRENDS = /* @__PURE__ */ new Set(["average", "total"]);
5091
5108
  function isRecord2(value) {
5092
5109
  return Boolean(value) && typeof value === "object" && !Array.isArray(value);
5093
5110
  }
5094
- function ensureEntityObject(body, rootKey) {
5095
- const entity = body[rootKey];
5111
+ function ensureEntityObject(body2, rootKey) {
5112
+ const entity = body2[rootKey];
5096
5113
  if (!isRecord2(entity)) {
5097
5114
  throw new CliError({
5098
5115
  message: `Invalid payload. Expected object at "${rootKey}".`,
@@ -5112,12 +5129,12 @@ function throwMissingRequiredCreateFields(rootKey, fields) {
5112
5129
  details: { requiredFields: fields, rootKey }
5113
5130
  });
5114
5131
  }
5115
- function normalizeTodosCreateBody(body) {
5116
- const todo = ensureEntityObject(body, "todo");
5132
+ function normalizeTodosCreateBody(body2) {
5133
+ const todo = ensureEntityObject(body2, "todo");
5117
5134
  const rawStatus = todo.status;
5118
5135
  if (rawStatus === void 0 || rawStatus === null || String(rawStatus).trim().length === 0) {
5119
5136
  todo.status = "open";
5120
- return { ...body, todo };
5137
+ return { ...body2, todo };
5121
5138
  }
5122
5139
  if (typeof rawStatus !== "string" || !TODO_STATUSES.has(rawStatus)) {
5123
5140
  throw new CliError({
@@ -5128,7 +5145,7 @@ function normalizeTodosCreateBody(body) {
5128
5145
  details: { allowed: Array.from(TODO_STATUSES) }
5129
5146
  });
5130
5147
  }
5131
- return { ...body, todo };
5148
+ return { ...body2, todo };
5132
5149
  }
5133
5150
  function asNonEmptyString2(value) {
5134
5151
  if (typeof value !== "string") {
@@ -5153,8 +5170,8 @@ function validateEnumField(params) {
5153
5170
  }
5154
5171
  return value;
5155
5172
  }
5156
- function normalizeKnowledgeCreateBody(body) {
5157
- const content = ensureEntityObject(body, "content");
5173
+ function normalizeKnowledgeCreateBody(body2) {
5174
+ const content = ensureEntityObject(body2, "content");
5158
5175
  const contentType = validateEnumField({
5159
5176
  rawValue: content.content_type,
5160
5177
  field: "content.content_type",
@@ -5177,10 +5194,10 @@ function normalizeKnowledgeCreateBody(body) {
5177
5194
  throwMissingRequiredCreateFields("content", ["member_id"]);
5178
5195
  }
5179
5196
  content.member_id = memberId;
5180
- return { ...body, content };
5197
+ return { ...body2, content };
5181
5198
  }
5182
- function normalizeNewsCreateBody(body) {
5183
- const headline = ensureEntityObject(body, "headline");
5199
+ function normalizeNewsCreateBody(body2) {
5200
+ const headline = ensureEntityObject(body2, "headline");
5184
5201
  const memberId = asNonEmptyString2(headline.member_id);
5185
5202
  if (!memberId) {
5186
5203
  throwMissingRequiredCreateFields("headline", ["member_id"]);
@@ -5206,10 +5223,10 @@ function normalizeNewsCreateBody(body) {
5206
5223
  throwMissingRequiredCreateFields("headline", ["headline_type"]);
5207
5224
  }
5208
5225
  headline.headline_type = headlineType;
5209
- return { ...body, headline };
5226
+ return { ...body2, headline };
5210
5227
  }
5211
- function normalizeQuestionsCreateBody(body) {
5212
- const question = ensureEntityObject(body, "question");
5228
+ function normalizeQuestionsCreateBody(body2) {
5229
+ const question = ensureEntityObject(body2, "question");
5213
5230
  const summary = asNonEmptyString2(question.summary);
5214
5231
  const currentName = asNonEmptyString2(question.name);
5215
5232
  if (!currentName && summary) {
@@ -5235,10 +5252,10 @@ function normalizeQuestionsCreateBody(body) {
5235
5252
  if (status) {
5236
5253
  question.status = status;
5237
5254
  }
5238
- return { ...body, question };
5255
+ return { ...body2, question };
5239
5256
  }
5240
- function normalizeQuestionsUpdateBody(body) {
5241
- const question = ensureEntityObject(body, "question");
5257
+ function normalizeQuestionsUpdateBody(body2) {
5258
+ const question = ensureEntityObject(body2, "question");
5242
5259
  const summary = asNonEmptyString2(question.summary);
5243
5260
  const currentName = asNonEmptyString2(question.name);
5244
5261
  if (!currentName && summary) {
@@ -5258,10 +5275,10 @@ function normalizeQuestionsUpdateBody(body) {
5258
5275
  if (status) {
5259
5276
  question.status = status;
5260
5277
  }
5261
- return { ...body, question };
5278
+ return { ...body2, question };
5262
5279
  }
5263
- function normalizeSurveysCreateBody(body) {
5264
- const survey = ensureEntityObject(body, "survey");
5280
+ function normalizeSurveysCreateBody(body2) {
5281
+ const survey = ensureEntityObject(body2, "survey");
5265
5282
  const title = asNonEmptyString2(survey.title);
5266
5283
  const currentName = asNonEmptyString2(survey.name);
5267
5284
  if (!currentName && title) {
@@ -5288,10 +5305,10 @@ function normalizeSurveysCreateBody(body) {
5288
5305
  }
5289
5306
  survey.name = name;
5290
5307
  survey.recipient_type = recipientType;
5291
- return { ...body, survey };
5308
+ return { ...body2, survey };
5292
5309
  }
5293
- function normalizeSurveysUpdateBody(body) {
5294
- const survey = ensureEntityObject(body, "survey");
5310
+ function normalizeSurveysUpdateBody(body2) {
5311
+ const survey = ensureEntityObject(body2, "survey");
5295
5312
  const title = asNonEmptyString2(survey.title);
5296
5313
  const currentName = asNonEmptyString2(survey.name);
5297
5314
  if (!currentName && title) {
@@ -5316,10 +5333,10 @@ function normalizeSurveysUpdateBody(body) {
5316
5333
  if (recipientType) {
5317
5334
  survey.recipient_type = recipientType;
5318
5335
  }
5319
- return { ...body, survey };
5336
+ return { ...body2, survey };
5320
5337
  }
5321
- function normalizeAccountabilityCreateBody(body) {
5322
- const responsibility = ensureEntityObject(body, "responsibility");
5338
+ function normalizeAccountabilityCreateBody(body2) {
5339
+ const responsibility = ensureEntityObject(body2, "responsibility");
5323
5340
  const summary = asNonEmptyString2(responsibility.summary);
5324
5341
  const currentName = asNonEmptyString2(responsibility.name);
5325
5342
  if (!currentName && summary) {
@@ -5338,17 +5355,17 @@ function normalizeAccountabilityCreateBody(body) {
5338
5355
  delete responsibility.organizationId;
5339
5356
  responsibility.name = name;
5340
5357
  responsibility.member_id = memberId;
5341
- return { ...body, responsibility };
5358
+ return { ...body2, responsibility };
5342
5359
  }
5343
- function normalizeAccountabilityUpdateBody(body) {
5344
- const responsibility = ensureEntityObject(body, "responsibility");
5360
+ function normalizeAccountabilityUpdateBody(body2) {
5361
+ const responsibility = ensureEntityObject(body2, "responsibility");
5345
5362
  const summary = asNonEmptyString2(responsibility.summary);
5346
5363
  const currentName = asNonEmptyString2(responsibility.name);
5347
5364
  if (!currentName && summary) {
5348
5365
  responsibility.name = summary;
5349
5366
  }
5350
5367
  delete responsibility.summary;
5351
- return { ...body, responsibility };
5368
+ return { ...body2, responsibility };
5352
5369
  }
5353
5370
  function parseSmartKpiViewCreateBody(raw) {
5354
5371
  let parsed;
@@ -5373,8 +5390,8 @@ function parseSmartKpiViewCreateBody(raw) {
5373
5390
  const rooted = parsed.smart_kpi_view;
5374
5391
  return isRecord2(rooted) ? parsed : { smart_kpi_view: parsed };
5375
5392
  }
5376
- function normalizeSmartKpiViewCreateBody(body) {
5377
- const smartKpiView = ensureEntityObject(body, "smart_kpi_view");
5393
+ function normalizeSmartKpiViewCreateBody(body2) {
5394
+ const smartKpiView = ensureEntityObject(body2, "smart_kpi_view");
5378
5395
  const name = asNonEmptyString2(smartKpiView.name);
5379
5396
  if (!name) {
5380
5397
  throwMissingRequiredCreateFields("smart_kpi_view", ["name"]);
@@ -5384,8 +5401,8 @@ function normalizeSmartKpiViewCreateBody(body) {
5384
5401
  delete smartKpiView.organizationId;
5385
5402
  return { smart_kpi_view: smartKpiView };
5386
5403
  }
5387
- function normalizeScorecardsCreateBody(body) {
5388
- const measurable = ensureEntityObject(body, "measurable");
5404
+ function normalizeScorecardsCreateBody(body2) {
5405
+ const measurable = ensureEntityObject(body2, "measurable");
5389
5406
  const interval = validateEnumField({
5390
5407
  rawValue: measurable.interval,
5391
5408
  field: "measurable.interval",
@@ -5400,7 +5417,7 @@ function normalizeScorecardsCreateBody(body) {
5400
5417
  message: "Invalid measurable.trend. Use one of: average, total."
5401
5418
  });
5402
5419
  measurable.trend = trend ?? "average";
5403
- return { ...body, measurable };
5420
+ return { ...body2, measurable };
5404
5421
  }
5405
5422
  function buildKpisCreateMutation(params) {
5406
5423
  const entity = params.body.smart_kpi;
@@ -5489,7 +5506,7 @@ function registerSmartKpiViewCommands(program) {
5489
5506
  ).action(async (opts, cmd) => {
5490
5507
  const context = await resolveCommandContext(cmd.optsWithGlobals());
5491
5508
  const organizationId = resolveOrganizationId(context.organizationId);
5492
- const body = normalizeSmartKpiViewCreateBody(
5509
+ const body2 = normalizeSmartKpiViewCreateBody(
5493
5510
  parseSmartKpiViewCreateBody(String(opts.dataJson))
5494
5511
  );
5495
5512
  await runGraphqlMutationCommand({
@@ -5498,7 +5515,7 @@ function registerSmartKpiViewCommands(program) {
5498
5515
  field: "create_smart_kpi_view",
5499
5516
  variables: {
5500
5517
  organization_id: organizationId,
5501
- params: body
5518
+ params: body2
5502
5519
  }
5503
5520
  });
5504
5521
  });
@@ -5577,10 +5594,10 @@ function registerSystemToolCommands(program) {
5577
5594
  allowQueryJson: false
5578
5595
  });
5579
5596
  registerEntityCrudCommands(program, {
5580
- command: "rock-collections",
5581
- description: "Rock collection operations",
5582
- resourcePath: "rock_collections",
5583
- rootKey: "rock_collection",
5597
+ command: "goal-collections",
5598
+ description: "Goal collection operations",
5599
+ resourcePath: "goal_collections",
5600
+ rootKey: "goal_collection",
5584
5601
  listParams: ["member_id", "team_ids"],
5585
5602
  showParams: ["current_member_id"],
5586
5603
  allowQueryJson: false
@@ -5640,7 +5657,7 @@ function registerSystemToolCommands(program) {
5640
5657
  normalizeCreateBody: normalizeNewsCreateBody,
5641
5658
  listParams: ["meeting_id", "team_id", "unread"],
5642
5659
  allowQueryJson: false,
5643
- showQueryFactory: ({ id, organizationId }) => ({
5660
+ showQueryFactory: ({ id: id2, organizationId }) => ({
5644
5661
  field: "headlines",
5645
5662
  variables: {
5646
5663
  organization_id: organizationId,
@@ -5658,7 +5675,7 @@ function registerSystemToolCommands(program) {
5658
5675
  if (!row || typeof row !== "object") {
5659
5676
  return false;
5660
5677
  }
5661
- return String(row.id ?? "") === id;
5678
+ return String(row.id ?? "") === id2;
5662
5679
  }) ?? null;
5663
5680
  }
5664
5681
  })
@@ -5702,8 +5719,8 @@ function registerSystemToolCommands(program) {
5702
5719
  description: "KPI operations",
5703
5720
  resourcePath: "smart_kpis",
5704
5721
  rootKey: "smart_kpi",
5705
- createMutationFactory: ({ body, organizationId }) => buildKpisCreateMutation({
5706
- body,
5722
+ createMutationFactory: ({ body: body2, organizationId }) => buildKpisCreateMutation({
5723
+ body: body2,
5707
5724
  organizationId
5708
5725
  }),
5709
5726
  listParams: ["team_id", "member_id", "smart_kpi_view_id", "quarterly_objective_id"],
@@ -5777,7 +5794,7 @@ function registerTeamCommands(program) {
5777
5794
  });
5778
5795
  });
5779
5796
  teams.command("show").requiredOption("--id <id>").action(async (opts, cmd) => {
5780
- const id = idSchema9.parse(opts.id);
5797
+ const id2 = idSchema9.parse(opts.id);
5781
5798
  const context = await resolveCommandContext(cmd.optsWithGlobals());
5782
5799
  const organizationId = resolveOrganizationId(context.organizationId);
5783
5800
  await runGraphqlQueryCommand({
@@ -5786,7 +5803,7 @@ function registerTeamCommands(program) {
5786
5803
  field: "team",
5787
5804
  variables: {
5788
5805
  organization_id: organizationId,
5789
- id
5806
+ id: id2
5790
5807
  },
5791
5808
  isShow: true
5792
5809
  });
@@ -5794,30 +5811,30 @@ function registerTeamCommands(program) {
5794
5811
  teams.command("create").requiredOption("--data-json <dataJson>", 'JSON object for team or {"team": {...}}').action(async (opts, cmd) => {
5795
5812
  const context = await resolveCommandContext(cmd.optsWithGlobals());
5796
5813
  const organizationId = resolveOrganizationId(context.organizationId);
5797
- const body = __testables.normalizeBody(String(opts.dataJson), "team");
5814
+ const body2 = __testables.normalizeBody(String(opts.dataJson), "team");
5798
5815
  await runGraphqlMutationCommand({
5799
5816
  command: "teams.create",
5800
5817
  runtimeOptions: context.runtimeOptions,
5801
5818
  field: "create_team",
5802
5819
  variables: {
5803
5820
  organization_id: organizationId,
5804
- params: body
5821
+ params: body2
5805
5822
  }
5806
5823
  });
5807
5824
  });
5808
5825
  teams.command("update").requiredOption("--id <id>").requiredOption("--data-json <dataJson>", 'JSON object for team or {"team": {...}}').action(async (opts, cmd) => {
5809
- const id = idSchema9.parse(opts.id);
5826
+ const id2 = idSchema9.parse(opts.id);
5810
5827
  const context = await resolveCommandContext(cmd.optsWithGlobals());
5811
5828
  const organizationId = resolveOrganizationId(context.organizationId);
5812
- const body = __testables.normalizeBody(String(opts.dataJson), "team");
5829
+ const body2 = __testables.normalizeBody(String(opts.dataJson), "team");
5813
5830
  await runGraphqlMutationCommand({
5814
5831
  command: "teams.update",
5815
5832
  runtimeOptions: context.runtimeOptions,
5816
5833
  field: "update_team",
5817
5834
  variables: {
5818
5835
  organization_id: organizationId,
5819
- team_id: id,
5820
- params: body
5836
+ team_id: id2,
5837
+ params: body2
5821
5838
  }
5822
5839
  });
5823
5840
  });
@@ -5829,8 +5846,8 @@ var idSchema10 = z13.string().min(1);
5829
5846
  function isRecord3(value) {
5830
5847
  return Boolean(value) && typeof value === "object" && !Array.isArray(value);
5831
5848
  }
5832
- function ensureRootObject(body, rootKey) {
5833
- const root = body[rootKey];
5849
+ function ensureRootObject(body2, rootKey) {
5850
+ const root = body2[rootKey];
5834
5851
  if (!isRecord3(root)) {
5835
5852
  throw new CliError({
5836
5853
  message: `Invalid payload. Expected object at "${rootKey}".`,
@@ -5848,8 +5865,8 @@ function asNonEmptyString3(value) {
5848
5865
  const trimmed = value.trim();
5849
5866
  return trimmed.length > 0 ? trimmed : void 0;
5850
5867
  }
5851
- function normalizeOrganizationUpdateBody(body) {
5852
- const organization = ensureRootObject(body, "organization");
5868
+ function normalizeOrganizationUpdateBody(body2) {
5869
+ const organization = ensureRootObject(body2, "organization");
5853
5870
  const detail = isRecord3(organization.organization_detail_attributes) ? { ...organization.organization_detail_attributes } : {};
5854
5871
  const workspaceName = asNonEmptyString3(organization.workspace_name);
5855
5872
  if (workspaceName) {
@@ -5861,8 +5878,8 @@ function normalizeOrganizationUpdateBody(body) {
5861
5878
  }
5862
5879
  return { organization };
5863
5880
  }
5864
- function normalizeOrganizationMetaProfileUpdateBody(body) {
5865
- const root = ensureRootObject(body, "organization_meta_profile");
5881
+ function normalizeOrganizationMetaProfileUpdateBody(body2) {
5882
+ const root = ensureRootObject(body2, "organization_meta_profile");
5866
5883
  const profile = isRecord3(root.profile) ? { ...root.profile } : {};
5867
5884
  const title = asNonEmptyString3(root.title);
5868
5885
  if (title) {
@@ -5891,8 +5908,8 @@ function normalizeOrganizationMetaProfileUpdateBody(body) {
5891
5908
  }
5892
5909
  return { organization_meta_profile: { profile } };
5893
5910
  }
5894
- function normalizeKeyMetricMetaProfileUpdateBody(body) {
5895
- const root = ensureRootObject(body, "key_metric_meta_profile");
5911
+ function normalizeKeyMetricMetaProfileUpdateBody(body2) {
5912
+ const root = ensureRootObject(body2, "key_metric_meta_profile");
5896
5913
  const profile = isRecord3(root.profile) ? { ...root.profile } : {};
5897
5914
  const annualRevenue = asNonEmptyString3(root.annual_revenue);
5898
5915
  if (annualRevenue) {
@@ -5928,12 +5945,12 @@ function registerOrganizationCommands(program) {
5928
5945
  organizations.command("show").option("--id <id>", "Organization ID (defaults to resolved organization context)").action(async (opts, cmd) => {
5929
5946
  const context = await resolveCommandContext(cmd.optsWithGlobals());
5930
5947
  const fallbackId = resolveOrganizationId(context.organizationId);
5931
- const id = idSchema10.parse(opts.id ?? fallbackId);
5948
+ const id2 = idSchema10.parse(opts.id ?? fallbackId);
5932
5949
  await runGraphqlQueryCommand({
5933
5950
  command: "organizations.show",
5934
5951
  runtimeOptions: context.runtimeOptions,
5935
5952
  field: "organization",
5936
- variables: { id },
5953
+ variables: { id: id2 },
5937
5954
  isShow: true
5938
5955
  });
5939
5956
  });
@@ -5956,16 +5973,16 @@ function registerOrganizationCommands(program) {
5956
5973
  ).action(async (opts, cmd) => {
5957
5974
  const context = await resolveCommandContext(cmd.optsWithGlobals());
5958
5975
  const fallbackId = resolveOrganizationId(context.organizationId);
5959
- const id = idSchema10.parse(opts.id ?? fallbackId);
5976
+ const id2 = idSchema10.parse(opts.id ?? fallbackId);
5960
5977
  const rawBody = __testables.normalizeBody(String(opts.dataJson), "organization");
5961
- const body = normalizeOrganizationUpdateBody(rawBody);
5978
+ const body2 = normalizeOrganizationUpdateBody(rawBody);
5962
5979
  await runGraphqlMutationCommand({
5963
5980
  command: "organizations.update",
5964
5981
  runtimeOptions: context.runtimeOptions,
5965
5982
  field: "update_organization",
5966
5983
  variables: {
5967
- id,
5968
- params: body
5984
+ id: id2,
5985
+ params: body2
5969
5986
  }
5970
5987
  });
5971
5988
  });
@@ -5973,14 +5990,14 @@ function registerOrganizationCommands(program) {
5973
5990
  metaProfile.command("show").option("--id <id>", "Meta profile ID (defaults to resolved organization context)").action(async (opts, cmd) => {
5974
5991
  const context = await resolveCommandContext(cmd.optsWithGlobals());
5975
5992
  const organizationId = resolveOrganizationId(context.organizationId);
5976
- const id = idSchema10.parse(opts.id ?? organizationId);
5993
+ const id2 = idSchema10.parse(opts.id ?? organizationId);
5977
5994
  await runGraphqlQueryCommand({
5978
5995
  command: "organizations.meta-profile.show",
5979
5996
  runtimeOptions: context.runtimeOptions,
5980
5997
  field: "organization_meta_profile",
5981
5998
  variables: {
5982
5999
  organization_id: organizationId,
5983
- id
6000
+ id: id2
5984
6001
  },
5985
6002
  isShow: true
5986
6003
  });
@@ -5991,20 +6008,20 @@ function registerOrganizationCommands(program) {
5991
6008
  ).action(async (opts, cmd) => {
5992
6009
  const context = await resolveCommandContext(cmd.optsWithGlobals());
5993
6010
  const organizationId = resolveOrganizationId(context.organizationId);
5994
- const id = idSchema10.parse(opts.id ?? organizationId);
6011
+ const id2 = idSchema10.parse(opts.id ?? organizationId);
5995
6012
  const rawBody = __testables.normalizeBody(
5996
6013
  String(opts.dataJson),
5997
6014
  "organization_meta_profile"
5998
6015
  );
5999
- const body = normalizeOrganizationMetaProfileUpdateBody(rawBody);
6016
+ const body2 = normalizeOrganizationMetaProfileUpdateBody(rawBody);
6000
6017
  await runGraphqlMutationCommand({
6001
6018
  command: "organizations.meta-profile.update",
6002
6019
  runtimeOptions: context.runtimeOptions,
6003
6020
  field: "update_organization_meta_profile",
6004
6021
  variables: {
6005
6022
  organization_id: organizationId,
6006
- organization_meta_profile_id: id,
6007
- params: body
6023
+ organization_meta_profile_id: id2,
6024
+ params: body2
6008
6025
  }
6009
6026
  });
6010
6027
  });
@@ -6012,14 +6029,14 @@ function registerOrganizationCommands(program) {
6012
6029
  keyMetricMetaProfile.command("show").option("--id <id>", "Meta profile ID (defaults to resolved organization context)").action(async (opts, cmd) => {
6013
6030
  const context = await resolveCommandContext(cmd.optsWithGlobals());
6014
6031
  const organizationId = resolveOrganizationId(context.organizationId);
6015
- const id = idSchema10.parse(opts.id ?? organizationId);
6032
+ const id2 = idSchema10.parse(opts.id ?? organizationId);
6016
6033
  await runGraphqlQueryCommand({
6017
6034
  command: "organizations.key-metric-meta-profile.show",
6018
6035
  runtimeOptions: context.runtimeOptions,
6019
6036
  field: "key_metric_meta_profile",
6020
6037
  variables: {
6021
6038
  organization_id: organizationId,
6022
- id
6039
+ id: id2
6023
6040
  },
6024
6041
  isShow: true
6025
6042
  });
@@ -6030,20 +6047,20 @@ function registerOrganizationCommands(program) {
6030
6047
  ).action(async (opts, cmd) => {
6031
6048
  const context = await resolveCommandContext(cmd.optsWithGlobals());
6032
6049
  const organizationId = resolveOrganizationId(context.organizationId);
6033
- const id = idSchema10.parse(opts.id ?? organizationId);
6050
+ const id2 = idSchema10.parse(opts.id ?? organizationId);
6034
6051
  const rawBody = __testables.normalizeBody(
6035
6052
  String(opts.dataJson),
6036
6053
  "key_metric_meta_profile"
6037
6054
  );
6038
- const body = normalizeKeyMetricMetaProfileUpdateBody(rawBody);
6055
+ const body2 = normalizeKeyMetricMetaProfileUpdateBody(rawBody);
6039
6056
  await runGraphqlMutationCommand({
6040
6057
  command: "organizations.key-metric-meta-profile.update",
6041
6058
  runtimeOptions: context.runtimeOptions,
6042
6059
  field: "update_key_metric_meta_profile",
6043
6060
  variables: {
6044
6061
  organization_id: organizationId,
6045
- key_metric_meta_profile_id: id,
6046
- params: body
6062
+ key_metric_meta_profile_id: id2,
6063
+ params: body2
6047
6064
  }
6048
6065
  });
6049
6066
  });
@@ -6066,8 +6083,8 @@ var STRATEGIC_OBJECTIVE_ALLOWED_UPDATE_KEYS = /* @__PURE__ */ new Set([
6066
6083
  function isRecord4(value) {
6067
6084
  return Boolean(value) && typeof value === "object" && !Array.isArray(value);
6068
6085
  }
6069
- function ensureRootObject2(body, rootKey) {
6070
- const root = body[rootKey];
6086
+ function ensureRootObject2(body2, rootKey) {
6087
+ const root = body2[rootKey];
6071
6088
  if (!isRecord4(root)) {
6072
6089
  throw new CliError({
6073
6090
  message: `Invalid payload. Expected object at "${rootKey}".`,
@@ -6085,8 +6102,8 @@ function asNonEmptyString4(value) {
6085
6102
  const trimmed = value.trim();
6086
6103
  return trimmed.length > 0 ? trimmed : void 0;
6087
6104
  }
6088
- function normalizeStrategicPlanUpdateBody(body) {
6089
- const strategicPlan = ensureRootObject2(body, "strategic_plan");
6105
+ function normalizeStrategicPlanUpdateBody(body2) {
6106
+ const strategicPlan = ensureRootObject2(body2, "strategic_plan");
6090
6107
  const unsupported = Object.keys(strategicPlan).filter(
6091
6108
  (key) => !STRATEGIC_PLAN_ALLOWED_UPDATE_KEYS.has(key)
6092
6109
  );
@@ -6104,8 +6121,8 @@ function normalizeStrategicPlanUpdateBody(body) {
6104
6121
  }
6105
6122
  return { strategic_plan: strategicPlan };
6106
6123
  }
6107
- function normalizeStrategicObjectiveUpdateBody(body) {
6108
- const strategicObjective = ensureRootObject2(body, "strategic_objective");
6124
+ function normalizeStrategicObjectiveUpdateBody(body2) {
6125
+ const strategicObjective = ensureRootObject2(body2, "strategic_objective");
6109
6126
  const title = asNonEmptyString4(strategicObjective.title);
6110
6127
  if (!asNonEmptyString4(strategicObjective.summary) && title) {
6111
6128
  strategicObjective.summary = title;
@@ -6128,8 +6145,8 @@ function normalizeStrategicObjectiveUpdateBody(body) {
6128
6145
  }
6129
6146
  return { strategic_objective: strategicObjective };
6130
6147
  }
6131
- function normalizeAnnualObjectiveCreateBody(body) {
6132
- const annualObjective = ensureRootObject2(body, "annual_objective");
6148
+ function normalizeAnnualObjectiveCreateBody(body2) {
6149
+ const annualObjective = ensureRootObject2(body2, "annual_objective");
6133
6150
  const title = asNonEmptyString4(annualObjective.title);
6134
6151
  if (!asNonEmptyString4(annualObjective.name) && title) {
6135
6152
  annualObjective.name = title;
@@ -6137,8 +6154,8 @@ function normalizeAnnualObjectiveCreateBody(body) {
6137
6154
  delete annualObjective.title;
6138
6155
  return { annual_objective: annualObjective };
6139
6156
  }
6140
- function normalizeQuarterlyObjectiveCreateBody(body) {
6141
- const quarterlyObjective = ensureRootObject2(body, "quarterly_objective");
6157
+ function normalizeQuarterlyObjectiveCreateBody(body2) {
6158
+ const quarterlyObjective = ensureRootObject2(body2, "quarterly_objective");
6142
6159
  const title = asNonEmptyString4(quarterlyObjective.title);
6143
6160
  if (!asNonEmptyString4(quarterlyObjective.name) && title) {
6144
6161
  quarterlyObjective.name = title;
@@ -6153,14 +6170,14 @@ function registerFoundationCommands(program) {
6153
6170
  strategicPlans.command("show").option("--id <id>", "Strategic plan ID (defaults to organization context)").option("--progress-scope <progressScope>").option("--all-progress <allProgress>").option("--all <all>").action(async (opts, cmd) => {
6154
6171
  const context = await resolveCommandContext(cmd.optsWithGlobals());
6155
6172
  const organizationId = resolveOrganizationId(context.organizationId);
6156
- const id = idSchema11.parse(opts.id ?? organizationId);
6173
+ const id2 = idSchema11.parse(opts.id ?? organizationId);
6157
6174
  await runGraphqlQueryCommand({
6158
6175
  command: "foundation.strategic-plans.show",
6159
6176
  runtimeOptions: context.runtimeOptions,
6160
6177
  field: "strategic_plan",
6161
6178
  variables: normalizeGraphqlVariables2({
6162
6179
  organization_id: organizationId,
6163
- id,
6180
+ id: id2,
6164
6181
  progress_scope: opts.progressScope,
6165
6182
  all_progress: opts.allProgress,
6166
6183
  all: opts.all
@@ -6174,31 +6191,31 @@ function registerFoundationCommands(program) {
6174
6191
  ).action(async (opts, cmd) => {
6175
6192
  const context = await resolveCommandContext(cmd.optsWithGlobals());
6176
6193
  const organizationId = resolveOrganizationId(context.organizationId);
6177
- const id = idSchema11.parse(opts.id ?? organizationId);
6194
+ const id2 = idSchema11.parse(opts.id ?? organizationId);
6178
6195
  const rawBody = __testables.normalizeBody(String(opts.dataJson), "strategic_plan");
6179
- const body = normalizeStrategicPlanUpdateBody(rawBody);
6196
+ const body2 = normalizeStrategicPlanUpdateBody(rawBody);
6180
6197
  await runGraphqlMutationCommand({
6181
6198
  command: "foundation.strategic-plans.update",
6182
6199
  runtimeOptions: context.runtimeOptions,
6183
6200
  field: "update_strategic_plan",
6184
6201
  variables: {
6185
6202
  organization_id: organizationId,
6186
- strategic_plan_id: id,
6187
- params: body
6203
+ strategic_plan_id: id2,
6204
+ params: body2
6188
6205
  }
6189
6206
  });
6190
6207
  });
6191
6208
  strategicObjectives.command("show").option("--id <id>", "Strategic objective ID (defaults to organization context)").option("--progress-scope <progressScope>").option("--all-progress <allProgress>").option("--all <all>").action(async (opts, cmd) => {
6192
6209
  const context = await resolveCommandContext(cmd.optsWithGlobals());
6193
6210
  const organizationId = resolveOrganizationId(context.organizationId);
6194
- const id = idSchema11.parse(opts.id ?? organizationId);
6211
+ const id2 = idSchema11.parse(opts.id ?? organizationId);
6195
6212
  await runGraphqlQueryCommand({
6196
6213
  command: "foundation.strategic-objectives.show",
6197
6214
  runtimeOptions: context.runtimeOptions,
6198
6215
  field: "strategic_objective",
6199
6216
  variables: normalizeGraphqlVariables2({
6200
6217
  organization_id: organizationId,
6201
- id,
6218
+ id: id2,
6202
6219
  progress_scope: opts.progressScope,
6203
6220
  all_progress: opts.allProgress,
6204
6221
  all: opts.all
@@ -6212,20 +6229,20 @@ function registerFoundationCommands(program) {
6212
6229
  ).action(async (opts, cmd) => {
6213
6230
  const context = await resolveCommandContext(cmd.optsWithGlobals());
6214
6231
  const organizationId = resolveOrganizationId(context.organizationId);
6215
- const id = idSchema11.parse(opts.id ?? organizationId);
6232
+ const id2 = idSchema11.parse(opts.id ?? organizationId);
6216
6233
  const rawBody = __testables.normalizeBody(
6217
6234
  String(opts.dataJson),
6218
6235
  "strategic_objective"
6219
6236
  );
6220
- const body = normalizeStrategicObjectiveUpdateBody(rawBody);
6237
+ const body2 = normalizeStrategicObjectiveUpdateBody(rawBody);
6221
6238
  await runGraphqlMutationCommand({
6222
6239
  command: "foundation.strategic-objectives.update",
6223
6240
  runtimeOptions: context.runtimeOptions,
6224
6241
  field: "update_strategic_objective",
6225
6242
  variables: {
6226
6243
  organization_id: organizationId,
6227
- strategic_objective_id: id,
6228
- params: body
6244
+ strategic_objective_id: id2,
6245
+ params: body2
6229
6246
  }
6230
6247
  });
6231
6248
  });
@@ -6265,7 +6282,7 @@ var NOTE_DETAIL_FIELDS = [
6265
6282
  ];
6266
6283
  var PARENT_KIND_LABELS = {
6267
6284
  task: "task",
6268
- rock: "rock",
6285
+ goal: "goal",
6269
6286
  listItem: "list item",
6270
6287
  todo: "todo",
6271
6288
  issue: "issue",
@@ -6347,8 +6364,8 @@ function normalizeBody2(raw, rootKey) {
6347
6364
  }
6348
6365
  return { [rootKey]: payload };
6349
6366
  }
6350
- function assertRequiredParent(body, rootKey, parentKey) {
6351
- const entity = body[rootKey];
6367
+ function assertRequiredParent(body2, rootKey, parentKey) {
6368
+ const entity = body2[rootKey];
6352
6369
  if (!entity || typeof entity !== "object" || Array.isArray(entity)) {
6353
6370
  throw new CliError({
6354
6371
  message: `Invalid payload. Expected object at "${rootKey}".`,
@@ -6371,10 +6388,10 @@ function attrValue(attrs, keys) {
6371
6388
  if (!attrs || typeof attrs !== "object" || Array.isArray(attrs)) {
6372
6389
  return void 0;
6373
6390
  }
6374
- const record = attrs;
6391
+ const record2 = attrs;
6375
6392
  for (const key of keys) {
6376
- if (record[key] !== void 0 && record[key] !== null && `${record[key]}`.trim() !== "") {
6377
- return record[key];
6393
+ if (record2[key] !== void 0 && record2[key] !== null && `${record2[key]}`.trim() !== "") {
6394
+ return record2[key];
6378
6395
  }
6379
6396
  }
6380
6397
  return void 0;
@@ -6404,8 +6421,8 @@ function normalizePlacementRow(row, parentKind, parentIdFallback, parentTypedFie
6404
6421
  };
6405
6422
  }
6406
6423
  function normalizeListPayload(payload, parentKind, parentIdFallback, parentTypedField) {
6407
- const record = payload && typeof payload === "object" && !Array.isArray(payload) ? payload : {};
6408
- const rows = Array.isArray(record.data) ? record.data : [];
6424
+ const record2 = payload && typeof payload === "object" && !Array.isArray(payload) ? payload : {};
6425
+ const rows = Array.isArray(record2.data) ? record2.data : [];
6409
6426
  const normalizedRows = rows.map(
6410
6427
  (row) => normalizePlacementRow(
6411
6428
  row,
@@ -6416,15 +6433,15 @@ function normalizeListPayload(payload, parentKind, parentIdFallback, parentTyped
6416
6433
  );
6417
6434
  return {
6418
6435
  data: normalizedRows,
6419
- count: record.count ?? normalizedRows.length,
6420
- currentPage: record.currentPage ?? 1,
6421
- totalPages: record.totalPages ?? 1
6436
+ count: record2.count ?? normalizedRows.length,
6437
+ currentPage: record2.currentPage ?? 1,
6438
+ totalPages: record2.totalPages ?? 1
6422
6439
  };
6423
6440
  }
6424
- function normalizeSubtaskCreateBody(body) {
6425
- const subtask = body.subtask;
6441
+ function normalizeSubtaskCreateBody(body2) {
6442
+ const subtask = body2.subtask;
6426
6443
  if (!subtask || typeof subtask !== "object" || Array.isArray(subtask)) {
6427
- return body;
6444
+ return body2;
6428
6445
  }
6429
6446
  const subtaskRecord = subtask;
6430
6447
  const summary = typeof subtaskRecord.summary === "string" ? subtaskRecord.summary.trim() : void 0;
@@ -6433,7 +6450,7 @@ function normalizeSubtaskCreateBody(body) {
6433
6450
  subtaskRecord.name = summary;
6434
6451
  }
6435
6452
  delete subtaskRecord.summary;
6436
- return body;
6453
+ return body2;
6437
6454
  }
6438
6455
  function registerChildCommands(program, config) {
6439
6456
  const command = program.command(config.command).description(config.description);
@@ -6482,7 +6499,7 @@ function registerChildCommands(program, config) {
6482
6499
  command.command("show").requiredOption("--id <id>").action(async (opts, cmd) => {
6483
6500
  const context = await resolveCommandContext(cmd.optsWithGlobals());
6484
6501
  const organizationId = resolveOrganizationId(context.organizationId);
6485
- const id = idSchema12.parse(opts.id);
6502
+ const id2 = idSchema12.parse(opts.id);
6486
6503
  await runGraphqlQueryCommand({
6487
6504
  command: `${config.command}.show`,
6488
6505
  ...config.showOperationName ? { operationName: config.showOperationName } : {},
@@ -6490,7 +6507,7 @@ function registerChildCommands(program, config) {
6490
6507
  field: showField,
6491
6508
  variables: {
6492
6509
  organization_id: organizationId,
6493
- id
6510
+ id: id2
6494
6511
  },
6495
6512
  variableTypes: {
6496
6513
  organization_id: "ID!",
@@ -6521,12 +6538,12 @@ function registerChildCommands(program, config) {
6521
6538
  ).action(async (opts, cmd) => {
6522
6539
  const context = await resolveCommandContext(cmd.optsWithGlobals());
6523
6540
  const organizationId = resolveOrganizationId(context.organizationId);
6524
- let body = normalizeBody2(String(opts.dataJson), config.rootKey);
6541
+ let body2 = normalizeBody2(String(opts.dataJson), config.rootKey);
6525
6542
  if (config.normalizeCreateBody) {
6526
- body = config.normalizeCreateBody(body);
6543
+ body2 = config.normalizeCreateBody(body2);
6527
6544
  }
6528
- assertOperationPayload(`${config.command}.create`, body);
6529
- assertRequiredParent(body, config.rootKey, config.parentFlag.replace(/-/g, "_"));
6545
+ assertOperationPayload(`${config.command}.create`, body2);
6546
+ assertRequiredParent(body2, config.rootKey, config.parentFlag.replace(/-/g, "_"));
6530
6547
  await runGraphqlMutationCommand({
6531
6548
  command: `${config.command}.create`,
6532
6549
  operationName: config.createOperationName,
@@ -6534,7 +6551,7 @@ function registerChildCommands(program, config) {
6534
6551
  field: config.createField,
6535
6552
  variables: {
6536
6553
  organization_id: organizationId,
6537
- params: body
6554
+ params: body2
6538
6555
  }
6539
6556
  });
6540
6557
  });
@@ -6544,9 +6561,9 @@ function registerChildCommands(program, config) {
6544
6561
  ).action(async (opts, cmd) => {
6545
6562
  const context = await resolveCommandContext(cmd.optsWithGlobals());
6546
6563
  const organizationId = resolveOrganizationId(context.organizationId);
6547
- const id = idSchema12.parse(opts.id);
6548
- const body = normalizeBody2(String(opts.dataJson), config.rootKey);
6549
- assertOperationPayload(`${config.command}.update`, body);
6564
+ const id2 = idSchema12.parse(opts.id);
6565
+ const body2 = normalizeBody2(String(opts.dataJson), config.rootKey);
6566
+ assertOperationPayload(`${config.command}.update`, body2);
6550
6567
  await runGraphqlMutationCommand({
6551
6568
  command: `${config.command}.update`,
6552
6569
  operationName: config.updateOperationName,
@@ -6554,15 +6571,15 @@ function registerChildCommands(program, config) {
6554
6571
  field: config.updateField,
6555
6572
  variables: {
6556
6573
  organization_id: organizationId,
6557
- [config.idVariable]: id,
6558
- params: body
6574
+ [config.idVariable]: id2,
6575
+ params: body2
6559
6576
  }
6560
6577
  });
6561
6578
  });
6562
6579
  command.command("destroy").requiredOption("--id <id>").action(async (opts, cmd) => {
6563
6580
  const context = await resolveCommandContext(cmd.optsWithGlobals());
6564
6581
  const organizationId = resolveOrganizationId(context.organizationId);
6565
- const id = idSchema12.parse(opts.id);
6582
+ const id2 = idSchema12.parse(opts.id);
6566
6583
  await runGraphqlMutationCommand({
6567
6584
  command: `${config.command}.destroy`,
6568
6585
  operationName: config.destroyOperationName,
@@ -6570,7 +6587,7 @@ function registerChildCommands(program, config) {
6570
6587
  field: config.destroyField,
6571
6588
  variables: {
6572
6589
  organization_id: organizationId,
6573
- [config.idVariable]: id
6590
+ [config.idVariable]: id2
6574
6591
  }
6575
6592
  });
6576
6593
  });
@@ -6607,8 +6624,8 @@ function registerChildEntityCommands(program) {
6607
6624
  registerChildCommands(program, {
6608
6625
  command: "milestones",
6609
6626
  description: "Milestone operations",
6610
- parentFlag: "rock-id",
6611
- parentKind: "rock",
6627
+ parentFlag: "goal-id",
6628
+ parentKind: "goal",
6612
6629
  rootKey: "milestone",
6613
6630
  listField: "milestones",
6614
6631
  createField: "create_milestone",
@@ -6619,12 +6636,12 @@ function registerChildEntityCommands(program) {
6619
6636
  createOperationName: "MilestonesCreate",
6620
6637
  updateOperationName: "MilestonesUpdate",
6621
6638
  destroyOperationName: "MilestonesDestroy",
6622
- listSelectionSet: buildChildListSelectionSet("rockId"),
6623
- listParentTypedField: "rockId",
6624
- searchRequiredOptions: requiredParentSearchOption("rock-id", "rock"),
6639
+ listSelectionSet: buildChildListSelectionSet("goalId"),
6640
+ listParentTypedField: "goalId",
6641
+ searchRequiredOptions: requiredParentSearchOption("goal-id", "goal"),
6625
6642
  showField: "milestone",
6626
6643
  showOperationName: "MilestonesShow",
6627
- showSelectionSet: buildChildResourceSelectionSet("rockId", NOTE_DETAIL_FIELDS)
6644
+ showSelectionSet: buildChildResourceSelectionSet("goalId", NOTE_DETAIL_FIELDS)
6628
6645
  });
6629
6646
  registerChildCommands(program, {
6630
6647
  command: "subitems",
@@ -6773,7 +6790,7 @@ function registerContentCommands(program) {
6773
6790
  content.command("show").requiredOption("--id <id>").action(async (opts, cmd) => {
6774
6791
  const context = await resolveCommandContext(cmd.optsWithGlobals());
6775
6792
  const organizationId = resolveOrganizationId(context.organizationId);
6776
- const id = idSchema13.parse(opts.id);
6793
+ const id2 = idSchema13.parse(opts.id);
6777
6794
  await runGraphqlQueryCommand({
6778
6795
  command: "content.show",
6779
6796
  operationName: "ContentShow",
@@ -6781,7 +6798,7 @@ function registerContentCommands(program) {
6781
6798
  field: "content",
6782
6799
  variables: normalizeGraphqlVariables2({
6783
6800
  organization_id: organizationId,
6784
- id
6801
+ id: id2
6785
6802
  }),
6786
6803
  isShow: true,
6787
6804
  selectionSet: `{ id type resources { id resourceType slug url } ${contentAttributesSelection} }`
@@ -7091,10 +7108,10 @@ function setInternalCliOptions(program, options) {
7091
7108
  function getInternalCliOptions(command) {
7092
7109
  let current = command;
7093
7110
  while (current) {
7094
- const record = asRecord3(current[INTERNAL_OPTIONS_KEY]);
7095
- if (record) {
7111
+ const record2 = asRecord3(current[INTERNAL_OPTIONS_KEY]);
7112
+ if (record2) {
7096
7113
  return {
7097
- enableRetryOnEmptyPhrase: record.enableRetryOnEmptyPhrase === true
7114
+ enableRetryOnEmptyPhrase: record2.enableRetryOnEmptyPhrase === true
7098
7115
  };
7099
7116
  }
7100
7117
  current = current.parent ?? null;
@@ -7894,7 +7911,7 @@ import { Option } from "commander";
7894
7911
  import { createHash } from "crypto";
7895
7912
 
7896
7913
  // src/version.ts
7897
- var CLI_VERSION = "0.1.88";
7914
+ var CLI_VERSION = "0.2.0";
7898
7915
 
7899
7916
  // src/operationMetadata.ts
7900
7917
  var DISCOVERY_OPERATION_IDS = [
@@ -7970,10 +7987,10 @@ var DISCOVERY_OPERATION_IDS = [
7970
7987
  "questions.schema",
7971
7988
  "recognition.examples",
7972
7989
  "recognition.schema",
7973
- "rock-collections.examples",
7974
- "rock-collections.schema",
7975
- "rocks.examples",
7976
- "rocks.schema",
7990
+ "goal-collections.examples",
7991
+ "goal-collections.schema",
7992
+ "goals.examples",
7993
+ "goals.schema",
7977
7994
  "scorecard-groups.examples",
7978
7995
  "scorecard-groups.schema",
7979
7996
  "scorecards.examples",
@@ -8015,6 +8032,7 @@ var READ_OPERATION_IDS = [
8015
8032
  "accountability.list",
8016
8033
  "accountability.search",
8017
8034
  "accountability.show",
8035
+ "agents.details-show",
8018
8036
  "agents.plugin-catalog",
8019
8037
  "agents.show",
8020
8038
  "auth.status",
@@ -8154,14 +8172,14 @@ var READ_OPERATION_IDS = [
8154
8172
  "recognition.point-balance",
8155
8173
  "recognition.show",
8156
8174
  "recognition.top-value",
8157
- "rock-collections.list",
8158
- "rock-collections.search",
8159
- "rock-collections.show",
8175
+ "goal-collections.list",
8176
+ "goal-collections.search",
8177
+ "goal-collections.show",
8160
8178
  "reminders.list",
8161
8179
  "reminders.show",
8162
- "rocks.list",
8163
- "rocks.search",
8164
- "rocks.show",
8180
+ "goals.list",
8181
+ "goals.search",
8182
+ "goals.show",
8165
8183
  "scorecard-groups.list",
8166
8184
  "scorecard-groups.search",
8167
8185
  "scorecard-groups.show",
@@ -8196,6 +8214,10 @@ var READ_OPERATION_IDS = [
8196
8214
  "support.settings",
8197
8215
  "support.ticket-counts",
8198
8216
  "support.tickets",
8217
+ "support.conversation",
8218
+ "support.messages",
8219
+ "support.ticket",
8220
+ "support.article",
8199
8221
  "surveys.list",
8200
8222
  "surveys.search",
8201
8223
  "surveys.show",
@@ -8326,11 +8348,11 @@ var WRITE_OPERATION_IDS = [
8326
8348
  "projects.update",
8327
8349
  "questions.create",
8328
8350
  "questions.update",
8329
- "rock-collections.create",
8330
- "rock-collections.update",
8331
- "rocks.create",
8332
- "rocks.update",
8333
- "rocks.update-status",
8351
+ "goal-collections.create",
8352
+ "goal-collections.update",
8353
+ "goals.create",
8354
+ "goals.update",
8355
+ "goals.update-status",
8334
8356
  "reminders.clear",
8335
8357
  "reminders.create",
8336
8358
  "reminders.destroy",
@@ -8371,6 +8393,9 @@ var WRITE_OPERATION_IDS = [
8371
8393
  "tasks.create",
8372
8394
  "tasks.destroy",
8373
8395
  "tasks.update",
8396
+ "support.reply",
8397
+ "support.note",
8398
+ "support.triage",
8374
8399
  "teams.create",
8375
8400
  "teams.update",
8376
8401
  "todo-groups.create",
@@ -8417,26 +8442,26 @@ var OPERATION_IDS_BY_CLASSIFICATION = {
8417
8442
  auth: AUTH_OPERATION_IDS
8418
8443
  };
8419
8444
  var metadataByOperationId = /* @__PURE__ */ new Map();
8420
- function assertDataPipelineReadOnlyRegistration(id, metadata) {
8421
- if (!id.startsWith("data-pipeline.")) return;
8445
+ function assertDataPipelineReadOnlyRegistration(id2, metadata) {
8446
+ if (!id2.startsWith("data-pipeline.")) return;
8422
8447
  const isReadOnlyOperation = metadata.classification === "read" && metadata.atlasSafetyClass === "read_only" || metadata.classification === "discovery" && metadata.atlasSafetyClass === "discovery";
8423
8448
  if (isReadOnlyOperation && !metadata.requiresApproval && !metadata.machine.supportsPreview) {
8424
8449
  return;
8425
8450
  }
8426
- throw new Error(`Data Pipeline operations must remain read-only: ${id}`);
8451
+ throw new Error(`Data Pipeline operations must remain read-only: ${id2}`);
8427
8452
  }
8428
8453
  for (const [classification, operationIds] of Object.entries(OPERATION_IDS_BY_CLASSIFICATION)) {
8429
- for (const id of operationIds) {
8430
- if (metadataByOperationId.has(id)) {
8431
- throw new Error(`Duplicate Wave CLI operation metadata: ${id}`);
8454
+ for (const id2 of operationIds) {
8455
+ if (metadataByOperationId.has(id2)) {
8456
+ throw new Error(`Duplicate Wave CLI operation metadata: ${id2}`);
8432
8457
  }
8433
- const atlasSafetyClass = classification === "discovery" ? "discovery" : classification === "read" ? "read_only" : classification === "auth" ? "auth" : DESTRUCTIVE_OPERATION_IDS.has(id) ? "destructive" : "mutation";
8434
- if (DESTRUCTIVE_OPERATION_IDS.has(id) && classification !== "write") {
8435
- throw new Error(`Destructive Wave CLI operation must be a write: ${id}`);
8458
+ const atlasSafetyClass = classification === "discovery" ? "discovery" : classification === "read" ? "read_only" : classification === "auth" ? "auth" : DESTRUCTIVE_OPERATION_IDS.has(id2) ? "destructive" : "mutation";
8459
+ if (DESTRUCTIVE_OPERATION_IDS.has(id2) && classification !== "write") {
8460
+ throw new Error(`Destructive Wave CLI operation must be a write: ${id2}`);
8436
8461
  }
8437
8462
  const metadata = {
8438
8463
  classification,
8439
- requiresApproval: classification === "write" && !DIRECT_MACHINE_WRITE_OPERATION_IDS.has(id),
8464
+ requiresApproval: classification === "write" && !DIRECT_MACHINE_WRITE_OPERATION_IDS.has(id2),
8440
8465
  atlasSafetyClass,
8441
8466
  machine: {
8442
8467
  supportsValidate: true,
@@ -8445,12 +8470,12 @@ for (const [classification, operationIds] of Object.entries(OPERATION_IDS_BY_CLA
8445
8470
  executionMode: "sync"
8446
8471
  }
8447
8472
  };
8448
- assertDataPipelineReadOnlyRegistration(id, metadata);
8449
- metadataByOperationId.set(id, metadata);
8473
+ assertDataPipelineReadOnlyRegistration(id2, metadata);
8474
+ metadataByOperationId.set(id2, metadata);
8450
8475
  }
8451
8476
  }
8452
- function registeredOperationMetadata(id) {
8453
- return metadataByOperationId.get(id);
8477
+ function registeredOperationMetadata(id2) {
8478
+ return metadataByOperationId.get(id2);
8454
8479
  }
8455
8480
 
8456
8481
  // src/operationManifest.ts
@@ -8487,7 +8512,7 @@ function operationId(path) {
8487
8512
  function inputKeyForArgument(argument) {
8488
8513
  return argument.name().replace(/<|>|\[|\]|\.\.\./g, "");
8489
8514
  }
8490
- function inputSchemaFor(command, id) {
8515
+ function inputSchemaFor(command, id2) {
8491
8516
  const properties = {};
8492
8517
  const required = [];
8493
8518
  for (const argument of command.registeredArguments) {
@@ -8502,7 +8527,7 @@ function inputSchemaFor(command, id) {
8502
8527
  for (const option of command.options) {
8503
8528
  const key = option.attributeName();
8504
8529
  if (isMachinePresentationOption(key)) continue;
8505
- const payloadSchema = key === "dataJson" ? dataJsonSchemaPropertyForOperation(id, option.description) : null;
8530
+ const payloadSchema = key === "dataJson" ? dataJsonSchemaPropertyForOperation(id2, option.description) : null;
8506
8531
  const enumChoices = manifestEnumChoices(option);
8507
8532
  properties[key] = payloadSchema ?? {
8508
8533
  type: option.required ? "string" : option.optional ? ["boolean", "string"] : "boolean",
@@ -8518,10 +8543,10 @@ function inputSchemaFor(command, id) {
8518
8543
  required: required.sort()
8519
8544
  };
8520
8545
  }
8521
- function exampleFor(inputSchema, id) {
8546
+ function exampleFor(inputSchema, id2) {
8522
8547
  const input = {};
8523
8548
  for (const key of inputSchema.required) {
8524
- const payloadExample = key === "dataJson" ? exampleDataJsonForOperation(id) : null;
8549
+ const payloadExample = key === "dataJson" ? exampleDataJsonForOperation(id2) : null;
8525
8550
  if (payloadExample) {
8526
8551
  input[key] = payloadExample;
8527
8552
  continue;
@@ -8530,6 +8555,7 @@ function exampleFor(inputSchema, id) {
8530
8555
  const types = Array.isArray(propertyType) ? propertyType : [propertyType];
8531
8556
  input[key] = types.includes("object") ? {} : types.includes("array") ? ["example"] : types.includes("boolean") ? true : "example";
8532
8557
  }
8558
+ if (id2 === "support.triage") input.action = "close";
8533
8559
  return [{ name: "minimal valid input", input }];
8534
8560
  }
8535
8561
  function outputSchema() {
@@ -8559,8 +8585,8 @@ function listInvocableCommands(program) {
8559
8585
  }
8560
8586
  function entryFor(command, metadata) {
8561
8587
  const path = commandPath(command);
8562
- const id = operationId(path);
8563
- const inputSchema = inputSchemaFor(command, id);
8588
+ const id2 = operationId(path);
8589
+ const inputSchema = inputSchemaFor(command, id2);
8564
8590
  const summary = command.description() || `Run ${path.join(" ")}.`;
8565
8591
  return {
8566
8592
  id: operationId(path),
@@ -8573,7 +8599,7 @@ function entryFor(command, metadata) {
8573
8599
  atlasSafetyClass: metadata.atlasSafetyClass,
8574
8600
  inputSchema,
8575
8601
  outputSchema: outputSchema(),
8576
- examples: exampleFor(inputSchema, id),
8602
+ examples: exampleFor(inputSchema, id2),
8577
8603
  machine: metadata.machine
8578
8604
  };
8579
8605
  }
@@ -8584,10 +8610,10 @@ function digestFor(operations) {
8584
8610
  function buildOperationManifest(program) {
8585
8611
  const operations = listInvocableCommands(program).map((command) => {
8586
8612
  const path = commandPath(command);
8587
- const id = operationId(path);
8588
- const metadata = registeredOperationMetadata(id);
8613
+ const id2 = operationId(path);
8614
+ const metadata = registeredOperationMetadata(id2);
8589
8615
  if (!metadata) {
8590
- throw new Error(`Missing explicit Wave CLI operation metadata: ${id}`);
8616
+ throw new Error(`Missing explicit Wave CLI operation metadata: ${id2}`);
8591
8617
  }
8592
8618
  return entryFor(command, metadata);
8593
8619
  }).sort((left, right) => left.id.localeCompare(right.id));
@@ -9144,6 +9170,12 @@ var AGENT_JSON_KEY_ALIASES = {
9144
9170
  last_seen_at: "lastSeenAt",
9145
9171
  canonical_parent_updated_at: "canonicalParentUpdatedAt",
9146
9172
  parent_ref: "parentRef",
9173
+ workspace_id: "workspaceId",
9174
+ file_id: "fileId",
9175
+ display_name: "displayName",
9176
+ content_sha: "contentSha",
9177
+ version_sha: "versionSha",
9178
+ media_type: "mediaType",
9147
9179
  agent_children_allowed: "agentChildrenAllowed",
9148
9180
  suggested_action: "suggestedAction",
9149
9181
  error_code: "errorCode",
@@ -9246,11 +9278,11 @@ var contentStdinPromise = null;
9246
9278
  function isRecord5(value) {
9247
9279
  return Boolean(value) && typeof value === "object" && !Array.isArray(value);
9248
9280
  }
9249
- function countFromRecord(record, key) {
9250
- if (!record) {
9281
+ function countFromRecord(record2, key) {
9282
+ if (!record2) {
9251
9283
  return null;
9252
9284
  }
9253
- const value = record[key];
9285
+ const value = record2[key];
9254
9286
  if (typeof value === "number" && Number.isInteger(value) && value >= 0) {
9255
9287
  return value;
9256
9288
  }
@@ -11239,13 +11271,13 @@ function cliTokenFromPoll(payload) {
11239
11271
  return asString(payload.cliToken) ?? asString(payload.cli_token) ?? asString(payload.token);
11240
11272
  }
11241
11273
  function unwrapMutationResult(value) {
11242
- const record = asRecord4(value);
11243
- if (!record) return null;
11244
- const data = asRecord4(record.data);
11245
- if (data && (Object.prototype.hasOwnProperty.call(record, "ok") || Object.prototype.hasOwnProperty.call(record, "errors") || Object.prototype.hasOwnProperty.call(record, "errorCode") || Object.prototype.hasOwnProperty.call(record, "error_code"))) {
11274
+ const record2 = asRecord4(value);
11275
+ if (!record2) return null;
11276
+ const data = asRecord4(record2.data);
11277
+ if (data && (Object.prototype.hasOwnProperty.call(record2, "ok") || Object.prototype.hasOwnProperty.call(record2, "errors") || Object.prototype.hasOwnProperty.call(record2, "errorCode") || Object.prototype.hasOwnProperty.call(record2, "error_code"))) {
11246
11278
  return data;
11247
11279
  }
11248
- return record;
11280
+ return record2;
11249
11281
  }
11250
11282
  async function sleep(ms) {
11251
11283
  await new Promise((resolve) => setTimeout(resolve, ms));
@@ -11760,7 +11792,7 @@ var RECENT_TOOL_SUPPORT_REGISTRY = [
11760
11792
  ],
11761
11793
  implementation: {
11762
11794
  milestone: "WAVE-06",
11763
- status: "read_only_initial_surface",
11795
+ status: "implemented_command_surface",
11764
11796
  enabledCommands: [
11765
11797
  "open",
11766
11798
  "counts",
@@ -11770,21 +11802,27 @@ var RECENT_TOOL_SUPPORT_REGISTRY = [
11770
11802
  "labels",
11771
11803
  "settings",
11772
11804
  "knowledge-collections",
11773
- "knowledge-articles"
11805
+ "knowledge-articles",
11806
+ "conversation",
11807
+ "messages",
11808
+ "ticket",
11809
+ "article",
11810
+ "reply",
11811
+ "note",
11812
+ "triage"
11774
11813
  ],
11775
11814
  forbiddenCommands: [
11776
11815
  "create",
11777
11816
  "update",
11778
11817
  "delete",
11779
11818
  "write",
11780
- "reply",
11781
11819
  "replies",
11782
11820
  "send",
11783
11821
  "publish",
11784
11822
  "media"
11785
11823
  ],
11786
11824
  notes: [
11787
- "Initial Support command surface is read-only.",
11825
+ "Metadata defaults remain safe; explicit content reads and approval-required Support replies, internal notes and triage are available.",
11788
11826
  "Commands use verified WAVE-02 query fields with safe counts, ticket metadata, labels, settings, and knowledge metadata projections.",
11789
11827
  "Open returns only verified WAVE-03 safe app routes."
11790
11828
  ]
@@ -12266,6 +12304,97 @@ function registerBroadcastCommands(program) {
12266
12304
  });
12267
12305
  }
12268
12306
 
12307
+ // src/commands/supportOperations.ts
12308
+ import { Option as Option2 } from "commander";
12309
+ import { z as z20 } from "zod";
12310
+ var SUPPORT_OPERATION_COMMANDS = ["conversation", "messages", "ticket", "article", "reply", "note", "triage"];
12311
+ var SUPPORT_TRIAGE_ACTIONS = ["assign", "unassign", "close", "reopen", "snooze", "unsnooze", "star", "unstar", "add-label", "remove-label"];
12312
+ var id = z20.string().trim().regex(/^[A-Za-z0-9_-]+$/);
12313
+ var body = z20.string().trim().min(1).max(64e3);
12314
+ var page = z20.coerce.number().int().min(1);
12315
+ var per = page.max(100);
12316
+ var record = z20.record(z20.string(), z20.unknown());
12317
+ var triageSchema = z20.object({ conversationId: id, action: z20.enum(SUPPORT_TRIAGE_ACTIONS), memberId: id.optional(), labelId: id.optional(), snoozedUntil: z20.string().datetime({ offset: true }).optional() }).superRefine((value, context) => {
12318
+ for (const [name, required] of Object.entries({ memberId: value.action === "assign", labelId: value.action === "add-label" || value.action === "remove-label", snoozedUntil: value.action === "snooze" })) {
12319
+ if (value[name] !== void 0 !== required)
12320
+ context.addIssue({ code: "custom", message: `${name} ${required ? "is required" : "is not allowed"} for ${value.action}` });
12321
+ }
12322
+ });
12323
+ function registerSupportOperationCommands(support) {
12324
+ support.command("conversation").description("Read one authorized Support conversation; use messages for bounded history").requiredOption("--conversation-id <conversationId>").action(async (opts, cmd) => {
12325
+ const context = await resolveCommandContext(cmd.optsWithGlobals());
12326
+ await runGraphqlQueryCommand({
12327
+ command: "support.conversation",
12328
+ runtimeOptions: context.runtimeOptions,
12329
+ field: "support_conversation",
12330
+ variableTypes: { organization_id: "ID!", conversation_id: "ID!" },
12331
+ variables: { organization_id: resolveOrganizationId(context.organizationId), conversation_id: id.parse(opts.conversationId) },
12332
+ isShow: true,
12333
+ selectionSet: "{ id organizationId channel title preview status assignedMemberId linkedTicketId unread lastActivityAt starredAt snoozedUntil labelIds messageCount customerIdentity contactIdentity }"
12334
+ });
12335
+ });
12336
+ support.command("messages").description("Read bounded newest-first authorized Support message bodies").requiredOption("--conversation-id <conversationId>").option("--page <page>", "Page number", "1").option("--per <per>", "Maximum 100 messages", "25").action(async (opts, cmd) => {
12337
+ const context = await resolveCommandContext(cmd.optsWithGlobals());
12338
+ await runGraphqlQueryCommand({
12339
+ command: "support.messages",
12340
+ runtimeOptions: context.runtimeOptions,
12341
+ field: "support_conversation_messages",
12342
+ variableTypes: { organization_id: "ID!", conversation_id: "ID!", page: "Int", per: "Int" },
12343
+ variables: { organization_id: resolveOrganizationId(context.organizationId), conversation_id: id.parse(opts.conversationId), page: page.parse(opts.page), per: per.parse(opts.per) },
12344
+ isList: true,
12345
+ selectionSet: "{ count currentPage totalPages nextPage totalCount data { id supportConversationId direction senderMemberId senderIdentity emailSubject body sentAt receivedAt createdAt } }"
12346
+ });
12347
+ });
12348
+ for (const name of ["ticket", "article"]) {
12349
+ support.command(name).description(`Read one authorized Support ${name}, rejecting unrelated records`).requiredOption("--id <id>").action(async (opts, cmd) => {
12350
+ const context = await resolveCommandContext(cmd.optsWithGlobals());
12351
+ await runGraphqlQueryCommand({
12352
+ command: `support.${name}`,
12353
+ runtimeOptions: context.runtimeOptions,
12354
+ field: name === "ticket" ? "task" : "content",
12355
+ variables: { organization_id: resolveOrganizationId(context.organizationId), id: id.parse(opts.id) },
12356
+ variableTypes: { organization_id: "ID!", id: "ID!" },
12357
+ isShow: true,
12358
+ ...name === "article" ? { selectionSet: "{ id type attributes { id name slug content contentType status organizationId memberId parentContentId contentableId contentableType focusMemberId focusTeamId } }" } : {},
12359
+ transformData: (value) => {
12360
+ const parsed = record.safeParse(value);
12361
+ if (!parsed.success) return null;
12362
+ const attributes = record.safeParse(parsed.data.attributes);
12363
+ const fields = attributes.success ? attributes.data : parsed.data;
12364
+ if (name === "ticket") return fields.taskType === "support_ticket" ? value : null;
12365
+ return ["support_public_article", "support_internal_article"].includes(String(fields.contentType)) && !fields.contentableId && !fields.contentableType && !fields.focusMemberId && !fields.focusTeamId ? value : null;
12366
+ }
12367
+ });
12368
+ });
12369
+ }
12370
+ for (const name of ["reply", "note"]) {
12371
+ support.command(name).description(name === "reply" ? "Send one approved customer-visible Support text reply" : "Add one approved internal Support note; never send to the customer").requiredOption("--conversation-id <conversationId>").requiredOption("--body <body>").action(async (opts, cmd) => {
12372
+ const context = await resolveCommandContext(cmd.optsWithGlobals());
12373
+ await runGraphqlMutationCommand({
12374
+ command: `support.${name}`,
12375
+ runtimeOptions: context.runtimeOptions,
12376
+ field: "send_support_conversation_message",
12377
+ preserveArgumentNames: true,
12378
+ variableTypes: { organization_id: "ID!", conversation_id: "ID!", input: "SupportConversationMessageInput!" },
12379
+ variables: { organization_id: resolveOrganizationId(context.organizationId), conversation_id: id.parse(opts.conversationId), input: { body: body.parse(opts.body), direction: name === "reply" ? "outbound" : "internal" } }
12380
+ });
12381
+ });
12382
+ }
12383
+ support.command("triage").description("Apply one approved Support assignment, lifecycle or label action").requiredOption("--conversation-id <conversationId>").addOption(new Option2("--action <action>").choices([...SUPPORT_TRIAGE_ACTIONS]).makeOptionMandatory()).option("--member-id <memberId>").option("--label-id <labelId>").option("--snoozed-until <snoozedUntil>").action(async (opts, cmd) => {
12384
+ const parsed = triageSchema.parse(opts);
12385
+ const context = await resolveCommandContext(cmd.optsWithGlobals());
12386
+ const labelAction = parsed.action === "add-label" || parsed.action === "remove-label";
12387
+ await runGraphqlMutationCommand({
12388
+ command: "support.triage",
12389
+ runtimeOptions: context.runtimeOptions,
12390
+ preserveArgumentNames: true,
12391
+ field: labelAction ? `${parsed.action === "add-label" ? "add" : "remove"}_support_conversation_label` : `${parsed.action}_support_conversation`,
12392
+ variableTypes: { organization_id: "ID!", conversation_id: "ID!", ...parsed.memberId ? { member_id: "ID!" } : {}, ...parsed.labelId ? { label_id: "ID!" } : {}, ...parsed.snoozedUntil ? { snoozed_until: "ISO8601DateTime!" } : {} },
12393
+ variables: { organization_id: resolveOrganizationId(context.organizationId), conversation_id: parsed.conversationId, ...parsed.memberId ? { member_id: parsed.memberId } : {}, ...parsed.labelId ? { label_id: parsed.labelId } : {}, ...parsed.snoozedUntil ? { snoozed_until: parsed.snoozedUntil } : {} }
12394
+ });
12395
+ });
12396
+ }
12397
+
12269
12398
  // src/commands/support.ts
12270
12399
  var SUPPORT_PAGINATION_SELECTION = "count currentPage totalPages";
12271
12400
  var SUPPORT_TICKET_METADATA_SELECTION = "id status priority memberId supportConversationId taskType labelIds";
@@ -12286,14 +12415,14 @@ var SUPPORT_ENABLED_COMMANDS = [
12286
12415
  "labels",
12287
12416
  "settings",
12288
12417
  "knowledge-collections",
12289
- "knowledge-articles"
12418
+ "knowledge-articles",
12419
+ ...SUPPORT_OPERATION_COMMANDS
12290
12420
  ];
12291
12421
  var SUPPORT_FORBIDDEN_COMMANDS = [
12292
12422
  "create",
12293
12423
  "update",
12294
12424
  "delete",
12295
12425
  "write",
12296
- "reply",
12297
12426
  "replies",
12298
12427
  "send",
12299
12428
  "publish",
@@ -12448,10 +12577,10 @@ function buildSupportOpenData() {
12448
12577
  status: "verified_wave_03",
12449
12578
  sourceMilestone: "WAVE-03"
12450
12579
  },
12451
- readOnly: true,
12580
+ readOnly: false,
12452
12581
  implementation: {
12453
12582
  milestone: "WAVE-06",
12454
- status: "read_only_initial_surface",
12583
+ status: "implemented_command_surface",
12455
12584
  enabledCommands: [...SUPPORT_ENABLED_COMMANDS],
12456
12585
  forbiddenCommands: [...SUPPORT_FORBIDDEN_COMMANDS]
12457
12586
  },
@@ -12461,7 +12590,7 @@ function buildSupportOpenData() {
12461
12590
  };
12462
12591
  }
12463
12592
  function registerSupportCommands(program) {
12464
- const support = program.command("support").description("Support read-only counts, tickets, knowledge, settings, and route metadata");
12593
+ const support = program.command("support").description("Support metadata, explicit content reads, approved replies and triage");
12465
12594
  support.command("open").description("Return verified Support app routes without opening a browser").option("--readable", "Print the primary route path only").option("--json", "Emit the stable JSON envelope").action((opts) => {
12466
12595
  const data = buildSupportOpenData();
12467
12596
  if (opts.readable && !opts.json) {
@@ -12576,6 +12705,7 @@ function registerSupportCommands(program) {
12576
12705
  selectionSet: SUPPORT_KNOWLEDGE_ARTICLES_SELECTION
12577
12706
  });
12578
12707
  });
12708
+ registerSupportOperationCommands(support);
12579
12709
  }
12580
12710
 
12581
12711
  // src/commands/recognition.ts
@@ -13024,15 +13154,15 @@ function registerSketchCommands(program) {
13024
13154
  });
13025
13155
  sketches.command("create").description("Create a Sketch with a required team and idempotency key").requiredOption("--data-json <dataJson>", 'Sketch JSON or {"sketch": {...}}').action(async (opts, cmd) => {
13026
13156
  const context = await resolveCommandContext(cmd.optsWithGlobals());
13027
- const body = __testables.normalizeBody(String(opts.dataJson), "sketch");
13028
- assertOperationPayload("sketches.create", body);
13157
+ const body2 = __testables.normalizeBody(String(opts.dataJson), "sketch");
13158
+ assertOperationPayload("sketches.create", body2);
13029
13159
  await runGraphqlMutationCommand({
13030
13160
  command: "sketches.create",
13031
13161
  runtimeOptions: context.runtimeOptions,
13032
13162
  field: "create_sketch",
13033
13163
  variables: {
13034
13164
  organization_id: resolveOrganizationId(context.organizationId),
13035
- params: body
13165
+ params: body2
13036
13166
  },
13037
13167
  variableTypes: {
13038
13168
  organization_id: "ID!",
@@ -13042,8 +13172,8 @@ function registerSketchCommands(program) {
13042
13172
  });
13043
13173
  sketches.command("update-metadata").description("Update bounded Sketch metadata; document content is never accepted").requiredOption("--id <id>").requiredOption("--data-json <dataJson>", 'Sketch metadata JSON or {"sketch": {...}}').action(async (opts, cmd) => {
13044
13174
  const context = await resolveCommandContext(cmd.optsWithGlobals());
13045
- const body = __testables.normalizeBody(String(opts.dataJson), "sketch");
13046
- assertOperationPayload("sketches.update-metadata", body);
13175
+ const body2 = __testables.normalizeBody(String(opts.dataJson), "sketch");
13176
+ assertOperationPayload("sketches.update-metadata", body2);
13047
13177
  await runGraphqlMutationCommand({
13048
13178
  command: "sketches.update-metadata",
13049
13179
  runtimeOptions: context.runtimeOptions,
@@ -13051,7 +13181,7 @@ function registerSketchCommands(program) {
13051
13181
  variables: {
13052
13182
  organization_id: resolveOrganizationId(context.organizationId),
13053
13183
  sketch_id: String(opts.id),
13054
- params: body
13184
+ params: body2
13055
13185
  },
13056
13186
  variableTypes: {
13057
13187
  organization_id: "ID!",
@@ -13413,12 +13543,12 @@ function asRecord5(value) {
13413
13543
  return value && typeof value === "object" && !Array.isArray(value) ? value : null;
13414
13544
  }
13415
13545
  function readPlannerStateKey(value, keys) {
13416
- const record = asRecord5(value);
13417
- if (!record) {
13546
+ const record2 = asRecord5(value);
13547
+ if (!record2) {
13418
13548
  return null;
13419
13549
  }
13420
13550
  const normalizedKeySet = new Set(keys.map((key) => normalizedKey(key)));
13421
- const entry2 = Object.entries(record).find(([key]) => normalizedKeySet.has(normalizedKey(key)));
13551
+ const entry2 = Object.entries(record2).find(([key]) => normalizedKeySet.has(normalizedKey(key)));
13422
13552
  return entry2 ? entry2[1] : null;
13423
13553
  }
13424
13554
  function transformPlannerEvents(data) {
@@ -14130,14 +14260,14 @@ function registerMailCommands(program) {
14130
14260
  }
14131
14261
 
14132
14262
  // src/commands/phantom.ts
14133
- import { z as z20 } from "zod";
14134
- var nonNegativeInt4 = z20.coerce.number().int().min(0);
14135
- var nullableString = z20.string().nullable().optional().transform((value) => value ?? null);
14136
- var idString = z20.union([z20.string(), z20.number()]).transform((value) => String(value));
14137
- var nullableIdString = z20.union([z20.string(), z20.number()]).nullable().optional().transform(
14263
+ import { z as z21 } from "zod";
14264
+ var nonNegativeInt4 = z21.coerce.number().int().min(0);
14265
+ var nullableString = z21.string().nullable().optional().transform((value) => value ?? null);
14266
+ var idString = z21.union([z21.string(), z21.number()]).transform((value) => String(value));
14267
+ var nullableIdString = z21.union([z21.string(), z21.number()]).nullable().optional().transform(
14138
14268
  (value) => value === void 0 || value === null ? null : String(value)
14139
14269
  );
14140
- var jsonObject = z20.record(z20.string(), z20.unknown());
14270
+ var jsonObject = z21.record(z21.string(), z21.unknown());
14141
14271
  var PHANTOM_LEDGER_INVENTORY_SELECTION = `{
14142
14272
  schemaVersion
14143
14273
  runsCount
@@ -14350,10 +14480,10 @@ var PHANTOM_LEDGER_KEY_ALIASES = {
14350
14480
  content_hash: "contentHash",
14351
14481
  observed_at: "observedAt"
14352
14482
  };
14353
- var phantomLedgerInventorySchema = z20.preprocess(
14483
+ var phantomLedgerInventorySchema = z21.preprocess(
14354
14484
  normalizePhantomLedgerKeys,
14355
- z20.object({
14356
- schemaVersion: z20.string(),
14485
+ z21.object({
14486
+ schemaVersion: z21.string(),
14357
14487
  runsCount: nonNegativeInt4,
14358
14488
  observationsCount: nonNegativeInt4,
14359
14489
  candidatesCount: nonNegativeInt4,
@@ -14363,16 +14493,16 @@ var phantomLedgerInventorySchema = z20.preprocess(
14363
14493
  reportsCount: nonNegativeInt4
14364
14494
  })
14365
14495
  );
14366
- var phantomRunSchema = z20.preprocess(
14496
+ var phantomRunSchema = z21.preprocess(
14367
14497
  normalizePhantomLedgerKeys,
14368
- z20.object({
14498
+ z21.object({
14369
14499
  id: idString,
14370
14500
  organizationId: idString,
14371
- notificationId: z20.union([z20.string(), z20.number()]).nullable().optional().transform(
14501
+ notificationId: z21.union([z21.string(), z21.number()]).nullable().optional().transform(
14372
14502
  (value) => value === void 0 || value === null ? null : String(value)
14373
14503
  ),
14374
- status: z20.string(),
14375
- triggerType: z20.string(),
14504
+ status: z21.string(),
14505
+ triggerType: z21.string(),
14376
14506
  startedAt: nullableString,
14377
14507
  completedAt: nullableString,
14378
14508
  scannedFileCount: nonNegativeInt4,
@@ -14382,163 +14512,163 @@ var phantomRunSchema = z20.preprocess(
14382
14512
  errorCount: nonNegativeInt4,
14383
14513
  warningCount: nonNegativeInt4,
14384
14514
  errorMessage: nullableString,
14385
- dryRun: z20.boolean(),
14386
- schemaVersion: z20.string(),
14515
+ dryRun: z21.boolean(),
14516
+ schemaVersion: z21.string(),
14387
14517
  testRunId: nullableString,
14388
14518
  idempotencyKey: nullableString,
14389
14519
  ledgerMetadata: jsonObject.catch({}),
14390
- createdAt: z20.string(),
14391
- updatedAt: z20.string()
14520
+ createdAt: z21.string(),
14521
+ updatedAt: z21.string()
14392
14522
  })
14393
14523
  );
14394
- var phantomRunListItemSchema = z20.preprocess(
14524
+ var phantomRunListItemSchema = z21.preprocess(
14395
14525
  normalizePhantomLedgerKeys,
14396
- z20.object({
14526
+ z21.object({
14397
14527
  id: idString,
14398
14528
  organizationId: idString,
14399
- status: z20.string(),
14400
- triggerType: z20.string(),
14401
- dryRun: z20.boolean(),
14402
- schemaVersion: z20.string(),
14529
+ status: z21.string(),
14530
+ triggerType: z21.string(),
14531
+ dryRun: z21.boolean(),
14532
+ schemaVersion: z21.string(),
14403
14533
  testRunId: nullableString,
14404
- createdAt: z20.string(),
14405
- updatedAt: z20.string()
14534
+ createdAt: z21.string(),
14535
+ updatedAt: z21.string()
14406
14536
  })
14407
14537
  );
14408
- var phantomReportSchema = z20.preprocess(
14538
+ var phantomReportSchema = z21.preprocess(
14409
14539
  normalizePhantomLedgerKeys,
14410
- z20.object({
14540
+ z21.object({
14411
14541
  id: idString,
14412
14542
  organizationId: idString,
14413
14543
  phantomRunId: idString,
14414
- status: z20.string(),
14415
- reportType: z20.string(),
14416
- schemaVersion: z20.string(),
14544
+ status: z21.string(),
14545
+ reportType: z21.string(),
14546
+ schemaVersion: z21.string(),
14417
14547
  markdownPath: nullableString,
14418
14548
  payload: jsonObject.catch({}),
14419
14549
  testRunId: nullableString,
14420
- idempotencyKey: z20.string(),
14421
- createdAt: z20.string(),
14422
- updatedAt: z20.string()
14550
+ idempotencyKey: z21.string(),
14551
+ createdAt: z21.string(),
14552
+ updatedAt: z21.string()
14423
14553
  })
14424
14554
  );
14425
- var phantomObservationSchema = z20.preprocess(
14555
+ var phantomObservationSchema = z21.preprocess(
14426
14556
  normalizePhantomLedgerKeys,
14427
- z20.object({
14557
+ z21.object({
14428
14558
  id: idString,
14429
14559
  organizationId: idString,
14430
14560
  phantomRunId: idString,
14431
- status: z20.string(),
14432
- observationType: z20.string(),
14561
+ status: z21.string(),
14562
+ observationType: z21.string(),
14433
14563
  targetType: nullableString,
14434
14564
  targetId: nullableString,
14435
14565
  sourceTable: nullableString,
14436
14566
  sourceRecordId: nullableString,
14437
14567
  sourceEventId: nullableString,
14438
14568
  contentHash: nullableString,
14439
- observedAt: z20.string(),
14440
- confidence: z20.coerce.number(),
14569
+ observedAt: z21.string(),
14570
+ confidence: z21.coerce.number(),
14441
14571
  payload: jsonObject.catch({}),
14442
- schemaVersion: z20.string(),
14572
+ schemaVersion: z21.string(),
14443
14573
  testRunId: nullableString,
14444
- idempotencyKey: z20.string(),
14445
- createdAt: z20.string(),
14446
- updatedAt: z20.string()
14574
+ idempotencyKey: z21.string(),
14575
+ createdAt: z21.string(),
14576
+ updatedAt: z21.string()
14447
14577
  })
14448
14578
  );
14449
- var phantomCandidateSchema = z20.preprocess(
14579
+ var phantomCandidateSchema = z21.preprocess(
14450
14580
  normalizePhantomLedgerKeys,
14451
- z20.object({
14581
+ z21.object({
14452
14582
  id: idString,
14453
14583
  organizationId: idString,
14454
14584
  phantomRunId: idString,
14455
14585
  phantomObservationId: nullableString,
14456
- status: z20.string(),
14457
- candidateType: z20.string(),
14586
+ status: z21.string(),
14587
+ candidateType: z21.string(),
14458
14588
  targetType: nullableString,
14459
14589
  targetId: nullableString,
14460
14590
  title: nullableString,
14461
- dryRun: z20.boolean(),
14591
+ dryRun: z21.boolean(),
14462
14592
  payload: jsonObject.catch({}),
14463
- approvalStatus: z20.string(),
14593
+ approvalStatus: z21.string(),
14464
14594
  approvedById: nullableIdString,
14465
14595
  approvedAt: nullableString,
14466
14596
  approvalSource: nullableString,
14467
14597
  approvalReason: nullableString,
14468
14598
  approvalMetadata: jsonObject.catch({}),
14469
- schemaVersion: z20.string(),
14599
+ schemaVersion: z21.string(),
14470
14600
  testRunId: nullableString,
14471
- idempotencyKey: z20.string(),
14472
- createdAt: z20.string(),
14473
- updatedAt: z20.string()
14601
+ idempotencyKey: z21.string(),
14602
+ createdAt: z21.string(),
14603
+ updatedAt: z21.string()
14474
14604
  })
14475
14605
  );
14476
- var phantomCandidateEvidenceSchema = z20.preprocess(
14606
+ var phantomCandidateEvidenceSchema = z21.preprocess(
14477
14607
  normalizePhantomLedgerKeys,
14478
- z20.object({
14608
+ z21.object({
14479
14609
  id: idString,
14480
14610
  organizationId: idString,
14481
14611
  phantomCandidateId: idString,
14482
14612
  phantomObservationId: nullableString,
14483
- evidenceType: z20.string(),
14613
+ evidenceType: z21.string(),
14484
14614
  sourceType: nullableString,
14485
14615
  sourceId: nullableString,
14486
14616
  contentHash: nullableString,
14487
14617
  payload: jsonObject.catch({}),
14488
- schemaVersion: z20.string(),
14618
+ schemaVersion: z21.string(),
14489
14619
  testRunId: nullableString,
14490
- idempotencyKey: z20.string(),
14491
- createdAt: z20.string(),
14492
- updatedAt: z20.string()
14620
+ idempotencyKey: z21.string(),
14621
+ createdAt: z21.string(),
14622
+ updatedAt: z21.string()
14493
14623
  })
14494
14624
  );
14495
- var phantomValidationSchema = z20.preprocess(
14625
+ var phantomValidationSchema = z21.preprocess(
14496
14626
  normalizePhantomLedgerKeys,
14497
- z20.object({
14627
+ z21.object({
14498
14628
  id: idString,
14499
14629
  organizationId: idString,
14500
14630
  phantomRunId: idString,
14501
14631
  phantomCandidateId: idString,
14502
- status: z20.string(),
14503
- validationType: z20.string(),
14504
- dryRun: z20.boolean(),
14632
+ status: z21.string(),
14633
+ validationType: z21.string(),
14634
+ dryRun: z21.boolean(),
14505
14635
  payload: jsonObject.catch({}),
14506
14636
  resultPayload: jsonObject.catch({}),
14507
- schemaVersion: z20.string(),
14637
+ schemaVersion: z21.string(),
14508
14638
  testRunId: nullableString,
14509
- idempotencyKey: z20.string(),
14510
- createdAt: z20.string(),
14511
- updatedAt: z20.string()
14639
+ idempotencyKey: z21.string(),
14640
+ createdAt: z21.string(),
14641
+ updatedAt: z21.string()
14512
14642
  })
14513
14643
  );
14514
- var phantomApplyOperationSchema = z20.preprocess(
14644
+ var phantomApplyOperationSchema = z21.preprocess(
14515
14645
  normalizePhantomLedgerKeys,
14516
- z20.object({
14646
+ z21.object({
14517
14647
  id: idString,
14518
14648
  organizationId: idString,
14519
14649
  phantomRunId: idString,
14520
14650
  phantomCandidateId: idString,
14521
- status: z20.string(),
14522
- operationType: z20.string(),
14523
- dryRun: z20.boolean(),
14651
+ status: z21.string(),
14652
+ operationType: z21.string(),
14653
+ dryRun: z21.boolean(),
14524
14654
  targetType: nullableString,
14525
14655
  targetId: nullableString,
14526
14656
  payload: jsonObject.catch({}),
14527
14657
  resultPayload: jsonObject.catch({}),
14528
- schemaVersion: z20.string(),
14658
+ schemaVersion: z21.string(),
14529
14659
  testRunId: nullableString,
14530
- idempotencyKey: z20.string(),
14531
- createdAt: z20.string(),
14532
- updatedAt: z20.string()
14660
+ idempotencyKey: z21.string(),
14661
+ createdAt: z21.string(),
14662
+ updatedAt: z21.string()
14533
14663
  })
14534
14664
  );
14535
- var phantomRunsSchema = z20.array(phantomRunListItemSchema);
14536
- var phantomReportsSchema = z20.array(phantomReportSchema);
14537
- var phantomObservationsSchema = z20.array(phantomObservationSchema);
14538
- var phantomCandidatesSchema = z20.array(phantomCandidateSchema);
14539
- var phantomCandidateEvidencesSchema = z20.array(phantomCandidateEvidenceSchema);
14540
- var phantomValidationsSchema = z20.array(phantomValidationSchema);
14541
- var phantomApplyOperationsSchema = z20.array(phantomApplyOperationSchema);
14665
+ var phantomRunsSchema = z21.array(phantomRunListItemSchema);
14666
+ var phantomReportsSchema = z21.array(phantomReportSchema);
14667
+ var phantomObservationsSchema = z21.array(phantomObservationSchema);
14668
+ var phantomCandidatesSchema = z21.array(phantomCandidateSchema);
14669
+ var phantomCandidateEvidencesSchema = z21.array(phantomCandidateEvidenceSchema);
14670
+ var phantomValidationsSchema = z21.array(phantomValidationSchema);
14671
+ var phantomApplyOperationsSchema = z21.array(phantomApplyOperationSchema);
14542
14672
  function isRecord6(value) {
14543
14673
  return Boolean(value) && typeof value === "object" && !Array.isArray(value);
14544
14674
  }
@@ -15593,7 +15723,7 @@ function parseBooleanFlag(raw, label, command) {
15593
15723
  }
15594
15724
  function parseOrderedIds(raw, command) {
15595
15725
  const value = requireNonEmpty(raw, "--ordered-ids", command);
15596
- const ids = value.split(",").map((id) => id.trim()).filter((id) => id.length > 0);
15726
+ const ids = value.split(",").map((id2) => id2.trim()).filter((id2) => id2.length > 0);
15597
15727
  if (ids.length === 0) {
15598
15728
  throw new CliError({
15599
15729
  message: "Invalid --ordered-ids. Expected at least one id.",
@@ -15667,8 +15797,8 @@ async function runDatasheetsQuery(cmd, config) {
15667
15797
  async function runDatasheetsMutation(cmd, opts, config) {
15668
15798
  const context = config.organizationContext === "optional" ? await resolveUnscopedCommandContext(cmd.optsWithGlobals()) : await resolveCommandContext(cmd.optsWithGlobals());
15669
15799
  const variables = config.organizationContext === "optional" ? context.organizationId ? { organization_id: context.organizationId } : {} : { organization_id: resolveOrganizationId(context.organizationId) };
15670
- for (const id of config.requiredIds ?? []) {
15671
- variables[id.variable] = requireNonEmpty(opts[id.option], id.label, config.command);
15800
+ for (const id2 of config.requiredIds ?? []) {
15801
+ variables[id2.variable] = requireNonEmpty(opts[id2.option], id2.label, config.command);
15672
15802
  }
15673
15803
  if (config.dataJson === "required") {
15674
15804
  variables[config.dataJsonVariable ?? "params"] = parseJsonObject3(
@@ -15999,6 +16129,104 @@ import { basename as basename2 } from "path";
15999
16129
  import { readFile as readFile4 } from "fs/promises";
16000
16130
  import { createHash as createHash2 } from "crypto";
16001
16131
  import { PDFDocument } from "pdf-lib";
16132
+
16133
+ // src/commands/signature_envelope_commands.ts
16134
+ function registerSignatureEnvelopeReadCommand(signatures, callbacks) {
16135
+ const { identifier: idSchema16, queryPayload: safeSignatureQueryPayload2 } = callbacks;
16136
+ signatures.command("show").requiredOption("--id <signatureSlug>", "Signature slug, for example SIG-01").option("--include-events").action(async (opts, cmd) => {
16137
+ const context = await resolveCommandContext(cmd.optsWithGlobals());
16138
+ const organizationId = resolveOrganizationId(context.organizationId);
16139
+ await runGraphqlQueryCommand({
16140
+ command: "signatures.show",
16141
+ operationName: "SignaturesShow",
16142
+ runtimeOptions: context.runtimeOptions,
16143
+ field: "signature_envelope",
16144
+ variables: {
16145
+ organization_id: organizationId,
16146
+ slug: idSchema16(opts.id, "signature slug"),
16147
+ include_events: Boolean(opts.includeEvents)
16148
+ },
16149
+ variableTypes: {
16150
+ organization_id: "ID!",
16151
+ slug: "String!",
16152
+ include_events: "Boolean!"
16153
+ },
16154
+ selectionSet: "",
16155
+ isShow: true,
16156
+ transformData: safeSignatureQueryPayload2
16157
+ });
16158
+ });
16159
+ }
16160
+ function registerSignatureEnvelopeMutationCommands(signatures, callbacks) {
16161
+ const {
16162
+ identifier: idSchema16,
16163
+ confirm: requireConfirmation2,
16164
+ updatePayload: parseUpdatePayload2,
16165
+ mutationPayload: safeSignatureMutationPayload2
16166
+ } = callbacks;
16167
+ signatures.command("update").requiredOption("--id <signatureSlug>", "Signature slug, for example SIG-01").option("--name <name>").option("--subject <subject>").option("--message <message>").option(
16168
+ "--data-json <dataJson>",
16169
+ "JSON object for draft fields, recipients, and fields"
16170
+ ).action(async (opts, cmd) => {
16171
+ const context = await resolveCommandContext(cmd.optsWithGlobals());
16172
+ const organizationId = resolveOrganizationId(context.organizationId);
16173
+ await runGraphqlMutationCommand({
16174
+ command: "signatures.update",
16175
+ operationName: "SignaturesUpdate",
16176
+ runtimeOptions: context.runtimeOptions,
16177
+ field: "update_signature_envelope",
16178
+ variables: {
16179
+ organization_id: organizationId,
16180
+ slug: idSchema16(opts.id, "signature slug"),
16181
+ params: parseUpdatePayload2(opts.dataJson, opts)
16182
+ },
16183
+ variableTypes: {
16184
+ organization_id: "ID!",
16185
+ slug: "String!",
16186
+ params: "JSON!"
16187
+ },
16188
+ transformMutationPayload: safeSignatureMutationPayload2
16189
+ });
16190
+ });
16191
+ const lifecycle = (name, field, confirmation) => {
16192
+ const command = signatures.command(name).requiredOption("--id <signatureSlug>", "Signature slug, for example SIG-01");
16193
+ if (name === "void") command.requiredOption("--reason <reason>");
16194
+ if (confirmation === "--confirm-send") command.option("--confirm-send");
16195
+ if (confirmation === "--confirm") command.option("--confirm");
16196
+ command.action(async (opts, cmd) => {
16197
+ if (confirmation === "--confirm-send")
16198
+ requireConfirmation2(opts.confirmSend, "--confirm-send");
16199
+ if (confirmation === "--confirm")
16200
+ requireConfirmation2(opts.confirm, "--confirm");
16201
+ const context = await resolveCommandContext(cmd.optsWithGlobals());
16202
+ const organizationId = resolveOrganizationId(context.organizationId);
16203
+ await runGraphqlMutationCommand({
16204
+ command: "signatures." + name,
16205
+ operationName: "Signatures" + name.slice(0, 1).toUpperCase() + name.slice(1),
16206
+ runtimeOptions: context.runtimeOptions,
16207
+ field,
16208
+ variables: {
16209
+ organization_id: organizationId,
16210
+ slug: idSchema16(opts.id, "signature slug"),
16211
+ ...name === "void" ? { reason: idSchema16(opts.reason, "reason") } : {}
16212
+ },
16213
+ variableTypes: {
16214
+ organization_id: "ID!",
16215
+ slug: "String!",
16216
+ ...name === "void" ? { reason: "String" } : {}
16217
+ },
16218
+ transformMutationPayload: safeSignatureMutationPayload2
16219
+ });
16220
+ });
16221
+ };
16222
+ lifecycle("send", "send_signature_envelope", "--confirm-send");
16223
+ lifecycle("archive", "archive_signature_envelope", null);
16224
+ lifecycle("unarchive", "unarchive_signature_envelope", null);
16225
+ lifecycle("destroy", "delete_signature_envelope", "--confirm");
16226
+ lifecycle("void", "void_signature_envelope", "--confirm");
16227
+ }
16228
+
16229
+ // src/commands/signatures.ts
16002
16230
  var idSchema14 = (value, label = "id") => {
16003
16231
  const parsed = typeof value === "string" ? value.trim() : "";
16004
16232
  if (parsed.length === 0) {
@@ -16377,28 +16605,9 @@ function registerSignatureCommands(program) {
16377
16605
  transformData: safeSignatureQueryPayload
16378
16606
  });
16379
16607
  });
16380
- signatures.command("show").requiredOption("--id <id>").option("--include-events").action(async (opts, cmd) => {
16381
- const context = await resolveCommandContext(cmd.optsWithGlobals());
16382
- const organizationId = resolveOrganizationId(context.organizationId);
16383
- await runGraphqlQueryCommand({
16384
- command: "signatures.show",
16385
- operationName: "SignaturesShow",
16386
- runtimeOptions: context.runtimeOptions,
16387
- field: "signature_envelope",
16388
- variables: {
16389
- organization_id: organizationId,
16390
- id: idSchema14(opts.id),
16391
- include_events: Boolean(opts.includeEvents)
16392
- },
16393
- variableTypes: {
16394
- organization_id: "ID!",
16395
- id: "ID!",
16396
- include_events: "Boolean!"
16397
- },
16398
- selectionSet: "",
16399
- isShow: true,
16400
- transformData: safeSignatureQueryPayload
16401
- });
16608
+ registerSignatureEnvelopeReadCommand(signatures, {
16609
+ identifier: idSchema14,
16610
+ queryPayload: safeSignatureQueryPayload
16402
16611
  });
16403
16612
  signatures.command("create").requiredOption("--file <file>").requiredOption("--mode <mode>", "request or self_sign").option("--data-json <dataJson>", "JSON object for additional draft fields").action(async (opts, cmd) => {
16404
16613
  const context = await resolveCommandContext(cmd.optsWithGlobals());
@@ -16409,135 +16618,24 @@ function registerSignatureCommands(program) {
16409
16618
  payload: parseCreatePayload(opts.dataJson, opts.mode)
16410
16619
  });
16411
16620
  });
16412
- signatures.command("update").requiredOption("--id <id>").option("--name <name>").option("--subject <subject>").option("--message <message>").option("--data-json <dataJson>", "JSON object for draft fields, recipients, and fields").action(async (opts, cmd) => {
16413
- const context = await resolveCommandContext(cmd.optsWithGlobals());
16414
- const organizationId = resolveOrganizationId(context.organizationId);
16415
- await runGraphqlMutationCommand({
16416
- command: "signatures.update",
16417
- operationName: "SignaturesUpdate",
16418
- runtimeOptions: context.runtimeOptions,
16419
- field: "update_signature_envelope",
16420
- variables: {
16421
- organization_id: organizationId,
16422
- id: idSchema14(opts.id),
16423
- params: parseUpdatePayload(opts.dataJson, opts)
16424
- },
16425
- variableTypes: {
16426
- organization_id: "ID!",
16427
- id: "ID!",
16428
- params: "JSON!"
16429
- },
16430
- transformMutationPayload: safeSignatureMutationPayload
16431
- });
16621
+ registerSignatureEnvelopeMutationCommands(signatures, {
16622
+ identifier: idSchema14,
16623
+ confirm: requireConfirmation,
16624
+ updatePayload: parseUpdatePayload,
16625
+ mutationPayload: safeSignatureMutationPayload
16432
16626
  });
16433
- const lifecycle = (name, field, confirmation) => {
16434
- const command = signatures.command(name).requiredOption("--id <id>");
16435
- if (name === "void") command.requiredOption("--reason <reason>");
16436
- if (confirmation === "--confirm-send") command.option("--confirm-send");
16437
- if (confirmation === "--confirm") command.option("--confirm");
16438
- command.action(async (opts, cmd) => {
16439
- if (confirmation === "--confirm-send") requireConfirmation(opts.confirmSend, "--confirm-send");
16440
- if (confirmation === "--confirm") requireConfirmation(opts.confirm, "--confirm");
16441
- const context = await resolveCommandContext(cmd.optsWithGlobals());
16442
- const organizationId = resolveOrganizationId(context.organizationId);
16443
- await runGraphqlMutationCommand({
16444
- command: "signatures." + name,
16445
- operationName: "Signatures" + name.slice(0, 1).toUpperCase() + name.slice(1),
16446
- runtimeOptions: context.runtimeOptions,
16447
- field,
16448
- variables: {
16449
- organization_id: organizationId,
16450
- id: idSchema14(opts.id),
16451
- ...name === "void" ? { reason: idSchema14(opts.reason, "reason") } : {}
16452
- },
16453
- variableTypes: {
16454
- organization_id: "ID!",
16455
- id: "ID!",
16456
- ...name === "void" ? { reason: "String" } : {}
16457
- },
16458
- transformMutationPayload: safeSignatureMutationPayload
16459
- });
16460
- });
16461
- };
16462
- lifecycle("send", "send_signature_envelope", "--confirm-send");
16463
- lifecycle("archive", "archive_signature_envelope", null);
16464
- lifecycle("unarchive", "unarchive_signature_envelope", null);
16465
- lifecycle("destroy", "delete_signature_envelope", "--confirm");
16466
- lifecycle("void", "void_signature_envelope", "--confirm");
16467
16627
  }
16468
16628
 
16469
16629
  // src/commands/atlasAuthoring.ts
16470
- import { z as z21 } from "zod";
16471
- var idSchema15 = z21.string().trim().min(1);
16472
- var idempotencyKeySchema = z21.string().min(1).refine((value) => value.trim() === value, "Idempotency key must not have leading or trailing whitespace.");
16473
- var skillScopeSchema = z21.enum(["ADMIN_GLOBAL", "MEMBER_PERSONAL"]);
16474
- var isoDateSchema = z21.iso.date();
16475
- var nonEmptyStringSchema = z21.string().trim().min(1);
16476
- var AUTOMATION_RUN_HTTP_TIMEOUT_MS = 6e4;
16477
- var agentToolAccessSchema = z21.array(
16478
- z21.object({
16479
- tool_key: nonEmptyStringSchema,
16480
- scope_value: nonEmptyStringSchema
16481
- }).strict()
16482
- ).min(1);
16483
- var agentToolAccessUpdateSchema = agentToolAccessSchema.min(0);
16484
- var agentPluginConnectionsSchema = z21.array(
16485
- z21.object({
16486
- external_tool_connection_id: nonEmptyStringSchema,
16487
- tool_key: nonEmptyStringSchema,
16488
- scope_value: nonEmptyStringSchema.optional(),
16489
- allowed_tools: z21.array(nonEmptyStringSchema).optional(),
16490
- allowed_scopes: z21.array(nonEmptyStringSchema).optional(),
16491
- requires_confirmation: z21.boolean().optional(),
16492
- enabled: z21.boolean().optional()
16493
- }).strict()
16494
- ).min(1);
16495
- var agentPluginConnectionUpdateSchema = z21.array(
16496
- z21.union([
16497
- z21.object({
16498
- id: nonEmptyStringSchema,
16499
- _destroy: z21.literal(true)
16500
- }).strict(),
16501
- z21.object({
16502
- id: nonEmptyStringSchema.optional(),
16503
- external_tool_connection_id: nonEmptyStringSchema.optional(),
16504
- tool_key: nonEmptyStringSchema.optional(),
16505
- scope_value: nonEmptyStringSchema.optional(),
16506
- allowed_tools: z21.array(nonEmptyStringSchema).optional(),
16507
- allowed_scopes: z21.array(nonEmptyStringSchema).optional(),
16508
- requires_confirmation: z21.boolean().optional(),
16509
- enabled: z21.boolean().optional()
16510
- }).strict().superRefine((value, context) => {
16511
- if (value.id || value.external_tool_connection_id && value.tool_key) return;
16512
- context.addIssue({
16513
- code: z21.ZodIssueCode.custom,
16514
- message: "Plugin updates require an id, or both external_tool_connection_id and tool_key for a new grant."
16515
- });
16516
- })
16517
- ])
16518
- );
16519
- var agentTriggerSchema = z21.object({
16520
- trigger_type: z21.literal("cron"),
16521
- cron_expression: nonEmptyStringSchema,
16522
- timezone: nonEmptyStringSchema,
16523
- starts_at: z21.iso.datetime({ offset: true }).nullable().optional(),
16524
- ends_at: z21.iso.datetime({ offset: true }).nullable().optional(),
16525
- max_runs: z21.number().int().positive().nullable().optional(),
16526
- enabled: z21.boolean().optional()
16527
- }).strict();
16528
- var agentTriggerUpdateSchema = z21.union([
16529
- agentTriggerSchema.extend({ id: nonEmptyStringSchema.optional() }).strict(),
16530
- z21.object({
16531
- id: nonEmptyStringSchema,
16532
- _destroy: z21.literal(true)
16533
- }).strict()
16534
- ]);
16535
- var automationConfigSchema = z21.record(z21.string(), z21.unknown());
16536
- var AGENT_SELECTION = `{
16630
+ import { z as z22 } from "zod";
16631
+
16632
+ // src/commands/atlasAuthoringAgentSelection.ts
16633
+ var ATLAS_AUTHORING_AGENT_SELECTION = `{
16537
16634
  id
16538
16635
  type
16539
16636
  name
16540
16637
  slug
16638
+ systemKey
16541
16639
  status
16542
16640
  visibility
16543
16641
  runWhenMentioned
@@ -16582,6 +16680,88 @@ var AGENT_SELECTION = `{
16582
16680
  updatedAt
16583
16681
  updateVersion
16584
16682
  }`;
16683
+
16684
+ // src/commands/atlasAuthoring.ts
16685
+ var idSchema15 = z22.string().trim().min(1);
16686
+ var idempotencyKeySchema = z22.string().min(1).refine((value) => value.trim() === value, "Idempotency key must not have leading or trailing whitespace.");
16687
+ var skillScopeSchema = z22.enum(["ADMIN_GLOBAL", "MEMBER_PERSONAL"]);
16688
+ var isoDateSchema = z22.iso.date();
16689
+ var nonEmptyStringSchema = z22.string().trim().min(1);
16690
+ var AUTOMATION_RUN_HTTP_TIMEOUT_MS = 6e4;
16691
+ var agentToolAccessSchema = z22.array(
16692
+ z22.object({
16693
+ tool_key: nonEmptyStringSchema,
16694
+ scope_value: nonEmptyStringSchema
16695
+ }).strict()
16696
+ ).min(1);
16697
+ var agentToolAccessUpdateSchema = agentToolAccessSchema.min(0);
16698
+ var agentPluginConnectionsSchema = z22.array(
16699
+ z22.object({
16700
+ external_tool_connection_id: nonEmptyStringSchema,
16701
+ tool_key: nonEmptyStringSchema,
16702
+ scope_value: nonEmptyStringSchema.optional(),
16703
+ allowed_tools: z22.array(nonEmptyStringSchema).optional(),
16704
+ allowed_scopes: z22.array(nonEmptyStringSchema).optional(),
16705
+ requires_confirmation: z22.boolean().optional(),
16706
+ enabled: z22.boolean().optional()
16707
+ }).strict()
16708
+ ).min(1);
16709
+ var agentPluginConnectionUpdateSchema = z22.array(
16710
+ z22.union([
16711
+ z22.object({
16712
+ id: nonEmptyStringSchema,
16713
+ _destroy: z22.literal(true)
16714
+ }).strict(),
16715
+ z22.object({
16716
+ id: nonEmptyStringSchema.optional(),
16717
+ external_tool_connection_id: nonEmptyStringSchema.optional(),
16718
+ tool_key: nonEmptyStringSchema.optional(),
16719
+ scope_value: nonEmptyStringSchema.optional(),
16720
+ allowed_tools: z22.array(nonEmptyStringSchema).optional(),
16721
+ allowed_scopes: z22.array(nonEmptyStringSchema).optional(),
16722
+ requires_confirmation: z22.boolean().optional(),
16723
+ enabled: z22.boolean().optional()
16724
+ }).strict().superRefine((value, context) => {
16725
+ if (value.id || value.external_tool_connection_id && value.tool_key) return;
16726
+ context.addIssue({
16727
+ code: z22.ZodIssueCode.custom,
16728
+ message: "Plugin updates require an id, or both external_tool_connection_id and tool_key for a new grant."
16729
+ });
16730
+ })
16731
+ ])
16732
+ );
16733
+ var agentTriggerSchema = z22.object({
16734
+ trigger_type: z22.literal("cron"),
16735
+ cron_expression: nonEmptyStringSchema,
16736
+ timezone: nonEmptyStringSchema,
16737
+ starts_at: z22.iso.datetime({ offset: true }).nullable().optional(),
16738
+ ends_at: z22.iso.datetime({ offset: true }).nullable().optional(),
16739
+ max_runs: z22.number().int().positive().nullable().optional(),
16740
+ enabled: z22.boolean().optional()
16741
+ }).strict();
16742
+ var agentTriggerUpdateSchema = z22.union([
16743
+ agentTriggerSchema.extend({ id: nonEmptyStringSchema.optional() }).strict(),
16744
+ z22.object({
16745
+ id: nonEmptyStringSchema,
16746
+ _destroy: z22.literal(true)
16747
+ }).strict()
16748
+ ]);
16749
+ var automationConfigSchema = z22.record(z22.string(), z22.unknown());
16750
+ var AGENT_DETAILS_SELECTION = `{
16751
+ count
16752
+ currentPage
16753
+ totalPages
16754
+ data {
16755
+ id
16756
+ type
16757
+ attributes {
16758
+ agentId
16759
+ memberId
16760
+ name
16761
+ description
16762
+ }
16763
+ }
16764
+ }`;
16585
16765
  var AGENT_PLUGIN_CATALOG_SELECTION = `{
16586
16766
  externalToolConnectionId
16587
16767
  provider
@@ -16719,8 +16899,8 @@ function requirePaginationInteger(value, key, minimum) {
16719
16899
  });
16720
16900
  }
16721
16901
  function normalizeAutomationList(payload) {
16722
- const page = asRecord6(payload);
16723
- if (!page || !Array.isArray(page.data)) {
16902
+ const page2 = asRecord6(payload);
16903
+ if (!page2 || !Array.isArray(page2.data)) {
16724
16904
  throw new CliError({
16725
16905
  message: "Automation list response did not include a paginated data collection.",
16726
16906
  kind: "malformed_response",
@@ -16728,7 +16908,7 @@ function normalizeAutomationList(payload) {
16728
16908
  exitCode: EXIT_CODES.networkOrUpstream
16729
16909
  });
16730
16910
  }
16731
- const rows = page.data;
16911
+ const rows = page2.data;
16732
16912
  const data = rows.map((value) => {
16733
16913
  const row = asRecord6(value);
16734
16914
  const attributes = asRecord6(row?.attributes);
@@ -16770,9 +16950,9 @@ function normalizeAutomationList(payload) {
16770
16950
  });
16771
16951
  return {
16772
16952
  data,
16773
- count: requirePaginationInteger(page.count, "count", 0),
16774
- currentPage: requirePaginationInteger(page.currentPage, "currentPage", 1),
16775
- totalPages: requirePaginationInteger(page.totalPages, "totalPages", 1)
16953
+ count: requirePaginationInteger(page2.count, "count", 0),
16954
+ currentPage: requirePaginationInteger(page2.currentPage, "currentPage", 1),
16955
+ totalPages: requirePaginationInteger(page2.totalPages, "totalPages", 1)
16776
16956
  };
16777
16957
  }
16778
16958
  function parseBooleanOption(value, optionName) {
@@ -16823,10 +17003,10 @@ function normalizePersistedCreatePayload(payload) {
16823
17003
  const automationExecution = asRecord6(attributes?.automation_execution) ?? asRecord6(attributes?.automationExecution);
16824
17004
  const meta = asRecord6(mutationData?.meta);
16825
17005
  const idempotency = asRecord6(meta?.atlas_idempotency);
16826
- const id = asRequiredString(persisted?.id);
17006
+ const id2 = asRequiredString(persisted?.id);
16827
17007
  const slug = asRequiredString(persisted?.slug) ?? asRequiredString(attributes?.slug);
16828
17008
  const replay = idempotency?.replay;
16829
- if (!mutation || !mutationData || !persisted || !id || !slug || !idempotency || typeof replay !== "boolean") {
17009
+ if (!mutation || !mutationData || !persisted || !id2 || !slug || !idempotency || typeof replay !== "boolean") {
16830
17010
  throw new CliError({
16831
17011
  message: "Create response did not include persisted id/slug and idempotency metadata.",
16832
17012
  kind: "malformed_response",
@@ -16839,7 +17019,7 @@ function normalizePersistedCreatePayload(payload) {
16839
17019
  status: mutation.status,
16840
17020
  errorCode: mutation.errorCode ?? null,
16841
17021
  errors: mutation.errors ?? null,
16842
- persisted: { id, slug },
17022
+ persisted: { id: id2, slug },
16843
17023
  idempotency: {
16844
17024
  object_type: asRequiredString(idempotency.object_type),
16845
17025
  id: asRequiredString(idempotency.id),
@@ -16857,10 +17037,10 @@ function normalizePersistedUpdatePayload(payload) {
16857
17037
  const mutationData = asRecord6(mutation?.data);
16858
17038
  const persisted = asRecord6(mutationData?.data) ?? mutationData;
16859
17039
  const attributes = asRecord6(persisted?.attributes);
16860
- const id = asRequiredString(persisted?.id);
17040
+ const id2 = asRequiredString(persisted?.id);
16861
17041
  const slug = asRequiredString(persisted?.slug) ?? asRequiredString(attributes?.slug);
16862
17042
  const updateVersion = asRequiredString(persisted?.updateVersion) ?? asRequiredString(attributes?.updateVersion) ?? asRequiredString(attributes?.update_version);
16863
- if (!mutation || !mutationData || !persisted || !id || !slug || !updateVersion) {
17043
+ if (!mutation || !mutationData || !persisted || !id2 || !slug || !updateVersion) {
16864
17044
  throw new CliError({
16865
17045
  message: "Update response did not include persisted id, slug, and updateVersion.",
16866
17046
  kind: "malformed_response",
@@ -16873,7 +17053,7 @@ function normalizePersistedUpdatePayload(payload) {
16873
17053
  status: mutation.status,
16874
17054
  errorCode: mutation.errorCode ?? null,
16875
17055
  errors: mutation.errors ?? null,
16876
- persisted: { id, slug, update_version: updateVersion }
17056
+ persisted: { id: id2, slug, update_version: updateVersion }
16877
17057
  };
16878
17058
  }
16879
17059
  function normalizeAutomationRunPayload(payload) {
@@ -17094,7 +17274,7 @@ function registerAtlasAuthoringCommands(program) {
17094
17274
  });
17095
17275
  });
17096
17276
  agents.command("show").description("Read one persisted Agent by id or slug").requiredOption("--id <idOrSlug>", "Agent id or slug").action(async (opts, cmd) => {
17097
- const id = idSchema15.parse(opts.id);
17277
+ const id2 = idSchema15.parse(opts.id);
17098
17278
  const context = await resolveCommandContext(cmd.optsWithGlobals());
17099
17279
  const organizationId = resolveOrganizationId(context.organizationId);
17100
17280
  await runGraphqlQueryCommand({
@@ -17102,9 +17282,29 @@ function registerAtlasAuthoringCommands(program) {
17102
17282
  operationName: "AgentsShow",
17103
17283
  runtimeOptions: context.runtimeOptions,
17104
17284
  field: "agent",
17105
- variables: { organization_id: organizationId, id },
17285
+ variables: { organization_id: organizationId, id: id2 },
17106
17286
  variableTypes: { organization_id: "ID!", id: "ID!" },
17107
- selectionSet: AGENT_SELECTION,
17287
+ selectionSet: ATLAS_AUTHORING_AGENT_SELECTION,
17288
+ isShow: true
17289
+ });
17290
+ });
17291
+ agents.command("details-show").description("Read the authenticated member's persisted detail for one Agent").requiredOption("--id <idOrSlug>", "Agent id or slug").action(async (opts, cmd) => {
17292
+ const id2 = idSchema15.parse(opts.id);
17293
+ const context = await resolveCommandContext(cmd.optsWithGlobals());
17294
+ const organizationId = resolveOrganizationId(context.organizationId);
17295
+ await runGraphqlQueryCommand({
17296
+ command: "agents.details-show",
17297
+ operationName: "AgentsDetailsShow",
17298
+ runtimeOptions: context.runtimeOptions,
17299
+ field: "agent_details",
17300
+ variables: { organization_id: organizationId, agent_id: id2, page: 1, per: 1 },
17301
+ variableTypes: {
17302
+ organization_id: "ID!",
17303
+ agent_id: "ID!",
17304
+ page: "Int",
17305
+ per: "Int"
17306
+ },
17307
+ selectionSet: AGENT_DETAILS_SELECTION,
17108
17308
  isShow: true
17109
17309
  });
17110
17310
  });
@@ -17156,7 +17356,7 @@ function registerAtlasAuthoringCommands(program) {
17156
17356
  const trigger = parseJsonOption(opts.trigger, "--trigger", agentTriggerUpdateSchema);
17157
17357
  const patch = {
17158
17358
  ...opts.name !== void 0 ? { name: String(opts.name) } : {},
17159
- ...opts.description !== void 0 ? { description: String(opts.description) } : {},
17359
+ ...opts.description !== void 0 ? { agent_details_attributes: [{ description: String(opts.description) }] } : {},
17160
17360
  ...opts.notes !== void 0 ? { notes: String(opts.notes) } : {},
17161
17361
  ...opts.status !== void 0 ? { status: String(opts.status) } : {},
17162
17362
  ...opts.visibility !== void 0 ? { visibility: String(opts.visibility) } : {},
@@ -17182,7 +17382,7 @@ function registerAtlasAuthoringCommands(program) {
17182
17382
  exitCode: EXIT_CODES.invalidArgs
17183
17383
  });
17184
17384
  }
17185
- const id = idSchema15.parse(opts.id);
17385
+ const id2 = idSchema15.parse(opts.id);
17186
17386
  const expectedUpdateVersion = parseExpectedUpdateVersion(opts.expectedUpdateVersion);
17187
17387
  const context = await resolveCommandContext(cmd.optsWithGlobals());
17188
17388
  const organizationId = resolveOrganizationId(context.organizationId);
@@ -17199,7 +17399,7 @@ function registerAtlasAuthoringCommands(program) {
17199
17399
  },
17200
17400
  variables: {
17201
17401
  organization_id: organizationId,
17202
- agent_id: id,
17402
+ agent_id: id2,
17203
17403
  params: { agent: patch },
17204
17404
  expected_update_version: expectedUpdateVersion
17205
17405
  },
@@ -17208,9 +17408,16 @@ function registerAtlasAuthoringCommands(program) {
17208
17408
  });
17209
17409
  agents.command("plugin-catalog").description("Read connected Agent plugin capabilities for one supported service").requiredOption(
17210
17410
  "--service <service>",
17211
- "Supported service: gmail, calendar, slack, or stripe"
17411
+ "Supported service: gmail, calendar, outlook_calendar, outlook_mail, slack, or stripe"
17212
17412
  ).action(async (opts, cmd) => {
17213
- const service = z21.enum(["gmail", "calendar", "slack", "stripe"]).parse(opts.service);
17413
+ const service = z22.enum([
17414
+ "gmail",
17415
+ "calendar",
17416
+ "outlook_calendar",
17417
+ "outlook_mail",
17418
+ "slack",
17419
+ "stripe"
17420
+ ]).parse(opts.service);
17214
17421
  const context = await resolveCommandContext(cmd.optsWithGlobals());
17215
17422
  const organizationId = resolveOrganizationId(context.organizationId);
17216
17423
  await runGraphqlQueryCommand({
@@ -17281,7 +17488,7 @@ function registerAtlasAuthoringCommands(program) {
17281
17488
  });
17282
17489
  });
17283
17490
  automations.command("show").description("Read one persisted Automation by id or slug").requiredOption("--id <idOrSlug>", "Automation id or slug").action(async (opts, cmd) => {
17284
- const id = idSchema15.parse(opts.id);
17491
+ const id2 = idSchema15.parse(opts.id);
17285
17492
  const context = await resolveCommandContext(cmd.optsWithGlobals());
17286
17493
  const organizationId = resolveOrganizationId(context.organizationId);
17287
17494
  await runGraphqlQueryCommand({
@@ -17289,7 +17496,7 @@ function registerAtlasAuthoringCommands(program) {
17289
17496
  operationName: "AutomationsShow",
17290
17497
  runtimeOptions: context.runtimeOptions,
17291
17498
  field: "automation",
17292
- variables: { organization_id: organizationId, id },
17499
+ variables: { organization_id: organizationId, id: id2 },
17293
17500
  variableTypes: { organization_id: "ID!", id: "ID!" },
17294
17501
  selectionSet: AUTOMATION_SELECTION,
17295
17502
  isShow: true
@@ -17392,7 +17599,7 @@ function registerAtlasAuthoringCommands(program) {
17392
17599
  exitCode: EXIT_CODES.invalidArgs
17393
17600
  });
17394
17601
  }
17395
- const id = idSchema15.parse(opts.id);
17602
+ const id2 = idSchema15.parse(opts.id);
17396
17603
  const expectedUpdateVersion = parseExpectedUpdateVersion(opts.expectedUpdateVersion);
17397
17604
  const context = await resolveCommandContext(cmd.optsWithGlobals());
17398
17605
  const organizationId = resolveOrganizationId(context.organizationId);
@@ -17409,7 +17616,7 @@ function registerAtlasAuthoringCommands(program) {
17409
17616
  },
17410
17617
  variables: {
17411
17618
  organization_id: organizationId,
17412
- task_id: id,
17619
+ task_id: id2,
17413
17620
  params: { task: patch },
17414
17621
  expected_update_version: expectedUpdateVersion
17415
17622
  },
@@ -17464,7 +17671,7 @@ function registerAtlasAuthoringCommands(program) {
17464
17671
  exitCode: EXIT_CODES.invalidArgs
17465
17672
  });
17466
17673
  }
17467
- const id = idSchema15.parse(opts.id);
17674
+ const id2 = idSchema15.parse(opts.id);
17468
17675
  const expectedUpdateVersion = parseExpectedUpdateVersion(opts.expectedUpdateVersion);
17469
17676
  const context = await resolveCommandContext(cmd.optsWithGlobals());
17470
17677
  const organizationId = resolveOrganizationId(context.organizationId);
@@ -17481,7 +17688,7 @@ function registerAtlasAuthoringCommands(program) {
17481
17688
  },
17482
17689
  variables: {
17483
17690
  organization_id: organizationId,
17484
- id,
17691
+ id: id2,
17485
17692
  input: patch,
17486
17693
  expected_update_version: expectedUpdateVersion
17487
17694
  },
@@ -17524,7 +17731,7 @@ function validateActivityRange(startAt, endAt) {
17524
17731
  }
17525
17732
  }
17526
17733
  function parseMemberIds(value) {
17527
- const memberIds = [...new Set(value.split(",").map((id) => id.trim()).filter(Boolean))];
17734
+ const memberIds = [...new Set(value.split(",").map((id2) => id2.trim()).filter(Boolean))];
17528
17735
  if (memberIds.length < 1 || memberIds.length > 100) {
17529
17736
  throw new Error("member-ids must contain between 1 and 100 unique member IDs");
17530
17737
  }
@@ -17979,7 +18186,7 @@ var PRIMARY_NAMESPACES = [
17979
18186
  "phantom",
17980
18187
  "tasks",
17981
18188
  "projects",
17982
- "rocks",
18189
+ "goals",
17983
18190
  "meetings",
17984
18191
  "members",
17985
18192
  "agents",
@@ -17996,7 +18203,7 @@ var ADVANCED_NAMESPACES = [
17996
18203
  "issue-groups",
17997
18204
  "todo-groups",
17998
18205
  "todos",
17999
- "rock-collections",
18206
+ "goal-collections",
18000
18207
  "knowledge",
18001
18208
  "stand-ups",
18002
18209
  "news",
@@ -18176,7 +18383,6 @@ var NAMESPACE_DOCS = {
18176
18383
  "Create preserves API-owned defaults by sending only supplied typed Agent fields.",
18177
18384
  "Update calls only updateAgent with an exact opaque updateVersion token and cannot change ownership.",
18178
18385
  "Native tools, plugin connector grants, and the cron trigger use strict canonical JSON shapes.",
18179
- "Outlook Calendar and Outlook Mail are not supported Agent plugin families in this release.",
18180
18386
  "Show uses the API-owned agent query by id; no slug fallback is implemented."
18181
18387
  ],
18182
18388
  commands: ["create", "show", "update"]
@@ -18237,24 +18443,28 @@ var NAMESPACE_DOCS = {
18237
18443
  support: {
18238
18444
  name: "support",
18239
18445
  tier: "primary",
18240
- description: "Support read-only counts, ticket metadata, labels, settings, knowledge metadata, and verified app route metadata.",
18446
+ description: "Support metadata, explicit conversation/message/ticket/article reads and approved replies and triage.",
18241
18447
  examples: [
18242
- "wave support counts --status open",
18448
+ "wave support counts",
18243
18449
  "wave support tickets --status open --page 1 --per 20",
18244
18450
  "wave support knowledge-articles --collection-id 123 --visibility public",
18245
18451
  "wave support settings",
18246
- "wave support open"
18452
+ "wave support open",
18453
+ "wave support conversation --conversation-id 123",
18454
+ "wave support messages --conversation-id 123 --page 1 --per 25",
18455
+ "wave support ticket --id TASK-123",
18456
+ "wave support article --id KNW-123"
18247
18457
  ],
18248
18458
  schema: {
18249
18459
  output: "json-envelope-default",
18250
- readOnly: true,
18460
+ readOnly: false,
18251
18461
  safety: [
18252
18462
  "Uses verified WAVE-02 backend fields for Support counts, tickets, labels, settings, and knowledge metadata.",
18253
18463
  "Uses verified WAVE-03 safe routes under /support and /resource_center.",
18254
- "Ticket output is limited to ids, status, priority, member id, support conversation id, labels, queue/channel, and pagination/count metadata.",
18255
- "Knowledge output is limited to ids, slug/title/name/status/visibility/order/count metadata.",
18464
+ "Ticket and article listings remain metadata-only; explicit ticket/article detail reads enforce Support subtype boundaries.",
18465
+ "Message history is explicitly requested, bounded to 100 messages per page and newest-first.",
18256
18466
  "Settings output excludes tokens, secrets, private embed data, website source secrets, message bodies, customer contact details, internal notes, and article content.",
18257
- "Does not expose write, reply, create, update, delete, send, publish, or media commands."
18467
+ "Explicit detail reads expose authorized content; reply, note and triage require machine approval. No generic update, delete, publish, media or visitor impersonation."
18258
18468
  ],
18259
18469
  commands: [
18260
18470
  "open",
@@ -18711,11 +18921,11 @@ async function resolveDoctorAuthOrganization(params) {
18711
18921
  if (!organization || typeof organization !== "object" || Array.isArray(organization)) {
18712
18922
  return null;
18713
18923
  }
18714
- const id = organization.id;
18924
+ const id2 = organization.id;
18715
18925
  const slug = organization.slug;
18716
18926
  const result = {};
18717
- if (typeof id === "string" && id.trim() !== "") {
18718
- result.id = id;
18927
+ if (typeof id2 === "string" && id2.trim() !== "") {
18928
+ result.id = id2;
18719
18929
  }
18720
18930
  if (typeof slug === "string" && slug.trim() !== "") {
18721
18931
  result.slug = slug;
@@ -18800,7 +19010,7 @@ async function runDoctor(cmd, opts) {
18800
19010
  },
18801
19011
  body: JSON.stringify({ query: "query WaveCliDoctor { __typename }" })
18802
19012
  });
18803
- const body = await response.text();
19013
+ const body2 = await response.text();
18804
19014
  checks.push({
18805
19015
  name: "graphql_reachability",
18806
19016
  ok: response.ok,
@@ -18809,8 +19019,8 @@ async function runDoctor(cmd, opts) {
18809
19019
  });
18810
19020
  checks.push({
18811
19021
  name: "api_response_health",
18812
- ok: response.ok && body.trim().startsWith("{"),
18813
- status: response.ok && body.trim().startsWith("{") ? "json" : "unexpected_response"
19022
+ ok: response.ok && body2.trim().startsWith("{"),
19023
+ status: response.ok && body2.trim().startsWith("{") ? "json" : "unexpected_response"
18814
19024
  });
18815
19025
  } catch (error) {
18816
19026
  checks.push({
@@ -19030,9 +19240,9 @@ function buildCli(options) {
19030
19240
  "--config <configPath>",
19031
19241
  "Optional JSON config file (default: ~/.wave/config.json when present)"
19032
19242
  ).addOption(
19033
- new Option2("--auth-home <path>", "Credential storage directory (default: ~/.wave)")
19243
+ new Option3("--auth-home <path>", "Credential storage directory (default: ~/.wave)")
19034
19244
  ).addOption(
19035
- new Option2("--auth-storage <mode>", "Credential storage mode").choices(["auto", "keychain", "file", "disabled"]).default("auto")
19245
+ new Option3("--auth-storage <mode>", "Credential storage mode").choices(["auto", "keychain", "file", "disabled"]).default("auto")
19036
19246
  ).option("--timeout-ms <timeoutMs>", "HTTP timeout in milliseconds").option("--agent-name <agentName>", "Agent name for tracing").option("--agent-run-id <agentRunId>", "Agent run identifier for tracing").option("--request-id <requestId>", "Request identifier").option(
19037
19247
  "--atlas-member-id <memberId>",
19038
19248
  "Atlas ledger member ID (prefer WAVE_ATLAS_MEMBER_ID env var)"
@@ -19075,7 +19285,7 @@ function buildCli(options) {
19075
19285
  setInternalCliOptions(program, options?.internal);
19076
19286
  registerTaskCommands(program);
19077
19287
  registerProjectCommands(program);
19078
- registerRockCommands(program);
19288
+ registerGoalCommands(program);
19079
19289
  registerMeetingCommands(program);
19080
19290
  registerMemberCommands(program);
19081
19291
  registerResourceCommands(program);
@@ -19258,8 +19468,8 @@ function isTrustedAuth(value) {
19258
19468
  function isTrustedApproval(value) {
19259
19469
  return isPlainObject2(value) && typeof value.operation === "string" && typeof value.inputDigest === "string" && typeof value.cliVersion === "string" && typeof value.registryDigest === "string" && typeof value.organizationId === "string" && value.organizationId.trim() !== "" && typeof value.actorId === "string" && value.actorId.trim() !== "";
19260
19470
  }
19261
- function operationCommand(program, id) {
19262
- return listInvocableCommands(program).find((command) => commandId(command) === id);
19471
+ function operationCommand(program, id2) {
19472
+ return listInvocableCommands(program).find((command) => commandId(command) === id2);
19263
19473
  }
19264
19474
  function typeMatches2(value, type) {
19265
19475
  if (type === "array") return Array.isArray(value);
@@ -19374,10 +19584,10 @@ function withTrustedMachineAuth(auth, callback) {
19374
19584
  function needsTrustedAuth(operation) {
19375
19585
  return operation.classification === "read" || operation.classification === "write" || operation.classification === "auth";
19376
19586
  }
19377
- function resolveMachineOperation(program, id) {
19587
+ function resolveMachineOperation(program, id2) {
19378
19588
  const manifest = buildOperationManifest(program);
19379
- const operation = manifest.operations.find((candidate) => candidate.id === id);
19380
- const command = operation ? operationCommand(program, id) : void 0;
19589
+ const operation = manifest.operations.find((candidate) => candidate.id === id2);
19590
+ const command = operation ? operationCommand(program, id2) : void 0;
19381
19591
  return operation && command && hasAction2(command) ? { operation, command } : null;
19382
19592
  }
19383
19593
  async function maybeRunMachineExecute(argv, program) {