@vm0/cli 9.251.1 → 9.252.1

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 (107) hide show
  1. package/{agent-BNFNLNHG.js → agent-6DLY56R2.js} +7 -7
  2. package/{banking-TCGIBAP6.js → banking-22B7QVCY.js} +5 -5
  3. package/{chat-YPDUENU7.js → chat-2QVQ3MLT.js} +6 -6
  4. package/{chunk-CV7MCB2U.js → chunk-7DGYI4QB.js} +4 -8
  5. package/chunk-7DGYI4QB.js.map +1 -0
  6. package/{chunk-4GD76EQ4.js → chunk-7NPYHUEQ.js} +3 -3
  7. package/{chunk-6AKLTZUH.js → chunk-7QTOTACG.js} +2 -2
  8. package/{chunk-U3VV27JW.js → chunk-CPJVE3HV.js} +2 -2
  9. package/{chunk-B7MK54AY.js → chunk-CUAL7MH6.js} +2 -2
  10. package/{chunk-4CCCO3QU.js → chunk-DK3C2ME6.js} +13 -1
  11. package/chunk-DK3C2ME6.js.map +1 -0
  12. package/{chunk-PP2JWZSG.js → chunk-FBISVSTZ.js} +357 -25
  13. package/chunk-FBISVSTZ.js.map +1 -0
  14. package/{chunk-DLKSV2HZ.js → chunk-KBUXPDDX.js} +4 -4
  15. package/{chunk-KHZ4LMY2.js → chunk-MFNEXCZL.js} +2 -2
  16. package/{chunk-BRSUIBNM.js → chunk-OAESJHRL.js} +5 -4
  17. package/chunk-OAESJHRL.js.map +1 -0
  18. package/{chunk-GO2ZC4S5.js → chunk-Z6BXUYYX.js} +2 -2
  19. package/{computer-use-VXYMW7DO.js → computer-use-TWN6NBIN.js} +5 -5
  20. package/{connector-UIBA5P4Z.js → connector-DEKQFV2G.js} +8 -8
  21. package/{credit-GWNSOZOX.js → credit-SGN2CQ4F.js} +7 -7
  22. package/{developer-support-QOTFHN2S.js → developer-support-7DKJHHFR.js} +5 -5
  23. package/{doctor-G4UUSU3R.js → doctor-PINI2CXE.js} +7 -7
  24. package/feishu-RVNSCNUY.js +277 -0
  25. package/feishu-RVNSCNUY.js.map +1 -0
  26. package/{finance-QEB2AYB4.js → finance-IL3LEHYM.js} +5 -5
  27. package/{generate-Y2GBOZ4T.js → generate-DVB7CDWO.js} +7 -7
  28. package/{github-JX5PFWTW.js → github-HECK3WC6.js} +5 -5
  29. package/{goal-ETVDARSU.js → goal-RJ4KHBJZ.js} +5 -5
  30. package/{host-OTBNOMJO.js → host-UAVQ4BZY.js} +5 -5
  31. package/{logs-MK4VKYGE.js → logs-PFZVJGHK.js} +6 -6
  32. package/{mail-4WPLYKL5.js → mail-SJOUFJDK.js} +7 -7
  33. package/{maps-7YWGDMU4.js → maps-JCB6I264.js} +5 -5
  34. package/{model-P5TLS3KD.js → model-GI5HI3B5.js} +6 -6
  35. package/{model-provider-YUQ65CGB.js → model-provider-YVF7DWLL.js} +6 -6
  36. package/{org-BO46UGHP.js → org-SPWQ25RJ.js} +5 -5
  37. package/package.json +1 -1
  38. package/{people-search-6JZNG46F.js → people-search-24TMMWRS.js} +5 -5
  39. package/{phone-OLPRI3UD.js → phone-3XXRREOH.js} +5 -5
  40. package/{preference-OSLWFBAT.js → preference-SSKGMIHI.js} +5 -5
  41. package/{resource-6IX3QB3W.js → resource-HJBJYOZW.js} +5 -5
  42. package/{scrape-T6XHTU6J.js → scrape-LCD2CT5P.js} +5 -5
  43. package/{search-KYW4WRMQ.js → search-IU6AXAPL.js} +6 -6
  44. package/{secret-ORODPPSX.js → secret-4GZ5YF55.js} +5 -5
  45. package/{slack-CXZCQ5HU.js → slack-TLBZUY27.js} +174 -47
  46. package/slack-TLBZUY27.js.map +1 -0
  47. package/{teams-CGDBFXQ2.js → teams-ZKQMACHI.js} +5 -5
  48. package/{telegram-SCGQFOYI.js → telegram-J4ZWDUEB.js} +5 -5
  49. package/{upgrade-3LEF7WD7.js → upgrade-UBEBOHV6.js} +4 -4
  50. package/{variable-G6WZKJJG.js → variable-4K5GUB4B.js} +5 -5
  51. package/{video-JKYPCENK.js → video-5LENA5YA.js} +4 -4
  52. package/{weather-3WQV3JMX.js → weather-UL4D4T3L.js} +5 -5
  53. package/{web-3FRUHVEN.js → web-6452PFF7.js} +5 -5
  54. package/{web-search-H6WV4RFE.js → web-search-D5HGEWU5.js} +5 -5
  55. package/{whoami-BMNW6CH3.js → whoami-HYDZ6YSH.js} +7 -7
  56. package/{workflow-O6CVNJWM.js → workflow-W2HNGAVJ.js} +5 -5
  57. package/zero.js +42 -42
  58. package/chunk-4CCCO3QU.js.map +0 -1
  59. package/chunk-BRSUIBNM.js.map +0 -1
  60. package/chunk-CV7MCB2U.js.map +0 -1
  61. package/chunk-PP2JWZSG.js.map +0 -1
  62. package/feishu-GQEAUNH3.js +0 -119
  63. package/feishu-GQEAUNH3.js.map +0 -1
  64. package/slack-CXZCQ5HU.js.map +0 -1
  65. /package/{agent-BNFNLNHG.js.map → agent-6DLY56R2.js.map} +0 -0
  66. /package/{banking-TCGIBAP6.js.map → banking-22B7QVCY.js.map} +0 -0
  67. /package/{chat-YPDUENU7.js.map → chat-2QVQ3MLT.js.map} +0 -0
  68. /package/{chunk-4GD76EQ4.js.map → chunk-7NPYHUEQ.js.map} +0 -0
  69. /package/{chunk-6AKLTZUH.js.map → chunk-7QTOTACG.js.map} +0 -0
  70. /package/{chunk-U3VV27JW.js.map → chunk-CPJVE3HV.js.map} +0 -0
  71. /package/{chunk-B7MK54AY.js.map → chunk-CUAL7MH6.js.map} +0 -0
  72. /package/{chunk-DLKSV2HZ.js.map → chunk-KBUXPDDX.js.map} +0 -0
  73. /package/{chunk-KHZ4LMY2.js.map → chunk-MFNEXCZL.js.map} +0 -0
  74. /package/{chunk-GO2ZC4S5.js.map → chunk-Z6BXUYYX.js.map} +0 -0
  75. /package/{computer-use-VXYMW7DO.js.map → computer-use-TWN6NBIN.js.map} +0 -0
  76. /package/{connector-UIBA5P4Z.js.map → connector-DEKQFV2G.js.map} +0 -0
  77. /package/{credit-GWNSOZOX.js.map → credit-SGN2CQ4F.js.map} +0 -0
  78. /package/{developer-support-QOTFHN2S.js.map → developer-support-7DKJHHFR.js.map} +0 -0
  79. /package/{doctor-G4UUSU3R.js.map → doctor-PINI2CXE.js.map} +0 -0
  80. /package/{finance-QEB2AYB4.js.map → finance-IL3LEHYM.js.map} +0 -0
  81. /package/{generate-Y2GBOZ4T.js.map → generate-DVB7CDWO.js.map} +0 -0
  82. /package/{github-JX5PFWTW.js.map → github-HECK3WC6.js.map} +0 -0
  83. /package/{goal-ETVDARSU.js.map → goal-RJ4KHBJZ.js.map} +0 -0
  84. /package/{host-OTBNOMJO.js.map → host-UAVQ4BZY.js.map} +0 -0
  85. /package/{logs-MK4VKYGE.js.map → logs-PFZVJGHK.js.map} +0 -0
  86. /package/{mail-4WPLYKL5.js.map → mail-SJOUFJDK.js.map} +0 -0
  87. /package/{maps-7YWGDMU4.js.map → maps-JCB6I264.js.map} +0 -0
  88. /package/{model-P5TLS3KD.js.map → model-GI5HI3B5.js.map} +0 -0
  89. /package/{model-provider-YUQ65CGB.js.map → model-provider-YVF7DWLL.js.map} +0 -0
  90. /package/{org-BO46UGHP.js.map → org-SPWQ25RJ.js.map} +0 -0
  91. /package/{people-search-6JZNG46F.js.map → people-search-24TMMWRS.js.map} +0 -0
  92. /package/{phone-OLPRI3UD.js.map → phone-3XXRREOH.js.map} +0 -0
  93. /package/{preference-OSLWFBAT.js.map → preference-SSKGMIHI.js.map} +0 -0
  94. /package/{resource-6IX3QB3W.js.map → resource-HJBJYOZW.js.map} +0 -0
  95. /package/{scrape-T6XHTU6J.js.map → scrape-LCD2CT5P.js.map} +0 -0
  96. /package/{search-KYW4WRMQ.js.map → search-IU6AXAPL.js.map} +0 -0
  97. /package/{secret-ORODPPSX.js.map → secret-4GZ5YF55.js.map} +0 -0
  98. /package/{teams-CGDBFXQ2.js.map → teams-ZKQMACHI.js.map} +0 -0
  99. /package/{telegram-SCGQFOYI.js.map → telegram-J4ZWDUEB.js.map} +0 -0
  100. /package/{upgrade-3LEF7WD7.js.map → upgrade-UBEBOHV6.js.map} +0 -0
  101. /package/{variable-G6WZKJJG.js.map → variable-4K5GUB4B.js.map} +0 -0
  102. /package/{video-JKYPCENK.js.map → video-5LENA5YA.js.map} +0 -0
  103. /package/{weather-3WQV3JMX.js.map → weather-UL4D4T3L.js.map} +0 -0
  104. /package/{web-3FRUHVEN.js.map → web-6452PFF7.js.map} +0 -0
  105. /package/{web-search-H6WV4RFE.js.map → web-search-D5HGEWU5.js.map} +0 -0
  106. /package/{whoami-BMNW6CH3.js.map → whoami-HYDZ6YSH.js.map} +0 -0
  107. /package/{workflow-O6CVNJWM.js.map → workflow-W2HNGAVJ.js.map} +0 -0
@@ -5,15 +5,18 @@ import {
5
5
  completeSlackFileUpload,
6
6
  downloadSlackFile,
7
7
  initSlackFileUpload,
8
+ materializeSlackFileUpload,
8
9
  sendSlackMessage
9
- } from "./chunk-PP2JWZSG.js";
10
- import "./chunk-BRSUIBNM.js";
10
+ } from "./chunk-FBISVSTZ.js";
11
+ import {
12
+ inferWebUploadContentType
13
+ } from "./chunk-OAESJHRL.js";
11
14
  import "./chunk-SB7EZ2ZO.js";
12
15
  import {
13
16
  source_default,
14
17
  withErrorHandler
15
- } from "./chunk-4GD76EQ4.js";
16
- import "./chunk-4CCCO3QU.js";
18
+ } from "./chunk-7NPYHUEQ.js";
19
+ import "./chunk-DK3C2ME6.js";
17
20
  import {
18
21
  Command
19
22
  } from "./chunk-LD4ZVU4O.js";
@@ -110,9 +113,171 @@ Examples:
110
113
 
111
114
  // src/commands/zero/slack/upload-file.ts
112
115
  init_esm_shims();
116
+ import { createHash, randomUUID } from "crypto";
113
117
  import { statSync, readFileSync as readFileSync2 } from "fs";
114
118
  import { basename } from "path";
115
- var uploadFileCommand = new Command().name("upload-file").description("Upload a file to a Slack channel as the bot").requiredOption("-f, --file <path>", "Local file path to upload").requiredOption("-c, --channel <id>", "Slack channel ID").option("--thread <ts>", "Thread timestamp to post as a reply").option("--title <title>", "Display title for the file").option("--comment <text>", "Initial comment to accompany the file").addHelpText(
119
+ function readUploadFile(path) {
120
+ let size;
121
+ try {
122
+ size = statSync(path).size;
123
+ } catch {
124
+ throw new Error(`File not found: ${path}`);
125
+ }
126
+ if (size === 0) {
127
+ throw new Error("File is empty");
128
+ }
129
+ return { content: readFileSync2(path), size };
130
+ }
131
+ function warnDeliveryRetry(operationId) {
132
+ console.warn(source_default.dim(` Retry with --operation-id ${operationId}`));
133
+ }
134
+ async function uploadDirectlyToSlack(initialized, options, fileContent) {
135
+ const uploadResponse = await fetch(initialized.uploadUrl, {
136
+ method: "POST",
137
+ body: fileContent
138
+ });
139
+ if (!uploadResponse.ok) {
140
+ throw new Error(
141
+ `File upload failed: ${uploadResponse.status} ${uploadResponse.statusText}`
142
+ );
143
+ }
144
+ const result = await completeSlackFileUpload({
145
+ fileId: initialized.fileId,
146
+ channel: options.channel,
147
+ threadTs: options.thread,
148
+ title: options.title,
149
+ initialComment: options.comment
150
+ });
151
+ console.log(source_default.green(`\u2713 File uploaded (file_id: ${result.fileId})`));
152
+ console.log(source_default.dim(` permalink: ${result.permalink}`));
153
+ }
154
+ async function uploadCanonicalBody(initialized, contentType, fileContent) {
155
+ if (!initialized.uploadUrl) {
156
+ return;
157
+ }
158
+ const uploadResponse = await fetch(initialized.uploadUrl, {
159
+ method: "PUT",
160
+ headers: { "Content-Type": contentType },
161
+ body: fileContent
162
+ });
163
+ if (!uploadResponse.ok) {
164
+ throw new Error(
165
+ `Canonical file upload failed: ${uploadResponse.status} ${uploadResponse.statusText}`
166
+ );
167
+ }
168
+ }
169
+ async function uploadPendingSlackBody(delivery, fileContent) {
170
+ try {
171
+ const uploadResponse = await fetch(delivery.uploadUrl, {
172
+ method: "POST",
173
+ body: fileContent
174
+ });
175
+ if (!uploadResponse.ok) {
176
+ return `Slack upload failed: ${uploadResponse.status} ${uploadResponse.statusText}`;
177
+ }
178
+ return void 0;
179
+ } catch (error) {
180
+ return error instanceof Error ? error.message : "Slack upload failed";
181
+ }
182
+ }
183
+ async function completeCanonicalSlackDelivery(args) {
184
+ const uploadError = await uploadPendingSlackBody(
185
+ args.delivery,
186
+ args.fileContent
187
+ );
188
+ let result;
189
+ try {
190
+ result = await completeSlackFileUpload({
191
+ fileId: args.delivery.fileId,
192
+ channel: args.options.channel,
193
+ ...args.options.thread ? { threadTs: args.options.thread } : {},
194
+ ...args.options.title ? { title: args.options.title } : {},
195
+ ...args.options.comment ? { initialComment: args.options.comment } : {},
196
+ canonicalAssetId: args.initialized.assetId,
197
+ operationId: args.initialized.operationId,
198
+ ...uploadError ? { uploadError } : {}
199
+ });
200
+ } catch (error) {
201
+ console.warn(
202
+ source_default.yellow(
203
+ `\u26A0 Slack delivery status could not be recorded: ${error instanceof Error ? error.message : "Unknown error"}`
204
+ )
205
+ );
206
+ warnDeliveryRetry(args.initialized.operationId);
207
+ return;
208
+ }
209
+ if (result.deliveryStatus === "failed") {
210
+ console.warn(
211
+ source_default.yellow(
212
+ `\u26A0 Slack delivery failed: ${result.deliveryError ?? "Unknown error"}`
213
+ )
214
+ );
215
+ warnDeliveryRetry(args.initialized.operationId);
216
+ return;
217
+ }
218
+ console.log(source_default.green(`\u2713 Delivered to Slack (file_id: ${result.fileId})`));
219
+ console.log(source_default.dim(` permalink: ${result.permalink}`));
220
+ }
221
+ async function publishCanonicalFile(initialized, options, contentType, fileContent) {
222
+ await uploadCanonicalBody(initialized, contentType, fileContent);
223
+ const materialized = await materializeSlackFileUpload({
224
+ assetId: initialized.assetId,
225
+ operationId: initialized.operationId
226
+ });
227
+ console.log(
228
+ source_default.green(`\u2713 File published (asset_id: ${materialized.assetId})`)
229
+ );
230
+ console.log(source_default.dim(` url: ${materialized.url}`));
231
+ if (materialized.delivery.status === "delivered") {
232
+ console.log(
233
+ source_default.green(
234
+ `\u2713 Delivered to Slack (file_id: ${materialized.delivery.fileId})`
235
+ )
236
+ );
237
+ console.log(source_default.dim(` permalink: ${materialized.delivery.permalink}`));
238
+ return;
239
+ }
240
+ if (materialized.delivery.status === "failed") {
241
+ console.warn(
242
+ source_default.yellow(`\u26A0 Slack delivery failed: ${materialized.delivery.message}`)
243
+ );
244
+ warnDeliveryRetry(initialized.operationId);
245
+ return;
246
+ }
247
+ await completeCanonicalSlackDelivery({
248
+ initialized,
249
+ delivery: materialized.delivery,
250
+ options,
251
+ fileContent
252
+ });
253
+ }
254
+ async function uploadFile(options) {
255
+ const file = readUploadFile(options.file);
256
+ const filename = basename(options.file);
257
+ const rawContentType = options.contentType ?? inferWebUploadContentType(options.file);
258
+ const contentType = rawContentType.split(";")[0]?.trim().toLowerCase() ?? rawContentType;
259
+ const operationId = options.operationId ?? randomUUID();
260
+ const checksumSha256 = createHash("sha256").update(file.content).digest("hex");
261
+ const initialized = await initSlackFileUpload({
262
+ filename,
263
+ length: file.size,
264
+ canonical: {
265
+ operationId,
266
+ contentType,
267
+ checksumSha256,
268
+ channel: options.channel,
269
+ threadTs: options.thread,
270
+ title: options.title,
271
+ initialComment: options.comment
272
+ }
273
+ });
274
+ if ("fileId" in initialized) {
275
+ await uploadDirectlyToSlack(initialized, options, file.content);
276
+ return;
277
+ }
278
+ await publishCanonicalFile(initialized, options, contentType, file.content);
279
+ }
280
+ var uploadFileCommand = new Command().name("upload-file").description("Upload a file to a Slack channel as the bot").requiredOption("-f, --file <path>", "Local file path to upload").requiredOption("-c, --channel <id>", "Slack channel ID").option("--thread <ts>", "Thread timestamp to post as a reply").option("--title <title>", "Display title for the file").option("--comment <text>", "Initial comment to accompany the file").option("--content-type <mime>", "Override inferred content type").option("--operation-id <uuid>", "Reuse a failed upload operation").addHelpText(
116
281
  "after",
117
282
  `
118
283
  Examples:
@@ -122,47 +287,9 @@ Examples:
122
287
 
123
288
  Notes:
124
289
  - Uses the bot token (not user SLACK_TOKEN), so no files:write permission is needed
125
- - Returns file_id and permalink for reference`
126
- ).action(
127
- withErrorHandler(
128
- async (options) => {
129
- let fileSize;
130
- try {
131
- const stat = statSync(options.file);
132
- fileSize = stat.size;
133
- } catch {
134
- throw new Error(`File not found: ${options.file}`);
135
- }
136
- if (fileSize === 0) {
137
- throw new Error("File is empty");
138
- }
139
- const filename = basename(options.file);
140
- const { uploadUrl, fileId } = await initSlackFileUpload({
141
- filename,
142
- length: fileSize
143
- });
144
- const fileContent = readFileSync2(options.file);
145
- const uploadResponse = await fetch(uploadUrl, {
146
- method: "POST",
147
- body: fileContent
148
- });
149
- if (!uploadResponse.ok) {
150
- throw new Error(
151
- `File upload failed: ${uploadResponse.status} ${uploadResponse.statusText}`
152
- );
153
- }
154
- const result = await completeSlackFileUpload({
155
- fileId,
156
- channel: options.channel,
157
- threadTs: options.thread,
158
- title: options.title,
159
- initialComment: options.comment
160
- });
161
- console.log(source_default.green(`\u2713 File uploaded (file_id: ${result.fileId})`));
162
- console.log(source_default.dim(` permalink: ${result.permalink}`));
163
- }
164
- )
165
- );
290
+ - Run-scoped calls publish to VM0 storage before Slack delivery
291
+ - Returns canonical asset details and Slack delivery status`
292
+ ).action(withErrorHandler(uploadFile));
166
293
 
167
294
  // src/commands/zero/slack/download-file.ts
168
295
  init_esm_shims();
@@ -219,4 +346,4 @@ Examples:
219
346
  export {
220
347
  zeroSlackCommand
221
348
  };
222
- //# sourceMappingURL=slack-CXZCQ5HU.js.map
349
+ //# sourceMappingURL=slack-TLBZUY27.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/commands/zero/slack/index.ts","../src/commands/zero/slack/message/index.ts","../src/commands/zero/slack/message/send.ts","../src/commands/zero/slack/upload-file.ts","../src/commands/zero/slack/download-file.ts"],"sourcesContent":["import { Command } from \"commander\";\nimport { zeroSlackMessageCommand } from \"./message\";\nimport { uploadFileCommand } from \"./upload-file\";\nimport { downloadFileCommand } from \"./download-file\";\n\nexport const zeroSlackCommand = new Command()\n .name(\"slack\")\n .description(\n \"Send messages, upload files, and download files from Slack as the bot\",\n )\n .addCommand(zeroSlackMessageCommand)\n .addCommand(uploadFileCommand)\n .addCommand(downloadFileCommand)\n .addHelpText(\n \"after\",\n `\nExamples:\n Send a message: zero slack message send -c <channel-id> -t \"Hello!\"\n Reply in a thread: zero slack message send -c <channel-id> --thread <ts> -t \"reply\"\n Upload a file: zero slack upload-file -f /tmp/report.pdf -c <channel-id>\n Download a file: zero slack download-file <file-id> -o /tmp/out.png`,\n );\n","import { Command } from \"commander\";\nimport { sendCommand } from \"./send\";\n\nexport const zeroSlackMessageCommand = new Command()\n .name(\"message\")\n .description(\"Manage Slack messages\")\n .addCommand(sendCommand)\n .addHelpText(\n \"after\",\n `\nExamples:\n zero slack message send -c <channel-id> -t \"Hello!\"`,\n );\n","import { readFileSync } from \"fs\";\nimport { Command } from \"commander\";\nimport chalk from \"chalk\";\nimport { sendSlackMessage } from \"../../../../lib/api\";\nimport { withErrorHandler } from \"../../../../lib/command\";\n\nexport const sendCommand = new Command()\n .name(\"send\")\n .description(\"Send a message to a Slack channel or DM a user\")\n .option(\"-c, --channel <id>\", \"Channel ID\")\n .option(\"-u, --user <id>\", 'Slack user ID for DM (use \"me\" for yourself)')\n .option(\"-t, --text <message>\", \"Message text\")\n .option(\"--thread <ts>\", \"Thread timestamp for replies\")\n .option(\"--blocks <json>\", \"Block Kit JSON string\")\n .addHelpText(\n \"after\",\n `\nExamples:\n Simple message: zero slack message send -c C01234 -t \"Hello!\"\n DM a user: zero slack message send -u U0A8V9X98QJ -t \"Hello!\"\n DM yourself: zero slack message send -u me -t \"Hello!\"\n Reply in thread: zero slack message send -c C01234 --thread 1234567890.123456 -t \"reply\"\n Rich blocks: zero slack message send -c C01234 --blocks '[{\"type\":\"section\",\"text\":{\"type\":\"mrkdwn\",\"text\":\"*Bold*\"}}]'\n\nNotes:\n - Either --channel or --user is required; they are mutually exclusive\n - Either --text or --blocks is required; both can be used together`,\n )\n .action(\n withErrorHandler(\n async (options: {\n channel?: string;\n user?: string;\n text?: string;\n thread?: string;\n blocks?: string;\n }) => {\n let text = options.text;\n const { channel, user, thread, blocks: blocksStr } = options;\n\n // Validate mutual exclusion: exactly one of --channel or --user\n if (!channel && !user) {\n throw new Error(\"Either --channel or --user must be provided\", {\n cause: new Error(\n 'Usage: zero slack message send -c CHANNEL_ID -t \"your message\"\\n zero slack message send -u USER_ID -t \"your message\"',\n ),\n });\n }\n if (channel && user) {\n throw new Error(\"--channel and --user are mutually exclusive\", {\n cause: new Error(\n \"Provide either --channel to send to a channel or --user to DM a user, not both\",\n ),\n });\n }\n\n // Read from stdin if text not provided and stdin is not a TTY\n // (isTTY is true only for an interactive terminal, undefined when piped).\n if (!text && !process.stdin.isTTY) {\n try {\n text = readFileSync(\"/dev/stdin\", \"utf8\").trim();\n } catch {\n // stdin not readable (e.g. test runner with no piped input);\n // fall through to the missing-text validation below.\n }\n }\n\n // Parse blocks JSON if provided\n let blocks: Array<{ type: string; [key: string]: unknown }> | undefined;\n if (blocksStr) {\n try {\n blocks = JSON.parse(blocksStr) as Array<{\n type: string;\n [key: string]: unknown;\n }>;\n } catch {\n throw new Error(\"Invalid JSON for --blocks flag\", {\n cause: new Error(\n \"Provide a valid JSON array of Block Kit blocks\",\n ),\n });\n }\n }\n\n // Validate at least one of text or blocks\n if (!text && !blocks) {\n throw new Error(\"Either --text or --blocks must be provided\", {\n cause: new Error(\n 'Usage: zero slack message send -c CHANNEL_ID -t \"your message\"',\n ),\n });\n }\n\n const result = await sendSlackMessage({\n channel: channel || undefined,\n user: user || undefined,\n text: text || undefined,\n threadTs: thread,\n blocks,\n });\n\n const tsInfo = result.ts ? ` (ts: ${result.ts})` : \"\";\n console.log(chalk.green(`✓ Message sent${tsInfo}`));\n },\n ),\n );\n","import { createHash, randomUUID } from \"node:crypto\";\nimport { statSync, readFileSync } from \"fs\";\nimport { basename } from \"path\";\nimport { Command } from \"commander\";\nimport chalk from \"chalk\";\nimport type {\n SlackUploadInitResponse,\n SlackUploadMaterializeResponse,\n} from \"@vm0/api-contracts/contracts/integrations\";\nimport {\n completeSlackFileUpload,\n inferWebUploadContentType,\n initSlackFileUpload,\n materializeSlackFileUpload,\n} from \"../../../lib/api\";\nimport { withErrorHandler } from \"../../../lib/command\";\n\ninterface UploadFileOptions {\n readonly file: string;\n readonly channel: string;\n readonly thread?: string;\n readonly title?: string;\n readonly comment?: string;\n readonly contentType?: string;\n readonly operationId?: string;\n}\n\ntype DirectUploadInitialization = Extract<\n SlackUploadInitResponse,\n { fileId: string }\n>;\ntype CanonicalUploadInitialization = Extract<\n SlackUploadInitResponse,\n { kind: \"canonical\" }\n>;\ntype PendingSlackDelivery = Extract<\n SlackUploadMaterializeResponse[\"delivery\"],\n { status: \"pending\" }\n>;\n\nfunction readUploadFile(path: string): {\n readonly content: Buffer;\n readonly size: number;\n} {\n let size: number;\n try {\n size = statSync(path).size;\n } catch {\n throw new Error(`File not found: ${path}`);\n }\n if (size === 0) {\n throw new Error(\"File is empty\");\n }\n return { content: readFileSync(path), size };\n}\n\nfunction warnDeliveryRetry(operationId: string): void {\n console.warn(chalk.dim(` Retry with --operation-id ${operationId}`));\n}\n\nasync function uploadDirectlyToSlack(\n initialized: DirectUploadInitialization,\n options: UploadFileOptions,\n fileContent: Buffer,\n): Promise<void> {\n const uploadResponse = await fetch(initialized.uploadUrl, {\n method: \"POST\",\n body: fileContent,\n });\n if (!uploadResponse.ok) {\n throw new Error(\n `File upload failed: ${uploadResponse.status} ${uploadResponse.statusText}`,\n );\n }\n const result = await completeSlackFileUpload({\n fileId: initialized.fileId,\n channel: options.channel,\n threadTs: options.thread,\n title: options.title,\n initialComment: options.comment,\n });\n console.log(chalk.green(`✓ File uploaded (file_id: ${result.fileId})`));\n console.log(chalk.dim(` permalink: ${result.permalink}`));\n}\n\nasync function uploadCanonicalBody(\n initialized: CanonicalUploadInitialization,\n contentType: string,\n fileContent: Buffer,\n): Promise<void> {\n if (!initialized.uploadUrl) {\n return;\n }\n const uploadResponse = await fetch(initialized.uploadUrl, {\n method: \"PUT\",\n headers: { \"Content-Type\": contentType },\n body: fileContent,\n });\n if (!uploadResponse.ok) {\n throw new Error(\n `Canonical file upload failed: ${uploadResponse.status} ${uploadResponse.statusText}`,\n );\n }\n}\n\nasync function uploadPendingSlackBody(\n delivery: PendingSlackDelivery,\n fileContent: Buffer,\n): Promise<string | undefined> {\n try {\n const uploadResponse = await fetch(delivery.uploadUrl, {\n method: \"POST\",\n body: fileContent,\n });\n if (!uploadResponse.ok) {\n return `Slack upload failed: ${uploadResponse.status} ${uploadResponse.statusText}`;\n }\n return undefined;\n } catch (error) {\n return error instanceof Error ? error.message : \"Slack upload failed\";\n }\n}\n\nasync function completeCanonicalSlackDelivery(args: {\n readonly initialized: CanonicalUploadInitialization;\n readonly delivery: PendingSlackDelivery;\n readonly options: UploadFileOptions;\n readonly fileContent: Buffer;\n}): Promise<void> {\n const uploadError = await uploadPendingSlackBody(\n args.delivery,\n args.fileContent,\n );\n let result: Awaited<ReturnType<typeof completeSlackFileUpload>>;\n try {\n result = await completeSlackFileUpload({\n fileId: args.delivery.fileId,\n channel: args.options.channel,\n ...(args.options.thread ? { threadTs: args.options.thread } : {}),\n ...(args.options.title ? { title: args.options.title } : {}),\n ...(args.options.comment ? { initialComment: args.options.comment } : {}),\n canonicalAssetId: args.initialized.assetId,\n operationId: args.initialized.operationId,\n ...(uploadError ? { uploadError } : {}),\n });\n } catch (error) {\n console.warn(\n chalk.yellow(\n `⚠ Slack delivery status could not be recorded: ${\n error instanceof Error ? error.message : \"Unknown error\"\n }`,\n ),\n );\n warnDeliveryRetry(args.initialized.operationId);\n return;\n }\n if (result.deliveryStatus === \"failed\") {\n console.warn(\n chalk.yellow(\n `⚠ Slack delivery failed: ${result.deliveryError ?? \"Unknown error\"}`,\n ),\n );\n warnDeliveryRetry(args.initialized.operationId);\n return;\n }\n console.log(chalk.green(`✓ Delivered to Slack (file_id: ${result.fileId})`));\n console.log(chalk.dim(` permalink: ${result.permalink}`));\n}\n\nasync function publishCanonicalFile(\n initialized: CanonicalUploadInitialization,\n options: UploadFileOptions,\n contentType: string,\n fileContent: Buffer,\n): Promise<void> {\n await uploadCanonicalBody(initialized, contentType, fileContent);\n const materialized = await materializeSlackFileUpload({\n assetId: initialized.assetId,\n operationId: initialized.operationId,\n });\n console.log(\n chalk.green(`✓ File published (asset_id: ${materialized.assetId})`),\n );\n console.log(chalk.dim(` url: ${materialized.url}`));\n\n if (materialized.delivery.status === \"delivered\") {\n console.log(\n chalk.green(\n `✓ Delivered to Slack (file_id: ${materialized.delivery.fileId})`,\n ),\n );\n console.log(chalk.dim(` permalink: ${materialized.delivery.permalink}`));\n return;\n }\n if (materialized.delivery.status === \"failed\") {\n console.warn(\n chalk.yellow(`⚠ Slack delivery failed: ${materialized.delivery.message}`),\n );\n warnDeliveryRetry(initialized.operationId);\n return;\n }\n await completeCanonicalSlackDelivery({\n initialized,\n delivery: materialized.delivery,\n options,\n fileContent,\n });\n}\n\nasync function uploadFile(options: UploadFileOptions): Promise<void> {\n const file = readUploadFile(options.file);\n const filename = basename(options.file);\n const rawContentType =\n options.contentType ?? inferWebUploadContentType(options.file);\n const contentType =\n rawContentType.split(\";\")[0]?.trim().toLowerCase() ?? rawContentType;\n const operationId = options.operationId ?? randomUUID();\n const checksumSha256 = createHash(\"sha256\")\n .update(file.content)\n .digest(\"hex\");\n const initialized = await initSlackFileUpload({\n filename,\n length: file.size,\n canonical: {\n operationId,\n contentType,\n checksumSha256,\n channel: options.channel,\n threadTs: options.thread,\n title: options.title,\n initialComment: options.comment,\n },\n });\n\n if (\"fileId\" in initialized) {\n await uploadDirectlyToSlack(initialized, options, file.content);\n return;\n }\n await publishCanonicalFile(initialized, options, contentType, file.content);\n}\n\nexport const uploadFileCommand = new Command()\n .name(\"upload-file\")\n .description(\"Upload a file to a Slack channel as the bot\")\n .requiredOption(\"-f, --file <path>\", \"Local file path to upload\")\n .requiredOption(\"-c, --channel <id>\", \"Slack channel ID\")\n .option(\"--thread <ts>\", \"Thread timestamp to post as a reply\")\n .option(\"--title <title>\", \"Display title for the file\")\n .option(\"--comment <text>\", \"Initial comment to accompany the file\")\n .option(\"--content-type <mime>\", \"Override inferred content type\")\n .option(\"--operation-id <uuid>\", \"Reuse a failed upload operation\")\n .addHelpText(\n \"after\",\n `\nExamples:\n Upload a file: zero slack upload-file -f /tmp/report.pdf -c C01234\n Upload to thread: zero slack upload-file -f /tmp/log.txt -c C01234 --thread 1234567890.123456\n With title and comment: zero slack upload-file -f /tmp/data.csv -c C01234 --title \"Daily Report\" --comment \"Here's the report\"\n\nNotes:\n - Uses the bot token (not user SLACK_TOKEN), so no files:write permission is needed\n - Run-scoped calls publish to VM0 storage before Slack delivery\n - Returns canonical asset details and Slack delivery status`,\n )\n .action(withErrorHandler(uploadFile));\n","import { basename, join } from \"path\";\nimport { tmpdir } from \"os\";\nimport { Command } from \"commander\";\nimport { downloadSlackFile } from \"../../../lib/api\";\nimport { withErrorHandler } from \"../../../lib/command\";\n\n/**\n * Derive a local output path for a Slack file id.\n * Uses the system temp directory; extension is appended later once the\n * mimetype is known.\n *\n * `basename` strips any path separators from `fileId` so a hostile id like\n * `../etc/passwd` cannot escape `tmpdir()`.\n */\nfunction defaultOutPath(fileId: string): string {\n return join(tmpdir(), `slack-${basename(fileId)}`);\n}\n\nexport const downloadFileCommand = new Command()\n .name(\"download-file\")\n .description(\"Download a Slack file by id using the bot token\")\n .argument(\"<file-id>\", \"Slack file id (e.g. F01234ABCD)\")\n .option(\n \"-o, --out <path>\",\n \"Output path for the downloaded file (default: /tmp/slack-<file-id>)\",\n )\n .addHelpText(\n \"after\",\n `\nExamples:\n Download to default temp path: zero slack download-file F01234ABCD\n Download to explicit path: zero slack download-file F01234ABCD -o /tmp/image.png\n\nOutput:\n Prints a JSON object to stdout on success:\n {\"path\":\"/tmp/slack-F01234ABCD\",\"mimetype\":\"image/png\",\"size\":12345}\n\nHow to read the downloaded file:\n - Images (png/jpg/gif/webp/svg): open the file path with your image viewing tool\n - Videos (mp4/mov/webm): transcribe audio first with\n zero video transcribe --url <download-url>\n or extract frames with\n ffmpeg -i <path> -vf \"fps=1\" -q:v 2 /tmp/<file-id>_frame_%03d.jpg\n - PDF/text/csv/json/markdown: read the file directly\n\nNotes:\n - Uses the bot token on the server side; no user Slack token is needed\n - Streams the file bytes directly to disk`,\n )\n .action(\n withErrorHandler(async (fileId: string, options: { out?: string }) => {\n const outPath = options.out ?? defaultOutPath(fileId);\n const result = await downloadSlackFile(fileId, outPath);\n console.log(JSON.stringify(result));\n }),\n );\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;ACAA;;;ACAA;AAAA,SAAS,oBAAoB;AAMtB,IAAM,cAAc,IAAI,QAAQ,EACpC,KAAK,MAAM,EACX,YAAY,gDAAgD,EAC5D,OAAO,sBAAsB,YAAY,EACzC,OAAO,mBAAmB,8CAA8C,EACxE,OAAO,wBAAwB,cAAc,EAC7C,OAAO,iBAAiB,8BAA8B,EACtD,OAAO,mBAAmB,uBAAuB,EACjD;AAAA,EACC;AAAA,EACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWF,EACC;AAAA,EACC;AAAA,IACE,OAAO,YAMD;AACJ,UAAI,OAAO,QAAQ;AACnB,YAAM,EAAE,SAAS,MAAM,QAAQ,QAAQ,UAAU,IAAI;AAGrD,UAAI,CAAC,WAAW,CAAC,MAAM;AACrB,cAAM,IAAI,MAAM,+CAA+C;AAAA,UAC7D,OAAO,IAAI;AAAA,YACT;AAAA,UACF;AAAA,QACF,CAAC;AAAA,MACH;AACA,UAAI,WAAW,MAAM;AACnB,cAAM,IAAI,MAAM,+CAA+C;AAAA,UAC7D,OAAO,IAAI;AAAA,YACT;AAAA,UACF;AAAA,QACF,CAAC;AAAA,MACH;AAIA,UAAI,CAAC,QAAQ,CAAC,QAAQ,MAAM,OAAO;AACjC,YAAI;AACF,iBAAO,aAAa,cAAc,MAAM,EAAE,KAAK;AAAA,QACjD,QAAQ;AAAA,QAGR;AAAA,MACF;AAGA,UAAI;AACJ,UAAI,WAAW;AACb,YAAI;AACF,mBAAS,KAAK,MAAM,SAAS;AAAA,QAI/B,QAAQ;AACN,gB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;AAAA;AAAA;AAAA;AAMF;","names":["readFileSync","readFileSync","basename","basename"]}
@@ -6,14 +6,14 @@ import {
6
6
  downloadTeamsFile,
7
7
  initTeamsFileUpload,
8
8
  sendTeamsMessage
9
- } from "./chunk-PP2JWZSG.js";
10
- import "./chunk-BRSUIBNM.js";
9
+ } from "./chunk-FBISVSTZ.js";
10
+ import "./chunk-OAESJHRL.js";
11
11
  import "./chunk-SB7EZ2ZO.js";
12
12
  import {
13
13
  source_default,
14
14
  withErrorHandler
15
- } from "./chunk-4GD76EQ4.js";
16
- import "./chunk-4CCCO3QU.js";
15
+ } from "./chunk-7NPYHUEQ.js";
16
+ import "./chunk-DK3C2ME6.js";
17
17
  import {
18
18
  Command
19
19
  } from "./chunk-LD4ZVU4O.js";
@@ -280,4 +280,4 @@ Examples:
280
280
  export {
281
281
  zeroTeamsCommand
282
282
  };
283
- //# sourceMappingURL=teams-CGDBFXQ2.js.map
283
+ //# sourceMappingURL=teams-ZKQMACHI.js.map
@@ -7,14 +7,14 @@ import {
7
7
  initTelegramFileUpload,
8
8
  listTelegramBots,
9
9
  sendTelegramMessage
10
- } from "./chunk-PP2JWZSG.js";
11
- import "./chunk-BRSUIBNM.js";
10
+ } from "./chunk-FBISVSTZ.js";
11
+ import "./chunk-OAESJHRL.js";
12
12
  import "./chunk-SB7EZ2ZO.js";
13
13
  import {
14
14
  source_default,
15
15
  withErrorHandler
16
- } from "./chunk-4GD76EQ4.js";
17
- import "./chunk-4CCCO3QU.js";
16
+ } from "./chunk-7NPYHUEQ.js";
17
+ import "./chunk-DK3C2ME6.js";
18
18
  import {
19
19
  Command
20
20
  } from "./chunk-LD4ZVU4O.js";
@@ -334,4 +334,4 @@ Examples:
334
334
  export {
335
335
  zeroTelegramCommand
336
336
  };
337
- //# sourceMappingURL=telegram-SCGQFOYI.js.map
337
+ //# sourceMappingURL=telegram-J4ZWDUEB.js.map
@@ -6,13 +6,13 @@ import {
6
6
  } from "./chunk-W75R7EZF.js";
7
7
  import {
8
8
  getPlatformOrigin
9
- } from "./chunk-6AKLTZUH.js";
9
+ } from "./chunk-7QTOTACG.js";
10
10
  import "./chunk-SB7EZ2ZO.js";
11
11
  import {
12
12
  source_default,
13
13
  withErrorHandler
14
- } from "./chunk-4GD76EQ4.js";
15
- import "./chunk-4CCCO3QU.js";
14
+ } from "./chunk-7NPYHUEQ.js";
15
+ import "./chunk-DK3C2ME6.js";
16
16
  import {
17
17
  Command,
18
18
  InvalidArgumentError
@@ -47,4 +47,4 @@ Output:
47
47
  export {
48
48
  zeroUpgradeCommand
49
49
  };
50
- //# sourceMappingURL=upgrade-3LEF7WD7.js.map
50
+ //# sourceMappingURL=upgrade-UBEBOHV6.js.map
@@ -9,14 +9,14 @@ import {
9
9
  deleteZeroVariable,
10
10
  listZeroVariables,
11
11
  setZeroVariable
12
- } from "./chunk-PP2JWZSG.js";
13
- import "./chunk-BRSUIBNM.js";
12
+ } from "./chunk-FBISVSTZ.js";
13
+ import "./chunk-OAESJHRL.js";
14
14
  import "./chunk-SB7EZ2ZO.js";
15
15
  import {
16
16
  source_default,
17
17
  withErrorHandler
18
- } from "./chunk-4GD76EQ4.js";
19
- import "./chunk-4CCCO3QU.js";
18
+ } from "./chunk-7NPYHUEQ.js";
19
+ import "./chunk-DK3C2ME6.js";
20
20
  import {
21
21
  Command
22
22
  } from "./chunk-LD4ZVU4O.js";
@@ -116,4 +116,4 @@ var zeroVariableCommand = new Command().name("variable").description("Read or wr
116
116
  export {
117
117
  zeroVariableCommand
118
118
  };
119
- //# sourceMappingURL=variable-G6WZKJJG.js.map
119
+ //# sourceMappingURL=variable-4K5GUB4B.js.map
@@ -4,12 +4,12 @@ const require = __createRequire(import.meta.url);
4
4
  import {
5
5
  downloadWebFile,
6
6
  transcribeAudio
7
- } from "./chunk-BRSUIBNM.js";
7
+ } from "./chunk-OAESJHRL.js";
8
8
  import "./chunk-SB7EZ2ZO.js";
9
9
  import {
10
10
  withErrorHandler
11
- } from "./chunk-4GD76EQ4.js";
12
- import "./chunk-4CCCO3QU.js";
11
+ } from "./chunk-7NPYHUEQ.js";
12
+ import "./chunk-DK3C2ME6.js";
13
13
  import {
14
14
  Command
15
15
  } from "./chunk-LD4ZVU4O.js";
@@ -247,4 +247,4 @@ Tip (video understanding):
247
247
  export {
248
248
  zeroVideoCommand
249
249
  };
250
- //# sourceMappingURL=video-JKYPCENK.js.map
250
+ //# sourceMappingURL=video-5LENA5YA.js.map
@@ -3,14 +3,14 @@ import { createRequire as __createRequire } from "node:module";
3
3
  const require = __createRequire(import.meta.url);
4
4
  import {
5
5
  callZeroWeather
6
- } from "./chunk-PP2JWZSG.js";
7
- import "./chunk-BRSUIBNM.js";
6
+ } from "./chunk-FBISVSTZ.js";
7
+ import "./chunk-OAESJHRL.js";
8
8
  import "./chunk-SB7EZ2ZO.js";
9
9
  import {
10
10
  source_default,
11
11
  withErrorHandler
12
- } from "./chunk-4GD76EQ4.js";
13
- import "./chunk-4CCCO3QU.js";
12
+ } from "./chunk-7NPYHUEQ.js";
13
+ import "./chunk-DK3C2ME6.js";
14
14
  import {
15
15
  Command,
16
16
  InvalidArgumentError
@@ -588,4 +588,4 @@ Notes:
588
588
  export {
589
589
  zeroWeatherCommand
590
590
  };
591
- //# sourceMappingURL=weather-3WQV3JMX.js.map
591
+ //# sourceMappingURL=weather-UL4D4T3L.js.map
@@ -1,16 +1,16 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire as __createRequire } from "node:module";
3
3
  const require = __createRequire(import.meta.url);
4
- import "./chunk-PP2JWZSG.js";
4
+ import "./chunk-FBISVSTZ.js";
5
5
  import {
6
6
  downloadWebFile,
7
7
  uploadWebFile
8
- } from "./chunk-BRSUIBNM.js";
8
+ } from "./chunk-OAESJHRL.js";
9
9
  import "./chunk-SB7EZ2ZO.js";
10
10
  import {
11
11
  withErrorHandler
12
- } from "./chunk-4GD76EQ4.js";
13
- import "./chunk-4CCCO3QU.js";
12
+ } from "./chunk-7NPYHUEQ.js";
13
+ import "./chunk-DK3C2ME6.js";
14
14
  import {
15
15
  Command
16
16
  } from "./chunk-LD4ZVU4O.js";
@@ -107,4 +107,4 @@ Examples:
107
107
  export {
108
108
  zeroWebCommand
109
109
  };
110
- //# sourceMappingURL=web-3FRUHVEN.js.map
110
+ //# sourceMappingURL=web-6452PFF7.js.map
@@ -9,14 +9,14 @@ import {
9
9
  zeroWebSearchDomainSchema,
10
10
  zeroWebSearchRecencySchema,
11
11
  zeroWebSearchRequestSchema
12
- } from "./chunk-PP2JWZSG.js";
13
- import "./chunk-BRSUIBNM.js";
12
+ } from "./chunk-FBISVSTZ.js";
13
+ import "./chunk-OAESJHRL.js";
14
14
  import "./chunk-SB7EZ2ZO.js";
15
15
  import {
16
16
  source_default,
17
17
  withErrorHandler
18
- } from "./chunk-4GD76EQ4.js";
19
- import "./chunk-4CCCO3QU.js";
18
+ } from "./chunk-7NPYHUEQ.js";
19
+ import "./chunk-DK3C2ME6.js";
20
20
  import {
21
21
  Command,
22
22
  InvalidArgumentError,
@@ -148,4 +148,4 @@ Notes:
148
148
  export {
149
149
  zeroWebSearchCommand
150
150
  };
151
- //# sourceMappingURL=web-search-H6WV4RFE.js.map
151
+ //# sourceMappingURL=web-search-D5HGEWU5.js.map
@@ -4,16 +4,16 @@ const require = __createRequire(import.meta.url);
4
4
  import {
5
5
  loadConnectorPermissionInfos,
6
6
  policyIcon
7
- } from "./chunk-DLKSV2HZ.js";
7
+ } from "./chunk-KBUXPDDX.js";
8
8
  import {
9
9
  permissionGrantsToFirewallPolicies
10
- } from "./chunk-U3VV27JW.js";
10
+ } from "./chunk-CPJVE3HV.js";
11
11
  import {
12
12
  getZeroAgentUserConnectors,
13
13
  listZeroConnectors,
14
14
  listZeroUserPermissionGrants
15
- } from "./chunk-PP2JWZSG.js";
16
- import "./chunk-BRSUIBNM.js";
15
+ } from "./chunk-FBISVSTZ.js";
16
+ import "./chunk-OAESJHRL.js";
17
17
  import "./chunk-SB7EZ2ZO.js";
18
18
  import {
19
19
  getActiveOrg,
@@ -21,10 +21,10 @@ import {
21
21
  getToken,
22
22
  source_default,
23
23
  withErrorHandler
24
- } from "./chunk-4GD76EQ4.js";
24
+ } from "./chunk-7NPYHUEQ.js";
25
25
  import {
26
26
  decodeZeroTokenPayload
27
- } from "./chunk-4CCCO3QU.js";
27
+ } from "./chunk-DK3C2ME6.js";
28
28
  import {
29
29
  Command
30
30
  } from "./chunk-LD4ZVU4O.js";
@@ -196,4 +196,4 @@ Notes:
196
196
  export {
197
197
  zeroWhoamiCommand
198
198
  };
199
- //# sourceMappingURL=whoami-BMNW6CH3.js.map
199
+ //# sourceMappingURL=whoami-HYDZ6YSH.js.map
@@ -19,14 +19,14 @@ import {
19
19
  listWorkflows,
20
20
  updateWorkflow,
21
21
  updateWorkflowAutomation
22
- } from "./chunk-PP2JWZSG.js";
23
- import "./chunk-BRSUIBNM.js";
22
+ } from "./chunk-FBISVSTZ.js";
23
+ import "./chunk-OAESJHRL.js";
24
24
  import "./chunk-SB7EZ2ZO.js";
25
25
  import {
26
26
  source_default,
27
27
  withErrorHandler
28
- } from "./chunk-4GD76EQ4.js";
29
- import "./chunk-4CCCO3QU.js";
28
+ } from "./chunk-7NPYHUEQ.js";
29
+ import "./chunk-DK3C2ME6.js";
30
30
  import {
31
31
  Command
32
32
  } from "./chunk-LD4ZVU4O.js";
@@ -1957,4 +1957,4 @@ Examples:
1957
1957
  export {
1958
1958
  zeroWorkflowCommand
1959
1959
  };
1960
- //# sourceMappingURL=workflow-O6CVNJWM.js.map
1960
+ //# sourceMappingURL=workflow-W2HNGAVJ.js.map