@doist/automations-cli 1.28.0 → 1.29.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
@@ -7,7 +7,7 @@ import {
7
7
  collectSkillStatus,
8
8
  getInstaller,
9
9
  updateAllInstalledSkills
10
- } from "./chunk-TGFCBT2H.js";
10
+ } from "./chunk-3JSM3SAL.js";
11
11
 
12
12
  // ../../node_modules/ajv/dist/compile/codegen/code.js
13
13
  var require_code = __commonJS({
@@ -6899,7 +6899,7 @@ import { fileURLToPath } from "node:url";
6899
6899
  // package.json
6900
6900
  var package_default = {
6901
6901
  name: "@doist/automations-cli",
6902
- version: "1.28.0",
6902
+ version: "1.29.0",
6903
6903
  description: "Command-line client for Todoist Automations",
6904
6904
  type: "module",
6905
6905
  bin: {
@@ -27164,6 +27164,47 @@ function isSkipCategory(category) {
27164
27164
  return SKIP_CATEGORIES.includes(category);
27165
27165
  }
27166
27166
 
27167
+ // ../../packages/core/dist/esm/schemas/admin-support.schema.js
27168
+ var AdminSupportManifestSnapshotSchema = external_exports.object({
27169
+ id: external_exports.string(),
27170
+ createdAt: external_exports.string(),
27171
+ manifest: external_exports.unknown()
27172
+ });
27173
+ var AdminSupportRanManifestSchema = external_exports.discriminatedUnion("source", [
27174
+ external_exports.object({ source: external_exports.literal("temporal-history"), manifest: external_exports.unknown() }),
27175
+ external_exports.object({ source: external_exports.literal("unavailable"), manifest: external_exports.null() })
27176
+ ]);
27177
+ var AdminRunLookupResponseSchema = external_exports.object({
27178
+ run: external_exports.object({
27179
+ id: external_exports.string(),
27180
+ mode: external_exports.enum(["live", "test"]),
27181
+ status: external_exports.enum(AUTOMATION_RUN_STATUSES),
27182
+ createdAt: external_exports.string(),
27183
+ updatedAt: external_exports.string(),
27184
+ failureReason: external_exports.string().nullable(),
27185
+ // The stored outcome category: a failure category, or the reason a run was skipped.
27186
+ failureCategory: external_exports.enum([...FAILURE_CATEGORIES, ...SKIP_CATEGORIES]).nullable(),
27187
+ temporalWorkflowId: external_exports.string().nullable(),
27188
+ temporalRunId: external_exports.string(),
27189
+ temporalUrl: external_exports.string().nullable()
27190
+ }),
27191
+ automation: external_exports.object({
27192
+ id: external_exports.string(),
27193
+ name: external_exports.string().nullable(),
27194
+ enabled: external_exports.boolean(),
27195
+ todoistUserId: external_exports.string()
27196
+ }).nullable(),
27197
+ /**
27198
+ * The Todoist user id only. Name and email stay out of this response on
27199
+ * purpose: the Todoist support admin already shows them for an id.
27200
+ */
27201
+ ownerId: external_exports.string().nullable(),
27202
+ ranManifest: AdminSupportRanManifestSchema,
27203
+ currentManifest: AdminSupportManifestSnapshotSchema.nullable(),
27204
+ /** True when the published manifest differs from the one that ran. */
27205
+ manifestChangedSinceRun: external_exports.boolean()
27206
+ });
27207
+
27167
27208
  // ../../packages/core/dist/esm/schemas/shared.schema.js
27168
27209
  var RolloutCompatibleNullableStringSchema = external_exports.string().nullish().transform((value) => value ?? null);
27169
27210
 
@@ -29362,6 +29403,14 @@ var automationExecutionResultSchema = external_exports.discriminatedUnion("statu
29362
29403
  })
29363
29404
  ]);
29364
29405
 
29406
+ // ../../packages/core/dist/esm/schemas/pagination.schema.js
29407
+ var DEFAULT_PAGINATION_LIMIT = 20;
29408
+ var MAX_PAGINATION_LIMIT = 100;
29409
+ var CursorPaginationSchema = external_exports.object({
29410
+ cursor: external_exports.string().optional(),
29411
+ limit: external_exports.preprocess((val) => Number(val), external_exports.number().int().min(1).max(MAX_PAGINATION_LIMIT)).default(DEFAULT_PAGINATION_LIMIT)
29412
+ });
29413
+
29365
29414
  // ../../packages/core/dist/esm/schemas/automation-draft.schema.js
29366
29415
  var automationDraftSchema = external_exports.object({
29367
29416
  id: external_exports.string(),
@@ -29387,6 +29436,9 @@ var automationDraftListResponseSchema = external_exports.object({
29387
29436
  data: external_exports.array(automationDraftSchema),
29388
29437
  nextCursor: external_exports.string().nullable()
29389
29438
  });
29439
+ var listAutomationDraftsQuerySchema = CursorPaginationSchema.extend({
29440
+ conversationId: external_exports.string().min(1).optional()
29441
+ });
29390
29442
  var finalizeAutomationDraftResponseSchema = external_exports.object({
29391
29443
  automation: automationSchema
29392
29444
  });
@@ -30480,14 +30532,6 @@ var oauthCallbackCompletionResultSchema = external_exports.discriminatedUnion("i
30480
30532
  oauthCallbackFailureResultSchema
30481
30533
  ]);
30482
30534
 
30483
- // ../../packages/core/dist/esm/schemas/pagination.schema.js
30484
- var DEFAULT_PAGINATION_LIMIT = 20;
30485
- var MAX_PAGINATION_LIMIT = 100;
30486
- var CursorPaginationSchema = external_exports.object({
30487
- cursor: external_exports.string().optional(),
30488
- limit: external_exports.preprocess((val) => Number(val), external_exports.number().int().min(1).max(MAX_PAGINATION_LIMIT)).default(DEFAULT_PAGINATION_LIMIT)
30489
- });
30490
-
30491
30535
  // ../../packages/core/dist/esm/schemas/push-subscription.schema.js
30492
30536
  var PushSubscriptionKeysSchema = external_exports.object({
30493
30537
  p256dh: external_exports.string().min(1).max(255),
@@ -31325,11 +31369,11 @@ function isRequestOptions(value) {
31325
31369
  }
31326
31370
  var AutomationDraftsClient = class extends BaseClient {
31327
31371
  async list(args = {}, options) {
31328
- const { cursor, limit } = CursorPaginationSchema.parse(args);
31372
+ const { cursor, limit, conversationId } = listAutomationDraftsQuerySchema.parse(args);
31329
31373
  const data = await this.request({
31330
31374
  method: "GET",
31331
31375
  path: automationDraftsEndpoints.list,
31332
- query: { cursor, limit },
31376
+ query: { cursor, limit, conversationId },
31333
31377
  options
31334
31378
  });
31335
31379
  return automationDraftListResponseSchema.parse(data);
@@ -31712,11 +31756,11 @@ function root7(workspaceId) {
31712
31756
  // ../../packages/sdk/dist/esm/clients/workspace-automation-drafts/workspace-automation-drafts-client.js
31713
31757
  var WorkspaceAutomationDraftsClient = class extends BaseClient {
31714
31758
  async list(workspaceId, args = {}, options) {
31715
- const { cursor, limit } = CursorPaginationSchema.parse(args);
31759
+ const { cursor, limit, conversationId } = listAutomationDraftsQuerySchema.parse(args);
31716
31760
  const data = await this.request({
31717
31761
  method: "GET",
31718
31762
  path: workspaceAutomationDraftsEndpoints.list(IdSchema.parse(workspaceId)),
31719
- query: { cursor, limit },
31763
+ query: { cursor, limit, conversationId },
31720
31764
  options
31721
31765
  });
31722
31766
  return automationDraftListResponseSchema.parse(data);
@@ -33466,7 +33510,7 @@ function toOutcome2(status) {
33466
33510
 
33467
33511
  // ../../packages/sdk/dist/esm/drafts/conversation-draft.js
33468
33512
  async function findConversationDraftId(api, { conversationId, workspaceId, signal }) {
33469
- const args = { limit: MAX_PAGINATION_LIMIT };
33513
+ const args = { conversationId, limit: MAX_PAGINATION_LIMIT };
33470
33514
  const page = workspaceId === null ? await api.automationDrafts.list(args, { signal }) : await api.workspaceAutomationDrafts.list(workspaceId, args, { signal });
33471
33515
  return page.data.find((draft) => draft.conversationId === conversationId)?.id ?? null;
33472
33516
  }
@@ -35339,7 +35383,7 @@ function toFailureRecord(failure2, details) {
35339
35383
  };
35340
35384
  }
35341
35385
  function writeFailure(mode, status, failure2) {
35342
- const result = status === "error" ? toFailureRecord(failure2) : { status, message: failure2.message };
35386
+ const result = status === "error" ? toFailureRecord(failure2) : { status, ...failure2.code ? { code: failure2.code } : {}, message: failure2.message };
35343
35387
  if (mode === "json") {
35344
35388
  process.stdout.write(`${formatJson4(result)}
35345
35389
  `);
@@ -35405,6 +35449,7 @@ async function runApiCommand(command, operation, presentation, execution = {}) {
35405
35449
  }
35406
35450
 
35407
35451
  // src/lib/wait-options.ts
35452
+ import { CliError as CliError4, getErrorMessage as getErrorMessage7 } from "@doist/cli-core";
35408
35453
  var DEFAULT_WAIT = "10m";
35409
35454
  var TOKEN_LIFETIME_MARGIN_MS = 2 * 60 * 1e3;
35410
35455
  function addWaitOptions(command, waitDescription) {
@@ -35449,6 +35494,24 @@ function reportRunProgress(report) {
35449
35494
  report({ status: run.status, ...step ? { step } : {} });
35450
35495
  };
35451
35496
  }
35497
+ function toRunWaitError(error62, {
35498
+ run,
35499
+ command,
35500
+ codes,
35501
+ signal
35502
+ }) {
35503
+ const hints = [`See how it ends: ${command}`];
35504
+ if (signal.aborted) {
35505
+ return new CliError4(codes.interrupted, `Stopped waiting for ${run}. It keeps running.`, {
35506
+ hints
35507
+ });
35508
+ }
35509
+ return new CliError4(
35510
+ codes.failed,
35511
+ `Checking on ${run} failed: ${getErrorMessage7(error62).replace(/\.?$/, ".")} It keeps running.`,
35512
+ { hints }
35513
+ );
35514
+ }
35452
35515
  function toTerminalRecords(result) {
35453
35516
  return [{ type: result.action, ...result, terminal: true }];
35454
35517
  }
@@ -35731,7 +35794,7 @@ function capitalize(value) {
35731
35794
  }
35732
35795
 
35733
35796
  // src/commands/automation/trigger-service.ts
35734
- import { CliError as CliError4 } from "@doist/cli-core";
35797
+ import { CliError as CliError5 } from "@doist/cli-core";
35735
35798
  async function triggerAutomation(runApi, {
35736
35799
  automationId,
35737
35800
  wait: wait2,
@@ -35748,7 +35811,7 @@ async function triggerAutomation(runApi, {
35748
35811
  const flag = scopeFlag(runApi.workspaceId);
35749
35812
  if (!started) {
35750
35813
  if (wait2) {
35751
- throw new CliError4(
35814
+ throw new CliError5(
35752
35815
  "TRIGGER_RUN_UNREPORTED",
35753
35816
  "The run started, but the API did not say which one it was, so it cannot be waited for.",
35754
35817
  { hints: [`See the latest run: tda run list ${automationId} --limit 1 ${flag}`] }
@@ -35764,11 +35827,21 @@ async function triggerAutomation(runApi, {
35764
35827
  if (!wait2) {
35765
35828
  return { action: "triggered", ...identity, status: started.status };
35766
35829
  }
35767
- const finished = await waitForRun(runApi, identity, {
35768
- ...wait2,
35769
- signal,
35770
- ...onProgress ? { onPoll: reportRunProgress(onProgress) } : {}
35771
- });
35830
+ let finished;
35831
+ try {
35832
+ finished = await waitForRun(runApi, identity, {
35833
+ ...wait2,
35834
+ signal,
35835
+ ...onProgress ? { onPoll: reportRunProgress(onProgress) } : {}
35836
+ });
35837
+ } catch (error62) {
35838
+ throw toRunWaitError(error62, {
35839
+ run: `run ${identity.runId} of automation ${automationId}`,
35840
+ command: identity.command,
35841
+ codes: { interrupted: "TRIGGER_WAIT_INTERRUPTED", failed: "TRIGGER_WAIT_FAILED" },
35842
+ signal
35843
+ });
35844
+ }
35772
35845
  return {
35773
35846
  action: "run_finished",
35774
35847
  ...identity,
@@ -36108,7 +36181,7 @@ function collectOption(value, previous) {
36108
36181
  }
36109
36182
 
36110
36183
  // src/commands/chat/chat-service.ts
36111
- import { CliError as CliError6 } from "@doist/cli-core";
36184
+ import { CliError as CliError7 } from "@doist/cli-core";
36112
36185
  import { createInterface } from "node:readline/promises";
36113
36186
 
36114
36187
  // src/commands/chat/connection-authorizer.ts
@@ -36652,7 +36725,7 @@ import { link, mkdir, readFile, rm, writeFile } from "node:fs/promises";
36652
36725
  import { tmpdir } from "node:os";
36653
36726
  import { join } from "node:path";
36654
36727
  import { randomUUID } from "node:crypto";
36655
- import { CliError as CliError5 } from "@doist/cli-core";
36728
+ import { CliError as CliError6 } from "@doist/cli-core";
36656
36729
  var ConversationTurnLock = class {
36657
36730
  directory;
36658
36731
  pid;
@@ -36689,7 +36762,7 @@ var ConversationTurnLock = class {
36689
36762
  }
36690
36763
  const current = await readLock(path);
36691
36764
  if (current && this.isProcessRunning(current.pid)) {
36692
- throw new CliError5(
36765
+ throw new CliError6(
36693
36766
  "CHAT_TURN_ACTIVE",
36694
36767
  `Conversation ${conversationId} already has an active turn in process ${current.pid}. Continue monitoring that process; do not invoke continue until it exits.`
36695
36768
  );
@@ -36818,7 +36891,7 @@ var ChatService = class {
36818
36891
  } else {
36819
36892
  const nextMessage = this.interactive ? await this.promptForMessage(signal) : "";
36820
36893
  if (!nextMessage) {
36821
- throw new CliError6(
36894
+ throw new CliError7(
36822
36895
  "CHAT_INPUT_REQUIRED",
36823
36896
  "A message or --connection selection is required to continue."
36824
36897
  );
@@ -36959,7 +37032,7 @@ var ChatService = class {
36959
37032
  });
36960
37033
  } catch (error62) {
36961
37034
  if (error62 instanceof ChatTurnInputError) {
36962
- throw new CliError6(`CHAT_${error62.code.toUpperCase()}`, describeInputError(error62));
37035
+ throw new CliError7(`CHAT_${error62.code.toUpperCase()}`, describeInputError(error62));
36963
37036
  }
36964
37037
  throw error62;
36965
37038
  }
@@ -37830,7 +37903,7 @@ function registerConnectorCommand(program) {
37830
37903
  }
37831
37904
 
37832
37905
  // src/lib/manifest-input.ts
37833
- import { CliError as CliError7, getErrorMessage as getErrorMessage7 } from "@doist/cli-core";
37906
+ import { CliError as CliError8, getErrorMessage as getErrorMessage8 } from "@doist/cli-core";
37834
37907
  import { Option as Option6 } from "commander";
37835
37908
  import { readFile as readFile2 } from "node:fs/promises";
37836
37909
  import { text } from "node:stream/consumers";
@@ -37844,9 +37917,9 @@ async function readManifestInput(options, input2 = process.stdin) {
37844
37917
  try {
37845
37918
  return JSON.parse(source.content);
37846
37919
  } catch (error62) {
37847
- throw new CliError7(
37920
+ throw new CliError8(
37848
37921
  "MANIFEST_UNREADABLE",
37849
- `${source.label} is not valid JSON: ${getErrorMessage7(error62)}`
37922
+ `${source.label} is not valid JSON: ${getErrorMessage8(error62)}`
37850
37923
  );
37851
37924
  }
37852
37925
  }
@@ -37855,9 +37928,9 @@ async function readSource(options, input2) {
37855
37928
  try {
37856
37929
  return { label: options.file, content: await readFile2(options.file, "utf8") };
37857
37930
  } catch (error62) {
37858
- throw new CliError7(
37931
+ throw new CliError8(
37859
37932
  "MANIFEST_UNREADABLE",
37860
- `Could not read ${options.file}: ${getErrorMessage7(error62)}`
37933
+ `Could not read ${options.file}: ${getErrorMessage8(error62)}`
37861
37934
  );
37862
37935
  }
37863
37936
  }
@@ -37865,17 +37938,17 @@ async function readSource(options, input2) {
37865
37938
  try {
37866
37939
  return { label: "Standard input", content: await text(input2) };
37867
37940
  } catch (error62) {
37868
- throw new CliError7(
37941
+ throw new CliError8(
37869
37942
  "MANIFEST_UNREADABLE",
37870
- `Could not read standard input: ${getErrorMessage7(error62)}`
37943
+ `Could not read standard input: ${getErrorMessage8(error62)}`
37871
37944
  );
37872
37945
  }
37873
37946
  }
37874
- throw new CliError7("MANIFEST_UNREADABLE", "Provide the manifest with --file <path> or --stdin.");
37947
+ throw new CliError8("MANIFEST_UNREADABLE", "Provide the manifest with --file <path> or --stdin.");
37875
37948
  }
37876
37949
 
37877
37950
  // src/commands/draft/draft-service.ts
37878
- import { CliError as CliError8, getErrorMessage as getErrorMessage8 } from "@doist/cli-core";
37951
+ import { CliError as CliError9, getErrorMessage as getErrorMessage9 } from "@doist/cli-core";
37879
37952
  import { readFile as readFile3 } from "node:fs/promises";
37880
37953
  function createDraft2(draftApi, input2) {
37881
37954
  return withRecoveryHints(draftApi, createDraft(draftApi, input2));
@@ -37908,13 +37981,13 @@ async function withRecoveryHints(draftApi, operation) {
37908
37981
  const draftId = error62.draftId ?? "<draft-id>";
37909
37982
  switch (error62.code) {
37910
37983
  case "manifest_invalid":
37911
- throw new CliError8("MANIFEST_INVALID", error62.message);
37984
+ throw new CliError9("MANIFEST_INVALID", error62.message);
37912
37985
  case "draft_conflict":
37913
- throw new CliError8("DRAFT_CONFLICT", error62.message, {
37986
+ throw new CliError9("DRAFT_CONFLICT", error62.message, {
37914
37987
  hints: draftHints(scope, draftId)
37915
37988
  });
37916
37989
  case "draft_manifest_rejected":
37917
- throw new CliError8("DRAFT_MANIFEST_REJECTED", error62.message, {
37990
+ throw new CliError9("DRAFT_MANIFEST_REJECTED", error62.message, {
37918
37991
  hints: draftHints(scope, draftId)
37919
37992
  });
37920
37993
  case "draft_not_ready":
@@ -37965,7 +38038,15 @@ async function startDraftTest2(draftApi, {
37965
38038
  ...onProgress ? { onPoll: reportRunProgress(onProgress) } : {}
37966
38039
  });
37967
38040
  } catch (error62) {
37968
- throw toDraftTestWaitError(error62, identity, signal);
38041
+ throw toRunWaitError(error62, {
38042
+ run: `test run ${identity.testRunId} of draft ${identity.draftId}`,
38043
+ command: identity.command,
38044
+ codes: {
38045
+ interrupted: "DRAFT_TEST_WAIT_INTERRUPTED",
38046
+ failed: "DRAFT_TEST_WAIT_FAILED"
38047
+ },
38048
+ signal
38049
+ });
37969
38050
  }
37970
38051
  return {
37971
38052
  action: "test_finished",
@@ -37977,25 +38058,9 @@ async function startDraftTest2(draftApi, {
37977
38058
  result: finished.result
37978
38059
  };
37979
38060
  }
37980
- function toDraftTestWaitError(error62, identity, signal) {
37981
- const run = `test run ${identity.testRunId} of draft ${identity.draftId}`;
37982
- const hints = [`See how it ends: ${identity.command}`];
37983
- if (signal.aborted) {
37984
- return new CliError8(
37985
- "DRAFT_TEST_WAIT_INTERRUPTED",
37986
- `Stopped waiting for ${run}. It keeps running.`,
37987
- { hints }
37988
- );
37989
- }
37990
- return new CliError8(
37991
- "DRAFT_TEST_WAIT_FAILED",
37992
- `Checking on ${run} failed: ${getErrorMessage8(error62).replace(/\.?$/, ".")} It keeps running.`,
37993
- { hints }
37994
- );
37995
- }
37996
38061
  function draftNotReadyError(message, draftId, scope) {
37997
38062
  const flag = scopeFlag(scope);
37998
- return new CliError8("DRAFT_NOT_READY", message, {
38063
+ return new CliError9("DRAFT_NOT_READY", message, {
37999
38064
  hints: [
38000
38065
  `See the issues: tda draft view ${draftId} ${flag}`,
38001
38066
  `Bind connections: tda draft connect ${draftId} --auto ${flag}`
@@ -38009,13 +38074,13 @@ function toDraftTestCliError(refusal, draftId, scope) {
38009
38074
  return draftNotReadyError(refusal.message, draftId, scope);
38010
38075
  case "draft_test_payload_required":
38011
38076
  case "draft_test_payload_filtered":
38012
- return new CliError8(refusal.code.toUpperCase(), refusal.message, {
38077
+ return new CliError9(refusal.code.toUpperCase(), refusal.message, {
38013
38078
  hints: [
38014
38079
  `Test with a real event: tda draft test ${draftId} --trigger <event> --payload-file <path> ${flag}`
38015
38080
  ]
38016
38081
  });
38017
38082
  default:
38018
- return new CliError8(refusal.code.toUpperCase(), refusal.message);
38083
+ return new CliError9(refusal.code.toUpperCase(), refusal.message);
38019
38084
  }
38020
38085
  }
38021
38086
  async function readTestPayloadFile(path) {
@@ -38023,17 +38088,17 @@ async function readTestPayloadFile(path) {
38023
38088
  try {
38024
38089
  content = await readFile3(path, "utf8");
38025
38090
  } catch (error62) {
38026
- throw new CliError8(
38091
+ throw new CliError9(
38027
38092
  "PAYLOAD_UNREADABLE",
38028
- `Could not read ${path}: ${getErrorMessage8(error62)}`
38093
+ `Could not read ${path}: ${getErrorMessage9(error62)}`
38029
38094
  );
38030
38095
  }
38031
38096
  try {
38032
38097
  return JSON.parse(content);
38033
38098
  } catch (error62) {
38034
- throw new CliError8(
38099
+ throw new CliError9(
38035
38100
  "PAYLOAD_UNREADABLE",
38036
- `${path} is not valid JSON: ${getErrorMessage8(error62)}`
38101
+ `${path} is not valid JSON: ${getErrorMessage9(error62)}`
38037
38102
  );
38038
38103
  }
38039
38104
  }
@@ -38220,7 +38285,7 @@ function formatDraftTest(result) {
38220
38285
  }
38221
38286
 
38222
38287
  // src/commands/draft/validate-command.ts
38223
- import { CliError as CliError9 } from "@doist/cli-core";
38288
+ import { CliError as CliError10 } from "@doist/cli-core";
38224
38289
 
38225
38290
  // src/lib/local-command.ts
38226
38291
  async function runLocalCommand(command, operation, presentation, execution = {}) {
@@ -38252,7 +38317,7 @@ function registerDraftValidateCommand(draft) {
38252
38317
  function validateManifestInput(manifest) {
38253
38318
  const validation = validateManifest(manifest);
38254
38319
  if (!validation.isValid) {
38255
- throw new CliError9(
38320
+ throw new CliError10(
38256
38321
  "MANIFEST_INVALID",
38257
38322
  `Manifest is invalid: ${validation.errors.join("; ")}`
38258
38323
  );
@@ -38583,11 +38648,11 @@ function registerRunCommand(program) {
38583
38648
  }
38584
38649
 
38585
38650
  // src/commands/skill/shared.ts
38586
- import { CliError as CliError10 } from "@doist/cli-core";
38651
+ import { CliError as CliError11 } from "@doist/cli-core";
38587
38652
  function requireInstaller(agent) {
38588
38653
  const installer = getInstaller(agent);
38589
38654
  if (!installer) {
38590
- throw new CliError10("UNKNOWN_AGENT", `Unknown agent: ${agent}.`, {
38655
+ throw new CliError11("UNKNOWN_AGENT", `Unknown agent: ${agent}.`, {
38591
38656
  hints: [`Available agents: ${AGENT_NAMES.join(", ")}.`]
38592
38657
  });
38593
38658
  }
@@ -38665,7 +38730,7 @@ async function uninstallSkill(agent, options, command) {
38665
38730
  }
38666
38731
 
38667
38732
  // src/commands/skill/update.ts
38668
- import { CliError as CliError11 } from "@doist/cli-core";
38733
+ import { CliError as CliError12 } from "@doist/cli-core";
38669
38734
  async function updateSkill(agent, options, command) {
38670
38735
  await runLocalCommand(
38671
38736
  command,
@@ -38691,7 +38756,7 @@ async function updateAllSkills(options, command) {
38691
38756
  async () => {
38692
38757
  const result = await updateAllInstalledSkills(options.local === true);
38693
38758
  if (result.errors.length > 0) {
38694
- throw new CliError11(
38759
+ throw new CliError12(
38695
38760
  "UPDATE_FAILED",
38696
38761
  `Could not update ${result.errors.length} skill file(s).`,
38697
38762
  { hints: result.errors.map((error62) => `${error62.agent}: ${error62.message}`) }
@@ -38751,7 +38816,7 @@ function registerUpdateCommand(program) {
38751
38816
  }
38752
38817
 
38753
38818
  // src/commands/workspace/index.ts
38754
- import { CliError as CliError12 } from "@doist/cli-core";
38819
+ import { CliError as CliError13 } from "@doist/cli-core";
38755
38820
 
38756
38821
  // src/commands/workspace/format.ts
38757
38822
  function formatWorkspaceList(workspaces) {
@@ -38794,7 +38859,7 @@ function registerWorkspaceCommand(program) {
38794
38859
  if (!(error62 instanceof AutomationsRequestError) || error62.httpStatusCode !== 404) {
38795
38860
  throw error62;
38796
38861
  }
38797
- throw new CliError12(
38862
+ throw new CliError13(
38798
38863
  "WORKSPACE_ACCESS_UNAVAILABLE",
38799
38864
  "Workspace access is not available for this account or environment.",
38800
38865
  {