@wirecat/zoom-cli 0.86.3 → 0.86.5

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.
Files changed (52) hide show
  1. package/README.md +1 -1
  2. package/contracts/wirecat.json +2 -1
  3. package/dist/bin/zm.js +3 -3
  4. package/dist/bundle/{answer-policy-XVO4CBA6.js → answer-policy-KYTRE7S7.js} +1 -1
  5. package/dist/bundle/{chunk-KD445XXX.js → chunk-5WK5S3HK.js} +45 -10
  6. package/dist/bundle/{chunk-IF4CLTEX.js → chunk-GKYXCAQL.js} +1 -1
  7. package/dist/bundle/{chunk-VABVJLR6.js → chunk-MWNHQJI4.js} +40 -6
  8. package/dist/bundle/{chunk-FGWKFXOI.js → chunk-R65B5EUK.js} +16 -1
  9. package/dist/bundle/{chunk-ZTHSH4BF.js → chunk-YZHAKPOG.js} +3 -2
  10. package/dist/bundle/{config-YWO2C2LX.js → config-BUAD7HCH.js} +4 -4
  11. package/dist/bundle/{main-NK4YRX3V.js → main-H3QSIDMO.js} +7 -7
  12. package/dist/bundle/{program-MAYYJJCG.js → program-MOQV6RWH.js} +250 -212
  13. package/dist/bundle/{store-connection-KAJKN72R.js → store-connection-7BF5XBCN.js} +5 -5
  14. package/dist/bundle/{tokens-IQS7T2NK.js → tokens-AHVN5DSE.js} +2 -2
  15. package/dist/bundle/zm.js +2 -2
  16. package/dist/bundle/{zoom-app-6CVQ7EHQ.js → zoom-app-POH66VE4.js} +3 -3
  17. package/dist/config.d.ts +9 -1
  18. package/dist/config.d.ts.map +1 -1
  19. package/dist/config.js +38 -4
  20. package/dist/config.js.map +1 -1
  21. package/dist/identity.d.ts.map +1 -1
  22. package/dist/identity.js +2 -1
  23. package/dist/identity.js.map +1 -1
  24. package/dist/local-transcription-commands.d.ts +15 -1
  25. package/dist/local-transcription-commands.d.ts.map +1 -1
  26. package/dist/local-transcription-commands.js +49 -9
  27. package/dist/local-transcription-commands.js.map +1 -1
  28. package/dist/local-transcription.d.ts +4 -1
  29. package/dist/local-transcription.d.ts.map +1 -1
  30. package/dist/local-transcription.js +45 -3
  31. package/dist/local-transcription.js.map +1 -1
  32. package/dist/media-decode.d.ts.map +1 -1
  33. package/dist/media-decode.js +4 -2
  34. package/dist/media-decode.js.map +1 -1
  35. package/dist/program-bindings.d.ts.map +1 -1
  36. package/dist/program-bindings.js +2 -0
  37. package/dist/program-bindings.js.map +1 -1
  38. package/dist/program.d.ts +3 -1
  39. package/dist/program.d.ts.map +1 -1
  40. package/dist/program.js.map +1 -1
  41. package/dist/setup-commands.d.ts.map +1 -1
  42. package/dist/setup-commands.js +7 -2
  43. package/dist/setup-commands.js.map +1 -1
  44. package/dist/store-commands.d.ts +3 -1
  45. package/dist/store-commands.d.ts.map +1 -1
  46. package/dist/store-commands.js +2 -1
  47. package/dist/store-commands.js.map +1 -1
  48. package/dist/version.d.ts +1 -1
  49. package/dist/version.js +1 -1
  50. package/package.json +3 -3
  51. package/skills/zoom-cli/SKILL.md +9 -6
  52. package/skills/zoom-cli/references/search.md +1 -0
@@ -36,7 +36,7 @@ import {
36
36
  validateTaskProposal,
37
37
  validateUnifiedSearch,
38
38
  wholeList
39
- } from "./chunk-KD445XXX.js";
39
+ } from "./chunk-5WK5S3HK.js";
40
40
  import {
41
41
  DEFAULT_PERMISSIONS,
42
42
  ZOOM_SETTINGS,
@@ -60,7 +60,7 @@ import {
60
60
  setConfig,
61
61
  unsetConfig,
62
62
  zoomRunsCommand
63
- } from "./chunk-VABVJLR6.js";
63
+ } from "./chunk-MWNHQJI4.js";
64
64
  import {
65
65
  CLIENT_ID_NEED,
66
66
  SET_ZOOM_APP,
@@ -77,19 +77,19 @@ import {
77
77
  zoomAppSetup,
78
78
  zoomClientId,
79
79
  zoomClientReport
80
- } from "./chunk-FGWKFXOI.js";
80
+ } from "./chunk-R65B5EUK.js";
81
81
  import "./chunk-7O7XM37N.js";
82
82
  import {
83
83
  TokenManager,
84
84
  ZOOM_CODEC,
85
85
  legacyAccountsOf,
86
86
  zoomProvider
87
- } from "./chunk-IF4CLTEX.js";
87
+ } from "./chunk-GKYXCAQL.js";
88
88
  import {
89
89
  CLIENT_ID_MISSING,
90
90
  VERSION,
91
91
  ZM
92
- } from "./chunk-ZTHSH4BF.js";
92
+ } from "./chunk-YZHAKPOG.js";
93
93
  import {
94
94
  ZoneAssumptions,
95
95
  cancellableStore,
@@ -163,7 +163,7 @@ var ZOOM_FIRST_SCREEN = {
163
163
  };
164
164
 
165
165
  // dist/program-bindings.js
166
- import { CliError as CliError47, createDeadline, createOutputBuffer, createRenderer as createRenderer2, fieldsOf, isCliError as isCliError11, projectFields } from "@wirecat/cli-base";
166
+ import { CliError as CliError47, createDeadline, createOutputBuffer, createRenderer as createRenderer2, fieldsOf, isCliError as isCliError12, projectFields } from "@wirecat/cli-base";
167
167
  import { commandRuns, environmentOf as environmentOf3, isBody, itemAnswer, meetingAnswerBody, pagingOf, runBudgetOf, snakeKeys, writesNewFileOnlyWith } from "@wirecat/cli-core";
168
168
 
169
169
  // dist/agent-skill.js
@@ -2388,25 +2388,93 @@ The time in a file name and in \u0414\u0430\u0442\u0430: is read in ${zone}; set
2388
2388
  zm config set files.timezone <IANA zone>. Times are stored in UTC, and the import names the zone it used.`;
2389
2389
  }, "fileNamesHelp");
2390
2390
 
2391
- // dist/meeting-commands.js
2392
- import { CliError as CliError13 } from "@wirecat/cli-base";
2391
+ // dist/local-transcription-commands.js
2392
+ import { CliError as CliError13, isCliError as isCliError6 } from "@wirecat/cli-base";
2393
2393
  import { annotate as annotate4 } from "@wirecat/cli-base/commands";
2394
+ import { itemOf as itemOf3, LOCAL_WRITE as LOCAL_WRITE3, reachesOtherService, refuseOffline, speechModel, transcriptionEngine } from "@wirecat/cli-core";
2395
+ var profileTranscriptionEngine = /* @__PURE__ */ __name((given) => async (model) => {
2396
+ const { deps } = given;
2397
+ const profile = given.profile();
2398
+ const configured2 = given.getConfig().transcription[profile] ?? {};
2399
+ if ((configured2.transcribe_engine ?? "local") === "local")
2400
+ return void 0;
2401
+ return transcriptionEngine({
2402
+ app: ZM,
2403
+ profile,
2404
+ env: deps.env ?? process.env,
2405
+ keyring: deps.tokens.options.keyring,
2406
+ configured: configured2,
2407
+ model,
2408
+ bundle: true,
2409
+ notify: /* @__PURE__ */ __name((line) => deps.diagnostic(`${line}
2410
+ `), "notify"),
2411
+ signal: given.signal(),
2412
+ speech: deps.speech
2413
+ });
2414
+ }, "profileTranscriptionEngine");
2415
+ var shellWord = /* @__PURE__ */ __name((word) => /^[\w./:@%+=,-]+$/.test(word) ? word : `'${word.replaceAll("'", "'\\''")}'`, "shellWord");
2416
+ var addLocalTranscriptionCommands = /* @__PURE__ */ __name((program, deps) => {
2417
+ const meetings = program.commands.find((command) => command.name() === "meetings");
2418
+ if (!meetings)
2419
+ throw new CliError13("configuration_error", "meeting command group is unavailable");
2420
+ annotate4(reachesOtherService(runsLong(meetings.command("transcribe"))).description("preview transcribing a recording, on this machine or, when the profile sets transcribe_engine openai, by your own service; --yes adds the transcript").argument("<meeting>", "stored meeting id or meeting reference").argument("<file>", "a recording: WAV as it is, MP4, M4A or other audio and video through an installed ffmpeg").option("--model <model>", "installed speech model; needed when the profile transcribes locally").option("--models-dir <dir>", "shared installed speech-model directory").option("--max-bytes <bytes>", "largest audio file to read, in bytes (default 1 GiB)", bytes).option("--max-duration <duration>", "longest audio to transcribe (default 4h)", (text2) => duration(text2, "--max-duration")).option("--max-segments <n>", "most recognized segments (default 10000)", bytes).option("--max-text-bytes <bytes>", "most transcript text, in bytes (default 4 MiB)", bytes).option("--yes", "recognize locally and append to the existing meeting").option("--dry-run", "preview even when --yes is present").action(async function(reference, file, options) {
2421
+ const engine = await deps.engine(options.model);
2422
+ if (engine)
2423
+ refuseOffline(this, engine.label);
2424
+ const request = validateLocalTranscriptionOptions({
2425
+ model: engine ? engine.recognition.model : options.model,
2426
+ modelsDirectory: options.modelsDir,
2427
+ maxBytes: options.maxBytes,
2428
+ maxDurationMs: options.maxDuration,
2429
+ maxSegments: options.maxSegments,
2430
+ maxTextBytes: options.maxTextBytes,
2431
+ apply: options.yes,
2432
+ dryRun: options.dryRun,
2433
+ signal: deps.signal()
2434
+ });
2435
+ if (!engine)
2436
+ speechModel(request.model);
2437
+ if (typeof file !== "string" || !file.trim() || file.includes("\0"))
2438
+ throw new CliError13("validation_error", "local audio file is required");
2439
+ const capabilities = await deps.capabilities();
2440
+ const receipt = await capabilities.transcribe(reference, file, engine ? { ...request, engine } : request).catch((error) => {
2441
+ const known = engine?.failure(error, `meetings transcribe ${shellWord(reference)} ${shellWord(file)} --yes`);
2442
+ if (!known)
2443
+ throw error;
2444
+ throw new CliError13(isCliError6(error) ? error.code : "provider_error", `${reference}: ${known.message}`, {
2445
+ reason: known.reason
2446
+ });
2447
+ });
2448
+ if (receipt.applied)
2449
+ await deps.receipt(itemOf3(compactLocalTranscriptionReceipt(receipt)));
2450
+ else
2451
+ deps.output(itemOf3(receipt));
2452
+ }), {
2453
+ origin: "handwritten",
2454
+ effects: LOCAL_WRITE3,
2455
+ examples: ["zm personal meetings transcribe meeting:3/12 ./AliceExample.m4a --model parakeet-v3 --json"]
2456
+ });
2457
+ }, "addLocalTranscriptionCommands");
2458
+
2459
+ // dist/meeting-commands.js
2460
+ import { CliError as CliError14 } from "@wirecat/cli-base";
2461
+ import { annotate as annotate5 } from "@wirecat/cli-base/commands";
2394
2462
  import { addMeetingCommands, NO_EFFECTS as NO_EFFECTS4 } from "@wirecat/cli-core";
2395
2463
  var childOf = /* @__PURE__ */ __name((parent, name) => {
2396
2464
  const found = parent.commands.find((command) => command.name() === name);
2397
2465
  if (!found)
2398
- throw new CliError13("configuration_error", `shared command is missing: ${name}`);
2466
+ throw new CliError14("configuration_error", `shared command is missing: ${name}`);
2399
2467
  return found;
2400
2468
  }, "childOf");
2401
2469
  var addZoomMeetingCommands = /* @__PURE__ */ __name((program, deps) => {
2402
2470
  addMeetingCommands(program, deps);
2403
- const meetings = annotate4(childOf(program, "meetings"), { effects: NO_EFFECTS4 });
2404
- annotate4(childOf(program, "events"), { effects: NO_EFFECTS4 });
2471
+ const meetings = annotate5(childOf(program, "meetings"), { effects: NO_EFFECTS4 });
2472
+ annotate5(childOf(program, "events"), { effects: NO_EFFECTS4 });
2405
2473
  runsLong(childOf(meetings, "sync"));
2406
2474
  }, "addZoomMeetingCommands");
2407
2475
 
2408
2476
  // dist/meeting-communications-binding.js
2409
- import { CliError as CliError14 } from "@wirecat/cli-base";
2477
+ import { CliError as CliError15 } from "@wirecat/cli-base";
2410
2478
  import { isFolderProvider } from "@wirecat/cli-core";
2411
2479
  var resolveContextSource = /* @__PURE__ */ __name(async (definition, metadata) => {
2412
2480
  try {
@@ -2436,13 +2504,13 @@ var resolveContextSource = /* @__PURE__ */ __name(async (definition, metadata) =
2436
2504
  })
2437
2505
  });
2438
2506
  } catch {
2439
- throw new CliError14("configuration_error", `configured context source ${definition.id} is unavailable; check its stored provider/account identity`);
2507
+ throw new CliError15("configuration_error", `configured context source ${definition.id} is unavailable; check its stored provider/account identity`);
2440
2508
  }
2441
2509
  }, "resolveContextSource");
2442
2510
  var captureContextSources = /* @__PURE__ */ __name((configured2, profile) => {
2443
2511
  const parsed3 = safeParse(contextSourcesSchema, configured2 ?? []);
2444
2512
  if (!parsed3.success)
2445
- throw new CliError14("configuration_error", "context_sources is invalid");
2513
+ throw new CliError15("configuration_error", "context_sources is invalid");
2446
2514
  const definitions = parsed3.output.filter((s) => s.profile === profile).map((s) => Object.freeze({ ...s }));
2447
2515
  const pinned = /* @__PURE__ */ new Map();
2448
2516
  const capture = /* @__PURE__ */ __name((selected) => {
@@ -2450,10 +2518,10 @@ var captureContextSources = /* @__PURE__ */ __name((configured2, profile) => {
2450
2518
  let captured;
2451
2519
  const assert = /* @__PURE__ */ __name((requested) => {
2452
2520
  if (!ids.length)
2453
- throw new CliError14("configuration_error", "configure context.sources for the selected profile before requesting communications");
2521
+ throw new CliError15("configuration_error", "configure context.sources for the selected profile before requesting communications");
2454
2522
  for (const id of requested)
2455
2523
  if (!ids.includes(id))
2456
- throw new CliError14("validation_error", `communications.sources contains an unauthorized selection: ${id}`);
2524
+ throw new CliError15("validation_error", `communications.sources contains an unauthorized selection: ${id}`);
2457
2525
  }, "assert");
2458
2526
  return Object.freeze({
2459
2527
  ids,
@@ -2461,7 +2529,7 @@ var captureContextSources = /* @__PURE__ */ __name((configured2, profile) => {
2461
2529
  select(requested) {
2462
2530
  assert(requested);
2463
2531
  if (!requested.length)
2464
- throw new CliError14("validation_error", "select at least one communications source");
2532
+ throw new CliError15("validation_error", "select at least one communications source");
2465
2533
  return capture(selected.filter((definition) => requested.includes(definition.id)));
2466
2534
  },
2467
2535
  resolve(metadata) {
@@ -2494,13 +2562,13 @@ var captureContextSources = /* @__PURE__ */ __name((configured2, profile) => {
2494
2562
  import { addMeetingSeriesInventoryCommand } from "@wirecat/cli-core";
2495
2563
 
2496
2564
  // dist/series-inventory.js
2497
- import { CliError as CliError17 } from "@wirecat/cli-base";
2565
+ import { CliError as CliError18 } from "@wirecat/cli-base";
2498
2566
  import { createMeetingSeriesInventoryReader } from "@wirecat/cli-core";
2499
2567
 
2500
2568
  // dist/occurrence-schedule.js
2501
- import { CliError as CliError15 } from "@wirecat/cli-base";
2569
+ import { CliError as CliError16 } from "@wirecat/cli-base";
2502
2570
  function invalid(field) {
2503
- throw new CliError15("invalid_response", `Zoom meeting ${field} is invalid`);
2571
+ throw new CliError16("invalid_response", `Zoom meeting ${field} is invalid`);
2504
2572
  }
2505
2573
  __name(invalid, "invalid");
2506
2574
  var zoomScheduledInstant = /* @__PURE__ */ __name((value) => {
@@ -2589,10 +2657,10 @@ var zoomOccurrenceSchedule = /* @__PURE__ */ __name((value, meetingId, limit) =>
2589
2657
  }, "zoomOccurrenceSchedule");
2590
2658
 
2591
2659
  // dist/remote-meeting-id.js
2592
- import { CliError as CliError16 } from "@wirecat/cli-base";
2660
+ import { CliError as CliError17 } from "@wirecat/cli-base";
2593
2661
  var zoomMeetingPath = /* @__PURE__ */ __name((id) => {
2594
2662
  if (typeof id !== "string" || !/^[1-9]\d*$/.test(id) || id.trim() !== id)
2595
- throw new CliError16("validation_error", "remote meeting id must be a positive numeric id");
2663
+ throw new CliError17("validation_error", "remote meeting id must be a positive numeric id");
2596
2664
  return `/meetings/${id}`;
2597
2665
  }, "zoomMeetingPath");
2598
2666
 
@@ -2601,16 +2669,16 @@ var candidate = /* @__PURE__ */ __name((value) => {
2601
2669
  const row = object(value);
2602
2670
  const meetingId = typeof row.id === "number" && Number.isSafeInteger(row.id) ? String(row.id) : row.id;
2603
2671
  if (typeof meetingId !== "string")
2604
- throw new CliError17("invalid_response", "Zoom inventory meeting id is invalid");
2672
+ throw new CliError18("invalid_response", "Zoom inventory meeting id is invalid");
2605
2673
  try {
2606
2674
  zoomMeetingPath(meetingId);
2607
2675
  } catch {
2608
- throw new CliError17("invalid_response", "Zoom inventory meeting id is invalid");
2676
+ throw new CliError18("invalid_response", "Zoom inventory meeting id is invalid");
2609
2677
  }
2610
2678
  if (row.topic !== void 0 && row.topic !== null && (typeof row.topic !== "string" || row.topic.length > 8192))
2611
- throw new CliError17("invalid_response", "Zoom inventory topic is invalid");
2679
+ throw new CliError18("invalid_response", "Zoom inventory topic is invalid");
2612
2680
  if (row.type !== void 0 && ![1, 2, 3, 8].includes(row.type))
2613
- throw new CliError17("invalid_response", "Zoom inventory meeting type is invalid");
2681
+ throw new CliError18("invalid_response", "Zoom inventory meeting type is invalid");
2614
2682
  return {
2615
2683
  meetingId,
2616
2684
  title: typeof row.topic === "string" ? row.topic : null,
@@ -2620,7 +2688,7 @@ var candidate = /* @__PURE__ */ __name((value) => {
2620
2688
  }, "candidate");
2621
2689
  var createZoomSeriesInventoryReader = /* @__PURE__ */ __name((account, credentials, fetcher, options = {}) => {
2622
2690
  if (typeof credentials?.withSignal !== "function")
2623
- throw new CliError17("configuration_error", "Zoom credential scope is unavailable");
2691
+ throw new CliError18("configuration_error", "Zoom credential scope is unavailable");
2624
2692
  const scopedCredentials = credentials.withSignal.bind(credentials);
2625
2693
  const remoteOptions = { ...options };
2626
2694
  return createMeetingSeriesInventoryReader({ provider: "zoom", account }, {
@@ -2635,9 +2703,9 @@ var createZoomSeriesInventoryReader = /* @__PURE__ */ __name((account, credentia
2635
2703
  maxResponseBytes: context.maxReadBytes
2636
2704
  });
2637
2705
  if (!Array.isArray(raw.meetings) || raw.meetings.length > context.limit)
2638
- throw new CliError17("invalid_response", "Zoom inventory meetings exceed the page limit");
2706
+ throw new CliError18("invalid_response", "Zoom inventory meetings exceed the page limit");
2639
2707
  if (raw.next_page_token !== void 0 && typeof raw.next_page_token !== "string")
2640
- throw new CliError17("invalid_response", "Zoom inventory continuation is invalid");
2708
+ throw new CliError18("invalid_response", "Zoom inventory continuation is invalid");
2641
2709
  return {
2642
2710
  scope: context.scope,
2643
2711
  after: context.after,
@@ -2685,7 +2753,7 @@ var addZoomInventoryCommand = /* @__PURE__ */ __name((program, deps) => {
2685
2753
  }, "addZoomInventoryCommand");
2686
2754
 
2687
2755
  // dist/meeting-source.js
2688
- import { CliError as CliError18 } from "@wirecat/cli-base";
2756
+ import { CliError as CliError19 } from "@wirecat/cli-base";
2689
2757
  var configuredMeetingSource = /* @__PURE__ */ __name(({ deps, getConfig, tokens, fetch, zones }) => {
2690
2758
  let activeSource;
2691
2759
  const getSource = /* @__PURE__ */ __name(() => {
@@ -2696,11 +2764,11 @@ var configuredMeetingSource = /* @__PURE__ */ __name(({ deps, getConfig, tokens,
2696
2764
  if (config.source === "api") {
2697
2765
  const manager = tokens();
2698
2766
  if (!manager.options.clientId)
2699
- throw new CliError18("configuration_error", SET_ZOOM_APP);
2767
+ throw new CliError19("configuration_error", SET_ZOOM_APP);
2700
2768
  return new ZoomApiSource(manager, fetch(), {}, zones);
2701
2769
  }
2702
2770
  if (!config.filesFolder)
2703
- throw new CliError18("configuration_error", "set files.folder before pulling from files");
2771
+ throw new CliError19("configuration_error", "set files.folder before pulling from files");
2704
2772
  return new FilesSource(await (deps.readFiles ?? readDownloadedFiles)(config.filesFolder), filesZone(config));
2705
2773
  })();
2706
2774
  return activeSource;
@@ -2755,25 +2823,25 @@ var configuredMeetingSource = /* @__PURE__ */ __name(({ deps, getConfig, tokens,
2755
2823
  }, "configuredMeetingSource");
2756
2824
 
2757
2825
  // dist/profile-word.js
2758
- import { CliError as CliError19 } from "@wirecat/cli-base";
2826
+ import { CliError as CliError20 } from "@wirecat/cli-base";
2759
2827
  var PROFILE_HELP = "The first word is the profile whenever it is not a command \u2014 `zm personal meetings list`.\n`ZM_PROFILE` says the same thing for a whole shell session.\nNo profile is assumed: without one, a command that uses an account stops and lists the profiles here.";
2760
2828
  var recordProfile = /* @__PURE__ */ __name((configPath, profile) => {
2761
2829
  const here = readConfig(configPath).profiles;
2762
2830
  if (here.includes(profile))
2763
2831
  return;
2764
2832
  if (here.length)
2765
- throw new CliError19("validation_error", `there is no profile ${profile} here \u2014 profiles here: ${here.join(", ")}. A new one starts with \`zm ${profile} session start\`; a typo stores nothing`, { profiles: here });
2833
+ throw new CliError20("validation_error", `there is no profile ${profile} here \u2014 profiles here: ${here.join(", ")}. A new one starts with \`zm ${profile} session start\`; a typo stores nothing`, { profiles: here });
2766
2834
  addProfile(configPath, profile);
2767
2835
  }, "recordProfile");
2768
2836
 
2769
2837
  // dist/progress-commands.js
2770
2838
  import { join as join7 } from "node:path";
2771
- import { CliError as CliError21 } from "@wirecat/cli-base";
2772
- import { annotate as annotate5 } from "@wirecat/cli-base/commands";
2773
- import { itemOf as itemOf3, LOCAL_READ as LOCAL_READ2, progressOf as progressOf2 } from "@wirecat/cli-core";
2839
+ import { CliError as CliError22 } from "@wirecat/cli-base";
2840
+ import { annotate as annotate6 } from "@wirecat/cli-base/commands";
2841
+ import { itemOf as itemOf4, LOCAL_READ as LOCAL_READ2, progressOf as progressOf2 } from "@wirecat/cli-core";
2774
2842
 
2775
2843
  // dist/sync-progress.js
2776
- import { CliError as CliError20 } from "@wirecat/cli-base";
2844
+ import { CliError as CliError21 } from "@wirecat/cli-base";
2777
2845
  import { checkpointPath, progressOf, readCheckpoint, saveCheckpoint } from "@wirecat/cli-core";
2778
2846
  var meetingProgress = /* @__PURE__ */ __name((profile, env, now = Date.now) => {
2779
2847
  const path = checkpointPath(zmPaths({ env }).state, profile, "meetings");
@@ -2786,7 +2854,7 @@ var meetingProgress = /* @__PURE__ */ __name((profile, env, now = Date.now) => {
2786
2854
  read: /* @__PURE__ */ __name(() => {
2787
2855
  const saved = readCheckpoint(path);
2788
2856
  if (saved && (!Number.isSafeInteger(saved.done) || saved.done < 0 || typeof saved.cursor?.complete !== "boolean" || !Number.isFinite(Date.parse(saved.updated_at))))
2789
- throw new CliError20("configuration_error", "the saved meeting progress is invalid; run a sync to replace it");
2857
+ throw new CliError21("configuration_error", "the saved meeting progress is invalid; run a sync to replace it");
2790
2858
  return progressOf({
2791
2859
  job: "meetings",
2792
2860
  profile,
@@ -2804,13 +2872,13 @@ var addProgressCommands = /* @__PURE__ */ __name((program, deps) => {
2804
2872
  const meetings = program.commands.find((command) => command.name() === "meetings");
2805
2873
  const recordings = program.commands.find((command) => command.name() === "recordings");
2806
2874
  if (!meetings || !recordings)
2807
- throw new CliError21("configuration_error", "the meeting command groups are missing");
2808
- annotate5(meetings.command("status"), {
2875
+ throw new CliError22("configuration_error", "the meeting command groups are missing");
2876
+ annotate6(meetings.command("status"), {
2809
2877
  effects: LOCAL_READ2,
2810
2878
  output: { entity: "sync_progress" },
2811
2879
  examples: ["zm personal meetings status --json"]
2812
- }).description("the last meeting ingestion pass: confirmed count, completion and checkpoint age").action(() => deps.output(itemOf3(meetingProgress(deps.profile(), deps.env, deps.now).read())));
2813
- annotate5(recordings.command("status"), {
2880
+ }).description("the last meeting ingestion pass: confirmed count, completion and checkpoint age").action(() => deps.output(itemOf4(meetingProgress(deps.profile(), deps.env, deps.now).read())));
2881
+ annotate6(recordings.command("status"), {
2814
2882
  effects: LOCAL_READ2,
2815
2883
  output: { entity: "sync_progress" },
2816
2884
  examples: ["zm personal recordings status ./zoom-archive --json"]
@@ -2818,10 +2886,10 @@ var addProgressCommands = /* @__PURE__ */ __name((program, deps) => {
2818
2886
  const profile = deps.profile();
2819
2887
  const saved = await inspectRecordingSyncCheckpoint(options.checkpoint ?? join7(directory, ".zoom-archive-sync.json"));
2820
2888
  if (saved && (saved.scope.provider !== "zoom" || saved.scope.account !== profileAccountKey(profile)))
2821
- throw new CliError21("permission_error", "the archive checkpoint belongs to another profile");
2889
+ throw new CliError22("permission_error", "the archive checkpoint belongs to another profile");
2822
2890
  const done = saved?.entries.reduce((sum, entry) => sum + entry.acknowledged.length, 0) ?? 0;
2823
2891
  const total = saved?.pendingWindows.length === 0 ? saved.entries.reduce((sum, entry) => sum + entry.assets.length, 0) : void 0;
2824
- deps.output(itemOf3(progressOf2({
2892
+ deps.output(itemOf4(progressOf2({
2825
2893
  job: "recordings",
2826
2894
  profile,
2827
2895
  done,
@@ -2834,25 +2902,25 @@ var addProgressCommands = /* @__PURE__ */ __name((program, deps) => {
2834
2902
  }, "addProgressCommands");
2835
2903
 
2836
2904
  // dist/recording-schedule-commands.js
2837
- import { CliError as CliError22 } from "@wirecat/cli-base";
2838
- import { annotate as annotate6 } from "@wirecat/cli-base/commands";
2839
- import { FETCH as FETCH2, grantsAuthority as grantsAuthority2, itemOf as itemOf4, LOCAL_READ as LOCAL_READ3, LOCAL_WRITE as LOCAL_WRITE3, listQuery as listQuery2, NO_EFFECTS as NO_EFFECTS5, typedQuery as typedQuery3, unfilteredQuery as unfilteredQuery2, withQuery as withQuery3, writesOwnerFiles } from "@wirecat/cli-core";
2905
+ import { CliError as CliError23 } from "@wirecat/cli-base";
2906
+ import { annotate as annotate7 } from "@wirecat/cli-base/commands";
2907
+ import { FETCH as FETCH2, grantsAuthority as grantsAuthority2, itemOf as itemOf5, LOCAL_READ as LOCAL_READ3, LOCAL_WRITE as LOCAL_WRITE4, listQuery as listQuery2, NO_EFFECTS as NO_EFFECTS5, typedQuery as typedQuery3, unfilteredQuery as unfilteredQuery2, withQuery as withQuery3, writesOwnerFiles } from "@wirecat/cli-core";
2840
2908
  var addRecordingScheduleCommands = /* @__PURE__ */ __name((program, deps) => {
2841
2909
  const deliver = /* @__PURE__ */ __name(async (value) => {
2842
2910
  if (value.applied)
2843
- await deps.receipt(itemOf4(value));
2911
+ await deps.receipt(itemOf5(value));
2844
2912
  else
2845
- deps.output(itemOf4(value));
2913
+ deps.output(itemOf5(value));
2846
2914
  }, "deliver");
2847
2915
  const recordings = program.commands.find((command) => command.name() === "recordings");
2848
2916
  if (!recordings)
2849
- throw new CliError22("configuration_error", "recording command group is unavailable");
2850
- const schedule = annotate6(recordings.command("schedule"), { effects: NO_EFFECTS5 }).description("local archive jobs and Linux user systemd timers");
2851
- const label2 = /* @__PURE__ */ __name((command, example, effects) => annotate6(command, { origin: "handwritten", effects, examples: [example] }), "label");
2917
+ throw new CliError23("configuration_error", "recording command group is unavailable");
2918
+ const schedule = annotate7(recordings.command("schedule"), { effects: NO_EFFECTS5 }).description("local archive jobs and Linux user systemd timers");
2919
+ const label2 = /* @__PURE__ */ __name((command, example, effects) => annotate7(command, { origin: "handwritten", effects, examples: [example] }), "label");
2852
2920
  label2(grantsAuthority2(schedule.command("create")).description("preview a daily archive job; --yes installs its timer").requiredOption("--name <name>", "local job name").requiredOption("--output-dir <dir>", "absolute archive directory").requiredOption("--since-time <time>", "first day to archive, YYYY-MM-DD").requiredOption("--at <hh:mm>", "daily time").requiredOption("--timezone <zone>", "IANA timezone for the timer").option("--lookback-days <days>", "revisit the latest zero through 31 UTC days (default seven)", bytes).option("--max-bytes <bytes>", "maximum bytes per recording file (default 20 GiB)", bytes).option("--yes", "install and enable the captured timer").option("--dry-run", "preview even when --yes is present").action(async (options) => {
2853
2921
  const offline = deps.offline();
2854
2922
  if (options.yes && !options.dryRun && offline)
2855
- throw new CliError22("configuration_error", "archive schedule installation requires online mode");
2923
+ throw new CliError23("configuration_error", "archive schedule installation requires online mode");
2856
2924
  const capture = deps.capture();
2857
2925
  const service = deps.service();
2858
2926
  await deliver(await service.create({
@@ -2864,67 +2932,67 @@ var addRecordingScheduleCommands = /* @__PURE__ */ __name((program, deps) => {
2864
2932
  lookbackDays: options.lookbackDays,
2865
2933
  maxBytes: options.maxBytes
2866
2934
  }, capture, { apply: options.yes, dryRun: options.dryRun, offline, signal: deps.signal() }));
2867
- }), "zm personal recordings schedule create --name daily --output-dir /home/AliceExample/archive --since-time 2026-01-01 --at 03:15 --timezone UTC --json", LOCAL_WRITE3);
2935
+ }), "zm personal recordings schedule create --name daily --output-dir /home/AliceExample/archive --since-time 2026-01-01 --at 03:15 --timezone UTC --json", LOCAL_WRITE4);
2868
2936
  const jobsQuery = unfilteredQuery2("zoom_archive_job", ZOOM_ANSWER_ENTITIES["recordings schedule list"].schema);
2869
2937
  label2(withQuery3(schedule.command("list"), jobsQuery).description("list saved local jobs; live timer state is not checked").action(async (words) => {
2870
2938
  listQuery2(typedQuery3(words), jobsQuery, "recordings schedule list");
2871
2939
  deps.output(wholeList("recordings schedule list", await deps.service().list({ signal: deps.signal() })));
2872
2940
  }), "zm personal recordings schedule list --offline --json", LOCAL_READ3);
2873
2941
  label2(schedule.command("show").description("show one saved local job and its captured settings").argument("<job>", "saved job id").action(async (id) => {
2874
- deps.output(itemOf4(await deps.service().show(id, { signal: deps.signal() })));
2942
+ deps.output(itemOf5(await deps.service().show(id, { signal: deps.signal() })));
2875
2943
  }), "zm personal recordings schedule show example-job --offline --json", LOCAL_READ3);
2876
2944
  label2(writesOwnerFiles(runsLong(schedule.command("run"))).description("run the captured job once with durable archive progress").argument("<job>", "saved job id").action(async (id) => {
2877
2945
  if (program.opts().json || !program.opts().jsonl && !deps.outputIsTTY)
2878
- throw new CliError22("validation_error", "headless archive schedule runs stream receipts; use --jsonl");
2946
+ throw new CliError23("validation_error", "headless archive schedule runs stream receipts; use --jsonl");
2879
2947
  if (deps.offline())
2880
- throw new CliError22("configuration_error", "archive schedule run requires online mode");
2948
+ throw new CliError23("configuration_error", "archive schedule run requires online mode");
2881
2949
  for await (const receipt of deps.service().run(id, { offline: deps.offline(), signal: deps.signal() }))
2882
- await deps.receipt(itemOf4(receipt));
2950
+ await deps.receipt(itemOf5(receipt));
2883
2951
  }), "zm personal recordings schedule run example-job --dry-run --jsonl", FETCH2);
2884
2952
  label2(grantsAuthority2(schedule.command("disable")).description("preview disabling a saved timer; --yes disables it without deleting files").argument("<job>", "saved job id").option("--yes", "disable and stop the timer").option("--dry-run", "preview even when --yes is present").action(async (id, options) => {
2885
2953
  await deliver(await deps.service().disable(id, { apply: options.yes, dryRun: options.dryRun, signal: deps.signal() }));
2886
- }), "zm personal recordings schedule disable example-job --json", LOCAL_WRITE3);
2954
+ }), "zm personal recordings schedule disable example-job --json", LOCAL_WRITE4);
2887
2955
  }, "addRecordingScheduleCommands");
2888
2956
 
2889
2957
  // dist/recording-schedule-setup.js
2890
2958
  import { homedir } from "node:os";
2891
2959
  import { dirname as dirname2, join as join10 } from "node:path";
2892
- import { CliError as CliError27 } from "@wirecat/cli-base";
2960
+ import { CliError as CliError28 } from "@wirecat/cli-base";
2893
2961
 
2894
2962
  // dist/recording-schedule.js
2895
2963
  import { isAbsolute } from "node:path";
2896
- import { CliError as CliError23 } from "@wirecat/cli-base";
2964
+ import { CliError as CliError24 } from "@wirecat/cli-base";
2897
2965
  import { installRecordingArchiveSchedule, parseRecordingArchiveSchedule, planRecordingArchiveSchedule, recordingArchiveScheduleWindow } from "@wirecat/cli-core";
2898
2966
  var text = /* @__PURE__ */ __name((value, limit) => typeof value === "string" && !!value.trim() && value.length <= limit && !/[\0\r\n]/.test(value), "text");
2899
2967
  var absolute = /* @__PURE__ */ __name((value) => text(value, 4096) && isAbsolute(value), "absolute");
2900
2968
  var validateRecordingScheduleId = /* @__PURE__ */ __name((id) => {
2901
2969
  if (typeof id !== "string" || !/^[a-f0-9]{64}$/.test(id))
2902
- throw new CliError23("validation_error", "archive schedule id must be 64 lowercase hexadecimal characters");
2970
+ throw new CliError24("validation_error", "archive schedule id must be 64 lowercase hexadecimal characters");
2903
2971
  return id;
2904
2972
  }, "validateRecordingScheduleId");
2905
2973
  var snapshotRecordingScheduleCapture = /* @__PURE__ */ __name((value) => {
2906
2974
  if (!value || typeof value !== "object" || Array.isArray(value))
2907
- throw new CliError23("validation_error", "archive schedule capture is invalid");
2975
+ throw new CliError24("validation_error", "archive schedule capture is invalid");
2908
2976
  const { profile, clientId, configDir, runtime, cliPath } = value;
2909
2977
  if (!text(profile, 64) || !/^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/.test(profile) || !text(clientId, 200) || /\s/.test(clientId) || !absolute(configDir) || !absolute(runtime) || !absolute(cliPath))
2910
- throw new CliError23("validation_error", "archive schedule requires a profile, public client id and absolute config/runtime/CLI paths");
2978
+ throw new CliError24("validation_error", "archive schedule requires a profile, public client id and absolute config/runtime/CLI paths");
2911
2979
  return Object.freeze({ profile, clientId, configDir, runtime, cliPath });
2912
2980
  }, "snapshotRecordingScheduleCapture");
2913
2981
  var parseRecordingScheduleJob = /* @__PURE__ */ __name((value) => {
2914
2982
  if (!value || typeof value !== "object" || Array.isArray(value))
2915
- throw new CliError23("validation_error", "archive schedule job is invalid");
2983
+ throw new CliError24("validation_error", "archive schedule job is invalid");
2916
2984
  const row = value;
2917
2985
  if (row.version !== 1 || Object.keys(row).some((key) => !["version", "schedule", "capture", "state"].includes(key)) || !["pending", "enabled", "disabled"].includes(row.state))
2918
- throw new CliError23("validation_error", "archive schedule job is invalid");
2986
+ throw new CliError24("validation_error", "archive schedule job is invalid");
2919
2987
  const capture = snapshotRecordingScheduleCapture(row.capture);
2920
2988
  if (Object.keys(row.capture).some((key) => !["profile", "clientId", "configDir", "runtime", "cliPath"].includes(key)))
2921
- throw new CliError23("validation_error", "archive schedule capture is invalid");
2989
+ throw new CliError24("validation_error", "archive schedule capture is invalid");
2922
2990
  const schedule = parseRecordingArchiveSchedule(row.schedule);
2923
2991
  if (schedule.scope.provider !== "zoom" || schedule.scope.account !== profileAccountKey(capture.profile) || !absolute(schedule.destination))
2924
- throw new CliError23("validation_error", "archive schedule capture does not match its provider scope");
2992
+ throw new CliError24("validation_error", "archive schedule capture does not match its provider scope");
2925
2993
  const job = Object.freeze({ version: 1, schedule, capture, state: row.state });
2926
2994
  if (Buffer.byteLength(JSON.stringify(job)) > 32 * 1024)
2927
- throw new CliError23("validation_error", "archive schedule metadata exceeds its byte limit");
2995
+ throw new CliError24("validation_error", "archive schedule metadata exceeds its byte limit");
2928
2996
  return job;
2929
2997
  }, "parseRecordingScheduleJob");
2930
2998
  var createRecordingScheduleService = /* @__PURE__ */ __name((deps) => {
@@ -2933,10 +3001,10 @@ var createRecordingScheduleService = /* @__PURE__ */ __name((deps) => {
2933
3001
  checkCancelled(options.signal);
2934
3002
  const found = await deps.store.load(id, options);
2935
3003
  if (!found)
2936
- throw new CliError23("not_found", "archive schedule was not found");
3004
+ throw new CliError24("not_found", "archive schedule was not found");
2937
3005
  const job = parseRecordingScheduleJob(found);
2938
3006
  if (job.schedule.id !== id)
2939
- throw new CliError23("validation_error", "archive schedule storage returned a different job");
3007
+ throw new CliError24("validation_error", "archive schedule storage returned a different job");
2940
3008
  return job;
2941
3009
  }, "show");
2942
3010
  return {
@@ -2951,11 +3019,11 @@ var createRecordingScheduleService = /* @__PURE__ */ __name((deps) => {
2951
3019
  if (options.apply !== true || options.dryRun === true)
2952
3020
  return { applied: false, backend, job, units, timerState: "not_checked" };
2953
3021
  if (options.offline)
2954
- throw new CliError23("configuration_error", "archive schedule installation requires online mode");
3022
+ throw new CliError24("configuration_error", "archive schedule installation requires online mode");
2955
3023
  deps.backend.assertSupported();
2956
3024
  const existing = await deps.store.load(schedule.id, { signal: options.signal });
2957
3025
  if (existing && JSON.stringify(parseRecordingScheduleJob(existing).capture) !== JSON.stringify(capture))
2958
- throw new CliError23("validation_error", "archive schedule id belongs to a different captured runtime or client; choose a new name");
3026
+ throw new CliError24("validation_error", "archive schedule id belongs to a different captured runtime or client; choose a new name");
2959
3027
  await deps.store.save(job, { signal: options.signal });
2960
3028
  await installRecordingArchiveSchedule({ backend, install: /* @__PURE__ */ __name(async (_, active) => deps.backend.install(job, active), "install") }, schedule, { apply: true, signal: options.signal });
2961
3029
  const enabled = parseRecordingScheduleJob({ ...job, state: "enabled" });
@@ -2970,7 +3038,7 @@ var createRecordingScheduleService = /* @__PURE__ */ __name((deps) => {
2970
3038
  async *run(id, options = {}) {
2971
3039
  options = { ...options };
2972
3040
  if (options.offline)
2973
- throw new CliError23("configuration_error", "archive schedule run requires online mode");
3041
+ throw new CliError24("configuration_error", "archive schedule run requires online mode");
2974
3042
  const job = await show(id, { signal: options.signal });
2975
3043
  const window = recordingArchiveScheduleWindow(job.schedule, { now: deps.now?.() ?? Date.now() });
2976
3044
  if (!window)
@@ -3004,13 +3072,13 @@ var createRecordingScheduleService = /* @__PURE__ */ __name((deps) => {
3004
3072
  // dist/recording-schedule-store.js
3005
3073
  import { lstat as lstat3, mkdir as mkdir3, readdir as readdir3 } from "node:fs/promises";
3006
3074
  import { isAbsolute as isAbsolute2, join as join8, parse, relative, sep } from "node:path";
3007
- import { CliError as CliError24, isCliError as isCliError6 } from "@wirecat/cli-base";
3075
+ import { CliError as CliError25, isCliError as isCliError7 } from "@wirecat/cli-base";
3008
3076
  import { openOrdinaryFile as openOrdinaryFile4, writeFileAtomic as writeFileAtomic3 } from "@wirecat/cli-core";
3009
3077
  var maximumBytes = 32 * 1024;
3010
3078
  var missing3 = /* @__PURE__ */ __name((error) => typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT", "missing");
3011
3079
  var recordingScheduleDirectory = /* @__PURE__ */ __name(async (directory, create) => {
3012
3080
  if (!isAbsolute2(directory) || /[\0\r\n]/.test(directory))
3013
- throw new CliError24("validation_error", "archive schedule directory must be absolute");
3081
+ throw new CliError25("validation_error", "archive schedule directory must be absolute");
3014
3082
  const root = parse(directory).root;
3015
3083
  let path = root;
3016
3084
  for (const segment of relative(root, directory).split(sep).filter(Boolean)) {
@@ -3018,7 +3086,7 @@ var recordingScheduleDirectory = /* @__PURE__ */ __name(async (directory, create
3018
3086
  try {
3019
3087
  const stat2 = await lstat3(path);
3020
3088
  if (stat2.isSymbolicLink() || !stat2.isDirectory())
3021
- throw new CliError24("validation_error", "archive schedule directories must not contain symlinks or foreign files");
3089
+ throw new CliError25("validation_error", "archive schedule directories must not contain symlinks or foreign files");
3022
3090
  } catch (error) {
3023
3091
  if (!missing3(error))
3024
3092
  throw error;
@@ -3029,7 +3097,7 @@ var recordingScheduleDirectory = /* @__PURE__ */ __name(async (directory, create
3029
3097
  throw cause;
3030
3098
  const stat2 = await lstat3(path);
3031
3099
  if (stat2.isSymbolicLink() || !stat2.isDirectory())
3032
- throw new CliError24("validation_error", "archive schedule directory changed while creating it");
3100
+ throw new CliError25("validation_error", "archive schedule directory changed while creating it");
3033
3101
  });
3034
3102
  }
3035
3103
  }
@@ -3048,19 +3116,19 @@ var read = /* @__PURE__ */ __name(async (path, signal) => {
3048
3116
  try {
3049
3117
  const stat2 = await handle.stat({ bigint: true });
3050
3118
  if (stat2.size > BigInt(maximumBytes))
3051
- throw new CliError24("validation_error", "archive schedule metadata exceeds its byte limit");
3119
+ throw new CliError25("validation_error", "archive schedule metadata exceeds its byte limit");
3052
3120
  const bytes2 = Buffer.alloc(maximumBytes + 1);
3053
3121
  const size = (await handle.read(bytes2, 0, bytes2.length, 0)).bytesRead;
3054
3122
  checkCancelled(signal);
3055
3123
  if (size > maximumBytes)
3056
- throw new CliError24("validation_error", "archive schedule metadata exceeds its byte limit");
3124
+ throw new CliError25("validation_error", "archive schedule metadata exceeds its byte limit");
3057
3125
  const job = parseRecordingScheduleJob(JSON.parse(bytes2.subarray(0, size).toString("utf8")));
3058
3126
  return { job, stat: stat2 };
3059
3127
  } catch (error) {
3060
- if (isCliError6(error))
3128
+ if (isCliError7(error))
3061
3129
  throw error;
3062
3130
  checkCancelled(signal);
3063
- throw new CliError24("validation_error", "archive schedule metadata is invalid");
3131
+ throw new CliError25("validation_error", "archive schedule metadata is invalid");
3064
3132
  } finally {
3065
3133
  await handle.close();
3066
3134
  }
@@ -3076,7 +3144,7 @@ var fileRecordingScheduleStore = /* @__PURE__ */ __name((directory) => {
3076
3144
  for (const name of (await readdir3(directory)).filter((name2) => /^[a-f0-9]{64}\.json$/.test(name2)).sort()) {
3077
3145
  const saved = await read(join8(directory, name), options.signal);
3078
3146
  if (!saved || `${saved.job.schedule.id}.json` !== name)
3079
- throw new CliError24("validation_error", "archive schedule filename does not match its identity");
3147
+ throw new CliError25("validation_error", "archive schedule filename does not match its identity");
3080
3148
  result.push(saved.job);
3081
3149
  }
3082
3150
  return result;
@@ -3088,7 +3156,7 @@ var fileRecordingScheduleStore = /* @__PURE__ */ __name((directory) => {
3088
3156
  return null;
3089
3157
  const saved = await read(target, options.signal);
3090
3158
  if (saved && saved.job.schedule.id !== id)
3091
- throw new CliError24("validation_error", "archive schedule filename does not match its identity");
3159
+ throw new CliError25("validation_error", "archive schedule filename does not match its identity");
3092
3160
  return saved?.job ?? null;
3093
3161
  },
3094
3162
  async save(value, options) {
@@ -3096,13 +3164,13 @@ var fileRecordingScheduleStore = /* @__PURE__ */ __name((directory) => {
3096
3164
  const content = `${JSON.stringify(job)}
3097
3165
  `;
3098
3166
  if (Buffer.byteLength(content) > maximumBytes)
3099
- throw new CliError24("validation_error", "archive schedule metadata exceeds its byte limit");
3167
+ throw new CliError25("validation_error", "archive schedule metadata exceeds its byte limit");
3100
3168
  checkCancelled(options.signal);
3101
3169
  await recordingScheduleDirectory(directory, true);
3102
3170
  const target = path(job.schedule.id);
3103
3171
  const existing = await read(target, options.signal);
3104
3172
  if (existing && (existing.job.schedule.id !== job.schedule.id || JSON.stringify(existing.job.capture) !== JSON.stringify(job.capture)))
3105
- throw new CliError24("validation_error", "archive schedule file belongs to another captured job");
3173
+ throw new CliError25("validation_error", "archive schedule file belongs to another captured job");
3106
3174
  await writeFileAtomic3(target, content, {
3107
3175
  overwrite: existing !== null,
3108
3176
  beforePublish: /* @__PURE__ */ __name(async () => {
@@ -3111,7 +3179,7 @@ var fileRecordingScheduleStore = /* @__PURE__ */ __name((directory) => {
3111
3179
  return;
3112
3180
  const current = await lstat3(target, { bigint: true });
3113
3181
  if (!current.isFile() || current.isSymbolicLink() || current.ino !== existing.stat.ino || current.size !== existing.stat.size || current.mtimeNs !== existing.stat.mtimeNs || current.dev !== 0n && current.dev !== existing.stat.dev && process.platform !== "win32")
3114
- throw new CliError24("validation_error", "archive schedule file changed before replacement");
3182
+ throw new CliError25("validation_error", "archive schedule file changed before replacement");
3115
3183
  }, "beforePublish")
3116
3184
  });
3117
3185
  }
@@ -3121,7 +3189,7 @@ var fileRecordingScheduleStore = /* @__PURE__ */ __name((directory) => {
3121
3189
  // dist/recording-schedule-systemd.js
3122
3190
  import { execFile } from "node:child_process";
3123
3191
  import { isAbsolute as isAbsolute3, join as join9 } from "node:path";
3124
- import { CliError as CliError25, isCliError as isCliError7 } from "@wirecat/cli-base";
3192
+ import { CliError as CliError26, isCliError as isCliError8 } from "@wirecat/cli-base";
3125
3193
  import { openOrdinaryFile as openOrdinaryFile5, syncDirectory, writeFileAtomic as writeFileAtomic4 } from "@wirecat/cli-core";
3126
3194
  var execute = /* @__PURE__ */ __name((executable, args, options) => new Promise((resolve3, reject) => {
3127
3195
  execFile(executable, [...args], { shell: false, signal: options.signal, timeout: 3e4, maxBuffer: 65536, encoding: "utf8" }, (error) => {
@@ -3130,8 +3198,8 @@ var execute = /* @__PURE__ */ __name((executable, args, options) => new Promise(
3130
3198
  if (typeof error.code === "number")
3131
3199
  return resolve3({ exitCode: error.code });
3132
3200
  if (error.code === "ENOENT")
3133
- return reject(new CliError25("configuration_error", "systemctl is unavailable"));
3134
- reject(new CliError25("outcome_unknown", "archive timer command was interrupted; inspect its saved pending job and systemctl status"));
3201
+ return reject(new CliError26("configuration_error", "systemctl is unavailable"));
3202
+ reject(new CliError26("outcome_unknown", "archive timer command was interrupted; inspect its saved pending job and systemctl status"));
3135
3203
  });
3136
3204
  }), "execute");
3137
3205
  var missing4 = /* @__PURE__ */ __name((error) => typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT", "missing");
@@ -3198,7 +3266,7 @@ var existingUnit = /* @__PURE__ */ __name(async (path) => {
3198
3266
  const bytes2 = Buffer.alloc(maximumUnitBytes + 1);
3199
3267
  const size = (await handle.read(bytes2, 0, bytes2.length, 0)).bytesRead;
3200
3268
  if (size > maximumUnitBytes)
3201
- throw new CliError25("validation_error", "archive timer unit exceeds its byte limit");
3269
+ throw new CliError26("validation_error", "archive timer unit exceeds its byte limit");
3202
3270
  return bytes2.subarray(0, size).toString("utf8");
3203
3271
  } finally {
3204
3272
  await handle.close();
@@ -3206,12 +3274,12 @@ var existingUnit = /* @__PURE__ */ __name(async (path) => {
3206
3274
  }, "existingUnit");
3207
3275
  var writeUnit = /* @__PURE__ */ __name(async (directory, name, content, signal) => {
3208
3276
  if (Buffer.byteLength(content) > maximumUnitBytes)
3209
- throw new CliError25("validation_error", "archive timer unit exceeds its byte limit");
3277
+ throw new CliError26("validation_error", "archive timer unit exceeds its byte limit");
3210
3278
  const path = join9(directory, name);
3211
3279
  const current = await existingUnit(path);
3212
3280
  if (current !== null) {
3213
3281
  if (current !== content)
3214
- throw new CliError25("validation_error", "archive timer unit is foreign or was edited; it was preserved");
3282
+ throw new CliError26("validation_error", "archive timer unit is foreign or was edited; it was preserved");
3215
3283
  await syncDirectory(directory);
3216
3284
  return;
3217
3285
  }
@@ -3224,10 +3292,10 @@ var createSystemdRecordingArchiveScheduler = /* @__PURE__ */ __name((options) =>
3224
3292
  const platform = options.platform ?? process.platform;
3225
3293
  const executor = options.execute ?? execute;
3226
3294
  if (!isAbsolute3(directory) || !isAbsolute3(executable) || /[\0\r\n]/.test(directory + executable))
3227
- throw new CliError25("validation_error", "systemd archive paths must be absolute");
3295
+ throw new CliError26("validation_error", "systemd archive paths must be absolute");
3228
3296
  const assertSupported = /* @__PURE__ */ __name(() => {
3229
3297
  if (platform !== "linux")
3230
- throw new CliError25("configuration_error", "automatic archive scheduling currently supports Linux user systemd only");
3298
+ throw new CliError26("configuration_error", "automatic archive scheduling currently supports Linux user systemd only");
3231
3299
  }, "assertSupported");
3232
3300
  const checked = /* @__PURE__ */ __name(async (args, expected, signal) => {
3233
3301
  checkCancelled(signal);
@@ -3235,12 +3303,12 @@ var createSystemdRecordingArchiveScheduler = /* @__PURE__ */ __name((options) =>
3235
3303
  try {
3236
3304
  result = await executor(executable, ["--user", ...args], { shell: false, signal });
3237
3305
  } catch (error) {
3238
- if (isCliError7(error))
3306
+ if (isCliError8(error))
3239
3307
  throw error;
3240
- throw new CliError25("outcome_unknown", "archive timer command did not acknowledge completion; inspect its saved job and systemctl status");
3308
+ throw new CliError26("outcome_unknown", "archive timer command did not acknowledge completion; inspect its saved job and systemctl status");
3241
3309
  }
3242
3310
  if (result.exitCode !== expected)
3243
- throw new CliError25("outcome_unknown", "archive timer state was not verified; inspect its saved job and systemctl status");
3311
+ throw new CliError26("outcome_unknown", "archive timer state was not verified; inspect its saved job and systemctl status");
3244
3312
  }, "checked");
3245
3313
  return {
3246
3314
  backend: "systemd-user",
@@ -3256,7 +3324,7 @@ var createSystemdRecordingArchiveScheduler = /* @__PURE__ */ __name((options) =>
3256
3324
  try {
3257
3325
  const stat2 = await handle.stat();
3258
3326
  if (path === job.capture.runtime && (stat2.mode & 73) === 0)
3259
- throw new CliError25("validation_error", "scheduled runtime must be executable");
3327
+ throw new CliError26("validation_error", "scheduled runtime must be executable");
3260
3328
  } finally {
3261
3329
  await handle.close();
3262
3330
  }
@@ -3274,9 +3342,9 @@ var createSystemdRecordingArchiveScheduler = /* @__PURE__ */ __name((options) =>
3274
3342
  const units = unitPlan(value);
3275
3343
  checkCancelled(active.signal);
3276
3344
  if (!await recordingScheduleDirectory(directory, false))
3277
- throw new CliError25("not_found", "archive timer units were not found");
3345
+ throw new CliError26("not_found", "archive timer units were not found");
3278
3346
  if (await existingUnit(join9(directory, units.serviceName)) !== units.service || await existingUnit(join9(directory, units.timerName)) !== units.timer)
3279
- throw new CliError25("validation_error", "archive timer units are foreign or were edited; they were preserved");
3347
+ throw new CliError26("validation_error", "archive timer units are foreign or were edited; they were preserved");
3280
3348
  await checked(["disable", "--now", units.timerName], 0, active.signal);
3281
3349
  await checked(["is-enabled", "--quiet", units.timerName], 1, active.signal);
3282
3350
  await checked(["is-active", "--quiet", units.timerName], 3, active.signal);
@@ -3285,11 +3353,11 @@ var createSystemdRecordingArchiveScheduler = /* @__PURE__ */ __name((options) =>
3285
3353
  }, "createSystemdRecordingArchiveScheduler");
3286
3354
 
3287
3355
  // dist/recordings.js
3288
- import { CliError as CliError26 } from "@wirecat/cli-base";
3356
+ import { CliError as CliError27 } from "@wirecat/cli-base";
3289
3357
  var required = /* @__PURE__ */ __name((value) => {
3290
3358
  const text2 = string2(value);
3291
3359
  if (text2 === null)
3292
- throw new CliError26("invalid_response", "Zoom response is missing a required field");
3360
+ throw new CliError27("invalid_response", "Zoom response is missing a required field");
3293
3361
  return text2;
3294
3362
  }, "required");
3295
3363
  var timestamp = /* @__PURE__ */ __name((value, zones) => {
@@ -3304,7 +3372,7 @@ var meeting = /* @__PURE__ */ __name((value, zones) => {
3304
3372
  const row = object(value);
3305
3373
  const id = typeof row.id === "number" && Number.isSafeInteger(row.id) ? String(row.id) : required(row.id);
3306
3374
  if (!Array.isArray(row.recording_files))
3307
- throw new CliError26("invalid_response", "Zoom returned invalid recording files");
3375
+ throw new CliError27("invalid_response", "Zoom returned invalid recording files");
3308
3376
  const all = [
3309
3377
  ...row.recording_files,
3310
3378
  ...Array.isArray(row.participant_audio_files) ? row.participant_audio_files : []
@@ -3314,7 +3382,7 @@ var meeting = /* @__PURE__ */ __name((value, zones) => {
3314
3382
  const asset = object(value2);
3315
3383
  const id2 = string2(asset.id);
3316
3384
  if (id2 !== null && seen.has(id2))
3317
- throw new CliError26("invalid_response", "Zoom repeated a recording file id");
3385
+ throw new CliError27("invalid_response", "Zoom repeated a recording file id");
3318
3386
  if (id2 !== null)
3319
3387
  seen.add(id2);
3320
3388
  return {
@@ -3342,12 +3410,12 @@ var ZoomRecordings = class {
3342
3410
  }
3343
3411
  catalog(account) {
3344
3412
  if (typeof account !== "string" || !account.trim())
3345
- throw new CliError26("validation_error", "recording account is required");
3413
+ throw new CliError27("validation_error", "recording account is required");
3346
3414
  return {
3347
3415
  provider: "zoom",
3348
3416
  list: /* @__PURE__ */ __name(async (options) => {
3349
3417
  if (options.account !== account)
3350
- throw new CliError26("validation_error", "recording catalog account cannot be overridden");
3418
+ throw new CliError27("validation_error", "recording catalog account cannot be overridden");
3351
3419
  const page = await this.listPage(options);
3352
3420
  return {
3353
3421
  items: page.items.map(({ uuid, ...item }) => ({ ...item, externalId: uuid })),
@@ -3360,27 +3428,27 @@ var ZoomRecordings = class {
3360
3428
  const dates = [options.from, options.to].map((date) => {
3361
3429
  const instant = Date.parse(`${date}T00:00:00Z`);
3362
3430
  if (!/^\d{4}-\d{2}-\d{2}$/.test(date) || !Number.isFinite(instant) || new Date(instant).toISOString().slice(0, 10) !== date)
3363
- throw new CliError26("validation_error", "recording dates must be valid YYYY-MM-DD dates");
3431
+ throw new CliError27("validation_error", "recording dates must be valid YYYY-MM-DD dates");
3364
3432
  return instant;
3365
3433
  });
3366
3434
  const difference = (dates[1] ?? 0) - (dates[0] ?? 0);
3367
3435
  if (difference < 0 || difference > 31 * 864e5)
3368
- throw new CliError26("validation_error", "recording date range must be ordered and at most one month");
3436
+ throw new CliError27("validation_error", "recording date range must be ordered and at most one month");
3369
3437
  if (options.cursor !== void 0 && (typeof options.cursor !== "string" || !options.cursor.trim() || options.cursor.length > 4096))
3370
- throw new CliError26("validation_error", "invalid recording pagination cursor");
3438
+ throw new CliError27("validation_error", "invalid recording pagination cursor");
3371
3439
  const signal = operationSignal(options.signal);
3372
3440
  const query = new URLSearchParams({ from: options.from, to: options.to, page_size: "100" });
3373
3441
  if (options.cursor !== void 0)
3374
3442
  query.set("next_page_token", options.cursor);
3375
3443
  const body = await this.remote.request(`/users/me/recordings?${query}`, "cloud_recording:read:list_user_recordings", { signal });
3376
3444
  if (!Array.isArray(body.meetings) || body.meetings.length > 1e3)
3377
- throw new CliError26("invalid_response", "Zoom returned an invalid recording list");
3445
+ throw new CliError27("invalid_response", "Zoom returned an invalid recording list");
3378
3446
  const items = body.meetings.map((row) => meeting(row, this.zones));
3379
3447
  if (body.next_page_token !== void 0 && body.next_page_token !== null && body.next_page_token !== "" && (typeof body.next_page_token !== "string" || !body.next_page_token.trim()))
3380
- throw new CliError26("invalid_response", "Zoom returned an invalid recording pagination cursor");
3448
+ throw new CliError27("invalid_response", "Zoom returned an invalid recording pagination cursor");
3381
3449
  const nextCursor = string2(body.next_page_token);
3382
3450
  if (nextCursor !== null && nextCursor.length > 4096)
3383
- throw new CliError26("invalid_response", "Zoom returned an oversized pagination cursor");
3451
+ throw new CliError27("invalid_response", "Zoom returned an oversized pagination cursor");
3384
3452
  return { items, nextCursor };
3385
3453
  }
3386
3454
  async list(options) {
@@ -3389,27 +3457,27 @@ var ZoomRecordings = class {
3389
3457
  let cursor;
3390
3458
  for (let pages = 0; ; pages++) {
3391
3459
  if (pages >= 1e3)
3392
- throw new CliError26("invalid_response", "recording catalog page limit exceeded");
3460
+ throw new CliError27("invalid_response", "recording catalog page limit exceeded");
3393
3461
  const page = await this.listPage({ ...options, ...cursor === void 0 ? {} : { cursor } });
3394
3462
  for (const item of page.items) {
3395
3463
  const previous = meetings.get(item.uuid);
3396
3464
  if (previous && JSON.stringify(previous) !== JSON.stringify(item))
3397
- throw new CliError26("invalid_response", "Zoom returned conflicting recording occurrences");
3465
+ throw new CliError27("invalid_response", "Zoom returned conflicting recording occurrences");
3398
3466
  if (!previous && meetings.size >= 1e4)
3399
- throw new CliError26("invalid_response", "recording catalog occurrence limit exceeded");
3467
+ throw new CliError27("invalid_response", "recording catalog occurrence limit exceeded");
3400
3468
  meetings.set(item.uuid, item);
3401
3469
  }
3402
3470
  if (page.nextCursor === null)
3403
3471
  return [...meetings.values()];
3404
3472
  if (cursors.has(page.nextCursor))
3405
- throw new CliError26("invalid_response", "Zoom repeated a pagination token");
3473
+ throw new CliError27("invalid_response", "Zoom repeated a pagination token");
3406
3474
  cursors.add(page.nextCursor);
3407
3475
  cursor = page.nextCursor;
3408
3476
  }
3409
3477
  }
3410
3478
  async details(id, signal) {
3411
3479
  if (!id.trim())
3412
- throw new CliError26("validation_error", "recording meeting id is required");
3480
+ throw new CliError27("validation_error", "recording meeting id is required");
3413
3481
  const body = await this.remote.request(`/meetings/${encodeUuid(id)}/recordings`, "cloud_recording:read:list_recording_files", { ...signal ? { signal } : {} });
3414
3482
  const item = meeting(body, this.zones);
3415
3483
  const rows = [
@@ -3452,7 +3520,7 @@ var zoomRecordingSchedule = /* @__PURE__ */ __name(({ deps, getConfig, profile,
3452
3520
  }),
3453
3521
  recordings: /* @__PURE__ */ __name((job) => {
3454
3522
  if (!sameConfigFolder(dirname2(deps.configPath), job.capture.configDir, { env }) || profile() !== job.capture.profile || zoomClientId(readConfig(deps.configPath), deps.env ?? process.env) !== job.capture.clientId)
3455
- throw new CliError27("configuration_error", "archive schedule requires its saved profile and Zoom client id; select those settings before running");
3523
+ throw new CliError28("configuration_error", "archive schedule requires its saved profile and Zoom client id; select those settings before running");
3456
3524
  return new ZoomRecordings(new TokenManager({
3457
3525
  ...deps.tokens.options,
3458
3526
  clientId: job.capture.clientId,
@@ -3470,9 +3538,9 @@ var zoomRecordingSchedule = /* @__PURE__ */ __name(({ deps, getConfig, profile,
3470
3538
  const clientId = zoomClientId(getConfig(), deps.env ?? process.env);
3471
3539
  const named = profile();
3472
3540
  if (!clientId)
3473
- throw new CliError27("configuration_error", "archive schedules require a configured Zoom client id");
3541
+ throw new CliError28("configuration_error", "archive schedules require a configured Zoom client id");
3474
3542
  if (!deps.recordingScheduleTarget)
3475
- throw new CliError27("configuration_error", "archive scheduler requires an explicit runtime and CLI path");
3543
+ throw new CliError28("configuration_error", "archive scheduler requires an explicit runtime and CLI path");
3476
3544
  return {
3477
3545
  profile: named,
3478
3546
  clientId,
@@ -3485,7 +3553,7 @@ var zoomRecordingSchedule = /* @__PURE__ */ __name(({ deps, getConfig, profile,
3485
3553
  }, "zoomRecordingSchedule");
3486
3554
 
3487
3555
  // dist/remote-meetings.js
3488
- import { CliError as CliError28 } from "@wirecat/cli-base";
3556
+ import { CliError as CliError29 } from "@wirecat/cli-base";
3489
3557
  import { createMeetingManagement, dispatchMeetingMutation, validateMeetingChange } from "@wirecat/cli-core";
3490
3558
  var normalized = /* @__PURE__ */ __name((value) => {
3491
3559
  const row = object(value);
@@ -3505,9 +3573,9 @@ var normalized = /* @__PURE__ */ __name((value) => {
3505
3573
  }, "normalized");
3506
3574
  var changeBody = /* @__PURE__ */ __name((change, create) => {
3507
3575
  if (!change || Object.keys(change).some((key) => !["topic", "startTime", "durationMinutes", "timezone", "agenda", "type"].includes(key)))
3508
- throw new CliError28("validation_error", "unsupported meeting change field");
3576
+ throw new CliError29("validation_error", "unsupported meeting change field");
3509
3577
  if (change.type !== void 0 && change.type !== 1 && change.type !== 2)
3510
- throw new CliError28("validation_error", "only instant or scheduled meeting types are supported");
3578
+ throw new CliError29("validation_error", "only instant or scheduled meeting types are supported");
3511
3579
  const neutral = {
3512
3580
  ...change.topic !== void 0 ? { title: change.topic } : {},
3513
3581
  ...change.type !== void 0 ? { kind: change.type === 1 ? "instant" : "scheduled" } : {},
@@ -3552,7 +3620,7 @@ var ZoomRemoteMeetings = class {
3552
3620
  try {
3553
3621
  return normalized(body);
3554
3622
  } catch {
3555
- throw new CliError28("outcome_unknown", "Zoom mutation returned incomplete meeting details; verify remote state before retrying");
3623
+ throw new CliError29("outcome_unknown", "Zoom mutation returned incomplete meeting details; verify remote state before retrying");
3556
3624
  }
3557
3625
  }
3558
3626
  return void 0;
@@ -3571,7 +3639,7 @@ var ZoomRemoteMeetings = class {
3571
3639
  cancel(id, options = {}) {
3572
3640
  const path = zoomMeetingPath(id);
3573
3641
  if (options.occurrenceId !== void 0 && !string2(options.occurrenceId))
3574
- throw new CliError28("validation_error", "occurrence id must be nonempty");
3642
+ throw new CliError29("validation_error", "occurrence id must be nonempty");
3575
3643
  const query = options.occurrenceId ? `?${new URLSearchParams({ occurrence_id: options.occurrenceId })}` : "";
3576
3644
  return this.mutate("cancel", { method: "DELETE", path: `${path}${query}` }, "meeting:delete:meeting", options);
3577
3645
  }
@@ -3601,7 +3669,7 @@ var createZoomMeetingManagement = /* @__PURE__ */ __name((remote, account) => cr
3601
3669
  create: /* @__PURE__ */ __name(async (change, { signal }) => {
3602
3670
  const receipt = await remote.create({ ...zoomChange(change), type: 2 }, { apply: true, signal });
3603
3671
  if (!receipt.meeting)
3604
- throw new CliError28("outcome_unknown", "Zoom did not acknowledge the created meeting");
3672
+ throw new CliError29("outcome_unknown", "Zoom did not acknowledge the created meeting");
3605
3673
  return managedMeeting(receipt.meeting);
3606
3674
  }, "create"),
3607
3675
  update: /* @__PURE__ */ __name(async (id, change, { signal }) => {
@@ -3638,7 +3706,7 @@ var lazyRemote = /* @__PURE__ */ __name((make) => {
3638
3706
  };
3639
3707
  }, "lazyRemote");
3640
3708
  var unbound = /* @__PURE__ */ __name(() => {
3641
- throw new CliError28("configuration_error", "no Zoom account is open for this command");
3709
+ throw new CliError29("configuration_error", "no Zoom account is open for this command");
3642
3710
  }, "unbound");
3643
3711
  var leaves = /* @__PURE__ */ __name((command) => command.commands.length ? command.commands.flatMap(leaves) : [command], "leaves");
3644
3712
  var storeLeaves = /* @__PURE__ */ __name((program, before, management) => {
@@ -3647,7 +3715,7 @@ var storeLeaves = /* @__PURE__ */ __name((program, before, management) => {
3647
3715
  }, "storeLeaves");
3648
3716
 
3649
3717
  // dist/request-events.js
3650
- import { isCliError as isCliError8 } from "@wirecat/cli-base";
3718
+ import { isCliError as isCliError9 } from "@wirecat/cli-base";
3651
3719
  import { currentAttempt, providerRequest } from "@wirecat/cli-core";
3652
3720
  var SEGMENT = /^(?:v\d+|[a-z][a-z_]{0,23})$/;
3653
3721
  var operationOf = /* @__PURE__ */ __name((method, url) => {
@@ -3717,15 +3785,15 @@ var observedFetch = /* @__PURE__ */ __name((fetcher, sink) => async (input, init
3717
3785
  }
3718
3786
  return response;
3719
3787
  } catch (error) {
3720
- answered({ error, errorCode: isCliError8(error) ? error.code : "network_error" });
3788
+ answered({ error, errorCode: isCliError9(error) ? error.code : "network_error" });
3721
3789
  throw error;
3722
3790
  }
3723
3791
  }, "observedFetch");
3724
3792
 
3725
3793
  // dist/setup-commands.js
3726
- import { CliError as CliError29 } from "@wirecat/cli-base";
3727
- import { annotate as annotate8 } from "@wirecat/cli-base/commands";
3728
- import { environmentOf, grantsAuthority as grantsAuthority3, itemOf as itemOf5, LOCAL_READ as LOCAL_READ4, LOCAL_WRITE as LOCAL_WRITE4, NO_EFFECTS as NO_EFFECTS6, settingRows } from "@wirecat/cli-core";
3794
+ import { CliError as CliError30 } from "@wirecat/cli-base";
3795
+ import { annotate as annotate9 } from "@wirecat/cli-base/commands";
3796
+ import { environmentOf, grantsAuthority as grantsAuthority3, itemOf as itemOf6, LOCAL_READ as LOCAL_READ4, LOCAL_WRITE as LOCAL_WRITE5, NO_EFFECTS as NO_EFFECTS6, settingRows, TRANSCRIBE_SETTINGS } from "@wirecat/cli-core";
3729
3797
 
3730
3798
  // dist/account-removal.js
3731
3799
  import { readdirSync, readFileSync } from "node:fs";
@@ -3777,7 +3845,7 @@ var addModelsCommands = /* @__PURE__ */ __name((program, deps) => {
3777
3845
  // dist/upgrade.js
3778
3846
  import { join as join12 } from "node:path";
3779
3847
  import { createRenderer } from "@wirecat/cli-base";
3780
- import { annotate as annotate7 } from "@wirecat/cli-base/commands";
3848
+ import { annotate as annotate8 } from "@wirecat/cli-base/commands";
3781
3849
  import { appUpdate, FETCH as FETCH3, overrideSharedContract, upgradeCommand } from "@wirecat/cli-core";
3782
3850
  var { installer, latest, runUpdate } = appUpdate({
3783
3851
  packageName: "@wirecat/zoom-cli",
@@ -3800,52 +3868,56 @@ var addUpgradeCommand = /* @__PURE__ */ __name((program, streams) => {
3800
3868
  install: /* @__PURE__ */ __name((argv) => runUpdate(argv), "install")
3801
3869
  };
3802
3870
  }), "Zoom upgrade checks npm and may install files, so it explicitly declares both the network read and local write.", (command) => {
3803
- annotate7(command, { effects: FETCH3 });
3871
+ annotate8(command, { effects: FETCH3 });
3804
3872
  }));
3805
3873
  upgrade.commands.find((command) => command.name() === "upgrade")?.copyInheritedSettings(program);
3806
3874
  }, "addUpgradeCommand");
3807
3875
 
3808
3876
  // dist/setup-commands.js
3809
3877
  var refuseAgentPermissions = /* @__PURE__ */ __name((command, key) => {
3810
- if (environmentOf(command).agent && (key === "permissions" || key.startsWith("permissions.")))
3811
- throw new CliError29("permission_error", "change profile permissions in a terminal");
3878
+ if (!environmentOf(command).agent)
3879
+ return;
3880
+ if (key === "permissions" || key.startsWith("permissions."))
3881
+ throw new CliError30("permission_error", "change profile permissions in a terminal");
3882
+ if (TRANSCRIBE_SETTINGS.includes(key))
3883
+ throw new CliError30("permission_error", `an agent cannot change ${key} \u2014 the owner sets it in a terminal`);
3812
3884
  }, "refuseAgentPermissions");
3813
3885
  var addConfigCommands = /* @__PURE__ */ __name((program, { configPath, output, warn, named }) => {
3814
- const cfg = annotate8(program.command("config"), { effects: NO_EFFECTS6 }).description("local Zoom configuration");
3815
- annotate8(cfg.command("show"), { effects: LOCAL_READ4 }).description("show local configuration").action(() => {
3886
+ const cfg = annotate9(program.command("config"), { effects: NO_EFFECTS6 }).description("local Zoom configuration");
3887
+ annotate9(cfg.command("show"), { effects: LOCAL_READ4 }).description("show local configuration").action(() => {
3816
3888
  const { config, issues, raw } = inspectConfig(configPath, permissionKeys(program));
3817
- output(itemOf5({ ...config, settings: settingRows(raw ?? {}, ZOOM_SETTINGS) }));
3889
+ output(itemOf6({ ...config, settings: settingRows(raw ?? {}, ZOOM_SETTINGS) }));
3818
3890
  for (const issue of issues)
3819
3891
  warn(`${issue.what}, so it is left out${issue.fix ? ` \u2014 \`${issue.fix}\` removes it` : ""}`);
3820
3892
  });
3821
- grantsAuthority3(annotate8(cfg.command("set"), { effects: LOCAL_WRITE4 })).description("set a configuration value").argument("<key>", "setting name, such as zoom.client_id").argument("<value>", "new value").action(function(key, value) {
3893
+ grantsAuthority3(annotate9(cfg.command("set"), { effects: LOCAL_WRITE5 })).description("set a configuration value").argument("<key>", "setting name, such as zoom.client_id").argument("<value>", "new value").action(function(key, value) {
3822
3894
  refuseAgentPermissions(this, key);
3823
- output(itemOf5(setConfig(configPath, key, value, named, permissionKeys(program))));
3895
+ output(itemOf6(setConfig(configPath, key, value, named, permissionKeys(program))));
3824
3896
  });
3825
- grantsAuthority3(annotate8(cfg.command("unset"), { effects: LOCAL_WRITE4, examples: ["zm config unset files.folder"] })).description("remove a setting, or a part of the file doctor reports a problem in").argument("<key>", "setting name, such as files.folder, or the key a doctor fix names").action(function(key) {
3897
+ grantsAuthority3(annotate9(cfg.command("unset"), { effects: LOCAL_WRITE5, examples: ["zm config unset files.folder"] })).description("remove a setting, or a part of the file doctor reports a problem in").argument("<key>", "setting name, such as files.folder, or the key a doctor fix names").action(function(key) {
3826
3898
  refuseAgentPermissions(this, key);
3827
- output(itemOf5(unsetConfig(configPath, key, named(), permissionKeys(program))));
3899
+ output(itemOf6(unsetConfig(configPath, key, named(), permissionKeys(program))));
3828
3900
  });
3829
- grantsAuthority3(annotate8(cfg.command("migrate"), { effects: LOCAL_WRITE4, examples: ["zm config migrate"] })).description("write each setting the file lacks at its default, keeping yours").action(() => {
3901
+ grantsAuthority3(annotate9(cfg.command("migrate"), { effects: LOCAL_WRITE5, examples: ["zm config migrate"] })).description("write each setting the file lacks at its default, keeping yours").action(() => {
3830
3902
  const added = migrateConfig(configPath);
3831
- output(itemOf5({ config_file: configPath, added }));
3903
+ output(itemOf6({ config_file: configPath, added }));
3832
3904
  warn(added.length > 0 ? `added ${added.join(", ")} to ${configPath}` : `${configPath} already has every setting`);
3833
3905
  });
3834
3906
  }, "addConfigCommands");
3835
3907
  var addAppCommand = /* @__PURE__ */ __name((program, { output, buffer, pretty }) => {
3836
- annotate8(program.command("app"), { effects: NO_EFFECTS6, examples: ["zm app", "zm app --json"] }).description("what to enter when you make the Zoom app zm signs in with").action(() => {
3908
+ annotate9(program.command("app"), { effects: NO_EFFECTS6, examples: ["zm app", "zm app --json"] }).description("what to enter when you make the Zoom app zm signs in with").action(() => {
3837
3909
  if (pretty())
3838
3910
  buffer(`${zoomAppChecklist()}
3839
3911
  `);
3840
3912
  else
3841
- output(itemOf5(zoomAppSetup()));
3913
+ output(itemOf6(zoomAppSetup()));
3842
3914
  });
3843
3915
  }, "addAppCommand");
3844
3916
  var addSharedCommands = /* @__PURE__ */ __name((program, { deps, buffer, output }) => {
3845
3917
  addStandardCommands(program);
3846
3918
  addUpgradeCommand(program, { data: buffer, diagnostic: deps.diagnostic });
3847
3919
  addModelsCommands(program, { env: /* @__PURE__ */ __name(() => deps.env ?? process.env, "env"), output, diagnostic: deps.diagnostic });
3848
- annotate8(program.command("account"), { effects: NO_EFFECTS6 }).description("the profile's login and data on this computer").addCommand(zoomAccountRemoveCommand(deps));
3920
+ annotate9(program.command("account"), { effects: NO_EFFECTS6 }).description("the profile's login and data on this computer").addCommand(zoomAccountRemoveCommand(deps));
3849
3921
  }, "addSharedCommands");
3850
3922
 
3851
3923
  // dist/store-commands.js
@@ -3854,28 +3926,28 @@ import { addMeetingBatchCommand, addMeetingPassageCommand, addMeetingProjectCand
3854
3926
 
3855
3927
  // dist/archive-import.js
3856
3928
  import { createHash as createHash5 } from "node:crypto";
3857
- import { CliError as CliError30, isCliError as isCliError9 } from "@wirecat/cli-base";
3929
+ import { CliError as CliError31, isCliError as isCliError10 } from "@wirecat/cli-base";
3858
3930
  import { transcriptLanguage } from "@wirecat/cli-core";
3859
3931
  var plans = /* @__PURE__ */ new WeakMap();
3860
3932
  var preflightArchiveImport = /* @__PURE__ */ __name(async (destination, options = {}) => {
3861
3933
  const maximum = options.maxTotalBytes === void 0 ? 64 * 1024 ** 2 : options.maxTotalBytes;
3862
3934
  if (!Number.isSafeInteger(maximum) || maximum <= 0)
3863
- throw new CliError30("validation_error", "aggregate transcript byte limit must be a positive integer");
3935
+ throw new CliError31("validation_error", "aggregate transcript byte limit must be a positive integer");
3864
3936
  const prepared = /* @__PURE__ */ new Map();
3865
3937
  let verifiedAssets = 0;
3866
3938
  let totalBytes = 0;
3867
3939
  for await (const { meeting: meeting2, asset, cues } of readArchiveTranscripts(destination, options)) {
3868
3940
  checkCancelled(options.signal);
3869
3941
  if (cues.some((cue) => !Number.isSafeInteger(cue.startMs) || !Number.isSafeInteger(cue.endMs) || cue.startMs < 0 || cue.endMs < cue.startMs))
3870
- throw new CliError30("validation_error", "archive transcript cue times must be safe nonnegative ordered integers");
3942
+ throw new CliError31("validation_error", "archive transcript cue times must be safe nonnegative ordered integers");
3871
3943
  totalBytes += asset.size;
3872
3944
  if (totalBytes > maximum)
3873
- throw new CliError30("validation_error", "archive import exceeds the aggregate byte limit");
3945
+ throw new CliError31("validation_error", "archive import exceeds the aggregate byte limit");
3874
3946
  let startedAt = null;
3875
3947
  if (meeting2.startedAt !== null) {
3876
3948
  startedAt = Date.parse(meeting2.startedAt);
3877
3949
  if (!Number.isSafeInteger(startedAt) || Math.abs(startedAt) > 864e13 || new Date(startedAt).toISOString() !== meeting2.startedAt)
3878
- throw new CliError30("validation_error", "archive occurrence start must be a real ISO timestamp");
3950
+ throw new CliError31("validation_error", "archive occurrence start must be a real ISO timestamp");
3879
3951
  }
3880
3952
  const group = prepared.get(meeting2.uuid) ?? {
3881
3953
  uuid: meeting2.uuid,
@@ -3925,7 +3997,7 @@ async function* applyArchiveImport(plan, store, options) {
3925
3997
  const { accountId, signal } = options;
3926
3998
  const now = options.now ?? Date.now();
3927
3999
  if (!prepared || !Number.isSafeInteger(accountId) || accountId < 1 || !Number.isSafeInteger(now))
3928
- throw new CliError30("validation_error", "expected a verified archive plan, selected account and integer timestamp");
4000
+ throw new CliError31("validation_error", "expected a verified archive plan, selected account and integer timestamp");
3929
4001
  for (const group of prepared) {
3930
4002
  checkCancelled(signal);
3931
4003
  let receipt;
@@ -3940,9 +4012,9 @@ async function* applyArchiveImport(plan, store, options) {
3940
4012
  const exact = await store.appendTranscriptsWithReceipt(input);
3941
4013
  const details = exact?.meeting;
3942
4014
  if (!details?.meeting || details.meeting.accountId !== accountId || details.meeting.externalId !== group.uuid || !Number.isSafeInteger(details.meeting.id) || details.meeting.id < 1 || details.meeting.deletedAt !== null)
3943
- throw new CliError30("outcome_unknown", "archive append returned inconsistent ownership; verify stored state before retrying");
4015
+ throw new CliError31("outcome_unknown", "archive append returned inconsistent ownership; verify stored state before retrying");
3944
4016
  if (typeof exact.created !== "boolean" || exact.insertedTranscripts + exact.replayedTranscripts !== group.transcripts.length || [exact.insertedTranscripts, exact.replayedTranscripts, exact.supersededTranscripts].some((count) => !Number.isSafeInteger(count) || count < 0))
3945
- throw new CliError30("outcome_unknown", "archive append returned invalid counts; verify stored state before retrying");
4017
+ throw new CliError31("outcome_unknown", "archive append returned invalid counts; verify stored state before retrying");
3946
4018
  receipt = {
3947
4019
  uuid: group.uuid,
3948
4020
  assetIds: [...group.assetIds],
@@ -3954,12 +4026,12 @@ async function* applyArchiveImport(plan, store, options) {
3954
4026
  supersededTranscripts: exact.supersededTranscripts
3955
4027
  };
3956
4028
  } catch (error) {
3957
- if (isCliError9(error) && (error.code === "timeout" || error.code === "cancelled")) {
4029
+ if (isCliError10(error) && (error.code === "timeout" || error.code === "cancelled")) {
3958
4030
  checkCancelled(signal);
3959
4031
  throw error;
3960
4032
  }
3961
4033
  if (error instanceof Error && "code" in error && error.code === "outcome_unknown")
3962
- throw new CliError30("outcome_unknown", "archive append outcome is unknown; verify stored state before retrying");
4034
+ throw new CliError31("outcome_unknown", "archive append outcome is unknown; verify stored state before retrying");
3963
4035
  if (error instanceof Error && "code" in error && error.code === "not_found")
3964
4036
  receipt = {
3965
4037
  uuid: group.uuid,
@@ -3969,7 +4041,7 @@ async function* applyArchiveImport(plan, store, options) {
3969
4041
  };
3970
4042
  else {
3971
4043
  checkCancelled(signal);
3972
- throw new CliError30("provider_error", "archive transcript append failed; earlier occurrences may be committed");
4044
+ throw new CliError31("provider_error", "archive transcript append failed; earlier occurrences may be committed");
3973
4045
  }
3974
4046
  }
3975
4047
  yield receipt;
@@ -3978,14 +4050,14 @@ async function* applyArchiveImport(plan, store, options) {
3978
4050
  __name(applyArchiveImport, "applyArchiveImport");
3979
4051
 
3980
4052
  // dist/ingestion-search-commands.js
3981
- import { CliError as CliError31 } from "@wirecat/cli-base";
3982
- import { annotate as annotate9, customizeSharedCommand as customizeSharedCommand2 } from "@wirecat/cli-base/commands";
3983
- import { allAnswer, itemOf as itemOf6, LOCAL_READ as LOCAL_READ5, LOCAL_WRITE as LOCAL_WRITE5, NO_EFFECTS as NO_EFFECTS7, sharedCommandTemplate } from "@wirecat/cli-core";
4053
+ import { CliError as CliError32 } from "@wirecat/cli-base";
4054
+ import { annotate as annotate10, customizeSharedCommand as customizeSharedCommand2 } from "@wirecat/cli-base/commands";
4055
+ import { allAnswer, itemOf as itemOf7, LOCAL_READ as LOCAL_READ5, LOCAL_WRITE as LOCAL_WRITE6, NO_EFFECTS as NO_EFFECTS7, sharedCommandTemplate } from "@wirecat/cli-core";
3984
4056
  var addIngestionSearchCommandsDefinition = /* @__PURE__ */ __name((program, deps) => {
3985
4057
  const archive = program.commands.find((command) => command.name() === "recordings")?.commands.find((command) => command.name() === "archive");
3986
4058
  if (!archive)
3987
- throw new CliError31("configuration_error", "archive command group is unavailable");
3988
- annotate9(archive.command("import").description("check an archive's transcripts, then add them to the stored meetings").argument("<directory>", "archive folder").option("--uuid <uuid>", "select an occurrence UUID").option("--file-ids <ids>", "select comma-separated transcript asset ids").option("--max-bytes <bytes>", "largest transcript file, in bytes (default 8 MiB)", bytes).option("--max-total-bytes <bytes>", "most transcript bytes in all, checked before any write (default 64 MiB)", bytes).action(async (directory, options) => {
4059
+ throw new CliError32("configuration_error", "archive command group is unavailable");
4060
+ annotate10(archive.command("import").description("check an archive's transcripts, then add them to the stored meetings").argument("<directory>", "archive folder").option("--uuid <uuid>", "select an occurrence UUID").option("--file-ids <ids>", "select comma-separated transcript asset ids").option("--max-bytes <bytes>", "largest transcript file, in bytes (default 8 MiB)", bytes).option("--max-total-bytes <bytes>", "most transcript bytes in all, checked before any write (default 64 MiB)", bytes).action(async (directory, options) => {
3989
4061
  const plan = await deps.preflight(directory, {
3990
4062
  uuid: options.uuid,
3991
4063
  fileIds: options.fileIds?.split(",").map((id) => id.trim()),
@@ -3996,16 +4068,16 @@ var addIngestionSearchCommandsDefinition = /* @__PURE__ */ __name((program, deps
3996
4068
  const receipts = deps.apply(plan);
3997
4069
  if (program.opts().jsonl) {
3998
4070
  for await (const receipt of receipts)
3999
- await deps.receipt(itemOf6(receipt));
4071
+ await deps.receipt(itemOf7(receipt));
4000
4072
  } else
4001
4073
  await deps.outputItems(receipts);
4002
4074
  }), {
4003
4075
  origin: "handwritten",
4004
- effects: LOCAL_WRITE5,
4076
+ effects: LOCAL_WRITE6,
4005
4077
  examples: ["zm personal recordings archive import ./archive --jsonl"]
4006
4078
  });
4007
- const search = annotate9(program.command("search"), { effects: NO_EFFECTS7 }).description("opt-in shared store search; meetings by default");
4008
- annotate9(search.command("all").description("search meetings and, with --only, messages, mail and notes in the local store").argument("<query>", "words to find; a word also matches longer words it starts").option("--only <resources>", "comma-separated meetings,messages,mail,notes (default meetings)").option("--limit <n>", "how many results, 1 through 1000 (default 100)", bytes, 100).option("--page <n>", "which page, starting at 1", bytes).option("--exact", "request exact matching; unsupported meeting queries are reported as skipped").action(async (query, options) => {
4079
+ const search = annotate10(program.command("search"), { effects: NO_EFFECTS7 }).description("opt-in shared store search; meetings by default");
4080
+ annotate10(search.command("all").description("search meetings and, with --only, messages, mail and notes in the local store").argument("<query>", "words to find; a word also matches longer words it starts").option("--only <resources>", "comma-separated meetings,messages,mail,notes (default meetings)").option("--limit <n>", "how many results, 1 through 1000 (default 100)", bytes, 100).option("--page <n>", "which page, starting at 1", bytes).option("--exact", "request exact matching; unsupported meeting queries are reported as skipped").action(async (query, options) => {
4009
4081
  const page = options.page ?? 1;
4010
4082
  const request = validateUnifiedSearch({
4011
4083
  text: query,
@@ -4040,42 +4112,6 @@ var addIngestionSearchCommands = /* @__PURE__ */ __name((...args) => customizeSh
4040
4112
  return command;
4041
4113
  }, SHELL_OVERRIDES.search), "addIngestionSearchCommands");
4042
4114
 
4043
- // dist/local-transcription-commands.js
4044
- import { CliError as CliError32 } from "@wirecat/cli-base";
4045
- import { annotate as annotate10 } from "@wirecat/cli-base/commands";
4046
- import { itemOf as itemOf7, LOCAL_WRITE as LOCAL_WRITE6, speechModel } from "@wirecat/cli-core";
4047
- var addLocalTranscriptionCommands = /* @__PURE__ */ __name((program, deps) => {
4048
- const meetings = program.commands.find((command) => command.name() === "meetings");
4049
- if (!meetings)
4050
- throw new CliError32("configuration_error", "meeting command group is unavailable");
4051
- annotate10(runsLong(meetings.command("transcribe")).description("preview transcribing a recording on this machine; --yes adds the transcript").argument("<meeting>", "stored meeting id or meeting reference").argument("<file>", "a recording: WAV as it is, MP4, M4A or other audio and video through an installed ffmpeg").requiredOption("--model <model>", "installed speech model").option("--models-dir <dir>", "shared installed speech-model directory").option("--max-bytes <bytes>", "largest audio file to read, in bytes (default 1 GiB)", bytes).option("--max-duration <duration>", "longest audio to transcribe (default 4h)", (text2) => duration(text2, "--max-duration")).option("--max-segments <n>", "most recognized segments (default 10000)", bytes).option("--max-text-bytes <bytes>", "most transcript text, in bytes (default 4 MiB)", bytes).option("--yes", "recognize locally and append to the existing meeting").option("--dry-run", "preview even when --yes is present").action(async (reference, file, options) => {
4052
- const request = validateLocalTranscriptionOptions({
4053
- model: options.model,
4054
- modelsDirectory: options.modelsDir,
4055
- maxBytes: options.maxBytes,
4056
- maxDurationMs: options.maxDuration,
4057
- maxSegments: options.maxSegments,
4058
- maxTextBytes: options.maxTextBytes,
4059
- apply: options.yes,
4060
- dryRun: options.dryRun,
4061
- signal: deps.signal()
4062
- });
4063
- speechModel(request.model);
4064
- if (typeof file !== "string" || !file.trim() || file.includes("\0"))
4065
- throw new CliError32("validation_error", "local audio file is required");
4066
- const capabilities = await deps.capabilities();
4067
- const receipt = await capabilities.transcribe(reference, file, request);
4068
- if (receipt.applied)
4069
- await deps.receipt(itemOf7(compactLocalTranscriptionReceipt(receipt)));
4070
- else
4071
- deps.output(itemOf7(receipt));
4072
- }), {
4073
- origin: "handwritten",
4074
- effects: LOCAL_WRITE6,
4075
- examples: ["zm personal meetings transcribe meeting:3/12 ./AliceExample.m4a --model parakeet-v3 --json"]
4076
- });
4077
- }, "addLocalTranscriptionCommands");
4078
-
4079
4115
  // dist/meeting-context-commands.js
4080
4116
  import { CliError as CliError33 } from "@wirecat/cli-base";
4081
4117
  import { annotate as annotate11 } from "@wirecat/cli-base/commands";
@@ -4626,7 +4662,7 @@ var addMeetingStatsCommands = /* @__PURE__ */ __name((program, deps) => {
4626
4662
 
4627
4663
  // dist/store-commands.js
4628
4664
  var addStoreCommands = /* @__PURE__ */ __name((program, context) => {
4629
- const { deps, connected, openStore, preparation, signal, output, outputItems, receipt, buffer, rendered, fields, meta } = context;
4665
+ const { deps, connected, openStore, preparation, signal, output, outputItems, receipt, buffer, rendered, fields, meta, transcriptionEngine: transcriptionEngine2 } = context;
4630
4666
  addIngestionSearchCommands(program, {
4631
4667
  signal,
4632
4668
  output,
@@ -4678,6 +4714,7 @@ var addStoreCommands = /* @__PURE__ */ __name((program, context) => {
4678
4714
  signal,
4679
4715
  output,
4680
4716
  receipt,
4717
+ engine: transcriptionEngine2,
4681
4718
  capabilities: /* @__PURE__ */ __name(async () => (await connected()).meetingTranscription, "capabilities")
4682
4719
  });
4683
4720
  const meetingContext = /* @__PURE__ */ __name(async () => (await connected()).meetingContext, "meetingContext");
@@ -4832,7 +4869,7 @@ var addWatchCommand = /* @__PURE__ */ __name((program, deps) => {
4832
4869
  }, "addWatchCommand");
4833
4870
 
4834
4871
  // dist/watch-service.js
4835
- import { CliError as CliError43, isCliError as isCliError10, realSleep } from "@wirecat/cli-base";
4872
+ import { CliError as CliError43, isCliError as isCliError11, realSleep } from "@wirecat/cli-base";
4836
4873
  import { importFiles, pull } from "@wirecat/cli-core";
4837
4874
  var createWatchService = /* @__PURE__ */ __name(({ deps, getConfig, profile, tokens, fetch, offline, openStore, guardedStore, zones }) => {
4838
4875
  let watchConfig;
@@ -4914,7 +4951,7 @@ var createWatchService = /* @__PURE__ */ __name(({ deps, getConfig, profile, tok
4914
4951
  checkCancelled(operation3);
4915
4952
  return value;
4916
4953
  } catch (error) {
4917
- if (isCliError10(error) && error.code === "outcome_unknown") {
4954
+ if (isCliError11(error) && error.code === "outcome_unknown") {
4918
4955
  sourceFailure = error;
4919
4956
  throw error;
4920
4957
  }
@@ -5326,7 +5363,7 @@ ${PROFILE_HELP}`);
5326
5363
  });
5327
5364
  return { ...connection, close };
5328
5365
  } catch (error) {
5329
- if (isCliError11(error))
5366
+ if (isCliError12(error))
5330
5367
  throw error;
5331
5368
  throw new CliError47("configuration_error", "could not open the shared meeting store");
5332
5369
  }
@@ -5603,6 +5640,7 @@ ${PROFILE_HELP}`);
5603
5640
  buffer,
5604
5641
  rendered,
5605
5642
  fields: /* @__PURE__ */ __name(() => fields, "fields"),
5643
+ transcriptionEngine: profileTranscriptionEngine({ deps, profile, getConfig, signal }),
5606
5644
  meta: /* @__PURE__ */ __name(() => {
5607
5645
  if (!execution)
5608
5646
  throw new CliError47("configuration_error", "command execution is not initialized");
@@ -5635,7 +5673,7 @@ ${PROFILE_HELP}`);
5635
5673
  }, "bindZoomProgram");
5636
5674
 
5637
5675
  // dist/zoom-session.js
5638
- import { CliError as CliError48, isCliError as isCliError12 } from "@wirecat/cli-base";
5676
+ import { CliError as CliError48, isCliError as isCliError13 } from "@wirecat/cli-base";
5639
5677
  import { environmentOf as environmentOf4, oauthSessionCommand } from "@wirecat/cli-core";
5640
5678
  import { Option as Option2 } from "commander";
5641
5679
  var configuredClient = /* @__PURE__ */ __name((configPath, env) => {
@@ -5679,7 +5717,7 @@ var zoomSessionCommand = /* @__PURE__ */ __name((deps, resolveSettings) => oauth
5679
5717
  const user = await getZoomProfile({ tokens: /* @__PURE__ */ __name(async () => token, "tokens") }, observedFetch(deps.fetch, events), signal ? { signal } : {});
5680
5718
  return { id: user.id, account: { user_id: user.id, email: user.email, display_name: user.displayName } };
5681
5719
  } catch (error) {
5682
- const scopeless = isCliError12(error) && ["authentication_error", "permission_error"].includes(error.code);
5720
+ const scopeless = isCliError13(error) && ["authentication_error", "permission_error"].includes(error.code);
5683
5721
  if (command.name() === "start" && scopeless)
5684
5722
  return { id: "", account: {} };
5685
5723
  throw error;