@wirecat/drive-cli 0.71.0 → 0.72.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 +150 -71
- package/contracts/wirecat.json +77 -8
- package/dist/bin/drive.js +2 -2
- package/dist/bundle/agent-GOCD4ZW2.js +46 -0
- package/dist/bundle/{all-profiles-3QJG2NAN.js → all-profiles-PZVP3G73.js} +67 -25
- package/dist/bundle/{anthropic-PSWTEU6G.js → anthropic-PUOTKSYV.js} +9 -9
- package/dist/bundle/{app-server-PVTA6ABR.js → app-server-MKDCXRZM.js} +97 -79
- package/dist/bundle/{bun-LU5LP3JI.js → bun-NS5YLOQT.js} +2 -2
- package/dist/bundle/{bun-sqlite-PYMKLBRU.js → bun-sqlite-KSKWRLLO.js} +9 -9
- package/dist/bundle/{chunk-COOOO5B3.js → chunk-2CG3LUQS.js} +4 -4
- package/dist/bundle/{chunk-YVI5SQPY.js → chunk-2TVHFJKV.js} +1 -1
- package/dist/bundle/chunk-35FIJGTT.js +52 -0
- package/dist/bundle/chunk-35GROSBS.js +3233 -0
- package/dist/bundle/{chunk-D5TGYUVU.js → chunk-3CH7I452.js} +9 -60
- package/dist/bundle/{chunk-ICDCAQ6K.js → chunk-3QBRS3JT.js} +13 -9
- package/dist/bundle/chunk-3T7JIHSO.js +353 -0
- package/dist/bundle/{chunk-Q7DOMFJ4.js → chunk-3VIEGRBA.js} +6 -6
- package/dist/bundle/chunk-3YCUYFTD.js +2159 -0
- package/dist/bundle/{chunk-CJLVYIOP.js → chunk-3ZGWJYSG.js} +30 -21
- package/dist/bundle/{chunk-YPFWNVHV.js → chunk-43PCMVTZ.js} +2 -100
- package/dist/bundle/{chunk-OF422U5D.js → chunk-4DK55MLP.js} +402 -402
- package/dist/bundle/chunk-4HP6KGBI.js +32 -0
- package/dist/bundle/chunk-4P6D6CUS.js +282 -0
- package/dist/bundle/chunk-4ZAQMDLD.js +1308 -0
- package/dist/bundle/chunk-4ZTB7LS3.js +87 -0
- package/dist/bundle/{chunk-6W763DZN.js → chunk-54O5NJRC.js} +14 -13
- package/dist/bundle/{chunk-MNLL5YLM.js → chunk-5BHP4FVM.js} +2 -2
- package/dist/bundle/{chunk-ACUAV6VX.js → chunk-6JU4KLAZ.js} +108 -72
- package/dist/bundle/{chunk-YMJ6IDGT.js → chunk-6KND2DYT.js} +38 -8
- package/dist/bundle/{chunk-4HWJOU7N.js → chunk-7YPZPJTB.js} +1 -1
- package/dist/bundle/chunk-A5XNUMW7.js +108 -0
- package/dist/bundle/{chunk-X4TIMMKJ.js → chunk-AG34MPVN.js} +1 -1
- package/dist/bundle/chunk-B5V2U7IS.js +221 -0
- package/dist/bundle/chunk-B6JC5RS3.js +696 -0
- package/dist/bundle/chunk-BDZXGDGI.js +80 -0
- package/dist/bundle/{chunk-B5KSXHJ7.js → chunk-BMTMGMGE.js} +1 -1
- package/dist/bundle/{chunk-ZCR3IRZ2.js → chunk-CP2TZXAG.js} +16 -9
- package/dist/bundle/{chunk-TAUBRNC5.js → chunk-DOEP4EPW.js} +72 -59
- package/dist/bundle/chunk-DQSOYH6N.js +20 -0
- package/dist/bundle/{chunk-QETR5HIZ.js → chunk-E2TMWONO.js} +4385 -2684
- package/dist/bundle/chunk-E5EYJU5R.js +7 -0
- package/dist/bundle/chunk-ECYOTDJM.js +14 -0
- package/dist/bundle/{chunk-HL52XXZX.js → chunk-EXHTGQR2.js} +3 -4
- package/dist/bundle/chunk-F4BX7TH2.js +15 -0
- package/dist/bundle/{chunk-ASMMG72J.js → chunk-FJQO5OHR.js} +261 -565
- package/dist/bundle/{chunk-RJOQH5YY.js → chunk-FKP4T7A4.js} +111 -859
- package/dist/bundle/{chunk-JDV7HNNQ.js → chunk-FTL3WXZB.js} +13 -26
- package/dist/bundle/{chunk-FP54WSIR.js → chunk-G2CH4FRW.js} +4 -4
- package/dist/bundle/chunk-G2KKMQRN.js +30 -0
- package/dist/bundle/{chunk-NYECVHFH.js → chunk-G4NHRFS7.js} +755 -0
- package/dist/bundle/{chunk-Y2NWGNUB.js → chunk-G7SKXAVZ.js} +5 -5
- package/dist/bundle/{chunk-FT3LN3HP.js → chunk-GFI3UUIU.js} +1 -1
- package/dist/bundle/chunk-GTPPUBYU.js +1876 -0
- package/dist/bundle/{chunk-QFR2PNJN.js → chunk-GTROGY74.js} +12 -12
- package/dist/bundle/{chunk-UTO2GO4P.js → chunk-GYAPDUF5.js} +45 -66
- package/dist/bundle/{chunk-GBKNJWOZ.js → chunk-HCMEU7AF.js} +8 -8
- package/dist/bundle/{chunk-FJH7DJWK.js → chunk-HDGJ7IDE.js} +6 -6
- package/dist/bundle/{chunk-Z3KUSRCF.js → chunk-HMN26CVU.js} +2 -2
- package/dist/bundle/{chunk-I4RWW3UD.js → chunk-HOICQNJX.js} +20 -5
- package/dist/bundle/{chunk-P7CUM5IB.js → chunk-HPS2YGSZ.js} +1 -1
- package/dist/bundle/{chunk-HMS6EEQL.js → chunk-HSASPXRW.js} +3 -3
- package/dist/bundle/{chunk-KGYVHPGE.js → chunk-IABPGOMT.js} +2 -2
- package/dist/bundle/{chunk-4QNW4NK6.js → chunk-IBQZT2YD.js} +1 -1
- package/dist/bundle/{chunk-PRW6SYA3.js → chunk-IE3R46YN.js} +313 -257
- package/dist/bundle/{chunk-7PDHGZN4.js → chunk-IE6O7463.js} +4 -4
- package/dist/bundle/{chunk-3UGYFXH6.js → chunk-IPBYU43F.js} +192 -379
- package/dist/bundle/{chunk-RWDKMU74.js → chunk-IS7STZEB.js} +3 -3
- package/dist/bundle/{chunk-GOWXXYEF.js → chunk-IV77ZFF4.js} +4 -4
- package/dist/bundle/{chunk-6XFIITOG.js → chunk-JDGF3YYS.js} +4811 -3486
- package/dist/bundle/{chunk-GPQ44Y2R.js → chunk-JHAACT4I.js} +2 -2
- package/dist/bundle/{chunk-SERXSCN3.js → chunk-JRED7BNX.js} +337 -390
- package/dist/bundle/{chunk-MIA7P6FZ.js → chunk-JSYUB4SM.js} +6 -6
- package/dist/bundle/{chunk-RESDD3Q4.js → chunk-JVM75M4H.js} +16 -3
- package/dist/bundle/{chunk-XF4EXO2C.js → chunk-JZ65CQWK.js} +6 -6
- package/dist/bundle/{chunk-QNRRK3CN.js → chunk-KBR7OC5S.js} +2 -2
- package/dist/bundle/chunk-KI6OOW6D.js +123 -0
- package/dist/bundle/chunk-KOI5G7NM.js +388 -0
- package/dist/bundle/{chunk-ZZ32DXTH.js → chunk-KPBUJQKT.js} +1 -1
- package/dist/bundle/{chunk-2LHAVY4U.js → chunk-KVBGIZ2C.js} +1 -1
- package/dist/bundle/chunk-L7P3LUDQ.js +286 -0
- package/dist/bundle/{chunk-SAKO3P4H.js → chunk-LKUWH6KU.js} +1 -1
- package/dist/bundle/chunk-MA6U4XH2.js +36 -0
- package/dist/bundle/{chunk-TAFHYHKA.js → chunk-MA7ETVTZ.js} +43 -186
- package/dist/bundle/{chunk-KYKW2W6X.js → chunk-MDJUYCHT.js} +1 -1
- package/dist/bundle/chunk-MEYYH47C.js +25 -0
- package/dist/bundle/{chunk-Z56QFOBR.js → chunk-MGC2BAD2.js} +1 -1
- package/dist/bundle/chunk-NMQRSEZM.js +37 -0
- package/dist/bundle/{chunk-5DPV7X27.js → chunk-NTZWY5R3.js} +321 -0
- package/dist/bundle/{chunk-OJSBWP3F.js → chunk-OBDPKDGB.js} +69 -7
- package/dist/bundle/{chunk-WVDCCYS3.js → chunk-ODTBJGWQ.js} +17 -17
- package/dist/bundle/chunk-PB6ACIME.js +80 -0
- package/dist/bundle/{chunk-5D4AEUVA.js → chunk-PL5P7UKW.js} +434 -1
- package/dist/bundle/{chunk-72C4YOCH.js → chunk-PMAV3RNP.js} +7 -7
- package/dist/bundle/chunk-PSY67L73.js +783 -0
- package/dist/bundle/{chunk-6TNNT2MQ.js → chunk-PUVQOZ2N.js} +483 -176
- package/dist/bundle/{chunk-SDKQNOL5.js → chunk-QB7K6PIP.js} +6 -6
- package/dist/bundle/chunk-QK7GKFKB.js +188 -0
- package/dist/bundle/{chunk-4PA4DHYV.js → chunk-QMUWHKP5.js} +6 -6
- package/dist/bundle/chunk-QURQ2OU2.js +250 -0
- package/dist/bundle/{chunk-LXKYKRHD.js → chunk-R3EDZWXF.js} +8 -227
- package/dist/bundle/{chunk-KGERXYTV.js → chunk-RM4DO2WZ.js} +1 -1
- package/dist/bundle/chunk-S27UKJVL.js +730 -0
- package/dist/bundle/{chunk-22QQUKWA.js → chunk-S3SLDYTU.js} +1 -1
- package/dist/bundle/{chunk-FCS26CYQ.js → chunk-SAEBHENE.js} +4 -4
- package/dist/bundle/chunk-SM7Z2BQF.js +561 -0
- package/dist/bundle/{chunk-QXC6IEH6.js → chunk-SODB63MR.js} +201 -423
- package/dist/bundle/{chunk-2PUNKUYJ.js → chunk-SSFGSY77.js} +10320 -9907
- package/dist/bundle/{chunk-37MAA6F2.js → chunk-STUPCKAA.js} +11 -2221
- package/dist/bundle/{chunk-BKSQBBYG.js → chunk-SUQT4KI2.js} +9 -9
- package/dist/bundle/{chunk-YPNWIB6H.js → chunk-SWQDKO6D.js} +3 -3
- package/dist/bundle/chunk-SZ7XJZGH.js +2231 -0
- package/dist/bundle/{chunk-3N2OFXB5.js → chunk-T3OK6AYZ.js} +5 -5
- package/dist/bundle/{chunk-HKY7X6NY.js → chunk-TFIAD57H.js} +4 -4
- package/dist/bundle/chunk-TRYYWV7J.js +291 -0
- package/dist/bundle/{chunk-XMMFBPGC.js → chunk-TUL6MCTY.js} +3 -3
- package/dist/bundle/{chunk-6Y2BYFXQ.js → chunk-UC7JLE6J.js} +0 -7
- package/dist/bundle/{chunk-YJIGGUPI.js → chunk-UL5HSHFU.js} +4 -4
- package/dist/bundle/{chunk-3EBBLKIT.js → chunk-UT64BBEP.js} +4 -4
- package/dist/bundle/{chunk-26DHFMGZ.js → chunk-VBIZD5V5.js} +2 -2
- package/dist/bundle/chunk-VHTELRUA.js +50 -0
- package/dist/bundle/chunk-VOQICE3G.js +340 -0
- package/dist/bundle/{chunk-GZ2D4KXG.js → chunk-WDJRUNQN.js} +35 -12
- package/dist/bundle/{chunk-2UUWXPOB.js → chunk-X5CXANSA.js} +3 -3
- package/dist/bundle/{chunk-35SCQ4VI.js → chunk-X6HPQKAI.js} +43 -35
- package/dist/bundle/{chunk-COJSWDNU.js → chunk-XKWQDQ4B.js} +3 -3
- package/dist/bundle/{chunk-6SJOTNHF.js → chunk-XZEVHUKI.js} +6 -28
- package/dist/bundle/{chunk-JZHBZOJR.js → chunk-YE7DJB3F.js} +3 -3
- package/dist/bundle/chunk-YHWFF6DN.js +39 -0
- package/dist/bundle/{chunk-2BVVU7GG.js → chunk-YJVQ5GST.js} +1 -1
- package/dist/bundle/{chunk-ZM63SUHG.js → chunk-YRCGFSRR.js} +2 -2
- package/dist/bundle/{chunk-EOEU3AZN.js → chunk-ZNFXKFGF.js} +13 -13
- package/dist/bundle/{cli-556DERZL.js → cli-KXRWXGTS.js} +217 -114
- package/dist/bundle/command-contract-BGNT7MTQ.js +45 -0
- package/dist/bundle/{command-server-entry-AYLGNZWD.js → command-server-entry-7FZX74T6.js} +36 -34
- package/dist/bundle/{decode-QU24MWMN.js → decode-SZ6W34U3.js} +10 -10
- package/dist/bundle/{dispatch-4KODNOXV.js → dispatch-4KNSZ3PI.js} +10 -10
- package/dist/bundle/dist-PAKDDIBT.js +191 -0
- package/dist/bundle/drive.js +11 -11
- package/dist/bundle/{echarts-BXX4OQWC.js → echarts-ISH62J4E.js} +2 -2
- package/dist/bundle/{embed-KG27KG3D.js → embed-6ODGTZPK.js} +10 -10
- package/dist/bundle/{embedder-IPAVUQUV.js → embedder-6FY67FTQ.js} +15 -15
- package/dist/bundle/entry-2SA6ZX7E.js +25 -0
- package/dist/bundle/{failure-ESL7ETL4.js → failure-V3ILKUTX.js} +4 -4
- package/dist/bundle/first-run-ZNKPPD6M.js +31 -0
- package/dist/bundle/first-screen-WF6GYLPN.js +45 -0
- package/dist/bundle/google-QCADNPCQ.js +46 -0
- package/dist/bundle/{google-api-VCDBSNOW.js → google-api-ZTI3NKZX.js} +88 -73
- package/dist/bundle/grants-BPN5AGDK.js +133 -0
- package/dist/bundle/hast-util-from-html-X2DCPS3T.js +10531 -0
- package/dist/bundle/hast-util-to-html-VP6XLPKJ.js +998 -0
- package/dist/bundle/hast-util-to-mdast-IZ5PRX72.js +2272 -0
- package/dist/bundle/{identity-LOWMVGZY.js → identity-YX4IPGOO.js} +7 -6
- package/dist/bundle/{instructions-2VECIDXF.js → instructions-G5ZGHVFB.js} +1 -1
- package/dist/bundle/{login-7GBONT7V.js → login-CVX5VJX6.js} +96 -81
- package/dist/bundle/{mcp-O6ACR2DX.js → mcp-MQ2L5IIM.js} +2 -2
- package/dist/bundle/{mdast-util-from-markdown-FXEPSNER.js → mdast-util-from-markdown-HEZF7KJ4.js} +137 -195
- package/dist/bundle/mdast-util-gfm-AQW6R6MG.js +925 -0
- package/dist/bundle/mdast-util-to-hast-DF2QVIRV.js +879 -0
- package/dist/bundle/mdast-util-to-markdown-XYLXB3Z3.js +18 -0
- package/dist/bundle/meeting-combined-HKZJMJ6Q.js +28 -0
- package/dist/bundle/meeting-model-DSE4GRVE.js +29 -0
- package/dist/bundle/{meeting-semantic-G7PFOKU7.js → meeting-semantic-OHG2QN2G.js} +10 -10
- package/dist/bundle/{micromark-extension-gfm-GRL24TU6.js → micromark-extension-gfm-OE2GBORZ.js} +11 -78
- package/dist/bundle/{node-MPEQSFI3.js → node-NLJINXVQ.js} +2 -2
- package/dist/bundle/{node-sqlite-OLQMAYB4.js → node-sqlite-KDFQDYVZ.js} +10 -10
- package/dist/bundle/notes-search-3VBVSQ3R.js +70 -0
- package/dist/bundle/oauth-M3E62ZHC.js +22 -0
- package/dist/bundle/{open-OXTE672W.js → open-WVRUVBIZ.js} +8 -8
- package/dist/bundle/{openai-EB3TPIZY.js → openai-JJWOSJMV.js} +22 -21
- package/dist/bundle/{process-F6TKXWWA.js → process-LPVAYRO7.js} +1 -1
- package/dist/bundle/{program-4IFDZ7FM.js → program-ZJRIP25J.js} +276 -1149
- package/dist/bundle/{prompt-F5RRHPN2.js → prompt-XCDHTEAO.js} +8 -8
- package/dist/bundle/{reasons-UORHJDHK.js → reasons-REEEQDAZ.js} +6 -5
- package/dist/bundle/{recognize-DAVNZND3.js → recognize-OZLFDJAT.js} +7 -7
- package/dist/bundle/remote-MDPYVCZB.js +35 -0
- package/dist/bundle/{rerank-CND2GVLZ.js → rerank-FLZWJNHA.js} +11 -11
- package/dist/bundle/{serve-ZHSPUIGX.js → serve-5UV5VLRV.js} +19 -19
- package/dist/bundle/{server-YMAK4LHC.js → server-53A2X2MK.js} +89 -70
- package/dist/bundle/server-5GMURMDE.js +97 -0
- package/dist/bundle/{services-ZILSFJ6E.js → services-XSMH7BXB.js} +109 -89
- package/dist/bundle/{sqlite-runtime-S5VPMZQH.js → sqlite-runtime-E3L7ENFU.js} +9 -9
- package/dist/bundle/{start-CR6X25RT.js → start-4S2VNR4J.js} +7 -7
- package/dist/bundle/{state-YFPHVIIJ.js → state-TQI4JSH7.js} +9 -9
- package/dist/bundle/{store-CL4ZJZRI.js → store-GS7PU6PJ.js} +38 -23
- package/dist/bundle/{store-UODRT6X4.js → store-VYJPL7MW.js} +36 -25
- package/dist/bundle/store-maintenance-command-JJVYUZMG.js +85 -0
- package/dist/bundle/surface-JC4XVMZR.js +83 -0
- package/dist/bundle/tokens-KJQ5EAPW.js +133 -0
- package/dist/commands/documents.d.ts.map +1 -1
- package/dist/commands/documents.js +11 -1
- package/dist/commands/documents.js.map +1 -1
- package/dist/commands/remote.d.ts.map +1 -1
- package/dist/commands/remote.js +8 -22
- package/dist/commands/remote.js.map +1 -1
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +14 -4
- package/dist/commands/sync.js.map +1 -1
- package/dist/config.d.ts +5 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +5 -0
- package/dist/config.js.map +1 -1
- package/dist/first-screen.d.ts.map +1 -1
- package/dist/first-screen.js +2 -1
- package/dist/first-screen.js.map +1 -1
- package/dist/generated/manifest.d.ts +2 -1
- package/dist/generated/manifest.d.ts.map +1 -1
- package/dist/generated/manifest.js +782 -0
- package/dist/generated/manifest.js.map +1 -1
- package/dist/generated/types.d.ts +262 -58
- package/dist/generated/types.d.ts.map +1 -1
- package/dist/google.d.ts.map +1 -1
- package/dist/google.js +5 -5
- package/dist/google.js.map +1 -1
- package/dist/model.d.ts +5 -2
- package/dist/model.d.ts.map +1 -1
- package/dist/model.js.map +1 -1
- package/dist/policy-keys.js +1 -1
- package/dist/policy-keys.js.map +1 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +9 -4
- package/dist/program.js.map +1 -1
- package/dist/state.d.ts.map +1 -1
- package/dist/state.js +6 -1
- package/dist/state.js.map +1 -1
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +2 -7
- package/dist/store.js.map +1 -1
- package/dist/supported.d.ts +2 -2
- package/dist/supported.d.ts.map +1 -1
- package/dist/supported.js +2 -3
- package/dist/supported.js.map +1 -1
- package/dist/sync.d.ts +2 -1
- package/dist/sync.d.ts.map +1 -1
- package/dist/sync.js +5 -2
- package/dist/sync.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/scenarios/find-decision.md +1 -1
- package/skills/drive-cli/SKILL.md +4 -2
- package/dist/bundle/chunk-J5Q5FS2N.js +0 -593
- package/dist/bundle/chunk-L46C6HQ7.js +0 -729
- package/dist/bundle/chunk-UDMNY63V.js +0 -899
- package/dist/bundle/chunk-VKE77B3F.js +0 -2
- package/dist/bundle/command-contract-VRTOAV6W.js +0 -43
- package/dist/bundle/entry-MVXQETWS.js +0 -25
- package/dist/bundle/first-run-4UVLW2WR.js +0 -31
- package/dist/bundle/first-screen-JAKAIINI.js +0 -41
- package/dist/bundle/google-22NXXJX5.js +0 -45
- package/dist/bundle/grants-MQMTVCRQ.js +0 -118
- package/dist/bundle/mdast-util-gfm-SZM5GBDF.js +0 -2103
- package/dist/bundle/meeting-combined-LVP4AZKA.js +0 -27
- package/dist/bundle/meeting-model-RAY5XDXZ.js +0 -29
- package/dist/bundle/oauth-SGH2I2BY.js +0 -22
- package/dist/bundle/remote-D5EYYIAU.js +0 -35
- package/dist/bundle/server-DUVJWP3Q.js +0 -80
- package/dist/bundle/store-maintenance-command-DY5XIBWR.js +0 -72
- package/dist/bundle/tokens-AF7QOFOF.js +0 -118
package/dist/sync.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync.js","sourceRoot":"","sources":["../src/sync.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAA;
|
|
1
|
+
{"version":3,"file":"sync.js","sourceRoot":"","sources":["../src/sync.ts"],"names":[],"mappings":"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"}
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.72.1";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = "0.
|
|
1
|
+
export const VERSION = "0.72.1";
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wirecat/drive-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.72.1",
|
|
4
4
|
"description": "Google Drive and Docs sync, Markdown snapshots and local search",
|
|
5
5
|
"mcpName": "dev.wirecat/drive-cli",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
"@googleapis/drive": "27.0.0",
|
|
69
69
|
"@googleapis/driveactivity": "11.0.1",
|
|
70
70
|
"@googleapis/sheets": "18.1.1",
|
|
71
|
-
"@wirecat/cli-base": "0.
|
|
72
|
-
"@wirecat/cli-core": "0.
|
|
71
|
+
"@wirecat/cli-base": "0.130.0",
|
|
72
|
+
"@wirecat/cli-core": "0.724.0",
|
|
73
73
|
"commander": "15.0.0",
|
|
74
74
|
"google-auth-library": "11.3.1",
|
|
75
75
|
"mammoth": "1.13.0",
|
|
@@ -8,7 +8,7 @@ steps:
|
|
|
8
8
|
why: the document's text with its tabs, to read the passage in full
|
|
9
9
|
- run: drive personal documents context DOC_ID
|
|
10
10
|
why: its tags, notes, memories and editors, kept in the local store
|
|
11
|
-
- run: drive personal
|
|
11
|
+
- run: drive personal activities list DOC_ID
|
|
12
12
|
why: who did what to it, from Drive Activity; needs a sign-in with --grant activity
|
|
13
13
|
look:
|
|
14
14
|
- the hit's Google URL, to cite it
|
|
@@ -29,8 +29,10 @@ Find your way with the tool itself, not this file:
|
|
|
29
29
|
- `drive personal documents show DOC_ID` reads the text and tabs; `drive personal documents context DOC_ID`
|
|
30
30
|
adds tags, notes, memories and editors. Each takes a hit's `document:<n>` ref too; a bare number is refused.
|
|
31
31
|
- `drive personal documents list --compact` prints one line per document instead of JSON.
|
|
32
|
-
- `drive personal documents history DOC_ID
|
|
33
|
-
|
|
32
|
+
- `drive personal documents history DOC_ID` lists the earlier versions sync kept, `--revision N` shows one, and
|
|
33
|
+
`drive personal changes --since 1d` lists what was added, changed, deleted or is no longer visible. Both read the
|
|
34
|
+
local copy.
|
|
35
|
+
- `drive personal activities list DOC_ID` says who did what. It needs a sign-in with `--grant activity`.
|
|
34
36
|
- An empty result means nothing matched in the imported folders, not that Drive has no such document.
|
|
35
37
|
`drive personal status` shows what is imported and pending.
|
|
36
38
|
- Not signed in: the owner runs `drive <profile> session start` on the computer running drive, or signs in from
|
|
@@ -1,593 +0,0 @@
|
|
|
1
|
-
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
-
const require = __bundleRequire(import.meta.url);
|
|
3
|
-
import {
|
|
4
|
-
DOC
|
|
5
|
-
} from "./chunk-6TNNT2MQ.js";
|
|
6
|
-
import {
|
|
7
|
-
operations
|
|
8
|
-
} from "./chunk-NYECVHFH.js";
|
|
9
|
-
import {
|
|
10
|
-
privateFiles
|
|
11
|
-
} from "./chunk-6XFIITOG.js";
|
|
12
|
-
import {
|
|
13
|
-
commandPathKey,
|
|
14
|
-
commandPermissions
|
|
15
|
-
} from "./chunk-TAFHYHKA.js";
|
|
16
|
-
import {
|
|
17
|
-
listQuery,
|
|
18
|
-
queryTerms,
|
|
19
|
-
typedQuery,
|
|
20
|
-
withQuery
|
|
21
|
-
} from "./chunk-2PUNKUYJ.js";
|
|
22
|
-
import {
|
|
23
|
-
AI_ENTRIES,
|
|
24
|
-
LEVELS,
|
|
25
|
-
answerEntity,
|
|
26
|
-
checkConfigText,
|
|
27
|
-
issueMessage,
|
|
28
|
-
settingsFor,
|
|
29
|
-
usableProfileName,
|
|
30
|
-
withSettingDefaults
|
|
31
|
-
} from "./chunk-SERXSCN3.js";
|
|
32
|
-
import {
|
|
33
|
-
MAX_TEXT_CHARS
|
|
34
|
-
} from "./chunk-JZHBZOJR.js";
|
|
35
|
-
import {
|
|
36
|
-
TRANSCRIPT_WORDS
|
|
37
|
-
} from "./chunk-PRW6SYA3.js";
|
|
38
|
-
import {
|
|
39
|
-
dateRange,
|
|
40
|
-
queryError,
|
|
41
|
-
queryFieldsOf,
|
|
42
|
-
timezoneOf
|
|
43
|
-
} from "./chunk-OF422U5D.js";
|
|
44
|
-
import {
|
|
45
|
-
DRIVE_APP
|
|
46
|
-
} from "./chunk-ZM63SUHG.js";
|
|
47
|
-
import {
|
|
48
|
-
BASE_CONSTANTS,
|
|
49
|
-
baseConstantsSchema,
|
|
50
|
-
loadConstants,
|
|
51
|
-
resolvePaths,
|
|
52
|
-
saveConfigFile
|
|
53
|
-
} from "./chunk-CJLVYIOP.js";
|
|
54
|
-
import {
|
|
55
|
-
array,
|
|
56
|
-
boolean,
|
|
57
|
-
integer,
|
|
58
|
-
isoTime,
|
|
59
|
-
literal,
|
|
60
|
-
looseObject,
|
|
61
|
-
maxLength,
|
|
62
|
-
maxValue,
|
|
63
|
-
minLength,
|
|
64
|
-
minValue,
|
|
65
|
-
nonEmpty,
|
|
66
|
-
nullable,
|
|
67
|
-
number,
|
|
68
|
-
object,
|
|
69
|
-
optional,
|
|
70
|
-
parse,
|
|
71
|
-
picklist,
|
|
72
|
-
pipe,
|
|
73
|
-
record,
|
|
74
|
-
regex,
|
|
75
|
-
strictObject,
|
|
76
|
-
string,
|
|
77
|
-
transform,
|
|
78
|
-
trim,
|
|
79
|
-
union
|
|
80
|
-
} from "./chunk-OJSBWP3F.js";
|
|
81
|
-
import {
|
|
82
|
-
CliError
|
|
83
|
-
} from "./chunk-4QNW4NK6.js";
|
|
84
|
-
import {
|
|
85
|
-
__name
|
|
86
|
-
} from "./chunk-ZVVMGPBJ.js";
|
|
87
|
-
|
|
88
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/oauth/client-file.js
|
|
89
|
-
import { readFileSync } from "node:fs";
|
|
90
|
-
var readClientFile = /* @__PURE__ */ __name((location, options = {}) => {
|
|
91
|
-
if (!options.shipped && typeof location === "string") {
|
|
92
|
-
const mode = privateFiles({ files: [location], dirs: [] }, options.platform);
|
|
93
|
-
if (mode.checked && !mode.ok)
|
|
94
|
-
throw new CliError("configuration_error", `the client file can be read by other users of this computer; run chmod 600 ${location} and try again`, { reason: "sign-in.client-file-open" });
|
|
95
|
-
}
|
|
96
|
-
try {
|
|
97
|
-
const { installed } = JSON.parse(readFileSync(location, "utf8"));
|
|
98
|
-
const { client_id: clientId, client_secret: clientSecret } = installed;
|
|
99
|
-
if (typeof clientId !== "string" || !clientId)
|
|
100
|
-
throw new TypeError("client_id");
|
|
101
|
-
if (clientSecret !== void 0 && typeof clientSecret !== "string")
|
|
102
|
-
throw new TypeError("client_secret");
|
|
103
|
-
return { clientId, ...clientSecret ? { clientSecret } : {} };
|
|
104
|
-
} catch {
|
|
105
|
-
throw options.invalid ?? new CliError("configuration_error", "could not read a Desktop app OAuth client JSON from the client file; its contents were not logged", { reason: "sign-in.client-file-invalid" });
|
|
106
|
-
}
|
|
107
|
-
}, "readClientFile");
|
|
108
|
-
|
|
109
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/constants/obscure.js
|
|
110
|
-
import { createDecipheriv } from "node:crypto";
|
|
111
|
-
var KEY = Buffer.from("d43012779aa2dded3e98092a3dbcf5d8980c564172f5ce0a5fd0574e5f740339", "hex");
|
|
112
|
-
var reveal = /* @__PURE__ */ __name((obscured) => {
|
|
113
|
-
const bytes = Buffer.from(obscured, "base64url");
|
|
114
|
-
const decipher = createDecipheriv("aes-256-ctr", KEY, bytes.subarray(0, 16));
|
|
115
|
-
return Buffer.concat([decipher.update(bytes.subarray(16)), decipher.final()]).toString("utf8");
|
|
116
|
-
}, "reveal");
|
|
117
|
-
|
|
118
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/constants/index.js
|
|
119
|
-
var CORE_CONSTANTS = new URL("../../constants.json", new URL("constants/index.js", import.meta.resolve("@wirecat/cli-core")).href);
|
|
120
|
-
var constantsSchema = object({
|
|
121
|
-
...baseConstantsSchema.entries,
|
|
122
|
-
google: object({
|
|
123
|
-
app: object({
|
|
124
|
-
client_id: pipe(string(), nonEmpty(), transform(reveal)),
|
|
125
|
-
client_secret: optional(pipe(string(), transform(reveal)))
|
|
126
|
-
})
|
|
127
|
-
}),
|
|
128
|
-
microsoft: object({ app: object({ client_id: pipe(string(), nonEmpty()) }) })
|
|
129
|
-
});
|
|
130
|
-
var loaded = /* @__PURE__ */ new Map();
|
|
131
|
-
var constants = /* @__PURE__ */ __name((toolLayer, schema) => {
|
|
132
|
-
const key = toolLayer?.href ?? "";
|
|
133
|
-
if (!loaded.has(key)) {
|
|
134
|
-
const layers = toolLayer ? [BASE_CONSTANTS, CORE_CONSTANTS, toolLayer] : [BASE_CONSTANTS, CORE_CONSTANTS];
|
|
135
|
-
loaded.set(key, loadConstants(layers, schema ?? constantsSchema));
|
|
136
|
-
}
|
|
137
|
-
return loaded.get(key);
|
|
138
|
-
}, "constants");
|
|
139
|
-
var oauthApp = /* @__PURE__ */ __name((options) => {
|
|
140
|
-
const { env, prefix, provider } = options;
|
|
141
|
-
const name = `${prefix}_${provider.toUpperCase()}_CLIENT`;
|
|
142
|
-
const clientSecret = env[`${name}_SECRET`];
|
|
143
|
-
const own = [
|
|
144
|
-
[options.clientId, "flag"],
|
|
145
|
-
[env[`${name}_ID`], "env"],
|
|
146
|
-
[options.configClientId, "config"]
|
|
147
|
-
];
|
|
148
|
-
const [clientId, source] = own.find(([id]) => id) ?? [];
|
|
149
|
-
if (clientId && source)
|
|
150
|
-
return app({ clientId, ...clientSecret ? { clientSecret } : {} }, source);
|
|
151
|
-
if (clientSecret)
|
|
152
|
-
throw new CliError("configuration_error", `${name}_SECRET is set without a client id; set ${name}_ID too, or unset it to use WireCat's app`, { reason: "sign-in.secret-without-id" });
|
|
153
|
-
const wirecat = options.wirecat;
|
|
154
|
-
if (!wirecat?.client_id)
|
|
155
|
-
return void 0;
|
|
156
|
-
return app({ clientId: wirecat.client_id, ...wirecat.client_secret ? { clientSecret: wirecat.client_secret } : {} }, "constants");
|
|
157
|
-
}, "oauthApp");
|
|
158
|
-
var app = /* @__PURE__ */ __name((client, source) => ({ client: { ...client, source }, source }), "app");
|
|
159
|
-
var googleApp = /* @__PURE__ */ __name((options) => {
|
|
160
|
-
const { clientFile, platform } = options;
|
|
161
|
-
if (clientFile)
|
|
162
|
-
return app(readClientFile(clientFile, platform ? { platform } : {}), "flag");
|
|
163
|
-
const wirecat = (options.constants ?? constants()).google.app;
|
|
164
|
-
return oauthApp({ ...options, provider: "google", wirecat });
|
|
165
|
-
}, "googleApp");
|
|
166
|
-
var oauthClientReport = /* @__PURE__ */ __name((app2, reason) => app2?.source ? { client: app2.source === "constants" ? "wirecat" : "own", source: app2.source } : { client: null, source: null, ...reason ? { reason } : {} }, "oauthClientReport");
|
|
167
|
-
|
|
168
|
-
// dist/policy-keys.js
|
|
169
|
-
var permissionKeys = /* @__PURE__ */ __name((paths2) => {
|
|
170
|
-
const keys = /* @__PURE__ */ new Set([
|
|
171
|
-
"mcp.authority",
|
|
172
|
-
"mcp",
|
|
173
|
-
"sheets.create",
|
|
174
|
-
"sheets.rename",
|
|
175
|
-
"sheets.insert",
|
|
176
|
-
"sheets.format",
|
|
177
|
-
"sheets.update"
|
|
178
|
-
]);
|
|
179
|
-
for (const path of paths2)
|
|
180
|
-
keys.add(path.join("."));
|
|
181
|
-
for (const operation of operations)
|
|
182
|
-
for (const key of methodPolicyKeys(operation.id))
|
|
183
|
-
keys.add(key);
|
|
184
|
-
return keys;
|
|
185
|
-
}, "permissionKeys");
|
|
186
|
-
var permissionNames = /* @__PURE__ */ __name((keys) => {
|
|
187
|
-
const names = /* @__PURE__ */ new Set();
|
|
188
|
-
for (const key of keys) {
|
|
189
|
-
const parts = key.split(".");
|
|
190
|
-
for (let end = 1; end <= parts.length; end++)
|
|
191
|
-
names.add(parts.slice(0, end).join("."));
|
|
192
|
-
}
|
|
193
|
-
return names;
|
|
194
|
-
}, "permissionNames");
|
|
195
|
-
var DEFAULT_LEVELS = {
|
|
196
|
-
"mcp.authority": "deny",
|
|
197
|
-
...Object.fromEntries(operations.filter((op) => op.effect === "destructive").map((op) => [`api.${op.id}`, "ask"]))
|
|
198
|
-
};
|
|
199
|
-
var methodPolicyKeys = /* @__PURE__ */ __name((method, body) => {
|
|
200
|
-
const parts = method.split(".");
|
|
201
|
-
const verb = parts.at(-1);
|
|
202
|
-
const alias = method.startsWith("drive.files.") ? `files.${verb}` : method.startsWith("docs.documents.") ? `documents.${verb === "batchUpdate" ? "update" : verb}` : method.startsWith("sheets.spreadsheets.") ? `sheets.${method === "sheets.spreadsheets.get" ? "info" : method === "sheets.spreadsheets.values.get" ? "show" : verb === "append" ? "add" : verb}` : method === "driveactivity.activity.query" ? "documents.history" : method.startsWith("drive.") ? `${parts[1]}.${verb}` : void 0;
|
|
203
|
-
const keys = [`api.${method}`, ...alias ? [alias] : []];
|
|
204
|
-
if (method === "drive.replies.create" && body)
|
|
205
|
-
keys.push(body.action === "resolve" ? "comments.resolve" : body.action === "reopen" ? "comments.reopen" : "comments.reply");
|
|
206
|
-
if (method === "drive.replies.create" && body?.content !== void 0)
|
|
207
|
-
keys.push("comments.reply");
|
|
208
|
-
if (method === "sheets.spreadsheets.batchUpdate" && Array.isArray(body?.requests)) {
|
|
209
|
-
const object2 = /* @__PURE__ */ __name((value) => !!value && typeof value === "object" && !Array.isArray(value), "object");
|
|
210
|
-
for (const request of body.requests) {
|
|
211
|
-
if (!object2(request))
|
|
212
|
-
continue;
|
|
213
|
-
if (request.addSheet || request.duplicateSheet)
|
|
214
|
-
keys.push("sheets.create");
|
|
215
|
-
if (object2(request.updateSheetProperties)) {
|
|
216
|
-
const update = request.updateSheetProperties;
|
|
217
|
-
if (object2(update.properties) && update.properties.title !== void 0 || String(update.fields).split(",").some((field) => field.trim() === "title" || field.trim() === "*"))
|
|
218
|
-
keys.push("sheets.rename");
|
|
219
|
-
if (object2(update.properties) && update.properties.gridProperties)
|
|
220
|
-
keys.push("sheets.insert");
|
|
221
|
-
}
|
|
222
|
-
if (request.insertDimension || request.appendDimension || request.insertRange)
|
|
223
|
-
keys.push("sheets.insert");
|
|
224
|
-
if (request.repeatCell || request.updateCells || request.appendCells || request.updateBorders || request.addConditionalFormatRule || request.updateConditionalFormatRule || request.deleteConditionalFormatRule || request.addBanding || request.updateBanding || request.deleteBanding)
|
|
225
|
-
keys.push("sheets.format");
|
|
226
|
-
if (request.updateCells || request.appendCells || request.findReplace || request.pasteData || request.copyPaste || request.cutPaste || request.autoFill)
|
|
227
|
-
keys.push("sheets.update");
|
|
228
|
-
if (request.pasteData || request.copyPaste || request.cutPaste || request.autoFill)
|
|
229
|
-
keys.push("sheets.format");
|
|
230
|
-
if (object2(request.repeatCell) && (String(request.repeatCell.fields).split(",").some((field) => field.trim() === "*" || field.includes("userEnteredValue")) || object2(request.repeatCell.cell) && request.repeatCell.cell.userEnteredValue !== void 0))
|
|
231
|
-
keys.push("sheets.update");
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
return [...new Set(keys)];
|
|
235
|
-
}, "methodPolicyKeys");
|
|
236
|
-
|
|
237
|
-
// dist/config.js
|
|
238
|
-
import { readFileSync as readFileSync2 } from "node:fs";
|
|
239
|
-
import { join } from "node:path";
|
|
240
|
-
|
|
241
|
-
// dist/list-queries.js
|
|
242
|
-
var registry = /* @__PURE__ */ __name((entity, schema, native, examples) => ({
|
|
243
|
-
entity,
|
|
244
|
-
backend: "native",
|
|
245
|
-
fields: queryFieldsOf(schema, { native, examples }).map((field) => field.native ? { ...field, operators: ["term", "phrase"] } : field)
|
|
246
|
-
}), "registry");
|
|
247
|
-
var sessionRow = strictObject({
|
|
248
|
-
profile: string(),
|
|
249
|
-
selected_folders: number(),
|
|
250
|
-
storage: picklist(["keyring", "file"])
|
|
251
|
-
});
|
|
252
|
-
var fileRow = looseObject({
|
|
253
|
-
id: optional(string()),
|
|
254
|
-
name: optional(string()),
|
|
255
|
-
trashed: optional(boolean()),
|
|
256
|
-
modified_time: optional(isoTime),
|
|
257
|
-
created_time: optional(isoTime),
|
|
258
|
-
viewed_by_me_time: optional(isoTime)
|
|
259
|
-
});
|
|
260
|
-
var transcriptRow = strictObject({
|
|
261
|
-
id: string(),
|
|
262
|
-
name: string(),
|
|
263
|
-
url: string(),
|
|
264
|
-
owned_by_me: nullable(boolean()),
|
|
265
|
-
modified_at: nullable(string())
|
|
266
|
-
});
|
|
267
|
-
var TRANSCRIPTS_QUERY = registry("drive_transcript", transcriptRow, ["owned_by_me"], {
|
|
268
|
-
owned_by_me: "owned_by_me:false"
|
|
269
|
-
});
|
|
270
|
-
var SESSIONS_QUERY = registry("drive_session", sessionRow, ["profile", "storage"], {
|
|
271
|
-
profile: "profile:personal",
|
|
272
|
-
storage: "storage:keyring"
|
|
273
|
-
});
|
|
274
|
-
var FILES_QUERY = {
|
|
275
|
-
entity: "drive_remote_file",
|
|
276
|
-
backend: "native",
|
|
277
|
-
fields: queryFieldsOf(fileRow, {
|
|
278
|
-
native: ["name", "trashed", "modified_time", "created_time", "viewed_by_me_time"],
|
|
279
|
-
examples: {
|
|
280
|
-
name: 'name:"Example plan"',
|
|
281
|
-
trashed: "trashed:false",
|
|
282
|
-
modified_time: "modified_time>=2026-01-01",
|
|
283
|
-
created_time: "created_time>=2026-01-01",
|
|
284
|
-
viewed_by_me_time: "viewed_by_me_time>=2026-01-01"
|
|
285
|
-
}
|
|
286
|
-
}).map((field) => field.native ? { ...field, operators: field.type === "time" ? ["term", "range"] : ["term", "phrase"] } : field),
|
|
287
|
-
defaults: ["trashed:false"]
|
|
288
|
-
};
|
|
289
|
-
var bindQuery = /* @__PURE__ */ __name((command, query, schema) => answerEntity(withQuery(command, query), query.entity, schema), "bindQuery");
|
|
290
|
-
var termsOf = /* @__PURE__ */ __name((words, query, command) => Object.fromEntries(queryTerms(words, query, command)), "termsOf");
|
|
291
|
-
var quote = /* @__PURE__ */ __name((value) => `'${value.replaceAll("\\", "\\\\").replaceAll("'", "\\'")}'`, "quote");
|
|
292
|
-
var driveFileQuery = /* @__PURE__ */ __name((words, timezone) => {
|
|
293
|
-
const ast = listQuery(typedQuery(words), FILES_QUERY, "files list");
|
|
294
|
-
const zone = timezoneOf(timezone);
|
|
295
|
-
const column = {
|
|
296
|
-
modified_time: "modifiedTime",
|
|
297
|
-
created_time: "createdTime",
|
|
298
|
-
viewed_by_me_time: "viewedByMeTime"
|
|
299
|
-
};
|
|
300
|
-
const render = /* @__PURE__ */ __name((node) => {
|
|
301
|
-
if (node.kind === "boolean") {
|
|
302
|
-
if (node.clauses.some((clause) => clause.occur !== "must"))
|
|
303
|
-
queryError("query.unsupported-operator", node.span, "files list accepts AND terms only");
|
|
304
|
-
return node.clauses.map((clause) => render(clause.node)).join(" and ");
|
|
305
|
-
}
|
|
306
|
-
if (node.field === "name")
|
|
307
|
-
return `name = ${quote(node.value)}`;
|
|
308
|
-
if (node.field === "trashed")
|
|
309
|
-
return `trashed = ${node.value.toLowerCase()}`;
|
|
310
|
-
const range = dateRange(node.value, node.operator === "range" ? node.upper ?? "*" : node.value, node.lower_inclusive ?? true, node.upper_inclusive ?? true, zone, node.span);
|
|
311
|
-
return [
|
|
312
|
-
range.lower === void 0 ? void 0 : `${column[node.field]} ${range.lower_inclusive ? ">=" : ">"} ${quote(new Date(range.lower).toISOString())}`,
|
|
313
|
-
range.upper === void 0 ? void 0 : `${column[node.field]} ${range.upper_inclusive ? "<=" : "<"} ${quote(new Date(range.upper).toISOString())}`
|
|
314
|
-
].filter(Boolean).join(" and ");
|
|
315
|
-
}, "render");
|
|
316
|
-
return { query: ast ? render(ast.root) : "trashed = false", timezone: zone };
|
|
317
|
-
}, "driveFileQuery");
|
|
318
|
-
|
|
319
|
-
// dist/transcripts.js
|
|
320
|
-
var TRANSCRIPT_MODES = ["include", "skip", "exclude"];
|
|
321
|
-
var folded = /* @__PURE__ */ __name((text) => text.normalize("NFC").toLowerCase(), "folded");
|
|
322
|
-
var isTranscript = /* @__PURE__ */ __name((words) => (file) => file.mime === DOC && !file.trashed && words.some((word) => folded(file.name).includes(folded(word))), "isTranscript");
|
|
323
|
-
var transcriptsDriveQuery = /* @__PURE__ */ __name((words) => {
|
|
324
|
-
const longest = /* @__PURE__ */ __name((phrase) => phrase.trim().split(/\s+/).reduce((a, b) => b.length > a.length ? b : a, ""), "longest");
|
|
325
|
-
const asked = [...new Set(words.map(longest).filter(Boolean))];
|
|
326
|
-
return `mimeType = '${DOC}' and trashed = false and (${asked.map((word) => `name contains ${quote(word)}`).join(" or ")})`;
|
|
327
|
-
}, "transcriptsDriveQuery");
|
|
328
|
-
var findTranscripts = /* @__PURE__ */ __name(async (search, words) => {
|
|
329
|
-
if (!search)
|
|
330
|
-
throw new CliError("configuration_error", "finding transcripts needs a signed-in Google account");
|
|
331
|
-
const matches = isTranscript(words);
|
|
332
|
-
return (await search(transcriptsDriveQuery(words))).filter(matches);
|
|
333
|
-
}, "findTranscripts");
|
|
334
|
-
var transcriptQuery = /* @__PURE__ */ __name((mode, words, search) => {
|
|
335
|
-
if (mode === void 0 || mode === "skip")
|
|
336
|
-
return void 0;
|
|
337
|
-
const key = JSON.stringify([...new Set(words.map(folded))].sort());
|
|
338
|
-
const query = { key, mode, matches: isTranscript(words) };
|
|
339
|
-
return mode === "include" ? { ...query, list: /* @__PURE__ */ __name(() => findTranscripts(search, words), "list") } : query;
|
|
340
|
-
}, "transcriptQuery");
|
|
341
|
-
|
|
342
|
-
// dist/config.js
|
|
343
|
-
var Common = {
|
|
344
|
-
...AI_ENTRIES,
|
|
345
|
-
permissions: optional(record(string(), picklist(LEVELS))),
|
|
346
|
-
max_text_chars: optional(pipe(number(), integer(), minValue(1), maxValue(MAX_TEXT_CHARS))),
|
|
347
|
-
google_client_id: optional(pipe(string(), trim(), minLength(1)))
|
|
348
|
-
};
|
|
349
|
-
var RunSettings = {
|
|
350
|
-
record: optional(boolean()),
|
|
351
|
-
keep_runs_for_days: optional(pipe(number(), integer(), minValue(1))),
|
|
352
|
-
keep_successful_runs_for_days: optional(pipe(number(), integer(), minValue(1))),
|
|
353
|
-
runs_size_limit_mb: optional(pipe(number(), integer(), minValue(1))),
|
|
354
|
-
record_input: optional(union([boolean(), literal("failed")]))
|
|
355
|
-
};
|
|
356
|
-
var DEFAULT_ADD_PROFILES = 5;
|
|
357
|
-
var MOST_ADD_PROFILES = 50;
|
|
358
|
-
var AcrossProfiles = {
|
|
359
|
-
max_add_profiles: optional(pipe(number(), integer(), minValue(1), maxValue(MOST_ADD_PROFILES)))
|
|
360
|
-
};
|
|
361
|
-
var SharedDefaults = {
|
|
362
|
-
limit: optional(pipe(number(), integer(), minValue(1))),
|
|
363
|
-
sends_per_hour: optional(pipe(number(), integer(), minValue(0))),
|
|
364
|
-
update_check: optional(boolean()),
|
|
365
|
-
skill_hint: optional(boolean())
|
|
366
|
-
};
|
|
367
|
-
var DEFAULTS_ONLY = /* @__PURE__ */ new Set([
|
|
368
|
-
...Object.keys(RunSettings),
|
|
369
|
-
...Object.keys(AcrossProfiles),
|
|
370
|
-
"update_check",
|
|
371
|
-
"skill_hint"
|
|
372
|
-
]);
|
|
373
|
-
var Transcripts = {
|
|
374
|
-
transcripts: optional(picklist(TRANSCRIPT_MODES)),
|
|
375
|
-
transcript_words: optional(pipe(array(pipe(string(), trim(), minLength(1), maxLength(100))), minLength(1), maxLength(50)))
|
|
376
|
-
};
|
|
377
|
-
var PROFILE_ONLY = /* @__PURE__ */ new Set(["picture_search", ...Object.keys(Transcripts)]);
|
|
378
|
-
var SETTING_NAMES = /* @__PURE__ */ new Set([...Object.keys(Common), ...PROFILE_ONLY, ...DEFAULTS_ONLY]);
|
|
379
|
-
var Mirror = strictObject({
|
|
380
|
-
id: pipe(string(), regex(/^[a-z0-9-]{1,40}$/)),
|
|
381
|
-
path: pipe(string(), minLength(1)),
|
|
382
|
-
folder: pipe(string(), regex(/^[A-Za-z0-9_-]{1,200}$/))
|
|
383
|
-
});
|
|
384
|
-
var Profile = strictObject({
|
|
385
|
-
principal: string(),
|
|
386
|
-
roots: optional(array(pipe(string(), regex(/^[A-Za-z0-9_-]{1,200}$/))), []),
|
|
387
|
-
mirrors: optional(array(Mirror)),
|
|
388
|
-
storage: picklist(["keyring", "file"]),
|
|
389
|
-
picture_search: optional(boolean()),
|
|
390
|
-
...Transcripts,
|
|
391
|
-
...Common
|
|
392
|
-
});
|
|
393
|
-
var ConfigSchema = strictObject({
|
|
394
|
-
profiles: optional(record(string(), Profile), {}),
|
|
395
|
-
defaults: optional(strictObject({ ...Common, ...RunSettings, ...AcrossProfiles, ...SharedDefaults }))
|
|
396
|
-
});
|
|
397
|
-
var keyOf = /* @__PURE__ */ __name((path) => {
|
|
398
|
-
if (path[0] !== "api" || path[1] === void 0)
|
|
399
|
-
return commandPathKey(path);
|
|
400
|
-
if (["call", "list", "show"].includes(path[1]))
|
|
401
|
-
return null;
|
|
402
|
-
const operation = operations.find((one) => one.command === path[1]);
|
|
403
|
-
return operation ? `api.${operation.id}` : commandPathKey(path);
|
|
404
|
-
}, "keyOf");
|
|
405
|
-
var permissions = commandPermissions({ keyOf, extra: [...permissionKeys([])], defaults: DEFAULT_LEVELS });
|
|
406
|
-
var configuration = settingsFor(DRIVE_APP, {
|
|
407
|
-
configRepair: false,
|
|
408
|
-
// drive's own schema decides what the file may hold, so `doctor` names a profile that lacks its principal.
|
|
409
|
-
schema: ConfigSchema,
|
|
410
|
-
profile: {
|
|
411
|
-
principal: optional(string()),
|
|
412
|
-
roots: optional(array(pipe(string(), regex(/^[A-Za-z0-9_-]{1,200}$/)))),
|
|
413
|
-
mirrors: optional(array(Mirror)),
|
|
414
|
-
storage: optional(picklist(["keyring", "file"])),
|
|
415
|
-
max_text_chars: Common.max_text_chars,
|
|
416
|
-
google_client_id: Common.google_client_id,
|
|
417
|
-
...Transcripts
|
|
418
|
-
},
|
|
419
|
-
settings: [
|
|
420
|
-
{
|
|
421
|
-
key: "max_text_chars",
|
|
422
|
-
default: MAX_TEXT_CHARS,
|
|
423
|
-
description: "the most characters of text one file may have to be imported"
|
|
424
|
-
},
|
|
425
|
-
{
|
|
426
|
-
key: "max_add_profiles",
|
|
427
|
-
default: DEFAULT_ADD_PROFILES,
|
|
428
|
-
description: "the most profiles documents add may try for one document"
|
|
429
|
-
}
|
|
430
|
-
],
|
|
431
|
-
permissions
|
|
432
|
-
});
|
|
433
|
-
var paths = /* @__PURE__ */ __name((env) => resolvePaths({ appName: "drive-cli", prefix: "DRIVE", env }), "paths");
|
|
434
|
-
var configPath = /* @__PURE__ */ __name((env) => join(paths(env).config, "config.json"), "configPath");
|
|
435
|
-
var TOOL = "drive";
|
|
436
|
-
var isNode = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && !Array.isArray(value), "isNode");
|
|
437
|
-
var withoutIncomplete = /* @__PURE__ */ __name((raw, issues) => {
|
|
438
|
-
const incomplete = new Set(issues.flatMap((issue) => issue.kind === "missing_setting" && issue.profile ? [issue.profile] : []));
|
|
439
|
-
if (!incomplete.size || !isNode(raw) || !isNode(raw.profiles))
|
|
440
|
-
return void 0;
|
|
441
|
-
return {
|
|
442
|
-
...raw,
|
|
443
|
-
profiles: Object.fromEntries(Object.entries(raw.profiles).filter(([name]) => !incomplete.has(name)))
|
|
444
|
-
};
|
|
445
|
-
}, "withoutIncomplete");
|
|
446
|
-
var examine = /* @__PURE__ */ __name((text, file, knownPermissions) => {
|
|
447
|
-
const check = /* @__PURE__ */ __name((body) => checkConfigText(body, {
|
|
448
|
-
file,
|
|
449
|
-
tool: TOOL,
|
|
450
|
-
schema: ConfigSchema,
|
|
451
|
-
repair: false,
|
|
452
|
-
...knownPermissions ? { knownPermissions } : {}
|
|
453
|
-
}), "check");
|
|
454
|
-
const first = check(text);
|
|
455
|
-
if (first.issues.some((issue) => issue.kind === "invalid_json"))
|
|
456
|
-
return { raw: {}, config: { profiles: {} }, issues: first.issues };
|
|
457
|
-
const raw = JSON.parse(text);
|
|
458
|
-
if (first.config)
|
|
459
|
-
return { raw, config: first.config, issues: first.issues };
|
|
460
|
-
const rest = withoutIncomplete(raw, first.issues);
|
|
461
|
-
const second = rest && check(JSON.stringify(rest));
|
|
462
|
-
return {
|
|
463
|
-
raw,
|
|
464
|
-
config: second?.config ?? { profiles: {} },
|
|
465
|
-
// Saved permissions are checked only in what loads, and the first pass loaded nothing.
|
|
466
|
-
issues: [...first.issues, ...(second?.issues ?? []).filter((issue) => issue.kind === "unknown_permission")]
|
|
467
|
-
};
|
|
468
|
-
}, "examine");
|
|
469
|
-
var inspectConfig = /* @__PURE__ */ __name((env, knownPermissions) => {
|
|
470
|
-
const path = configPath(env);
|
|
471
|
-
let text;
|
|
472
|
-
try {
|
|
473
|
-
text = readFileSync2(path, "utf8");
|
|
474
|
-
} catch {
|
|
475
|
-
return { path, found: false, raw: {}, config: { profiles: {} }, issues: [] };
|
|
476
|
-
}
|
|
477
|
-
return { path, found: true, ...examine(text, path, knownPermissions) };
|
|
478
|
-
}, "inspectConfig");
|
|
479
|
-
var configIssues = /* @__PURE__ */ __name((raw, file, knownPermissions) => examine(JSON.stringify(raw), file, knownPermissions).issues, "configIssues");
|
|
480
|
-
var refusal = /* @__PURE__ */ __name((issues) => new CliError("configuration_error", issueMessage(issues)), "refusal");
|
|
481
|
-
var readConfig = /* @__PURE__ */ __name((env, knownPermissions) => {
|
|
482
|
-
const { config, issues } = inspectConfig(env, knownPermissions);
|
|
483
|
-
if (issues.length)
|
|
484
|
-
throw refusal(issues);
|
|
485
|
-
return config;
|
|
486
|
-
}, "readConfig");
|
|
487
|
-
var writeConfig = /* @__PURE__ */ __name((env, config) => {
|
|
488
|
-
const [issue] = configIssues(config, "drive settings");
|
|
489
|
-
if (issue)
|
|
490
|
-
throw new CliError("configuration_error", `drive settings: ${issue.profile === void 0 ? "" : `profile ${issue.profile}: `}${issue.what}`);
|
|
491
|
-
saveConfigFile(configPath(env), withDefaults(parse(ConfigSchema, config)));
|
|
492
|
-
}, "writeConfig");
|
|
493
|
-
var withDefaults = /* @__PURE__ */ __name((raw, except = []) => withSettingDefaults(isNode(raw) && !Object.hasOwn(raw, "defaults") ? { ...raw, defaults: {} } : raw, configuration.declaredSettings.filter(({ key }) => !except.includes(key))).config, "withDefaults");
|
|
494
|
-
var profileName = usableProfileName;
|
|
495
|
-
var fileId = /* @__PURE__ */ __name((input) => {
|
|
496
|
-
let id = input;
|
|
497
|
-
if (input.startsWith("https://")) {
|
|
498
|
-
const url = new URL(input);
|
|
499
|
-
if (url.hostname !== "drive.google.com" && url.hostname !== "docs.google.com")
|
|
500
|
-
throw new CliError("validation_error", "use a Google Drive/Docs URL or file ID");
|
|
501
|
-
id = url.pathname.match(/\/(?:folders|d)\/([^/]+)/)?.[1] ?? "";
|
|
502
|
-
}
|
|
503
|
-
if (!/^[A-Za-z0-9_-]{1,200}$/.test(id))
|
|
504
|
-
throw new CliError("validation_error", "invalid Google file ID");
|
|
505
|
-
return id;
|
|
506
|
-
}, "fileId");
|
|
507
|
-
var unknownProfile = /* @__PURE__ */ __name((name, profiles) => new CliError("not_found", profiles.length ? `no profile ${name} here \u2014 profiles here: ${profiles.join(", ")}; a new one signs in with drive ${name} session start` : `no profiles here yet; create one with drive ${name} session start`, { reason: "profile.unknown", profiles }), "unknownProfile");
|
|
508
|
-
var activeProfile = /* @__PURE__ */ __name((env, name) => {
|
|
509
|
-
const config = readConfig(env);
|
|
510
|
-
const profile = config.profiles[profileName(name)];
|
|
511
|
-
if (!profile)
|
|
512
|
-
throw unknownProfile(name, Object.keys(config.profiles).sort());
|
|
513
|
-
return profile;
|
|
514
|
-
}, "activeProfile");
|
|
515
|
-
var checkTextLimit = /* @__PURE__ */ __name((value) => {
|
|
516
|
-
if (typeof value !== "number" || !Number.isInteger(value) || value < 1)
|
|
517
|
-
throw new CliError("validation_error", "max_text_chars must be a positive whole number of characters");
|
|
518
|
-
if (value > MAX_TEXT_CHARS)
|
|
519
|
-
throw new CliError("validation_error", `max_text_chars can be at most ${MAX_TEXT_CHARS}: the document readers return at most that many characters`);
|
|
520
|
-
return value;
|
|
521
|
-
}, "checkTextLimit");
|
|
522
|
-
var textLimit = /* @__PURE__ */ __name((env, name) => activeProfile(env, name).max_text_chars ?? readConfig(env).defaults?.max_text_chars ?? MAX_TEXT_CHARS, "textLimit");
|
|
523
|
-
var transcriptsOf = /* @__PURE__ */ __name((env, name) => {
|
|
524
|
-
const profile = activeProfile(env, name);
|
|
525
|
-
return { mode: profile.transcripts, words: profile.transcript_words ?? [...TRANSCRIPT_WORDS] };
|
|
526
|
-
}, "transcriptsOf");
|
|
527
|
-
var pictureSearch = /* @__PURE__ */ __name((env, name) => activeProfile(env, name).picture_search ?? false, "pictureSearch");
|
|
528
|
-
var googleAppOf = /* @__PURE__ */ __name((env, { file, clientId, profile } = {}) => {
|
|
529
|
-
const own = file || clientId || env.DRIVE_GOOGLE_CLIENT_ID;
|
|
530
|
-
const config = own ? void 0 : readConfig(env);
|
|
531
|
-
const configClientId = (profile === void 0 ? void 0 : config?.profiles[profileName(profile)]?.google_client_id) ?? config?.defaults?.google_client_id;
|
|
532
|
-
return googleApp({ env, prefix: "DRIVE", clientFile: file, clientId, configClientId });
|
|
533
|
-
}, "googleAppOf");
|
|
534
|
-
var application = /* @__PURE__ */ __name((env, choice = {}) => googleAppOf(env, choice).client, "application");
|
|
535
|
-
var selectedFolders = /* @__PURE__ */ __name((env, profile, filter = {}) => activeProfile(env, profile).roots.flatMap((id) => filter.id === void 0 || id === filter.id ? [{ id }] : []), "selectedFolders");
|
|
536
|
-
var configuredSessions = /* @__PURE__ */ __name((env, filter, knownPermissions) => Object.entries(readConfig(env, knownPermissions).profiles).flatMap(([name, row]) => (filter.profile === void 0 || filter.profile === name) && (filter.storage === void 0 || filter.storage === row.storage) ? [{ profile: name, selected_folders: row.roots.length, storage: row.storage }] : []), "configuredSessions");
|
|
537
|
-
var maxAddProfiles = /* @__PURE__ */ __name((env) => readConfig(env).defaults?.max_add_profiles ?? DEFAULT_ADD_PROFILES, "maxAddProfiles");
|
|
538
|
-
var checkAddProfiles = /* @__PURE__ */ __name((value) => {
|
|
539
|
-
if (typeof value !== "number" || !Number.isInteger(value) || value < 1 || value > MOST_ADD_PROFILES)
|
|
540
|
-
throw new CliError("validation_error", `max_add_profiles is a whole number from 1 to ${MOST_ADD_PROFILES}`);
|
|
541
|
-
return value;
|
|
542
|
-
}, "checkAddProfiles");
|
|
543
|
-
var profileLocked = /* @__PURE__ */ __name((lock, named) => new CliError("permission_error", `this process is locked to profile ${lock} (DRIVE_PROFILE_LOCK) \u2014 ${named} is refused`, {
|
|
544
|
-
reason: "profile.locked"
|
|
545
|
-
}), "profileLocked");
|
|
546
|
-
var profileRequired = /* @__PURE__ */ __name((choices, how = "drive <profile> \u2026") => new CliError("validation_error", choices.length ? `name a profile: ${how} \u2014 profiles here: ${choices.join(", ")} (or set DRIVE_PROFILE)` : "no profiles here yet; create one with drive personal session start (any name in place of personal)", { reason: "profile.required", profiles: [...choices] }), "profileRequired");
|
|
547
|
-
|
|
548
|
-
export {
|
|
549
|
-
oauthClientReport,
|
|
550
|
-
permissionKeys,
|
|
551
|
-
permissionNames,
|
|
552
|
-
DEFAULT_LEVELS,
|
|
553
|
-
methodPolicyKeys,
|
|
554
|
-
sessionRow,
|
|
555
|
-
fileRow,
|
|
556
|
-
transcriptRow,
|
|
557
|
-
TRANSCRIPTS_QUERY,
|
|
558
|
-
SESSIONS_QUERY,
|
|
559
|
-
FILES_QUERY,
|
|
560
|
-
bindQuery,
|
|
561
|
-
termsOf,
|
|
562
|
-
driveFileQuery,
|
|
563
|
-
findTranscripts,
|
|
564
|
-
transcriptQuery,
|
|
565
|
-
DEFAULTS_ONLY,
|
|
566
|
-
PROFILE_ONLY,
|
|
567
|
-
SETTING_NAMES,
|
|
568
|
-
configuration,
|
|
569
|
-
paths,
|
|
570
|
-
configPath,
|
|
571
|
-
inspectConfig,
|
|
572
|
-
configIssues,
|
|
573
|
-
refusal,
|
|
574
|
-
readConfig,
|
|
575
|
-
writeConfig,
|
|
576
|
-
withDefaults,
|
|
577
|
-
profileName,
|
|
578
|
-
fileId,
|
|
579
|
-
unknownProfile,
|
|
580
|
-
activeProfile,
|
|
581
|
-
checkTextLimit,
|
|
582
|
-
textLimit,
|
|
583
|
-
transcriptsOf,
|
|
584
|
-
pictureSearch,
|
|
585
|
-
googleAppOf,
|
|
586
|
-
application,
|
|
587
|
-
selectedFolders,
|
|
588
|
-
configuredSessions,
|
|
589
|
-
maxAddProfiles,
|
|
590
|
-
checkAddProfiles,
|
|
591
|
-
profileLocked,
|
|
592
|
-
profileRequired
|
|
593
|
-
};
|