@wirecat/zoom-cli 0.82.0 → 0.84.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -12
- package/contracts/wirecat.json +88 -55
- 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 +2 -2
- 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 +4 -17
- package/dist/bin/main.js.map +1 -1
- package/dist/bin/zm.js +11 -11
- package/dist/bundle/answer-policy-OQQWAUHH.js +33 -0
- package/dist/bundle/chunk-3YDF76DP.js +922 -0
- package/dist/bundle/chunk-AEWYRB6F.js +8 -0
- package/dist/bundle/chunk-AF2Z6VOG.js +137 -0
- package/dist/bundle/{chunk-MAJJ4PG3.js → chunk-DAYBU7WR.js} +79 -396
- package/dist/bundle/{chunk-XQQVMECZ.js → chunk-JD63PEI3.js} +3 -8
- package/dist/bundle/{chunk-UL2PXLKT.js → chunk-L5ZYKXAY.js} +392 -129
- package/dist/bundle/{chunk-2SWKQ7C4.js → chunk-W4TDCCT3.js} +8 -2
- package/dist/bundle/{chunk-AC6VJNMJ.js → chunk-W6YFWJDR.js} +2 -5
- package/dist/bundle/{chunk-434YFJAE.js → chunk-WSGD5Q6L.js} +3 -9
- package/dist/bundle/config-MP5YLHEY.js +29 -0
- package/dist/bundle/{folders-LXOL4N4S.js → folders-B2GKJOC2.js} +2 -7
- package/dist/bundle/{main-YAA7WQ23.js → main-YZPLPXB7.js} +21 -53
- package/dist/bundle/{output-file-2UB5JP3R.js → output-file-PKA7MJEP.js} +3 -11
- package/dist/bundle/{program-GVCGZP27.js → program-7JY6XJ6K.js} +714 -935
- package/dist/bundle/run-log-ML7ZCWXD.js +54 -0
- package/dist/bundle/store-connection-LQGKS3DN.js +21 -0
- package/dist/bundle/streaming-PRGWGNHY.js +12 -0
- package/dist/bundle/tokens-57RJVBK6.js +18 -0
- package/dist/bundle/zm.js +4 -161
- package/dist/bundle/{zoom-app-YWFB367P.js → zoom-app-EYJST6GF.js} +4 -10
- package/dist/chat-file.d.ts +1 -1
- package/dist/chat-file.d.ts.map +1 -1
- package/dist/commands.d.ts +1 -8
- package/dist/commands.d.ts.map +1 -1
- package/dist/commands.js +3 -33
- 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/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -2
- package/dist/index.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.d.ts.map +1 -1
- package/dist/program-bindings.js +3 -13
- package/dist/program-bindings.js.map +1 -1
- package/dist/program.d.ts +4 -7
- 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 +6 -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 +6 -15
- package/dist/setup-commands.d.ts.map +1 -1
- package/dist/setup-commands.js +7 -142
- 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 +20 -44
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +95 -308
- 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 +2 -2
- 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 +6 -0
- package/dist/zoom-session.d.ts.map +1 -0
- package/dist/zoom-session.js +72 -0
- package/dist/zoom-session.js.map +1 -0
- 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/skills/zoom-cli/references/setup.md +2 -2
- package/dist/bundle/agent-F4TRJWWS.js +0 -46
- package/dist/bundle/all-profiles-RULEKTDQ.js +0 -321
- package/dist/bundle/answer-policy-6XC57AEZ.js +0 -131
- package/dist/bundle/anthropic-4NAQBZFL.js +0 -91
- package/dist/bundle/app-server-VLR42U5L.js +0 -266
- package/dist/bundle/bun-OPDGMZZQ.js +0 -169
- package/dist/bundle/bun-sqlite-HC6X4AOX.js +0 -76
- package/dist/bundle/chunk-274SLQNW.js +0 -54
- package/dist/bundle/chunk-2CI2OEZQ.js +0 -101
- package/dist/bundle/chunk-2DBF2IIC.js +0 -330
- package/dist/bundle/chunk-2GP573Q4.js +0 -67190
- package/dist/bundle/chunk-2JHVQMVC.js +0 -16
- package/dist/bundle/chunk-2XBDILVW.js +0 -53
- package/dist/bundle/chunk-3HC5F3P7.js +0 -24
- package/dist/bundle/chunk-3YM4B2GT.js +0 -63
- package/dist/bundle/chunk-4HLQ2JGK.js +0 -276
- package/dist/bundle/chunk-4N7PP76S.js +0 -6848
- package/dist/bundle/chunk-52Y4ETKU.js +0 -230
- package/dist/bundle/chunk-5HAUK3I4.js +0 -27160
- package/dist/bundle/chunk-5KYQ53EF.js +0 -357
- package/dist/bundle/chunk-5TU7Y5UW.js +0 -218
- package/dist/bundle/chunk-66ALX4ZI.js +0 -1068
- package/dist/bundle/chunk-676C2LE6.js +0 -229
- package/dist/bundle/chunk-6CWL5BKG.js +0 -3012
- package/dist/bundle/chunk-6QYZP4E2.js +0 -73
- package/dist/bundle/chunk-6VK332XS.js +0 -170
- package/dist/bundle/chunk-73MOMNLL.js +0 -94
- package/dist/bundle/chunk-7QPIUMUG.js +0 -198
- package/dist/bundle/chunk-7UVDPRFK.js +0 -259
- package/dist/bundle/chunk-A6EZK5RG.js +0 -142
- package/dist/bundle/chunk-ACI4YIEH.js +0 -331
- package/dist/bundle/chunk-AIKFOBDO.js +0 -1024
- package/dist/bundle/chunk-ASBDFXLS.js +0 -295
- package/dist/bundle/chunk-B32KZRQM.js +0 -2338
- package/dist/bundle/chunk-BBGJQMRI.js +0 -34
- package/dist/bundle/chunk-BDKVOU3I.js +0 -52
- package/dist/bundle/chunk-BP4FYANF.js +0 -335
- package/dist/bundle/chunk-D72URWJE.js +0 -532
- package/dist/bundle/chunk-DCYFT3FR.js +0 -161
- package/dist/bundle/chunk-DFDN6AUB.js +0 -21
- package/dist/bundle/chunk-DNCLQPOM.js +0 -7
- package/dist/bundle/chunk-DSZYABYL.js +0 -808
- package/dist/bundle/chunk-E745WZKY.js +0 -1199
- package/dist/bundle/chunk-EGTCQKHV.js +0 -340
- package/dist/bundle/chunk-EQG3PIH2.js +0 -108
- package/dist/bundle/chunk-ESN3W2MZ.js +0 -2624
- package/dist/bundle/chunk-FXBHOCJK.js +0 -24600
- package/dist/bundle/chunk-G46WJ7YO.js +0 -95
- package/dist/bundle/chunk-G6PETRMV.js +0 -64
- package/dist/bundle/chunk-GBHMT2IU.js +0 -755
- package/dist/bundle/chunk-GGMAIIVE.js +0 -38
- package/dist/bundle/chunk-GTKPMYK7.js +0 -72
- package/dist/bundle/chunk-GWGHH56B.js +0 -374
- package/dist/bundle/chunk-HC6VN5CO.js +0 -692
- package/dist/bundle/chunk-HP7A2ZOP.js +0 -185
- package/dist/bundle/chunk-HTQTIKWP.js +0 -928
- package/dist/bundle/chunk-HZENBDW2.js +0 -209
- package/dist/bundle/chunk-IANKXHSE.js +0 -46
- package/dist/bundle/chunk-ICPJT672.js +0 -228
- package/dist/bundle/chunk-JQ54DYAQ.js +0 -80
- package/dist/bundle/chunk-K5JGJIV2.js +0 -640
- package/dist/bundle/chunk-KJ6USQDZ.js +0 -616
- package/dist/bundle/chunk-KKFY23AK.js +0 -5150
- package/dist/bundle/chunk-KQPUVXKX.js +0 -84
- package/dist/bundle/chunk-KVJ3I7UL.js +0 -1007
- package/dist/bundle/chunk-KWU46LNK.js +0 -288
- package/dist/bundle/chunk-KXJ3JEDH.js +0 -2
- package/dist/bundle/chunk-L75SMSJR.js +0 -133
- package/dist/bundle/chunk-LAYYO4WD.js +0 -31
- package/dist/bundle/chunk-LEKKTJKK.js +0 -2336
- package/dist/bundle/chunk-M7H4MCAX.js +0 -388
- package/dist/bundle/chunk-MQLPZBMQ.js +0 -58
- package/dist/bundle/chunk-N3JLO63O.js +0 -13
- package/dist/bundle/chunk-N46F72AF.js +0 -410
- package/dist/bundle/chunk-NB7EOAUZ.js +0 -123
- package/dist/bundle/chunk-NEMX3UNN.js +0 -76
- package/dist/bundle/chunk-OBXQLFT5.js +0 -82
- package/dist/bundle/chunk-OGNO35A2.js +0 -262
- package/dist/bundle/chunk-OIPYBF43.js +0 -100
- package/dist/bundle/chunk-OO4TRVPB.js +0 -185
- package/dist/bundle/chunk-OQFQ77AY.js +0 -9352
- package/dist/bundle/chunk-PL5P7UKW.js +0 -25216
- package/dist/bundle/chunk-PMUPN6JW.js +0 -773
- package/dist/bundle/chunk-PSKTMMCO.js +0 -561
- package/dist/bundle/chunk-PWVJUIDQ.js +0 -106
- package/dist/bundle/chunk-Q7ICVP25.js +0 -18
- package/dist/bundle/chunk-QG6PILDO.js +0 -195
- package/dist/bundle/chunk-QPHBK63S.js +0 -25
- package/dist/bundle/chunk-QVSL5WJ7.js +0 -46524
- package/dist/bundle/chunk-QVYAV7F2.js +0 -58
- package/dist/bundle/chunk-R2B6PUVI.js +0 -206
- package/dist/bundle/chunk-RQOZBTNI.js +0 -86
- package/dist/bundle/chunk-T7IAWEBU.js +0 -362
- package/dist/bundle/chunk-TKNM22OH.js +0 -71
- package/dist/bundle/chunk-TKVBFJ5C.js +0 -37
- 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-UKAAAOPC.js +0 -1251
- package/dist/bundle/chunk-UQCTXZEP.js +0 -214
- package/dist/bundle/chunk-UR5DBODY.js +0 -1345
- package/dist/bundle/chunk-V5EJSF2B.js +0 -12235
- package/dist/bundle/chunk-VB72LTSZ.js +0 -210
- package/dist/bundle/chunk-VB7FZOYX.js +0 -633
- package/dist/bundle/chunk-VS6WURLX.js +0 -217
- package/dist/bundle/chunk-VZ5PPYDG.js +0 -77
- package/dist/bundle/chunk-W5QHB53X.js +0 -3752
- package/dist/bundle/chunk-WMANRJR5.js +0 -555
- package/dist/bundle/chunk-WOPVBRPV.js +0 -29
- package/dist/bundle/chunk-XQ2WL3HB.js +0 -140
- package/dist/bundle/chunk-Y5E2WNWB.js +0 -35
- package/dist/bundle/chunk-Y6PVS55U.js +0 -800
- package/dist/bundle/chunk-YJXJJ2XP.js +0 -2333
- package/dist/bundle/chunk-YY7XKHDY.js +0 -79
- package/dist/bundle/chunk-ZED2CJW5.js +0 -353
- package/dist/bundle/chunk-ZOYOXWJB.js +0 -746
- package/dist/bundle/chunk-ZVVMGPBJ.js +0 -50
- package/dist/bundle/cli-U4O5XB7J.js +0 -1255
- package/dist/bundle/command-contract-FBTK6GQX.js +0 -45
- package/dist/bundle/command-server-entry-KKH6ZWJV.js +0 -175
- package/dist/bundle/config-FRJSIZNN.js +0 -118
- package/dist/bundle/decode-TPCNXEK4.js +0 -31
- package/dist/bundle/dispatch-FKMIPCPQ.js +0 -412
- package/dist/bundle/dist-7CLBCYZN.js +0 -321
- package/dist/bundle/dist-PAKDDIBT.js +0 -191
- package/dist/bundle/dist-XUFQCJXW.js +0 -7577
- package/dist/bundle/echarts-O3TNDAXJ.js +0 -42501
- package/dist/bundle/embed-WCJSFVSK.js +0 -38
- package/dist/bundle/embedder-TBBUPXBX.js +0 -111
- package/dist/bundle/failure-XTWBYI2A.js +0 -25
- package/dist/bundle/first-run-ELEMFW42.js +0 -29
- package/dist/bundle/first-screen-DIOBWMKP.js +0 -46
- package/dist/bundle/instructions-AMH5RWVJ.js +0 -11
- package/dist/bundle/mcp-5HFPWC3W.js +0 -167
- package/dist/bundle/meeting-combined-UXCF4SJ3.js +0 -26
- package/dist/bundle/meeting-model-3BZJ3EQP.js +0 -26
- package/dist/bundle/meeting-semantic-3HU7I2SJ.js +0 -23
- package/dist/bundle/meetings-XWMB6FOH.js +0 -332
- package/dist/bundle/node-EGMCBAO7.js +0 -176
- package/dist/bundle/node-KM3CUABH.js +0 -2340
- package/dist/bundle/node-TLZSIHIJ.js +0 -21
- package/dist/bundle/node-sqlite-IJBWENFX.js +0 -74
- package/dist/bundle/oauth-SZDDAP7A.js +0 -20
- package/dist/bundle/open-NS3TMKZX.js +0 -23
- package/dist/bundle/openai-4DN6WI3B.js +0 -28
- package/dist/bundle/process-SGHEN6MQ.js +0 -91
- package/dist/bundle/prompt-HJFMPFVC.js +0 -17
- package/dist/bundle/public-C2ZB2AGQ.js +0 -198
- package/dist/bundle/recognize-2SEI5PPM.js +0 -26
- package/dist/bundle/remote-2DMS74XE.js +0 -32
- package/dist/bundle/rerank-H6GCYVIA.js +0 -52
- package/dist/bundle/run-log-QU26SUZP.js +0 -145
- package/dist/bundle/serve-ODVRPFJO.js +0 -199
- package/dist/bundle/server-NBPF6IDZ.js +0 -95
- package/dist/bundle/server-PCLIO24L.js +0 -228
- package/dist/bundle/services-4QAPXBLO.js +0 -607
- package/dist/bundle/speech-MA6ZT3WE.js +0 -89
- package/dist/bundle/sqlite-runtime-PVMAUXRN.js +0 -20
- package/dist/bundle/state-QFMTYUME.js +0 -36
- package/dist/bundle/store-25OTAQC3.js +0 -187
- package/dist/bundle/store-F724QIKJ.js +0 -305
- package/dist/bundle/store-connection-OGPXANGB.js +0 -111
- package/dist/bundle/store-maintenance-command-2CM7LLNQ.js +0 -83
- package/dist/bundle/streaming-S22C4DG5.js +0 -18
- package/dist/bundle/surface-7PXHWCF6.js +0 -81
- package/dist/bundle/tokens-NLUHA2DW.js +0 -25
- package/dist/login.d.ts +0 -16
- package/dist/login.d.ts.map +0 -1
- package/dist/login.js +0 -98
- package/dist/login.js.map +0 -1
|
@@ -1,640 +0,0 @@
|
|
|
1
|
-
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
-
const require = __bundleRequire(import.meta.url);
|
|
3
|
-
import {
|
|
4
|
-
withTimeLimit
|
|
5
|
-
} from "./chunk-QPHBK63S.js";
|
|
6
|
-
import {
|
|
7
|
-
acquireLock
|
|
8
|
-
} from "./chunk-N46F72AF.js";
|
|
9
|
-
import {
|
|
10
|
-
Credentials,
|
|
11
|
-
isMovedRun,
|
|
12
|
-
keyringService,
|
|
13
|
-
realSleep,
|
|
14
|
-
systemKeyring
|
|
15
|
-
} from "./chunk-6CWL5BKG.js";
|
|
16
|
-
import {
|
|
17
|
-
CliError,
|
|
18
|
-
isCliError
|
|
19
|
-
} from "./chunk-IANKXHSE.js";
|
|
20
|
-
import {
|
|
21
|
-
__name
|
|
22
|
-
} from "./chunk-ZVVMGPBJ.js";
|
|
23
|
-
|
|
24
|
-
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/oauth/storage.js
|
|
25
|
-
var invalid = /* @__PURE__ */ __name(() => new CliError("authentication_error", "the saved sign-in cannot be read; sign in again", { reason: "oauth.invalid" }), "invalid");
|
|
26
|
-
var parse = /* @__PURE__ */ __name((raw) => {
|
|
27
|
-
let value;
|
|
28
|
-
try {
|
|
29
|
-
value = JSON.parse(raw);
|
|
30
|
-
} catch {
|
|
31
|
-
throw invalid();
|
|
32
|
-
}
|
|
33
|
-
if (typeof value !== "object" || value === null || Array.isArray(value))
|
|
34
|
-
throw invalid();
|
|
35
|
-
return value;
|
|
36
|
-
}, "parse");
|
|
37
|
-
var text = /* @__PURE__ */ __name((value) => typeof value === "string" && value ? value : void 0, "text");
|
|
38
|
-
var finite = /* @__PURE__ */ __name((value) => typeof value === "number" && Number.isFinite(value) ? value : void 0, "finite");
|
|
39
|
-
var previousOf = /* @__PURE__ */ __name((raw) => {
|
|
40
|
-
if (raw === void 0)
|
|
41
|
-
return {};
|
|
42
|
-
try {
|
|
43
|
-
return parse(raw);
|
|
44
|
-
} catch {
|
|
45
|
-
return {};
|
|
46
|
-
}
|
|
47
|
-
}, "previousOf");
|
|
48
|
-
var defined = /* @__PURE__ */ __name((value) => Object.fromEntries(Object.entries(value).filter(([, field]) => field !== void 0)), "defined");
|
|
49
|
-
var oauthAccount = /* @__PURE__ */ __name((providerId, profile) => {
|
|
50
|
-
if (!profile.trim())
|
|
51
|
-
throw new CliError("validation_error", "name a profile: a sign-in always belongs to one", {
|
|
52
|
-
reason: "profile.missing"
|
|
53
|
-
});
|
|
54
|
-
return `oauth:${providerId}:${profile}`;
|
|
55
|
-
}, "oauthAccount");
|
|
56
|
-
var standardCodec = /* @__PURE__ */ __name((providerId) => ({
|
|
57
|
-
decode: /* @__PURE__ */ __name((raw) => {
|
|
58
|
-
const value = parse(raw);
|
|
59
|
-
const refreshToken = text(value.refreshToken);
|
|
60
|
-
const clientId = text(value.clientId);
|
|
61
|
-
if (value.version !== 1 || value.provider !== providerId || !refreshToken || !clientId)
|
|
62
|
-
throw invalid();
|
|
63
|
-
if (!Array.isArray(value.scopes) || !value.scopes.every((scope) => typeof scope === "string"))
|
|
64
|
-
throw invalid();
|
|
65
|
-
const source = text(value.clientSource);
|
|
66
|
-
return {
|
|
67
|
-
client: defined({ clientId, clientSecret: text(value.clientSecret), source }),
|
|
68
|
-
tokens: defined({
|
|
69
|
-
accessToken: text(value.accessToken),
|
|
70
|
-
refreshToken,
|
|
71
|
-
expiresAt: finite(value.expiresAt),
|
|
72
|
-
scopes: value.scopes,
|
|
73
|
-
tokenType: text(value.tokenType)
|
|
74
|
-
})
|
|
75
|
-
};
|
|
76
|
-
}, "decode"),
|
|
77
|
-
encode: /* @__PURE__ */ __name(({ tokens, client, previous, extra }) => JSON.stringify(defined({
|
|
78
|
-
...previousOf(previous),
|
|
79
|
-
...extra,
|
|
80
|
-
version: 1,
|
|
81
|
-
provider: providerId,
|
|
82
|
-
clientId: client.clientId,
|
|
83
|
-
// Only WireCat's secret, which is public: a later release may ship another default app, and a refresh needs
|
|
84
|
-
// the secret of the app that signed in. An owner's own secret stays where the owner keeps it.
|
|
85
|
-
clientSecret: client.source === "constants" ? client.clientSecret : void 0,
|
|
86
|
-
clientSource: client.source,
|
|
87
|
-
accessToken: tokens.accessToken,
|
|
88
|
-
refreshToken: tokens.refreshToken,
|
|
89
|
-
expiresAt: tokens.expiresAt,
|
|
90
|
-
scopes: tokens.scopes,
|
|
91
|
-
tokenType: tokens.tokenType
|
|
92
|
-
})), "encode")
|
|
93
|
-
}), "standardCodec");
|
|
94
|
-
var googleStandard = standardCodec("google");
|
|
95
|
-
var keyringFailure = /* @__PURE__ */ __name((thrown, secret) => {
|
|
96
|
-
const failure = new CliError("configuration_error", "could not reach the saved sign-in; use an available keyring or file storage", { reason: "oauth.not-saved" });
|
|
97
|
-
const words = thrown instanceof Error ? thrown.message : String(thrown);
|
|
98
|
-
failure.cause = new Error(secret ? words.replaceAll(secret, "[secret]") : words);
|
|
99
|
-
return failure;
|
|
100
|
-
}, "keyringFailure");
|
|
101
|
-
var credentialStorage = /* @__PURE__ */ __name((options) => {
|
|
102
|
-
if (!options.credentials.keyring)
|
|
103
|
-
throw new CliError("configuration_error", "a sign-in store needs its keyring passed in, never a default");
|
|
104
|
-
const credentials = new Credentials(options.credentials);
|
|
105
|
-
const { account, codec } = options;
|
|
106
|
-
const moved = options.credentials.isolated === true || options.credentials.keyring === systemKeyring && isMovedRun({ appName: options.credentials.service, env: options.credentials.env ?? process.env });
|
|
107
|
-
const service = keyringService(options.credentials.service, options.credentials.configDir, options.credentials.isolated);
|
|
108
|
-
const raw = /* @__PURE__ */ __name((name) => {
|
|
109
|
-
try {
|
|
110
|
-
return credentials.read(name)?.secret;
|
|
111
|
-
} catch (error) {
|
|
112
|
-
if (error instanceof CliError)
|
|
113
|
-
throw error;
|
|
114
|
-
throw keyringFailure(error);
|
|
115
|
-
}
|
|
116
|
-
}, "raw");
|
|
117
|
-
const fallsBack = options.credentials.storage !== "keyring";
|
|
118
|
-
const replaced = /* @__PURE__ */ __name((name) => {
|
|
119
|
-
try {
|
|
120
|
-
return raw(name);
|
|
121
|
-
} catch (error) {
|
|
122
|
-
if (fallsBack && error instanceof CliError && error.details.reason === "keyring.unreachable")
|
|
123
|
-
return void 0;
|
|
124
|
-
throw error;
|
|
125
|
-
}
|
|
126
|
-
}, "replaced");
|
|
127
|
-
const save = /* @__PURE__ */ __name((value, writeOptions) => {
|
|
128
|
-
try {
|
|
129
|
-
credentials.write(account, value, writeOptions);
|
|
130
|
-
} catch (error) {
|
|
131
|
-
throw keyringFailure(error, value);
|
|
132
|
-
}
|
|
133
|
-
}, "save");
|
|
134
|
-
const current = /* @__PURE__ */ __name(() => {
|
|
135
|
-
const own = raw(account);
|
|
136
|
-
if (own !== void 0)
|
|
137
|
-
return own;
|
|
138
|
-
for (const legacy of options.legacyAccounts ?? []) {
|
|
139
|
-
const found = raw(legacy);
|
|
140
|
-
if (found === void 0)
|
|
141
|
-
continue;
|
|
142
|
-
codec.decode(found);
|
|
143
|
-
if (!moved)
|
|
144
|
-
save(found);
|
|
145
|
-
return found;
|
|
146
|
-
}
|
|
147
|
-
return void 0;
|
|
148
|
-
}, "current");
|
|
149
|
-
return {
|
|
150
|
-
key: `${service}\0${account}`,
|
|
151
|
-
moved,
|
|
152
|
-
...codec.rotating ? { rotating: true } : {},
|
|
153
|
-
probe: /* @__PURE__ */ __name(() => {
|
|
154
|
-
replaced(account);
|
|
155
|
-
}, "probe"),
|
|
156
|
-
read: /* @__PURE__ */ __name(() => {
|
|
157
|
-
const value = current();
|
|
158
|
-
return value === void 0 ? void 0 : codec.decode(value);
|
|
159
|
-
}, "read"),
|
|
160
|
-
write: /* @__PURE__ */ __name((input, writeOptions) => save(codec.encode({ ...input, previous: replaced(account), ...writeOptions?.signIn ? { signIn: true } : {} }), writeOptions), "write"),
|
|
161
|
-
remove: /* @__PURE__ */ __name(() => {
|
|
162
|
-
try {
|
|
163
|
-
return credentials.remove(account);
|
|
164
|
-
} catch (error) {
|
|
165
|
-
throw keyringFailure(error);
|
|
166
|
-
}
|
|
167
|
-
}, "remove")
|
|
168
|
-
};
|
|
169
|
-
}, "credentialStorage");
|
|
170
|
-
|
|
171
|
-
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/oauth/authorize.js
|
|
172
|
-
import { createHash, randomBytes } from "node:crypto";
|
|
173
|
-
import { createServer } from "node:http";
|
|
174
|
-
var DEFAULT_TIMEOUT_MS = 3e5;
|
|
175
|
-
var pkce = /* @__PURE__ */ __name(() => {
|
|
176
|
-
const codeVerifier = randomBytes(48).toString("base64url");
|
|
177
|
-
return { codeVerifier, codeChallenge: createHash("sha256").update(codeVerifier).digest("base64url") };
|
|
178
|
-
}, "pkce");
|
|
179
|
-
var queryOf = /* @__PURE__ */ __name((text2) => {
|
|
180
|
-
const trimmed = text2.trim();
|
|
181
|
-
const start = trimmed.indexOf("?");
|
|
182
|
-
return new URLSearchParams(start >= 0 ? trimmed.slice(start + 1).split("#")[0] : trimmed);
|
|
183
|
-
}, "queryOf");
|
|
184
|
-
var authorize = /* @__PURE__ */ __name(async (options) => {
|
|
185
|
-
const { provider } = options;
|
|
186
|
-
const cancelled = /* @__PURE__ */ __name(() => isCliError(options.signal?.reason) ? options.signal.reason : new CliError("cancelled", `${provider.name} sign-in was cancelled`), "cancelled");
|
|
187
|
-
if (options.signal?.aborted)
|
|
188
|
-
throw cancelled();
|
|
189
|
-
const { codeVerifier, codeChallenge } = pkce();
|
|
190
|
-
const paste = new AbortController();
|
|
191
|
-
let state = "";
|
|
192
|
-
let settled = false;
|
|
193
|
-
let accept = /* @__PURE__ */ __name(() => {
|
|
194
|
-
}, "accept");
|
|
195
|
-
let fail = /* @__PURE__ */ __name(() => {
|
|
196
|
-
}, "fail");
|
|
197
|
-
const code = new Promise((resolve, reject) => {
|
|
198
|
-
accept = /* @__PURE__ */ __name((value) => {
|
|
199
|
-
settled = true;
|
|
200
|
-
resolve(value);
|
|
201
|
-
}, "accept");
|
|
202
|
-
fail = /* @__PURE__ */ __name((error) => {
|
|
203
|
-
settled = true;
|
|
204
|
-
reject(error);
|
|
205
|
-
}, "fail");
|
|
206
|
-
});
|
|
207
|
-
void code.catch(() => {
|
|
208
|
-
});
|
|
209
|
-
const settle = /* @__PURE__ */ __name((query) => {
|
|
210
|
-
const value = query.get("code");
|
|
211
|
-
if (value)
|
|
212
|
-
accept(value);
|
|
213
|
-
else
|
|
214
|
-
fail(new CliError("authentication_error", `${provider.name} sign-in was declined`, { reason: "oauth.declined" }));
|
|
215
|
-
}, "settle");
|
|
216
|
-
const handler = /* @__PURE__ */ __name((request, response) => {
|
|
217
|
-
let url;
|
|
218
|
-
try {
|
|
219
|
-
url = new URL(request.url ?? "/", "http://127.0.0.1");
|
|
220
|
-
} catch {
|
|
221
|
-
response.writeHead(400).end();
|
|
222
|
-
return;
|
|
223
|
-
}
|
|
224
|
-
if (request.method !== "GET" || url.pathname !== "/callback") {
|
|
225
|
-
response.writeHead(404).end();
|
|
226
|
-
return;
|
|
227
|
-
}
|
|
228
|
-
if (settled || !state || url.searchParams.get("state") !== state) {
|
|
229
|
-
response.writeHead(400).end("This sign-in link does not belong to the waiting sign-in");
|
|
230
|
-
return;
|
|
231
|
-
}
|
|
232
|
-
if (!url.searchParams.get("code") && !url.searchParams.get("error")) {
|
|
233
|
-
response.writeHead(400).end("Missing sign-in result");
|
|
234
|
-
return;
|
|
235
|
-
}
|
|
236
|
-
response.end("Sign-in received; you can close this tab");
|
|
237
|
-
settle(url.searchParams);
|
|
238
|
-
}, "handler");
|
|
239
|
-
const server = createServer(handler);
|
|
240
|
-
const localhost = provider.redirect.kind === "loopback" && provider.redirect.host === "localhost";
|
|
241
|
-
const server6 = localhost ? createServer(handler) : void 0;
|
|
242
|
-
const onAbort = /* @__PURE__ */ __name(() => fail(cancelled()), "onAbort");
|
|
243
|
-
options.signal?.addEventListener("abort", onAbort, { once: true });
|
|
244
|
-
const timer = setTimeout(() => fail(new CliError("timeout", `${provider.name} sign-in timed out`, { reason: "oauth.timeout" })), options.timeoutMs ?? DEFAULT_TIMEOUT_MS);
|
|
245
|
-
try {
|
|
246
|
-
await new Promise((resolve, reject) => {
|
|
247
|
-
server.once("error", reject);
|
|
248
|
-
server.listen(0, "127.0.0.1", resolve);
|
|
249
|
-
});
|
|
250
|
-
const address = server.address();
|
|
251
|
-
if (!address || typeof address === "string")
|
|
252
|
-
throw new CliError("configuration_error", "could not start the local sign-in listener");
|
|
253
|
-
if (server6) {
|
|
254
|
-
server6.on("error", () => {
|
|
255
|
-
});
|
|
256
|
-
await new Promise((resolve) => {
|
|
257
|
-
server6.once("error", () => resolve());
|
|
258
|
-
server6.listen(address.port, "::1", () => resolve());
|
|
259
|
-
});
|
|
260
|
-
}
|
|
261
|
-
const random = randomBytes(32).toString("base64url");
|
|
262
|
-
const relay = provider.redirect.kind === "relay";
|
|
263
|
-
state = relay ? `${address.port}.${random}` : random;
|
|
264
|
-
const redirectUri = provider.redirect.kind === "relay" ? provider.redirect.url : `http://${localhost ? "localhost" : "127.0.0.1"}:${address.port}/callback`;
|
|
265
|
-
const url = new URL(provider.authorizeUrl);
|
|
266
|
-
for (const [key, value] of Object.entries({
|
|
267
|
-
...provider.authorizeParams,
|
|
268
|
-
response_type: "code",
|
|
269
|
-
client_id: provider.client.clientId,
|
|
270
|
-
redirect_uri: redirectUri,
|
|
271
|
-
...options.scopes.length ? { scope: options.scopes.join(" ") } : {},
|
|
272
|
-
state,
|
|
273
|
-
code_challenge: codeChallenge,
|
|
274
|
-
code_challenge_method: "S256"
|
|
275
|
-
}))
|
|
276
|
-
url.searchParams.set(key, value);
|
|
277
|
-
options.showUrl?.(url.toString());
|
|
278
|
-
options.readPaste?.(paste.signal).then((text2) => {
|
|
279
|
-
if (settled)
|
|
280
|
-
return;
|
|
281
|
-
const query = queryOf(text2);
|
|
282
|
-
if (query.get("state") !== state || !query.get("code") && !query.get("error"))
|
|
283
|
-
fail(new CliError("authentication_error", "the pasted sign-in result does not match this sign-in", {
|
|
284
|
-
reason: "oauth.mismatch"
|
|
285
|
-
}));
|
|
286
|
-
else
|
|
287
|
-
settle(query);
|
|
288
|
-
}).catch(() => {
|
|
289
|
-
});
|
|
290
|
-
void Promise.resolve().then(() => options.openBrowser(url.toString())).catch(() => {
|
|
291
|
-
if (!options.readPaste && !options.showUrl)
|
|
292
|
-
fail(new CliError("configuration_error", "could not open the browser, and no sign-in link can be shown"));
|
|
293
|
-
});
|
|
294
|
-
return { code: await code, redirectUri, codeVerifier };
|
|
295
|
-
} finally {
|
|
296
|
-
clearTimeout(timer);
|
|
297
|
-
options.signal?.removeEventListener("abort", onAbort);
|
|
298
|
-
paste.abort();
|
|
299
|
-
for (const each of server6 ? [server, server6] : [server]) {
|
|
300
|
-
each.closeAllConnections();
|
|
301
|
-
if (each.listening)
|
|
302
|
-
await new Promise((resolve) => each.close(() => resolve()));
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
}, "authorize");
|
|
306
|
-
|
|
307
|
-
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/oauth/requests.js
|
|
308
|
-
var REQUEST_LIMIT_MS = 3e4;
|
|
309
|
-
var TOKEN_LOG_EVENT = "oauth.token";
|
|
310
|
-
var object = /* @__PURE__ */ __name((value) => {
|
|
311
|
-
if (typeof value !== "object" || value === null || Array.isArray(value))
|
|
312
|
-
throw new Error("not an object");
|
|
313
|
-
return value;
|
|
314
|
-
}, "object");
|
|
315
|
-
var requestSignal = /* @__PURE__ */ __name((deadline, signal) => signal ? AbortSignal.any([signal, deadline]) : deadline, "requestSignal");
|
|
316
|
-
var cancelledBy = /* @__PURE__ */ __name((signal) => {
|
|
317
|
-
if (!signal?.aborted)
|
|
318
|
-
return;
|
|
319
|
-
throw isCliError(signal.reason) ? signal.reason : new CliError("cancelled", "sign-in was cancelled");
|
|
320
|
-
}, "cancelledBy");
|
|
321
|
-
var TRANSIENT = /* @__PURE__ */ new Set([
|
|
322
|
-
"EAI_AGAIN",
|
|
323
|
-
"ENOTFOUND",
|
|
324
|
-
"ECONNRESET",
|
|
325
|
-
"ECONNREFUSED",
|
|
326
|
-
"ETIMEDOUT",
|
|
327
|
-
"EPIPE",
|
|
328
|
-
"UND_ERR_SOCKET"
|
|
329
|
-
]);
|
|
330
|
-
var ATTEMPTS = 3;
|
|
331
|
-
var transientNetworkError = /* @__PURE__ */ __name((error) => {
|
|
332
|
-
if (isCliError(error))
|
|
333
|
-
return error.code === "network_error";
|
|
334
|
-
for (let at = error, depth = 0; at instanceof Error && depth < 4; at = at.cause, depth++) {
|
|
335
|
-
const code = at.code;
|
|
336
|
-
if (typeof code === "string" && TRANSIENT.has(code))
|
|
337
|
-
return true;
|
|
338
|
-
}
|
|
339
|
-
return false;
|
|
340
|
-
}, "transientNetworkError");
|
|
341
|
-
var post = /* @__PURE__ */ __name(async (url, body, context, deadline) => {
|
|
342
|
-
const signal = requestSignal(deadline, context.signal);
|
|
343
|
-
for (let attempt = 1; ; attempt++) {
|
|
344
|
-
cancelledBy(context.signal);
|
|
345
|
-
try {
|
|
346
|
-
return await context.fetch(url, {
|
|
347
|
-
method: "POST",
|
|
348
|
-
headers: { "content-type": "application/x-www-form-urlencoded", accept: "application/json" },
|
|
349
|
-
body,
|
|
350
|
-
signal,
|
|
351
|
-
redirect: "error"
|
|
352
|
-
});
|
|
353
|
-
} catch (error) {
|
|
354
|
-
cancelledBy(context.signal);
|
|
355
|
-
if (attempt >= ATTEMPTS || signal.aborted || !transientNetworkError(error))
|
|
356
|
-
return void 0;
|
|
357
|
-
const waited = await realSleep(500 * attempt, signal).then(() => true, () => false);
|
|
358
|
-
cancelledBy(context.signal);
|
|
359
|
-
if (!waited)
|
|
360
|
-
return void 0;
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
}, "post");
|
|
364
|
-
var clientFields = /* @__PURE__ */ __name(({ client }) => ({
|
|
365
|
-
client_id: client.clientId,
|
|
366
|
-
...client.clientSecret ? { client_secret: client.clientSecret } : {}
|
|
367
|
-
}), "clientFields");
|
|
368
|
-
var requestTokens = /* @__PURE__ */ __name((provider, params, context) => withTimeLimit(REQUEST_LIMIT_MS, (deadline) => exchangeTokens(provider, params, context, deadline)), "requestTokens");
|
|
369
|
-
var exchangeTokens = /* @__PURE__ */ __name(async (provider, params, context, deadline) => {
|
|
370
|
-
const operation = params.grant_type ?? "unknown";
|
|
371
|
-
const record = /* @__PURE__ */ __name((level, fields) => context.log?.[level]({ event: TOKEN_LOG_EVENT, provider: provider.id, operation, pid: process.pid, ...fields }), "record");
|
|
372
|
-
const again = `run ${context.signInCommand} again`;
|
|
373
|
-
const response = await post(provider.tokenUrl, new URLSearchParams({ ...params, ...clientFields(context) }), context, deadline);
|
|
374
|
-
if (!response) {
|
|
375
|
-
record("warn", { outcome: "no_response" });
|
|
376
|
-
throw new CliError("outcome_unknown", `${provider.name} token request did not finish; ${again} if it keeps failing`, {
|
|
377
|
-
reason: "oauth.no-response"
|
|
378
|
-
});
|
|
379
|
-
}
|
|
380
|
-
if (!response.ok) {
|
|
381
|
-
record("warn", { outcome: "rejected", status: response.status });
|
|
382
|
-
if (response.status === 429 || response.status >= 500)
|
|
383
|
-
throw new CliError("provider_unavailable", `${provider.name} token request failed (HTTP ${response.status})`, {
|
|
384
|
-
status: response.status,
|
|
385
|
-
retryable: true,
|
|
386
|
-
reason: "oauth.unavailable"
|
|
387
|
-
});
|
|
388
|
-
throw new CliError("authentication_error", `${provider.name} sign-in was refused (HTTP ${response.status}); ${again}`, {
|
|
389
|
-
status: response.status,
|
|
390
|
-
reason: "oauth.expired"
|
|
391
|
-
});
|
|
392
|
-
}
|
|
393
|
-
let body;
|
|
394
|
-
try {
|
|
395
|
-
body = object(await response.json());
|
|
396
|
-
} catch {
|
|
397
|
-
record("error", { outcome: "unreadable_response", status: response.status });
|
|
398
|
-
throw new CliError("invalid_response", `${provider.name} returned an unreadable token response; ${again}`, {
|
|
399
|
-
reason: "oauth.invalid-response"
|
|
400
|
-
});
|
|
401
|
-
}
|
|
402
|
-
const previous = context.previous;
|
|
403
|
-
const refreshToken = typeof body.refresh_token === "string" && body.refresh_token ? body.refresh_token : previous?.refreshToken;
|
|
404
|
-
const expiresIn = body.expires_in;
|
|
405
|
-
if (typeof body.access_token !== "string" || !body.access_token || expiresIn !== void 0 && (typeof expiresIn !== "number" || !Number.isFinite(expiresIn) || expiresIn <= 0) || body.scope !== void 0 && typeof body.scope !== "string" || body.token_type !== void 0 && typeof body.token_type !== "string") {
|
|
406
|
-
record("error", { outcome: "invalid_response", status: response.status });
|
|
407
|
-
throw new CliError("invalid_response", `${provider.name} returned an invalid token response; ${again}`, {
|
|
408
|
-
reason: "oauth.invalid-response"
|
|
409
|
-
});
|
|
410
|
-
}
|
|
411
|
-
if (!refreshToken) {
|
|
412
|
-
record("error", { outcome: "no_refresh_token", status: response.status });
|
|
413
|
-
throw new CliError("authentication_error", `${provider.name} returned no offline refresh token; ${again}`, {
|
|
414
|
-
reason: "oauth.failed"
|
|
415
|
-
});
|
|
416
|
-
}
|
|
417
|
-
const scopes = typeof body.scope === "string" ? body.scope.split(/\s+/).filter(Boolean) : previous?.scopes ?? [];
|
|
418
|
-
const tokenType = typeof body.token_type === "string" ? body.token_type : previous?.tokenType;
|
|
419
|
-
record("info", {
|
|
420
|
-
outcome: "received",
|
|
421
|
-
status: response.status,
|
|
422
|
-
...previous ? { rotated: refreshToken !== previous.refreshToken } : {}
|
|
423
|
-
});
|
|
424
|
-
return {
|
|
425
|
-
accessToken: body.access_token,
|
|
426
|
-
refreshToken,
|
|
427
|
-
...typeof expiresIn === "number" ? { expiresAt: context.now() + expiresIn * 1e3 } : {},
|
|
428
|
-
scopes,
|
|
429
|
-
...tokenType ? { tokenType } : {}
|
|
430
|
-
};
|
|
431
|
-
}, "exchangeTokens");
|
|
432
|
-
var alreadyRevoked = /* @__PURE__ */ __name(async (response) => {
|
|
433
|
-
if (response.status !== 400)
|
|
434
|
-
return false;
|
|
435
|
-
try {
|
|
436
|
-
return object(JSON.parse(await response.text())).error === "invalid_token";
|
|
437
|
-
} catch {
|
|
438
|
-
return false;
|
|
439
|
-
}
|
|
440
|
-
}, "alreadyRevoked");
|
|
441
|
-
var revokeToken = /* @__PURE__ */ __name(async (provider, tokens, context) => {
|
|
442
|
-
if (provider.revoke)
|
|
443
|
-
return provider.revoke(tokens, context);
|
|
444
|
-
if (!provider.revokeUrl)
|
|
445
|
-
throw new CliError("validation_error", `${provider.name} declares no way to revoke a sign-in`);
|
|
446
|
-
const { revokeUrl } = provider;
|
|
447
|
-
const form = new URLSearchParams({ token: tokens.refreshToken, ...clientFields(context) });
|
|
448
|
-
const { response, gone } = await withTimeLimit(REQUEST_LIMIT_MS, async (deadline) => {
|
|
449
|
-
const response2 = await post(revokeUrl, form, context, deadline);
|
|
450
|
-
return { response: response2, gone: response2 ? await alreadyRevoked(response2) : false };
|
|
451
|
-
});
|
|
452
|
-
const done = response?.ok || gone;
|
|
453
|
-
context.log?.[done ? "info" : "warn"]({
|
|
454
|
-
event: TOKEN_LOG_EVENT,
|
|
455
|
-
provider: provider.id,
|
|
456
|
-
operation: "revoke",
|
|
457
|
-
pid: process.pid,
|
|
458
|
-
outcome: response?.ok ? "revoked" : gone ? "already_revoked" : response ? "rejected" : "no_response",
|
|
459
|
-
...response ? { status: response.status } : {}
|
|
460
|
-
});
|
|
461
|
-
if (!done)
|
|
462
|
-
throw new CliError("outcome_unknown", `${provider.name} did not confirm the revoke`, {
|
|
463
|
-
reason: "oauth.revoke-failed",
|
|
464
|
-
...response ? { status: response.status } : {}
|
|
465
|
-
});
|
|
466
|
-
}, "revokeToken");
|
|
467
|
-
|
|
468
|
-
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/oauth/keeper.js
|
|
469
|
-
import { createHash as createHash2 } from "node:crypto";
|
|
470
|
-
import { join } from "node:path";
|
|
471
|
-
import { setTimeout as delay } from "node:timers/promises";
|
|
472
|
-
var inFlight = /* @__PURE__ */ new Map();
|
|
473
|
-
var refreshedInMemory = /* @__PURE__ */ new Map();
|
|
474
|
-
var tokenKeeper = /* @__PURE__ */ __name((options) => {
|
|
475
|
-
const { provider, storage, signal, log } = options;
|
|
476
|
-
const now = options.now ?? Date.now;
|
|
477
|
-
const fresh = /* @__PURE__ */ __name((tokens2) => Boolean(tokens2.accessToken) && tokens2.expiresAt !== void 0 && tokens2.expiresAt > now() + (options.freshForMs ?? 6e4), "fresh");
|
|
478
|
-
const lockPath = join(options.lockDir, `oauth-${createHash2("sha256").update(storage.key).digest("hex").slice(0, 16)}.lock`);
|
|
479
|
-
const clientOf = /* @__PURE__ */ __name((stored) => {
|
|
480
|
-
const saved = stored?.client;
|
|
481
|
-
if (!saved || saved.clientSecret || saved.clientId !== provider.client.clientId)
|
|
482
|
-
return saved ?? provider.client;
|
|
483
|
-
return provider.client;
|
|
484
|
-
}, "clientOf");
|
|
485
|
-
const context = /* @__PURE__ */ __name((client, previous) => ({
|
|
486
|
-
fetch: options.fetch,
|
|
487
|
-
client,
|
|
488
|
-
now,
|
|
489
|
-
signInCommand: options.signInCommand,
|
|
490
|
-
...signal ? { signal } : {},
|
|
491
|
-
...log ? { log } : {},
|
|
492
|
-
...previous ? { previous } : {}
|
|
493
|
-
}), "context");
|
|
494
|
-
const exchange = /* @__PURE__ */ __name((params, ctx) => provider.exchange ? provider.exchange(params, ctx) : requestTokens(provider, params, ctx), "exchange");
|
|
495
|
-
const notSignedIn = /* @__PURE__ */ __name(() => new CliError("authentication_error", `not signed in to ${provider.name}; run ${options.signInCommand}`, {
|
|
496
|
-
reason: "session.missing"
|
|
497
|
-
}), "notSignedIn");
|
|
498
|
-
const busy = /* @__PURE__ */ __name((error) => isCliError(error) && error.details.reason === "file.locked", "busy");
|
|
499
|
-
const acquire = /* @__PURE__ */ __name(async () => {
|
|
500
|
-
const started = performance.now();
|
|
501
|
-
let waiting = false;
|
|
502
|
-
for (; ; ) {
|
|
503
|
-
try {
|
|
504
|
-
return await acquireLock(lockPath, signal ? { signal } : {});
|
|
505
|
-
} catch (error) {
|
|
506
|
-
if (!busy(error))
|
|
507
|
-
throw error;
|
|
508
|
-
if (!waiting) {
|
|
509
|
-
waiting = true;
|
|
510
|
-
log?.info({
|
|
511
|
-
event: TOKEN_LOG_EVENT,
|
|
512
|
-
provider: provider.id,
|
|
513
|
-
operation: "lock",
|
|
514
|
-
outcome: "waiting",
|
|
515
|
-
pid: process.pid
|
|
516
|
-
});
|
|
517
|
-
}
|
|
518
|
-
if (performance.now() - started > (options.lockWaitMs ?? 45e3))
|
|
519
|
-
throw new CliError("provider_unavailable", `another process holds this ${provider.name} sign-in; retry`, {
|
|
520
|
-
reason: "oauth.locked",
|
|
521
|
-
retryable: true
|
|
522
|
-
});
|
|
523
|
-
await delay(options.lockRetryMs ?? 50, void 0, signal ? { signal } : {}).catch(() => {
|
|
524
|
-
throw new CliError("cancelled", `${provider.name} sign-in was cancelled`);
|
|
525
|
-
});
|
|
526
|
-
}
|
|
527
|
-
}
|
|
528
|
-
}, "acquire");
|
|
529
|
-
const locked = /* @__PURE__ */ __name(async (work) => {
|
|
530
|
-
const lock = await acquire();
|
|
531
|
-
try {
|
|
532
|
-
return await work();
|
|
533
|
-
} finally {
|
|
534
|
-
await lock.release().catch(() => {
|
|
535
|
-
});
|
|
536
|
-
}
|
|
537
|
-
}, "locked");
|
|
538
|
-
const shared = /* @__PURE__ */ __name((work) => {
|
|
539
|
-
const running = inFlight.get(lockPath);
|
|
540
|
-
if (running)
|
|
541
|
-
return running;
|
|
542
|
-
const started = locked(work).finally(() => inFlight.delete(lockPath));
|
|
543
|
-
inFlight.set(lockPath, started);
|
|
544
|
-
return started;
|
|
545
|
-
}, "shared");
|
|
546
|
-
const remembered = /* @__PURE__ */ __name((saved) => {
|
|
547
|
-
const kept = refreshedInMemory.get(lockPath);
|
|
548
|
-
return kept && fresh(kept) && kept.refreshToken === saved.refreshToken ? kept : void 0;
|
|
549
|
-
}, "remembered");
|
|
550
|
-
const forget = /* @__PURE__ */ __name(() => refreshedInMemory.delete(lockPath), "forget");
|
|
551
|
-
let answered;
|
|
552
|
-
const answer = /* @__PURE__ */ __name((given) => {
|
|
553
|
-
answered = given;
|
|
554
|
-
return given;
|
|
555
|
-
}, "answer");
|
|
556
|
-
const tokens = /* @__PURE__ */ __name(async ({ refresh = false } = {}) => {
|
|
557
|
-
const seen = storage.read();
|
|
558
|
-
if (!seen)
|
|
559
|
-
throw notSignedIn();
|
|
560
|
-
if (!refresh) {
|
|
561
|
-
const kept = remembered(seen.tokens);
|
|
562
|
-
if (kept)
|
|
563
|
-
return answer(kept);
|
|
564
|
-
if (fresh(seen.tokens))
|
|
565
|
-
return answer(seen.tokens);
|
|
566
|
-
}
|
|
567
|
-
const refused = answered ?? remembered(seen.tokens) ?? seen.tokens;
|
|
568
|
-
return answer(await shared(async () => {
|
|
569
|
-
const current = storage.read();
|
|
570
|
-
if (!current)
|
|
571
|
-
throw notSignedIn();
|
|
572
|
-
const latest = remembered(current.tokens) ?? current.tokens;
|
|
573
|
-
if (refresh) {
|
|
574
|
-
if (latest.accessToken !== refused.accessToken && fresh(latest))
|
|
575
|
-
return latest;
|
|
576
|
-
} else {
|
|
577
|
-
if (latest !== current.tokens)
|
|
578
|
-
return latest;
|
|
579
|
-
if (fresh(current.tokens) || current.tokens.refreshToken !== seen.tokens.refreshToken)
|
|
580
|
-
return current.tokens;
|
|
581
|
-
}
|
|
582
|
-
if (storage.moved && storage.rotating)
|
|
583
|
-
throw new CliError("authentication_error", `the sign-in to ${provider.name} needs a refresh, which a run with moved folders never makes: the provider rotates its refresh token, and the owner's own sign-in would keep a dead one; run this in the normal run, or sign in again there`, { reason: "oauth.moved-rotating" });
|
|
584
|
-
const client = clientOf(current);
|
|
585
|
-
const refreshed = await exchange({ grant_type: "refresh_token", refresh_token: current.tokens.refreshToken }, context(client, current.tokens));
|
|
586
|
-
if (storage.moved && refreshed.refreshToken === current.tokens.refreshToken)
|
|
587
|
-
refreshedInMemory.set(lockPath, refreshed);
|
|
588
|
-
else
|
|
589
|
-
storage.write({ tokens: refreshed, client });
|
|
590
|
-
return refreshed;
|
|
591
|
-
}));
|
|
592
|
-
}, "tokens");
|
|
593
|
-
return {
|
|
594
|
-
tokens,
|
|
595
|
-
accessToken: /* @__PURE__ */ __name(async (tokensOptions) => {
|
|
596
|
-
const current = await tokens(tokensOptions);
|
|
597
|
-
if (!current.accessToken)
|
|
598
|
-
throw notSignedIn();
|
|
599
|
-
return current.accessToken;
|
|
600
|
-
}, "accessToken"),
|
|
601
|
-
signIn: /* @__PURE__ */ __name(async ({ accept, ...authorizeOptions }) => {
|
|
602
|
-
storage.probe();
|
|
603
|
-
const authorization = await authorize({ ...authorizeOptions, provider, ...signal ? { signal } : {} });
|
|
604
|
-
const client = provider.client;
|
|
605
|
-
const received = await exchange({
|
|
606
|
-
grant_type: "authorization_code",
|
|
607
|
-
code: authorization.code,
|
|
608
|
-
redirect_uri: authorization.redirectUri,
|
|
609
|
-
code_verifier: authorization.codeVerifier
|
|
610
|
-
}, context(client));
|
|
611
|
-
const extra = await accept?.(received) ?? void 0;
|
|
612
|
-
await locked(async () => {
|
|
613
|
-
forget();
|
|
614
|
-
storage.write({ tokens: received, client, ...extra ? { extra } : {} }, { signIn: true });
|
|
615
|
-
});
|
|
616
|
-
return { scopes: received.scopes };
|
|
617
|
-
}, "signIn"),
|
|
618
|
-
save: /* @__PURE__ */ __name((saved, extra) => locked(async () => {
|
|
619
|
-
forget();
|
|
620
|
-
storage.write({ tokens: saved, client: clientOf(storage.read()), ...extra ? { extra } : {} }, { signIn: true });
|
|
621
|
-
}), "save"),
|
|
622
|
-
signOut: /* @__PURE__ */ __name(({ revoke = false } = {}) => locked(async () => {
|
|
623
|
-
forget();
|
|
624
|
-
const current = storage.read();
|
|
625
|
-
let revoked = false;
|
|
626
|
-
if (revoke && current) {
|
|
627
|
-
await revokeToken(provider, current.tokens, context(clientOf(current)));
|
|
628
|
-
revoked = true;
|
|
629
|
-
}
|
|
630
|
-
return { revoked, removed: storage.remove() };
|
|
631
|
-
}), "signOut")
|
|
632
|
-
};
|
|
633
|
-
}, "tokenKeeper");
|
|
634
|
-
|
|
635
|
-
export {
|
|
636
|
-
tokenKeeper,
|
|
637
|
-
oauthAccount,
|
|
638
|
-
standardCodec,
|
|
639
|
-
credentialStorage
|
|
640
|
-
};
|