@vm0/cli 9.251.0 → 9.252.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{agent-3IQFM2KY.js → agent-DJY6SYVC.js} +7 -7
- package/{banking-EYUWBTLB.js → banking-SV5ZIH44.js} +5 -5
- package/{chat-S7Z2SOGU.js → chat-G2KQYYK5.js} +6 -6
- package/{chunk-KVNHL3NQ.js → chunk-AWLNHCAC.js} +4 -4
- package/{chunk-THDGMML6.js → chunk-BKSVVARX.js} +2 -2
- package/{chunk-2USAOUQI.js → chunk-BSDS7GCS.js} +5 -4
- package/chunk-BSDS7GCS.js.map +1 -0
- package/{chunk-5CVPQC2F.js → chunk-CUAL7MH6.js} +2 -2
- package/{chunk-K3F4FDYI.js → chunk-DK3C2ME6.js} +14 -3
- package/chunk-DK3C2ME6.js.map +1 -0
- package/{chunk-CGLTWZX7.js → chunk-E2DKMMGY.js} +3 -3
- package/{chunk-OJM5IFC3.js → chunk-I56DJKTX.js} +3 -7
- package/chunk-I56DJKTX.js.map +1 -0
- package/{chunk-H46N52S6.js → chunk-IX2GN2TI.js} +2 -2
- package/{chunk-ZSP7ISNV.js → chunk-QL2BWE6J.js} +390 -20
- package/chunk-QL2BWE6J.js.map +1 -0
- package/{chunk-WIO4VCT5.js → chunk-RGHA7C2O.js} +2 -2
- package/{chunk-QHG7ITIT.js → chunk-TRFIH4R5.js} +2 -2
- package/{computer-use-ZI4I63OA.js → computer-use-FUBM53XG.js} +5 -5
- package/{connector-JEISK7OP.js → connector-3GCLB6HW.js} +8 -8
- package/{credit-DZLGKM5H.js → credit-SXRYMKSD.js} +7 -7
- package/{developer-support-GKND4K5Y.js → developer-support-LQHWOQLY.js} +5 -5
- package/{doctor-IDEBPM3X.js → doctor-RVC32BKE.js} +7 -7
- package/feishu-62E2QMM5.js +277 -0
- package/feishu-62E2QMM5.js.map +1 -0
- package/{finance-QRFJGKEW.js → finance-HP4WFZUY.js} +5 -5
- package/{generate-SDDS6YWC.js → generate-PTBOIM6B.js} +7 -7
- package/{github-6KEMKHRG.js → github-62XSFEWF.js} +5 -5
- package/{goal-5ER7N3Z3.js → goal-VRWB2AS3.js} +5 -5
- package/{host-JYOXNY2B.js → host-OKISPSSS.js} +5 -5
- package/{logs-7AGKFCY3.js → logs-53CMUU4J.js} +6 -6
- package/{mail-LJKDHK2A.js → mail-E6R5V6F6.js} +7 -7
- package/{maps-HRMZ7QBC.js → maps-B7F3CODU.js} +5 -5
- package/{model-RXY3MPL4.js → model-2VZQVFTE.js} +6 -6
- package/{model-provider-HYLOR2WF.js → model-provider-XALJ5BZB.js} +6 -6
- package/{org-FKZQ7WF6.js → org-JIAZYZUL.js} +5 -5
- package/package.json +1 -1
- package/{people-search-444TQMDB.js → people-search-LZ2BRXA6.js} +5 -5
- package/{phone-OI2MXOHO.js → phone-MXUV3YD3.js} +5 -5
- package/{preference-MQYZJ7R3.js → preference-LONJZKPE.js} +5 -5
- package/{resource-RVZZU2ZM.js → resource-26IQ2JCS.js} +5 -5
- package/{scrape-MLGY4WK2.js → scrape-H2ZA5AJD.js} +5 -5
- package/{search-PPAN6ZHY.js → search-R62IJFT4.js} +6 -6
- package/{secret-HIYUWKY4.js → secret-PHZZWEE3.js} +5 -5
- package/{slack-QDR4X4V7.js → slack-DQJUJIWY.js} +174 -47
- package/slack-DQJUJIWY.js.map +1 -0
- package/{teams-K6YHGEVC.js → teams-B5NDIX3U.js} +5 -5
- package/{telegram-LHBCOVZP.js → telegram-R67CYOON.js} +5 -5
- package/{upgrade-KM4H4ARY.js → upgrade-FJKXJO6L.js} +4 -4
- package/{variable-ULJ4EFHR.js → variable-GNCE5TUG.js} +5 -5
- package/{video-P26LRUFN.js → video-UDPAFI36.js} +4 -4
- package/{weather-DMUJWZDC.js → weather-O6L5SALA.js} +5 -5
- package/{web-ESXMLMEC.js → web-6I5S773Q.js} +5 -5
- package/{web-search-QCZNJGMG.js → web-search-GQAKFVCC.js} +5 -5
- package/{whoami-4NVG5FI7.js → whoami-MEJV5DZB.js} +7 -7
- package/{workflow-G7DL7SCF.js → workflow-PEVNMY2N.js} +5 -5
- package/zero.js +42 -42
- package/chunk-2USAOUQI.js.map +0 -1
- package/chunk-K3F4FDYI.js.map +0 -1
- package/chunk-OJM5IFC3.js.map +0 -1
- package/chunk-ZSP7ISNV.js.map +0 -1
- package/feishu-HUX5DNAS.js +0 -119
- package/feishu-HUX5DNAS.js.map +0 -1
- package/slack-QDR4X4V7.js.map +0 -1
- /package/{agent-3IQFM2KY.js.map → agent-DJY6SYVC.js.map} +0 -0
- /package/{banking-EYUWBTLB.js.map → banking-SV5ZIH44.js.map} +0 -0
- /package/{chat-S7Z2SOGU.js.map → chat-G2KQYYK5.js.map} +0 -0
- /package/{chunk-KVNHL3NQ.js.map → chunk-AWLNHCAC.js.map} +0 -0
- /package/{chunk-THDGMML6.js.map → chunk-BKSVVARX.js.map} +0 -0
- /package/{chunk-5CVPQC2F.js.map → chunk-CUAL7MH6.js.map} +0 -0
- /package/{chunk-CGLTWZX7.js.map → chunk-E2DKMMGY.js.map} +0 -0
- /package/{chunk-H46N52S6.js.map → chunk-IX2GN2TI.js.map} +0 -0
- /package/{chunk-WIO4VCT5.js.map → chunk-RGHA7C2O.js.map} +0 -0
- /package/{chunk-QHG7ITIT.js.map → chunk-TRFIH4R5.js.map} +0 -0
- /package/{computer-use-ZI4I63OA.js.map → computer-use-FUBM53XG.js.map} +0 -0
- /package/{connector-JEISK7OP.js.map → connector-3GCLB6HW.js.map} +0 -0
- /package/{credit-DZLGKM5H.js.map → credit-SXRYMKSD.js.map} +0 -0
- /package/{developer-support-GKND4K5Y.js.map → developer-support-LQHWOQLY.js.map} +0 -0
- /package/{doctor-IDEBPM3X.js.map → doctor-RVC32BKE.js.map} +0 -0
- /package/{finance-QRFJGKEW.js.map → finance-HP4WFZUY.js.map} +0 -0
- /package/{generate-SDDS6YWC.js.map → generate-PTBOIM6B.js.map} +0 -0
- /package/{github-6KEMKHRG.js.map → github-62XSFEWF.js.map} +0 -0
- /package/{goal-5ER7N3Z3.js.map → goal-VRWB2AS3.js.map} +0 -0
- /package/{host-JYOXNY2B.js.map → host-OKISPSSS.js.map} +0 -0
- /package/{logs-7AGKFCY3.js.map → logs-53CMUU4J.js.map} +0 -0
- /package/{mail-LJKDHK2A.js.map → mail-E6R5V6F6.js.map} +0 -0
- /package/{maps-HRMZ7QBC.js.map → maps-B7F3CODU.js.map} +0 -0
- /package/{model-RXY3MPL4.js.map → model-2VZQVFTE.js.map} +0 -0
- /package/{model-provider-HYLOR2WF.js.map → model-provider-XALJ5BZB.js.map} +0 -0
- /package/{org-FKZQ7WF6.js.map → org-JIAZYZUL.js.map} +0 -0
- /package/{people-search-444TQMDB.js.map → people-search-LZ2BRXA6.js.map} +0 -0
- /package/{phone-OI2MXOHO.js.map → phone-MXUV3YD3.js.map} +0 -0
- /package/{preference-MQYZJ7R3.js.map → preference-LONJZKPE.js.map} +0 -0
- /package/{resource-RVZZU2ZM.js.map → resource-26IQ2JCS.js.map} +0 -0
- /package/{scrape-MLGY4WK2.js.map → scrape-H2ZA5AJD.js.map} +0 -0
- /package/{search-PPAN6ZHY.js.map → search-R62IJFT4.js.map} +0 -0
- /package/{secret-HIYUWKY4.js.map → secret-PHZZWEE3.js.map} +0 -0
- /package/{teams-K6YHGEVC.js.map → teams-B5NDIX3U.js.map} +0 -0
- /package/{telegram-LHBCOVZP.js.map → telegram-R67CYOON.js.map} +0 -0
- /package/{upgrade-KM4H4ARY.js.map → upgrade-FJKXJO6L.js.map} +0 -0
- /package/{variable-ULJ4EFHR.js.map → variable-GNCE5TUG.js.map} +0 -0
- /package/{video-P26LRUFN.js.map → video-UDPAFI36.js.map} +0 -0
- /package/{weather-DMUJWZDC.js.map → weather-O6L5SALA.js.map} +0 -0
- /package/{web-ESXMLMEC.js.map → web-6I5S773Q.js.map} +0 -0
- /package/{web-search-QCZNJGMG.js.map → web-search-GQAKFVCC.js.map} +0 -0
- /package/{whoami-4NVG5FI7.js.map → whoami-MEJV5DZB.js.map} +0 -0
- /package/{workflow-G7DL7SCF.js.map → workflow-PEVNMY2N.js.map} +0 -0
|
@@ -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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;AAAA,EACC;AAAA,EACA;AACF,EACC;AAAA,EACC;AAAA,EACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBF,EACC;AAAA,EACC,iBAAiB,OAAO,QAAgB,YAA8B;AACpE,UAAM,UAAU,QAAQ,OAAO,eAAe,MAAM;AACpD,UAAM,SAAS,MAAM,kBAAkB,QAAQ,OAAO;AACtD,YAAQ,IAAI,KAAK,UAAU,MAAM,CAAC;AAAA,EACpC,CAAC;AACH;;;AJlDK,IAAM,mBAAmB,IAAI,QAAQ,EACzC,KAAK,OAAO,EACZ;AAAA,EACC;AACF,EACC,WAAW,uBAAuB,EAClC,WAAW,iBAAiB,EAC5B,WAAW,mBAAmB,EAC9B;AAAA,EACC;AAAA,EACA;AAAA;AAAA;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-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-QL2BWE6J.js";
|
|
10
|
+
import "./chunk-BSDS7GCS.js";
|
|
11
11
|
import "./chunk-SB7EZ2ZO.js";
|
|
12
12
|
import {
|
|
13
13
|
source_default,
|
|
14
14
|
withErrorHandler
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
15
|
+
} from "./chunk-E2DKMMGY.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-
|
|
283
|
+
//# sourceMappingURL=teams-B5NDIX3U.js.map
|
|
@@ -7,14 +7,14 @@ import {
|
|
|
7
7
|
initTelegramFileUpload,
|
|
8
8
|
listTelegramBots,
|
|
9
9
|
sendTelegramMessage
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-QL2BWE6J.js";
|
|
11
|
+
import "./chunk-BSDS7GCS.js";
|
|
12
12
|
import "./chunk-SB7EZ2ZO.js";
|
|
13
13
|
import {
|
|
14
14
|
source_default,
|
|
15
15
|
withErrorHandler
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-E2DKMMGY.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-
|
|
337
|
+
//# sourceMappingURL=telegram-R67CYOON.js.map
|
|
@@ -6,13 +6,13 @@ import {
|
|
|
6
6
|
} from "./chunk-W75R7EZF.js";
|
|
7
7
|
import {
|
|
8
8
|
getPlatformOrigin
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-RGHA7C2O.js";
|
|
10
10
|
import "./chunk-SB7EZ2ZO.js";
|
|
11
11
|
import {
|
|
12
12
|
source_default,
|
|
13
13
|
withErrorHandler
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-E2DKMMGY.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-
|
|
50
|
+
//# sourceMappingURL=upgrade-FJKXJO6L.js.map
|
|
@@ -9,14 +9,14 @@ import {
|
|
|
9
9
|
deleteZeroVariable,
|
|
10
10
|
listZeroVariables,
|
|
11
11
|
setZeroVariable
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-QL2BWE6J.js";
|
|
13
|
+
import "./chunk-BSDS7GCS.js";
|
|
14
14
|
import "./chunk-SB7EZ2ZO.js";
|
|
15
15
|
import {
|
|
16
16
|
source_default,
|
|
17
17
|
withErrorHandler
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import "./chunk-
|
|
18
|
+
} from "./chunk-E2DKMMGY.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-
|
|
119
|
+
//# sourceMappingURL=variable-GNCE5TUG.js.map
|
|
@@ -4,12 +4,12 @@ const require = __createRequire(import.meta.url);
|
|
|
4
4
|
import {
|
|
5
5
|
downloadWebFile,
|
|
6
6
|
transcribeAudio
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-BSDS7GCS.js";
|
|
8
8
|
import "./chunk-SB7EZ2ZO.js";
|
|
9
9
|
import {
|
|
10
10
|
withErrorHandler
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-E2DKMMGY.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-
|
|
250
|
+
//# sourceMappingURL=video-UDPAFI36.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-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-QL2BWE6J.js";
|
|
7
|
+
import "./chunk-BSDS7GCS.js";
|
|
8
8
|
import "./chunk-SB7EZ2ZO.js";
|
|
9
9
|
import {
|
|
10
10
|
source_default,
|
|
11
11
|
withErrorHandler
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-E2DKMMGY.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-
|
|
591
|
+
//# sourceMappingURL=weather-O6L5SALA.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-
|
|
4
|
+
import "./chunk-QL2BWE6J.js";
|
|
5
5
|
import {
|
|
6
6
|
downloadWebFile,
|
|
7
7
|
uploadWebFile
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-BSDS7GCS.js";
|
|
9
9
|
import "./chunk-SB7EZ2ZO.js";
|
|
10
10
|
import {
|
|
11
11
|
withErrorHandler
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-E2DKMMGY.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-
|
|
110
|
+
//# sourceMappingURL=web-6I5S773Q.js.map
|
|
@@ -9,14 +9,14 @@ import {
|
|
|
9
9
|
zeroWebSearchDomainSchema,
|
|
10
10
|
zeroWebSearchRecencySchema,
|
|
11
11
|
zeroWebSearchRequestSchema
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-QL2BWE6J.js";
|
|
13
|
+
import "./chunk-BSDS7GCS.js";
|
|
14
14
|
import "./chunk-SB7EZ2ZO.js";
|
|
15
15
|
import {
|
|
16
16
|
source_default,
|
|
17
17
|
withErrorHandler
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import "./chunk-
|
|
18
|
+
} from "./chunk-E2DKMMGY.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-
|
|
151
|
+
//# sourceMappingURL=web-search-GQAKFVCC.js.map
|
|
@@ -4,16 +4,16 @@ const require = __createRequire(import.meta.url);
|
|
|
4
4
|
import {
|
|
5
5
|
loadConnectorPermissionInfos,
|
|
6
6
|
policyIcon
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-AWLNHCAC.js";
|
|
8
8
|
import {
|
|
9
9
|
permissionGrantsToFirewallPolicies
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-TRFIH4R5.js";
|
|
11
11
|
import {
|
|
12
12
|
getZeroAgentUserConnectors,
|
|
13
13
|
listZeroConnectors,
|
|
14
14
|
listZeroUserPermissionGrants
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
15
|
+
} from "./chunk-QL2BWE6J.js";
|
|
16
|
+
import "./chunk-BSDS7GCS.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-
|
|
24
|
+
} from "./chunk-E2DKMMGY.js";
|
|
25
25
|
import {
|
|
26
26
|
decodeZeroTokenPayload
|
|
27
|
-
} from "./chunk-
|
|
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-
|
|
199
|
+
//# sourceMappingURL=whoami-MEJV5DZB.js.map
|
|
@@ -19,14 +19,14 @@ import {
|
|
|
19
19
|
listWorkflows,
|
|
20
20
|
updateWorkflow,
|
|
21
21
|
updateWorkflowAutomation
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
import "./chunk-
|
|
22
|
+
} from "./chunk-QL2BWE6J.js";
|
|
23
|
+
import "./chunk-BSDS7GCS.js";
|
|
24
24
|
import "./chunk-SB7EZ2ZO.js";
|
|
25
25
|
import {
|
|
26
26
|
source_default,
|
|
27
27
|
withErrorHandler
|
|
28
|
-
} from "./chunk-
|
|
29
|
-
import "./chunk-
|
|
28
|
+
} from "./chunk-E2DKMMGY.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-
|
|
1960
|
+
//# sourceMappingURL=workflow-PEVNMY2N.js.map
|
package/zero.js
CHANGED
|
@@ -4,7 +4,7 @@ const require = __createRequire(import.meta.url);
|
|
|
4
4
|
import {
|
|
5
5
|
decodeZeroTokenPayload,
|
|
6
6
|
isFeatureEnabled
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-DK3C2ME6.js";
|
|
8
8
|
import {
|
|
9
9
|
Command
|
|
10
10
|
} from "./chunk-LD4ZVU4O.js";
|
|
@@ -60,7 +60,7 @@ if (DSN) {
|
|
|
60
60
|
Sentry.init({
|
|
61
61
|
dsn: DSN,
|
|
62
62
|
environment: process.env.SENTRY_ENVIRONMENT ?? "production",
|
|
63
|
-
release: "9.
|
|
63
|
+
release: "9.252.0",
|
|
64
64
|
sendDefaultPii: false,
|
|
65
65
|
tracesSampleRate: 0,
|
|
66
66
|
shutdownTimeout: 500,
|
|
@@ -79,7 +79,7 @@ if (DSN) {
|
|
|
79
79
|
}
|
|
80
80
|
});
|
|
81
81
|
Sentry.setContext("cli", {
|
|
82
|
-
version: "9.
|
|
82
|
+
version: "9.252.0",
|
|
83
83
|
command: process.argv.slice(2).join(" ")
|
|
84
84
|
});
|
|
85
85
|
Sentry.setContext("runtime", {
|
|
@@ -199,161 +199,161 @@ var ZERO_COMMAND_DEFINITIONS = [
|
|
|
199
199
|
name: "org",
|
|
200
200
|
description: "Manage organization settings, members, and providers",
|
|
201
201
|
load: async () => {
|
|
202
|
-
return (await import("./org-
|
|
202
|
+
return (await import("./org-JIAZYZUL.js")).zeroOrgCommand;
|
|
203
203
|
}
|
|
204
204
|
},
|
|
205
205
|
{
|
|
206
206
|
name: "model",
|
|
207
207
|
description: "List available models and model-switching guidance",
|
|
208
208
|
load: async () => {
|
|
209
|
-
return (await import("./model-
|
|
209
|
+
return (await import("./model-2VZQVFTE.js")).zeroModelCommand;
|
|
210
210
|
}
|
|
211
211
|
},
|
|
212
212
|
{
|
|
213
213
|
name: "model-provider",
|
|
214
214
|
description: "Inspect model provider routing",
|
|
215
215
|
load: async () => {
|
|
216
|
-
return (await import("./model-provider-
|
|
216
|
+
return (await import("./model-provider-XALJ5BZB.js")).zeroModelProviderCommand;
|
|
217
217
|
}
|
|
218
218
|
},
|
|
219
219
|
{
|
|
220
220
|
name: "agent",
|
|
221
221
|
description: "View or manage zero agents",
|
|
222
222
|
load: async () => {
|
|
223
|
-
return (await import("./agent-
|
|
223
|
+
return (await import("./agent-DJY6SYVC.js")).zeroAgentCommand;
|
|
224
224
|
}
|
|
225
225
|
},
|
|
226
226
|
{
|
|
227
227
|
name: "connector",
|
|
228
228
|
description: "Check third-party service connections (GitHub, Slack, etc.)",
|
|
229
229
|
load: async () => {
|
|
230
|
-
return (await import("./connector-
|
|
230
|
+
return (await import("./connector-3GCLB6HW.js")).zeroConnectorCommand;
|
|
231
231
|
}
|
|
232
232
|
},
|
|
233
233
|
{
|
|
234
234
|
name: "mail",
|
|
235
235
|
description: "Review and send mail through Gmail or Outlook Mail",
|
|
236
236
|
load: async () => {
|
|
237
|
-
return (await import("./mail-
|
|
237
|
+
return (await import("./mail-E6R5V6F6.js")).zeroMailCommand;
|
|
238
238
|
}
|
|
239
239
|
},
|
|
240
240
|
{
|
|
241
241
|
name: "credit",
|
|
242
242
|
description: "View or buy credits",
|
|
243
243
|
load: async () => {
|
|
244
|
-
return (await import("./credit-
|
|
244
|
+
return (await import("./credit-SXRYMKSD.js")).zeroCreditCommand;
|
|
245
245
|
}
|
|
246
246
|
},
|
|
247
247
|
{
|
|
248
248
|
name: "upgrade",
|
|
249
249
|
description: "Create a workspace plan upgrade link",
|
|
250
250
|
load: async () => {
|
|
251
|
-
return (await import("./upgrade-
|
|
251
|
+
return (await import("./upgrade-FJKXJO6L.js")).zeroUpgradeCommand;
|
|
252
252
|
}
|
|
253
253
|
},
|
|
254
254
|
{
|
|
255
255
|
name: "doctor",
|
|
256
256
|
description: "Diagnose runtime issues (connector health, permission denials)",
|
|
257
257
|
load: async () => {
|
|
258
|
-
return (await import("./doctor-
|
|
258
|
+
return (await import("./doctor-RVC32BKE.js")).zeroDoctorCommand;
|
|
259
259
|
}
|
|
260
260
|
},
|
|
261
261
|
{
|
|
262
262
|
name: "preference",
|
|
263
263
|
description: "View or update user preferences (timezone, notifications)",
|
|
264
264
|
load: async () => {
|
|
265
|
-
return (await import("./preference-
|
|
265
|
+
return (await import("./preference-LONJZKPE.js")).zeroPreferenceCommand;
|
|
266
266
|
}
|
|
267
267
|
},
|
|
268
268
|
{
|
|
269
269
|
name: "secret",
|
|
270
270
|
description: "Read or write secrets (API keys, tokens)",
|
|
271
271
|
load: async () => {
|
|
272
|
-
return (await import("./secret-
|
|
272
|
+
return (await import("./secret-PHZZWEE3.js")).zeroSecretCommand;
|
|
273
273
|
}
|
|
274
274
|
},
|
|
275
275
|
{
|
|
276
276
|
name: "github",
|
|
277
277
|
description: "Upload and download GitHub files",
|
|
278
278
|
load: async () => {
|
|
279
|
-
return (await import("./github-
|
|
279
|
+
return (await import("./github-62XSFEWF.js")).zeroGithubCommand;
|
|
280
280
|
}
|
|
281
281
|
},
|
|
282
282
|
{
|
|
283
283
|
name: "slack",
|
|
284
284
|
description: "Send messages, upload files, and download files from Slack as the bot",
|
|
285
285
|
load: async () => {
|
|
286
|
-
return (await import("./slack-
|
|
286
|
+
return (await import("./slack-DQJUJIWY.js")).zeroSlackCommand;
|
|
287
287
|
}
|
|
288
288
|
},
|
|
289
289
|
{
|
|
290
290
|
name: "feishu",
|
|
291
291
|
description: "Send messages to Feishu as an organization bot",
|
|
292
292
|
load: async () => {
|
|
293
|
-
return (await import("./feishu-
|
|
293
|
+
return (await import("./feishu-62E2QMM5.js")).zeroFeishuCommand;
|
|
294
294
|
}
|
|
295
295
|
},
|
|
296
296
|
{
|
|
297
297
|
name: "teams",
|
|
298
298
|
description: "Send Microsoft Teams messages, upload files, and download files",
|
|
299
299
|
load: async () => {
|
|
300
|
-
return (await import("./teams-
|
|
300
|
+
return (await import("./teams-B5NDIX3U.js")).zeroTeamsCommand;
|
|
301
301
|
}
|
|
302
302
|
},
|
|
303
303
|
{
|
|
304
304
|
name: "telegram",
|
|
305
305
|
description: "Inspect bots, send messages, upload files, and download files from Telegram",
|
|
306
306
|
load: async () => {
|
|
307
|
-
return (await import("./telegram-
|
|
307
|
+
return (await import("./telegram-R67CYOON.js")).zeroTelegramCommand;
|
|
308
308
|
}
|
|
309
309
|
},
|
|
310
310
|
{
|
|
311
311
|
name: "phone",
|
|
312
312
|
description: "Send AgentPhone messages, upload files, and download media",
|
|
313
313
|
load: async () => {
|
|
314
|
-
return (await import("./phone-
|
|
314
|
+
return (await import("./phone-MXUV3YD3.js")).zeroPhoneCommand;
|
|
315
315
|
}
|
|
316
316
|
},
|
|
317
317
|
{
|
|
318
318
|
name: "variable",
|
|
319
319
|
description: "Read or write non-sensitive configuration values",
|
|
320
320
|
load: async () => {
|
|
321
|
-
return (await import("./variable-
|
|
321
|
+
return (await import("./variable-GNCE5TUG.js")).zeroVariableCommand;
|
|
322
322
|
}
|
|
323
323
|
},
|
|
324
324
|
{
|
|
325
325
|
name: "logs",
|
|
326
326
|
description: "View and search agent run logs",
|
|
327
327
|
load: async () => {
|
|
328
|
-
return (await import("./logs-
|
|
328
|
+
return (await import("./logs-53CMUU4J.js")).zeroLogsCommand;
|
|
329
329
|
}
|
|
330
330
|
},
|
|
331
331
|
{
|
|
332
332
|
name: "search",
|
|
333
333
|
description: "Search logs, chat, or get a recipe for external sources",
|
|
334
334
|
load: async () => {
|
|
335
|
-
return (await import("./search-
|
|
335
|
+
return (await import("./search-R62IJFT4.js")).zeroSearchCommand;
|
|
336
336
|
}
|
|
337
337
|
},
|
|
338
338
|
{
|
|
339
339
|
name: "chat",
|
|
340
340
|
description: "Manage the current web chat thread",
|
|
341
341
|
load: async () => {
|
|
342
|
-
return (await import("./chat-
|
|
342
|
+
return (await import("./chat-G2KQYYK5.js")).zeroChatCommand;
|
|
343
343
|
}
|
|
344
344
|
},
|
|
345
345
|
{
|
|
346
346
|
name: "resource",
|
|
347
347
|
description: "Pull registry resources from private R2-backed archives",
|
|
348
348
|
load: async () => {
|
|
349
|
-
return (await import("./resource-
|
|
349
|
+
return (await import("./resource-26IQ2JCS.js")).zeroResourceCommand;
|
|
350
350
|
}
|
|
351
351
|
},
|
|
352
352
|
{
|
|
353
353
|
name: "whoami",
|
|
354
354
|
description: "Show agent identity, run ID, and capabilities",
|
|
355
355
|
load: async () => {
|
|
356
|
-
return (await import("./whoami-
|
|
356
|
+
return (await import("./whoami-MEJV5DZB.js")).zeroWhoamiCommand;
|
|
357
357
|
}
|
|
358
358
|
},
|
|
359
359
|
{
|
|
@@ -367,105 +367,105 @@ var ZERO_COMMAND_DEFINITIONS = [
|
|
|
367
367
|
name: "workflow",
|
|
368
368
|
description: "Manage workflows",
|
|
369
369
|
load: async () => {
|
|
370
|
-
return (await import("./workflow-
|
|
370
|
+
return (await import("./workflow-PEVNMY2N.js")).zeroWorkflowCommand;
|
|
371
371
|
}
|
|
372
372
|
},
|
|
373
373
|
{
|
|
374
374
|
name: "goal",
|
|
375
375
|
description: "Manage the current thread goal",
|
|
376
376
|
load: async () => {
|
|
377
|
-
return (await import("./goal-
|
|
377
|
+
return (await import("./goal-VRWB2AS3.js")).zeroGoalCommand;
|
|
378
378
|
}
|
|
379
379
|
},
|
|
380
380
|
{
|
|
381
381
|
name: "developer-support",
|
|
382
382
|
description: "Submit a diagnostic report to the dev team",
|
|
383
383
|
load: async () => {
|
|
384
|
-
return (await import("./developer-support-
|
|
384
|
+
return (await import("./developer-support-LQHWOQLY.js")).zeroDeveloperSupportCommand;
|
|
385
385
|
}
|
|
386
386
|
},
|
|
387
387
|
{
|
|
388
388
|
name: "computer-use",
|
|
389
389
|
description: "Desktop app computer use through Zero CLI",
|
|
390
390
|
load: async () => {
|
|
391
|
-
return (await import("./computer-use-
|
|
391
|
+
return (await import("./computer-use-FUBM53XG.js")).zeroComputerUseCommand;
|
|
392
392
|
}
|
|
393
393
|
},
|
|
394
394
|
{
|
|
395
395
|
name: "generate",
|
|
396
396
|
description: "Generate assets via vm0's built-in pipelines or get connector skill-invocation guidance",
|
|
397
397
|
load: async () => {
|
|
398
|
-
return (await import("./generate-
|
|
398
|
+
return (await import("./generate-PTBOIM6B.js")).generateCommand;
|
|
399
399
|
}
|
|
400
400
|
},
|
|
401
401
|
{
|
|
402
402
|
name: "web",
|
|
403
403
|
description: "Upload and download files via the web chat endpoint",
|
|
404
404
|
load: async () => {
|
|
405
|
-
return (await import("./web-
|
|
405
|
+
return (await import("./web-6I5S773Q.js")).zeroWebCommand;
|
|
406
406
|
}
|
|
407
407
|
},
|
|
408
408
|
{
|
|
409
409
|
name: "video",
|
|
410
410
|
description: "Video processing utilities",
|
|
411
411
|
load: async () => {
|
|
412
|
-
return (await import("./video-
|
|
412
|
+
return (await import("./video-UDPAFI36.js")).zeroVideoCommand;
|
|
413
413
|
}
|
|
414
414
|
},
|
|
415
415
|
{
|
|
416
416
|
name: "host",
|
|
417
417
|
description: "Publish static sites and clone owned hosted site files",
|
|
418
418
|
load: async () => {
|
|
419
|
-
return (await import("./host-
|
|
419
|
+
return (await import("./host-OKISPSSS.js")).zeroHostCommand;
|
|
420
420
|
}
|
|
421
421
|
},
|
|
422
422
|
{
|
|
423
423
|
name: "maps",
|
|
424
424
|
description: "Use managed zero maps services",
|
|
425
425
|
load: async () => {
|
|
426
|
-
return (await import("./maps-
|
|
426
|
+
return (await import("./maps-B7F3CODU.js")).zeroMapsCommand;
|
|
427
427
|
}
|
|
428
428
|
},
|
|
429
429
|
{
|
|
430
430
|
name: "weather",
|
|
431
431
|
description: "Use managed Zero weather services",
|
|
432
432
|
load: async () => {
|
|
433
|
-
return (await import("./weather-
|
|
433
|
+
return (await import("./weather-O6L5SALA.js")).zeroWeatherCommand;
|
|
434
434
|
}
|
|
435
435
|
},
|
|
436
436
|
{
|
|
437
437
|
name: "scrape",
|
|
438
438
|
description: "Scrape public web pages through managed zero scrape",
|
|
439
439
|
load: async () => {
|
|
440
|
-
return (await import("./scrape-
|
|
440
|
+
return (await import("./scrape-H2ZA5AJD.js")).zeroScrapeCommand;
|
|
441
441
|
}
|
|
442
442
|
},
|
|
443
443
|
{
|
|
444
444
|
name: "people-search",
|
|
445
445
|
description: "Find professionals through managed zero people search",
|
|
446
446
|
load: async () => {
|
|
447
|
-
return (await import("./people-search-
|
|
447
|
+
return (await import("./people-search-LZ2BRXA6.js")).zeroPeopleSearchCommand;
|
|
448
448
|
}
|
|
449
449
|
},
|
|
450
450
|
{
|
|
451
451
|
name: "web-search",
|
|
452
452
|
description: "Search the public web through managed zero web search",
|
|
453
453
|
load: async () => {
|
|
454
|
-
return (await import("./web-search-
|
|
454
|
+
return (await import("./web-search-GQAKFVCC.js")).zeroWebSearchCommand;
|
|
455
455
|
}
|
|
456
456
|
},
|
|
457
457
|
{
|
|
458
458
|
name: "finance",
|
|
459
459
|
description: "Query financial instruments through managed zero finance",
|
|
460
460
|
load: async () => {
|
|
461
|
-
return (await import("./finance-
|
|
461
|
+
return (await import("./finance-HP4WFZUY.js")).zeroFinanceCommand;
|
|
462
462
|
}
|
|
463
463
|
},
|
|
464
464
|
{
|
|
465
465
|
name: "banking",
|
|
466
466
|
description: "Use managed zero banking services",
|
|
467
467
|
load: async () => {
|
|
468
|
-
return (await import("./banking-
|
|
468
|
+
return (await import("./banking-SV5ZIH44.js")).zeroBankingCommand;
|
|
469
469
|
}
|
|
470
470
|
}
|
|
471
471
|
];
|
|
@@ -655,7 +655,7 @@ function registerZeroCommands(prog, commands, featureSwitchOverrides) {
|
|
|
655
655
|
var program = new Command();
|
|
656
656
|
program.name("zero").description(
|
|
657
657
|
"Zero CLI \u2014 interact with the zero platform from inside the sandbox"
|
|
658
|
-
).version("9.
|
|
658
|
+
).version("9.252.0").addHelpText("after", () => {
|
|
659
659
|
return buildZeroHelpText();
|
|
660
660
|
});
|
|
661
661
|
if (process.argv[1]?.endsWith("zero.js") || process.argv[1]?.endsWith("zero.ts") || process.argv[1]?.endsWith("zero")) {
|