@wirecat/zoom-cli 0.83.0 → 0.84.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.
- package/README.md +10 -10
- package/contracts/wirecat.json +34 -1
- package/dist/account-removal.d.ts +1 -1
- package/dist/account-removal.d.ts.map +1 -1
- package/dist/account-removal.js +1 -1
- package/dist/account-removal.js.map +1 -1
- package/dist/agent-skill.js +1 -1
- package/dist/agent-skill.js.map +1 -1
- package/dist/answer-entities.d.ts +1 -1
- package/dist/answer-entities.d.ts.map +1 -1
- package/dist/answer-entities.js +1 -1
- package/dist/answer-entities.js.map +1 -1
- package/dist/answer-output.d.ts +2 -2
- package/dist/answer-output.d.ts.map +1 -1
- package/dist/answer-output.js +1 -1
- package/dist/answer-output.js.map +1 -1
- package/dist/answer-policy.d.ts.map +1 -1
- package/dist/answer-policy.js +1 -2
- package/dist/answer-policy.js.map +1 -1
- package/dist/answers.js +1 -1
- package/dist/answers.js.map +1 -1
- package/dist/api.d.ts +2 -2
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +1 -1
- package/dist/api.js.map +1 -1
- package/dist/archive-commands.d.ts +1 -1
- package/dist/archive-commands.d.ts.map +1 -1
- package/dist/archive-commands.js +1 -2
- package/dist/archive-commands.js.map +1 -1
- package/dist/archive-import.d.ts +1 -1
- package/dist/archive-import.d.ts.map +1 -1
- package/dist/archive-import.js +1 -1
- package/dist/archive-import.js.map +1 -1
- package/dist/archive-transcripts.d.ts +1 -1
- package/dist/archive-transcripts.d.ts.map +1 -1
- package/dist/archive-transcripts.js +1 -2
- package/dist/archive-transcripts.js.map +1 -1
- package/dist/bin/main.js +3 -3
- package/dist/bin/main.js.map +1 -1
- package/dist/bin/zm.js +11 -11
- package/dist/bundle/answer-policy-FBJQFXVQ.js +33 -0
- package/dist/bundle/{chunk-26TW5RZ6.js → chunk-6BQOT7BA.js} +61 -94
- package/dist/bundle/chunk-AEWYRB6F.js +8 -0
- package/dist/bundle/{chunk-OGTN2KVG.js → chunk-DAPVDZQO.js} +4 -14
- package/dist/bundle/{chunk-H6A4NWYJ.js → chunk-HU5W6TCS.js} +114 -128
- package/dist/bundle/{chunk-2DK5BBFF.js → chunk-JD63PEI3.js} +3 -8
- package/dist/bundle/{chunk-R6IA5UQB.js → chunk-ODJNJCPV.js} +8 -2
- package/dist/bundle/{chunk-XEOZTA3H.js → chunk-W6YFWJDR.js} +2 -5
- package/dist/bundle/{chunk-434YFJAE.js → chunk-WSGD5Q6L.js} +3 -9
- package/dist/bundle/chunk-YQDNTG4D.js +922 -0
- package/dist/bundle/config-JGJXLNXC.js +29 -0
- package/dist/bundle/{folders-ROKVKSCT.js → folders-B2GKJOC2.js} +2 -7
- package/dist/bundle/{main-GCK3VYAA.js → main-7DP3EEM2.js} +19 -41
- package/dist/bundle/{output-file-RYIOIXMD.js → output-file-PKA7MJEP.js} +3 -11
- package/dist/bundle/{program-OYLVYA4Z.js → program-DM4ILZWZ.js} +642 -801
- package/dist/bundle/run-log-ML7ZCWXD.js +54 -0
- package/dist/bundle/store-connection-MMHILGCB.js +21 -0
- package/dist/bundle/streaming-PRGWGNHY.js +12 -0
- package/dist/bundle/tokens-UWS4VT4B.js +18 -0
- package/dist/bundle/zm.js +4 -161
- package/dist/bundle/{zoom-app-4F4YY4OI.js → zoom-app-DID42LPS.js} +5 -13
- package/dist/chat-file.d.ts +1 -1
- package/dist/chat-file.d.ts.map +1 -1
- package/dist/commands.js +1 -1
- package/dist/commands.js.map +1 -1
- package/dist/config-issues.d.ts +1 -1
- package/dist/config-issues.d.ts.map +1 -1
- package/dist/config-issues.js +1 -1
- package/dist/config-issues.js.map +1 -1
- package/dist/config.d.ts +1 -2
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +1 -2
- package/dist/config.js.map +1 -1
- package/dist/contacts-commands.d.ts +1 -1
- package/dist/contacts-commands.d.ts.map +1 -1
- package/dist/contacts-commands.js +1 -1
- package/dist/contacts-commands.js.map +1 -1
- package/dist/contract-overrides.js +1 -1
- package/dist/contract-overrides.js.map +1 -1
- package/dist/errors.d.ts +1 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/execution.d.ts +1 -1
- package/dist/execution.d.ts.map +1 -1
- package/dist/execution.js +1 -1
- package/dist/execution.js.map +1 -1
- package/dist/files.d.ts +2 -2
- package/dist/files.d.ts.map +1 -1
- package/dist/files.js +1 -1
- package/dist/files.js.map +1 -1
- package/dist/first-screen.js +1 -1
- package/dist/first-screen.js.map +1 -1
- package/dist/identity.d.ts +1 -1
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +6 -0
- package/dist/identity.js.map +1 -1
- package/dist/ingestion-search-commands.d.ts +1 -1
- package/dist/ingestion-search-commands.d.ts.map +1 -1
- package/dist/ingestion-search-commands.js +1 -1
- package/dist/ingestion-search-commands.js.map +1 -1
- package/dist/local-transcription-commands.d.ts +1 -1
- package/dist/local-transcription-commands.d.ts.map +1 -1
- package/dist/local-transcription-commands.js +1 -2
- package/dist/local-transcription-commands.js.map +1 -1
- package/dist/local-transcription.d.ts +1 -2
- package/dist/local-transcription.d.ts.map +1 -1
- package/dist/local-transcription.js +3 -3
- package/dist/local-transcription.js.map +1 -1
- package/dist/meeting-commands.d.ts +1 -1
- package/dist/meeting-commands.d.ts.map +1 -1
- package/dist/meeting-commands.js +1 -2
- package/dist/meeting-commands.js.map +1 -1
- package/dist/meeting-communications-binding.d.ts +1 -2
- package/dist/meeting-communications-binding.d.ts.map +1 -1
- package/dist/meeting-communications-binding.js.map +1 -1
- package/dist/meeting-context-commands.d.ts +1 -1
- package/dist/meeting-context-commands.d.ts.map +1 -1
- package/dist/meeting-context-commands.js +1 -1
- package/dist/meeting-context-commands.js.map +1 -1
- package/dist/meeting-context.d.ts +2 -4
- package/dist/meeting-context.d.ts.map +1 -1
- package/dist/meeting-context.js +1 -1
- package/dist/meeting-context.js.map +1 -1
- package/dist/meeting-integration-commands.d.ts +1 -1
- package/dist/meeting-integration-commands.d.ts.map +1 -1
- package/dist/meeting-integration-commands.js +1 -2
- package/dist/meeting-integration-commands.js.map +1 -1
- package/dist/meeting-integration.d.ts +1 -1
- package/dist/meeting-integration.d.ts.map +1 -1
- package/dist/meeting-integration.js +1 -1
- package/dist/meeting-integration.js.map +1 -1
- package/dist/meeting-inventory.d.ts +1 -1
- package/dist/meeting-inventory.d.ts.map +1 -1
- package/dist/meeting-inventory.js +1 -1
- package/dist/meeting-inventory.js.map +1 -1
- package/dist/meeting-preparation.d.ts +1 -2
- package/dist/meeting-preparation.d.ts.map +1 -1
- package/dist/meeting-preparation.js +1 -1
- package/dist/meeting-preparation.js.map +1 -1
- package/dist/meeting-project-candidates.d.ts +1 -1
- package/dist/meeting-project-candidates.d.ts.map +1 -1
- package/dist/meeting-project-evidence-commands.d.ts +1 -1
- package/dist/meeting-project-evidence-commands.d.ts.map +1 -1
- package/dist/meeting-project-evidence-commands.js +1 -2
- package/dist/meeting-project-evidence-commands.js.map +1 -1
- package/dist/meeting-read-command-bindings.js +1 -1
- package/dist/meeting-read-command-bindings.js.map +1 -1
- package/dist/meeting-review-commands.d.ts +1 -3
- package/dist/meeting-review-commands.d.ts.map +1 -1
- package/dist/meeting-review-commands.js +1 -2
- package/dist/meeting-review-commands.js.map +1 -1
- package/dist/meeting-search-commands.d.ts +2 -3
- package/dist/meeting-search-commands.d.ts.map +1 -1
- package/dist/meeting-search-commands.js +2 -4
- package/dist/meeting-search-commands.js.map +1 -1
- package/dist/meeting-searches-commands.d.ts +1 -2
- package/dist/meeting-searches-commands.d.ts.map +1 -1
- package/dist/meeting-searches-commands.js +1 -2
- package/dist/meeting-searches-commands.js.map +1 -1
- package/dist/meeting-selection-options.d.ts +1 -1
- package/dist/meeting-selection-options.d.ts.map +1 -1
- package/dist/meeting-selection-options.js +1 -2
- package/dist/meeting-selection-options.js.map +1 -1
- package/dist/meeting-semantic-commands.d.ts +1 -2
- package/dist/meeting-semantic-commands.d.ts.map +1 -1
- package/dist/meeting-semantic-commands.js +1 -1
- package/dist/meeting-semantic-commands.js.map +1 -1
- package/dist/meeting-semantic.d.ts +2 -2
- package/dist/meeting-semantic.d.ts.map +1 -1
- package/dist/meeting-semantic.js +1 -1
- package/dist/meeting-semantic.js.map +1 -1
- package/dist/meeting-source.d.ts +1 -1
- package/dist/meeting-source.d.ts.map +1 -1
- package/dist/meeting-stats-commands.d.ts +1 -3
- package/dist/meeting-stats-commands.d.ts.map +1 -1
- package/dist/meeting-stats-commands.js +1 -2
- package/dist/meeting-stats-commands.js.map +1 -1
- package/dist/models-commands.d.ts +1 -1
- package/dist/models-commands.d.ts.map +1 -1
- package/dist/models-commands.js +1 -1
- package/dist/models-commands.js.map +1 -1
- package/dist/occurrence-schedule.d.ts +1 -1
- package/dist/occurrence-schedule.d.ts.map +1 -1
- package/dist/permissions.d.ts +1 -1
- package/dist/permissions.d.ts.map +1 -1
- package/dist/permissions.js +1 -2
- package/dist/permissions.js.map +1 -1
- package/dist/profile.js +1 -1
- package/dist/profile.js.map +1 -1
- package/dist/program-bindings.js +1 -1
- package/dist/program-bindings.js.map +1 -1
- package/dist/program.d.ts +1 -2
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +1 -1
- package/dist/program.js.map +1 -1
- package/dist/progress-commands.d.ts +1 -1
- package/dist/progress-commands.d.ts.map +1 -1
- package/dist/progress-commands.js +1 -2
- package/dist/progress-commands.js.map +1 -1
- package/dist/read-only.js +1 -1
- package/dist/read-only.js.map +1 -1
- package/dist/recording-archive.d.ts.map +1 -1
- package/dist/recording-archive.js +1 -2
- package/dist/recording-archive.js.map +1 -1
- package/dist/recording-manifest.js +1 -1
- package/dist/recording-manifest.js.map +1 -1
- package/dist/recording-partial-store.d.ts +2 -3
- package/dist/recording-partial-store.d.ts.map +1 -1
- package/dist/recording-partial-store.js +1 -1
- package/dist/recording-partial-store.js.map +1 -1
- package/dist/recording-promotion-store.d.ts +1 -2
- package/dist/recording-promotion-store.d.ts.map +1 -1
- package/dist/recording-promotion-store.js +1 -2
- package/dist/recording-promotion-store.js.map +1 -1
- package/dist/recording-schedule-commands.d.ts +1 -1
- package/dist/recording-schedule-commands.d.ts.map +1 -1
- package/dist/recording-schedule-commands.js +1 -1
- package/dist/recording-schedule-commands.js.map +1 -1
- package/dist/recording-schedule-store.js +1 -1
- package/dist/recording-schedule-store.js.map +1 -1
- package/dist/recording-schedule-systemd.js +1 -1
- package/dist/recording-schedule-systemd.js.map +1 -1
- package/dist/recording-schedule.d.ts +1 -1
- package/dist/recording-schedule.d.ts.map +1 -1
- package/dist/recording-schedule.js +1 -1
- package/dist/recording-schedule.js.map +1 -1
- package/dist/recording-sync-store.d.ts +1 -1
- package/dist/recording-sync-store.d.ts.map +1 -1
- package/dist/recording-sync-store.js +1 -2
- package/dist/recording-sync-store.js.map +1 -1
- package/dist/recording-sync.d.ts +1 -1
- package/dist/recording-sync.d.ts.map +1 -1
- package/dist/recording-sync.js +1 -1
- package/dist/recording-sync.js.map +1 -1
- package/dist/recording-writer-lease.d.ts +1 -1
- package/dist/recording-writer-lease.d.ts.map +1 -1
- package/dist/recording-writer-lease.js +1 -1
- package/dist/recording-writer-lease.js.map +1 -1
- package/dist/recordings.d.ts +1 -1
- package/dist/recordings.d.ts.map +1 -1
- package/dist/recordings.js.map +1 -1
- package/dist/remote-meetings.d.ts +19 -19
- package/dist/remote-meetings.d.ts.map +1 -1
- package/dist/remote-meetings.js +1 -1
- package/dist/remote-meetings.js.map +1 -1
- package/dist/request-events.d.ts +1 -1
- package/dist/request-events.d.ts.map +1 -1
- package/dist/request-events.js +1 -1
- package/dist/request-events.js.map +1 -1
- package/dist/run-log.d.ts +1 -1
- package/dist/run-log.d.ts.map +1 -1
- package/dist/run-log.js +1 -1
- package/dist/run-log.js.map +1 -1
- package/dist/run.d.ts +1 -1
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +1 -2
- package/dist/run.js.map +1 -1
- package/dist/series-inventory.d.ts +2 -2
- package/dist/series-inventory.js +1 -1
- package/dist/series-inventory.js.map +1 -1
- package/dist/setup-commands.d.ts +1 -1
- package/dist/setup-commands.d.ts.map +1 -1
- package/dist/setup-commands.js +1 -1
- package/dist/setup-commands.js.map +1 -1
- package/dist/store-commands.d.ts +1 -1
- package/dist/store-commands.d.ts.map +1 -1
- package/dist/store-commands.js +1 -2
- package/dist/store-commands.js.map +1 -1
- package/dist/store-connection.d.ts +1 -3
- package/dist/store-connection.d.ts.map +1 -1
- package/dist/store-connection.js +14 -14
- package/dist/store-connection.js.map +1 -1
- package/dist/sync-progress.d.ts +4 -4
- package/dist/sync-progress.d.ts.map +1 -1
- package/dist/sync-progress.js +1 -1
- package/dist/sync-progress.js.map +1 -1
- package/dist/tokens.d.ts +1 -1
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +1 -1
- package/dist/tokens.js.map +1 -1
- package/dist/unified-search.d.ts +1 -1
- package/dist/unified-search.d.ts.map +1 -1
- package/dist/upcoming-meetings.d.ts +2 -2
- package/dist/upcoming-meetings.js +1 -1
- package/dist/upcoming-meetings.js.map +1 -1
- package/dist/upgrade.d.ts.map +1 -1
- package/dist/upgrade.js +1 -2
- package/dist/upgrade.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/watch-commands.d.ts +1 -2
- package/dist/watch-commands.d.ts.map +1 -1
- package/dist/watch-commands.js +1 -2
- package/dist/watch-commands.js.map +1 -1
- package/dist/watch-service.d.ts +1 -1
- package/dist/watch-service.d.ts.map +1 -1
- package/dist/watch-service.js +1 -1
- package/dist/watch-service.js.map +1 -1
- package/dist/zoom-app.d.ts +2 -2
- package/dist/zoom-app.d.ts.map +1 -1
- package/dist/zoom-app.js +1 -1
- package/dist/zoom-app.js.map +1 -1
- package/dist/zoom-search-commands.d.ts +1 -1
- package/dist/zoom-search-commands.d.ts.map +1 -1
- package/dist/zoom-search-commands.js +1 -1
- package/dist/zoom-search-commands.js.map +1 -1
- package/dist/zoom-session.d.ts +1 -1
- package/dist/zoom-session.d.ts.map +1 -1
- package/dist/zoom-session.js +1 -1
- package/dist/zoom-session.js.map +1 -1
- package/package.json +3 -3
- package/scenarios/person-in-meetings.md +1 -1
- package/skills/zoom-cli/SKILL.md +1 -1
- package/skills/zoom-cli/references/people-and-projects.md +5 -5
- package/skills/zoom-cli/references/prepare.md +2 -2
- package/dist/bundle/agent-3HDWEZ5M.js +0 -47
- package/dist/bundle/all-profiles-RY2OMSDL.js +0 -321
- package/dist/bundle/answer-policy-IFVXPPGW.js +0 -131
- package/dist/bundle/anthropic-36VPSF7B.js +0 -91
- package/dist/bundle/app-server-ZVJVUGB7.js +0 -267
- package/dist/bundle/bun-F4M4KCNA.js +0 -169
- package/dist/bundle/bun-sqlite-IOPYIUA7.js +0 -76
- package/dist/bundle/chunk-2IBKKVVZ.js +0 -335
- package/dist/bundle/chunk-2S54TM4N.js +0 -230
- package/dist/bundle/chunk-3AQHKXVR.js +0 -161
- package/dist/bundle/chunk-3CW2C7ZA.js +0 -217
- package/dist/bundle/chunk-3KUEZK5Z.js +0 -73
- package/dist/bundle/chunk-3PXUQFHX.js +0 -2333
- package/dist/bundle/chunk-3QN5KDFZ.js +0 -3012
- package/dist/bundle/chunk-575JMTDR.js +0 -562
- package/dist/bundle/chunk-5B2LV4MS.js +0 -26
- package/dist/bundle/chunk-5WL5RHOO.js +0 -167
- package/dist/bundle/chunk-6C7ESL5N.js +0 -295
- package/dist/bundle/chunk-6E4KLYNP.js +0 -229
- package/dist/bundle/chunk-7JDXR75Q.js +0 -465
- package/dist/bundle/chunk-AK3H2C65.js +0 -1349
- package/dist/bundle/chunk-AQ5RIOUE.js +0 -633
- package/dist/bundle/chunk-AQLUAQXJ.js +0 -1259
- package/dist/bundle/chunk-ASTLGFTR.js +0 -12270
- package/dist/bundle/chunk-ATHBB7OU.js +0 -106
- package/dist/bundle/chunk-B2NM65RD.js +0 -80
- package/dist/bundle/chunk-B4KHDXJE.js +0 -64
- package/dist/bundle/chunk-BAFC7WNI.js +0 -276
- package/dist/bundle/chunk-BBGJQMRI.js +0 -34
- package/dist/bundle/chunk-BTLZYRIW.js +0 -1007
- package/dist/bundle/chunk-BZDS2X6Y.js +0 -5150
- package/dist/bundle/chunk-C7JPYWYQ.js +0 -77
- package/dist/bundle/chunk-CDQUW25G.js +0 -3752
- package/dist/bundle/chunk-CJWGJBHW.js +0 -1044
- package/dist/bundle/chunk-D72URWJE.js +0 -532
- package/dist/bundle/chunk-D7RCUODT.js +0 -185
- package/dist/bundle/chunk-DFDN6AUB.js +0 -21
- package/dist/bundle/chunk-DNCLQPOM.js +0 -7
- package/dist/bundle/chunk-DQJECJUE.js +0 -2257
- package/dist/bundle/chunk-E4JQ3MCW.js +0 -2338
- package/dist/bundle/chunk-E4ODYLEK.js +0 -209
- package/dist/bundle/chunk-EE45N67Q.js +0 -86
- package/dist/bundle/chunk-EEEU4MKK.js +0 -210
- package/dist/bundle/chunk-ESN3W2MZ.js +0 -2624
- package/dist/bundle/chunk-ETIZGA4P.js +0 -340
- package/dist/bundle/chunk-F44QK6CK.js +0 -52
- package/dist/bundle/chunk-FH2UFNH6.js +0 -54
- package/dist/bundle/chunk-FTH6WGYO.js +0 -24
- package/dist/bundle/chunk-FWACRG4X.js +0 -160
- package/dist/bundle/chunk-FXBHOCJK.js +0 -24600
- package/dist/bundle/chunk-G5SZL7G2.js +0 -150
- package/dist/bundle/chunk-G6CHEFAG.js +0 -108
- package/dist/bundle/chunk-GHJD7PE6.js +0 -1068
- package/dist/bundle/chunk-GZ7WBU5Y.js +0 -18
- package/dist/bundle/chunk-HKLRI2LB.js +0 -555
- package/dist/bundle/chunk-HMD4FZYY.js +0 -133
- package/dist/bundle/chunk-HO4JGD4Q.js +0 -16
- package/dist/bundle/chunk-HTQTIKWP.js +0 -928
- package/dist/bundle/chunk-HUAHLO6N.js +0 -29
- package/dist/bundle/chunk-IANKXHSE.js +0 -46
- package/dist/bundle/chunk-IQZXFWFI.js +0 -170
- package/dist/bundle/chunk-ISQ23VKV.js +0 -123
- package/dist/bundle/chunk-JEH33ZCD.js +0 -58
- package/dist/bundle/chunk-JUNQYWQ2.js +0 -228
- package/dist/bundle/chunk-JUXMVQWJ.js +0 -799
- package/dist/bundle/chunk-KHQDWYCG.js +0 -82
- package/dist/bundle/chunk-KYRYD4CR.js +0 -38
- package/dist/bundle/chunk-LBGT6W4R.js +0 -377
- package/dist/bundle/chunk-LN7HRYTH.js +0 -80
- package/dist/bundle/chunk-MEB7HBTM.js +0 -95
- package/dist/bundle/chunk-MEEFWYX3.js +0 -388
- package/dist/bundle/chunk-MNOAMJ6H.js +0 -94
- package/dist/bundle/chunk-MYHPXJDG.js +0 -142
- package/dist/bundle/chunk-NGI37RFW.js +0 -692
- package/dist/bundle/chunk-NZMWD7Y3.js +0 -68149
- package/dist/bundle/chunk-O6IECJRM.js +0 -54
- package/dist/bundle/chunk-OBWL3BUV.js +0 -800
- package/dist/bundle/chunk-OEEWVKJX.js +0 -53
- package/dist/bundle/chunk-OQYZ3W4K.js +0 -374
- package/dist/bundle/chunk-P3ZCTYGW.js +0 -101
- package/dist/bundle/chunk-PL5P7UKW.js +0 -25216
- package/dist/bundle/chunk-PVEBAHFU.js +0 -100
- package/dist/bundle/chunk-R2B6PUVI.js +0 -206
- package/dist/bundle/chunk-RLOH7RDN.js +0 -362
- package/dist/bundle/chunk-RQ4AXSCJ.js +0 -616
- package/dist/bundle/chunk-RYGTCRFZ.js +0 -140
- package/dist/bundle/chunk-S4PXWIE4.js +0 -408
- package/dist/bundle/chunk-SDZZYZLL.js +0 -58
- package/dist/bundle/chunk-SHQAYUK6.js +0 -1199
- package/dist/bundle/chunk-T3W4V4A6.js +0 -63
- package/dist/bundle/chunk-TCT5D2X2.js +0 -6848
- package/dist/bundle/chunk-TDWPOSPR.js +0 -198
- package/dist/bundle/chunk-TER3N27H.js +0 -353
- package/dist/bundle/chunk-TMTNP7QN.js +0 -214
- package/dist/bundle/chunk-TO5UEWXR.js +0 -288
- package/dist/bundle/chunk-TXDR6YSF.js +0 -23
- package/dist/bundle/chunk-TY7NDMFY.js +0 -46
- package/dist/bundle/chunk-UAWSINMC.js +0 -875
- package/dist/bundle/chunk-UBH7YF3C.js +0 -9354
- package/dist/bundle/chunk-UEAE3JUU.js +0 -46576
- package/dist/bundle/chunk-UHR363OD.js +0 -357
- package/dist/bundle/chunk-UM52A76S.js +0 -259
- package/dist/bundle/chunk-URP6BTHN.js +0 -624
- package/dist/bundle/chunk-UWQEAA6S.js +0 -13
- package/dist/bundle/chunk-VR7QZGRU.js +0 -185
- package/dist/bundle/chunk-VRH5PBSL.js +0 -755
- package/dist/bundle/chunk-VTLQTQKY.js +0 -1756
- package/dist/bundle/chunk-VTYNLTDW.js +0 -331
- package/dist/bundle/chunk-WY7XG6TE.js +0 -76
- package/dist/bundle/chunk-XH23ML2V.js +0 -195
- package/dist/bundle/chunk-XYF76A26.js +0 -27556
- package/dist/bundle/chunk-Y5E2WNWB.js +0 -35
- package/dist/bundle/chunk-ZDYJAEVB.js +0 -84
- package/dist/bundle/chunk-ZJ63HDBT.js +0 -71
- package/dist/bundle/chunk-ZT4ZPUIO.js +0 -218
- package/dist/bundle/chunk-ZVVMGPBJ.js +0 -50
- package/dist/bundle/cli-JK6PQSSN.js +0 -1270
- package/dist/bundle/command-contract-F3QNBKPX.js +0 -46
- package/dist/bundle/command-server-entry-DJLGN62J.js +0 -176
- package/dist/bundle/config-TYYMV3HV.js +0 -118
- package/dist/bundle/decode-ZZICNNFF.js +0 -31
- package/dist/bundle/dispatch-FKMIPCPQ.js +0 -412
- package/dist/bundle/dist-NQPF25XI.js +0 -322
- package/dist/bundle/dist-PAKDDIBT.js +0 -191
- package/dist/bundle/dist-XUFQCJXW.js +0 -7577
- package/dist/bundle/echarts-QMAA7HH5.js +0 -42501
- package/dist/bundle/embed-T64EUKUI.js +0 -38
- package/dist/bundle/embedder-ZEKISZXI.js +0 -111
- package/dist/bundle/failure-XTWBYI2A.js +0 -25
- package/dist/bundle/first-run-ZFNY4RRH.js +0 -29
- package/dist/bundle/first-screen-LPGCHRHZ.js +0 -47
- package/dist/bundle/instructions-4H7UREH2.js +0 -11
- package/dist/bundle/mcp-5HFPWC3W.js +0 -167
- package/dist/bundle/meeting-combined-7HDPOUPB.js +0 -28
- package/dist/bundle/meeting-model-MVUW7UPQ.js +0 -26
- package/dist/bundle/meeting-semantic-IF633WGX.js +0 -23
- package/dist/bundle/meetings-RY2AAPHV.js +0 -332
- package/dist/bundle/node-KM3CUABH.js +0 -2340
- package/dist/bundle/node-P3PUHKYH.js +0 -176
- package/dist/bundle/node-TLZSIHIJ.js +0 -21
- package/dist/bundle/node-sqlite-ASAZJNHE.js +0 -74
- package/dist/bundle/oauth-4U3OCK3W.js +0 -20
- package/dist/bundle/oauth-AJARLPSY.js +0 -46
- package/dist/bundle/open-SEJRY2ZI.js +0 -23
- package/dist/bundle/openai-FZDSC2AA.js +0 -28
- package/dist/bundle/process-AFIXYXWL.js +0 -91
- package/dist/bundle/prompt-BCRD64F4.js +0 -17
- package/dist/bundle/public-SVJILCNI.js +0 -206
- package/dist/bundle/recognize-25ITJWGX.js +0 -26
- package/dist/bundle/remote-5FBAJX7O.js +0 -32
- package/dist/bundle/rerank-2HGWWORY.js +0 -52
- package/dist/bundle/run-log-7HRF4Y47.js +0 -145
- package/dist/bundle/serve-RL35MSJD.js +0 -199
- package/dist/bundle/server-QUSBWACP.js +0 -229
- package/dist/bundle/server-SCK2SRDK.js +0 -96
- package/dist/bundle/services-BGRIQNDC.js +0 -609
- package/dist/bundle/speech-4W3ZMTFK.js +0 -89
- package/dist/bundle/sqlite-runtime-K3KLRZCV.js +0 -20
- package/dist/bundle/state-GYL4C74G.js +0 -36
- package/dist/bundle/store-27UQMNEO.js +0 -189
- package/dist/bundle/store-NLYH5SQX.js +0 -316
- package/dist/bundle/store-connection-CZILWRSR.js +0 -112
- package/dist/bundle/store-maintenance-command-Z3QLNSXJ.js +0 -84
- package/dist/bundle/streaming-73EKEGPF.js +0 -18
- package/dist/bundle/surface-CV3C4RV2.js +0 -82
- package/dist/bundle/tokens-PY3S22LY.js +0 -27
- /package/dist/bundle/{chunk-7ECP5ZQR.js → chunk-7O7XM37N.js} +0 -0
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { createRequire as __bundleRequire } from "node:module";
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
|
-
import
|
|
3
|
+
import {
|
|
4
|
+
emitReceipt
|
|
5
|
+
} from "./chunk-JD63PEI3.js";
|
|
6
|
+
import {
|
|
7
|
+
legacyLoginService,
|
|
8
|
+
sameConfigFolder,
|
|
9
|
+
zmPaths
|
|
10
|
+
} from "./chunk-W6YFWJDR.js";
|
|
4
11
|
import {
|
|
5
12
|
ZOOM_ANSWER_ENTITIES,
|
|
6
13
|
addMeetingEmbeddingCommand,
|
|
@@ -27,12 +34,7 @@ import {
|
|
|
27
34
|
validateTaskProposal,
|
|
28
35
|
validateUnifiedSearch,
|
|
29
36
|
wholeList
|
|
30
|
-
} from "./chunk-
|
|
31
|
-
import {
|
|
32
|
-
emitReceipt
|
|
33
|
-
} from "./chunk-2DK5BBFF.js";
|
|
34
|
-
import "./chunk-TMTNP7QN.js";
|
|
35
|
-
import "./chunk-3CW2C7ZA.js";
|
|
37
|
+
} from "./chunk-HU5W6TCS.js";
|
|
36
38
|
import {
|
|
37
39
|
DEFAULT_PERMISSIONS,
|
|
38
40
|
ZOOM_SETTINGS,
|
|
@@ -56,53 +58,36 @@ import {
|
|
|
56
58
|
setConfig,
|
|
57
59
|
unsetConfig,
|
|
58
60
|
zoomRunsCommand
|
|
59
|
-
} from "./chunk-
|
|
60
|
-
import {
|
|
61
|
-
MEMO_SCENARIOS,
|
|
62
|
-
SEARCHES_QUERY,
|
|
63
|
-
accountRemoveCommand,
|
|
64
|
-
actorOf,
|
|
65
|
-
addMeetingBatchCommand,
|
|
66
|
-
addMeetingPreparationCommand,
|
|
67
|
-
addMeetingProjectCandidatesCommand,
|
|
68
|
-
addMeetingSeriesInventoryCommand,
|
|
69
|
-
appCompleteCommand,
|
|
70
|
-
appDoctorCommand,
|
|
71
|
-
appMcpCommand,
|
|
72
|
-
createProgram,
|
|
73
|
-
formatMeetingBatch,
|
|
74
|
-
guideCommand,
|
|
75
|
-
inSection,
|
|
76
|
-
meetingAnswerBody,
|
|
77
|
-
meetingEvidenceItem,
|
|
78
|
-
meetingPersonContextItem,
|
|
79
|
-
modelCatalogueCommand,
|
|
80
|
-
oauthSessionCommand,
|
|
81
|
-
passageForRun,
|
|
82
|
-
run,
|
|
83
|
-
sharedCommandTemplate,
|
|
84
|
-
skillCommand as skillCommand2,
|
|
85
|
-
upgradeCommand
|
|
86
|
-
} from "./chunk-XYF76A26.js";
|
|
87
|
-
import "./chunk-TDWPOSPR.js";
|
|
61
|
+
} from "./chunk-6BQOT7BA.js";
|
|
88
62
|
import {
|
|
89
63
|
CLIENT_ID_NEED,
|
|
90
64
|
SET_ZOOM_APP,
|
|
65
|
+
array,
|
|
66
|
+
boolean,
|
|
91
67
|
checkedClientId,
|
|
68
|
+
looseObject,
|
|
69
|
+
optional,
|
|
70
|
+
picklist,
|
|
71
|
+
safeParse,
|
|
72
|
+
string,
|
|
92
73
|
zoomApp,
|
|
93
74
|
zoomAppChecklist,
|
|
94
75
|
zoomAppSetup,
|
|
95
76
|
zoomClientId,
|
|
96
77
|
zoomClientReport
|
|
97
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-YQDNTG4D.js";
|
|
79
|
+
import "./chunk-7O7XM37N.js";
|
|
98
80
|
import {
|
|
99
81
|
TokenManager,
|
|
100
82
|
ZOOM_CODEC,
|
|
101
83
|
legacyAccountsOf,
|
|
102
84
|
zoomProvider
|
|
103
|
-
} from "./chunk-
|
|
104
|
-
import
|
|
105
|
-
|
|
85
|
+
} from "./chunk-DAPVDZQO.js";
|
|
86
|
+
import {
|
|
87
|
+
CLIENT_ID_MISSING,
|
|
88
|
+
VERSION,
|
|
89
|
+
ZM
|
|
90
|
+
} from "./chunk-ODJNJCPV.js";
|
|
106
91
|
import {
|
|
107
92
|
ZoneAssumptions,
|
|
108
93
|
cancellableStore,
|
|
@@ -113,252 +98,21 @@ import {
|
|
|
113
98
|
withIssue,
|
|
114
99
|
zoomInstant,
|
|
115
100
|
zoomTime
|
|
116
|
-
} from "./chunk-
|
|
117
|
-
import {
|
|
118
|
-
allAnswer
|
|
119
|
-
} from "./chunk-AK3H2C65.js";
|
|
120
|
-
import "./chunk-FTH6WGYO.js";
|
|
121
|
-
import {
|
|
122
|
-
skillCommand
|
|
123
|
-
} from "./chunk-MEEFWYX3.js";
|
|
124
|
-
import "./chunk-6C7ESL5N.js";
|
|
125
|
-
import "./chunk-2S54TM4N.js";
|
|
126
|
-
import "./chunk-F44QK6CK.js";
|
|
127
|
-
import "./chunk-E4ODYLEK.js";
|
|
128
|
-
import "./chunk-C7JPYWYQ.js";
|
|
129
|
-
import "./chunk-3AQHKXVR.js";
|
|
130
|
-
import "./chunk-UBH7YF3C.js";
|
|
131
|
-
import "./chunk-JUNQYWQ2.js";
|
|
132
|
-
import "./chunk-AQLUAQXJ.js";
|
|
133
|
-
import {
|
|
134
|
-
pagingOf
|
|
135
|
-
} from "./chunk-TER3N27H.js";
|
|
136
|
-
import "./chunk-ETIZGA4P.js";
|
|
137
|
-
import "./chunk-ZDYJAEVB.js";
|
|
138
|
-
import "./chunk-EE45N67Q.js";
|
|
139
|
-
import {
|
|
140
|
-
NativeRecordingPartialStore,
|
|
141
|
-
NativeRecordingPublication,
|
|
142
|
-
commandPermissions,
|
|
143
|
-
commandRuns,
|
|
144
|
-
integer,
|
|
145
|
-
providerRequest,
|
|
146
|
-
runSettings,
|
|
147
|
-
savedSearchItem,
|
|
148
|
-
validateMeetingPreparationRequest
|
|
149
|
-
} from "./chunk-UEAE3JUU.js";
|
|
150
|
-
import "./chunk-6E4KLYNP.js";
|
|
151
|
-
import "./chunk-5B2LV4MS.js";
|
|
152
|
-
import {
|
|
153
|
-
nativeWriterLeaseStore,
|
|
154
|
-
openOrdinaryFile,
|
|
155
|
-
syncDirectory,
|
|
156
|
-
writeFileAtomic
|
|
157
|
-
} from "./chunk-S4PXWIE4.js";
|
|
158
|
-
import {
|
|
159
|
-
addMeetingCommands,
|
|
160
|
-
addMeetingPassageCommand,
|
|
161
|
-
addMeetingProjectEvidenceCommand,
|
|
162
|
-
dateWindow,
|
|
163
|
-
listQuery,
|
|
164
|
-
nativeTerms,
|
|
165
|
-
queryTerms,
|
|
166
|
-
termField,
|
|
167
|
-
typedQuery,
|
|
168
|
-
unfilteredQuery,
|
|
169
|
-
withQuery
|
|
170
|
-
} from "./chunk-VRH5PBSL.js";
|
|
171
|
-
import "./chunk-OQYZ3W4K.js";
|
|
172
|
-
import "./chunk-IQZXFWFI.js";
|
|
173
|
-
import "./chunk-UHR363OD.js";
|
|
174
|
-
import "./chunk-ISQ23VKV.js";
|
|
175
|
-
import "./chunk-HUAHLO6N.js";
|
|
176
|
-
import "./chunk-ZT4ZPUIO.js";
|
|
177
|
-
import {
|
|
178
|
-
latestVersion,
|
|
179
|
-
runUpdate,
|
|
180
|
-
updateNotice
|
|
181
|
-
} from "./chunk-MYHPXJDG.js";
|
|
182
|
-
import "./chunk-TY7NDMFY.js";
|
|
183
|
-
import {
|
|
184
|
-
legacyLoginService,
|
|
185
|
-
sameConfigFolder,
|
|
186
|
-
zmPaths
|
|
187
|
-
} from "./chunk-XEOZTA3H.js";
|
|
188
|
-
import "./chunk-E4JQ3MCW.js";
|
|
189
|
-
import "./chunk-RYGTCRFZ.js";
|
|
190
|
-
import "./chunk-CJWGJBHW.js";
|
|
191
|
-
import "./chunk-XH23ML2V.js";
|
|
192
|
-
import "./chunk-NGI37RFW.js";
|
|
193
|
-
import "./chunk-HTQTIKWP.js";
|
|
194
|
-
import "./chunk-WY7XG6TE.js";
|
|
195
|
-
import "./chunk-7ECP5ZQR.js";
|
|
196
|
-
import "./chunk-GHJD7PE6.js";
|
|
197
|
-
import "./chunk-UM52A76S.js";
|
|
198
|
-
import "./chunk-D7RCUODT.js";
|
|
199
|
-
import "./chunk-BTLZYRIW.js";
|
|
200
|
-
import "./chunk-VR7QZGRU.js";
|
|
201
|
-
import "./chunk-UWQEAA6S.js";
|
|
202
|
-
import "./chunk-GZ7WBU5Y.js";
|
|
203
|
-
import "./chunk-HMD4FZYY.js";
|
|
204
|
-
import {
|
|
205
|
-
Argument,
|
|
206
|
-
CommanderError,
|
|
207
|
-
DEFAULT_CONFIG,
|
|
208
|
-
FETCH,
|
|
209
|
-
LOCAL_READ,
|
|
210
|
-
LOCAL_WRITE,
|
|
211
|
-
NONE_NAMED,
|
|
212
|
-
NO_EFFECTS,
|
|
213
|
-
Option,
|
|
214
|
-
REMOTE_READ,
|
|
215
|
-
annotate,
|
|
216
|
-
checkpointPath,
|
|
217
|
-
customizeSharedCommand,
|
|
218
|
-
environmentOf,
|
|
219
|
-
grantsAuthority,
|
|
220
|
-
isBody,
|
|
221
|
-
itemAnswer,
|
|
222
|
-
itemOf,
|
|
223
|
-
listOf,
|
|
224
|
-
overrideSharedContract,
|
|
225
|
-
progressOf,
|
|
226
|
-
readCheckpoint,
|
|
227
|
-
runBudgetOf,
|
|
228
|
-
saveCheckpoint,
|
|
229
|
-
settingRows,
|
|
230
|
-
snakeKeys,
|
|
231
|
-
writesNewFileOnlyWith,
|
|
232
|
-
writesOwnerFiles
|
|
233
|
-
} from "./chunk-ASTLGFTR.js";
|
|
234
|
-
import "./chunk-P3ZCTYGW.js";
|
|
235
|
-
import "./chunk-ZJ63HDBT.js";
|
|
236
|
-
import "./chunk-RLOH7RDN.js";
|
|
237
|
-
import "./chunk-T3W4V4A6.js";
|
|
238
|
-
import "./chunk-JEH33ZCD.js";
|
|
239
|
-
import {
|
|
240
|
-
COMMAND_PATH_KEY,
|
|
241
|
-
assertOverridesTighten,
|
|
242
|
-
permissionOverrides
|
|
243
|
-
} from "./chunk-RQ4AXSCJ.js";
|
|
244
|
-
import "./chunk-B4KHDXJE.js";
|
|
245
|
-
import "./chunk-2IBKKVVZ.js";
|
|
246
|
-
import "./chunk-3KUEZK5Z.js";
|
|
247
|
-
import {
|
|
248
|
-
hostFetch,
|
|
249
|
-
providerWaitMs,
|
|
250
|
-
readJsonResponse,
|
|
251
|
-
retryableStatus,
|
|
252
|
-
retrying,
|
|
253
|
-
statusToCode
|
|
254
|
-
} from "./chunk-VTYNLTDW.js";
|
|
255
|
-
import {
|
|
256
|
-
speechModel
|
|
257
|
-
} from "./chunk-BAFC7WNI.js";
|
|
258
|
-
import "./chunk-PVEBAHFU.js";
|
|
259
|
-
import "./chunk-KHQDWYCG.js";
|
|
260
|
-
import "./chunk-NZMWD7Y3.js";
|
|
261
|
-
import "./chunk-LN7HRYTH.js";
|
|
262
|
-
import "./chunk-VTLQTQKY.js";
|
|
263
|
-
import "./chunk-3PXUQFHX.js";
|
|
264
|
-
import "./chunk-DQJECJUE.js";
|
|
265
|
-
import "./chunk-FWACRG4X.js";
|
|
266
|
-
import "./chunk-HO4JGD4Q.js";
|
|
267
|
-
import "./chunk-URP6BTHN.js";
|
|
268
|
-
import {
|
|
269
|
-
currentAttempt,
|
|
270
|
-
withAttempt
|
|
271
|
-
} from "./chunk-HKLRI2LB.js";
|
|
272
|
-
import "./chunk-B2NM65RD.js";
|
|
273
|
-
import "./chunk-G5SZL7G2.js";
|
|
274
|
-
import "./chunk-LBGT6W4R.js";
|
|
275
|
-
import "./chunk-MNOAMJ6H.js";
|
|
276
|
-
import {
|
|
277
|
-
formatReference,
|
|
278
|
-
isFolderProvider
|
|
279
|
-
} from "./chunk-7JDXR75Q.js";
|
|
280
|
-
import "./chunk-SHQAYUK6.js";
|
|
281
|
-
import "./chunk-TCT5D2X2.js";
|
|
282
|
-
import {
|
|
283
|
-
CLIENT_ID_MISSING,
|
|
284
|
-
VERSION,
|
|
285
|
-
ZM
|
|
286
|
-
} from "./chunk-R6IA5UQB.js";
|
|
287
|
-
import {
|
|
288
|
-
installerOf
|
|
289
|
-
} from "./chunk-TXDR6YSF.js";
|
|
290
|
-
import "./chunk-D72URWJE.js";
|
|
291
|
-
import "./chunk-FH2UFNH6.js";
|
|
292
|
-
import "./chunk-ATHBB7OU.js";
|
|
293
|
-
import "./chunk-MEB7HBTM.js";
|
|
294
|
-
import "./chunk-KYRYD4CR.js";
|
|
295
|
-
import {
|
|
296
|
-
MEETING_COUNTS_GROUPINGS,
|
|
297
|
-
RecordingSyncError,
|
|
298
|
-
createMeetingManagement,
|
|
299
|
-
createMeetingSeriesInventoryReader,
|
|
300
|
-
createUpcomingMeetingReader,
|
|
301
|
-
dispatchMeetingMutation,
|
|
302
|
-
importFiles,
|
|
303
|
-
installRecordingArchiveSchedule,
|
|
304
|
-
meetingCountsItem,
|
|
305
|
-
meetingLink,
|
|
306
|
-
meetingLinkItem,
|
|
307
|
-
meetingReviewItem,
|
|
308
|
-
meetingSpeakerItem,
|
|
309
|
-
meetingStatsItem,
|
|
310
|
-
parseRecordingArchiveSchedule,
|
|
311
|
-
parseRecordingSyncCheckpoint,
|
|
312
|
-
parseTranscriptText,
|
|
313
|
-
parseVtt,
|
|
314
|
-
planRecordingArchiveSchedule,
|
|
315
|
-
pull,
|
|
316
|
-
recordingArchiveScheduleWindow,
|
|
317
|
-
recordingWindows,
|
|
318
|
-
strongRecordingValidator,
|
|
319
|
-
syncRecordingArchive,
|
|
320
|
-
transcriptLanguage,
|
|
321
|
-
transferRecording,
|
|
322
|
-
validateMeetingChange,
|
|
323
|
-
validateMeetingContextChange,
|
|
324
|
-
watchMeetingIngestion
|
|
325
|
-
} from "./chunk-BZDS2X6Y.js";
|
|
326
|
-
import {
|
|
327
|
-
dateRange,
|
|
328
|
-
defineQuery,
|
|
329
|
-
queryFieldsOf,
|
|
330
|
-
timezoneOf
|
|
331
|
-
} from "./chunk-UAWSINMC.js";
|
|
332
|
-
import "./chunk-DNCLQPOM.js";
|
|
333
|
-
import {
|
|
334
|
-
createDeadline,
|
|
335
|
-
createOutputBuffer,
|
|
336
|
-
createRenderer,
|
|
337
|
-
fieldsOf,
|
|
338
|
-
projectFields,
|
|
339
|
-
realSleep
|
|
340
|
-
} from "./chunk-3QN5KDFZ.js";
|
|
341
|
-
import {
|
|
342
|
-
array,
|
|
343
|
-
boolean,
|
|
344
|
-
looseObject,
|
|
345
|
-
optional,
|
|
346
|
-
picklist,
|
|
347
|
-
safeParse,
|
|
348
|
-
string
|
|
349
|
-
} from "./chunk-ESN3W2MZ.js";
|
|
350
|
-
import "./chunk-Y5E2WNWB.js";
|
|
351
|
-
import {
|
|
352
|
-
CliError,
|
|
353
|
-
isCliError
|
|
354
|
-
} from "./chunk-IANKXHSE.js";
|
|
355
|
-
import "./chunk-BBGJQMRI.js";
|
|
101
|
+
} from "./chunk-WSGD5Q6L.js";
|
|
356
102
|
import {
|
|
357
103
|
__name
|
|
358
|
-
} from "./chunk-
|
|
104
|
+
} from "./chunk-AEWYRB6F.js";
|
|
105
|
+
|
|
106
|
+
// dist/program.js
|
|
107
|
+
import { CliError as CliError49 } from "@wirecat/cli-base";
|
|
108
|
+
import { createProgram as sharedProgram } from "@wirecat/cli-core";
|
|
109
|
+
|
|
110
|
+
// dist/run.js
|
|
111
|
+
import { appCompleteCommand, appDoctorCommand, appMcpCommand, assertOverridesTighten, COMMAND_PATH_KEY, commandPermissions, DEFAULT_CONFIG, NONE_NAMED, permissionOverrides, runSettings, run as sharedRun } from "@wirecat/cli-core";
|
|
359
112
|
|
|
360
113
|
// dist/first-screen.js
|
|
361
114
|
import { fileURLToPath } from "node:url";
|
|
115
|
+
import { guideCommand, inSection, MEMO_SCENARIOS } from "@wirecat/cli-core";
|
|
362
116
|
var SECTIONS = [
|
|
363
117
|
[["events"], "read"],
|
|
364
118
|
[["recordings"], "read"],
|
|
@@ -409,6 +163,15 @@ var ZOOM_FIRST_SCREEN = {
|
|
|
409
163
|
start: "zm personal session start"
|
|
410
164
|
};
|
|
411
165
|
|
|
166
|
+
// dist/program-bindings.js
|
|
167
|
+
import { CliError as CliError47, createDeadline, createOutputBuffer, createRenderer as createRenderer2, fieldsOf, isCliError as isCliError11, projectFields } from "@wirecat/cli-base";
|
|
168
|
+
import { commandRuns, environmentOf as environmentOf3, isBody, itemAnswer, meetingAnswerBody, pagingOf, runBudgetOf, snakeKeys, writesNewFileOnlyWith } from "@wirecat/cli-core";
|
|
169
|
+
|
|
170
|
+
// dist/agent-skill.js
|
|
171
|
+
import { annotate, customizeSharedCommand } from "@wirecat/cli-base/commands";
|
|
172
|
+
import { skillCommand } from "@wirecat/cli-base/skill";
|
|
173
|
+
import { grantsAuthority, LOCAL_WRITE, NO_EFFECTS, skillCommand as sharedSkillCommand } from "@wirecat/cli-core";
|
|
174
|
+
|
|
412
175
|
// dist/contract-overrides.js
|
|
413
176
|
var SHELL_OVERRIDES = {
|
|
414
177
|
skill: [
|
|
@@ -448,7 +211,7 @@ var SHELL_OVERRIDES = {
|
|
|
448
211
|
{
|
|
449
212
|
command: ["search"],
|
|
450
213
|
field: "description",
|
|
451
|
-
before: "find things by text: one resource when you know it (messages, notes), or search all across messages and notes; for mail,
|
|
214
|
+
before: "find things by text: one resource when you know it (messages, notes), or search all across messages and notes; for mail, wcat: wcat search mail",
|
|
452
215
|
after: "opt-in shared store search; meetings by default",
|
|
453
216
|
reason: "Zoom searches explicit local meeting and archive sources, with opt-in unified store reads rather than a live messenger backend."
|
|
454
217
|
},
|
|
@@ -621,7 +384,7 @@ var addZoomSkillCommandsDefinition = /* @__PURE__ */ __name((program, environmen
|
|
|
621
384
|
program.addCommand(annotate(command, { effects: NO_EFFECTS }));
|
|
622
385
|
}, "addZoomSkillCommandsDefinition");
|
|
623
386
|
var addZoomSkillCommands = /* @__PURE__ */ __name((...args) => {
|
|
624
|
-
customizeSharedCommand(
|
|
387
|
+
customizeSharedCommand(sharedSkillCommand(ZM, new URL("../skills/zoom-cli/SKILL.md", new URL("../agent-skill.js", import.meta.url).href)), "Zoom installs its own meeting instructions through its source renderer and treats the packaged primary skill as effect-free.", () => {
|
|
625
388
|
addZoomSkillCommandsDefinition(...args);
|
|
626
389
|
const command = args[0].commands.find((command2) => command2.name() === "skill");
|
|
627
390
|
if (!command)
|
|
@@ -630,14 +393,25 @@ var addZoomSkillCommands = /* @__PURE__ */ __name((...args) => {
|
|
|
630
393
|
}, SHELL_OVERRIDES.skill);
|
|
631
394
|
}, "addZoomSkillCommands");
|
|
632
395
|
|
|
396
|
+
// dist/archive-commands.js
|
|
397
|
+
import { CliError as CliError7 } from "@wirecat/cli-base";
|
|
398
|
+
import { annotate as annotate2 } from "@wirecat/cli-base/commands";
|
|
399
|
+
import { timezoneOf } from "@wirecat/cli-base/query";
|
|
400
|
+
import { FETCH, itemOf, LOCAL_READ, LOCAL_WRITE as LOCAL_WRITE2, listQuery, NO_EFFECTS as NO_EFFECTS2, REMOTE_READ, recordingWindows as recordingWindows2, typedQuery, unfilteredQuery, withQuery } from "@wirecat/cli-core";
|
|
401
|
+
|
|
633
402
|
// dist/recording-archive.js
|
|
634
403
|
import { lstat, mkdir, realpath as realpath2, unlink } from "node:fs/promises";
|
|
635
404
|
import { join as join2 } from "node:path";
|
|
405
|
+
import { CliError as CliError4, isCliError as isCliError3 } from "@wirecat/cli-base";
|
|
406
|
+
import { retryableStatus, statusToCode as statusToCode2 } from "@wirecat/cli-base/http";
|
|
407
|
+
import { transferRecording, withAttempt } from "@wirecat/cli-core";
|
|
636
408
|
|
|
637
409
|
// dist/recording-manifest.js
|
|
638
410
|
import { createHash } from "node:crypto";
|
|
639
411
|
import { readdir, realpath } from "node:fs/promises";
|
|
640
412
|
import { join } from "node:path";
|
|
413
|
+
import { CliError, isCliError } from "@wirecat/cli-base";
|
|
414
|
+
import { openOrdinaryFile, writeFileAtomic } from "@wirecat/cli-core";
|
|
641
415
|
var digest = /* @__PURE__ */ __name((text2) => createHash("sha256").update(text2).digest("hex"), "digest");
|
|
642
416
|
var manifestName = /* @__PURE__ */ __name((uuid) => `.zoom-archive-${digest(uuid)}.json`, "manifestName");
|
|
643
417
|
var filename = /* @__PURE__ */ __name((uuid, asset) => `${digest(uuid)}-${digest(asset.id ?? "")}.${/^(mp4|m4a|mp3|wav|vtt|txt|json)$/i.test(asset.format ?? "") ? asset.format?.toLowerCase() : "bin"}`, "filename");
|
|
@@ -788,10 +562,11 @@ var verifyArchive = /* @__PURE__ */ __name(async (destination, options = {}) =>
|
|
|
788
562
|
}, "verifyArchive");
|
|
789
563
|
|
|
790
564
|
// dist/recording-partial-store.js
|
|
791
|
-
|
|
565
|
+
import { NativeRecordingPartialStore } from "@wirecat/cli-core";
|
|
566
|
+
var operation = /* @__PURE__ */ __name(async (run2, signal) => {
|
|
792
567
|
checkCancelled(signal);
|
|
793
568
|
try {
|
|
794
|
-
return await
|
|
569
|
+
return await run2();
|
|
795
570
|
} catch (error) {
|
|
796
571
|
checkCancelled(signal);
|
|
797
572
|
throw error;
|
|
@@ -821,6 +596,7 @@ var RecordingPartialStore = class extends NativeRecordingPartialStore {
|
|
|
821
596
|
};
|
|
822
597
|
|
|
823
598
|
// dist/recording-promotion-store.js
|
|
599
|
+
import { NativeRecordingPublication, strongRecordingValidator } from "@wirecat/cli-core";
|
|
824
600
|
var scope = /* @__PURE__ */ __name((locator) => [
|
|
825
601
|
locator.provider,
|
|
826
602
|
locator.account,
|
|
@@ -869,11 +645,13 @@ var recordingPromotion = /* @__PURE__ */ __name((locator, meeting2, file, comple
|
|
|
869
645
|
}), "recordingPromotion");
|
|
870
646
|
|
|
871
647
|
// dist/recording-writer-lease.js
|
|
648
|
+
import { CliError as CliError2 } from "@wirecat/cli-base";
|
|
649
|
+
import { nativeWriterLeaseStore } from "@wirecat/cli-core";
|
|
872
650
|
var writers = nativeWriterLeaseStore({ markerDirectory: ".zoom-archive-locks", legacyMarker: ".zoom-archive.lock" });
|
|
873
|
-
var operation2 = /* @__PURE__ */ __name(async (
|
|
651
|
+
var operation2 = /* @__PURE__ */ __name(async (run2, signal) => {
|
|
874
652
|
checkCancelled(signal);
|
|
875
653
|
try {
|
|
876
|
-
return await
|
|
654
|
+
return await run2();
|
|
877
655
|
} catch (error) {
|
|
878
656
|
checkCancelled(signal);
|
|
879
657
|
throw error;
|
|
@@ -884,14 +662,16 @@ var recoverArchiveLocks = /* @__PURE__ */ __name((destination, options = {}) =>
|
|
|
884
662
|
var acquireArchiveWriter = /* @__PURE__ */ __name((destination, signal) => operation2(async () => {
|
|
885
663
|
const ownership = await writers.acquire(destination, { signal });
|
|
886
664
|
if (ownership.status === "busy")
|
|
887
|
-
throw new
|
|
665
|
+
throw new CliError2("validation_error", "archive is locked; inspect or recover stale local locks");
|
|
888
666
|
if (ownership.status === "legacy")
|
|
889
|
-
throw new
|
|
667
|
+
throw new CliError2("validation_error", "archive has an unrecognized legacy lock");
|
|
890
668
|
return ownership.lease;
|
|
891
669
|
}, signal), "acquireArchiveWriter");
|
|
892
670
|
|
|
893
671
|
// dist/remote-http.js
|
|
894
672
|
import { setTimeout } from "node:timers/promises";
|
|
673
|
+
import { CliError as CliError3, isCliError as isCliError2 } from "@wirecat/cli-base";
|
|
674
|
+
import { providerWaitMs, readJsonResponse, retrying, statusToCode } from "@wirecat/cli-base/http";
|
|
895
675
|
var ZOOM_RETRY = { retries: 2, baseDelayMs: 250, maxDelayMs: 1e3, maxRetryAfterMs: 3e4 };
|
|
896
676
|
var operationSignal = /* @__PURE__ */ __name((signal) => signal ?? AbortSignal.timeout(36e5), "operationSignal");
|
|
897
677
|
var downloadTarget = /* @__PURE__ */ __name((input, what, base) => {
|
|
@@ -899,10 +679,10 @@ var downloadTarget = /* @__PURE__ */ __name((input, what, base) => {
|
|
|
899
679
|
try {
|
|
900
680
|
target = new URL(input, base);
|
|
901
681
|
} catch {
|
|
902
|
-
throw new
|
|
682
|
+
throw new CliError3("invalid_response", `Zoom returned an unexpected ${what} download host`);
|
|
903
683
|
}
|
|
904
684
|
if (target.protocol !== "https:" || target.username || target.password || target.port && target.port !== "443" || !/(^|\.)zoom\.(us|com)$/.test(target.hostname))
|
|
905
|
-
throw new
|
|
685
|
+
throw new CliError3("invalid_response", `Zoom returned an unexpected ${what} download host`);
|
|
906
686
|
return target;
|
|
907
687
|
}, "downloadTarget");
|
|
908
688
|
var ZoomRemote = class {
|
|
@@ -941,7 +721,7 @@ var ZoomRemote = class {
|
|
|
941
721
|
return await this.fetcher(input, wire);
|
|
942
722
|
} catch {
|
|
943
723
|
checkCancelled(signal);
|
|
944
|
-
throw new
|
|
724
|
+
throw new CliError3("network_error", "Zoom request could not be completed", { retryable: true });
|
|
945
725
|
}
|
|
946
726
|
}, "send");
|
|
947
727
|
const init = { headers: { authorization: `Bearer ${accessToken}` }, redirect: "manual", signal };
|
|
@@ -977,7 +757,7 @@ var ZoomRemote = class {
|
|
|
977
757
|
const location = response.headers.get("location");
|
|
978
758
|
await response.body?.cancel();
|
|
979
759
|
if (!location || redirects >= 5)
|
|
980
|
-
throw new
|
|
760
|
+
throw new CliError3("invalid_response", `Zoom returned invalid ${what} redirects`);
|
|
981
761
|
target = downloadTarget(location, what, target);
|
|
982
762
|
}
|
|
983
763
|
}
|
|
@@ -990,12 +770,12 @@ var ZoomRemote = class {
|
|
|
990
770
|
async perform(path, scope2, options, missingCode) {
|
|
991
771
|
const method = options.method ?? "GET";
|
|
992
772
|
if (options.maxResponseBytes !== void 0 && (method !== "GET" || !Number.isSafeInteger(options.maxResponseBytes) || options.maxResponseBytes < 1))
|
|
993
|
-
throw new
|
|
773
|
+
throw new CliError3("validation_error", "maxResponseBytes requires GET and a positive safe integer");
|
|
994
774
|
const signal = operationSignal(options.signal);
|
|
995
775
|
checkCancelled(signal);
|
|
996
776
|
const tokens = await this.tokens.tokens();
|
|
997
777
|
if (![scope2, `${scope2}:admin`, `${scope2}:master`].some((grant) => tokens.scopes.includes(grant)))
|
|
998
|
-
throw new
|
|
778
|
+
throw new CliError3("configuration_error", `Zoom scope ${scope2} is missing; add it to the app and run zm <profile> session start again`);
|
|
999
779
|
checkCancelled(signal);
|
|
1000
780
|
let response;
|
|
1001
781
|
if (method === "GET")
|
|
@@ -1010,11 +790,11 @@ var ZoomRemote = class {
|
|
|
1010
790
|
signal
|
|
1011
791
|
});
|
|
1012
792
|
} catch {
|
|
1013
|
-
throw new
|
|
793
|
+
throw new CliError3("outcome_unknown", "Zoom mutation did not finish; verify remote state before retrying");
|
|
1014
794
|
}
|
|
1015
795
|
}
|
|
1016
796
|
if (method !== "GET" && signal.aborted)
|
|
1017
|
-
throw new
|
|
797
|
+
throw new CliError3("outcome_unknown", "Zoom mutation was interrupted after dispatch; verify remote state before retrying");
|
|
1018
798
|
if (response.status === 204)
|
|
1019
799
|
return {};
|
|
1020
800
|
let value;
|
|
@@ -1023,26 +803,26 @@ var ZoomRemote = class {
|
|
|
1023
803
|
} catch (error) {
|
|
1024
804
|
if (method === "GET") {
|
|
1025
805
|
checkCancelled(signal);
|
|
1026
|
-
if (response.ok &&
|
|
806
|
+
if (response.ok && isCliError2(error))
|
|
1027
807
|
throw error;
|
|
1028
808
|
}
|
|
1029
809
|
if (response.ok)
|
|
1030
|
-
throw new
|
|
810
|
+
throw new CliError3(method === "GET" ? "invalid_response" : "outcome_unknown", method === "GET" ? "Zoom returned an invalid response" : "Zoom mutation returned an invalid response; verify remote state before retrying");
|
|
1031
811
|
value = {};
|
|
1032
812
|
}
|
|
1033
813
|
if (method !== "GET" && signal.aborted)
|
|
1034
|
-
throw new
|
|
814
|
+
throw new CliError3("outcome_unknown", "Zoom mutation was interrupted after dispatch; verify remote state before retrying");
|
|
1035
815
|
const body = typeof value === "object" && value !== null && !Array.isArray(value) ? object(value) : {};
|
|
1036
816
|
if (body.code === 4711)
|
|
1037
|
-
throw new
|
|
817
|
+
throw new CliError3("authentication_error", `Zoom scope ${scope2} is missing; add it to the app and run zm <profile> session start again`);
|
|
1038
818
|
if (response.status === 404 && missingCode !== void 0 && body.code === missingCode)
|
|
1039
819
|
return null;
|
|
1040
820
|
if (!response.ok || typeof body.code === "number" && body.code !== 0)
|
|
1041
|
-
throw new
|
|
821
|
+
throw new CliError3(body.code === 200 ? "permission_error" : statusToCode(response.status), `Zoom request failed (HTTP ${response.status}${typeof body.code === "number" ? `, code ${body.code}` : ""})`);
|
|
1042
822
|
try {
|
|
1043
823
|
return object(value);
|
|
1044
824
|
} catch {
|
|
1045
|
-
throw new
|
|
825
|
+
throw new CliError3(method === "GET" ? "invalid_response" : "outcome_unknown", method === "GET" ? "Zoom returned an invalid response" : "Zoom mutation returned an invalid response; verify remote state before retrying");
|
|
1046
826
|
}
|
|
1047
827
|
}
|
|
1048
828
|
};
|
|
@@ -1051,23 +831,23 @@ var ZoomRemote = class {
|
|
|
1051
831
|
var validateDownloadOptions = /* @__PURE__ */ __name((options) => {
|
|
1052
832
|
const maxBytes2 = options.maxBytes === void 0 ? 20 * 1024 ** 3 : options.maxBytes;
|
|
1053
833
|
if (typeof options.destination !== "string" || !options.destination.trim() || !Number.isSafeInteger(maxBytes2) || maxBytes2 <= 0)
|
|
1054
|
-
throw new
|
|
834
|
+
throw new CliError4("validation_error", "archive destination and positive download limit are required");
|
|
1055
835
|
if (options.resume !== void 0 && typeof options.resume !== "boolean")
|
|
1056
|
-
throw new
|
|
836
|
+
throw new CliError4("validation_error", "recording resume must be a boolean");
|
|
1057
837
|
if (typeof options.account !== "string" || !options.account.trim() || /[\0\r\n]/.test(options.account) || options.account.length > 1e3)
|
|
1058
|
-
throw new
|
|
838
|
+
throw new CliError4("validation_error", "recording account scope must be a nonempty identifier");
|
|
1059
839
|
if (options.fileIds !== void 0 && (!Array.isArray(options.fileIds) || options.fileIds.length === 0 || options.fileIds.some((id) => typeof id !== "string" || !id.trim())))
|
|
1060
|
-
throw new
|
|
840
|
+
throw new CliError4("validation_error", "recording selection must contain nonempty file ids");
|
|
1061
841
|
return maxBytes2;
|
|
1062
842
|
}, "validateDownloadOptions");
|
|
1063
843
|
var missing2 = /* @__PURE__ */ __name((error) => typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT", "missing");
|
|
1064
|
-
var DownloadFailure = class extends
|
|
844
|
+
var DownloadFailure = class extends CliError4 {
|
|
1065
845
|
static {
|
|
1066
846
|
__name(this, "DownloadFailure");
|
|
1067
847
|
}
|
|
1068
848
|
response;
|
|
1069
849
|
constructor(response) {
|
|
1070
|
-
super(
|
|
850
|
+
super(statusToCode2(response.status), `Recording download failed (HTTP ${response.status})`);
|
|
1071
851
|
this.response = response;
|
|
1072
852
|
}
|
|
1073
853
|
};
|
|
@@ -1083,7 +863,7 @@ var transferSource = /* @__PURE__ */ __name((remote, url, accessToken, format, s
|
|
|
1083
863
|
},
|
|
1084
864
|
unreachable: /* @__PURE__ */ __name(() => {
|
|
1085
865
|
checkCancelled(signal);
|
|
1086
|
-
return new
|
|
866
|
+
return new CliError4("network_error", "Recording download could not be completed");
|
|
1087
867
|
}, "unreachable")
|
|
1088
868
|
});
|
|
1089
869
|
if (![200, 206, 416].includes(response.status)) {
|
|
@@ -1092,7 +872,7 @@ var transferSource = /* @__PURE__ */ __name((remote, url, accessToken, format, s
|
|
|
1092
872
|
}
|
|
1093
873
|
if (response.status !== 416 && (!response.body || /\btext\/html\b/i.test(response.headers.get("content-type") ?? "") || format?.toUpperCase() !== "JSON" && /\bapplication\/json\b/i.test(response.headers.get("content-type") ?? "") || ![null, "identity"].includes(response.headers.get("content-encoding")))) {
|
|
1094
874
|
await response.body?.cancel();
|
|
1095
|
-
throw new
|
|
875
|
+
throw new CliError4("invalid_response", "Zoom returned an unexpected recording body");
|
|
1096
876
|
}
|
|
1097
877
|
const reader = response.body?.getReader();
|
|
1098
878
|
const abortReader = /* @__PURE__ */ __name(() => {
|
|
@@ -1115,7 +895,7 @@ var transferSource = /* @__PURE__ */ __name((remote, url, accessToken, format, s
|
|
|
1115
895
|
chunk = await reader.read();
|
|
1116
896
|
} catch {
|
|
1117
897
|
checkCancelled(signal);
|
|
1118
|
-
throw new
|
|
898
|
+
throw new CliError4("network_error", "Recording download could not be completed");
|
|
1119
899
|
}
|
|
1120
900
|
checkCancelled(signal);
|
|
1121
901
|
if (chunk.done)
|
|
@@ -1137,7 +917,7 @@ var archiveRecording = /* @__PURE__ */ __name(async (remote, meeting2, urls, opt
|
|
|
1137
917
|
checkCancelled(signal);
|
|
1138
918
|
const maxBytes2 = validateDownloadOptions(options);
|
|
1139
919
|
if (options.fileIds?.some((id) => !meeting2.assets.some((asset) => asset.id === id)))
|
|
1140
|
-
throw new
|
|
920
|
+
throw new CliError4("validation_error", "requested recording file was not found");
|
|
1141
921
|
let lock;
|
|
1142
922
|
try {
|
|
1143
923
|
await mkdir(options.destination, { recursive: true });
|
|
@@ -1174,7 +954,7 @@ var archiveRecording = /* @__PURE__ */ __name(async (remote, meeting2, urls, opt
|
|
|
1174
954
|
const unchanged = seen !== void 0 && stat2?.isFile() === true && seen.size === stat2.size && seen.mtimeMs === stat2.mtimeMs && seen.sha256 === existing.sha256;
|
|
1175
955
|
const local = unchanged ? { size: seen.size, sha256: seen.sha256 } : await fingerprint(join2(root, existing.path), signal);
|
|
1176
956
|
if (existing.path !== path || existing.remoteSize !== asset.size || existing.startedAt !== asset.startedAt || existing.endedAt !== asset.endedAt || existing.size !== local.size || existing.sha256 !== local.sha256)
|
|
1177
|
-
throw new
|
|
957
|
+
throw new CliError4("validation_error", "existing recording has changed; choose a new archive destination");
|
|
1178
958
|
if (!unchanged)
|
|
1179
959
|
await remember(existing.path, existing.sha256);
|
|
1180
960
|
report.skipped.push(existing);
|
|
@@ -1214,7 +994,7 @@ var archiveRecording = /* @__PURE__ */ __name(async (remote, meeting2, urls, opt
|
|
|
1214
994
|
}
|
|
1215
995
|
if (present) {
|
|
1216
996
|
if (!persistent)
|
|
1217
|
-
throw new
|
|
997
|
+
throw new CliError4("validation_error", "recording path already exists without a verified manifest or scoped recovery record");
|
|
1218
998
|
const intent = await publication.recover(storage.path, () => storage.load(locator), async (value) => {
|
|
1219
999
|
manifest.files.push(value.file);
|
|
1220
1000
|
await writeManifest(root, manifest);
|
|
@@ -1232,14 +1012,14 @@ var archiveRecording = /* @__PURE__ */ __name(async (remote, meeting2, urls, opt
|
|
|
1232
1012
|
const transferred = await withAttempt({ attempt: attempt + 1, ...waitMs === void 0 ? {} : { waitMs } }, () => transferRecording(transferSource(remote, urls.get(id) ?? "", tokens.accessToken, format, signal), storage, { locator, maxBytes: maxBytes2, expectedSize: asset.size, signal }));
|
|
1233
1013
|
entry = { ...metadata, size: transferred.size, sha256: transferred.sha256 };
|
|
1234
1014
|
if (asset.size !== null && entry.size !== asset.size)
|
|
1235
|
-
throw new
|
|
1015
|
+
throw new CliError4("invalid_response", "recording download size does not match Zoom metadata");
|
|
1236
1016
|
checkCancelled(signal);
|
|
1237
1017
|
if (persistent && storage.completed)
|
|
1238
1018
|
await publication.write(recordingPromotion(locator, promotionMeeting, entry, storage.completed));
|
|
1239
1019
|
checkCancelled(signal);
|
|
1240
1020
|
await publication.publish(temp, entry, async () => {
|
|
1241
1021
|
if (!entry)
|
|
1242
|
-
throw new
|
|
1022
|
+
throw new CliError4("invalid_response", "recording transfer did not produce a verified receipt");
|
|
1243
1023
|
manifest.files.push(entry);
|
|
1244
1024
|
await writeManifest(root, manifest);
|
|
1245
1025
|
});
|
|
@@ -1248,7 +1028,7 @@ var archiveRecording = /* @__PURE__ */ __name(async (remote, meeting2, urls, opt
|
|
|
1248
1028
|
if (!persistent)
|
|
1249
1029
|
await unlink(temp).catch(() => void 0);
|
|
1250
1030
|
checkCancelled(signal);
|
|
1251
|
-
const retryable = error instanceof DownloadFailure ? retryableStatus(error.response.status) :
|
|
1031
|
+
const retryable = error instanceof DownloadFailure ? retryableStatus(error.response.status) : isCliError3(error) && error.code === "network_error";
|
|
1252
1032
|
if (attempt >= 2 || !retryable)
|
|
1253
1033
|
throw error;
|
|
1254
1034
|
const paused = performance.now();
|
|
@@ -1258,7 +1038,7 @@ var archiveRecording = /* @__PURE__ */ __name(async (remote, meeting2, urls, opt
|
|
|
1258
1038
|
}
|
|
1259
1039
|
}
|
|
1260
1040
|
if (!entry)
|
|
1261
|
-
throw new
|
|
1041
|
+
throw new CliError4("invalid_response", "recording transfer did not produce a verified receipt");
|
|
1262
1042
|
await remember(entry.path, entry.sha256);
|
|
1263
1043
|
report.downloaded.push(entry);
|
|
1264
1044
|
}
|
|
@@ -1269,9 +1049,9 @@ var archiveRecording = /* @__PURE__ */ __name(async (remote, meeting2, urls, opt
|
|
|
1269
1049
|
return report;
|
|
1270
1050
|
} catch (error) {
|
|
1271
1051
|
checkCancelled(signal);
|
|
1272
|
-
if (
|
|
1052
|
+
if (isCliError3(error))
|
|
1273
1053
|
throw error;
|
|
1274
|
-
throw new
|
|
1054
|
+
throw new CliError4("provider_error", "archive operation could not be completed");
|
|
1275
1055
|
} finally {
|
|
1276
1056
|
await lock?.release();
|
|
1277
1057
|
}
|
|
@@ -1280,32 +1060,36 @@ var archiveRecording = /* @__PURE__ */ __name(async (remote, meeting2, urls, opt
|
|
|
1280
1060
|
// dist/recording-sync.js
|
|
1281
1061
|
import { createHash as createHash2 } from "node:crypto";
|
|
1282
1062
|
import { join as join4, resolve as resolve2 } from "node:path";
|
|
1063
|
+
import { CliError as CliError6 } from "@wirecat/cli-base";
|
|
1064
|
+
import { RecordingSyncError, recordingWindows, syncRecordingArchive as syncArchive } from "@wirecat/cli-core";
|
|
1283
1065
|
|
|
1284
1066
|
// dist/recording-sync-store.js
|
|
1285
1067
|
import { randomUUID } from "node:crypto";
|
|
1286
1068
|
import { lstat as lstat2, mkdir as mkdir2, open, rmdir, unlink as unlink2 } from "node:fs/promises";
|
|
1287
1069
|
import { hostname } from "node:os";
|
|
1288
1070
|
import { dirname, join as join3, resolve } from "node:path";
|
|
1071
|
+
import { CliError as CliError5 } from "@wirecat/cli-base";
|
|
1072
|
+
import { openOrdinaryFile as openOrdinaryFile2, parseRecordingSyncCheckpoint, writeFileAtomic as writeFileAtomic2 } from "@wirecat/cli-core";
|
|
1289
1073
|
var maxBytes = 8 * 1024 ** 2;
|
|
1290
1074
|
var ownerByteLimit = 32 * 1024;
|
|
1291
1075
|
var code = /* @__PURE__ */ __name((error) => error?.code, "code");
|
|
1292
1076
|
var conflict = /* @__PURE__ */ __name((message) => {
|
|
1293
|
-
throw new
|
|
1077
|
+
throw new CliError5("configuration_error", message);
|
|
1294
1078
|
}, "conflict");
|
|
1295
1079
|
var boundedJson = /* @__PURE__ */ __name(async (path, limit) => {
|
|
1296
|
-
const file = await
|
|
1080
|
+
const file = await openOrdinaryFile2(path);
|
|
1297
1081
|
try {
|
|
1298
1082
|
const size = (await file.stat()).size;
|
|
1299
1083
|
if (size > limit)
|
|
1300
|
-
throw new
|
|
1084
|
+
throw new CliError5("validation_error", "archive checkpoint exceeds its byte limit");
|
|
1301
1085
|
const content = Buffer.alloc(size + 1);
|
|
1302
1086
|
const { bytesRead } = await file.read(content, 0, content.length, 0);
|
|
1303
1087
|
if (bytesRead !== size || bytesRead > limit)
|
|
1304
|
-
throw new
|
|
1088
|
+
throw new CliError5("validation_error", "archive checkpoint changed while reading");
|
|
1305
1089
|
try {
|
|
1306
1090
|
return JSON.parse(new TextDecoder("utf-8", { fatal: true }).decode(content.subarray(0, bytesRead)));
|
|
1307
1091
|
} catch {
|
|
1308
|
-
throw new
|
|
1092
|
+
throw new CliError5("validation_error", "archive checkpoint contains invalid JSON");
|
|
1309
1093
|
}
|
|
1310
1094
|
} finally {
|
|
1311
1095
|
await file.close();
|
|
@@ -1329,11 +1113,11 @@ var alive = /* @__PURE__ */ __name((pid) => {
|
|
|
1329
1113
|
}, "alive");
|
|
1330
1114
|
function fileRecordingSyncCheckpointStore(path) {
|
|
1331
1115
|
if (typeof path !== "string" || !path.trim())
|
|
1332
|
-
throw new
|
|
1116
|
+
throw new CliError5("validation_error", "archive checkpoint path is required");
|
|
1333
1117
|
const checkpointPath2 = resolve(path);
|
|
1334
|
-
const
|
|
1335
|
-
const marker = join3(
|
|
1336
|
-
const recoveryPath = `${
|
|
1118
|
+
const lockPath = `${checkpointPath2}.lock`;
|
|
1119
|
+
const marker = join3(lockPath, "owner.json");
|
|
1120
|
+
const recoveryPath = `${lockPath}.recovery`;
|
|
1337
1121
|
const owners = /* @__PURE__ */ new Map();
|
|
1338
1122
|
const readOwner = /* @__PURE__ */ __name(async () => {
|
|
1339
1123
|
try {
|
|
@@ -1362,14 +1146,14 @@ function fileRecordingSyncCheckpointStore(path) {
|
|
|
1362
1146
|
return {
|
|
1363
1147
|
async acquire(jobId) {
|
|
1364
1148
|
if (typeof jobId !== "string" || !jobId.trim() || jobId.length > 4096)
|
|
1365
|
-
throw new
|
|
1149
|
+
throw new CliError5("validation_error", "archive checkpoint job id is required");
|
|
1366
1150
|
await mkdir2(dirname(checkpointPath2), { recursive: true, mode: 448 });
|
|
1367
1151
|
try {
|
|
1368
|
-
await mkdir2(
|
|
1152
|
+
await mkdir2(lockPath, { mode: 448 });
|
|
1369
1153
|
} catch (error) {
|
|
1370
1154
|
if (code(error) !== "EEXIST")
|
|
1371
1155
|
throw error;
|
|
1372
|
-
const folder = await lstat2(
|
|
1156
|
+
const folder = await lstat2(lockPath);
|
|
1373
1157
|
if (!folder.isDirectory() || folder.isSymbolicLink())
|
|
1374
1158
|
return conflict("archive checkpoint lock must be an ordinary directory");
|
|
1375
1159
|
try {
|
|
@@ -1387,8 +1171,8 @@ function fileRecordingSyncCheckpointStore(path) {
|
|
|
1387
1171
|
if (verified.token !== prior.token)
|
|
1388
1172
|
return conflict("archive checkpoint lock changed during stale recovery");
|
|
1389
1173
|
await unlink2(marker);
|
|
1390
|
-
await rmdir(
|
|
1391
|
-
await mkdir2(
|
|
1174
|
+
await rmdir(lockPath);
|
|
1175
|
+
await mkdir2(lockPath, { mode: 448 });
|
|
1392
1176
|
} finally {
|
|
1393
1177
|
await rmdir(recoveryPath);
|
|
1394
1178
|
}
|
|
@@ -1407,7 +1191,7 @@ function fileRecordingSyncCheckpointStore(path) {
|
|
|
1407
1191
|
async release() {
|
|
1408
1192
|
await own(jobId, owner.token);
|
|
1409
1193
|
await unlink2(marker);
|
|
1410
|
-
await rmdir(
|
|
1194
|
+
await rmdir(lockPath);
|
|
1411
1195
|
owners.delete(owner.token);
|
|
1412
1196
|
}
|
|
1413
1197
|
};
|
|
@@ -1424,8 +1208,8 @@ function fileRecordingSyncCheckpointStore(path) {
|
|
|
1424
1208
|
return conflict("archive checkpoint revision changed");
|
|
1425
1209
|
const content = JSON.stringify(state);
|
|
1426
1210
|
if (Buffer.byteLength(content) > maxBytes)
|
|
1427
|
-
throw new
|
|
1428
|
-
await
|
|
1211
|
+
throw new CliError5("validation_error", "archive checkpoint exceeds its byte limit");
|
|
1212
|
+
await writeFileAtomic2(checkpointPath2, content, {
|
|
1429
1213
|
beforePublish: /* @__PURE__ */ __name(() => own(jobId, token), "beforePublish")
|
|
1430
1214
|
});
|
|
1431
1215
|
}
|
|
@@ -1443,7 +1227,7 @@ var inspectRecordingSyncCheckpoint = /* @__PURE__ */ __name(async (path) => {
|
|
|
1443
1227
|
}, "inspectRecordingSyncCheckpoint");
|
|
1444
1228
|
|
|
1445
1229
|
// dist/recording-sync.js
|
|
1446
|
-
async function*
|
|
1230
|
+
async function* syncRecordingArchive(recordings, input) {
|
|
1447
1231
|
const options = { ...input };
|
|
1448
1232
|
let signal;
|
|
1449
1233
|
try {
|
|
@@ -1451,16 +1235,16 @@ async function* syncRecordingArchive2(recordings, input) {
|
|
|
1451
1235
|
const maxBytes2 = validateDownloadOptions(options);
|
|
1452
1236
|
const resume = options.resume === true;
|
|
1453
1237
|
if (!resume && (options.checkpointPath !== void 0 || options.checkpointStore !== void 0))
|
|
1454
|
-
throw new
|
|
1238
|
+
throw new CliError6("validation_error", "archive checkpoints require resume mode");
|
|
1455
1239
|
if (options.checkpointPath !== void 0 && (typeof options.checkpointPath !== "string" || !options.checkpointPath.trim()))
|
|
1456
|
-
throw new
|
|
1240
|
+
throw new CliError6("validation_error", "archive checkpoint path is required");
|
|
1457
1241
|
const account = options.account;
|
|
1458
1242
|
signal = operationSignal(options.signal);
|
|
1459
1243
|
checkCancelled(signal);
|
|
1460
1244
|
const catalog = recordings.catalog(account);
|
|
1461
1245
|
const configKey = createHash2("sha256").update(JSON.stringify({ version: 1, destination: resolve2(options.destination), maxBytes: maxBytes2 })).digest("hex");
|
|
1462
1246
|
const checkpointStore = resume ? options.checkpointStore ?? fileRecordingSyncCheckpointStore(options.checkpointPath ?? join4(options.destination, ".zoom-archive-sync.json")) : void 0;
|
|
1463
|
-
const receipts =
|
|
1247
|
+
const receipts = syncArchive(catalog, {
|
|
1464
1248
|
scope: { provider: "zoom", account },
|
|
1465
1249
|
from: options.from,
|
|
1466
1250
|
to: options.to,
|
|
@@ -1496,31 +1280,31 @@ async function* syncRecordingArchive2(recordings, input) {
|
|
|
1496
1280
|
throw error;
|
|
1497
1281
|
}
|
|
1498
1282
|
}
|
|
1499
|
-
__name(
|
|
1283
|
+
__name(syncRecordingArchive, "syncRecordingArchive");
|
|
1500
1284
|
|
|
1501
1285
|
// dist/archive-commands.js
|
|
1502
|
-
var label = /* @__PURE__ */ __name((command, example, effects) =>
|
|
1286
|
+
var label = /* @__PURE__ */ __name((command, example, effects) => annotate2(command, { origin: "handwritten", effects, examples: Array.isArray(example) ? example : [example] }), "label");
|
|
1503
1287
|
var positive = /* @__PURE__ */ __name((text2) => {
|
|
1504
1288
|
const value = bytes(text2);
|
|
1505
1289
|
if (value === 0)
|
|
1506
|
-
throw new
|
|
1290
|
+
throw new CliError7("validation_error", "expected a positive number");
|
|
1507
1291
|
return value;
|
|
1508
1292
|
}, "positive");
|
|
1509
1293
|
var discoveryLimit = /* @__PURE__ */ __name((text2) => {
|
|
1510
1294
|
const value = positive(text2);
|
|
1511
1295
|
if (value > 1e4)
|
|
1512
|
-
throw new
|
|
1296
|
+
throw new CliError7("validation_error", "archive discovery limit must be between 1 and 10000");
|
|
1513
1297
|
return value;
|
|
1514
1298
|
}, "discoveryLimit");
|
|
1515
1299
|
var archiveScope = /* @__PURE__ */ __name((deps, options) => {
|
|
1516
1300
|
const account = deps.account();
|
|
1517
1301
|
if (!account)
|
|
1518
|
-
throw new
|
|
1302
|
+
throw new CliError7("configuration_error", "recording archives belong to a profile: `zm <profile> recordings \u2026`");
|
|
1519
1303
|
const resume = options.resume ?? true;
|
|
1520
1304
|
if (options.checkpoint !== void 0 && !resume)
|
|
1521
|
-
throw new
|
|
1305
|
+
throw new CliError7("validation_error", "archive checkpoints require resume mode; remove --no-resume");
|
|
1522
1306
|
if (options.checkpoint !== void 0 && !options.checkpoint.trim())
|
|
1523
|
-
throw new
|
|
1307
|
+
throw new CliError7("validation_error", "archive checkpoint path must be nonempty");
|
|
1524
1308
|
return { account, resume };
|
|
1525
1309
|
}, "archiveScope");
|
|
1526
1310
|
var resumable = /* @__PURE__ */ __name((command) => command.option("--resume", "resume verified partial downloads and archive progress; requires a local profile").option("--no-resume", "disable persistent resume state for this invocation"), "resumable");
|
|
@@ -1528,12 +1312,12 @@ var localZone = /* @__PURE__ */ __name((given) => {
|
|
|
1528
1312
|
try {
|
|
1529
1313
|
return timezoneOf(given);
|
|
1530
1314
|
} catch {
|
|
1531
|
-
throw new
|
|
1315
|
+
throw new CliError7("validation_error", "--timezone must be an IANA timezone such as Europe/Madrid");
|
|
1532
1316
|
}
|
|
1533
1317
|
}, "localZone");
|
|
1534
1318
|
var localDay = /* @__PURE__ */ __name((now, zone) => new Intl.DateTimeFormat("en-CA", { timeZone: zone, year: "numeric", month: "2-digit", day: "2-digit" }).format(now), "localDay");
|
|
1535
1319
|
var addArchiveCommands = /* @__PURE__ */ __name((program, deps) => {
|
|
1536
|
-
const recordings =
|
|
1320
|
+
const recordings = annotate2(program.command("recordings"), { effects: NO_EFFECTS2 }).description("cloud recording assets and verified local archives");
|
|
1537
1321
|
const recordingsQuery = unfilteredQuery("zoom_recording", ZOOM_ANSWER_ENTITIES["recordings list"].schema);
|
|
1538
1322
|
label(withQuery(recordings.command("list"), recordingsQuery).description("list cloud recording occurrences (last 30 days by default)").option("--since-time <time>", "first day, YYYY-MM-DD").option("--until-time <time>", "last day, YYYY-MM-DD (default today in --timezone)").option("--timezone <zone>", "IANA timezone of today (default the computer's)").action(async (words, options) => {
|
|
1539
1323
|
listQuery(typedQuery(words), recordingsQuery, "recordings list");
|
|
@@ -1542,7 +1326,7 @@ var addArchiveCommands = /* @__PURE__ */ __name((program, deps) => {
|
|
|
1542
1326
|
const to = options.untilTime ?? localDay(deps.now(), zone);
|
|
1543
1327
|
const end2 = Date.parse(`${to}T00:00:00Z`);
|
|
1544
1328
|
if (!/^\d{4}-\d{2}-\d{2}$/.test(to) || !Number.isFinite(end2) || new Date(end2).toISOString().slice(0, 10) !== to)
|
|
1545
|
-
throw new
|
|
1329
|
+
throw new CliError7("validation_error", "--until-time must be a real YYYY-MM-DD date");
|
|
1546
1330
|
const from = options.sinceTime ?? new Date(end2 - 30 * 864e5).toISOString().slice(0, 10);
|
|
1547
1331
|
const list = wholeList("recordings list", await deps.recordings().list({ from, to, signal: deps.signal() }));
|
|
1548
1332
|
deps.output(options.untilTime === void 0 ? { ...list, meta: { timezone: zone } } : list);
|
|
@@ -1554,7 +1338,7 @@ var addArchiveCommands = /* @__PURE__ */ __name((program, deps) => {
|
|
|
1554
1338
|
label(resumable(runsLong(recordings.command("download")).description("download one recording or a date range into a verified, resumable archive").argument("[meeting]", "meeting id or occurrence UUID; omit when downloading a date range").requiredOption("--output-dir <dir>", "explicit archive directory").option("--since-time <time>", "first day of a date range, YYYY-MM-DD").option("--until-time <time>", "last day of a date range, YYYY-MM-DD; at most ten years after the first").option("--file-ids <ids>", "comma-separated recording file ids; only with a meeting").option("--max-bytes <bytes>", "per-file download byte limit (default 20 GiB)", positive)).option("--checkpoint <file>", "date-range checkpoint file; implies resume").option("--recheck-since-time <time>", "look again from this day for late recordings in a date range").option("--max-pages <pages>", "date-range catalog page limit from 1 through 10000 (default 1000)", discoveryLimit).option("--max-entries <n>", "date-range occurrence limit from 1 through 10000 (default 10000)", discoveryLimit).action(async (id, options) => {
|
|
1555
1339
|
if (id !== void 0) {
|
|
1556
1340
|
if (!id.trim() || id.includes("\0"))
|
|
1557
|
-
throw new
|
|
1341
|
+
throw new CliError7("validation_error", "a meeting id or occurrence UUID is required");
|
|
1558
1342
|
if ([
|
|
1559
1343
|
options.sinceTime,
|
|
1560
1344
|
options.untilTime,
|
|
@@ -1563,7 +1347,7 @@ var addArchiveCommands = /* @__PURE__ */ __name((program, deps) => {
|
|
|
1563
1347
|
options.maxPages,
|
|
1564
1348
|
options.maxEntries
|
|
1565
1349
|
].some((value) => value !== void 0))
|
|
1566
|
-
throw new
|
|
1350
|
+
throw new CliError7("validation_error", "choose one meeting or date-range options, not both");
|
|
1567
1351
|
const request = {
|
|
1568
1352
|
destination: options.outputDir,
|
|
1569
1353
|
fileIds: options.fileIds?.split(",").map((one) => one.trim()),
|
|
@@ -1577,16 +1361,16 @@ var addArchiveCommands = /* @__PURE__ */ __name((program, deps) => {
|
|
|
1577
1361
|
return;
|
|
1578
1362
|
}
|
|
1579
1363
|
if (options.sinceTime === void 0 || options.untilTime === void 0)
|
|
1580
|
-
throw new
|
|
1364
|
+
throw new CliError7("validation_error", "provide a meeting id or both --since-time and --until-time");
|
|
1581
1365
|
if (options.fileIds !== void 0)
|
|
1582
|
-
throw new
|
|
1366
|
+
throw new CliError7("validation_error", "--file-ids selects assets of one meeting; provide a meeting id");
|
|
1583
1367
|
const scope2 = archiveScope(deps, options);
|
|
1584
|
-
|
|
1368
|
+
recordingWindows2(options.sinceTime, options.untilTime);
|
|
1585
1369
|
if (options.recheckSinceTime !== void 0)
|
|
1586
|
-
|
|
1370
|
+
recordingWindows2(options.recheckSinceTime, options.recheckSinceTime);
|
|
1587
1371
|
validateDownloadOptions({ destination: options.outputDir, maxBytes: options.maxBytes, ...scope2 });
|
|
1588
1372
|
deps.api();
|
|
1589
|
-
const receipts =
|
|
1373
|
+
const receipts = syncRecordingArchive(deps.recordings(), {
|
|
1590
1374
|
from: options.sinceTime,
|
|
1591
1375
|
to: options.untilTime,
|
|
1592
1376
|
destination: options.outputDir,
|
|
@@ -1608,7 +1392,7 @@ var addArchiveCommands = /* @__PURE__ */ __name((program, deps) => {
|
|
|
1608
1392
|
"zm personal recordings download example-occurrence --output-dir ./zoom-archive --dry-run --json",
|
|
1609
1393
|
"zm personal recordings download --since-time 2026-01-01 --until-time 2026-10-10 --output-dir ./zoom-archive --dry-run --jsonl"
|
|
1610
1394
|
], FETCH);
|
|
1611
|
-
const archive =
|
|
1395
|
+
const archive = annotate2(recordings.command("archive"), { effects: NO_EFFECTS2 }).description("inspect archives without Zoom or a database");
|
|
1612
1396
|
const transcriptOptions = /* @__PURE__ */ __name((command) => command.option("--uuid <uuid>", "select an occurrence UUID").option("--file-ids <ids>", "select comma-separated transcript asset ids").option("--max-bytes <bytes>", "largest transcript file to read, in bytes (default 8 MiB)", positive), "transcriptOptions");
|
|
1613
1397
|
const selected = /* @__PURE__ */ __name((options) => ({
|
|
1614
1398
|
uuid: options.uuid,
|
|
@@ -1625,38 +1409,40 @@ var addArchiveCommands = /* @__PURE__ */ __name((program, deps) => {
|
|
|
1625
1409
|
label(archive.command("recover").description("preview removing stale locks; --yes removes them").argument("<directory>", "archive folder").option("--yes", "remove recognized locks left by a dead local process").option("--dry-run", "preview only, including when --yes is present").action(async (directory, options) => deps.output(itemOf(await deps.archive.recover(directory, {
|
|
1626
1410
|
apply: options.yes === true && !options.dryRun,
|
|
1627
1411
|
signal: deps.signal()
|
|
1628
|
-
})))), "zm personal recordings archive recover ./zoom-archive --dry-run --json",
|
|
1412
|
+
})))), "zm personal recordings archive recover ./zoom-archive --dry-run --json", LOCAL_WRITE2);
|
|
1629
1413
|
}, "addArchiveCommands");
|
|
1630
1414
|
|
|
1631
1415
|
// dist/archive-transcripts.js
|
|
1632
1416
|
import { createHash as createHash3 } from "node:crypto";
|
|
1633
1417
|
import { realpath as realpath3 } from "node:fs/promises";
|
|
1634
1418
|
import { join as join5 } from "node:path";
|
|
1419
|
+
import { CliError as CliError8, isCliError as isCliError4 } from "@wirecat/cli-base";
|
|
1420
|
+
import { openOrdinaryFile as openOrdinaryFile3, parseVtt } from "@wirecat/cli-core";
|
|
1635
1421
|
var validate = /* @__PURE__ */ __name((destination, options) => {
|
|
1636
1422
|
const maxBytes2 = options.maxBytes === void 0 ? 8 * 1024 ** 2 : options.maxBytes;
|
|
1637
1423
|
if (typeof destination !== "string" || !destination.trim() || !Number.isSafeInteger(maxBytes2) || maxBytes2 <= 0)
|
|
1638
|
-
throw new
|
|
1424
|
+
throw new CliError8("validation_error", "archive destination and positive transcript byte limit are required");
|
|
1639
1425
|
if (options.uuid !== void 0 && (typeof options.uuid !== "string" || !options.uuid.trim()))
|
|
1640
|
-
throw new
|
|
1426
|
+
throw new CliError8("validation_error", "archive occurrence UUID must be nonempty");
|
|
1641
1427
|
if (options.fileIds !== void 0 && (!Array.isArray(options.fileIds) || options.fileIds.length === 0 || options.fileIds.some((id) => typeof id !== "string" || !id.trim())))
|
|
1642
|
-
throw new
|
|
1428
|
+
throw new CliError8("validation_error", "archive transcript selection must contain nonempty file ids");
|
|
1643
1429
|
return maxBytes2;
|
|
1644
1430
|
}, "validate");
|
|
1645
1431
|
var readTranscript = /* @__PURE__ */ __name(async (destination, asset, maxBytes2, signal) => {
|
|
1646
1432
|
checkCancelled(signal);
|
|
1647
1433
|
if (asset.size > maxBytes2)
|
|
1648
|
-
throw new
|
|
1434
|
+
throw new CliError8("validation_error", "archive transcript exceeds the byte limit");
|
|
1649
1435
|
try {
|
|
1650
|
-
const file = await
|
|
1436
|
+
const file = await openOrdinaryFile3(join5(destination, asset.path));
|
|
1651
1437
|
try {
|
|
1652
1438
|
checkCancelled(signal);
|
|
1653
1439
|
const stat2 = await file.stat();
|
|
1654
1440
|
if (!stat2.isFile())
|
|
1655
|
-
throw new
|
|
1441
|
+
throw new CliError8("validation_error", "archive transcript must be an ordinary file");
|
|
1656
1442
|
if (stat2.size > maxBytes2)
|
|
1657
|
-
throw new
|
|
1443
|
+
throw new CliError8("validation_error", "archive transcript exceeds the byte limit");
|
|
1658
1444
|
if (stat2.size !== asset.size)
|
|
1659
|
-
throw new
|
|
1445
|
+
throw new CliError8("validation_error", "archive transcript failed size verification");
|
|
1660
1446
|
const hash = createHash3("sha256");
|
|
1661
1447
|
const chunks = [];
|
|
1662
1448
|
let size = 0;
|
|
@@ -1669,37 +1455,37 @@ var readTranscript = /* @__PURE__ */ __name(async (destination, asset, maxBytes2
|
|
|
1669
1455
|
break;
|
|
1670
1456
|
size += bytesRead;
|
|
1671
1457
|
if (size > maxBytes2)
|
|
1672
|
-
throw new
|
|
1458
|
+
throw new CliError8("validation_error", "archive transcript exceeds the byte limit");
|
|
1673
1459
|
const chunk = buffer.subarray(0, bytesRead);
|
|
1674
1460
|
hash.update(chunk);
|
|
1675
1461
|
chunks.push(chunk);
|
|
1676
1462
|
}
|
|
1677
1463
|
if (size !== asset.size || hash.digest("hex") !== asset.sha256)
|
|
1678
|
-
throw new
|
|
1464
|
+
throw new CliError8("validation_error", "archive transcript failed checksum verification");
|
|
1679
1465
|
let text2;
|
|
1680
1466
|
try {
|
|
1681
1467
|
text2 = new TextDecoder("utf-8", { fatal: true }).decode(Buffer.concat(chunks, size));
|
|
1682
1468
|
} catch {
|
|
1683
|
-
throw new
|
|
1469
|
+
throw new CliError8("validation_error", "archive transcript is not valid UTF-8");
|
|
1684
1470
|
}
|
|
1685
1471
|
try {
|
|
1686
1472
|
return parseVtt(text2);
|
|
1687
1473
|
} catch {
|
|
1688
|
-
throw new
|
|
1474
|
+
throw new CliError8("validation_error", "archive transcript is not valid WebVTT");
|
|
1689
1475
|
}
|
|
1690
1476
|
} finally {
|
|
1691
1477
|
await file.close();
|
|
1692
1478
|
}
|
|
1693
1479
|
} catch (error) {
|
|
1694
1480
|
checkCancelled(signal);
|
|
1695
|
-
if (
|
|
1481
|
+
if (isCliError4(error))
|
|
1696
1482
|
throw error;
|
|
1697
1483
|
const code2 = typeof error === "object" && error !== null && "code" in error ? error.code : null;
|
|
1698
1484
|
if (code2 === "ENOENT")
|
|
1699
|
-
throw new
|
|
1485
|
+
throw new CliError8("not_found", "archive transcript file was not found");
|
|
1700
1486
|
if (code2 === "ELOOP")
|
|
1701
|
-
throw new
|
|
1702
|
-
throw new
|
|
1487
|
+
throw new CliError8("validation_error", "archive transcript must not be a symlink");
|
|
1488
|
+
throw new CliError8("configuration_error", "archive transcript could not be read");
|
|
1703
1489
|
}
|
|
1704
1490
|
}, "readTranscript");
|
|
1705
1491
|
async function* readArchiveTranscripts(destination, options = {}) {
|
|
@@ -1710,15 +1496,15 @@ async function* readArchiveTranscripts(destination, options = {}) {
|
|
|
1710
1496
|
root = await realpath3(destination);
|
|
1711
1497
|
} catch {
|
|
1712
1498
|
checkCancelled(options.signal);
|
|
1713
|
-
throw new
|
|
1499
|
+
throw new CliError8("configuration_error", "archive destination could not be read");
|
|
1714
1500
|
}
|
|
1715
1501
|
const manifests = await inspectArchive(root, { signal: options.signal });
|
|
1716
1502
|
const selected = options.uuid === void 0 ? manifests : manifests.filter((item) => item.meeting.uuid === options.uuid);
|
|
1717
1503
|
if (options.uuid !== void 0 && selected.length === 0)
|
|
1718
|
-
throw new
|
|
1504
|
+
throw new CliError8("not_found", "archive occurrence UUID was not found");
|
|
1719
1505
|
const transcripts = selected.flatMap((manifest) => manifest.files.filter((asset) => asset.format?.toLowerCase() === "vtt").map((asset) => ({ manifest, asset })));
|
|
1720
1506
|
if (options.fileIds?.some((id) => !transcripts.some((item) => item.asset.id === id)))
|
|
1721
|
-
throw new
|
|
1507
|
+
throw new CliError8("not_found", "selected archive VTT file id was not found");
|
|
1722
1508
|
for (const { manifest, asset } of transcripts) {
|
|
1723
1509
|
checkCancelled(options.signal);
|
|
1724
1510
|
if (options.fileIds && !options.fileIds.includes(asset.id))
|
|
@@ -1732,7 +1518,7 @@ __name(readArchiveTranscripts, "readArchiveTranscripts");
|
|
|
1732
1518
|
var searchArchiveTranscripts = /* @__PURE__ */ __name(async (destination, query, options = {}) => {
|
|
1733
1519
|
const limit = options.limit === void 0 ? 100 : options.limit;
|
|
1734
1520
|
if (typeof query !== "string" || !query.trim() || !Number.isSafeInteger(limit) || limit < 1 || limit > 1e3)
|
|
1735
|
-
throw new
|
|
1521
|
+
throw new CliError8("validation_error", "archive search requires nonempty text and an integer limit from 1 through 1000");
|
|
1736
1522
|
const needle = query.normalize("NFC").toLowerCase();
|
|
1737
1523
|
const matches = [];
|
|
1738
1524
|
for await (const transcript of readArchiveTranscripts(destination, options))
|
|
@@ -1747,7 +1533,12 @@ var searchArchiveTranscripts = /* @__PURE__ */ __name(async (destination, query,
|
|
|
1747
1533
|
return { items: matches, page: 1, limit, hasMore: false };
|
|
1748
1534
|
}, "searchArchiveTranscripts");
|
|
1749
1535
|
|
|
1536
|
+
// dist/contacts.js
|
|
1537
|
+
import { CliError as CliError9 } from "@wirecat/cli-base";
|
|
1538
|
+
import { formatReference } from "@wirecat/cli-core";
|
|
1539
|
+
|
|
1750
1540
|
// dist/zoom-api/schemas.js
|
|
1541
|
+
import { integer } from "@wirecat/cli-base/codegen/runtime";
|
|
1751
1542
|
var GetUserContactsResponse = looseObject({
|
|
1752
1543
|
contacts: optional(array(looseObject({
|
|
1753
1544
|
email: optional(string()),
|
|
@@ -1794,14 +1585,14 @@ var CONTACT_TYPES = ["company", "external"];
|
|
|
1794
1585
|
var parsed = /* @__PURE__ */ __name((schema, body) => {
|
|
1795
1586
|
const result = safeParse(schema, body);
|
|
1796
1587
|
if (!result.success)
|
|
1797
|
-
throw new
|
|
1588
|
+
throw new CliError9("invalid_response", "Zoom returned an invalid contact");
|
|
1798
1589
|
return result.output;
|
|
1799
1590
|
}, "parsed");
|
|
1800
1591
|
var nonEmpty = /* @__PURE__ */ __name((text2) => text2?.trim() ? text2.trim() : null, "nonEmpty");
|
|
1801
1592
|
var contactOf = /* @__PURE__ */ __name((row) => {
|
|
1802
1593
|
const id = nonEmpty(row.member_id);
|
|
1803
1594
|
if (!id)
|
|
1804
|
-
throw new
|
|
1595
|
+
throw new CliError9("invalid_response", "Zoom returned a contact without a member id");
|
|
1805
1596
|
const name = [nonEmpty(row.first_name), nonEmpty(row.last_name)].filter(Boolean).join(" ");
|
|
1806
1597
|
return {
|
|
1807
1598
|
ref: formatReference({ type: "contact", provider: "zoom", id }),
|
|
@@ -1836,7 +1627,7 @@ var ZoomContacts = class {
|
|
|
1836
1627
|
if (!next)
|
|
1837
1628
|
return [...found.values()];
|
|
1838
1629
|
if (seen.has(next))
|
|
1839
|
-
throw new
|
|
1630
|
+
throw new CliError9("invalid_response", "Zoom repeated a pagination token");
|
|
1840
1631
|
seen.add(next);
|
|
1841
1632
|
query.set("next_page_token", next);
|
|
1842
1633
|
}
|
|
@@ -1844,7 +1635,7 @@ var ZoomContacts = class {
|
|
|
1844
1635
|
/** `who` is a member id, a Zoom user id or an email address. */
|
|
1845
1636
|
async show(who, options = {}) {
|
|
1846
1637
|
if (!who.trim())
|
|
1847
|
-
throw new
|
|
1638
|
+
throw new CliError9("validation_error", "a contact is a member id, user id or email");
|
|
1848
1639
|
const body = parsed(GetUserContactResponse, await this.remote.request(`/chat/users/me/contacts/${encodeURIComponent(who.trim())}`, "team_chat:read:contact", options));
|
|
1849
1640
|
const phones = (body.phone_numbers ?? []).flatMap((phone) => {
|
|
1850
1641
|
const number2 = nonEmpty([phone.code, phone.number].filter(Boolean).join(" "));
|
|
@@ -1858,6 +1649,9 @@ var ZoomContacts = class {
|
|
|
1858
1649
|
};
|
|
1859
1650
|
|
|
1860
1651
|
// dist/contacts-commands.js
|
|
1652
|
+
import { annotate as annotate3 } from "@wirecat/cli-base/commands";
|
|
1653
|
+
import { defineQuery } from "@wirecat/cli-base/query";
|
|
1654
|
+
import { itemOf as itemOf2, listOf, NO_EFFECTS as NO_EFFECTS3, queryTerms, REMOTE_READ as REMOTE_READ2, termField, typedQuery as typedQuery2, withQuery as withQuery2 } from "@wirecat/cli-core";
|
|
1861
1655
|
var CONTACTS_QUERY = defineQuery({
|
|
1862
1656
|
entity: "contact",
|
|
1863
1657
|
backend: "native",
|
|
@@ -1869,14 +1663,14 @@ var CONTACTS_QUERY = defineQuery({
|
|
|
1869
1663
|
});
|
|
1870
1664
|
var has = /* @__PURE__ */ __name((value, part) => part === void 0 || (value ?? "").toLowerCase().includes(part.toLowerCase()), "has");
|
|
1871
1665
|
var addContactsCommands = /* @__PURE__ */ __name((program, deps) => {
|
|
1872
|
-
const contacts =
|
|
1873
|
-
|
|
1666
|
+
const contacts = annotate3(program.command("contacts"), { effects: NO_EFFECTS3 }).description("your Zoom contacts, read live: company colleagues and external contacts");
|
|
1667
|
+
withQuery2(annotate3(contacts.command("list"), {
|
|
1874
1668
|
origin: "handwritten",
|
|
1875
|
-
effects:
|
|
1669
|
+
effects: REMOTE_READ2,
|
|
1876
1670
|
output: { entity: "contact" },
|
|
1877
1671
|
examples: ["zm personal contacts list --json", "zm personal contacts list type:external name:alice"]
|
|
1878
1672
|
}), CONTACTS_QUERY).description("list your company and external Zoom contacts").action(async (words) => {
|
|
1879
|
-
const terms = queryTerms(
|
|
1673
|
+
const terms = queryTerms(typedQuery2(words), CONTACTS_QUERY, "contacts list");
|
|
1880
1674
|
const type = terms.get("type");
|
|
1881
1675
|
deps.api();
|
|
1882
1676
|
const service = deps.contacts();
|
|
@@ -1886,14 +1680,14 @@ var addContactsCommands = /* @__PURE__ */ __name((program, deps) => {
|
|
|
1886
1680
|
const kept = items.filter((item) => has(item.name, terms.get("name")) && has(item.email, terms.get("email")));
|
|
1887
1681
|
deps.output(listOf("contacts list", { items: kept, limit: Math.max(1, kept.length), has_more: false }));
|
|
1888
1682
|
});
|
|
1889
|
-
|
|
1683
|
+
annotate3(contacts.command("show"), {
|
|
1890
1684
|
origin: "handwritten",
|
|
1891
|
-
effects:
|
|
1685
|
+
effects: REMOTE_READ2,
|
|
1892
1686
|
output: { entity: "contact" },
|
|
1893
1687
|
examples: ["zm personal contacts show alice@example.com --json"]
|
|
1894
1688
|
}).description("one contact with their phone numbers").argument("<contact>", "their member id from `contacts list`, Zoom user id or email").action(async (who) => {
|
|
1895
1689
|
deps.api();
|
|
1896
|
-
deps.output(
|
|
1690
|
+
deps.output(itemOf2(await deps.contacts().show(who, { signal: deps.signal() })));
|
|
1897
1691
|
});
|
|
1898
1692
|
}, "addContactsCommands");
|
|
1899
1693
|
|
|
@@ -1901,8 +1695,16 @@ var addContactsCommands = /* @__PURE__ */ __name((program, deps) => {
|
|
|
1901
1695
|
import { createHash as createHash4 } from "node:crypto";
|
|
1902
1696
|
import { readdir as readdir2, readFile, stat } from "node:fs/promises";
|
|
1903
1697
|
import { basename, join as join6 } from "node:path";
|
|
1698
|
+
import { CliError as CliError12 } from "@wirecat/cli-base";
|
|
1699
|
+
import { parseTranscriptText, parseVtt as parseVtt3 } from "@wirecat/cli-core";
|
|
1700
|
+
|
|
1701
|
+
// dist/api.js
|
|
1702
|
+
import { CliError as CliError11, isCliError as isCliError5 } from "@wirecat/cli-base";
|
|
1703
|
+
import { statusToCode as statusToCode3 } from "@wirecat/cli-base/http";
|
|
1704
|
+
import { parseVtt as parseVtt2 } from "@wirecat/cli-core";
|
|
1904
1705
|
|
|
1905
1706
|
// dist/chat-file.js
|
|
1707
|
+
import { CliError as CliError10 } from "@wirecat/cli-base";
|
|
1906
1708
|
var TABBED = /^(\d{1,2}):(\d{2}):(\d{2})\t(.*?):\t(.*)$/;
|
|
1907
1709
|
var SPACED = /^(\d{1,2}):(\d{2}):(\d{2}) +(.*?): +(.*)$/;
|
|
1908
1710
|
var LOCAL = /^From (.+?) to .+$/;
|
|
@@ -1918,7 +1720,7 @@ var parseZoomChat = /* @__PURE__ */ __name((content, recordingStart) => {
|
|
|
1918
1720
|
} else if (raw.trim()) {
|
|
1919
1721
|
const last = lines.at(-1);
|
|
1920
1722
|
if (!last)
|
|
1921
|
-
throw new
|
|
1723
|
+
throw new CliError10("invalid_response", "Zoom returned an invalid chat file");
|
|
1922
1724
|
last.text = `${last.text}
|
|
1923
1725
|
${raw}`;
|
|
1924
1726
|
}
|
|
@@ -1943,13 +1745,13 @@ var extras = /* @__PURE__ */ __name((row, keys2) => Object.fromEntries(Object.en
|
|
|
1943
1745
|
var encodeUuid = /* @__PURE__ */ __name((uuid) => uuid.startsWith("/") || uuid.includes("//") ? encodeURIComponent(encodeURIComponent(uuid)) : encodeURIComponent(uuid), "encodeUuid");
|
|
1944
1746
|
var seriesIdOf = /* @__PURE__ */ __name((row) => {
|
|
1945
1747
|
if (!(string2(row.id) !== null || typeof row.id === "number" && Number.isSafeInteger(row.id) && row.id > 0))
|
|
1946
|
-
throw new
|
|
1748
|
+
throw new CliError11("invalid_response", "Zoom meeting is missing its series id");
|
|
1947
1749
|
return String(row.id);
|
|
1948
1750
|
}, "seriesIdOf");
|
|
1949
1751
|
var requiredString = /* @__PURE__ */ __name((value) => {
|
|
1950
1752
|
const text2 = string2(value);
|
|
1951
1753
|
if (text2 === null)
|
|
1952
|
-
throw new
|
|
1754
|
+
throw new CliError11("invalid_response", "Zoom response is missing a required field");
|
|
1953
1755
|
return text2;
|
|
1954
1756
|
}, "requiredString");
|
|
1955
1757
|
var PAST_MEETING = "meeting:read:past_meeting";
|
|
@@ -1963,14 +1765,14 @@ var findCursorOf = /* @__PURE__ */ __name((cursor) => {
|
|
|
1963
1765
|
try {
|
|
1964
1766
|
value = JSON.parse(cursor);
|
|
1965
1767
|
} catch {
|
|
1966
|
-
throw new
|
|
1768
|
+
throw new CliError11("validation_error", "this Zoom page cursor is not one zm gave");
|
|
1967
1769
|
}
|
|
1968
1770
|
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
1969
|
-
throw new
|
|
1771
|
+
throw new CliError11("validation_error", "this Zoom page cursor is not one zm gave");
|
|
1970
1772
|
const row = value;
|
|
1971
1773
|
const whole = [row.floor, row.end, row.skip].every((value2) => Number.isSafeInteger(value2));
|
|
1972
1774
|
if (!whole || row.token !== null && !string2(row.token))
|
|
1973
|
-
throw new
|
|
1775
|
+
throw new CliError11("validation_error", "this Zoom page cursor is not one zm gave");
|
|
1974
1776
|
return {
|
|
1975
1777
|
floor: row.floor,
|
|
1976
1778
|
end: row.end,
|
|
@@ -2021,12 +1823,12 @@ var ZoomApiSource = class {
|
|
|
2021
1823
|
const query = new URLSearchParams({ page_size: "100", ...next ? { next_page_token: next } : {} });
|
|
2022
1824
|
const body = await this.request(`${path}${path.includes("?") ? "&" : "?"}${query}`, scope2);
|
|
2023
1825
|
if (!body || !Array.isArray(body[key]))
|
|
2024
|
-
throw new
|
|
1826
|
+
throw new CliError11("invalid_response", "Zoom returned an invalid list");
|
|
2025
1827
|
for (const row of body[key])
|
|
2026
1828
|
rows.push(object(row));
|
|
2027
1829
|
next = string2(body.next_page_token) ?? "";
|
|
2028
1830
|
if (next && seen.has(next))
|
|
2029
|
-
throw new
|
|
1831
|
+
throw new CliError11("invalid_response", "Zoom repeated a pagination token");
|
|
2030
1832
|
seen.add(next);
|
|
2031
1833
|
} while (next);
|
|
2032
1834
|
return rows;
|
|
@@ -2039,12 +1841,12 @@ var ZoomApiSource = class {
|
|
|
2039
1841
|
try {
|
|
2040
1842
|
body = await this.request(`/past_meetings/${encodeURIComponent(seriesId)}/instances${range ? `?${range}` : ""}`, "meeting:read:list_past_instances");
|
|
2041
1843
|
} catch (error) {
|
|
2042
|
-
if (
|
|
1844
|
+
if (isCliError5(error) && error.code === statusToCode3(404))
|
|
2043
1845
|
return [];
|
|
2044
1846
|
throw error;
|
|
2045
1847
|
}
|
|
2046
1848
|
if (!body || !Array.isArray(body.meetings))
|
|
2047
|
-
throw new
|
|
1849
|
+
throw new CliError11("invalid_response", "Zoom returned invalid occurrences");
|
|
2048
1850
|
return body.meetings.map(object);
|
|
2049
1851
|
}
|
|
2050
1852
|
/** A listed series' occurrences that ran, each by its instance uuid, the id `meetings()`, `find` and `get` share. */
|
|
@@ -2057,7 +1859,7 @@ var ZoomApiSource = class {
|
|
|
2057
1859
|
const startedAt = this.time(instance.start_time, doubt);
|
|
2058
1860
|
const id = requiredString(instance.uuid);
|
|
2059
1861
|
if (startedAt === null)
|
|
2060
|
-
throw new
|
|
1862
|
+
throw new CliError11("invalid_response", "Zoom occurrence is missing its start time");
|
|
2061
1863
|
if (!keep(startedAt) || seen.has(id))
|
|
2062
1864
|
continue;
|
|
2063
1865
|
seen.add(id);
|
|
@@ -2104,7 +1906,7 @@ var ZoomApiSource = class {
|
|
|
2104
1906
|
async meetings(since2) {
|
|
2105
1907
|
const lower = Date.parse(since2);
|
|
2106
1908
|
if (!Number.isFinite(lower))
|
|
2107
|
-
throw new
|
|
1909
|
+
throw new CliError11("validation_error", "expected an ISO since timestamp");
|
|
2108
1910
|
const series = await this.pages("/users/me/meetings?type=previous_meetings", "meetings", "meeting:read:list_meetings");
|
|
2109
1911
|
const meetings = [];
|
|
2110
1912
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -2130,7 +1932,7 @@ var ZoomApiSource = class {
|
|
|
2130
1932
|
query.set("next_page_token", at.token);
|
|
2131
1933
|
const body = await this.request(`/users/me/meetings?${query}`, "meeting:read:list_meetings");
|
|
2132
1934
|
if (!body || !Array.isArray(body.meetings))
|
|
2133
|
-
throw new
|
|
1935
|
+
throw new CliError11("invalid_response", "Zoom returned an invalid list");
|
|
2134
1936
|
const rows = body.meetings.map(object);
|
|
2135
1937
|
const skip = at?.skip ?? 0;
|
|
2136
1938
|
const taken = rows.slice(skip, skip + FIND_SERIES);
|
|
@@ -2143,7 +1945,7 @@ var ZoomApiSource = class {
|
|
|
2143
1945
|
meetings.push({ meeting: meeting2 });
|
|
2144
1946
|
const token = string2(body.next_page_token) || null;
|
|
2145
1947
|
if (token !== null && token === at?.token)
|
|
2146
|
-
throw new
|
|
1948
|
+
throw new CliError11("invalid_response", "Zoom repeated a pagination token");
|
|
2147
1949
|
const next = skip + taken.length < rows.length ? { floor, end: end2, token: at?.token ?? null, skip: skip + taken.length } : token !== null ? { floor, end: end2, token, skip: 0 } : start > floor ? { floor, end: start - 1, token: null, skip: 0 } : null;
|
|
2148
1950
|
return { meetings, next: next && JSON.stringify(next) };
|
|
2149
1951
|
}
|
|
@@ -2154,10 +1956,10 @@ var ZoomApiSource = class {
|
|
|
2154
1956
|
async get(id) {
|
|
2155
1957
|
const given = id.trim();
|
|
2156
1958
|
if (!given)
|
|
2157
|
-
throw new
|
|
1959
|
+
throw new CliError11("validation_error", "name a Zoom meeting by its uuid or number");
|
|
2158
1960
|
const { scopes } = await this.tokens.tokens();
|
|
2159
1961
|
if (!["", ":admin", ":master"].some((grant) => scopes.includes(`${PAST_MEETING}${grant}`)))
|
|
2160
|
-
throw new
|
|
1962
|
+
throw new CliError11("permission_error", `Zoom scope ${PAST_MEETING} is missing; add it to the app and run zm <profile> session start again`);
|
|
2161
1963
|
const body = await this.request(`/past_meetings/${encodeUuid(given)}`, PAST_MEETING, 3001);
|
|
2162
1964
|
if (!body)
|
|
2163
1965
|
return null;
|
|
@@ -2174,7 +1976,7 @@ var ZoomApiSource = class {
|
|
|
2174
1976
|
try {
|
|
2175
1977
|
return await this.transcript(uuid);
|
|
2176
1978
|
} catch (error) {
|
|
2177
|
-
if (
|
|
1979
|
+
if (isCliError5(error) && error.code === "provider_error")
|
|
2178
1980
|
return void 0;
|
|
2179
1981
|
throw error;
|
|
2180
1982
|
}
|
|
@@ -2243,14 +2045,14 @@ var ZoomApiSource = class {
|
|
|
2243
2045
|
accessToken: tokens.accessToken,
|
|
2244
2046
|
signal,
|
|
2245
2047
|
what,
|
|
2246
|
-
unreachable: /* @__PURE__ */ __name(() => new
|
|
2048
|
+
unreachable: /* @__PURE__ */ __name(() => new CliError11("provider_error", `${label2} download could not be completed`), "unreachable")
|
|
2247
2049
|
});
|
|
2248
2050
|
if (!response.ok)
|
|
2249
|
-
throw new
|
|
2051
|
+
throw new CliError11(statusToCode3(response.status), `${label2} download failed (HTTP ${response.status})`);
|
|
2250
2052
|
const maxBytes2 = TRANSCRIPT_MAX_BYTES;
|
|
2251
2053
|
const reader = response.body?.getReader();
|
|
2252
2054
|
if (!reader)
|
|
2253
|
-
throw new
|
|
2055
|
+
throw new CliError11("invalid_response", `Zoom returned an invalid ${what}`);
|
|
2254
2056
|
const chunks = [];
|
|
2255
2057
|
let size = 0;
|
|
2256
2058
|
try {
|
|
@@ -2261,14 +2063,14 @@ var ZoomApiSource = class {
|
|
|
2261
2063
|
size += value.byteLength;
|
|
2262
2064
|
if (size > maxBytes2) {
|
|
2263
2065
|
await reader.cancel();
|
|
2264
|
-
throw new
|
|
2066
|
+
throw new CliError11("invalid_response", `Zoom ${what} exceeds the download size limit`);
|
|
2265
2067
|
}
|
|
2266
2068
|
chunks.push(value);
|
|
2267
2069
|
}
|
|
2268
2070
|
} catch (error) {
|
|
2269
|
-
if (
|
|
2071
|
+
if (isCliError5(error))
|
|
2270
2072
|
throw error;
|
|
2271
|
-
throw new
|
|
2073
|
+
throw new CliError11("provider_error", `${label2} download could not be completed`);
|
|
2272
2074
|
}
|
|
2273
2075
|
const bytes2 = new Uint8Array(size);
|
|
2274
2076
|
let offset = 0;
|
|
@@ -2284,14 +2086,14 @@ var ZoomApiSource = class {
|
|
|
2284
2086
|
return null;
|
|
2285
2087
|
if (body.can_download === false) {
|
|
2286
2088
|
if (body.download_restriction_reason === "NOT_READY")
|
|
2287
|
-
throw new
|
|
2089
|
+
throw new CliError11("provider_error", "Zoom has not finished this transcript yet; a later sync reads it");
|
|
2288
2090
|
return null;
|
|
2289
2091
|
}
|
|
2290
2092
|
const content = await this.downloadText(requiredString(body.download_url), "transcript");
|
|
2291
2093
|
try {
|
|
2292
|
-
return
|
|
2094
|
+
return parseVtt2(content);
|
|
2293
2095
|
} catch {
|
|
2294
|
-
throw new
|
|
2096
|
+
throw new CliError11("invalid_response", "Zoom returned an invalid transcript");
|
|
2295
2097
|
}
|
|
2296
2098
|
}
|
|
2297
2099
|
async summary(id) {
|
|
@@ -2342,7 +2144,7 @@ var ZoomApiSource = class {
|
|
|
2342
2144
|
return null;
|
|
2343
2145
|
const start = this.time(file.recording_start ?? body.start_time, { zoneless: false });
|
|
2344
2146
|
if (start === null)
|
|
2345
|
-
throw new
|
|
2147
|
+
throw new CliError11("invalid_response", "Zoom chat file is missing its start time");
|
|
2346
2148
|
return parseZoomChat(await this.downloadText(requiredString(file.download_url), "chat"), start);
|
|
2347
2149
|
}
|
|
2348
2150
|
async files() {
|
|
@@ -2355,7 +2157,7 @@ var localTimestamp = /* @__PURE__ */ __name((year, month, day, hour, minute, tim
|
|
|
2355
2157
|
const target = Date.UTC(year, month - 1, day, hour, minute);
|
|
2356
2158
|
const date = new Date(target);
|
|
2357
2159
|
if (date.getUTCFullYear() !== year || date.getUTCMonth() !== month - 1 || date.getUTCDate() !== day || hour > 23 || minute > 59)
|
|
2358
|
-
throw new
|
|
2160
|
+
throw new CliError12("validation_error", "transcript filename contains an invalid date or time");
|
|
2359
2161
|
let formatter;
|
|
2360
2162
|
try {
|
|
2361
2163
|
formatter = new Intl.DateTimeFormat("en-GB", {
|
|
@@ -2368,7 +2170,7 @@ var localTimestamp = /* @__PURE__ */ __name((year, month, day, hour, minute, tim
|
|
|
2368
2170
|
hourCycle: "h23"
|
|
2369
2171
|
});
|
|
2370
2172
|
} catch {
|
|
2371
|
-
throw new
|
|
2173
|
+
throw new CliError12("validation_error", "expected a valid IANA timezone");
|
|
2372
2174
|
}
|
|
2373
2175
|
const wallTime = /* @__PURE__ */ __name((instant) => {
|
|
2374
2176
|
const parts = Object.fromEntries(formatter.formatToParts(instant).map((part) => [part.type, part.value]));
|
|
@@ -2382,7 +2184,7 @@ var localTimestamp = /* @__PURE__ */ __name((year, month, day, hour, minute, tim
|
|
|
2382
2184
|
possibilities.add(candidate2);
|
|
2383
2185
|
}
|
|
2384
2186
|
if (possibilities.size !== 1)
|
|
2385
|
-
throw new
|
|
2187
|
+
throw new CliError12("validation_error", "transcript filename time is ambiguous or nonexistent in the selected timezone");
|
|
2386
2188
|
return [...possibilities][0] ?? target;
|
|
2387
2189
|
}, "localTimestamp");
|
|
2388
2190
|
var FILE_NAME = /^(\d{4})-(\d{2})-(\d{2})_(\d{2})(\d{2})_(.+)\.(vtt|txt)$/i;
|
|
@@ -2399,7 +2201,7 @@ var headerTime = /* @__PURE__ */ __name((date, timezone) => {
|
|
|
2399
2201
|
var fileMeeting = /* @__PURE__ */ __name((name, timezone = "UTC") => {
|
|
2400
2202
|
const match = FILE_NAME.exec(basename(name));
|
|
2401
2203
|
if (!match)
|
|
2402
|
-
throw new
|
|
2204
|
+
throw new CliError12("validation_error", "expected a transcript named YYYY-MM-DD_HHMM_topic.vtt or .txt");
|
|
2403
2205
|
const [, year, month, day, hour, minute, topic = ""] = match;
|
|
2404
2206
|
const startedAt = localTimestamp(Number(year), Number(month), Number(day), Number(hour), Number(minute), timezone);
|
|
2405
2207
|
const slug = topic.normalize("NFC");
|
|
@@ -2494,7 +2296,7 @@ var indexDownloadedFiles = /* @__PURE__ */ __name((files, timezone) => {
|
|
|
2494
2296
|
continue;
|
|
2495
2297
|
}
|
|
2496
2298
|
if (existing && existing.file.content !== file.content)
|
|
2497
|
-
throw new
|
|
2299
|
+
throw new CliError12("validation_error", "conflicting transcript files have the same occurrence key");
|
|
2498
2300
|
if (!existing)
|
|
2499
2301
|
result.set(meeting2.occurrence.id, { meeting: meeting2, file });
|
|
2500
2302
|
}
|
|
@@ -2505,21 +2307,21 @@ var FOLDER_MAX_FILES = 1e4;
|
|
|
2505
2307
|
var readDownloadedFiles = /* @__PURE__ */ __name(async (folder) => {
|
|
2506
2308
|
const listing = await readdir2(folder, { withFileTypes: true }).catch((error) => {
|
|
2507
2309
|
if (error.code === "ENOENT")
|
|
2508
|
-
throw new
|
|
2310
|
+
throw new CliError12("not_found", `folder not found: ${folder}`);
|
|
2509
2311
|
if (error.code === "ENOTDIR")
|
|
2510
|
-
throw new
|
|
2312
|
+
throw new CliError12("validation_error", `not a folder: ${folder}`);
|
|
2511
2313
|
if (error.code === "EACCES" || error.code === "EPERM")
|
|
2512
|
-
throw new
|
|
2314
|
+
throw new CliError12("permission_error", `cannot read folder: ${folder}`);
|
|
2513
2315
|
throw error;
|
|
2514
2316
|
});
|
|
2515
2317
|
const entries = listing.filter((entry) => entry.isFile() && (/\.vtt$/i.test(entry.name) || isText(entry.name) && FILE_NAME.test(entry.name))).sort((a, b) => a.name.localeCompare(b.name));
|
|
2516
2318
|
if (entries.length > FOLDER_MAX_FILES)
|
|
2517
|
-
throw new
|
|
2319
|
+
throw new CliError12("validation_error", `the folder holds ${entries.length} transcript files and zm reads at most ${FOLDER_MAX_FILES} \u2014 move some into another folder`);
|
|
2518
2320
|
const files = [];
|
|
2519
2321
|
for (const entry of entries) {
|
|
2520
2322
|
const path = join6(folder, entry.name);
|
|
2521
2323
|
if ((await stat(path)).size > TRANSCRIPT_MAX_BYTES)
|
|
2522
|
-
throw new
|
|
2324
|
+
throw new CliError12("validation_error", `${entry.name} is larger than ${TRANSCRIPT_MAX_BYTES / 1024 ** 2} MiB, the most zm reads from one transcript`);
|
|
2523
2325
|
files.push({ name: entry.name, content: await readFile(path, "utf8") });
|
|
2524
2326
|
}
|
|
2525
2327
|
return validateDownloadedFiles(files);
|
|
@@ -2547,14 +2349,14 @@ var FilesSource = class {
|
|
|
2547
2349
|
async meetings(since2) {
|
|
2548
2350
|
const lower = Date.parse(since2);
|
|
2549
2351
|
if (!Number.isFinite(lower))
|
|
2550
|
-
throw new
|
|
2352
|
+
throw new CliError12("validation_error", "expected an ISO since timestamp");
|
|
2551
2353
|
return [...this.index().values()].map(({ meeting: meeting2 }) => meeting2).filter((m) => Date.parse(m.occurrence.startedAt) >= lower);
|
|
2552
2354
|
}
|
|
2553
2355
|
async transcript(id) {
|
|
2554
2356
|
const file = this.index().get(id)?.file;
|
|
2555
2357
|
if (!file)
|
|
2556
2358
|
return null;
|
|
2557
|
-
return isText(file.name) ? parseTranscriptText(file.content).lines :
|
|
2359
|
+
return isText(file.name) ? parseTranscriptText(file.content).lines : parseVtt3(file.content);
|
|
2558
2360
|
}
|
|
2559
2361
|
async participants() {
|
|
2560
2362
|
return null;
|
|
@@ -2582,20 +2384,25 @@ zm config set files.timezone <IANA zone>. Times are stored in UTC, and the impor
|
|
|
2582
2384
|
}, "fileNamesHelp");
|
|
2583
2385
|
|
|
2584
2386
|
// dist/meeting-commands.js
|
|
2387
|
+
import { CliError as CliError13 } from "@wirecat/cli-base";
|
|
2388
|
+
import { annotate as annotate4 } from "@wirecat/cli-base/commands";
|
|
2389
|
+
import { addMeetingCommands, NO_EFFECTS as NO_EFFECTS4 } from "@wirecat/cli-core";
|
|
2585
2390
|
var childOf = /* @__PURE__ */ __name((parent, name) => {
|
|
2586
2391
|
const found = parent.commands.find((command) => command.name() === name);
|
|
2587
2392
|
if (!found)
|
|
2588
|
-
throw new
|
|
2393
|
+
throw new CliError13("configuration_error", `shared command is missing: ${name}`);
|
|
2589
2394
|
return found;
|
|
2590
2395
|
}, "childOf");
|
|
2591
2396
|
var addZoomMeetingCommands = /* @__PURE__ */ __name((program, deps) => {
|
|
2592
2397
|
addMeetingCommands(program, deps);
|
|
2593
|
-
const meetings =
|
|
2594
|
-
|
|
2398
|
+
const meetings = annotate4(childOf(program, "meetings"), { effects: NO_EFFECTS4 });
|
|
2399
|
+
annotate4(childOf(program, "events"), { effects: NO_EFFECTS4 });
|
|
2595
2400
|
runsLong(childOf(meetings, "sync"));
|
|
2596
2401
|
}, "addZoomMeetingCommands");
|
|
2597
2402
|
|
|
2598
2403
|
// dist/meeting-communications-binding.js
|
|
2404
|
+
import { CliError as CliError14 } from "@wirecat/cli-base";
|
|
2405
|
+
import { isFolderProvider } from "@wirecat/cli-core";
|
|
2599
2406
|
var resolveContextSource = /* @__PURE__ */ __name(async (definition, metadata) => {
|
|
2600
2407
|
try {
|
|
2601
2408
|
let folderId;
|
|
@@ -2624,13 +2431,13 @@ var resolveContextSource = /* @__PURE__ */ __name(async (definition, metadata) =
|
|
|
2624
2431
|
})
|
|
2625
2432
|
});
|
|
2626
2433
|
} catch {
|
|
2627
|
-
throw new
|
|
2434
|
+
throw new CliError14("configuration_error", `configured context source ${definition.id} is unavailable; check its stored provider/account identity`);
|
|
2628
2435
|
}
|
|
2629
2436
|
}, "resolveContextSource");
|
|
2630
2437
|
var captureContextSources = /* @__PURE__ */ __name((configured2, profile) => {
|
|
2631
2438
|
const parsed3 = safeParse(contextSourcesSchema, configured2 ?? []);
|
|
2632
2439
|
if (!parsed3.success)
|
|
2633
|
-
throw new
|
|
2440
|
+
throw new CliError14("configuration_error", "context_sources is invalid");
|
|
2634
2441
|
const definitions = parsed3.output.filter((s) => s.profile === profile).map((s) => Object.freeze({ ...s }));
|
|
2635
2442
|
const pinned = /* @__PURE__ */ new Map();
|
|
2636
2443
|
const capture = /* @__PURE__ */ __name((selected) => {
|
|
@@ -2638,10 +2445,10 @@ var captureContextSources = /* @__PURE__ */ __name((configured2, profile) => {
|
|
|
2638
2445
|
let captured;
|
|
2639
2446
|
const assert = /* @__PURE__ */ __name((requested) => {
|
|
2640
2447
|
if (!ids.length)
|
|
2641
|
-
throw new
|
|
2448
|
+
throw new CliError14("configuration_error", "configure context.sources for the selected profile before requesting communications");
|
|
2642
2449
|
for (const id of requested)
|
|
2643
2450
|
if (!ids.includes(id))
|
|
2644
|
-
throw new
|
|
2451
|
+
throw new CliError14("validation_error", `communications.sources contains an unauthorized selection: ${id}`);
|
|
2645
2452
|
}, "assert");
|
|
2646
2453
|
return Object.freeze({
|
|
2647
2454
|
ids,
|
|
@@ -2649,7 +2456,7 @@ var captureContextSources = /* @__PURE__ */ __name((configured2, profile) => {
|
|
|
2649
2456
|
select(requested) {
|
|
2650
2457
|
assert(requested);
|
|
2651
2458
|
if (!requested.length)
|
|
2652
|
-
throw new
|
|
2459
|
+
throw new CliError14("validation_error", "select at least one communications source");
|
|
2653
2460
|
return capture(selected.filter((definition) => requested.includes(definition.id)));
|
|
2654
2461
|
},
|
|
2655
2462
|
resolve(metadata) {
|
|
@@ -2678,9 +2485,17 @@ var captureContextSources = /* @__PURE__ */ __name((configured2, profile) => {
|
|
|
2678
2485
|
return capture(definitions);
|
|
2679
2486
|
}, "captureContextSources");
|
|
2680
2487
|
|
|
2488
|
+
// dist/meeting-inventory.js
|
|
2489
|
+
import { addMeetingSeriesInventoryCommand } from "@wirecat/cli-core";
|
|
2490
|
+
|
|
2491
|
+
// dist/series-inventory.js
|
|
2492
|
+
import { CliError as CliError17 } from "@wirecat/cli-base";
|
|
2493
|
+
import { createMeetingSeriesInventoryReader } from "@wirecat/cli-core";
|
|
2494
|
+
|
|
2681
2495
|
// dist/occurrence-schedule.js
|
|
2496
|
+
import { CliError as CliError15 } from "@wirecat/cli-base";
|
|
2682
2497
|
function invalid(field) {
|
|
2683
|
-
throw new
|
|
2498
|
+
throw new CliError15("invalid_response", `Zoom meeting ${field} is invalid`);
|
|
2684
2499
|
}
|
|
2685
2500
|
__name(invalid, "invalid");
|
|
2686
2501
|
var zoomScheduledInstant = /* @__PURE__ */ __name((value) => {
|
|
@@ -2769,9 +2584,10 @@ var zoomOccurrenceSchedule = /* @__PURE__ */ __name((value, meetingId, limit) =>
|
|
|
2769
2584
|
}, "zoomOccurrenceSchedule");
|
|
2770
2585
|
|
|
2771
2586
|
// dist/remote-meeting-id.js
|
|
2587
|
+
import { CliError as CliError16 } from "@wirecat/cli-base";
|
|
2772
2588
|
var zoomMeetingPath = /* @__PURE__ */ __name((id) => {
|
|
2773
2589
|
if (typeof id !== "string" || !/^[1-9]\d*$/.test(id) || id.trim() !== id)
|
|
2774
|
-
throw new
|
|
2590
|
+
throw new CliError16("validation_error", "remote meeting id must be a positive numeric id");
|
|
2775
2591
|
return `/meetings/${id}`;
|
|
2776
2592
|
}, "zoomMeetingPath");
|
|
2777
2593
|
|
|
@@ -2780,16 +2596,16 @@ var candidate = /* @__PURE__ */ __name((value) => {
|
|
|
2780
2596
|
const row = object(value);
|
|
2781
2597
|
const meetingId = typeof row.id === "number" && Number.isSafeInteger(row.id) ? String(row.id) : row.id;
|
|
2782
2598
|
if (typeof meetingId !== "string")
|
|
2783
|
-
throw new
|
|
2599
|
+
throw new CliError17("invalid_response", "Zoom inventory meeting id is invalid");
|
|
2784
2600
|
try {
|
|
2785
2601
|
zoomMeetingPath(meetingId);
|
|
2786
2602
|
} catch {
|
|
2787
|
-
throw new
|
|
2603
|
+
throw new CliError17("invalid_response", "Zoom inventory meeting id is invalid");
|
|
2788
2604
|
}
|
|
2789
2605
|
if (row.topic !== void 0 && row.topic !== null && (typeof row.topic !== "string" || row.topic.length > 8192))
|
|
2790
|
-
throw new
|
|
2606
|
+
throw new CliError17("invalid_response", "Zoom inventory topic is invalid");
|
|
2791
2607
|
if (row.type !== void 0 && ![1, 2, 3, 8].includes(row.type))
|
|
2792
|
-
throw new
|
|
2608
|
+
throw new CliError17("invalid_response", "Zoom inventory meeting type is invalid");
|
|
2793
2609
|
return {
|
|
2794
2610
|
meetingId,
|
|
2795
2611
|
title: typeof row.topic === "string" ? row.topic : null,
|
|
@@ -2799,7 +2615,7 @@ var candidate = /* @__PURE__ */ __name((value) => {
|
|
|
2799
2615
|
}, "candidate");
|
|
2800
2616
|
var createZoomSeriesInventoryReader = /* @__PURE__ */ __name((account, credentials, fetcher, options = {}) => {
|
|
2801
2617
|
if (typeof credentials?.withSignal !== "function")
|
|
2802
|
-
throw new
|
|
2618
|
+
throw new CliError17("configuration_error", "Zoom credential scope is unavailable");
|
|
2803
2619
|
const scopedCredentials = credentials.withSignal.bind(credentials);
|
|
2804
2620
|
const remoteOptions = { ...options };
|
|
2805
2621
|
return createMeetingSeriesInventoryReader({ provider: "zoom", account }, {
|
|
@@ -2814,9 +2630,9 @@ var createZoomSeriesInventoryReader = /* @__PURE__ */ __name((account, credentia
|
|
|
2814
2630
|
maxResponseBytes: context.maxReadBytes
|
|
2815
2631
|
});
|
|
2816
2632
|
if (!Array.isArray(raw.meetings) || raw.meetings.length > context.limit)
|
|
2817
|
-
throw new
|
|
2633
|
+
throw new CliError17("invalid_response", "Zoom inventory meetings exceed the page limit");
|
|
2818
2634
|
if (raw.next_page_token !== void 0 && typeof raw.next_page_token !== "string")
|
|
2819
|
-
throw new
|
|
2635
|
+
throw new CliError17("invalid_response", "Zoom inventory continuation is invalid");
|
|
2820
2636
|
return {
|
|
2821
2637
|
scope: context.scope,
|
|
2822
2638
|
after: context.after,
|
|
@@ -2864,6 +2680,7 @@ var addZoomInventoryCommand = /* @__PURE__ */ __name((program, deps) => {
|
|
|
2864
2680
|
}, "addZoomInventoryCommand");
|
|
2865
2681
|
|
|
2866
2682
|
// dist/meeting-source.js
|
|
2683
|
+
import { CliError as CliError18 } from "@wirecat/cli-base";
|
|
2867
2684
|
var configuredMeetingSource = /* @__PURE__ */ __name(({ deps, getConfig, tokens, fetch, zones }) => {
|
|
2868
2685
|
let activeSource;
|
|
2869
2686
|
const getSource = /* @__PURE__ */ __name(() => {
|
|
@@ -2874,11 +2691,11 @@ var configuredMeetingSource = /* @__PURE__ */ __name(({ deps, getConfig, tokens,
|
|
|
2874
2691
|
if (config.source === "api") {
|
|
2875
2692
|
const manager = tokens();
|
|
2876
2693
|
if (!manager.options.clientId)
|
|
2877
|
-
throw new
|
|
2694
|
+
throw new CliError18("configuration_error", SET_ZOOM_APP);
|
|
2878
2695
|
return new ZoomApiSource(manager, fetch(), {}, zones);
|
|
2879
2696
|
}
|
|
2880
2697
|
if (!config.filesFolder)
|
|
2881
|
-
throw new
|
|
2698
|
+
throw new CliError18("configuration_error", "set files.folder before pulling from files");
|
|
2882
2699
|
return new FilesSource(await (deps.readFiles ?? readDownloadedFiles)(config.filesFolder), filesZone(config));
|
|
2883
2700
|
})();
|
|
2884
2701
|
return activeSource;
|
|
@@ -2933,20 +2750,26 @@ var configuredMeetingSource = /* @__PURE__ */ __name(({ deps, getConfig, tokens,
|
|
|
2933
2750
|
}, "configuredMeetingSource");
|
|
2934
2751
|
|
|
2935
2752
|
// dist/profile-word.js
|
|
2753
|
+
import { CliError as CliError19 } from "@wirecat/cli-base";
|
|
2936
2754
|
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.";
|
|
2937
2755
|
var recordProfile = /* @__PURE__ */ __name((configPath, profile) => {
|
|
2938
2756
|
const here = readConfig(configPath).profiles;
|
|
2939
2757
|
if (here.includes(profile))
|
|
2940
2758
|
return;
|
|
2941
2759
|
if (here.length)
|
|
2942
|
-
throw new
|
|
2760
|
+
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 });
|
|
2943
2761
|
addProfile(configPath, profile);
|
|
2944
2762
|
}, "recordProfile");
|
|
2945
2763
|
|
|
2946
2764
|
// dist/progress-commands.js
|
|
2947
2765
|
import { join as join7 } from "node:path";
|
|
2766
|
+
import { CliError as CliError21 } from "@wirecat/cli-base";
|
|
2767
|
+
import { annotate as annotate5 } from "@wirecat/cli-base/commands";
|
|
2768
|
+
import { itemOf as itemOf3, LOCAL_READ as LOCAL_READ2, progressOf as progressOf2 } from "@wirecat/cli-core";
|
|
2948
2769
|
|
|
2949
2770
|
// dist/sync-progress.js
|
|
2771
|
+
import { CliError as CliError20 } from "@wirecat/cli-base";
|
|
2772
|
+
import { checkpointPath, progressOf, readCheckpoint, saveCheckpoint } from "@wirecat/cli-core";
|
|
2950
2773
|
var meetingProgress = /* @__PURE__ */ __name((profile, env, now = Date.now) => {
|
|
2951
2774
|
const path = checkpointPath(zmPaths({ env }).state, profile, "meetings");
|
|
2952
2775
|
return {
|
|
@@ -2958,7 +2781,7 @@ var meetingProgress = /* @__PURE__ */ __name((profile, env, now = Date.now) => {
|
|
|
2958
2781
|
read: /* @__PURE__ */ __name(() => {
|
|
2959
2782
|
const saved = readCheckpoint(path);
|
|
2960
2783
|
if (saved && (!Number.isSafeInteger(saved.done) || saved.done < 0 || typeof saved.cursor?.complete !== "boolean" || !Number.isFinite(Date.parse(saved.updated_at))))
|
|
2961
|
-
throw new
|
|
2784
|
+
throw new CliError20("configuration_error", "the saved meeting progress is invalid; run a sync to replace it");
|
|
2962
2785
|
return progressOf({
|
|
2963
2786
|
job: "meetings",
|
|
2964
2787
|
profile,
|
|
@@ -2976,24 +2799,24 @@ var addProgressCommands = /* @__PURE__ */ __name((program, deps) => {
|
|
|
2976
2799
|
const meetings = program.commands.find((command) => command.name() === "meetings");
|
|
2977
2800
|
const recordings = program.commands.find((command) => command.name() === "recordings");
|
|
2978
2801
|
if (!meetings || !recordings)
|
|
2979
|
-
throw new
|
|
2980
|
-
|
|
2981
|
-
effects:
|
|
2802
|
+
throw new CliError21("configuration_error", "the meeting command groups are missing");
|
|
2803
|
+
annotate5(meetings.command("status"), {
|
|
2804
|
+
effects: LOCAL_READ2,
|
|
2982
2805
|
output: { entity: "sync_progress" },
|
|
2983
2806
|
examples: ["zm personal meetings status --json"]
|
|
2984
|
-
}).description("the last meeting ingestion pass: confirmed count, completion and checkpoint age").action(() => deps.output(
|
|
2985
|
-
|
|
2986
|
-
effects:
|
|
2807
|
+
}).description("the last meeting ingestion pass: confirmed count, completion and checkpoint age").action(() => deps.output(itemOf3(meetingProgress(deps.profile(), deps.env, deps.now).read())));
|
|
2808
|
+
annotate5(recordings.command("status"), {
|
|
2809
|
+
effects: LOCAL_READ2,
|
|
2987
2810
|
output: { entity: "sync_progress" },
|
|
2988
2811
|
examples: ["zm personal recordings status ./zoom-archive --json"]
|
|
2989
2812
|
}).description("confirmed archived assets and pending discovery in one archive checkpoint").argument("<directory>", "archive folder").option("--checkpoint <file>", "an explicit archive checkpoint path").action(async (directory, options) => {
|
|
2990
2813
|
const profile = deps.profile();
|
|
2991
2814
|
const saved = await inspectRecordingSyncCheckpoint(options.checkpoint ?? join7(directory, ".zoom-archive-sync.json"));
|
|
2992
2815
|
if (saved && (saved.scope.provider !== "zoom" || saved.scope.account !== profileAccountKey(profile)))
|
|
2993
|
-
throw new
|
|
2816
|
+
throw new CliError21("permission_error", "the archive checkpoint belongs to another profile");
|
|
2994
2817
|
const done = saved?.entries.reduce((sum, entry) => sum + entry.acknowledged.length, 0) ?? 0;
|
|
2995
2818
|
const total = saved?.pendingWindows.length === 0 ? saved.entries.reduce((sum, entry) => sum + entry.assets.length, 0) : void 0;
|
|
2996
|
-
deps.output(
|
|
2819
|
+
deps.output(itemOf3(progressOf2({
|
|
2997
2820
|
job: "recordings",
|
|
2998
2821
|
profile,
|
|
2999
2822
|
done,
|
|
@@ -3006,22 +2829,25 @@ var addProgressCommands = /* @__PURE__ */ __name((program, deps) => {
|
|
|
3006
2829
|
}, "addProgressCommands");
|
|
3007
2830
|
|
|
3008
2831
|
// dist/recording-schedule-commands.js
|
|
2832
|
+
import { CliError as CliError22 } from "@wirecat/cli-base";
|
|
2833
|
+
import { annotate as annotate6 } from "@wirecat/cli-base/commands";
|
|
2834
|
+
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";
|
|
3009
2835
|
var addRecordingScheduleCommands = /* @__PURE__ */ __name((program, deps) => {
|
|
3010
2836
|
const deliver = /* @__PURE__ */ __name(async (value) => {
|
|
3011
2837
|
if (value.applied)
|
|
3012
|
-
await deps.receipt(
|
|
2838
|
+
await deps.receipt(itemOf4(value));
|
|
3013
2839
|
else
|
|
3014
|
-
deps.output(
|
|
2840
|
+
deps.output(itemOf4(value));
|
|
3015
2841
|
}, "deliver");
|
|
3016
2842
|
const recordings = program.commands.find((command) => command.name() === "recordings");
|
|
3017
2843
|
if (!recordings)
|
|
3018
|
-
throw new
|
|
3019
|
-
const schedule =
|
|
3020
|
-
const label2 = /* @__PURE__ */ __name((command, example, effects) =>
|
|
3021
|
-
label2(
|
|
2844
|
+
throw new CliError22("configuration_error", "recording command group is unavailable");
|
|
2845
|
+
const schedule = annotate6(recordings.command("schedule"), { effects: NO_EFFECTS5 }).description("local archive jobs and Linux user systemd timers");
|
|
2846
|
+
const label2 = /* @__PURE__ */ __name((command, example, effects) => annotate6(command, { origin: "handwritten", effects, examples: [example] }), "label");
|
|
2847
|
+
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) => {
|
|
3022
2848
|
const offline = deps.offline();
|
|
3023
2849
|
if (options.yes && !options.dryRun && offline)
|
|
3024
|
-
throw new
|
|
2850
|
+
throw new CliError22("configuration_error", "archive schedule installation requires online mode");
|
|
3025
2851
|
const capture = deps.capture();
|
|
3026
2852
|
const service = deps.service();
|
|
3027
2853
|
await deliver(await service.create({
|
|
@@ -3033,64 +2859,67 @@ var addRecordingScheduleCommands = /* @__PURE__ */ __name((program, deps) => {
|
|
|
3033
2859
|
lookbackDays: options.lookbackDays,
|
|
3034
2860
|
maxBytes: options.maxBytes
|
|
3035
2861
|
}, capture, { apply: options.yes, dryRun: options.dryRun, offline, signal: deps.signal() }));
|
|
3036
|
-
}), "zm personal recordings schedule create --name daily --output-dir /home/AliceExample/archive --since-time 2026-01-01 --at 03:15 --timezone UTC --json",
|
|
3037
|
-
const jobsQuery =
|
|
3038
|
-
label2(
|
|
3039
|
-
|
|
2862
|
+
}), "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);
|
|
2863
|
+
const jobsQuery = unfilteredQuery2("zoom_archive_job", ZOOM_ANSWER_ENTITIES["recordings schedule list"].schema);
|
|
2864
|
+
label2(withQuery3(schedule.command("list"), jobsQuery).description("list saved local jobs; live timer state is not checked").action(async (words) => {
|
|
2865
|
+
listQuery2(typedQuery3(words), jobsQuery, "recordings schedule list");
|
|
3040
2866
|
deps.output(wholeList("recordings schedule list", await deps.service().list({ signal: deps.signal() })));
|
|
3041
|
-
}), "zm personal recordings schedule list --offline --json",
|
|
2867
|
+
}), "zm personal recordings schedule list --offline --json", LOCAL_READ3);
|
|
3042
2868
|
label2(schedule.command("show").description("show one saved local job and its captured settings").argument("<job>", "saved job id").action(async (id) => {
|
|
3043
|
-
deps.output(
|
|
3044
|
-
}), "zm personal recordings schedule show example-job --offline --json",
|
|
2869
|
+
deps.output(itemOf4(await deps.service().show(id, { signal: deps.signal() })));
|
|
2870
|
+
}), "zm personal recordings schedule show example-job --offline --json", LOCAL_READ3);
|
|
3045
2871
|
label2(writesOwnerFiles(runsLong(schedule.command("run"))).description("run the captured job once with durable archive progress").argument("<job>", "saved job id").action(async (id) => {
|
|
3046
2872
|
if (program.opts().json || !program.opts().jsonl && !deps.outputIsTTY)
|
|
3047
|
-
throw new
|
|
2873
|
+
throw new CliError22("validation_error", "headless archive schedule runs stream receipts; use --jsonl");
|
|
3048
2874
|
if (deps.offline())
|
|
3049
|
-
throw new
|
|
2875
|
+
throw new CliError22("configuration_error", "archive schedule run requires online mode");
|
|
3050
2876
|
for await (const receipt of deps.service().run(id, { offline: deps.offline(), signal: deps.signal() }))
|
|
3051
|
-
await deps.receipt(
|
|
3052
|
-
}), "zm personal recordings schedule run example-job --dry-run --jsonl",
|
|
3053
|
-
label2(
|
|
2877
|
+
await deps.receipt(itemOf4(receipt));
|
|
2878
|
+
}), "zm personal recordings schedule run example-job --dry-run --jsonl", FETCH2);
|
|
2879
|
+
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) => {
|
|
3054
2880
|
await deliver(await deps.service().disable(id, { apply: options.yes, dryRun: options.dryRun, signal: deps.signal() }));
|
|
3055
|
-
}), "zm personal recordings schedule disable example-job --json",
|
|
2881
|
+
}), "zm personal recordings schedule disable example-job --json", LOCAL_WRITE3);
|
|
3056
2882
|
}, "addRecordingScheduleCommands");
|
|
3057
2883
|
|
|
3058
2884
|
// dist/recording-schedule-setup.js
|
|
3059
2885
|
import { homedir } from "node:os";
|
|
3060
2886
|
import { dirname as dirname2, join as join10 } from "node:path";
|
|
2887
|
+
import { CliError as CliError27 } from "@wirecat/cli-base";
|
|
3061
2888
|
|
|
3062
2889
|
// dist/recording-schedule.js
|
|
3063
2890
|
import { isAbsolute } from "node:path";
|
|
2891
|
+
import { CliError as CliError23 } from "@wirecat/cli-base";
|
|
2892
|
+
import { installRecordingArchiveSchedule, parseRecordingArchiveSchedule, planRecordingArchiveSchedule, recordingArchiveScheduleWindow } from "@wirecat/cli-core";
|
|
3064
2893
|
var text = /* @__PURE__ */ __name((value, limit) => typeof value === "string" && !!value.trim() && value.length <= limit && !/[\0\r\n]/.test(value), "text");
|
|
3065
2894
|
var absolute = /* @__PURE__ */ __name((value) => text(value, 4096) && isAbsolute(value), "absolute");
|
|
3066
2895
|
var validateRecordingScheduleId = /* @__PURE__ */ __name((id) => {
|
|
3067
2896
|
if (typeof id !== "string" || !/^[a-f0-9]{64}$/.test(id))
|
|
3068
|
-
throw new
|
|
2897
|
+
throw new CliError23("validation_error", "archive schedule id must be 64 lowercase hexadecimal characters");
|
|
3069
2898
|
return id;
|
|
3070
2899
|
}, "validateRecordingScheduleId");
|
|
3071
2900
|
var snapshotRecordingScheduleCapture = /* @__PURE__ */ __name((value) => {
|
|
3072
2901
|
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
3073
|
-
throw new
|
|
2902
|
+
throw new CliError23("validation_error", "archive schedule capture is invalid");
|
|
3074
2903
|
const { profile, clientId, configDir, runtime, cliPath } = value;
|
|
3075
2904
|
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))
|
|
3076
|
-
throw new
|
|
2905
|
+
throw new CliError23("validation_error", "archive schedule requires a profile, public client id and absolute config/runtime/CLI paths");
|
|
3077
2906
|
return Object.freeze({ profile, clientId, configDir, runtime, cliPath });
|
|
3078
2907
|
}, "snapshotRecordingScheduleCapture");
|
|
3079
2908
|
var parseRecordingScheduleJob = /* @__PURE__ */ __name((value) => {
|
|
3080
2909
|
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
3081
|
-
throw new
|
|
2910
|
+
throw new CliError23("validation_error", "archive schedule job is invalid");
|
|
3082
2911
|
const row = value;
|
|
3083
2912
|
if (row.version !== 1 || Object.keys(row).some((key) => !["version", "schedule", "capture", "state"].includes(key)) || !["pending", "enabled", "disabled"].includes(row.state))
|
|
3084
|
-
throw new
|
|
2913
|
+
throw new CliError23("validation_error", "archive schedule job is invalid");
|
|
3085
2914
|
const capture = snapshotRecordingScheduleCapture(row.capture);
|
|
3086
2915
|
if (Object.keys(row.capture).some((key) => !["profile", "clientId", "configDir", "runtime", "cliPath"].includes(key)))
|
|
3087
|
-
throw new
|
|
2916
|
+
throw new CliError23("validation_error", "archive schedule capture is invalid");
|
|
3088
2917
|
const schedule = parseRecordingArchiveSchedule(row.schedule);
|
|
3089
2918
|
if (schedule.scope.provider !== "zoom" || schedule.scope.account !== profileAccountKey(capture.profile) || !absolute(schedule.destination))
|
|
3090
|
-
throw new
|
|
2919
|
+
throw new CliError23("validation_error", "archive schedule capture does not match its provider scope");
|
|
3091
2920
|
const job = Object.freeze({ version: 1, schedule, capture, state: row.state });
|
|
3092
2921
|
if (Buffer.byteLength(JSON.stringify(job)) > 32 * 1024)
|
|
3093
|
-
throw new
|
|
2922
|
+
throw new CliError23("validation_error", "archive schedule metadata exceeds its byte limit");
|
|
3094
2923
|
return job;
|
|
3095
2924
|
}, "parseRecordingScheduleJob");
|
|
3096
2925
|
var createRecordingScheduleService = /* @__PURE__ */ __name((deps) => {
|
|
@@ -3099,10 +2928,10 @@ var createRecordingScheduleService = /* @__PURE__ */ __name((deps) => {
|
|
|
3099
2928
|
checkCancelled(options.signal);
|
|
3100
2929
|
const found = await deps.store.load(id, options);
|
|
3101
2930
|
if (!found)
|
|
3102
|
-
throw new
|
|
2931
|
+
throw new CliError23("not_found", "archive schedule was not found");
|
|
3103
2932
|
const job = parseRecordingScheduleJob(found);
|
|
3104
2933
|
if (job.schedule.id !== id)
|
|
3105
|
-
throw new
|
|
2934
|
+
throw new CliError23("validation_error", "archive schedule storage returned a different job");
|
|
3106
2935
|
return job;
|
|
3107
2936
|
}, "show");
|
|
3108
2937
|
return {
|
|
@@ -3117,11 +2946,11 @@ var createRecordingScheduleService = /* @__PURE__ */ __name((deps) => {
|
|
|
3117
2946
|
if (options.apply !== true || options.dryRun === true)
|
|
3118
2947
|
return { applied: false, backend, job, units, timerState: "not_checked" };
|
|
3119
2948
|
if (options.offline)
|
|
3120
|
-
throw new
|
|
2949
|
+
throw new CliError23("configuration_error", "archive schedule installation requires online mode");
|
|
3121
2950
|
deps.backend.assertSupported();
|
|
3122
2951
|
const existing = await deps.store.load(schedule.id, { signal: options.signal });
|
|
3123
2952
|
if (existing && JSON.stringify(parseRecordingScheduleJob(existing).capture) !== JSON.stringify(capture))
|
|
3124
|
-
throw new
|
|
2953
|
+
throw new CliError23("validation_error", "archive schedule id belongs to a different captured runtime or client; choose a new name");
|
|
3125
2954
|
await deps.store.save(job, { signal: options.signal });
|
|
3126
2955
|
await installRecordingArchiveSchedule({ backend, install: /* @__PURE__ */ __name(async (_, active) => deps.backend.install(job, active), "install") }, schedule, { apply: true, signal: options.signal });
|
|
3127
2956
|
const enabled = parseRecordingScheduleJob({ ...job, state: "enabled" });
|
|
@@ -3136,13 +2965,13 @@ var createRecordingScheduleService = /* @__PURE__ */ __name((deps) => {
|
|
|
3136
2965
|
async *run(id, options = {}) {
|
|
3137
2966
|
options = { ...options };
|
|
3138
2967
|
if (options.offline)
|
|
3139
|
-
throw new
|
|
2968
|
+
throw new CliError23("configuration_error", "archive schedule run requires online mode");
|
|
3140
2969
|
const job = await show(id, { signal: options.signal });
|
|
3141
2970
|
const window = recordingArchiveScheduleWindow(job.schedule, { now: deps.now?.() ?? Date.now() });
|
|
3142
2971
|
if (!window)
|
|
3143
2972
|
return;
|
|
3144
2973
|
const recordings = deps.recordings(job);
|
|
3145
|
-
yield*
|
|
2974
|
+
yield* syncRecordingArchive(recordings, {
|
|
3146
2975
|
...window,
|
|
3147
2976
|
destination: job.schedule.destination,
|
|
3148
2977
|
maxBytes: job.schedule.maxBytes,
|
|
@@ -3170,11 +2999,13 @@ var createRecordingScheduleService = /* @__PURE__ */ __name((deps) => {
|
|
|
3170
2999
|
// dist/recording-schedule-store.js
|
|
3171
3000
|
import { lstat as lstat3, mkdir as mkdir3, readdir as readdir3 } from "node:fs/promises";
|
|
3172
3001
|
import { isAbsolute as isAbsolute2, join as join8, parse, relative, sep } from "node:path";
|
|
3002
|
+
import { CliError as CliError24, isCliError as isCliError6 } from "@wirecat/cli-base";
|
|
3003
|
+
import { openOrdinaryFile as openOrdinaryFile4, writeFileAtomic as writeFileAtomic3 } from "@wirecat/cli-core";
|
|
3173
3004
|
var maximumBytes = 32 * 1024;
|
|
3174
3005
|
var missing3 = /* @__PURE__ */ __name((error) => typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT", "missing");
|
|
3175
3006
|
var recordingScheduleDirectory = /* @__PURE__ */ __name(async (directory, create) => {
|
|
3176
3007
|
if (!isAbsolute2(directory) || /[\0\r\n]/.test(directory))
|
|
3177
|
-
throw new
|
|
3008
|
+
throw new CliError24("validation_error", "archive schedule directory must be absolute");
|
|
3178
3009
|
const root = parse(directory).root;
|
|
3179
3010
|
let path = root;
|
|
3180
3011
|
for (const segment of relative(root, directory).split(sep).filter(Boolean)) {
|
|
@@ -3182,7 +3013,7 @@ var recordingScheduleDirectory = /* @__PURE__ */ __name(async (directory, create
|
|
|
3182
3013
|
try {
|
|
3183
3014
|
const stat2 = await lstat3(path);
|
|
3184
3015
|
if (stat2.isSymbolicLink() || !stat2.isDirectory())
|
|
3185
|
-
throw new
|
|
3016
|
+
throw new CliError24("validation_error", "archive schedule directories must not contain symlinks or foreign files");
|
|
3186
3017
|
} catch (error) {
|
|
3187
3018
|
if (!missing3(error))
|
|
3188
3019
|
throw error;
|
|
@@ -3193,7 +3024,7 @@ var recordingScheduleDirectory = /* @__PURE__ */ __name(async (directory, create
|
|
|
3193
3024
|
throw cause;
|
|
3194
3025
|
const stat2 = await lstat3(path);
|
|
3195
3026
|
if (stat2.isSymbolicLink() || !stat2.isDirectory())
|
|
3196
|
-
throw new
|
|
3027
|
+
throw new CliError24("validation_error", "archive schedule directory changed while creating it");
|
|
3197
3028
|
});
|
|
3198
3029
|
}
|
|
3199
3030
|
}
|
|
@@ -3203,7 +3034,7 @@ var read = /* @__PURE__ */ __name(async (path, signal) => {
|
|
|
3203
3034
|
checkCancelled(signal);
|
|
3204
3035
|
let handle;
|
|
3205
3036
|
try {
|
|
3206
|
-
handle = await
|
|
3037
|
+
handle = await openOrdinaryFile4(path);
|
|
3207
3038
|
} catch (error) {
|
|
3208
3039
|
if (missing3(error))
|
|
3209
3040
|
return null;
|
|
@@ -3212,19 +3043,19 @@ var read = /* @__PURE__ */ __name(async (path, signal) => {
|
|
|
3212
3043
|
try {
|
|
3213
3044
|
const stat2 = await handle.stat({ bigint: true });
|
|
3214
3045
|
if (stat2.size > BigInt(maximumBytes))
|
|
3215
|
-
throw new
|
|
3046
|
+
throw new CliError24("validation_error", "archive schedule metadata exceeds its byte limit");
|
|
3216
3047
|
const bytes2 = Buffer.alloc(maximumBytes + 1);
|
|
3217
3048
|
const size = (await handle.read(bytes2, 0, bytes2.length, 0)).bytesRead;
|
|
3218
3049
|
checkCancelled(signal);
|
|
3219
3050
|
if (size > maximumBytes)
|
|
3220
|
-
throw new
|
|
3051
|
+
throw new CliError24("validation_error", "archive schedule metadata exceeds its byte limit");
|
|
3221
3052
|
const job = parseRecordingScheduleJob(JSON.parse(bytes2.subarray(0, size).toString("utf8")));
|
|
3222
3053
|
return { job, stat: stat2 };
|
|
3223
3054
|
} catch (error) {
|
|
3224
|
-
if (
|
|
3055
|
+
if (isCliError6(error))
|
|
3225
3056
|
throw error;
|
|
3226
3057
|
checkCancelled(signal);
|
|
3227
|
-
throw new
|
|
3058
|
+
throw new CliError24("validation_error", "archive schedule metadata is invalid");
|
|
3228
3059
|
} finally {
|
|
3229
3060
|
await handle.close();
|
|
3230
3061
|
}
|
|
@@ -3240,7 +3071,7 @@ var fileRecordingScheduleStore = /* @__PURE__ */ __name((directory) => {
|
|
|
3240
3071
|
for (const name of (await readdir3(directory)).filter((name2) => /^[a-f0-9]{64}\.json$/.test(name2)).sort()) {
|
|
3241
3072
|
const saved = await read(join8(directory, name), options.signal);
|
|
3242
3073
|
if (!saved || `${saved.job.schedule.id}.json` !== name)
|
|
3243
|
-
throw new
|
|
3074
|
+
throw new CliError24("validation_error", "archive schedule filename does not match its identity");
|
|
3244
3075
|
result.push(saved.job);
|
|
3245
3076
|
}
|
|
3246
3077
|
return result;
|
|
@@ -3252,7 +3083,7 @@ var fileRecordingScheduleStore = /* @__PURE__ */ __name((directory) => {
|
|
|
3252
3083
|
return null;
|
|
3253
3084
|
const saved = await read(target, options.signal);
|
|
3254
3085
|
if (saved && saved.job.schedule.id !== id)
|
|
3255
|
-
throw new
|
|
3086
|
+
throw new CliError24("validation_error", "archive schedule filename does not match its identity");
|
|
3256
3087
|
return saved?.job ?? null;
|
|
3257
3088
|
},
|
|
3258
3089
|
async save(value, options) {
|
|
@@ -3260,14 +3091,14 @@ var fileRecordingScheduleStore = /* @__PURE__ */ __name((directory) => {
|
|
|
3260
3091
|
const content = `${JSON.stringify(job)}
|
|
3261
3092
|
`;
|
|
3262
3093
|
if (Buffer.byteLength(content) > maximumBytes)
|
|
3263
|
-
throw new
|
|
3094
|
+
throw new CliError24("validation_error", "archive schedule metadata exceeds its byte limit");
|
|
3264
3095
|
checkCancelled(options.signal);
|
|
3265
3096
|
await recordingScheduleDirectory(directory, true);
|
|
3266
3097
|
const target = path(job.schedule.id);
|
|
3267
3098
|
const existing = await read(target, options.signal);
|
|
3268
3099
|
if (existing && (existing.job.schedule.id !== job.schedule.id || JSON.stringify(existing.job.capture) !== JSON.stringify(job.capture)))
|
|
3269
|
-
throw new
|
|
3270
|
-
await
|
|
3100
|
+
throw new CliError24("validation_error", "archive schedule file belongs to another captured job");
|
|
3101
|
+
await writeFileAtomic3(target, content, {
|
|
3271
3102
|
overwrite: existing !== null,
|
|
3272
3103
|
beforePublish: /* @__PURE__ */ __name(async () => {
|
|
3273
3104
|
checkCancelled(options.signal);
|
|
@@ -3275,7 +3106,7 @@ var fileRecordingScheduleStore = /* @__PURE__ */ __name((directory) => {
|
|
|
3275
3106
|
return;
|
|
3276
3107
|
const current = await lstat3(target, { bigint: true });
|
|
3277
3108
|
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")
|
|
3278
|
-
throw new
|
|
3109
|
+
throw new CliError24("validation_error", "archive schedule file changed before replacement");
|
|
3279
3110
|
}, "beforePublish")
|
|
3280
3111
|
});
|
|
3281
3112
|
}
|
|
@@ -3285,6 +3116,8 @@ var fileRecordingScheduleStore = /* @__PURE__ */ __name((directory) => {
|
|
|
3285
3116
|
// dist/recording-schedule-systemd.js
|
|
3286
3117
|
import { execFile } from "node:child_process";
|
|
3287
3118
|
import { isAbsolute as isAbsolute3, join as join9 } from "node:path";
|
|
3119
|
+
import { CliError as CliError25, isCliError as isCliError7 } from "@wirecat/cli-base";
|
|
3120
|
+
import { openOrdinaryFile as openOrdinaryFile5, syncDirectory, writeFileAtomic as writeFileAtomic4 } from "@wirecat/cli-core";
|
|
3288
3121
|
var execute = /* @__PURE__ */ __name((executable, args, options) => new Promise((resolve3, reject) => {
|
|
3289
3122
|
execFile(executable, [...args], { shell: false, signal: options.signal, timeout: 3e4, maxBuffer: 65536, encoding: "utf8" }, (error) => {
|
|
3290
3123
|
if (!error)
|
|
@@ -3292,8 +3125,8 @@ var execute = /* @__PURE__ */ __name((executable, args, options) => new Promise(
|
|
|
3292
3125
|
if (typeof error.code === "number")
|
|
3293
3126
|
return resolve3({ exitCode: error.code });
|
|
3294
3127
|
if (error.code === "ENOENT")
|
|
3295
|
-
return reject(new
|
|
3296
|
-
reject(new
|
|
3128
|
+
return reject(new CliError25("configuration_error", "systemctl is unavailable"));
|
|
3129
|
+
reject(new CliError25("outcome_unknown", "archive timer command was interrupted; inspect its saved pending job and systemctl status"));
|
|
3297
3130
|
});
|
|
3298
3131
|
}), "execute");
|
|
3299
3132
|
var missing4 = /* @__PURE__ */ __name((error) => typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT", "missing");
|
|
@@ -3350,7 +3183,7 @@ var maximumUnitBytes = 64 * 1024;
|
|
|
3350
3183
|
var existingUnit = /* @__PURE__ */ __name(async (path) => {
|
|
3351
3184
|
let handle;
|
|
3352
3185
|
try {
|
|
3353
|
-
handle = await
|
|
3186
|
+
handle = await openOrdinaryFile5(path);
|
|
3354
3187
|
} catch (error) {
|
|
3355
3188
|
if (missing4(error))
|
|
3356
3189
|
return null;
|
|
@@ -3360,7 +3193,7 @@ var existingUnit = /* @__PURE__ */ __name(async (path) => {
|
|
|
3360
3193
|
const bytes2 = Buffer.alloc(maximumUnitBytes + 1);
|
|
3361
3194
|
const size = (await handle.read(bytes2, 0, bytes2.length, 0)).bytesRead;
|
|
3362
3195
|
if (size > maximumUnitBytes)
|
|
3363
|
-
throw new
|
|
3196
|
+
throw new CliError25("validation_error", "archive timer unit exceeds its byte limit");
|
|
3364
3197
|
return bytes2.subarray(0, size).toString("utf8");
|
|
3365
3198
|
} finally {
|
|
3366
3199
|
await handle.close();
|
|
@@ -3368,17 +3201,17 @@ var existingUnit = /* @__PURE__ */ __name(async (path) => {
|
|
|
3368
3201
|
}, "existingUnit");
|
|
3369
3202
|
var writeUnit = /* @__PURE__ */ __name(async (directory, name, content, signal) => {
|
|
3370
3203
|
if (Buffer.byteLength(content) > maximumUnitBytes)
|
|
3371
|
-
throw new
|
|
3204
|
+
throw new CliError25("validation_error", "archive timer unit exceeds its byte limit");
|
|
3372
3205
|
const path = join9(directory, name);
|
|
3373
3206
|
const current = await existingUnit(path);
|
|
3374
3207
|
if (current !== null) {
|
|
3375
3208
|
if (current !== content)
|
|
3376
|
-
throw new
|
|
3209
|
+
throw new CliError25("validation_error", "archive timer unit is foreign or was edited; it was preserved");
|
|
3377
3210
|
await syncDirectory(directory);
|
|
3378
3211
|
return;
|
|
3379
3212
|
}
|
|
3380
3213
|
checkCancelled(signal);
|
|
3381
|
-
await
|
|
3214
|
+
await writeFileAtomic4(path, content, { overwrite: false, beforePublish: /* @__PURE__ */ __name(() => checkCancelled(signal), "beforePublish") });
|
|
3382
3215
|
}, "writeUnit");
|
|
3383
3216
|
var createSystemdRecordingArchiveScheduler = /* @__PURE__ */ __name((options) => {
|
|
3384
3217
|
const directory = options.unitDirectory;
|
|
@@ -3386,10 +3219,10 @@ var createSystemdRecordingArchiveScheduler = /* @__PURE__ */ __name((options) =>
|
|
|
3386
3219
|
const platform = options.platform ?? process.platform;
|
|
3387
3220
|
const executor = options.execute ?? execute;
|
|
3388
3221
|
if (!isAbsolute3(directory) || !isAbsolute3(executable) || /[\0\r\n]/.test(directory + executable))
|
|
3389
|
-
throw new
|
|
3222
|
+
throw new CliError25("validation_error", "systemd archive paths must be absolute");
|
|
3390
3223
|
const assertSupported = /* @__PURE__ */ __name(() => {
|
|
3391
3224
|
if (platform !== "linux")
|
|
3392
|
-
throw new
|
|
3225
|
+
throw new CliError25("configuration_error", "automatic archive scheduling currently supports Linux user systemd only");
|
|
3393
3226
|
}, "assertSupported");
|
|
3394
3227
|
const checked = /* @__PURE__ */ __name(async (args, expected, signal) => {
|
|
3395
3228
|
checkCancelled(signal);
|
|
@@ -3397,12 +3230,12 @@ var createSystemdRecordingArchiveScheduler = /* @__PURE__ */ __name((options) =>
|
|
|
3397
3230
|
try {
|
|
3398
3231
|
result = await executor(executable, ["--user", ...args], { shell: false, signal });
|
|
3399
3232
|
} catch (error) {
|
|
3400
|
-
if (
|
|
3233
|
+
if (isCliError7(error))
|
|
3401
3234
|
throw error;
|
|
3402
|
-
throw new
|
|
3235
|
+
throw new CliError25("outcome_unknown", "archive timer command did not acknowledge completion; inspect its saved job and systemctl status");
|
|
3403
3236
|
}
|
|
3404
3237
|
if (result.exitCode !== expected)
|
|
3405
|
-
throw new
|
|
3238
|
+
throw new CliError25("outcome_unknown", "archive timer state was not verified; inspect its saved job and systemctl status");
|
|
3406
3239
|
}, "checked");
|
|
3407
3240
|
return {
|
|
3408
3241
|
backend: "systemd-user",
|
|
@@ -3414,11 +3247,11 @@ var createSystemdRecordingArchiveScheduler = /* @__PURE__ */ __name((options) =>
|
|
|
3414
3247
|
const units = unitPlan(job);
|
|
3415
3248
|
checkCancelled(active.signal);
|
|
3416
3249
|
for (const path of [job.capture.runtime, job.capture.cliPath]) {
|
|
3417
|
-
const handle = await
|
|
3250
|
+
const handle = await openOrdinaryFile5(path);
|
|
3418
3251
|
try {
|
|
3419
3252
|
const stat2 = await handle.stat();
|
|
3420
3253
|
if (path === job.capture.runtime && (stat2.mode & 73) === 0)
|
|
3421
|
-
throw new
|
|
3254
|
+
throw new CliError25("validation_error", "scheduled runtime must be executable");
|
|
3422
3255
|
} finally {
|
|
3423
3256
|
await handle.close();
|
|
3424
3257
|
}
|
|
@@ -3436,9 +3269,9 @@ var createSystemdRecordingArchiveScheduler = /* @__PURE__ */ __name((options) =>
|
|
|
3436
3269
|
const units = unitPlan(value);
|
|
3437
3270
|
checkCancelled(active.signal);
|
|
3438
3271
|
if (!await recordingScheduleDirectory(directory, false))
|
|
3439
|
-
throw new
|
|
3272
|
+
throw new CliError25("not_found", "archive timer units were not found");
|
|
3440
3273
|
if (await existingUnit(join9(directory, units.serviceName)) !== units.service || await existingUnit(join9(directory, units.timerName)) !== units.timer)
|
|
3441
|
-
throw new
|
|
3274
|
+
throw new CliError25("validation_error", "archive timer units are foreign or were edited; they were preserved");
|
|
3442
3275
|
await checked(["disable", "--now", units.timerName], 0, active.signal);
|
|
3443
3276
|
await checked(["is-enabled", "--quiet", units.timerName], 1, active.signal);
|
|
3444
3277
|
await checked(["is-active", "--quiet", units.timerName], 3, active.signal);
|
|
@@ -3447,10 +3280,11 @@ var createSystemdRecordingArchiveScheduler = /* @__PURE__ */ __name((options) =>
|
|
|
3447
3280
|
}, "createSystemdRecordingArchiveScheduler");
|
|
3448
3281
|
|
|
3449
3282
|
// dist/recordings.js
|
|
3283
|
+
import { CliError as CliError26 } from "@wirecat/cli-base";
|
|
3450
3284
|
var required = /* @__PURE__ */ __name((value) => {
|
|
3451
3285
|
const text2 = string2(value);
|
|
3452
3286
|
if (text2 === null)
|
|
3453
|
-
throw new
|
|
3287
|
+
throw new CliError26("invalid_response", "Zoom response is missing a required field");
|
|
3454
3288
|
return text2;
|
|
3455
3289
|
}, "required");
|
|
3456
3290
|
var timestamp = /* @__PURE__ */ __name((value, zones) => {
|
|
@@ -3465,7 +3299,7 @@ var meeting = /* @__PURE__ */ __name((value, zones) => {
|
|
|
3465
3299
|
const row = object(value);
|
|
3466
3300
|
const id = typeof row.id === "number" && Number.isSafeInteger(row.id) ? String(row.id) : required(row.id);
|
|
3467
3301
|
if (!Array.isArray(row.recording_files))
|
|
3468
|
-
throw new
|
|
3302
|
+
throw new CliError26("invalid_response", "Zoom returned invalid recording files");
|
|
3469
3303
|
const all = [
|
|
3470
3304
|
...row.recording_files,
|
|
3471
3305
|
...Array.isArray(row.participant_audio_files) ? row.participant_audio_files : []
|
|
@@ -3475,7 +3309,7 @@ var meeting = /* @__PURE__ */ __name((value, zones) => {
|
|
|
3475
3309
|
const asset = object(value2);
|
|
3476
3310
|
const id2 = string2(asset.id);
|
|
3477
3311
|
if (id2 !== null && seen.has(id2))
|
|
3478
|
-
throw new
|
|
3312
|
+
throw new CliError26("invalid_response", "Zoom repeated a recording file id");
|
|
3479
3313
|
if (id2 !== null)
|
|
3480
3314
|
seen.add(id2);
|
|
3481
3315
|
return {
|
|
@@ -3503,12 +3337,12 @@ var ZoomRecordings = class {
|
|
|
3503
3337
|
}
|
|
3504
3338
|
catalog(account) {
|
|
3505
3339
|
if (typeof account !== "string" || !account.trim())
|
|
3506
|
-
throw new
|
|
3340
|
+
throw new CliError26("validation_error", "recording account is required");
|
|
3507
3341
|
return {
|
|
3508
3342
|
provider: "zoom",
|
|
3509
3343
|
list: /* @__PURE__ */ __name(async (options) => {
|
|
3510
3344
|
if (options.account !== account)
|
|
3511
|
-
throw new
|
|
3345
|
+
throw new CliError26("validation_error", "recording catalog account cannot be overridden");
|
|
3512
3346
|
const page = await this.listPage(options);
|
|
3513
3347
|
return {
|
|
3514
3348
|
items: page.items.map(({ uuid, ...item }) => ({ ...item, externalId: uuid })),
|
|
@@ -3521,27 +3355,27 @@ var ZoomRecordings = class {
|
|
|
3521
3355
|
const dates = [options.from, options.to].map((date) => {
|
|
3522
3356
|
const instant = Date.parse(`${date}T00:00:00Z`);
|
|
3523
3357
|
if (!/^\d{4}-\d{2}-\d{2}$/.test(date) || !Number.isFinite(instant) || new Date(instant).toISOString().slice(0, 10) !== date)
|
|
3524
|
-
throw new
|
|
3358
|
+
throw new CliError26("validation_error", "recording dates must be valid YYYY-MM-DD dates");
|
|
3525
3359
|
return instant;
|
|
3526
3360
|
});
|
|
3527
3361
|
const difference = (dates[1] ?? 0) - (dates[0] ?? 0);
|
|
3528
3362
|
if (difference < 0 || difference > 31 * 864e5)
|
|
3529
|
-
throw new
|
|
3363
|
+
throw new CliError26("validation_error", "recording date range must be ordered and at most one month");
|
|
3530
3364
|
if (options.cursor !== void 0 && (typeof options.cursor !== "string" || !options.cursor.trim() || options.cursor.length > 4096))
|
|
3531
|
-
throw new
|
|
3365
|
+
throw new CliError26("validation_error", "invalid recording pagination cursor");
|
|
3532
3366
|
const signal = operationSignal(options.signal);
|
|
3533
3367
|
const query = new URLSearchParams({ from: options.from, to: options.to, page_size: "100" });
|
|
3534
3368
|
if (options.cursor !== void 0)
|
|
3535
3369
|
query.set("next_page_token", options.cursor);
|
|
3536
3370
|
const body = await this.remote.request(`/users/me/recordings?${query}`, "cloud_recording:read:list_user_recordings", { signal });
|
|
3537
3371
|
if (!Array.isArray(body.meetings) || body.meetings.length > 1e3)
|
|
3538
|
-
throw new
|
|
3372
|
+
throw new CliError26("invalid_response", "Zoom returned an invalid recording list");
|
|
3539
3373
|
const items = body.meetings.map((row) => meeting(row, this.zones));
|
|
3540
3374
|
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()))
|
|
3541
|
-
throw new
|
|
3375
|
+
throw new CliError26("invalid_response", "Zoom returned an invalid recording pagination cursor");
|
|
3542
3376
|
const nextCursor = string2(body.next_page_token);
|
|
3543
3377
|
if (nextCursor !== null && nextCursor.length > 4096)
|
|
3544
|
-
throw new
|
|
3378
|
+
throw new CliError26("invalid_response", "Zoom returned an oversized pagination cursor");
|
|
3545
3379
|
return { items, nextCursor };
|
|
3546
3380
|
}
|
|
3547
3381
|
async list(options) {
|
|
@@ -3550,27 +3384,27 @@ var ZoomRecordings = class {
|
|
|
3550
3384
|
let cursor;
|
|
3551
3385
|
for (let pages = 0; ; pages++) {
|
|
3552
3386
|
if (pages >= 1e3)
|
|
3553
|
-
throw new
|
|
3387
|
+
throw new CliError26("invalid_response", "recording catalog page limit exceeded");
|
|
3554
3388
|
const page = await this.listPage({ ...options, ...cursor === void 0 ? {} : { cursor } });
|
|
3555
3389
|
for (const item of page.items) {
|
|
3556
3390
|
const previous = meetings.get(item.uuid);
|
|
3557
3391
|
if (previous && JSON.stringify(previous) !== JSON.stringify(item))
|
|
3558
|
-
throw new
|
|
3392
|
+
throw new CliError26("invalid_response", "Zoom returned conflicting recording occurrences");
|
|
3559
3393
|
if (!previous && meetings.size >= 1e4)
|
|
3560
|
-
throw new
|
|
3394
|
+
throw new CliError26("invalid_response", "recording catalog occurrence limit exceeded");
|
|
3561
3395
|
meetings.set(item.uuid, item);
|
|
3562
3396
|
}
|
|
3563
3397
|
if (page.nextCursor === null)
|
|
3564
3398
|
return [...meetings.values()];
|
|
3565
3399
|
if (cursors.has(page.nextCursor))
|
|
3566
|
-
throw new
|
|
3400
|
+
throw new CliError26("invalid_response", "Zoom repeated a pagination token");
|
|
3567
3401
|
cursors.add(page.nextCursor);
|
|
3568
3402
|
cursor = page.nextCursor;
|
|
3569
3403
|
}
|
|
3570
3404
|
}
|
|
3571
3405
|
async details(id, signal) {
|
|
3572
3406
|
if (!id.trim())
|
|
3573
|
-
throw new
|
|
3407
|
+
throw new CliError26("validation_error", "recording meeting id is required");
|
|
3574
3408
|
const body = await this.remote.request(`/meetings/${encodeUuid(id)}/recordings`, "cloud_recording:read:list_recording_files", { ...signal ? { signal } : {} });
|
|
3575
3409
|
const item = meeting(body, this.zones);
|
|
3576
3410
|
const rows = [
|
|
@@ -3613,7 +3447,7 @@ var zoomRecordingSchedule = /* @__PURE__ */ __name(({ deps, getConfig, profile,
|
|
|
3613
3447
|
}),
|
|
3614
3448
|
recordings: /* @__PURE__ */ __name((job) => {
|
|
3615
3449
|
if (!sameConfigFolder(dirname2(deps.configPath), job.capture.configDir, { env }) || profile() !== job.capture.profile || zoomClientId(readConfig(deps.configPath), deps.env ?? process.env) !== job.capture.clientId)
|
|
3616
|
-
throw new
|
|
3450
|
+
throw new CliError27("configuration_error", "archive schedule requires its saved profile and Zoom client id; select those settings before running");
|
|
3617
3451
|
return new ZoomRecordings(new TokenManager({
|
|
3618
3452
|
...deps.tokens.options,
|
|
3619
3453
|
clientId: job.capture.clientId,
|
|
@@ -3631,9 +3465,9 @@ var zoomRecordingSchedule = /* @__PURE__ */ __name(({ deps, getConfig, profile,
|
|
|
3631
3465
|
const clientId = zoomClientId(getConfig(), deps.env ?? process.env);
|
|
3632
3466
|
const named = profile();
|
|
3633
3467
|
if (!clientId)
|
|
3634
|
-
throw new
|
|
3468
|
+
throw new CliError27("configuration_error", "archive schedules require a configured Zoom client id");
|
|
3635
3469
|
if (!deps.recordingScheduleTarget)
|
|
3636
|
-
throw new
|
|
3470
|
+
throw new CliError27("configuration_error", "archive scheduler requires an explicit runtime and CLI path");
|
|
3637
3471
|
return {
|
|
3638
3472
|
profile: named,
|
|
3639
3473
|
clientId,
|
|
@@ -3646,6 +3480,8 @@ var zoomRecordingSchedule = /* @__PURE__ */ __name(({ deps, getConfig, profile,
|
|
|
3646
3480
|
}, "zoomRecordingSchedule");
|
|
3647
3481
|
|
|
3648
3482
|
// dist/remote-meetings.js
|
|
3483
|
+
import { CliError as CliError28 } from "@wirecat/cli-base";
|
|
3484
|
+
import { createMeetingManagement, dispatchMeetingMutation, validateMeetingChange } from "@wirecat/cli-core";
|
|
3649
3485
|
var normalized = /* @__PURE__ */ __name((value) => {
|
|
3650
3486
|
const row = object(value);
|
|
3651
3487
|
const id = typeof row.id === "number" && Number.isSafeInteger(row.id) ? String(row.id) : required(row.id);
|
|
@@ -3664,9 +3500,9 @@ var normalized = /* @__PURE__ */ __name((value) => {
|
|
|
3664
3500
|
}, "normalized");
|
|
3665
3501
|
var changeBody = /* @__PURE__ */ __name((change, create) => {
|
|
3666
3502
|
if (!change || Object.keys(change).some((key) => !["topic", "startTime", "durationMinutes", "timezone", "agenda", "type"].includes(key)))
|
|
3667
|
-
throw new
|
|
3503
|
+
throw new CliError28("validation_error", "unsupported meeting change field");
|
|
3668
3504
|
if (change.type !== void 0 && change.type !== 1 && change.type !== 2)
|
|
3669
|
-
throw new
|
|
3505
|
+
throw new CliError28("validation_error", "only instant or scheduled meeting types are supported");
|
|
3670
3506
|
const neutral = {
|
|
3671
3507
|
...change.topic !== void 0 ? { title: change.topic } : {},
|
|
3672
3508
|
...change.type !== void 0 ? { kind: change.type === 1 ? "instant" : "scheduled" } : {},
|
|
@@ -3711,7 +3547,7 @@ var ZoomRemoteMeetings = class {
|
|
|
3711
3547
|
try {
|
|
3712
3548
|
return normalized(body);
|
|
3713
3549
|
} catch {
|
|
3714
|
-
throw new
|
|
3550
|
+
throw new CliError28("outcome_unknown", "Zoom mutation returned incomplete meeting details; verify remote state before retrying");
|
|
3715
3551
|
}
|
|
3716
3552
|
}
|
|
3717
3553
|
return void 0;
|
|
@@ -3730,7 +3566,7 @@ var ZoomRemoteMeetings = class {
|
|
|
3730
3566
|
cancel(id, options = {}) {
|
|
3731
3567
|
const path = zoomMeetingPath(id);
|
|
3732
3568
|
if (options.occurrenceId !== void 0 && !string2(options.occurrenceId))
|
|
3733
|
-
throw new
|
|
3569
|
+
throw new CliError28("validation_error", "occurrence id must be nonempty");
|
|
3734
3570
|
const query = options.occurrenceId ? `?${new URLSearchParams({ occurrence_id: options.occurrenceId })}` : "";
|
|
3735
3571
|
return this.mutate("cancel", { method: "DELETE", path: `${path}${query}` }, "meeting:delete:meeting", options);
|
|
3736
3572
|
}
|
|
@@ -3760,7 +3596,7 @@ var createZoomMeetingManagement = /* @__PURE__ */ __name((remote, account) => cr
|
|
|
3760
3596
|
create: /* @__PURE__ */ __name(async (change, { signal }) => {
|
|
3761
3597
|
const receipt = await remote.create({ ...zoomChange(change), type: 2 }, { apply: true, signal });
|
|
3762
3598
|
if (!receipt.meeting)
|
|
3763
|
-
throw new
|
|
3599
|
+
throw new CliError28("outcome_unknown", "Zoom did not acknowledge the created meeting");
|
|
3764
3600
|
return managedMeeting(receipt.meeting);
|
|
3765
3601
|
}, "create"),
|
|
3766
3602
|
update: /* @__PURE__ */ __name(async (id, change, { signal }) => {
|
|
@@ -3797,7 +3633,7 @@ var lazyRemote = /* @__PURE__ */ __name((make) => {
|
|
|
3797
3633
|
};
|
|
3798
3634
|
}, "lazyRemote");
|
|
3799
3635
|
var unbound = /* @__PURE__ */ __name(() => {
|
|
3800
|
-
throw new
|
|
3636
|
+
throw new CliError28("configuration_error", "no Zoom account is open for this command");
|
|
3801
3637
|
}, "unbound");
|
|
3802
3638
|
var leaves = /* @__PURE__ */ __name((command) => command.commands.length ? command.commands.flatMap(leaves) : [command], "leaves");
|
|
3803
3639
|
var storeLeaves = /* @__PURE__ */ __name((program, before, management) => {
|
|
@@ -3806,6 +3642,8 @@ var storeLeaves = /* @__PURE__ */ __name((program, before, management) => {
|
|
|
3806
3642
|
}, "storeLeaves");
|
|
3807
3643
|
|
|
3808
3644
|
// dist/request-events.js
|
|
3645
|
+
import { isCliError as isCliError8 } from "@wirecat/cli-base";
|
|
3646
|
+
import { currentAttempt, providerRequest } from "@wirecat/cli-core";
|
|
3809
3647
|
var SEGMENT = /^(?:v\d+|[a-z][a-z_]{0,23})$/;
|
|
3810
3648
|
var operationOf = /* @__PURE__ */ __name((method, url) => {
|
|
3811
3649
|
let path;
|
|
@@ -3874,14 +3712,20 @@ var observedFetch = /* @__PURE__ */ __name((fetcher, sink) => async (input, init
|
|
|
3874
3712
|
}
|
|
3875
3713
|
return response;
|
|
3876
3714
|
} catch (error) {
|
|
3877
|
-
answered({ error, errorCode:
|
|
3715
|
+
answered({ error, errorCode: isCliError8(error) ? error.code : "network_error" });
|
|
3878
3716
|
throw error;
|
|
3879
3717
|
}
|
|
3880
3718
|
}, "observedFetch");
|
|
3881
3719
|
|
|
3720
|
+
// dist/setup-commands.js
|
|
3721
|
+
import { CliError as CliError29 } from "@wirecat/cli-base";
|
|
3722
|
+
import { annotate as annotate8 } from "@wirecat/cli-base/commands";
|
|
3723
|
+
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";
|
|
3724
|
+
|
|
3882
3725
|
// dist/account-removal.js
|
|
3883
3726
|
import { readdirSync, readFileSync } from "node:fs";
|
|
3884
3727
|
import { dirname as dirname3, join as join11 } from "node:path";
|
|
3728
|
+
import { accountRemoveCommand } from "@wirecat/cli-core";
|
|
3885
3729
|
var activeSchedule = /* @__PURE__ */ __name((configPath, profile) => {
|
|
3886
3730
|
const directory = join11(dirname3(configPath), "recording-schedules");
|
|
3887
3731
|
let names;
|
|
@@ -3914,6 +3758,7 @@ var zoomRemoval = /* @__PURE__ */ __name(({ configPath, tokens }) => ({
|
|
|
3914
3758
|
var zoomAccountRemoveCommand = /* @__PURE__ */ __name((deps) => accountRemoveCommand(ZM, zoomRemoval(deps)), "zoomAccountRemoveCommand");
|
|
3915
3759
|
|
|
3916
3760
|
// dist/models-commands.js
|
|
3761
|
+
import { modelCatalogueCommand } from "@wirecat/cli-core";
|
|
3917
3762
|
var addModelsCommands = /* @__PURE__ */ __name((program, deps) => {
|
|
3918
3763
|
program.addCommand(modelCatalogueCommand({ command: "zm", appName: "zoom-cli", envPrefix: "ZM", description: "Zoom meetings", version: "" }, {
|
|
3919
3764
|
kinds: ["audio"],
|
|
@@ -3926,74 +3771,10 @@ var addModelsCommands = /* @__PURE__ */ __name((program, deps) => {
|
|
|
3926
3771
|
|
|
3927
3772
|
// dist/upgrade.js
|
|
3928
3773
|
import { join as join12 } from "node:path";
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
import {
|
|
3932
|
-
|
|
3933
|
-
var npmRegistry = /* @__PURE__ */ __name(() => hostFetch({ hosts: ["registry.npmjs.org"] }), "npmRegistry");
|
|
3934
|
-
var QUIET_WORDS = [
|
|
3935
|
-
"--help",
|
|
3936
|
-
"-h",
|
|
3937
|
-
"--version",
|
|
3938
|
-
"-V",
|
|
3939
|
-
"--json",
|
|
3940
|
-
"--jsonl",
|
|
3941
|
-
"--dry-run",
|
|
3942
|
-
"--timeout",
|
|
3943
|
-
"commands"
|
|
3944
|
-
];
|
|
3945
|
-
var appUpdate = /* @__PURE__ */ __name((app) => {
|
|
3946
|
-
const quietWords = app.quietWords ?? QUIET_WORDS;
|
|
3947
|
-
const installer2 = /* @__PURE__ */ __name(({ scriptPath } = {}) => installerOf(scriptPath ?? realpathSync(fileURLToPath2(app.entry))), "installer");
|
|
3948
|
-
const enabled = /* @__PURE__ */ __name((env) => {
|
|
3949
|
-
try {
|
|
3950
|
-
return app.enabled(env);
|
|
3951
|
-
} catch {
|
|
3952
|
-
return false;
|
|
3953
|
-
}
|
|
3954
|
-
}, "enabled");
|
|
3955
|
-
return {
|
|
3956
|
-
installer: installer2,
|
|
3957
|
-
latest: /* @__PURE__ */ __name((environment = {}) => latestVersion(app.packageName, environment.fetch ?? npmRegistry(), { timeoutMs: 3e3 }), "latest"),
|
|
3958
|
-
/** The package manager's output goes to stderr, so stdout stays one result. */
|
|
3959
|
-
runUpdate: /* @__PURE__ */ __name((argv, environment = {}) => environment.spawn ? environment.spawn(argv) : runUpdate(argv), "runUpdate"),
|
|
3960
|
-
/**
|
|
3961
|
-
* The daily "a newer version exists" line, or `undefined`. Started beside the command and awaited
|
|
3962
|
-
* after it, so asking npm costs the command nothing; any failure is silence, never an error.
|
|
3963
|
-
*/
|
|
3964
|
-
updateNotice: /* @__PURE__ */ __name((argv, { tty, environment = {}, env = process.env } = {}) => {
|
|
3965
|
-
try {
|
|
3966
|
-
const delimiter = argv.indexOf("--");
|
|
3967
|
-
const options = argv.slice(0, delimiter < 0 ? void 0 : delimiter);
|
|
3968
|
-
const quiet = options.some((word) => quietWords.some((quietWord) => word === quietWord || word.startsWith(`${quietWord}=`)));
|
|
3969
|
-
if (quiet)
|
|
3970
|
-
return Promise.resolve(void 0);
|
|
3971
|
-
const pretty = !argv.includes("--json") && !argv.includes("--jsonl") && (tty ?? process.stdout.isTTY === true);
|
|
3972
|
-
return updateNotice({
|
|
3973
|
-
argv,
|
|
3974
|
-
packageName: app.packageName,
|
|
3975
|
-
command: app.command,
|
|
3976
|
-
version: app.version,
|
|
3977
|
-
statePath: app.statePath(env),
|
|
3978
|
-
fetch: environment.fetch ?? npmRegistry(),
|
|
3979
|
-
...environment.now ? { now: environment.now } : {},
|
|
3980
|
-
format: pretty ? "pretty" : "json",
|
|
3981
|
-
stderrIsTTY: environment.stderrIsTTY ?? process.stderr.isTTY === true,
|
|
3982
|
-
quiet: argv.includes("--quiet"),
|
|
3983
|
-
enabled: enabled(env),
|
|
3984
|
-
installer: installer2(environment),
|
|
3985
|
-
env,
|
|
3986
|
-
offVariables: app.offVariables
|
|
3987
|
-
});
|
|
3988
|
-
} catch {
|
|
3989
|
-
return Promise.resolve(void 0);
|
|
3990
|
-
}
|
|
3991
|
-
}, "updateNotice")
|
|
3992
|
-
};
|
|
3993
|
-
}, "appUpdate");
|
|
3994
|
-
|
|
3995
|
-
// dist/upgrade.js
|
|
3996
|
-
var { installer, latest, runUpdate: runUpdate2 } = appUpdate({
|
|
3774
|
+
import { createRenderer } from "@wirecat/cli-base";
|
|
3775
|
+
import { annotate as annotate7 } from "@wirecat/cli-base/commands";
|
|
3776
|
+
import { appUpdate, FETCH as FETCH3, overrideSharedContract, upgradeCommand } from "@wirecat/cli-core";
|
|
3777
|
+
var { installer, latest, runUpdate } = appUpdate({
|
|
3997
3778
|
packageName: "@wirecat/zoom-cli",
|
|
3998
3779
|
command: "zm",
|
|
3999
3780
|
version: VERSION,
|
|
@@ -4011,10 +3792,10 @@ var addUpgradeCommand = /* @__PURE__ */ __name((program, streams) => {
|
|
|
4011
3792
|
streams,
|
|
4012
3793
|
installer: /* @__PURE__ */ __name(() => installer(), "installer"),
|
|
4013
3794
|
latest: /* @__PURE__ */ __name(() => latest(), "latest"),
|
|
4014
|
-
install: /* @__PURE__ */ __name((argv) =>
|
|
3795
|
+
install: /* @__PURE__ */ __name((argv) => runUpdate(argv), "install")
|
|
4015
3796
|
};
|
|
4016
3797
|
}), "Zoom upgrade checks npm and may install files, so it explicitly declares both the network read and local write.", (command) => {
|
|
4017
|
-
|
|
3798
|
+
annotate7(command, { effects: FETCH3 });
|
|
4018
3799
|
}));
|
|
4019
3800
|
upgrade.commands.find((command) => command.name() === "upgrade")?.copyInheritedSettings(program);
|
|
4020
3801
|
}, "addUpgradeCommand");
|
|
@@ -4022,68 +3803,74 @@ var addUpgradeCommand = /* @__PURE__ */ __name((program, streams) => {
|
|
|
4022
3803
|
// dist/setup-commands.js
|
|
4023
3804
|
var refuseAgentPermissions = /* @__PURE__ */ __name((command, key) => {
|
|
4024
3805
|
if (environmentOf(command).agent && (key === "permissions" || key.startsWith("permissions.")))
|
|
4025
|
-
throw new
|
|
3806
|
+
throw new CliError29("permission_error", "change profile permissions in a terminal");
|
|
4026
3807
|
}, "refuseAgentPermissions");
|
|
4027
3808
|
var addConfigCommands = /* @__PURE__ */ __name((program, { configPath, output, warn, named }) => {
|
|
4028
|
-
const cfg =
|
|
4029
|
-
|
|
3809
|
+
const cfg = annotate8(program.command("config"), { effects: NO_EFFECTS6 }).description("local Zoom configuration");
|
|
3810
|
+
annotate8(cfg.command("show"), { effects: LOCAL_READ4 }).description("show local configuration").action(() => {
|
|
4030
3811
|
const { config, issues, raw } = inspectConfig(configPath, permissionKeys(program));
|
|
4031
|
-
output(
|
|
3812
|
+
output(itemOf5({ ...config, settings: settingRows(raw ?? {}, ZOOM_SETTINGS) }));
|
|
4032
3813
|
for (const issue of issues)
|
|
4033
3814
|
warn(`${issue.what}, so it is left out${issue.fix ? ` \u2014 \`${issue.fix}\` removes it` : ""}`);
|
|
4034
3815
|
});
|
|
4035
|
-
|
|
3816
|
+
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) {
|
|
4036
3817
|
refuseAgentPermissions(this, key);
|
|
4037
|
-
output(
|
|
3818
|
+
output(itemOf5(setConfig(configPath, key, value, named, permissionKeys(program))));
|
|
4038
3819
|
});
|
|
4039
|
-
|
|
3820
|
+
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) {
|
|
4040
3821
|
refuseAgentPermissions(this, key);
|
|
4041
|
-
output(
|
|
3822
|
+
output(itemOf5(unsetConfig(configPath, key, named(), permissionKeys(program))));
|
|
4042
3823
|
});
|
|
4043
|
-
|
|
3824
|
+
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(() => {
|
|
4044
3825
|
const added = migrateConfig(configPath);
|
|
4045
|
-
output(
|
|
3826
|
+
output(itemOf5({ config_file: configPath, added }));
|
|
4046
3827
|
warn(added.length > 0 ? `added ${added.join(", ")} to ${configPath}` : `${configPath} already has every setting`);
|
|
4047
3828
|
});
|
|
4048
3829
|
}, "addConfigCommands");
|
|
4049
3830
|
var addAppCommand = /* @__PURE__ */ __name((program, { output, buffer, pretty }) => {
|
|
4050
|
-
|
|
3831
|
+
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(() => {
|
|
4051
3832
|
if (pretty())
|
|
4052
3833
|
buffer(`${zoomAppChecklist()}
|
|
4053
3834
|
`);
|
|
4054
3835
|
else
|
|
4055
|
-
output(
|
|
3836
|
+
output(itemOf5(zoomAppSetup()));
|
|
4056
3837
|
});
|
|
4057
3838
|
}, "addAppCommand");
|
|
4058
3839
|
var addSharedCommands = /* @__PURE__ */ __name((program, { deps, buffer, output }) => {
|
|
4059
3840
|
addStandardCommands(program);
|
|
4060
3841
|
addUpgradeCommand(program, { data: buffer, diagnostic: deps.diagnostic });
|
|
4061
3842
|
addModelsCommands(program, { env: /* @__PURE__ */ __name(() => deps.env ?? process.env, "env"), output, diagnostic: deps.diagnostic });
|
|
4062
|
-
|
|
3843
|
+
annotate8(program.command("account"), { effects: NO_EFFECTS6 }).description("the profile's login and data on this computer").addCommand(zoomAccountRemoveCommand(deps));
|
|
4063
3844
|
}, "addSharedCommands");
|
|
4064
3845
|
|
|
3846
|
+
// dist/store-commands.js
|
|
3847
|
+
import { CliError as CliError41 } from "@wirecat/cli-base";
|
|
3848
|
+
import { addMeetingBatchCommand, addMeetingPassageCommand, addMeetingProjectCandidatesCommand, environmentOf as environmentOf2, formatMeetingBatch, passageForRun } from "@wirecat/cli-core";
|
|
3849
|
+
|
|
4065
3850
|
// dist/archive-import.js
|
|
4066
3851
|
import { createHash as createHash5 } from "node:crypto";
|
|
3852
|
+
import { CliError as CliError30, isCliError as isCliError9 } from "@wirecat/cli-base";
|
|
3853
|
+
import { transcriptLanguage } from "@wirecat/cli-core";
|
|
4067
3854
|
var plans = /* @__PURE__ */ new WeakMap();
|
|
4068
3855
|
var preflightArchiveImport = /* @__PURE__ */ __name(async (destination, options = {}) => {
|
|
4069
3856
|
const maximum = options.maxTotalBytes === void 0 ? 64 * 1024 ** 2 : options.maxTotalBytes;
|
|
4070
3857
|
if (!Number.isSafeInteger(maximum) || maximum <= 0)
|
|
4071
|
-
throw new
|
|
3858
|
+
throw new CliError30("validation_error", "aggregate transcript byte limit must be a positive integer");
|
|
4072
3859
|
const prepared = /* @__PURE__ */ new Map();
|
|
4073
3860
|
let verifiedAssets = 0;
|
|
4074
3861
|
let totalBytes = 0;
|
|
4075
3862
|
for await (const { meeting: meeting2, asset, cues } of readArchiveTranscripts(destination, options)) {
|
|
4076
3863
|
checkCancelled(options.signal);
|
|
4077
3864
|
if (cues.some((cue) => !Number.isSafeInteger(cue.startMs) || !Number.isSafeInteger(cue.endMs) || cue.startMs < 0 || cue.endMs < cue.startMs))
|
|
4078
|
-
throw new
|
|
3865
|
+
throw new CliError30("validation_error", "archive transcript cue times must be safe nonnegative ordered integers");
|
|
4079
3866
|
totalBytes += asset.size;
|
|
4080
3867
|
if (totalBytes > maximum)
|
|
4081
|
-
throw new
|
|
3868
|
+
throw new CliError30("validation_error", "archive import exceeds the aggregate byte limit");
|
|
4082
3869
|
let startedAt = null;
|
|
4083
3870
|
if (meeting2.startedAt !== null) {
|
|
4084
3871
|
startedAt = Date.parse(meeting2.startedAt);
|
|
4085
3872
|
if (!Number.isSafeInteger(startedAt) || Math.abs(startedAt) > 864e13 || new Date(startedAt).toISOString() !== meeting2.startedAt)
|
|
4086
|
-
throw new
|
|
3873
|
+
throw new CliError30("validation_error", "archive occurrence start must be a real ISO timestamp");
|
|
4087
3874
|
}
|
|
4088
3875
|
const group = prepared.get(meeting2.uuid) ?? {
|
|
4089
3876
|
uuid: meeting2.uuid,
|
|
@@ -4133,7 +3920,7 @@ async function* applyArchiveImport(plan, store, options) {
|
|
|
4133
3920
|
const { accountId, signal } = options;
|
|
4134
3921
|
const now = options.now ?? Date.now();
|
|
4135
3922
|
if (!prepared || !Number.isSafeInteger(accountId) || accountId < 1 || !Number.isSafeInteger(now))
|
|
4136
|
-
throw new
|
|
3923
|
+
throw new CliError30("validation_error", "expected a verified archive plan, selected account and integer timestamp");
|
|
4137
3924
|
for (const group of prepared) {
|
|
4138
3925
|
checkCancelled(signal);
|
|
4139
3926
|
let receipt;
|
|
@@ -4148,9 +3935,9 @@ async function* applyArchiveImport(plan, store, options) {
|
|
|
4148
3935
|
const exact = await store.appendTranscriptsWithReceipt(input);
|
|
4149
3936
|
const details = exact?.meeting;
|
|
4150
3937
|
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)
|
|
4151
|
-
throw new
|
|
3938
|
+
throw new CliError30("outcome_unknown", "archive append returned inconsistent ownership; verify stored state before retrying");
|
|
4152
3939
|
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))
|
|
4153
|
-
throw new
|
|
3940
|
+
throw new CliError30("outcome_unknown", "archive append returned invalid counts; verify stored state before retrying");
|
|
4154
3941
|
receipt = {
|
|
4155
3942
|
uuid: group.uuid,
|
|
4156
3943
|
assetIds: [...group.assetIds],
|
|
@@ -4162,12 +3949,12 @@ async function* applyArchiveImport(plan, store, options) {
|
|
|
4162
3949
|
supersededTranscripts: exact.supersededTranscripts
|
|
4163
3950
|
};
|
|
4164
3951
|
} catch (error) {
|
|
4165
|
-
if (
|
|
3952
|
+
if (isCliError9(error) && (error.code === "timeout" || error.code === "cancelled")) {
|
|
4166
3953
|
checkCancelled(signal);
|
|
4167
3954
|
throw error;
|
|
4168
3955
|
}
|
|
4169
3956
|
if (error instanceof Error && "code" in error && error.code === "outcome_unknown")
|
|
4170
|
-
throw new
|
|
3957
|
+
throw new CliError30("outcome_unknown", "archive append outcome is unknown; verify stored state before retrying");
|
|
4171
3958
|
if (error instanceof Error && "code" in error && error.code === "not_found")
|
|
4172
3959
|
receipt = {
|
|
4173
3960
|
uuid: group.uuid,
|
|
@@ -4177,7 +3964,7 @@ async function* applyArchiveImport(plan, store, options) {
|
|
|
4177
3964
|
};
|
|
4178
3965
|
else {
|
|
4179
3966
|
checkCancelled(signal);
|
|
4180
|
-
throw new
|
|
3967
|
+
throw new CliError30("provider_error", "archive transcript append failed; earlier occurrences may be committed");
|
|
4181
3968
|
}
|
|
4182
3969
|
}
|
|
4183
3970
|
yield receipt;
|
|
@@ -4186,11 +3973,14 @@ async function* applyArchiveImport(plan, store, options) {
|
|
|
4186
3973
|
__name(applyArchiveImport, "applyArchiveImport");
|
|
4187
3974
|
|
|
4188
3975
|
// dist/ingestion-search-commands.js
|
|
3976
|
+
import { CliError as CliError31 } from "@wirecat/cli-base";
|
|
3977
|
+
import { annotate as annotate9, customizeSharedCommand as customizeSharedCommand2 } from "@wirecat/cli-base/commands";
|
|
3978
|
+
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";
|
|
4189
3979
|
var addIngestionSearchCommandsDefinition = /* @__PURE__ */ __name((program, deps) => {
|
|
4190
3980
|
const archive = program.commands.find((command) => command.name() === "recordings")?.commands.find((command) => command.name() === "archive");
|
|
4191
3981
|
if (!archive)
|
|
4192
|
-
throw new
|
|
4193
|
-
|
|
3982
|
+
throw new CliError31("configuration_error", "archive command group is unavailable");
|
|
3983
|
+
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) => {
|
|
4194
3984
|
const plan = await deps.preflight(directory, {
|
|
4195
3985
|
uuid: options.uuid,
|
|
4196
3986
|
fileIds: options.fileIds?.split(",").map((id) => id.trim()),
|
|
@@ -4201,16 +3991,16 @@ var addIngestionSearchCommandsDefinition = /* @__PURE__ */ __name((program, deps
|
|
|
4201
3991
|
const receipts = deps.apply(plan);
|
|
4202
3992
|
if (program.opts().jsonl) {
|
|
4203
3993
|
for await (const receipt of receipts)
|
|
4204
|
-
await deps.receipt(
|
|
3994
|
+
await deps.receipt(itemOf6(receipt));
|
|
4205
3995
|
} else
|
|
4206
3996
|
await deps.outputItems(receipts);
|
|
4207
3997
|
}), {
|
|
4208
3998
|
origin: "handwritten",
|
|
4209
|
-
effects:
|
|
3999
|
+
effects: LOCAL_WRITE5,
|
|
4210
4000
|
examples: ["zm personal recordings archive import ./archive --jsonl"]
|
|
4211
4001
|
});
|
|
4212
|
-
const search =
|
|
4213
|
-
|
|
4002
|
+
const search = annotate9(program.command("search"), { effects: NO_EFFECTS7 }).description("opt-in shared store search; meetings by default");
|
|
4003
|
+
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) => {
|
|
4214
4004
|
const page = options.page ?? 1;
|
|
4215
4005
|
const request = validateUnifiedSearch({
|
|
4216
4006
|
text: query,
|
|
@@ -4231,13 +4021,13 @@ var addIngestionSearchCommandsDefinition = /* @__PURE__ */ __name((program, deps
|
|
|
4231
4021
|
deps.output(allAnswer("search all", found, { limit: options.limit, page, again }, options.exact === true));
|
|
4232
4022
|
}), {
|
|
4233
4023
|
origin: "handwritten",
|
|
4234
|
-
effects:
|
|
4024
|
+
effects: LOCAL_READ5,
|
|
4235
4025
|
partial: true,
|
|
4236
4026
|
output: { entity: "hit" },
|
|
4237
4027
|
examples: ['zm personal search all "example plan" --json']
|
|
4238
4028
|
});
|
|
4239
4029
|
}, "addIngestionSearchCommandsDefinition");
|
|
4240
|
-
var addIngestionSearchCommands = /* @__PURE__ */ __name((...args) =>
|
|
4030
|
+
var addIngestionSearchCommands = /* @__PURE__ */ __name((...args) => customizeSharedCommand2(sharedCommandTemplate(ZM, "search"), "Zoom searches explicit local meeting and archive sources, with opt-in unified store reads rather than a live messenger backend.", () => {
|
|
4241
4031
|
addIngestionSearchCommandsDefinition(...args);
|
|
4242
4032
|
const command = args[0].commands.find((command2) => command2.name() === "search");
|
|
4243
4033
|
if (!command)
|
|
@@ -4246,11 +4036,14 @@ var addIngestionSearchCommands = /* @__PURE__ */ __name((...args) => customizeSh
|
|
|
4246
4036
|
}, SHELL_OVERRIDES.search), "addIngestionSearchCommands");
|
|
4247
4037
|
|
|
4248
4038
|
// dist/local-transcription-commands.js
|
|
4039
|
+
import { CliError as CliError32 } from "@wirecat/cli-base";
|
|
4040
|
+
import { annotate as annotate10 } from "@wirecat/cli-base/commands";
|
|
4041
|
+
import { itemOf as itemOf7, LOCAL_WRITE as LOCAL_WRITE6, speechModel } from "@wirecat/cli-core";
|
|
4249
4042
|
var addLocalTranscriptionCommands = /* @__PURE__ */ __name((program, deps) => {
|
|
4250
4043
|
const meetings = program.commands.find((command) => command.name() === "meetings");
|
|
4251
4044
|
if (!meetings)
|
|
4252
|
-
throw new
|
|
4253
|
-
|
|
4045
|
+
throw new CliError32("configuration_error", "meeting command group is unavailable");
|
|
4046
|
+
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) => {
|
|
4254
4047
|
const request = validateLocalTranscriptionOptions({
|
|
4255
4048
|
model: options.model,
|
|
4256
4049
|
modelsDirectory: options.modelsDir,
|
|
@@ -4264,28 +4057,31 @@ var addLocalTranscriptionCommands = /* @__PURE__ */ __name((program, deps) => {
|
|
|
4264
4057
|
});
|
|
4265
4058
|
speechModel(request.model);
|
|
4266
4059
|
if (typeof file !== "string" || !file.trim() || file.includes("\0"))
|
|
4267
|
-
throw new
|
|
4060
|
+
throw new CliError32("validation_error", "local audio file is required");
|
|
4268
4061
|
const capabilities = await deps.capabilities();
|
|
4269
4062
|
const receipt = await capabilities.transcribe(reference, file, request);
|
|
4270
4063
|
if (receipt.applied)
|
|
4271
|
-
await deps.receipt(
|
|
4064
|
+
await deps.receipt(itemOf7(compactLocalTranscriptionReceipt(receipt)));
|
|
4272
4065
|
else
|
|
4273
|
-
deps.output(
|
|
4066
|
+
deps.output(itemOf7(receipt));
|
|
4274
4067
|
}), {
|
|
4275
4068
|
origin: "handwritten",
|
|
4276
|
-
effects:
|
|
4069
|
+
effects: LOCAL_WRITE6,
|
|
4277
4070
|
examples: ["zm personal meetings transcribe meeting:3/12 ./AliceExample.m4a --model parakeet-v3 --json"]
|
|
4278
4071
|
});
|
|
4279
4072
|
}, "addLocalTranscriptionCommands");
|
|
4280
4073
|
|
|
4281
4074
|
// dist/meeting-context-commands.js
|
|
4075
|
+
import { CliError as CliError33 } from "@wirecat/cli-base";
|
|
4076
|
+
import { annotate as annotate11 } from "@wirecat/cli-base/commands";
|
|
4077
|
+
import { itemOf as itemOf8, LOCAL_READ as LOCAL_READ6, meetingEvidenceItem, meetingPersonContextItem } from "@wirecat/cli-core";
|
|
4282
4078
|
var addMeetingContextCommands = /* @__PURE__ */ __name((program, deps) => {
|
|
4283
4079
|
const meetings = program.commands.find((command) => command.name() === "meetings");
|
|
4284
4080
|
if (!meetings)
|
|
4285
|
-
throw new
|
|
4286
|
-
const label2 = /* @__PURE__ */ __name((command, example, entity) =>
|
|
4081
|
+
throw new CliError33("configuration_error", "meeting command group is unavailable");
|
|
4082
|
+
const label2 = /* @__PURE__ */ __name((command, example, entity) => annotate11(command, {
|
|
4287
4083
|
origin: "handwritten",
|
|
4288
|
-
effects:
|
|
4084
|
+
effects: LOCAL_READ6,
|
|
4289
4085
|
examples: [example],
|
|
4290
4086
|
...entity ? { output: { entity } } : {}
|
|
4291
4087
|
}), "label");
|
|
@@ -4294,7 +4090,7 @@ var addMeetingContextCommands = /* @__PURE__ */ __name((program, deps) => {
|
|
|
4294
4090
|
const options = { ...rest, after: cursor };
|
|
4295
4091
|
validateEvidenceOptions(options);
|
|
4296
4092
|
const context = await deps.context();
|
|
4297
|
-
deps.output(
|
|
4093
|
+
deps.output(itemOf8(meetingEvidenceItem(await context.evidence(reference, {
|
|
4298
4094
|
cues: options.cues,
|
|
4299
4095
|
bytes: options.bytes,
|
|
4300
4096
|
after: options.after,
|
|
@@ -4307,13 +4103,13 @@ var addMeetingContextCommands = /* @__PURE__ */ __name((program, deps) => {
|
|
|
4307
4103
|
label2(limits(meetings.command("context").description("what the stored meetings say about a person, through linked identities").argument("<person>", "stored person, such as person:7")).option("--meetings <n>", "how many meetings, 1 through 100", bytes).option("--scan-limit <n>", "most identity links to look at, 1 through 1000", bytes).option("--since-time <time>", "only identity links since this ISO 8601 time", (value) => {
|
|
4308
4104
|
const stamp = Date.parse(value);
|
|
4309
4105
|
if (!Number.isSafeInteger(stamp) || new Date(stamp).toISOString() !== value)
|
|
4310
|
-
throw new
|
|
4106
|
+
throw new CliError33("validation_error", "--since-time must be a canonical ISO 8601 time");
|
|
4311
4107
|
return stamp;
|
|
4312
4108
|
}).action(async (person, { sinceTime, ...rest }) => {
|
|
4313
4109
|
const options = { ...rest, since: sinceTime };
|
|
4314
4110
|
validatePersonContext(person, options);
|
|
4315
4111
|
const context = await deps.context();
|
|
4316
|
-
deps.output(
|
|
4112
|
+
deps.output(itemOf8(meetingPersonContextItem(await context.personContext(person, {
|
|
4317
4113
|
meetings: options.meetings,
|
|
4318
4114
|
cues: options.cues,
|
|
4319
4115
|
bytes: options.bytes,
|
|
@@ -4327,20 +4123,23 @@ var addMeetingContextCommands = /* @__PURE__ */ __name((program, deps) => {
|
|
|
4327
4123
|
const context = await deps.context();
|
|
4328
4124
|
const proposal = await context.taskProposal(reference, kind, deps.signal());
|
|
4329
4125
|
validateTaskProposal(proposal);
|
|
4330
|
-
deps.output(
|
|
4126
|
+
deps.output(itemOf8(proposal));
|
|
4331
4127
|
}), "zm personal meetings task-proposal meeting:3/15/20/0 --type promise --json", "meeting_task_proposal");
|
|
4332
4128
|
}, "addMeetingContextCommands");
|
|
4333
4129
|
|
|
4334
4130
|
// dist/meeting-integration-commands.js
|
|
4131
|
+
import { CliError as CliError34 } from "@wirecat/cli-base";
|
|
4132
|
+
import { annotate as annotate12 } from "@wirecat/cli-base/commands";
|
|
4133
|
+
import { actorOf, itemOf as itemOf9, LOCAL_READ as LOCAL_READ7, LOCAL_WRITE as LOCAL_WRITE7, validateMeetingContextChange } from "@wirecat/cli-core";
|
|
4335
4134
|
var linkChange = /* @__PURE__ */ __name((options) => {
|
|
4336
4135
|
const toPerson = options.participantId !== void 0 || options.person !== void 0;
|
|
4337
4136
|
if (options.eventId !== void 0 === toPerson)
|
|
4338
|
-
throw new
|
|
4137
|
+
throw new CliError34("validation_error", "give --event-id, or --participant-id with --person", {
|
|
4339
4138
|
param: "--event-id"
|
|
4340
4139
|
});
|
|
4341
4140
|
if (options.eventId !== void 0) {
|
|
4342
4141
|
if (options.source !== void 0 || options.expectedPerson !== void 0)
|
|
4343
|
-
throw new
|
|
4142
|
+
throw new CliError34("validation_error", "--source and --expected-person go with --person, not --event-id");
|
|
4344
4143
|
return {
|
|
4345
4144
|
action: "event.link",
|
|
4346
4145
|
eventId: options.eventId === "none" ? null : options.eventId,
|
|
@@ -4348,9 +4147,9 @@ var linkChange = /* @__PURE__ */ __name((options) => {
|
|
|
4348
4147
|
};
|
|
4349
4148
|
}
|
|
4350
4149
|
if (options.participantId === void 0 || options.person === void 0)
|
|
4351
|
-
throw new
|
|
4150
|
+
throw new CliError34("validation_error", "--participant-id and --person go together", { param: "--person" });
|
|
4352
4151
|
if (options.expectedEventId !== void 0)
|
|
4353
|
-
throw new
|
|
4152
|
+
throw new CliError34("validation_error", "--expected-event-id goes with --event-id");
|
|
4354
4153
|
return {
|
|
4355
4154
|
action: "person.link",
|
|
4356
4155
|
participantId: options.participantId,
|
|
@@ -4362,10 +4161,10 @@ var linkChange = /* @__PURE__ */ __name((options) => {
|
|
|
4362
4161
|
var addMeetingIntegrationCommands = /* @__PURE__ */ __name((program, deps) => {
|
|
4363
4162
|
const meetings = program.commands.find((command) => command.name() === "meetings");
|
|
4364
4163
|
if (!meetings)
|
|
4365
|
-
throw new
|
|
4366
|
-
const label2 = /* @__PURE__ */ __name((command, examples, mutates = false) =>
|
|
4164
|
+
throw new CliError34("configuration_error", "meeting command group is unavailable");
|
|
4165
|
+
const label2 = /* @__PURE__ */ __name((command, examples, mutates = false) => annotate12(command, {
|
|
4367
4166
|
origin: "handwritten",
|
|
4368
|
-
effects: mutates ?
|
|
4167
|
+
effects: mutates ? LOCAL_WRITE7 : LOCAL_READ7,
|
|
4369
4168
|
examples
|
|
4370
4169
|
}), "label");
|
|
4371
4170
|
const guards = /* @__PURE__ */ __name((command) => command.option("--yes", "apply this local change once").option("--dry-run", "preview even when --yes is present"), "guards");
|
|
@@ -4373,7 +4172,7 @@ var addMeetingIntegrationCommands = /* @__PURE__ */ __name((program, deps) => {
|
|
|
4373
4172
|
const target = integrationReference(reference);
|
|
4374
4173
|
const change = validateMeetingContextChange(input);
|
|
4375
4174
|
if (change.action !== "event.link" && change.action !== "person.link")
|
|
4376
|
-
throw new
|
|
4175
|
+
throw new CliError34("validation_error", "meeting linking supports only explicit event or person changes");
|
|
4377
4176
|
const result = await (await deps.integration()).change(target.reference, change, {
|
|
4378
4177
|
apply: options.yes,
|
|
4379
4178
|
dryRun: options.dryRun,
|
|
@@ -4382,9 +4181,9 @@ var addMeetingIntegrationCommands = /* @__PURE__ */ __name((program, deps) => {
|
|
|
4382
4181
|
author: actorOf(command) === "owner" ? "owner" : "agent"
|
|
4383
4182
|
});
|
|
4384
4183
|
if (result.applied)
|
|
4385
|
-
await deps.receipt(
|
|
4184
|
+
await deps.receipt(itemOf9(result));
|
|
4386
4185
|
else
|
|
4387
|
-
deps.output(
|
|
4186
|
+
deps.output(itemOf9(result));
|
|
4388
4187
|
}, "apply");
|
|
4389
4188
|
const nullableId = /* @__PURE__ */ __name((value) => value === "none" ? "none" : bytes(value), "nullableId");
|
|
4390
4189
|
label2(guards(meetings.command("link").description("link a meeting to an event, or a participant to a person; --yes applies").argument("<reference>", "meeting reference, such as meeting:1/1").option("--event-id <id>", "stored event id, or none to unlink", nullableId).option("--expected-event-id <id>", "with --event-id: compare current event id, or none", nullableId).option("--participant-id <id>", "with --person: participant id from this meeting", bytes).option("--person <uid>", "with --participant-id: explicit stored person UID").option("--source <accounts>", "explicit additional account ids authorized for target-person lookup").option("--expected-person <uid>", "compare current person UID, or none")).action(async (reference, options, command) => apply(reference, linkChange(options), options, command)), [
|
|
@@ -4394,13 +4193,14 @@ var addMeetingIntegrationCommands = /* @__PURE__ */ __name((program, deps) => {
|
|
|
4394
4193
|
}, "addMeetingIntegrationCommands");
|
|
4395
4194
|
|
|
4396
4195
|
// dist/meeting-project-candidates.js
|
|
4196
|
+
import { CliError as CliError35 } from "@wirecat/cli-base";
|
|
4397
4197
|
var createZoomProjectCandidateReader = /* @__PURE__ */ __name((connect) => async (reference, request = {}) => {
|
|
4398
4198
|
request.signal?.throwIfAborted();
|
|
4399
4199
|
const connection = await connect();
|
|
4400
4200
|
try {
|
|
4401
4201
|
request.signal?.throwIfAborted();
|
|
4402
4202
|
if (!Number.isSafeInteger(connection.accountId) || connection.accountId < 1 || !connection.meetingProjectCandidates)
|
|
4403
|
-
throw new
|
|
4203
|
+
throw new CliError35("configuration_error", "stored project suggestions are unavailable for this account");
|
|
4404
4204
|
const result = await connection.meetingProjectCandidates(reference, request);
|
|
4405
4205
|
request.signal?.throwIfAborted();
|
|
4406
4206
|
return result;
|
|
@@ -4409,10 +4209,19 @@ var createZoomProjectCandidateReader = /* @__PURE__ */ __name((connect) => async
|
|
|
4409
4209
|
}
|
|
4410
4210
|
}, "createZoomProjectCandidateReader");
|
|
4411
4211
|
|
|
4212
|
+
// dist/meeting-read-command-bindings.js
|
|
4213
|
+
import { addMeetingPreparationCommand } from "@wirecat/cli-core";
|
|
4214
|
+
|
|
4215
|
+
// dist/meeting-preparation.js
|
|
4216
|
+
import { CliError as CliError37 } from "@wirecat/cli-base";
|
|
4217
|
+
import { validateMeetingPreparationRequest } from "@wirecat/cli-core";
|
|
4218
|
+
|
|
4412
4219
|
// dist/upcoming-meetings.js
|
|
4220
|
+
import { CliError as CliError36 } from "@wirecat/cli-base";
|
|
4221
|
+
import { createUpcomingMeetingReader } from "@wirecat/cli-core";
|
|
4413
4222
|
var createZoomUpcomingMeetingReader = /* @__PURE__ */ __name((account, credentials, fetcher, options = {}) => {
|
|
4414
4223
|
if (typeof credentials?.withSignal !== "function")
|
|
4415
|
-
throw new
|
|
4224
|
+
throw new CliError36("configuration_error", "Zoom credential scope is unavailable");
|
|
4416
4225
|
const scopedCredentials = credentials.withSignal.bind(credentials);
|
|
4417
4226
|
const remoteOptions = { ...options };
|
|
4418
4227
|
return createUpcomingMeetingReader({ provider: "zoom", account }, {
|
|
@@ -4437,7 +4246,7 @@ var createZoomPreparationReader = /* @__PURE__ */ __name((deps) => async (series
|
|
|
4437
4246
|
let context = request.communications ? deps.context?.() : void 0;
|
|
4438
4247
|
if (request.communications) {
|
|
4439
4248
|
if (!context)
|
|
4440
|
-
throw new
|
|
4249
|
+
throw new CliError37("configuration_error", "configure context.sources for this profile before requesting communications");
|
|
4441
4250
|
context = context.select(request.communications.sources.map((source) => source.id));
|
|
4442
4251
|
}
|
|
4443
4252
|
const credentials = deps.credentials();
|
|
@@ -4446,7 +4255,7 @@ var createZoomPreparationReader = /* @__PURE__ */ __name((deps) => async (series
|
|
|
4446
4255
|
checkCancelled(request.signal);
|
|
4447
4256
|
const binding = connection.meetingPreparation;
|
|
4448
4257
|
if (binding?.scope.provider !== "zoom")
|
|
4449
|
-
throw new
|
|
4258
|
+
throw new CliError37("configuration_error", "meeting preparation is unavailable for this account");
|
|
4450
4259
|
const upcoming = createZoomUpcomingMeetingReader(binding.scope.account, credentials, deps.fetch, deps.remoteOptions);
|
|
4451
4260
|
const read2 = await binding.create(upcoming);
|
|
4452
4261
|
checkCancelled(request.signal);
|
|
@@ -4459,6 +4268,8 @@ var createZoomPreparationReader = /* @__PURE__ */ __name((deps) => async (series
|
|
|
4459
4268
|
}, "createZoomPreparationReader");
|
|
4460
4269
|
|
|
4461
4270
|
// dist/meeting-project-evidence-commands.js
|
|
4271
|
+
import { annotate as annotate13 } from "@wirecat/cli-base/commands";
|
|
4272
|
+
import { addMeetingProjectEvidenceCommand, NO_EFFECTS as NO_EFFECTS8, overrideSharedContract as overrideSharedContract2 } from "@wirecat/cli-core";
|
|
4462
4273
|
var addProjectEvidenceCommand = /* @__PURE__ */ __name((program, deps) => {
|
|
4463
4274
|
const command = addMeetingProjectEvidenceCommand(program, {
|
|
4464
4275
|
signal: deps.signal,
|
|
@@ -4470,8 +4281,8 @@ var addProjectEvidenceCommand = /* @__PURE__ */ __name((program, deps) => {
|
|
|
4470
4281
|
}, "read")
|
|
4471
4282
|
});
|
|
4472
4283
|
if (command.parent)
|
|
4473
|
-
|
|
4474
|
-
|
|
4284
|
+
overrideSharedContract2(command.parent, "Zoom declares its command groups effect-free because they only hold subcommands.", (one) => {
|
|
4285
|
+
annotate13(one, { effects: NO_EFFECTS8 });
|
|
4475
4286
|
});
|
|
4476
4287
|
return command;
|
|
4477
4288
|
}, "addProjectEvidenceCommand");
|
|
@@ -4488,8 +4299,15 @@ var addMeetingReadBindings = /* @__PURE__ */ __name((program, deps) => {
|
|
|
4488
4299
|
});
|
|
4489
4300
|
}, "addMeetingReadBindings");
|
|
4490
4301
|
|
|
4302
|
+
// dist/meeting-review-commands.js
|
|
4303
|
+
import { annotate as annotate14 } from "@wirecat/cli-base/commands";
|
|
4304
|
+
import { LOCAL_READ as LOCAL_READ8, listOf as listOf2, meetingLinkItem, meetingReviewItem, NO_EFFECTS as NO_EFFECTS9, withQuery as withQuery4 } from "@wirecat/cli-core";
|
|
4305
|
+
|
|
4491
4306
|
// dist/meeting-selection-options.js
|
|
4492
|
-
|
|
4307
|
+
import { CliError as CliError38 } from "@wirecat/cli-base";
|
|
4308
|
+
import { dateRange, defineQuery as defineQuery2, queryFieldsOf } from "@wirecat/cli-base/query";
|
|
4309
|
+
import { dateWindow, listQuery as listQuery3, meetingLink, nativeTerms, typedQuery as typedQuery4 } from "@wirecat/cli-core";
|
|
4310
|
+
var MEETING_LINK_QUERY = defineQuery2({
|
|
4493
4311
|
entity: "meeting_link",
|
|
4494
4312
|
backend: "native",
|
|
4495
4313
|
fields: [
|
|
@@ -4555,14 +4373,14 @@ var startedWindow = /* @__PURE__ */ __name((node, zone) => {
|
|
|
4555
4373
|
}, "startedWindow");
|
|
4556
4374
|
var linkSelection = /* @__PURE__ */ __name((words, flags) => {
|
|
4557
4375
|
const command = "mentions list";
|
|
4558
|
-
const nodes = nativeTerms(
|
|
4376
|
+
const nodes = nativeTerms(listQuery3(typedQuery4(words), MEETING_LINK_QUERY, command), command);
|
|
4559
4377
|
const terms = /* @__PURE__ */ new Map();
|
|
4560
4378
|
for (const [field, node] of nodes)
|
|
4561
4379
|
if (field !== "started_at")
|
|
4562
4380
|
terms.set(field, node.value);
|
|
4563
4381
|
const event = terms.get("event_id");
|
|
4564
4382
|
if (event !== void 0 && (!/^[1-9]\d*$/.test(event) || !Number.isSafeInteger(Number(event))))
|
|
4565
|
-
throw new
|
|
4383
|
+
throw new CliError38("validation_error", "event_id must be a positive safe integer");
|
|
4566
4384
|
const started = nodes.get("started_at");
|
|
4567
4385
|
return {
|
|
4568
4386
|
...flags,
|
|
@@ -4595,8 +4413,8 @@ var selectionOf = /* @__PURE__ */ __name((flags, signal, defaultSince) => {
|
|
|
4595
4413
|
var NEAR_EMPTY_WORDS = 50;
|
|
4596
4414
|
var REVIEW_SINCE = "7d";
|
|
4597
4415
|
var addMeetingReviewCommands = /* @__PURE__ */ __name((program, deps) => {
|
|
4598
|
-
|
|
4599
|
-
effects:
|
|
4416
|
+
annotate14(selectionOptions(program.command("review")), {
|
|
4417
|
+
effects: LOCAL_READ8,
|
|
4600
4418
|
output: { entity: "meeting_review" },
|
|
4601
4419
|
examples: ["zm personal review --json", "zm personal review --since-time 30d --project RES --json"]
|
|
4602
4420
|
}).description("meetings since a point: summary, next steps and who talked how long").option("--limit <n>", "most meetings, newest first (default 50, at most 200)", bytes).action(async (flags) => {
|
|
@@ -4605,7 +4423,7 @@ var addMeetingReviewCommands = /* @__PURE__ */ __name((program, deps) => {
|
|
|
4605
4423
|
const found = await (await deps.review())({ ...request, limit });
|
|
4606
4424
|
const unsummarized = found.items.filter((one) => one.summary === null).length;
|
|
4607
4425
|
const nearEmpty = found.items.filter((one) => one.transcript && one.transcript.words < NEAR_EMPTY_WORDS).length;
|
|
4608
|
-
deps.output(
|
|
4426
|
+
deps.output(listOf2("review", {
|
|
4609
4427
|
items: found.items.map(meetingReviewItem),
|
|
4610
4428
|
limit,
|
|
4611
4429
|
has_more: found.hasMore,
|
|
@@ -4626,9 +4444,9 @@ var addMeetingReviewCommands = /* @__PURE__ */ __name((program, deps) => {
|
|
|
4626
4444
|
]
|
|
4627
4445
|
}));
|
|
4628
4446
|
});
|
|
4629
|
-
const mentions = program.commands.find((command) => command.name() === "mentions") ??
|
|
4630
|
-
|
|
4631
|
-
effects:
|
|
4447
|
+
const mentions = program.commands.find((command) => command.name() === "mentions") ?? annotate14(program.command("mentions"), { effects: NO_EFFECTS9 }).description("what the stored meetings point to: links shared in their chat");
|
|
4448
|
+
withQuery4(annotate14(selectionOptions(mentions.command("list"), true), {
|
|
4449
|
+
effects: LOCAL_READ8,
|
|
4632
4450
|
output: { entity: "meeting_link" },
|
|
4633
4451
|
examples: ["zm personal mentions list started_at>=30d --json", "zm personal mentions list project:RES --json"]
|
|
4634
4452
|
}), MEETING_LINK_QUERY).description("links shared in meeting chat, most shared first, by whom and where").option("--limit <n>", "how many links (default 100)", bytes).option("--max-messages <n>", "most chat messages to read (default and at most 100000)", bytes).action(async (words, flags) => {
|
|
@@ -4640,7 +4458,7 @@ var addMeetingReviewCommands = /* @__PURE__ */ __name((program, deps) => {
|
|
|
4640
4458
|
...url === void 0 ? {} : { url },
|
|
4641
4459
|
...flags.maxMessages === void 0 ? {} : { maxMessages: flags.maxMessages }
|
|
4642
4460
|
});
|
|
4643
|
-
deps.output(
|
|
4461
|
+
deps.output(listOf2("mentions list", {
|
|
4644
4462
|
items: found.items.slice(0, limit).map(meetingLinkItem),
|
|
4645
4463
|
limit,
|
|
4646
4464
|
has_more: found.items.length > limit,
|
|
@@ -4656,6 +4474,10 @@ var addMeetingReviewCommands = /* @__PURE__ */ __name((program, deps) => {
|
|
|
4656
4474
|
}, "addMeetingReviewCommands");
|
|
4657
4475
|
|
|
4658
4476
|
// dist/meeting-searches-commands.js
|
|
4477
|
+
import { CliError as CliError39 } from "@wirecat/cli-base";
|
|
4478
|
+
import { annotate as annotate15 } from "@wirecat/cli-base/commands";
|
|
4479
|
+
import { FETCH as FETCH4, itemOf as itemOf10, LOCAL_READ as LOCAL_READ9, LOCAL_WRITE as LOCAL_WRITE8, listOf as listOf3, listQuery as listQuery4, NO_EFFECTS as NO_EFFECTS10, SEARCHES_QUERY, savedSearchItem as searchItem, typedQuery as typedQuery5, withQuery as withQuery5 } from "@wirecat/cli-core";
|
|
4480
|
+
import { CommanderError, Option } from "commander";
|
|
4659
4481
|
var UNSAVED = /* @__PURE__ */ new Set(["cursor", "meetingId", "identityId", "personId", "seriesId", "tag"]);
|
|
4660
4482
|
var flagsOf = /* @__PURE__ */ __name((typed) => {
|
|
4661
4483
|
const { command } = meetingSearchDefinition();
|
|
@@ -4680,17 +4502,17 @@ var parsed2 = /* @__PURE__ */ __name(async (query, typed) => {
|
|
|
4680
4502
|
await program.parseAsync(["search", "meetings", query, ...flagsOf(typed)], { from: "user" });
|
|
4681
4503
|
} catch (error) {
|
|
4682
4504
|
if (error instanceof CommanderError)
|
|
4683
|
-
throw new
|
|
4505
|
+
throw new CliError39("validation_error", error.message.replace(/^error: /, ""));
|
|
4684
4506
|
throw error;
|
|
4685
4507
|
}
|
|
4686
4508
|
if (!found)
|
|
4687
|
-
throw new
|
|
4509
|
+
throw new CliError39("validation_error", "the saved search could not be read");
|
|
4688
4510
|
return found;
|
|
4689
4511
|
}, "parsed");
|
|
4690
4512
|
var addMeetingSearchesCommands = /* @__PURE__ */ __name((program, deps) => {
|
|
4691
|
-
const searches =
|
|
4692
|
-
const create =
|
|
4693
|
-
effects:
|
|
4513
|
+
const searches = annotate15(program.command("searches"), { effects: NO_EFFECTS10 }).description("saved meeting searches: a query and its options under a name");
|
|
4514
|
+
const create = annotate15(searches.command("create"), {
|
|
4515
|
+
effects: LOCAL_WRITE8,
|
|
4694
4516
|
output: { entity: "saved_search" },
|
|
4695
4517
|
examples: ['zm personal searches create weekly-plan "example plan date>=7d" --project RES --json']
|
|
4696
4518
|
}).description("save a search meetings query and its options without running it").argument("<name>", "up to 64 letters a\u2013z, digits and hyphens, not only digits").argument("<query>", "the query, as search meetings takes it").option("--replace", "overwrite a saved search of the same name");
|
|
@@ -4701,10 +4523,10 @@ var addMeetingSearchesCommands = /* @__PURE__ */ __name((program, deps) => {
|
|
|
4701
4523
|
const { replace, ...typed } = flags;
|
|
4702
4524
|
await parsed2(query, typed);
|
|
4703
4525
|
const saved = await (await deps.searches()).create(name, { query, options: typed }, { replace: replace === true });
|
|
4704
|
-
deps.output(
|
|
4526
|
+
deps.output(itemOf10(searchItem(saved)));
|
|
4705
4527
|
});
|
|
4706
|
-
|
|
4707
|
-
effects:
|
|
4528
|
+
annotate15(searches.command("run"), {
|
|
4529
|
+
effects: FETCH4,
|
|
4708
4530
|
output: { entity: "meeting_hit" },
|
|
4709
4531
|
examples: ["zm personal searches run weekly-plan --json"]
|
|
4710
4532
|
}).description("run a saved search; answers as search meetings does").argument("<name>", "a saved search's name").action(async (name) => {
|
|
@@ -4712,35 +4534,38 @@ var addMeetingSearchesCommands = /* @__PURE__ */ __name((program, deps) => {
|
|
|
4712
4534
|
const { query, options } = await parsed2(saved.query, saved.options);
|
|
4713
4535
|
deps.output(await deps.search(query, options));
|
|
4714
4536
|
});
|
|
4715
|
-
|
|
4716
|
-
effects:
|
|
4537
|
+
withQuery5(annotate15(searches.command("list"), {
|
|
4538
|
+
effects: LOCAL_READ9,
|
|
4717
4539
|
output: { entity: "saved_search" },
|
|
4718
4540
|
examples: ["zm personal searches list --json"]
|
|
4719
4541
|
}), SEARCHES_QUERY).description("the saved meeting searches, by name").action(async (words) => {
|
|
4720
|
-
|
|
4542
|
+
listQuery4(typedQuery5(words), SEARCHES_QUERY, "searches list");
|
|
4721
4543
|
const found = await (await deps.searches()).list();
|
|
4722
|
-
deps.output(
|
|
4544
|
+
deps.output(listOf3("searches list", { items: found.map(searchItem), limit: Math.max(1, found.length), has_more: false }));
|
|
4723
4545
|
});
|
|
4724
|
-
|
|
4725
|
-
effects:
|
|
4546
|
+
annotate15(searches.command("show"), {
|
|
4547
|
+
effects: LOCAL_READ9,
|
|
4726
4548
|
output: { entity: "saved_search" },
|
|
4727
4549
|
examples: ["zm personal searches show weekly-plan"]
|
|
4728
4550
|
}).description("one saved search: its query, options and how often it ran").argument("<name>", "a saved search's name").action(async (name) => {
|
|
4729
|
-
deps.output(
|
|
4551
|
+
deps.output(itemOf10(searchItem(await (await deps.searches()).show(name))));
|
|
4730
4552
|
});
|
|
4731
|
-
|
|
4732
|
-
effects:
|
|
4553
|
+
annotate15(searches.command("delete"), {
|
|
4554
|
+
effects: LOCAL_WRITE8,
|
|
4733
4555
|
output: { entity: "saved_search" },
|
|
4734
4556
|
examples: ["zm personal searches delete weekly-plan --dry-run"]
|
|
4735
4557
|
}).description("delete a saved search").argument("<name>", "a saved search's name").action(async (name) => {
|
|
4736
|
-
deps.output(
|
|
4558
|
+
deps.output(itemOf10(searchItem(await (await deps.searches()).delete(name))));
|
|
4737
4559
|
});
|
|
4738
4560
|
}, "addMeetingSearchesCommands");
|
|
4739
4561
|
|
|
4740
4562
|
// dist/meeting-stats-commands.js
|
|
4563
|
+
import { CliError as CliError40 } from "@wirecat/cli-base";
|
|
4564
|
+
import { annotate as annotate16 } from "@wirecat/cli-base/commands";
|
|
4565
|
+
import { itemOf as itemOf11, LOCAL_READ as LOCAL_READ10, listOf as listOf4, MEETING_COUNTS_GROUPINGS, meetingCountsItem, meetingSpeakerItem, meetingStatsItem, NO_EFFECTS as NO_EFFECTS11 } from "@wirecat/cli-core";
|
|
4741
4566
|
var groupingOf = /* @__PURE__ */ __name((value) => {
|
|
4742
4567
|
if (!MEETING_COUNTS_GROUPINGS.includes(value))
|
|
4743
|
-
throw new
|
|
4568
|
+
throw new CliError40("validation_error", `--by takes ${MEETING_COUNTS_GROUPINGS.join(", ")}`);
|
|
4744
4569
|
return value;
|
|
4745
4570
|
}, "groupingOf");
|
|
4746
4571
|
var filters = /* @__PURE__ */ __name((command) => selectionOptions(command).option("--max-rows <n>", "most transcript lines to read (default and at most 500000)", bytes), "filters");
|
|
@@ -4752,34 +4577,34 @@ var requestOf = /* @__PURE__ */ __name((flags, signal) => {
|
|
|
4752
4577
|
};
|
|
4753
4578
|
}, "requestOf");
|
|
4754
4579
|
var addMeetingStatsCommands = /* @__PURE__ */ __name((program, deps) => {
|
|
4755
|
-
const stats = program.commands.find((command) => command.name() === "stats") ??
|
|
4756
|
-
const meetings =
|
|
4757
|
-
|
|
4758
|
-
effects:
|
|
4580
|
+
const stats = program.commands.find((command) => command.name() === "stats") ?? annotate16(program.command("stats"), { effects: NO_EFFECTS11 }).description("numbers about the stored meetings");
|
|
4581
|
+
const meetings = annotate16(stats.command("meetings"), { effects: NO_EFFECTS11 }).description("talk time by speaker and week; meetings and minutes by day, week or series");
|
|
4582
|
+
annotate16(filters(meetings.command("show")), {
|
|
4583
|
+
effects: LOCAL_READ10,
|
|
4759
4584
|
output: { entity: "meeting_stats" },
|
|
4760
4585
|
examples: ["zm personal stats meetings show --since-time 30d --json"]
|
|
4761
4586
|
}).description("meetings, lines, words and talk time by week, with the top speakers").action(async (flags) => {
|
|
4762
4587
|
const { request, meta } = requestOf(flags, deps.signal());
|
|
4763
4588
|
const found = await (await deps.read())(request);
|
|
4764
|
-
deps.output(
|
|
4589
|
+
deps.output(itemOf11(meetingStatsItem(found), { meta }));
|
|
4765
4590
|
});
|
|
4766
|
-
|
|
4767
|
-
effects:
|
|
4591
|
+
annotate16(filters(meetings.command("top")), {
|
|
4592
|
+
effects: LOCAL_READ10,
|
|
4768
4593
|
output: { entity: "meeting_speaker" },
|
|
4769
4594
|
examples: ["zm personal stats meetings top --project RES --limit 5 --json"]
|
|
4770
4595
|
}).description("speakers by talk time: lines, words, meetings and their share of the talk").option("--limit <n>", "how many speakers (default 20)", bytes).action(async (flags) => {
|
|
4771
4596
|
const { request, meta } = requestOf(flags, deps.signal());
|
|
4772
4597
|
const found = await (await deps.read())(request);
|
|
4773
4598
|
const limit = flags.limit ?? 20;
|
|
4774
|
-
deps.output(
|
|
4599
|
+
deps.output(listOf4("stats meetings top", {
|
|
4775
4600
|
items: found.speakers.slice(0, limit).map(meetingSpeakerItem),
|
|
4776
4601
|
limit,
|
|
4777
4602
|
has_more: found.speakers.length > limit,
|
|
4778
4603
|
meta
|
|
4779
4604
|
}));
|
|
4780
4605
|
});
|
|
4781
|
-
|
|
4782
|
-
effects:
|
|
4606
|
+
annotate16(selectionOptions(meetings.command("history")), {
|
|
4607
|
+
effects: LOCAL_READ10,
|
|
4783
4608
|
output: { entity: "meeting_counts" },
|
|
4784
4609
|
examples: ["zm personal stats meetings history --by week --since-time 90d --json"]
|
|
4785
4610
|
}).summary("meetings, minutes and transcripts per day, week or series").description("meetings, minutes and meetings with a transcript, per day, week or series; reads meetings only").requiredOption("--by <group>", `one row per ${MEETING_COUNTS_GROUPINGS.join(", ")}`, groupingOf).option("--limit <n>", "the newest days or weeks, or the busiest series (default 100)", bytes).action(async (flags) => {
|
|
@@ -4790,7 +4615,7 @@ var addMeetingStatsCommands = /* @__PURE__ */ __name((program, deps) => {
|
|
|
4790
4615
|
timeZone: zone,
|
|
4791
4616
|
...flags.limit === void 0 ? {} : { limit: flags.limit }
|
|
4792
4617
|
});
|
|
4793
|
-
deps.output(
|
|
4618
|
+
deps.output(itemOf11(meetingCountsItem(found), { meta }));
|
|
4794
4619
|
});
|
|
4795
4620
|
}, "addMeetingStatsCommands");
|
|
4796
4621
|
|
|
@@ -4860,7 +4685,7 @@ var addStoreCommands = /* @__PURE__ */ __name((program, context) => {
|
|
|
4860
4685
|
signal,
|
|
4861
4686
|
read: /* @__PURE__ */ __name(async (reference, options) => {
|
|
4862
4687
|
if (fields() && options.format !== "json")
|
|
4863
|
-
throw new
|
|
4688
|
+
throw new CliError41("validation_error", "passage field selection requires --json or --format json");
|
|
4864
4689
|
return (await meetingContext()).passage(reference, options);
|
|
4865
4690
|
}, "read"),
|
|
4866
4691
|
output: /* @__PURE__ */ __name((result, format) => {
|
|
@@ -4877,20 +4702,20 @@ var addStoreCommands = /* @__PURE__ */ __name((program, context) => {
|
|
|
4877
4702
|
read: /* @__PURE__ */ __name(async () => {
|
|
4878
4703
|
const read2 = (await connected()).meetingStats;
|
|
4879
4704
|
if (!read2)
|
|
4880
|
-
throw new
|
|
4705
|
+
throw new CliError41("configuration_error", "the selected store connector does not count meetings");
|
|
4881
4706
|
return read2;
|
|
4882
4707
|
}, "read"),
|
|
4883
4708
|
counts: /* @__PURE__ */ __name(async () => {
|
|
4884
4709
|
const read2 = (await connected()).meetingCounts;
|
|
4885
4710
|
if (!read2)
|
|
4886
|
-
throw new
|
|
4711
|
+
throw new CliError41("configuration_error", "the selected store connector does not count meetings");
|
|
4887
4712
|
return read2;
|
|
4888
4713
|
}, "counts")
|
|
4889
4714
|
});
|
|
4890
4715
|
const reader = /* @__PURE__ */ __name((name, what) => async () => {
|
|
4891
4716
|
const read2 = (await connected())[name];
|
|
4892
4717
|
if (!read2)
|
|
4893
|
-
throw new
|
|
4718
|
+
throw new CliError41("configuration_error", `the selected store connector does not ${what}`);
|
|
4894
4719
|
return read2;
|
|
4895
4720
|
}, "reader");
|
|
4896
4721
|
addMeetingReviewCommands(program, {
|
|
@@ -4913,7 +4738,7 @@ var addStoreCommands = /* @__PURE__ */ __name((program, context) => {
|
|
|
4913
4738
|
searches: /* @__PURE__ */ __name(async () => {
|
|
4914
4739
|
const searches = (await connected()).meetingSearches;
|
|
4915
4740
|
if (!searches)
|
|
4916
|
-
throw new
|
|
4741
|
+
throw new CliError41("configuration_error", "the selected store connector does not save searches");
|
|
4917
4742
|
return searches;
|
|
4918
4743
|
}, "searches")
|
|
4919
4744
|
});
|
|
@@ -4927,7 +4752,7 @@ var addStoreCommands = /* @__PURE__ */ __name((program, context) => {
|
|
|
4927
4752
|
const batchReader = /* @__PURE__ */ __name(async () => {
|
|
4928
4753
|
const reader2 = (await connected()).meetingBatch;
|
|
4929
4754
|
if (!reader2)
|
|
4930
|
-
throw new
|
|
4755
|
+
throw new CliError41("configuration_error", "the selected store connector does not support meeting batches");
|
|
4931
4756
|
return reader2;
|
|
4932
4757
|
}, "batchReader");
|
|
4933
4758
|
addMeetingBatchCommand(program, {
|
|
@@ -4935,10 +4760,10 @@ var addStoreCommands = /* @__PURE__ */ __name((program, context) => {
|
|
|
4935
4760
|
fields,
|
|
4936
4761
|
meta,
|
|
4937
4762
|
input: /* @__PURE__ */ __name(async (path, signal2) => {
|
|
4938
|
-
if (path === "-" &&
|
|
4939
|
-
throw new
|
|
4763
|
+
if (path === "-" && environmentOf2(program).agent)
|
|
4764
|
+
throw new CliError41("validation_error", "batch input cannot come from stdin over MCP; pass a file path");
|
|
4940
4765
|
if (!deps.readBatchInput)
|
|
4941
|
-
throw new
|
|
4766
|
+
throw new CliError41("configuration_error", "batch input reader is unavailable");
|
|
4942
4767
|
return deps.readBatchInput(path, signal2);
|
|
4943
4768
|
}, "input"),
|
|
4944
4769
|
reader: {
|
|
@@ -4949,7 +4774,7 @@ var addStoreCommands = /* @__PURE__ */ __name((program, context) => {
|
|
|
4949
4774
|
output: /* @__PURE__ */ __name((body, report, format) => {
|
|
4950
4775
|
const text2 = format === "json" ? rendered(body, program.opts().jsonl ? "jsonl" : "json", false) : formatMeetingBatch(report, format);
|
|
4951
4776
|
if (Buffer.byteLength(text2, "utf8") > 4194304)
|
|
4952
|
-
throw new
|
|
4777
|
+
throw new CliError41("invalid_response", "batch rendered output exceeds 4194304 bytes", {
|
|
4953
4778
|
reason: "output.too-large",
|
|
4954
4779
|
max_bytes: 4194304
|
|
4955
4780
|
});
|
|
@@ -4959,37 +4784,41 @@ var addStoreCommands = /* @__PURE__ */ __name((program, context) => {
|
|
|
4959
4784
|
}, "addStoreCommands");
|
|
4960
4785
|
|
|
4961
4786
|
// dist/watch-commands.js
|
|
4787
|
+
import { CliError as CliError42 } from "@wirecat/cli-base";
|
|
4788
|
+
import { annotate as annotate17 } from "@wirecat/cli-base/commands";
|
|
4789
|
+
import { FETCH as FETCH5, itemOf as itemOf12, watchMeetingIngestion } from "@wirecat/cli-core";
|
|
4790
|
+
import { Argument } from "commander";
|
|
4962
4791
|
var days = /* @__PURE__ */ __name((value) => {
|
|
4963
4792
|
if (!/^\d+$/.test(value) || Number(value) > 31)
|
|
4964
|
-
throw new
|
|
4793
|
+
throw new CliError42("validation_error", "lookback days must be an integer from 0 through 31");
|
|
4965
4794
|
return Number(value);
|
|
4966
4795
|
}, "days");
|
|
4967
4796
|
var since = /* @__PURE__ */ __name((value) => {
|
|
4968
4797
|
const day = value.slice(0, 10);
|
|
4969
4798
|
const dayTime = Date.parse(`${day}T00:00:00Z`);
|
|
4970
4799
|
if (!/^\d{4}-\d{2}-\d{2}T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/.test(value) || !Number.isFinite(Date.parse(value)) || !Number.isFinite(dayTime) || new Date(dayTime).toISOString().slice(0, 10) !== day)
|
|
4971
|
-
throw new
|
|
4800
|
+
throw new CliError42("validation_error", "--since-time must be a real ISO 8601 time with a time zone");
|
|
4972
4801
|
return value;
|
|
4973
4802
|
}, "since");
|
|
4974
4803
|
var addWatchCommand = /* @__PURE__ */ __name((program, deps) => {
|
|
4975
4804
|
const command = program.command("watch").description("keep fetching new meetings from Zoom, or rescanning a folder, until stopped").addArgument(new Argument("[target]", "api or files; otherwise the configured source").choices(["api", "files"])).argument("[folder]", "with files: folder of downloaded transcripts; otherwise files.folder").option("--since-time <time>", "on the first run, fetch meetings from this ISO 8601 time", since).option("--lookback-days <days>", "API cursor overlap for late transcripts (0 through 31)", days).option("--pause <duration>", "delay after each completed receipt (1s through 24h)", (text2) => duration(text2, "--pause"), 1e4).action(async (target, folder, options) => {
|
|
4976
4805
|
if (!program.opts().jsonl && !deps.outputIsTTY)
|
|
4977
|
-
throw new
|
|
4806
|
+
throw new CliError42("validation_error", "headless watch requires --jsonl");
|
|
4978
4807
|
if (program.opts().json)
|
|
4979
|
-
throw new
|
|
4808
|
+
throw new CliError42("validation_error", "watch streams receipts; use --jsonl");
|
|
4980
4809
|
if (options.pause < 1e3 || options.pause > 864e5)
|
|
4981
|
-
throw new
|
|
4810
|
+
throw new CliError42("validation_error", "--pause must be from 1s through 24h");
|
|
4982
4811
|
const plan = deps.prepare(target, folder, options);
|
|
4983
4812
|
for await (const report of watchMeetingIngestion((signal) => deps.ingest(plan, signal), {
|
|
4984
4813
|
signal: deps.signal(),
|
|
4985
4814
|
intervalMs: plan.intervalMs,
|
|
4986
4815
|
sleep: deps.sleep
|
|
4987
4816
|
}))
|
|
4988
|
-
await deps.receipt(
|
|
4817
|
+
await deps.receipt(itemOf12(report));
|
|
4989
4818
|
});
|
|
4990
|
-
|
|
4819
|
+
annotate17(command, {
|
|
4991
4820
|
origin: "handwritten",
|
|
4992
|
-
effects:
|
|
4821
|
+
effects: FETCH5,
|
|
4993
4822
|
examples: [
|
|
4994
4823
|
"zm personal watch files ./downloads --pause 10s --jsonl",
|
|
4995
4824
|
"zm personal watch api --lookback-days 2 --dry-run --jsonl"
|
|
@@ -4999,6 +4828,8 @@ var addWatchCommand = /* @__PURE__ */ __name((program, deps) => {
|
|
|
4999
4828
|
}, "addWatchCommand");
|
|
5000
4829
|
|
|
5001
4830
|
// dist/watch-service.js
|
|
4831
|
+
import { CliError as CliError43, isCliError as isCliError10, realSleep } from "@wirecat/cli-base";
|
|
4832
|
+
import { importFiles, pull } from "@wirecat/cli-core";
|
|
5002
4833
|
var createWatchService = /* @__PURE__ */ __name(({ deps, getConfig, profile, tokens, fetch, offline, openStore, guardedStore, zones }) => {
|
|
5003
4834
|
let watchConfig;
|
|
5004
4835
|
let watchSince;
|
|
@@ -5019,20 +4850,20 @@ var createWatchService = /* @__PURE__ */ __name(({ deps, getConfig, profile, tok
|
|
|
5019
4850
|
};
|
|
5020
4851
|
if (source === "files") {
|
|
5021
4852
|
if (flags.sinceTime !== void 0 || flags.lookbackDays !== void 0)
|
|
5022
|
-
throw new
|
|
4853
|
+
throw new CliError43("validation_error", "--since-time and --lookback-days apply only to API watching");
|
|
5023
4854
|
if (!plan.folder?.trim())
|
|
5024
|
-
throw new
|
|
4855
|
+
throw new CliError43("configuration_error", "set files.folder or provide a folder for file watching");
|
|
5025
4856
|
} else {
|
|
5026
4857
|
if (folder !== void 0)
|
|
5027
|
-
throw new
|
|
4858
|
+
throw new CliError43("validation_error", "API watching does not accept a folder");
|
|
5028
4859
|
if (offline())
|
|
5029
|
-
throw new
|
|
4860
|
+
throw new CliError43("configuration_error", "API watching requires network access; remove --offline");
|
|
5030
4861
|
if (!deps.source) {
|
|
5031
4862
|
const clientId = zoomClientId(config, deps.env ?? process.env);
|
|
5032
4863
|
if (!clientId)
|
|
5033
|
-
throw new
|
|
4864
|
+
throw new CliError43("configuration_error", SET_ZOOM_APP);
|
|
5034
4865
|
if (tokens().options.clientId !== clientId)
|
|
5035
|
-
throw new
|
|
4866
|
+
throw new CliError43("configuration_error", "the OAuth client changed before watch started; retry with matching configuration");
|
|
5036
4867
|
}
|
|
5037
4868
|
}
|
|
5038
4869
|
if (!deps.store)
|
|
@@ -5045,7 +4876,7 @@ var createWatchService = /* @__PURE__ */ __name(({ deps, getConfig, profile, tok
|
|
|
5045
4876
|
checkCancelled(operation3);
|
|
5046
4877
|
const config = watchConfig;
|
|
5047
4878
|
if (!config)
|
|
5048
|
-
throw new
|
|
4879
|
+
throw new CliError43("configuration_error", "watch configuration is unavailable");
|
|
5049
4880
|
let cycle;
|
|
5050
4881
|
let failure;
|
|
5051
4882
|
let result;
|
|
@@ -5055,7 +4886,7 @@ var createWatchService = /* @__PURE__ */ __name(({ deps, getConfig, profile, tok
|
|
|
5055
4886
|
checkCancelled(operation3);
|
|
5056
4887
|
const accountId = cycle?.accountId ?? deps.accountId;
|
|
5057
4888
|
if (!Number.isSafeInteger(accountId) || !accountId || accountId < 1)
|
|
5058
|
-
throw new
|
|
4889
|
+
throw new CliError43("configuration_error", "the selected meeting account is unavailable");
|
|
5059
4890
|
const store = guardedStore(cycle?.store ?? deps.store ?? unavailableStore);
|
|
5060
4891
|
if (plan.source === "files") {
|
|
5061
4892
|
const files = validateDownloadedFiles(await (deps.readFiles ?? readDownloadedFiles)(plan.folder ?? ""), filesZone(config));
|
|
@@ -5079,7 +4910,7 @@ var createWatchService = /* @__PURE__ */ __name(({ deps, getConfig, profile, tok
|
|
|
5079
4910
|
checkCancelled(operation3);
|
|
5080
4911
|
return value;
|
|
5081
4912
|
} catch (error) {
|
|
5082
|
-
if (
|
|
4913
|
+
if (isCliError10(error) && error.code === "outcome_unknown") {
|
|
5083
4914
|
sourceFailure = error;
|
|
5084
4915
|
throw error;
|
|
5085
4916
|
}
|
|
@@ -5119,7 +4950,7 @@ var createWatchService = /* @__PURE__ */ __name(({ deps, getConfig, profile, tok
|
|
|
5119
4950
|
try {
|
|
5120
4951
|
await cycle.close();
|
|
5121
4952
|
} catch {
|
|
5122
|
-
failure ??= new
|
|
4953
|
+
failure ??= new CliError43("configuration_error", "could not close the shared meeting store");
|
|
5123
4954
|
}
|
|
5124
4955
|
}
|
|
5125
4956
|
}
|
|
@@ -5132,7 +4963,11 @@ var createWatchService = /* @__PURE__ */ __name(({ deps, getConfig, profile, tok
|
|
|
5132
4963
|
};
|
|
5133
4964
|
}, "createWatchService");
|
|
5134
4965
|
|
|
4966
|
+
// dist/zoom-search.js
|
|
4967
|
+
import { CliError as CliError45 } from "@wirecat/cli-base";
|
|
4968
|
+
|
|
5135
4969
|
// dist/zoom-mcp.js
|
|
4970
|
+
import { CliError as CliError44 } from "@wirecat/cli-base";
|
|
5136
4971
|
var ZOOM_MCP_URL = "https://mcp.zoom.us/mcp/zoom/streamable";
|
|
5137
4972
|
var PROTOCOL = "2025-06-18";
|
|
5138
4973
|
var record = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && !Array.isArray(value), "record");
|
|
@@ -5154,7 +4989,7 @@ var ZoomMcp = class {
|
|
|
5154
4989
|
const operation3 = operationSignal(signal);
|
|
5155
4990
|
const { accessToken, scopes } = await this.tokens.tokens();
|
|
5156
4991
|
if (!scopes.includes(scope2))
|
|
5157
|
-
throw new
|
|
4992
|
+
throw new CliError44("configuration_error", `Zoom scope ${scope2} is missing; ${sessionStart(scope2)}`);
|
|
5158
4993
|
if (!this.initialized) {
|
|
5159
4994
|
await this.rpc("initialize", accessToken, operation3, {
|
|
5160
4995
|
protocolVersion: PROTOCOL,
|
|
@@ -5174,7 +5009,7 @@ var ZoomMcp = class {
|
|
|
5174
5009
|
try {
|
|
5175
5010
|
return JSON.parse(text2 ?? "");
|
|
5176
5011
|
} catch {
|
|
5177
|
-
throw new
|
|
5012
|
+
throw new CliError44("invalid_response", `Zoom returned an invalid ${tool} answer`);
|
|
5178
5013
|
}
|
|
5179
5014
|
}
|
|
5180
5015
|
async rpc(method, accessToken, signal, params) {
|
|
@@ -5197,23 +5032,23 @@ var ZoomMcp = class {
|
|
|
5197
5032
|
});
|
|
5198
5033
|
} catch {
|
|
5199
5034
|
checkCancelled(signal);
|
|
5200
|
-
throw new
|
|
5035
|
+
throw new CliError44("network_error", "Zoom search could not be reached");
|
|
5201
5036
|
}
|
|
5202
5037
|
this.session = response.headers.get("mcp-session-id") ?? this.session;
|
|
5203
5038
|
const text2 = await response.text();
|
|
5204
5039
|
const message = parseMessage(text2, response.headers.get("content-type"), id);
|
|
5205
5040
|
if (response.status === 401)
|
|
5206
|
-
throw new
|
|
5041
|
+
throw new CliError44("authentication_error", "Zoom refused the login; run zm <profile> session start again, or sign in from WireCat Desktop (Tools \u2192 Zoom \u2192 Manage)");
|
|
5207
5042
|
if (response.status === 403 && record(message?.error) && message.error.code === -32003)
|
|
5208
|
-
throw new
|
|
5043
|
+
throw new CliError44("configuration_error", `Zoom wants scope ${String(message.error.message)}; ${sessionStart("it")}`);
|
|
5209
5044
|
if (!response.ok)
|
|
5210
|
-
throw new
|
|
5045
|
+
throw new CliError44("provider_error", `Zoom search failed (HTTP ${response.status})`);
|
|
5211
5046
|
if (notification)
|
|
5212
5047
|
return void 0;
|
|
5213
5048
|
if (!message)
|
|
5214
|
-
throw new
|
|
5049
|
+
throw new CliError44("invalid_response", "Zoom returned an invalid search answer");
|
|
5215
5050
|
if (record(message.error))
|
|
5216
|
-
throw new
|
|
5051
|
+
throw new CliError44("provider_error", `Zoom search failed: ${String(message.error.message ?? "unknown error")}`);
|
|
5217
5052
|
return message.result;
|
|
5218
5053
|
}
|
|
5219
5054
|
};
|
|
@@ -5241,7 +5076,7 @@ var toolError = /* @__PURE__ */ __name((text2) => {
|
|
|
5241
5076
|
}
|
|
5242
5077
|
const reason = typeof body.error_message === "string" ? body.error_message : (text2 ?? "").slice(0, 200);
|
|
5243
5078
|
const status = typeof body.status_code === "number" ? body.status_code : null;
|
|
5244
|
-
return new
|
|
5079
|
+
return new CliError44(status === 403 ? "permission_error" : status === 404 ? "not_found" : "invalid_response", `Zoom refused the request: ${reason || "no reason given"}`);
|
|
5245
5080
|
}, "toolError");
|
|
5246
5081
|
|
|
5247
5082
|
// dist/zoom-search.js
|
|
@@ -5303,7 +5138,7 @@ var hitOf = /* @__PURE__ */ __name((row, source, container = null) => {
|
|
|
5303
5138
|
}, "hitOf");
|
|
5304
5139
|
var zoomSearchHits = /* @__PURE__ */ __name((rows) => rows.flatMap((row) => {
|
|
5305
5140
|
if (!record2(row))
|
|
5306
|
-
throw new
|
|
5141
|
+
throw new CliError45("invalid_response", "Zoom returned an invalid search result");
|
|
5307
5142
|
const name = filled(row.datasource) ? row.datasource : "unknown";
|
|
5308
5143
|
const source = SOURCE_OF.get(name) ?? name;
|
|
5309
5144
|
if (name === "zoom_chat_message" && Array.isArray(row.messages)) {
|
|
@@ -5333,13 +5168,16 @@ var ZoomSearch = class {
|
|
|
5333
5168
|
args.next_page_token = request.cursor;
|
|
5334
5169
|
const body = await this.mcp.call("search", args, ZOOM_SEARCH_SCOPE, request.signal);
|
|
5335
5170
|
if (!record2(body) || !Array.isArray(body.data))
|
|
5336
|
-
throw new
|
|
5171
|
+
throw new CliError45("invalid_response", "Zoom returned an invalid search answer");
|
|
5337
5172
|
const cursor = filled(body.next_page_token) ? body.next_page_token : void 0;
|
|
5338
5173
|
return { items: zoomSearchHits(body.data), has_more: body.has_more === true, ...cursor ? { cursor } : {} };
|
|
5339
5174
|
}
|
|
5340
5175
|
};
|
|
5341
5176
|
|
|
5342
5177
|
// dist/zoom-search-commands.js
|
|
5178
|
+
import { CliError as CliError46 } from "@wirecat/cli-base";
|
|
5179
|
+
import { annotate as annotate18 } from "@wirecat/cli-base/commands";
|
|
5180
|
+
import { listOf as listOf5, NO_EFFECTS as NO_EFFECTS12, REMOTE_READ as REMOTE_READ3 } from "@wirecat/cli-core";
|
|
5343
5181
|
var WORDS = Object.keys(ZOOM_SEARCH_SOURCES);
|
|
5344
5182
|
var sourcesOf = /* @__PURE__ */ __name((text2) => {
|
|
5345
5183
|
if (text2 === void 0)
|
|
@@ -5347,7 +5185,7 @@ var sourcesOf = /* @__PURE__ */ __name((text2) => {
|
|
|
5347
5185
|
const words = text2.split(",").map((word) => word.trim().toLowerCase());
|
|
5348
5186
|
const unknown = words.filter((word) => !WORDS.includes(word));
|
|
5349
5187
|
if (!words.length || unknown.length)
|
|
5350
|
-
throw new
|
|
5188
|
+
throw new CliError46("validation_error", `--only takes ${WORDS.join(", ")}; got ${unknown.join(", ") || "nothing"}`);
|
|
5351
5189
|
return [...new Set(words)];
|
|
5352
5190
|
}, "sourcesOf");
|
|
5353
5191
|
var limitOf = /* @__PURE__ */ __name((text2) => {
|
|
@@ -5355,14 +5193,14 @@ var limitOf = /* @__PURE__ */ __name((text2) => {
|
|
|
5355
5193
|
return 10;
|
|
5356
5194
|
const value = Number(text2);
|
|
5357
5195
|
if (!/^\d+$/.test(text2) || value < 1 || value > 100)
|
|
5358
|
-
throw new
|
|
5196
|
+
throw new CliError46("validation_error", "--limit must be between 1 and 100");
|
|
5359
5197
|
return value;
|
|
5360
5198
|
}, "limitOf");
|
|
5361
5199
|
var addZoomSearchCommands = /* @__PURE__ */ __name((program, deps) => {
|
|
5362
|
-
const zoom =
|
|
5363
|
-
|
|
5200
|
+
const zoom = annotate18(program.command("zoom"), { effects: NO_EFFECTS12 }).description("Zoom's own live search: chat, docs and meetings zm does not archive");
|
|
5201
|
+
annotate18(zoom.command("search"), {
|
|
5364
5202
|
origin: "handwritten",
|
|
5365
|
-
effects:
|
|
5203
|
+
effects: REMOTE_READ3,
|
|
5366
5204
|
examples: [
|
|
5367
5205
|
'zm personal zoom search "budget" --only chat,docs --json',
|
|
5368
5206
|
"zm personal zoom search --only meetings --limit 50"
|
|
@@ -5372,7 +5210,7 @@ var addZoomSearchCommands = /* @__PURE__ */ __name((program, deps) => {
|
|
|
5372
5210
|
const limit = limitOf(options.limit);
|
|
5373
5211
|
deps.api();
|
|
5374
5212
|
const page = await deps.search().search({ query, sources, limit, cursor: options.cursor, signal: deps.signal() });
|
|
5375
|
-
deps.output(
|
|
5213
|
+
deps.output(listOf5("zoom search", {
|
|
5376
5214
|
items: page.items,
|
|
5377
5215
|
limit: Math.max(1, page.items.length),
|
|
5378
5216
|
has_more: page.has_more,
|
|
@@ -5391,8 +5229,8 @@ var addZoomSearchCommands = /* @__PURE__ */ __name((program, deps) => {
|
|
|
5391
5229
|
var bindZoomProgram = /* @__PURE__ */ __name((program, given, lifecycle) => {
|
|
5392
5230
|
const deps = {
|
|
5393
5231
|
...given,
|
|
5394
|
-
data: /* @__PURE__ */ __name((text2) =>
|
|
5395
|
-
diagnostic: /* @__PURE__ */ __name((text2) =>
|
|
5232
|
+
data: /* @__PURE__ */ __name((text2) => environmentOf3(program).streams?.data(text2.replace(/\n$/, "")), "data"),
|
|
5233
|
+
diagnostic: /* @__PURE__ */ __name((text2) => environmentOf3(program).streams?.diagnostic(text2.replace(/\n$/, "")), "diagnostic")
|
|
5396
5234
|
};
|
|
5397
5235
|
program.description(`Zoom meeting transcripts and summaries
|
|
5398
5236
|
|
|
@@ -5435,11 +5273,11 @@ ${PROFILE_HELP}`);
|
|
|
5435
5273
|
format: /* @__PURE__ */ __name(() => formatOf() === "pretty" ? "pretty" : "json", "format")
|
|
5436
5274
|
});
|
|
5437
5275
|
lifecycle.fail = (error) => runs.fail(error);
|
|
5438
|
-
const signal = /* @__PURE__ */ __name(() => currentExecution()?.signal ??
|
|
5276
|
+
const signal = /* @__PURE__ */ __name(() => currentExecution()?.signal ?? environmentOf3(program).signal ?? deps.signal, "signal");
|
|
5439
5277
|
const fetchWithSignal = /* @__PURE__ */ __name((fetcher) => (input, init) => {
|
|
5440
5278
|
checkCancelled(signal());
|
|
5441
5279
|
if (program.opts().offline)
|
|
5442
|
-
throw new
|
|
5280
|
+
throw new CliError47("configuration_error", "the command requires network access; remove --offline");
|
|
5443
5281
|
const operation3 = signal();
|
|
5444
5282
|
return observedFetch(fetcher, runs.events)(input, {
|
|
5445
5283
|
...init,
|
|
@@ -5449,7 +5287,7 @@ ${PROFILE_HELP}`);
|
|
|
5449
5287
|
const tokens = /* @__PURE__ */ __name(() => activeTokens ??= deps.tokens.forProfile(profile()).withSignal(signal(), fetchWithSignal(deps.tokens.options.fetch)), "tokens");
|
|
5450
5288
|
const buffer = /* @__PURE__ */ __name((text2) => {
|
|
5451
5289
|
if (!execution)
|
|
5452
|
-
throw new
|
|
5290
|
+
throw new CliError47("configuration_error", "command execution is not initialized");
|
|
5453
5291
|
execution.output.data(text2);
|
|
5454
5292
|
}, "buffer");
|
|
5455
5293
|
const guardedStore = /* @__PURE__ */ __name((store) => cancellableStore(store, signal), "guardedStore");
|
|
@@ -5457,7 +5295,7 @@ ${PROFILE_HELP}`);
|
|
|
5457
5295
|
let selectedAccountId = deps.accountId;
|
|
5458
5296
|
const requireAccount = /* @__PURE__ */ __name(() => {
|
|
5459
5297
|
if (!Number.isSafeInteger(selectedAccountId) || !selectedAccountId || selectedAccountId < 1)
|
|
5460
|
-
throw new
|
|
5298
|
+
throw new CliError47("configuration_error", "the selected meeting account is unavailable");
|
|
5461
5299
|
return selectedAccountId;
|
|
5462
5300
|
}, "requireAccount");
|
|
5463
5301
|
const openStore = /* @__PURE__ */ __name(async (intent, context) => {
|
|
@@ -5474,7 +5312,7 @@ ${PROFILE_HELP}`);
|
|
|
5474
5312
|
}
|
|
5475
5313
|
let closing;
|
|
5476
5314
|
const close = /* @__PURE__ */ __name(() => closing ??= connection.close(), "close");
|
|
5477
|
-
|
|
5315
|
+
environmentOf3(program).trackCloseable?.({
|
|
5478
5316
|
close: /* @__PURE__ */ __name(async () => {
|
|
5479
5317
|
await commandSettled;
|
|
5480
5318
|
await close();
|
|
@@ -5482,14 +5320,14 @@ ${PROFILE_HELP}`);
|
|
|
5482
5320
|
});
|
|
5483
5321
|
return { ...connection, close };
|
|
5484
5322
|
} catch (error) {
|
|
5485
|
-
if (
|
|
5323
|
+
if (isCliError11(error))
|
|
5486
5324
|
throw error;
|
|
5487
|
-
throw new
|
|
5325
|
+
throw new CliError47("configuration_error", "could not open the shared meeting store");
|
|
5488
5326
|
}
|
|
5489
5327
|
}, "openStore");
|
|
5490
5328
|
const connected = /* @__PURE__ */ __name((intent = "read") => connecting ??= openStore(intent), "connected");
|
|
5491
5329
|
const zones = new ZoneAssumptions();
|
|
5492
|
-
const ask = /* @__PURE__ */ __name(() => program.opts().input === false ? void 0 :
|
|
5330
|
+
const ask = /* @__PURE__ */ __name(() => program.opts().input === false ? void 0 : environmentOf3(program).agent ? async () => true : deps.confirm, "ask");
|
|
5493
5331
|
const maxOutputBytes = /* @__PURE__ */ __name(() => {
|
|
5494
5332
|
const value = program.opts().maxOutputBytes;
|
|
5495
5333
|
return value === void 0 ? void 0 : Number(value);
|
|
@@ -5499,7 +5337,7 @@ ${PROFILE_HELP}`);
|
|
|
5499
5337
|
if (progress && "item" in body && body.item && typeof body.item === "object" && "meetings" in body.item && "warnings" in body.item)
|
|
5500
5338
|
progress.complete(body.item);
|
|
5501
5339
|
if (!execution)
|
|
5502
|
-
throw new
|
|
5340
|
+
throw new CliError47("configuration_error", "command execution is not initialized");
|
|
5503
5341
|
const answer = renderBody(execution.action, body, {
|
|
5504
5342
|
format,
|
|
5505
5343
|
warnings: zones.take(),
|
|
@@ -5508,16 +5346,16 @@ ${PROFILE_HELP}`);
|
|
|
5508
5346
|
quiet: Boolean(program.opts().quiet),
|
|
5509
5347
|
diagnostic: deps.diagnostic
|
|
5510
5348
|
});
|
|
5511
|
-
const exit =
|
|
5349
|
+
const exit = environmentOf3(program).exit;
|
|
5512
5350
|
if (exit)
|
|
5513
5351
|
exit.code = Math.max(exit.code ?? 0, answer.exitCode);
|
|
5514
5352
|
return answer.text;
|
|
5515
5353
|
}, "rendered");
|
|
5516
5354
|
const api = /* @__PURE__ */ __name(() => {
|
|
5517
5355
|
if (program.opts().offline)
|
|
5518
|
-
throw new
|
|
5356
|
+
throw new CliError47("configuration_error", "the command requires network access; remove --offline");
|
|
5519
5357
|
if (!zoomClientId(getConfig(), deps.env ?? process.env))
|
|
5520
|
-
throw new
|
|
5358
|
+
throw new CliError47("configuration_error", SET_ZOOM_APP);
|
|
5521
5359
|
}, "api");
|
|
5522
5360
|
let activeAction = program;
|
|
5523
5361
|
program.hook("preAction", (_root, action) => {
|
|
@@ -5545,8 +5383,8 @@ ${PROFILE_HELP}`);
|
|
|
5545
5383
|
await asking;
|
|
5546
5384
|
const opts = action.optsWithGlobals();
|
|
5547
5385
|
if (opts.json && opts.jsonl)
|
|
5548
|
-
throw new
|
|
5549
|
-
execution = sharedExecution(action,
|
|
5386
|
+
throw new CliError47("validation_error", "choose --json or --jsonl");
|
|
5387
|
+
execution = sharedExecution(action, environmentOf3(program), deps.now, runs.runId());
|
|
5550
5388
|
checkCancelled(signal());
|
|
5551
5389
|
if (action.parent?.name() === "meetings" && ["sync", "import"].includes(action.name()) || action.name() === "watch") {
|
|
5552
5390
|
const selected = named();
|
|
@@ -5560,7 +5398,7 @@ ${PROFILE_HELP}`);
|
|
|
5560
5398
|
const config2 = getConfig();
|
|
5561
5399
|
const ingestion = action.parent?.name() === "meetings" && ["sync", "import"].includes(action.name());
|
|
5562
5400
|
if (opts.offline && ingestion && action.name() !== "import" && config2.source === "api" && !deps.source)
|
|
5563
|
-
throw new
|
|
5401
|
+
throw new CliError47("configuration_error", "API sync requires network access; remove --offline");
|
|
5564
5402
|
if (!selectedStore) {
|
|
5565
5403
|
const connection = await connected(ingestion ? "ingestion" : "read");
|
|
5566
5404
|
selectedStore = connection.store;
|
|
@@ -5569,7 +5407,7 @@ ${PROFILE_HELP}`);
|
|
|
5569
5407
|
requireAccount();
|
|
5570
5408
|
};
|
|
5571
5409
|
const output = /* @__PURE__ */ __name((body) => {
|
|
5572
|
-
const agent =
|
|
5410
|
+
const agent = environmentOf3(program).agent;
|
|
5573
5411
|
if (!agent)
|
|
5574
5412
|
return buffer(rendered(body));
|
|
5575
5413
|
const packet = JSON.parse(rendered(body, "json"));
|
|
@@ -5587,7 +5425,7 @@ ${PROFILE_HELP}`);
|
|
|
5587
5425
|
output(wholeList("list", items));
|
|
5588
5426
|
}, "outputItems");
|
|
5589
5427
|
addConfigCommands(program, { configPath: deps.configPath, output, warn: deps.diagnostic, named });
|
|
5590
|
-
addAppCommand(program, { output, buffer, pretty: /* @__PURE__ */ __name(() => formatOf() === "pretty" && !
|
|
5428
|
+
addAppCommand(program, { output, buffer, pretty: /* @__PURE__ */ __name(() => formatOf() === "pretty" && !environmentOf3(program).agent, "pretty") });
|
|
5591
5429
|
const fetchApi = /* @__PURE__ */ __name(() => fetchWithSignal(deps.fetch), "fetchApi");
|
|
5592
5430
|
const configured2 = configuredMeetingSource({ deps, getConfig, tokens, fetch: fetchApi, zones });
|
|
5593
5431
|
const source = configured2.source;
|
|
@@ -5644,7 +5482,7 @@ ${PROFILE_HELP}`);
|
|
|
5644
5482
|
const grace = operation3.aborted ? createDeadline({ timeoutMs: 1e3 }) : void 0;
|
|
5645
5483
|
try {
|
|
5646
5484
|
await emitReceipt(text2, maxOutputBytes(), async (serialized) => {
|
|
5647
|
-
if (
|
|
5485
|
+
if (environmentOf3(program).agent)
|
|
5648
5486
|
deps.data(serialized);
|
|
5649
5487
|
else if (deps.streamData)
|
|
5650
5488
|
await deps.streamData(serialized, grace?.signal ?? operation3);
|
|
@@ -5710,7 +5548,7 @@ ${PROFILE_HELP}`);
|
|
|
5710
5548
|
outputIsTTY: deps.outputIsTTY
|
|
5711
5549
|
});
|
|
5712
5550
|
addZoomSkillCommands(program, () => {
|
|
5713
|
-
const renderer =
|
|
5551
|
+
const renderer = createRenderer2({
|
|
5714
5552
|
format: formatOf(),
|
|
5715
5553
|
color: false,
|
|
5716
5554
|
quiet: Boolean(program.opts().quiet),
|
|
@@ -5761,7 +5599,7 @@ ${PROFILE_HELP}`);
|
|
|
5761
5599
|
fields: /* @__PURE__ */ __name(() => fields, "fields"),
|
|
5762
5600
|
meta: /* @__PURE__ */ __name(() => {
|
|
5763
5601
|
if (!execution)
|
|
5764
|
-
throw new
|
|
5602
|
+
throw new CliError47("configuration_error", "command execution is not initialized");
|
|
5765
5603
|
return execution.meta();
|
|
5766
5604
|
}, "meta")
|
|
5767
5605
|
});
|
|
@@ -5777,7 +5615,7 @@ ${PROFILE_HELP}`);
|
|
|
5777
5615
|
try {
|
|
5778
5616
|
await (await closing)?.close();
|
|
5779
5617
|
} catch {
|
|
5780
|
-
throw new
|
|
5618
|
+
throw new CliError47("configuration_error", "could not close the shared meeting store");
|
|
5781
5619
|
}
|
|
5782
5620
|
}
|
|
5783
5621
|
checkCancelled(signal());
|
|
@@ -5788,6 +5626,9 @@ ${PROFILE_HELP}`);
|
|
|
5788
5626
|
}, "bindZoomProgram");
|
|
5789
5627
|
|
|
5790
5628
|
// dist/zoom-session.js
|
|
5629
|
+
import { CliError as CliError48, isCliError as isCliError12 } from "@wirecat/cli-base";
|
|
5630
|
+
import { environmentOf as environmentOf4, oauthSessionCommand } from "@wirecat/cli-core";
|
|
5631
|
+
import { Option as Option2 } from "commander";
|
|
5791
5632
|
var configuredClient = /* @__PURE__ */ __name((configPath, env) => {
|
|
5792
5633
|
try {
|
|
5793
5634
|
return zoomClientId(readConfig(configPath), env);
|
|
@@ -5804,10 +5645,10 @@ var zoomSessionCommand = /* @__PURE__ */ __name((deps, resolveSettings) => oauth
|
|
|
5804
5645
|
codec: ZOOM_CODEC,
|
|
5805
5646
|
legacyAccounts: /* @__PURE__ */ __name((env, profile) => legacyAccountsOf(legacyLoginService({ env }), configuredClient(deps.configPath, env), profile), "legacyAccounts"),
|
|
5806
5647
|
startOptions: [
|
|
5807
|
-
new
|
|
5648
|
+
new Option2("--client-id <id>", "the Public Client ID of your Zoom app; saved as zoom.client_id once you sign in")
|
|
5808
5649
|
],
|
|
5809
5650
|
preset: /* @__PURE__ */ __name(async (command, steps) => {
|
|
5810
|
-
const env =
|
|
5651
|
+
const env = environmentOf4(command).env ?? process.env;
|
|
5811
5652
|
const given = command.opts().clientId;
|
|
5812
5653
|
if (given !== void 0)
|
|
5813
5654
|
checkedClientId(given);
|
|
@@ -5815,7 +5656,7 @@ var zoomSessionCommand = /* @__PURE__ */ __name((deps, resolveSettings) => oauth
|
|
|
5815
5656
|
let client = zoomApp({ env, configClientId, clientId: given })?.client;
|
|
5816
5657
|
if (!client && command.name() !== "end") {
|
|
5817
5658
|
if (command.name() !== "start" || !steps?.answers)
|
|
5818
|
-
throw new
|
|
5659
|
+
throw new CliError48("configuration_error", SET_ZOOM_APP, { reason: CLIENT_ID_MISSING });
|
|
5819
5660
|
const answered = checkedClientId(await steps.ask(CLIENT_ID_NEED));
|
|
5820
5661
|
client = zoomApp({ env, configClientId, clientId: answered })?.client;
|
|
5821
5662
|
}
|
|
@@ -5825,11 +5666,11 @@ var zoomSessionCommand = /* @__PURE__ */ __name((deps, resolveSettings) => oauth
|
|
|
5825
5666
|
verify: /* @__PURE__ */ __name(async (command, accessToken, events) => {
|
|
5826
5667
|
const token = { accessToken, refreshToken: "", expiresAt: 0, scopes: ["user:read:user"] };
|
|
5827
5668
|
try {
|
|
5828
|
-
const signal =
|
|
5669
|
+
const signal = environmentOf4(command).signal;
|
|
5829
5670
|
const user = await getZoomProfile({ tokens: /* @__PURE__ */ __name(async () => token, "tokens") }, observedFetch(deps.fetch, events), signal ? { signal } : {});
|
|
5830
5671
|
return { id: user.id, account: { user_id: user.id, email: user.email, display_name: user.displayName } };
|
|
5831
5672
|
} catch (error) {
|
|
5832
|
-
const scopeless =
|
|
5673
|
+
const scopeless = isCliError12(error) && ["authentication_error", "permission_error"].includes(error.code);
|
|
5833
5674
|
if (command.name() === "start" && scopeless)
|
|
5834
5675
|
return { id: "", account: {} };
|
|
5835
5676
|
throw error;
|
|
@@ -5933,7 +5774,7 @@ var zoomDefinition = /* @__PURE__ */ __name((deps, onFailure) => {
|
|
|
5933
5774
|
}, "onFailure")
|
|
5934
5775
|
};
|
|
5935
5776
|
}, "zoomDefinition");
|
|
5936
|
-
var runCommand = /* @__PURE__ */ __name(async (args, deps, onFailure) =>
|
|
5777
|
+
var runCommand = /* @__PURE__ */ __name(async (args, deps, onFailure) => sharedRun(args, zoomDefinition(deps, onFailure), {
|
|
5937
5778
|
streams: {
|
|
5938
5779
|
data: /* @__PURE__ */ __name((text2) => deps.data(`${text2}
|
|
5939
5780
|
`), "data"),
|
|
@@ -5953,16 +5794,16 @@ var runCommand = /* @__PURE__ */ __name(async (args, deps, onFailure) => run(arg
|
|
|
5953
5794
|
}), "runCommand");
|
|
5954
5795
|
|
|
5955
5796
|
// dist/program.js
|
|
5956
|
-
var
|
|
5957
|
-
var
|
|
5958
|
-
const program =
|
|
5797
|
+
var run = runCommand;
|
|
5798
|
+
var createProgram = /* @__PURE__ */ __name((deps) => {
|
|
5799
|
+
const program = sharedProgram(zoomDefinition(deps));
|
|
5959
5800
|
program.parse = () => {
|
|
5960
|
-
throw new
|
|
5801
|
+
throw new CliError49("validation_error", "use parseAsync so command guards and cleanup run before returning");
|
|
5961
5802
|
};
|
|
5962
5803
|
let parsing = false;
|
|
5963
5804
|
program.parseAsync = async (argv = process.argv, options) => {
|
|
5964
5805
|
if (parsing)
|
|
5965
|
-
throw new
|
|
5806
|
+
throw new CliError49("validation_error", "concurrent command parsing is unavailable");
|
|
5966
5807
|
parsing = true;
|
|
5967
5808
|
let failure;
|
|
5968
5809
|
try {
|
|
@@ -5980,6 +5821,6 @@ var createProgram2 = /* @__PURE__ */ __name((deps) => {
|
|
|
5980
5821
|
return program;
|
|
5981
5822
|
}, "createProgram");
|
|
5982
5823
|
export {
|
|
5983
|
-
|
|
5984
|
-
|
|
5824
|
+
createProgram,
|
|
5825
|
+
run
|
|
5985
5826
|
};
|