@moxt-ai/cli 0.10.0-beta.9 → 0.11.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/README.md CHANGED
@@ -291,12 +291,16 @@ moxt workflow transition delete -w <workspace-id> <workflow-file-id> --from <sta
291
291
 
292
292
  # Manage workflow tasks
293
293
  moxt workflow task list -w <workspace-id> [--workflow-file-id <workflow-file-id>] [--limit 50] [--cursor <cursor>]
294
+ moxt workflow task list -w <workspace-id> [--scope all|assigned_to_me|reported_by_me]
295
+ moxt workflow task list -w <workspace-id> [--scope all|assigned_to_me|reported_by_me]
294
296
  moxt workflow task list -w <workspace-id> [--priority urgent|high|medium|low] [--owner-human-id <human-id>]
297
+ moxt workflow task list -w <workspace-id> [--reporter-human-id <human-id>] [--status-type todo|in-progress|done]
295
298
  moxt workflow task list -w <workspace-id> [--assignee-human-id <human-id>]
296
299
  moxt workflow task list -w <workspace-id> [--assignee-assistant-id <assistant-id> | --assignee-teammate-id <teammate-id>]
300
+ moxt workflow task list -w <workspace-id> [--sort-by default|title|status|assignee|owner|priority|updated] [--sort-direction asc|desc]
297
301
  moxt workflow task get -w <workspace-id> <workflow-file-id> <task-id>
298
- moxt workflow task create -w <workspace-id> <workflow-file-id> --title "Review draft" --status <status-id>
299
- moxt workflow task update -w <workspace-id> <workflow-file-id> <task-id> --desc-file <local-path>
302
+ moxt workflow task create -w <workspace-id> <workflow-file-id> --title "Review draft" --status <status-id> [--reporter-human-id <human-id> | --clear-reporter]
303
+ moxt workflow task update -w <workspace-id> <workflow-file-id> <task-id> [--reporter-human-id <human-id> | --clear-reporter]
300
304
  moxt workflow task add-linked-links -w <workspace-id> <workflow-file-id> <task-id> --url <http(s)-url> [--title <title>]
301
305
  moxt workflow task remove-linked-links -w <workspace-id> <workflow-file-id> <task-id> --url <http(s)-url>
302
306
  moxt workflow task move -w <workspace-id> <workflow-file-id> <task-id> --status <status-id>
package/dist/index.cjs CHANGED
@@ -14592,7 +14592,7 @@ function getApiKeyOrUndefined() {
14592
14592
 
14593
14593
  // src/utils/http.ts
14594
14594
  function getUserAgent() {
14595
- return `moxt-cli/${"0.10.0-beta.9"} (${(0, import_os.platform)()}/${(0, import_os.arch)()}) node/${process.versions.node}`;
14595
+ return `moxt-cli/${"0.11.0"} (${(0, import_os.platform)()}/${(0, import_os.arch)()}) node/${process.versions.node}`;
14596
14596
  }
14597
14597
  async function sendRequest(method, path4, init) {
14598
14598
  return await fetch(`${getApiBaseUrl()}${path4}`, {
@@ -27922,6 +27922,14 @@ var import_node_util6 = require("util");
27922
27922
  var MAX_DESC_LENGTH = 5e3;
27923
27923
  var MAX_COMMENT_CONTENT_LENGTH = 5e3;
27924
27924
  var MAX_COMMENT_CONTENT_BYTES = MAX_COMMENT_CONTENT_LENGTH * 4;
27925
+ function addTeammateAttributionOption(command) {
27926
+ return command.option("--as-teammate <teammateId>", "Attribute this Workflow write to a managed AI teammate");
27927
+ }
27928
+ function addTeammateAttribution(body, options) {
27929
+ const asTeammateId = parseOptionalPositiveInteger(options.asTeammate, "--as-teammate");
27930
+ if (asTeammateId !== void 0) body.asTeammateId = asTeammateId;
27931
+ return body;
27932
+ }
27925
27933
  var WorkflowOptionsError = class extends Error {
27926
27934
  constructor(message) {
27927
27935
  super(message);
@@ -27953,6 +27961,9 @@ function addPreferredAssigneeOptions(command) {
27953
27961
  }
27954
27962
  function parsePositiveInteger(raw, label) {
27955
27963
  const parsed = Number.parseInt(raw, 10);
27964
+ if (Number.isInteger(parsed) && !Number.isSafeInteger(parsed)) {
27965
+ throw new WorkflowOptionsError(`Error: ${label} must be a safe positive integer, got "${raw}".`);
27966
+ }
27956
27967
  if (!Number.isInteger(parsed) || parsed <= 0 || String(parsed) !== raw) {
27957
27968
  throw new WorkflowOptionsError(`Error: ${label} must be a positive integer, got "${raw}".`);
27958
27969
  }
@@ -27993,13 +28004,32 @@ function parseWorkflowScope(raw) {
27993
28004
  }
27994
28005
  function parseTaskScope(raw) {
27995
28006
  if (raw == null || raw === "") return "all";
27996
- if (raw === "all" || raw === "assigned_to_me" || raw === "subscribed_by_me" || raw === "owner_is_me") {
27997
- return raw;
28007
+ if (raw === "all" || raw === "assigned_to_me" || raw === "reported_by_me") return raw;
28008
+ throw new WorkflowOptionsError(
28009
+ 'Error: --scope must be "all", "assigned_to_me", or "reported_by_me".'
28010
+ );
28011
+ }
28012
+ function parseStatusTypeFilter(raw) {
28013
+ if (raw == null || raw === "") return void 0;
28014
+ if (raw === "todo") return 1;
28015
+ if (raw === "in-progress") return 2;
28016
+ if (raw === "done") return 3;
28017
+ throw new WorkflowOptionsError('Error: --status-type must be "todo", "in-progress", or "done".');
28018
+ }
28019
+ function parseTaskSortField(raw) {
28020
+ const value = raw ?? "default";
28021
+ if (value === "default" || value === "title" || value === "status" || value === "assignee" || value === "owner" || value === "priority" || value === "updated") {
28022
+ return value;
27998
28023
  }
27999
28024
  throw new WorkflowOptionsError(
28000
- 'Error: --scope must be "all", "assigned_to_me", "subscribed_by_me", or "owner_is_me".'
28025
+ 'Error: --sort-by must be "default", "title", "status", "assignee", "owner", "priority", or "updated".'
28001
28026
  );
28002
28027
  }
28028
+ function parseTaskSortDirection(raw) {
28029
+ const value = raw ?? "desc";
28030
+ if (value === "asc" || value === "desc") return value;
28031
+ throw new WorkflowOptionsError('Error: --sort-direction must be "asc" or "desc".');
28032
+ }
28003
28033
  function parseHttpUrl(raw, label = "--url") {
28004
28034
  const url = raw.trim();
28005
28035
  try {
@@ -28085,9 +28115,11 @@ function parseAssigneeBody(options, allowClear) {
28085
28115
  if (teammateId !== void 0) return { assigneeAiTeammateId: teammateId };
28086
28116
  return {};
28087
28117
  }
28088
- function parseTaskListFilterQuery(options) {
28118
+ function parseTaskListFilter(options, scope, currentHumanId) {
28089
28119
  const filterOwnerHumanId = parseOptionalPositiveInteger(options.ownerHumanId, "--owner-human-id");
28120
+ const filterReporterHumanId = parseOptionalPositiveInteger(options.reporterHumanId, "--reporter-human-id");
28090
28121
  const filterPriority = parsePriority(options.priority);
28122
+ const filterStatusType = parseStatusTypeFilter(options.statusType);
28091
28123
  const filterAssigneeHumanId = parseOptionalPositiveInteger(options.assigneeHumanId, "--assignee-human-id");
28092
28124
  const filterAssigneeAssistantId = parseOptionalPositiveInteger(
28093
28125
  options.assigneeAssistantId,
@@ -28101,14 +28133,57 @@ function parseTaskListFilterQuery(options) {
28101
28133
  if (assigneeFilterCount > 1) {
28102
28134
  throw new WorkflowOptionsError("Error: assignee filter options are mutually exclusive.");
28103
28135
  }
28136
+ if (scope === "assigned_to_me" && assigneeFilterCount > 0) {
28137
+ throw new WorkflowOptionsError("Error: --scope assigned_to_me cannot be combined with assignee filters.");
28138
+ }
28139
+ if (scope === "reported_by_me" && filterReporterHumanId !== void 0) {
28140
+ throw new WorkflowOptionsError(
28141
+ "Error: --scope reported_by_me cannot be combined with --reporter-human-id."
28142
+ );
28143
+ }
28144
+ if (scope !== "all" && currentHumanId === void 0) {
28145
+ throw new Error(`Current human ID is required for task scope: ${scope}`);
28146
+ }
28104
28147
  return {
28105
- filterOwnerHumanId,
28106
- filterPriority,
28107
- filterAssigneeHumanId,
28108
- filterAssigneeAssistantId,
28109
- filterAssigneeTeammateId
28148
+ ownerHumanIds: filterOwnerHumanId === void 0 ? null : [{ type: "human", humanId: filterOwnerHumanId }],
28149
+ reporterHumanIds: scope === "reported_by_me" ? [{ type: "human", humanId: currentHumanId }] : filterReporterHumanId === void 0 ? null : [{ type: "human", humanId: filterReporterHumanId }],
28150
+ assignee: scope === "assigned_to_me" ? [{ type: "human", humanId: currentHumanId }] : filterAssigneeHumanId !== void 0 ? [{ type: "human", humanId: filterAssigneeHumanId }] : filterAssigneeAssistantId !== void 0 ? [{ type: "assistant", aiAssistantId: filterAssigneeAssistantId }] : filterAssigneeTeammateId !== void 0 ? [{ type: "teammate", aiTeammateId: filterAssigneeTeammateId }] : null,
28151
+ priorities: filterPriority === void 0 ? null : [filterPriority],
28152
+ statusTypes: filterStatusType === void 0 ? null : [filterStatusType],
28153
+ latestActAtAfter: null,
28154
+ latestActAtBefore: null
28110
28155
  };
28111
28156
  }
28157
+ function matchesMaskedEmail(email, maskedEmail) {
28158
+ const normalizedEmail = email.toLowerCase();
28159
+ const normalizedMask = maskedEmail.toLowerCase();
28160
+ return normalizedEmail.length === normalizedMask.length && [...normalizedMask].every((character, index2) => character === "*" || character === normalizedEmail[index2]);
28161
+ }
28162
+ async function resolveCurrentHumanId(workspaceId) {
28163
+ const [currentUserResponse, membersResponse] = await Promise.all([
28164
+ httpGet("/users/whoami"),
28165
+ httpGet(`/workspaces/${workspaceId}/members`)
28166
+ ]);
28167
+ if (!currentUserResponse.ok) failResponse(currentUserResponse);
28168
+ if (!membersResponse.ok) failResponse(membersResponse);
28169
+ const matchingMembers = membersResponse.data.members.filter(
28170
+ (member) => matchesMaskedEmail(member.email, currentUserResponse.data.email)
28171
+ );
28172
+ if (matchingMembers.length !== 1) {
28173
+ printError("Error: unable to uniquely resolve the current human ID in this workspace.");
28174
+ process.exit(1);
28175
+ }
28176
+ return matchingMembers[0].userId;
28177
+ }
28178
+ function parseReporterBody(options) {
28179
+ const reporterHumanId = parseOptionalPositiveInteger(options.reporterHumanId, "--reporter-human-id");
28180
+ if (options.clearReporter && reporterHumanId !== void 0) {
28181
+ throw new WorkflowOptionsError("Error: --clear-reporter cannot be used with --reporter-human-id.");
28182
+ }
28183
+ if (options.clearReporter) return { reporterHumanId: null };
28184
+ if (reporterHumanId !== void 0) return { reporterHumanId };
28185
+ return {};
28186
+ }
28112
28187
  function parsePreferredAssigneeBody(options) {
28113
28188
  const hasClear = options.clearPreferredAssignee === true;
28114
28189
  const humanId = parseOptionalPositiveInteger(options.preferredHumanId, "--preferred-human-id");
@@ -28287,7 +28362,7 @@ function printWorkflowDetail(item) {
28287
28362
  function printTaskSummary(item) {
28288
28363
  const runIds = item.runningAgentRuns.map((run) => run.pipelineId).join(",") || "-";
28289
28364
  print(
28290
- `${colors.bold}#${item.scopedId}${colors.reset} ${item.title} status=${item.statusScopedId} priority=${priorityLabel(item.priority)} assignee=${formatAssignee(item.assignee)} runs=${runIds}`
28365
+ `${colors.bold}#${item.scopedId}${colors.reset} ${item.title} status=${item.statusScopedId} priority=${priorityLabel(item.priority)} reporter=${item.reporterHumanId ?? "-"} assignee=${formatAssignee(item.assignee)} runs=${runIds}`
28291
28366
  );
28292
28367
  }
28293
28368
  function printTaskDetail(item, linkedLinkTitles) {
@@ -28295,6 +28370,7 @@ function printTaskDetail(item, linkedLinkTitles) {
28295
28370
  printDetailField2("scopedId", item.scopedId);
28296
28371
  printDetailField2("workflowFileId", item.workflowFileId);
28297
28372
  printDetailField2("ownerHumanId", item.ownerHumanId);
28373
+ printDetailField2("reporterHumanId", item.reporterHumanId);
28298
28374
  printDetailField2("title", item.title);
28299
28375
  printDetailTextField2("desc", item.desc);
28300
28376
  printDetailField2("statusScopedId", item.statusScopedId);
@@ -28615,33 +28691,41 @@ function registerTransitionCommands(workflow) {
28615
28691
  function registerTaskCommands(workflow) {
28616
28692
  const task = workflow.command("task").description("Workflow task operations");
28617
28693
  addWorkspaceOption(
28618
- task.command("list").description("List workflow tasks").option("--workflow-file-id <workflowFileId>", "Filter by workflow file ID").option("--scope <scope>", "Task scope", "all").option("-l, --limit <limit>", "Maximum number of tasks to return", "50").option("--cursor <cursor>", "Pagination cursor").option("--priority <priority>", "Filter by priority: urgent, high, medium, or low").option("--owner-human-id <humanId>", "Filter by task owner human ID").option("--assignee-human-id <humanId>", "Filter by human assignee ID").option("--assignee-assistant-id <assistantId>", "Filter by AI assistant assignee ID").option("--assignee-teammate-id <teammateId>", "Filter by AI teammate assignee ID")
28619
- ).action(
28620
- async (options) => {
28621
- const query = runOrExit4(
28622
- () => buildQuery({
28623
- scope: parseTaskScope(options.scope),
28624
- limit: parseSearchLimit(options.limit, 50, 100),
28625
- cursor: options.cursor,
28626
- workflowFileId: options.workflowFileId,
28627
- ...parseTaskListFilterQuery(options)
28628
- })
28629
- );
28630
- startSpinner("Fetching workflow tasks...");
28631
- const response = await httpGet(`/workspaces/${options.workspace}/workflow-tasks-v4${query}`);
28632
- if (!response.ok) {
28633
- stopSpinner(false, "Failed");
28634
- failResponse(response);
28635
- }
28636
- if (response.data.tasks.length === 0) {
28637
- stopSpinner(true, "No workflow tasks found.");
28638
- return;
28694
+ task.command("list").description("List workflow tasks").option("--scope <scope>", "Task scope: all, assigned_to_me, or reported_by_me", "all").option("--workflow-file-id <workflowFileId>", "Filter by workflow file ID").option("-l, --limit <limit>", "Maximum number of tasks to return", "50").option("--cursor <cursor>", "Pagination cursor").option("--priority <priority>", "Filter by priority: urgent, high, medium, or low").option("--status-type <type>", "Filter by status type: todo, in-progress, or done").option("--owner-human-id <humanId>", "Filter by task owner human ID").option("--reporter-human-id <humanId>", "Filter by task reporter human ID").option("--assignee-human-id <humanId>", "Filter by human assignee ID").option("--assignee-assistant-id <assistantId>", "Filter by AI assistant assignee ID").option("--assignee-teammate-id <teammateId>", "Filter by AI teammate assignee ID").option(
28695
+ "--sort-by <field>",
28696
+ "Sort by default, title, status, assignee, owner, priority, or updated",
28697
+ "default"
28698
+ ).option("--sort-direction <direction>", "Sort direction: asc or desc", "desc")
28699
+ ).action(async (options) => {
28700
+ const scope = runOrExit4(() => parseTaskScope(options.scope));
28701
+ const currentHumanId = scope === "all" ? void 0 : await resolveCurrentHumanId(options.workspace);
28702
+ const body = runOrExit4(() => ({
28703
+ limit: parseSearchLimit(options.limit, 50, 100),
28704
+ cursor: options.cursor,
28705
+ workflowFileId: options.workflowFileId,
28706
+ filter: parseTaskListFilter(options, scope, currentHumanId),
28707
+ sort: {
28708
+ field: parseTaskSortField(options.sortBy),
28709
+ direction: parseTaskSortDirection(options.sortDirection)
28639
28710
  }
28640
- stopSpinner(true, `Found ${response.data.tasks.length} task(s)`);
28641
- for (const item of response.data.tasks) printTaskSummary(item);
28642
- if (response.data.nextCursor) print(`${colors.dim}nextCursor=${response.data.nextCursor}${colors.reset}`);
28711
+ }));
28712
+ startSpinner("Fetching workflow tasks...");
28713
+ const response = await httpPost(
28714
+ `/workspaces/${options.workspace}/workflow-tasks-v5`,
28715
+ body
28716
+ );
28717
+ if (!response.ok) {
28718
+ stopSpinner(false, "Failed");
28719
+ failResponse(response);
28643
28720
  }
28644
- );
28721
+ if (response.data.tasks.length === 0) {
28722
+ stopSpinner(true, "No workflow tasks found.");
28723
+ return;
28724
+ }
28725
+ stopSpinner(true, `Found ${response.data.tasks.length} task(s)`);
28726
+ for (const item of response.data.tasks) printTaskSummary(item);
28727
+ if (response.data.nextCursor) print(`${colors.dim}nextCursor=${response.data.nextCursor}${colors.reset}`);
28728
+ });
28645
28729
  addWorkspaceOption(
28646
28730
  task.command("get").description("Get a workflow task").argument("<workflowFileId>").argument("<taskScopedId>")
28647
28731
  ).action(async (workflowFileId, taskScopedId, options) => {
@@ -28657,7 +28741,7 @@ function registerTaskCommands(workflow) {
28657
28741
  });
28658
28742
  addAssigneeOptions(
28659
28743
  addWorkspaceOption(
28660
- task.command("create").description("Create a workflow task").argument("<workflowFileId>").requiredOption("--title <title>", "Task title").requiredOption("--status <statusScopedId>", "Status scoped ID").option("--priority <priority>", "Priority: urgent, high, medium, or low", "medium").option("--desc-file <localPath>", "Local UTF-8 text file for task description").option("--owner-human-id <humanId>", "Task owner human ID")
28744
+ task.command("create").description("Create a workflow task").argument("<workflowFileId>").requiredOption("--title <title>", "Task title").requiredOption("--status <statusScopedId>", "Status scoped ID").option("--priority <priority>", "Priority: urgent, high, medium, or low", "medium").option("--desc-file <localPath>", "Local UTF-8 text file for task description").option("--owner-human-id <humanId>", "Task owner human ID").option("--reporter-human-id <humanId>", "Task reporter human ID").option("--clear-reporter", "Create the task without a reporter")
28661
28745
  )
28662
28746
  ).action(
28663
28747
  async (workflowFileId, options) => {
@@ -28672,11 +28756,12 @@ function registerTaskCommands(workflow) {
28672
28756
  const ownerHumanId = parseOptionalPositiveInteger(options.ownerHumanId, "--owner-human-id");
28673
28757
  if (ownerHumanId !== void 0) next.ownerHumanId = ownerHumanId;
28674
28758
  Object.assign(next, parseAssigneeBody(options, false));
28759
+ Object.assign(next, parseReporterBody(options));
28675
28760
  return next;
28676
28761
  });
28677
28762
  startSpinner("Creating task...");
28678
28763
  const createResponse = await httpPost(
28679
- `/workspaces/${options.workspace}/workflows/${workflowFileId}/tasks-v2`,
28764
+ `/workspaces/${options.workspace}/workflows/${workflowFileId}/tasks-v3`,
28680
28765
  body
28681
28766
  );
28682
28767
  if (!createResponse.ok) {
@@ -28697,7 +28782,7 @@ function registerTaskCommands(workflow) {
28697
28782
  }
28698
28783
  );
28699
28784
  addWorkspaceOption(
28700
- task.command("update").description("Update workflow task metadata").argument("<workflowFileId>").argument("<taskScopedId>").option("--title <title>", "Task title").option("--priority <priority>", "Priority: urgent, high, medium, or low").option("--desc-file <localPath>", "Local UTF-8 text file for task description").option("--clear-desc", "Clear task description").option("--owner-human-id <humanId>", "Task owner human ID")
28785
+ addTeammateAttributionOption(task.command("update")).description("Update workflow task metadata").argument("<workflowFileId>").argument("<taskScopedId>").option("--title <title>", "Task title").option("--priority <priority>", "Priority: urgent, high, medium, or low").option("--desc-file <localPath>", "Local UTF-8 text file for task description").option("--clear-desc", "Clear task description").option("--owner-human-id <humanId>", "Task owner human ID").option("--reporter-human-id <humanId>", "Task reporter human ID").option("--clear-reporter", "Clear the task reporter")
28701
28786
  ).action(
28702
28787
  async (workflowFileId, taskScopedId, options) => {
28703
28788
  const body = runOrExit4(() => {
@@ -28713,13 +28798,14 @@ function registerTaskCommands(workflow) {
28713
28798
  if (options.clearDesc) next.desc = null;
28714
28799
  const ownerHumanId = parseOptionalPositiveInteger(options.ownerHumanId, "--owner-human-id");
28715
28800
  if (ownerHumanId !== void 0) next.ownerHumanId = ownerHumanId;
28801
+ Object.assign(next, parseReporterBody(options));
28716
28802
  assertNonEmptyBody(next);
28717
- return next;
28803
+ return addTeammateAttribution(next, options);
28718
28804
  });
28719
28805
  const id = runOrExit4(() => parsePositiveInteger(taskScopedId, "taskScopedId"));
28720
28806
  startSpinner("Updating task...");
28721
28807
  const updateResponse = await httpPatch(
28722
- `/workspaces/${options.workspace}/workflows/${workflowFileId}/tasks-v2/${id}/metadata`,
28808
+ `/workspaces/${options.workspace}/workflows/${workflowFileId}/tasks-v3/${id}/metadata`,
28723
28809
  body
28724
28810
  );
28725
28811
  if (!updateResponse.ok) {
@@ -28740,7 +28826,7 @@ function registerTaskCommands(workflow) {
28740
28826
  if (action === "add-linked-links") {
28741
28827
  command.option("--title <title>", "Optional link title");
28742
28828
  }
28743
- addWorkspaceOption(command).action(
28829
+ addWorkspaceOption(addTeammateAttributionOption(command)).action(
28744
28830
  async (workflowFileId, taskScopedId, options) => {
28745
28831
  const { id, link } = runOrExit4(() => ({
28746
28832
  id: parsePositiveInteger(taskScopedId, "taskScopedId"),
@@ -28749,9 +28835,10 @@ function registerTaskCommands(workflow) {
28749
28835
  url: parseHttpUrl(options.url)
28750
28836
  }
28751
28837
  }));
28838
+ const body = runOrExit4(() => addTeammateAttribution({ links: [link] }, options));
28752
28839
  startSpinner(action === "add-linked-links" ? "Adding linked URL..." : "Removing linked URL...");
28753
28840
  const path4 = `/workspaces/${options.workspace}/workflows/${workflowFileId}/tasks-v2/${id}/linked-links`;
28754
- const updateResponse = action === "add-linked-links" ? await httpPost(path4, { links: [link] }) : await httpDelete(path4, { links: [link] });
28841
+ const updateResponse = action === "add-linked-links" ? await httpPost(path4, body) : await httpDelete(path4, body);
28755
28842
  if (!updateResponse.ok) {
28756
28843
  stopSpinner(false, "Failed");
28757
28844
  failResponse(updateResponse);
@@ -28767,17 +28854,18 @@ function registerTaskCommands(workflow) {
28767
28854
  );
28768
28855
  }
28769
28856
  addWorkspaceOption(
28770
- task.command("move").description("Move a workflow task to another status").argument("<workflowFileId>").argument("<taskScopedId>").requiredOption("--status <statusScopedId>", "Target status scoped ID")
28857
+ addTeammateAttributionOption(task.command("move")).description("Move a workflow task to another status").argument("<workflowFileId>").argument("<taskScopedId>").requiredOption("--status <statusScopedId>", "Target status scoped ID")
28771
28858
  ).action(
28772
28859
  async (workflowFileId, taskScopedId, options) => {
28773
28860
  const { id, statusScopedId } = runOrExit4(() => ({
28774
28861
  id: parsePositiveInteger(taskScopedId, "taskScopedId"),
28775
28862
  statusScopedId: parsePositiveInteger(options.status, "--status")
28776
28863
  }));
28864
+ const body = runOrExit4(() => addTeammateAttribution({ statusScopedId }, options));
28777
28865
  startSpinner("Moving task...");
28778
28866
  const updateResponse = await httpPatch(
28779
28867
  `/workspaces/${options.workspace}/workflows/${workflowFileId}/tasks-v2/${id}/status`,
28780
- { statusScopedId }
28868
+ body
28781
28869
  );
28782
28870
  if (!updateResponse.ok) {
28783
28871
  stopSpinner(false, "Failed");
@@ -28793,7 +28881,7 @@ function registerTaskCommands(workflow) {
28793
28881
  }
28794
28882
  );
28795
28883
  addWorkspaceOption(
28796
- task.command("move-after").description("Move a workflow task after an anchor task within a Board column").argument("<workflowFileId>").argument("<taskScopedId>").requiredOption("--status <statusScopedId>", "Target status scoped ID").option("--after <taskScopedId>", "Anchor task scoped ID").option("--first", "Move to the top of the column")
28884
+ addTeammateAttributionOption(task.command("move-after")).description("Move a workflow task after an anchor task within a Board column").argument("<workflowFileId>").argument("<taskScopedId>").requiredOption("--status <statusScopedId>", "Target status scoped ID").option("--after <taskScopedId>", "Anchor task scoped ID").option("--first", "Move to the top of the column")
28797
28885
  ).action(
28798
28886
  async (workflowFileId, taskScopedId, options) => {
28799
28887
  const { id, statusScopedId, anchorTaskScopedId } = runOrExit4(() => {
@@ -28809,10 +28897,11 @@ function registerTaskCommands(workflow) {
28809
28897
  anchorTaskScopedId: options.first ? null : parsePositiveInteger(options.after, "--after")
28810
28898
  };
28811
28899
  });
28900
+ const body = runOrExit4(() => addTeammateAttribution({ statusScopedId, anchorTaskScopedId }, options));
28812
28901
  startSpinner("Moving task...");
28813
28902
  const updateResponse = await httpPost(
28814
28903
  `/workspaces/${options.workspace}/workflows/${workflowFileId}/tasks-v2/${id}/move-after`,
28815
- { statusScopedId, anchorTaskScopedId }
28904
+ body
28816
28905
  );
28817
28906
  if (!updateResponse.ok) {
28818
28907
  stopSpinner(false, "Failed");
@@ -28829,14 +28918,14 @@ function registerTaskCommands(workflow) {
28829
28918
  );
28830
28919
  addAssigneeOptions(
28831
28920
  addWorkspaceOption(
28832
- task.command("assign").description("Update workflow task assignee").argument("<workflowFileId>").argument("<taskScopedId>").option("--clear", "Clear assignee")
28921
+ addTeammateAttributionOption(task.command("assign")).description("Update workflow task assignee").argument("<workflowFileId>").argument("<taskScopedId>").option("--clear", "Clear assignee")
28833
28922
  )
28834
28923
  ).action(
28835
28924
  async (workflowFileId, taskScopedId, options) => {
28836
28925
  const body = runOrExit4(() => {
28837
28926
  const next = parseAssigneeBody(options, true);
28838
28927
  if (Object.keys(next).length === 0 && options.clear !== true) assertNonEmptyBody(next);
28839
- return next;
28928
+ return addTeammateAttribution(next, options);
28840
28929
  });
28841
28930
  const id = runOrExit4(() => parsePositiveInteger(taskScopedId, "taskScopedId"));
28842
28931
  startSpinner("Updating task assignee...");
@@ -28874,23 +28963,23 @@ function registerTaskCommands(workflow) {
28874
28963
  }
28875
28964
  function getWorkflowTask(workspaceId, workflowFileId, taskScopedId) {
28876
28965
  return httpGet(
28877
- `/workspaces/${workspaceId}/workflows/${workflowFileId}/tasks-v3/${taskScopedId}`
28966
+ `/workspaces/${workspaceId}/workflows/${workflowFileId}/tasks-v4/${taskScopedId}`
28878
28967
  );
28879
28968
  }
28880
28969
  function registerCommentCommands(workflow) {
28881
28970
  const comment = workflow.command("comment").description("Workflow task comment operations");
28882
28971
  addWorkspaceOption(
28883
- comment.command("create").description("Create a workflow task comment").argument("<workflowFileId>").argument("<taskScopedId>").requiredOption("--content-path <localPath>", "Local UTF-8 text file for comment content")
28972
+ addTeammateAttributionOption(comment.command("create")).description("Create a workflow task comment").argument("<workflowFileId>").argument("<taskScopedId>").requiredOption("--content-path <localPath>", "Local UTF-8 text file for comment content")
28884
28973
  ).action(
28885
28974
  async (workflowFileId, taskScopedId, options) => {
28886
- const { id, content: content3 } = runOrExit4(() => ({
28975
+ const { id, body } = runOrExit4(() => ({
28887
28976
  id: parsePositiveInteger(taskScopedId, "taskScopedId"),
28888
- content: readCommentContentFile2(options.contentPath)
28977
+ body: addTeammateAttribution({ content: readCommentContentFile2(options.contentPath) }, options)
28889
28978
  }));
28890
28979
  startSpinner("Creating comment...");
28891
28980
  const response = await httpPost(
28892
28981
  `/workspaces/${options.workspace}/workflows/${workflowFileId}/tasks/${id}/comments`,
28893
- { content: content3 }
28982
+ body
28894
28983
  );
28895
28984
  if (!response.ok) {
28896
28985
  stopSpinner(false, "Failed");
@@ -28930,18 +29019,18 @@ function registerCommentCommands(workflow) {
28930
29019
  if (response.data.nextCursor) print(`${colors.dim}nextCursor=${response.data.nextCursor}${colors.reset}`);
28931
29020
  });
28932
29021
  addWorkspaceOption(
28933
- comment.command("update").description("Edit a workflow task comment authored by the current user").argument("<workflowFileId>").argument("<taskScopedId>").argument("<commentId>").requiredOption("--content-path <localPath>", "Local UTF-8 text file for comment content")
29022
+ addTeammateAttributionOption(comment.command("update")).description("Edit a workflow task comment authored by the current actor").argument("<workflowFileId>").argument("<taskScopedId>").argument("<commentId>").requiredOption("--content-path <localPath>", "Local UTF-8 text file for comment content")
28934
29023
  ).action(
28935
29024
  async (workflowFileId, taskScopedId, commentId, options) => {
28936
- const { task, comment: commentIdValue, content: content3 } = runOrExit4(() => ({
29025
+ const { task, comment: commentIdValue, body } = runOrExit4(() => ({
28937
29026
  task: parsePositiveInteger(taskScopedId, "taskScopedId"),
28938
29027
  comment: parsePositiveInteger(commentId, "commentId"),
28939
- content: readCommentContentFile2(options.contentPath)
29028
+ body: addTeammateAttribution({ content: readCommentContentFile2(options.contentPath) }, options)
28940
29029
  }));
28941
29030
  startSpinner("Updating comment...");
28942
29031
  const response = await httpPatch(
28943
29032
  `/workspaces/${options.workspace}/workflows/${workflowFileId}/tasks/${task}/comments/${commentIdValue}`,
28944
- { content: content3 }
29033
+ body
28945
29034
  );
28946
29035
  if (!response.ok) {
28947
29036
  stopSpinner(false, "Failed");
@@ -28951,16 +29040,17 @@ function registerCommentCommands(workflow) {
28951
29040
  }
28952
29041
  );
28953
29042
  addWorkspaceOption(
28954
- comment.command("delete").description("Delete a workflow task comment").argument("<workflowFileId>").argument("<taskScopedId>").argument("<commentId>")
29043
+ addTeammateAttributionOption(comment.command("delete")).description("Delete a workflow task comment").argument("<workflowFileId>").argument("<taskScopedId>").argument("<commentId>")
28955
29044
  ).action(
28956
29045
  async (workflowFileId, taskScopedId, commentId, options) => {
28957
29046
  const ids = runOrExit4(() => ({
28958
29047
  task: parsePositiveInteger(taskScopedId, "taskScopedId"),
28959
- comment: parsePositiveInteger(commentId, "commentId")
29048
+ comment: parsePositiveInteger(commentId, "commentId"),
29049
+ asTeammateId: parseOptionalPositiveInteger(options.asTeammate, "--as-teammate")
28960
29050
  }));
28961
29051
  startSpinner("Deleting comment...");
28962
29052
  const response = await httpDelete(
28963
- `/workspaces/${options.workspace}/workflows/${workflowFileId}/tasks/${ids.task}/comments/${ids.comment}`
29053
+ `/workspaces/${options.workspace}/workflows/${workflowFileId}/tasks/${ids.task}/comments/${ids.comment}${buildQuery({ asTeammateId: ids.asTeammateId })}`
28964
29054
  );
28965
29055
  if (!response.ok) {
28966
29056
  stopSpinner(false, "Failed");
@@ -29014,7 +29104,7 @@ var FLUSH_TIMEOUT_MS = 3e3;
29014
29104
  var MAX_BATCH_SIZE = 100;
29015
29105
  function commonLabels() {
29016
29106
  return {
29017
- cli_version: "0.10.0-beta.9",
29107
+ cli_version: "0.11.0",
29018
29108
  node_version: process.versions.node,
29019
29109
  os: (0, import_node_os11.platform)(),
29020
29110
  arch: (0, import_node_os11.arch)(),
@@ -29060,7 +29150,7 @@ async function flush() {
29060
29150
  }
29061
29151
  const batch = buffer.splice(0, MAX_BATCH_SIZE);
29062
29152
  const payload = {
29063
- release_id: "0.10.0-beta.9",
29153
+ release_id: "0.11.0",
29064
29154
  client_type: "cli",
29065
29155
  metric_data_list: batch.map((m) => ({
29066
29156
  profile: "cli",
@@ -29443,9 +29533,9 @@ function commandPath3(command) {
29443
29533
  }
29444
29534
 
29445
29535
  // src/index.ts
29446
- var program2 = createProgram("0.10.0-beta.9");
29447
- installDaemonReconcileHook(program2, "0.10.0-beta.9");
29448
- installUpdateHook(program2, "0.10.0-beta.9");
29536
+ var program2 = createProgram("0.11.0");
29537
+ installDaemonReconcileHook(program2, "0.11.0");
29538
+ installUpdateHook(program2, "0.11.0");
29449
29539
  instrumentProgram(program2);
29450
29540
  installExitHandler();
29451
29541
  program2.parseAsync(process.argv).then(async () => {