@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
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
__name
|
|
5
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
6
|
+
|
|
7
|
+
// node_modules/.pnpm/@ungap+structured-clone@1.4.0/node_modules/@ungap/structured-clone/esm/types.js
|
|
8
|
+
var VOID = -1;
|
|
9
|
+
var PRIMITIVE = 0;
|
|
10
|
+
var ARRAY = 1;
|
|
11
|
+
var OBJECT = 2;
|
|
12
|
+
var DATE = 3;
|
|
13
|
+
var REGEXP = 4;
|
|
14
|
+
var MAP = 5;
|
|
15
|
+
var SET = 6;
|
|
16
|
+
var ERROR = 7;
|
|
17
|
+
var BIGINT = 8;
|
|
18
|
+
|
|
19
|
+
// node_modules/.pnpm/@ungap+structured-clone@1.4.0/node_modules/@ungap/structured-clone/esm/deserialize.js
|
|
20
|
+
var { defineProperty } = Object;
|
|
21
|
+
var env = typeof self === "object" ? self : globalThis;
|
|
22
|
+
var guard = /* @__PURE__ */ __name((name, init) => {
|
|
23
|
+
switch (name) {
|
|
24
|
+
case "Function":
|
|
25
|
+
case "SharedWorker":
|
|
26
|
+
case "Worker":
|
|
27
|
+
case "eval":
|
|
28
|
+
case "setInterval":
|
|
29
|
+
case "setTimeout":
|
|
30
|
+
throw new TypeError("unable to deserialize " + name);
|
|
31
|
+
}
|
|
32
|
+
return new env[name](init);
|
|
33
|
+
}, "guard");
|
|
34
|
+
var deserializer = /* @__PURE__ */ __name(($, _) => {
|
|
35
|
+
const as = /* @__PURE__ */ __name((out, index) => {
|
|
36
|
+
$.set(index, out);
|
|
37
|
+
return out;
|
|
38
|
+
}, "as");
|
|
39
|
+
const unpair = /* @__PURE__ */ __name((index) => {
|
|
40
|
+
if ($.has(index))
|
|
41
|
+
return $.get(index);
|
|
42
|
+
const [type, value] = _[index];
|
|
43
|
+
switch (type) {
|
|
44
|
+
case PRIMITIVE:
|
|
45
|
+
case VOID:
|
|
46
|
+
return as(value, index);
|
|
47
|
+
case ARRAY: {
|
|
48
|
+
const arr = as([], index);
|
|
49
|
+
for (const index2 of value)
|
|
50
|
+
arr.push(unpair(index2));
|
|
51
|
+
return arr;
|
|
52
|
+
}
|
|
53
|
+
case OBJECT: {
|
|
54
|
+
const object = as({}, index);
|
|
55
|
+
for (const [key, index2] of value) {
|
|
56
|
+
const k = unpair(key), value2 = unpair(index2);
|
|
57
|
+
if (k === "__proto__") defineProperty(object, k, {
|
|
58
|
+
value: value2,
|
|
59
|
+
configurable: true,
|
|
60
|
+
enumerable: true,
|
|
61
|
+
writable: true
|
|
62
|
+
});
|
|
63
|
+
else object[k] = value2;
|
|
64
|
+
}
|
|
65
|
+
return object;
|
|
66
|
+
}
|
|
67
|
+
case DATE:
|
|
68
|
+
return as(new Date(value), index);
|
|
69
|
+
case REGEXP: {
|
|
70
|
+
const { source, flags } = value;
|
|
71
|
+
return as(new RegExp(source, flags), index);
|
|
72
|
+
}
|
|
73
|
+
case MAP: {
|
|
74
|
+
const map = as(/* @__PURE__ */ new Map(), index);
|
|
75
|
+
for (const [key, index2] of value)
|
|
76
|
+
map.set(unpair(key), unpair(index2));
|
|
77
|
+
return map;
|
|
78
|
+
}
|
|
79
|
+
case SET: {
|
|
80
|
+
const set = as(/* @__PURE__ */ new Set(), index);
|
|
81
|
+
for (const index2 of value)
|
|
82
|
+
set.add(unpair(index2));
|
|
83
|
+
return set;
|
|
84
|
+
}
|
|
85
|
+
case ERROR: {
|
|
86
|
+
const { name, message } = value;
|
|
87
|
+
return as(
|
|
88
|
+
typeof env[name] === "function" ? guard(name, message) : new Error(message),
|
|
89
|
+
index
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
case BIGINT:
|
|
93
|
+
return as(BigInt(value), index);
|
|
94
|
+
case "BigInt":
|
|
95
|
+
return as(Object(BigInt(value)), index);
|
|
96
|
+
case "ArrayBuffer":
|
|
97
|
+
return as(new Uint8Array(value).buffer, value);
|
|
98
|
+
case "DataView": {
|
|
99
|
+
const { buffer } = new Uint8Array(value);
|
|
100
|
+
return as(new DataView(buffer), value);
|
|
101
|
+
}
|
|
102
|
+
case "-0":
|
|
103
|
+
return -0;
|
|
104
|
+
}
|
|
105
|
+
return as(guard(type, value), index);
|
|
106
|
+
}, "unpair");
|
|
107
|
+
return unpair;
|
|
108
|
+
}, "deserializer");
|
|
109
|
+
var deserialize = /* @__PURE__ */ __name((serialized) => deserializer(/* @__PURE__ */ new Map(), serialized)(0), "deserialize");
|
|
110
|
+
|
|
111
|
+
// node_modules/.pnpm/@ungap+structured-clone@1.4.0/node_modules/@ungap/structured-clone/esm/serialize.js
|
|
112
|
+
var EMPTY = "";
|
|
113
|
+
var { toString } = {};
|
|
114
|
+
var { keys, is } = Object;
|
|
115
|
+
var typeOf = /* @__PURE__ */ __name((value) => {
|
|
116
|
+
const type = typeof value;
|
|
117
|
+
if (type !== "object" || !value)
|
|
118
|
+
return [PRIMITIVE, type];
|
|
119
|
+
const asString = toString.call(value).slice(8, -1);
|
|
120
|
+
switch (asString) {
|
|
121
|
+
case "Array":
|
|
122
|
+
return [ARRAY, EMPTY];
|
|
123
|
+
case "Object":
|
|
124
|
+
return [OBJECT, EMPTY];
|
|
125
|
+
case "Date":
|
|
126
|
+
return [DATE, EMPTY];
|
|
127
|
+
case "RegExp":
|
|
128
|
+
return [REGEXP, EMPTY];
|
|
129
|
+
case "Map":
|
|
130
|
+
return [MAP, EMPTY];
|
|
131
|
+
case "Set":
|
|
132
|
+
return [SET, EMPTY];
|
|
133
|
+
case "DataView":
|
|
134
|
+
return [ARRAY, asString];
|
|
135
|
+
}
|
|
136
|
+
if (asString.includes("Array"))
|
|
137
|
+
return [ARRAY, asString];
|
|
138
|
+
if (value instanceof Error)
|
|
139
|
+
return [ERROR, value.name || "Error"];
|
|
140
|
+
return [OBJECT, asString];
|
|
141
|
+
}, "typeOf");
|
|
142
|
+
var shouldSkip = /* @__PURE__ */ __name(([TYPE, type]) => TYPE === PRIMITIVE && (type === "function" || type === "symbol"), "shouldSkip");
|
|
143
|
+
var serializer = /* @__PURE__ */ __name((strict, json, $, _) => {
|
|
144
|
+
const as = /* @__PURE__ */ __name((out, value) => {
|
|
145
|
+
const index = _.push(out) - 1;
|
|
146
|
+
$.set(value, index);
|
|
147
|
+
return index;
|
|
148
|
+
}, "as");
|
|
149
|
+
const pair = /* @__PURE__ */ __name((value) => {
|
|
150
|
+
if ($.has(value))
|
|
151
|
+
return $.get(value);
|
|
152
|
+
let [TYPE, type] = typeOf(value);
|
|
153
|
+
switch (TYPE) {
|
|
154
|
+
case PRIMITIVE: {
|
|
155
|
+
let entry = value;
|
|
156
|
+
switch (type) {
|
|
157
|
+
case "bigint":
|
|
158
|
+
TYPE = BIGINT;
|
|
159
|
+
entry = value.toString();
|
|
160
|
+
break;
|
|
161
|
+
case "number":
|
|
162
|
+
if (!value && is(value, -0))
|
|
163
|
+
return _.push(["-0"]) - 1;
|
|
164
|
+
break;
|
|
165
|
+
case "function":
|
|
166
|
+
case "symbol":
|
|
167
|
+
if (strict)
|
|
168
|
+
throw new TypeError("unable to serialize " + type);
|
|
169
|
+
entry = null;
|
|
170
|
+
break;
|
|
171
|
+
case "undefined":
|
|
172
|
+
return as([VOID], value);
|
|
173
|
+
}
|
|
174
|
+
return as([TYPE, entry], value);
|
|
175
|
+
}
|
|
176
|
+
case ARRAY: {
|
|
177
|
+
if (type) {
|
|
178
|
+
let spread = value;
|
|
179
|
+
if (type === "DataView") {
|
|
180
|
+
spread = new Uint8Array(value.buffer);
|
|
181
|
+
} else if (type === "ArrayBuffer") {
|
|
182
|
+
spread = new Uint8Array(value);
|
|
183
|
+
}
|
|
184
|
+
return as([type, [...spread]], value);
|
|
185
|
+
}
|
|
186
|
+
const arr = [];
|
|
187
|
+
const index = as([TYPE, arr], value);
|
|
188
|
+
for (const entry of value)
|
|
189
|
+
arr.push(pair(entry));
|
|
190
|
+
return index;
|
|
191
|
+
}
|
|
192
|
+
case OBJECT: {
|
|
193
|
+
if (type) {
|
|
194
|
+
switch (type) {
|
|
195
|
+
case "BigInt":
|
|
196
|
+
return as([type, value.toString()], value);
|
|
197
|
+
case "Boolean":
|
|
198
|
+
case "Number":
|
|
199
|
+
case "String":
|
|
200
|
+
return as([type, value.valueOf()], value);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
if (json && "toJSON" in value)
|
|
204
|
+
return pair(value.toJSON());
|
|
205
|
+
const entries = [];
|
|
206
|
+
const index = as([TYPE, entries], value);
|
|
207
|
+
for (const key of keys(value)) {
|
|
208
|
+
if (strict || !shouldSkip(typeOf(value[key])))
|
|
209
|
+
entries.push([pair(key), pair(value[key])]);
|
|
210
|
+
}
|
|
211
|
+
return index;
|
|
212
|
+
}
|
|
213
|
+
case DATE:
|
|
214
|
+
return as([TYPE, isNaN(value.getTime()) ? EMPTY : value.toISOString()], value);
|
|
215
|
+
case REGEXP: {
|
|
216
|
+
const { source, flags } = value;
|
|
217
|
+
return as([TYPE, { source, flags }], value);
|
|
218
|
+
}
|
|
219
|
+
case MAP: {
|
|
220
|
+
const entries = [];
|
|
221
|
+
const index = as([TYPE, entries], value);
|
|
222
|
+
for (const [key, entry] of value) {
|
|
223
|
+
if (strict || !(shouldSkip(typeOf(key)) || shouldSkip(typeOf(entry))))
|
|
224
|
+
entries.push([pair(key), pair(entry)]);
|
|
225
|
+
}
|
|
226
|
+
return index;
|
|
227
|
+
}
|
|
228
|
+
case SET: {
|
|
229
|
+
const entries = [];
|
|
230
|
+
const index = as([TYPE, entries], value);
|
|
231
|
+
for (const entry of value) {
|
|
232
|
+
if (strict || !shouldSkip(typeOf(entry)))
|
|
233
|
+
entries.push(pair(entry));
|
|
234
|
+
}
|
|
235
|
+
return index;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
const { message } = value;
|
|
239
|
+
return as([TYPE, { name: type, message }], value);
|
|
240
|
+
}, "pair");
|
|
241
|
+
return pair;
|
|
242
|
+
}, "serializer");
|
|
243
|
+
var serialize = /* @__PURE__ */ __name((value, { json, lossy } = {}) => {
|
|
244
|
+
const _ = [];
|
|
245
|
+
return serializer(!(json || lossy), !!json, /* @__PURE__ */ new Map(), _)(value), _;
|
|
246
|
+
}, "serialize");
|
|
247
|
+
|
|
248
|
+
// node_modules/.pnpm/@ungap+structured-clone@1.4.0/node_modules/@ungap/structured-clone/esm/index.js
|
|
249
|
+
var esm_default = typeof structuredClone === "function" ? (
|
|
250
|
+
/* c8 ignore start */
|
|
251
|
+
(any, options) => options && ("json" in options || "lossy" in options) ? deserialize(serialize(any, options)) : structuredClone(any)
|
|
252
|
+
) : (any, options) => deserialize(serialize(any, options));
|
|
253
|
+
|
|
254
|
+
// node_modules/.pnpm/unist-util-position@5.0.0/node_modules/unist-util-position/lib/index.js
|
|
255
|
+
var pointEnd = point("end");
|
|
256
|
+
var pointStart = point("start");
|
|
257
|
+
function point(type) {
|
|
258
|
+
return point2;
|
|
259
|
+
function point2(node) {
|
|
260
|
+
const point3 = node && node.position && node.position[type] || {};
|
|
261
|
+
if (typeof point3.line === "number" && point3.line > 0 && typeof point3.column === "number" && point3.column > 0) {
|
|
262
|
+
return {
|
|
263
|
+
line: point3.line,
|
|
264
|
+
column: point3.column,
|
|
265
|
+
offset: typeof point3.offset === "number" && point3.offset > -1 ? point3.offset : void 0
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
__name(point2, "point");
|
|
270
|
+
}
|
|
271
|
+
__name(point, "point");
|
|
272
|
+
function position(node) {
|
|
273
|
+
const start = pointStart(node);
|
|
274
|
+
const end = pointEnd(node);
|
|
275
|
+
if (start && end) {
|
|
276
|
+
return { start, end };
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
__name(position, "position");
|
|
280
|
+
|
|
281
|
+
export {
|
|
282
|
+
esm_default,
|
|
283
|
+
pointEnd,
|
|
284
|
+
pointStart,
|
|
285
|
+
position
|
|
286
|
+
};
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
__name
|
|
5
5
|
} from "./chunk-ZVVMGPBJ.js";
|
|
6
6
|
|
|
7
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/runs/secrets.js
|
|
8
8
|
var SECRET_WORDS = /* @__PURE__ */ new Set([
|
|
9
9
|
"authorization",
|
|
10
10
|
"cookie",
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
__name
|
|
5
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
6
|
+
|
|
7
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/files/safe-name.js
|
|
8
|
+
import { basename, extname } from "node:path";
|
|
9
|
+
var MOST_NAME_BYTES = 200;
|
|
10
|
+
var bytesOf = /* @__PURE__ */ __name((text) => Buffer.byteLength(text, "utf8"), "bytesOf");
|
|
11
|
+
var shortened = /* @__PURE__ */ __name((name, most) => {
|
|
12
|
+
if (bytesOf(name) <= most)
|
|
13
|
+
return name;
|
|
14
|
+
const extension = extname(name);
|
|
15
|
+
const kept = bytesOf(extension) <= 32 ? extension : "";
|
|
16
|
+
let stem = "";
|
|
17
|
+
for (const character of name.slice(0, name.length - kept.length)) {
|
|
18
|
+
if (bytesOf(stem + character) + bytesOf(kept) > most)
|
|
19
|
+
break;
|
|
20
|
+
stem += character;
|
|
21
|
+
}
|
|
22
|
+
return stem + kept;
|
|
23
|
+
}, "shortened");
|
|
24
|
+
var safeName = /* @__PURE__ */ __name((name, platform = process.platform) => {
|
|
25
|
+
let plain = name === void 0 ? "" : basename(name.replaceAll("\\", "/")).replace(/[\p{Cc}---]/gu, "").replace(/^\.+/, "");
|
|
26
|
+
if (platform === "win32") {
|
|
27
|
+
plain = plain.replace(/[<>:"|?*]/g, "_").replace(/[. ]+$/, "");
|
|
28
|
+
if (/^(con|prn|aux|nul|com[1-9]|lpt[1-9])(?:\.|$)/i.test(plain))
|
|
29
|
+
return void 0;
|
|
30
|
+
}
|
|
31
|
+
return plain === "" ? void 0 : shortened(plain, MOST_NAME_BYTES);
|
|
32
|
+
}, "safeName");
|
|
33
|
+
|
|
34
|
+
export {
|
|
35
|
+
safeName
|
|
36
|
+
};
|
|
@@ -1,211 +1,77 @@
|
|
|
1
1
|
import { createRequire as __bundleRequire } from "node:module";
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
|
-
import {
|
|
4
|
-
refuseLacking
|
|
5
|
-
} from "./chunk-L46C6HQ7.js";
|
|
6
3
|
import {
|
|
7
4
|
servingProfiles
|
|
8
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-JVM75M4H.js";
|
|
6
|
+
import {
|
|
7
|
+
refuseLacking
|
|
8
|
+
} from "./chunk-PB6ACIME.js";
|
|
9
9
|
import {
|
|
10
10
|
DEFAULT_PACE,
|
|
11
11
|
FloodMemory,
|
|
12
|
-
OFFLINE,
|
|
13
12
|
Pacer,
|
|
14
13
|
RecipientList,
|
|
15
|
-
capability,
|
|
16
14
|
ceilingRefusal,
|
|
17
|
-
chatIdIn,
|
|
18
15
|
floodPathFor,
|
|
19
16
|
guardFor,
|
|
20
17
|
holdEnd,
|
|
21
18
|
pacePathFor,
|
|
22
|
-
profilesOnAccount,
|
|
23
19
|
recipientsPathFor,
|
|
20
|
+
refuseUnknownPermissionKeys,
|
|
24
21
|
servicesFor,
|
|
25
|
-
|
|
22
|
+
terminalAsker,
|
|
26
23
|
waitForTurn
|
|
27
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-SSFGSY77.js";
|
|
25
|
+
import {
|
|
26
|
+
OFFLINE,
|
|
27
|
+
chatIdIn,
|
|
28
|
+
profilesOnAccount
|
|
29
|
+
} from "./chunk-3YCUYFTD.js";
|
|
30
|
+
import {
|
|
31
|
+
capability,
|
|
32
|
+
throughWrapper
|
|
33
|
+
} from "./chunk-G2KKMQRN.js";
|
|
28
34
|
import {
|
|
29
|
-
AUTHORITY_KEY,
|
|
30
35
|
CEILING_KEY,
|
|
31
|
-
DEFAULT_PERMISSIONS,
|
|
32
|
-
KEYED_UNDER_HOUSEKEEPING,
|
|
33
|
-
WRITE_KEYS,
|
|
34
36
|
asFirstWord,
|
|
35
37
|
baseContext,
|
|
36
|
-
codeOf,
|
|
37
|
-
currentOperation,
|
|
38
38
|
environmentOf,
|
|
39
39
|
fetchesUnder,
|
|
40
|
-
issueMessage,
|
|
41
|
-
keyForCommand,
|
|
42
40
|
levelFor,
|
|
43
41
|
limitBatch,
|
|
44
|
-
permissionIssues,
|
|
45
|
-
publicIssue,
|
|
46
42
|
readKeysForCommand,
|
|
47
43
|
recalledAccount,
|
|
48
44
|
rememberAccount,
|
|
49
|
-
rootOf2 as rootOf
|
|
50
|
-
|
|
51
|
-
} from "./chunk-SERXSCN3.js";
|
|
45
|
+
rootOf2 as rootOf
|
|
46
|
+
} from "./chunk-JRED7BNX.js";
|
|
52
47
|
import {
|
|
53
48
|
providerErrorKey
|
|
54
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-PMAV3RNP.js";
|
|
50
|
+
import {
|
|
51
|
+
codeOf,
|
|
52
|
+
currentOperation
|
|
53
|
+
} from "./chunk-QK7GKFKB.js";
|
|
54
|
+
import {
|
|
55
|
+
openStore
|
|
56
|
+
} from "./chunk-E2TMWONO.js";
|
|
55
57
|
import {
|
|
56
58
|
chatReferenceOf,
|
|
57
59
|
ensureAccount,
|
|
58
60
|
foldName,
|
|
59
61
|
isId,
|
|
60
|
-
openStore,
|
|
61
62
|
pickPerson
|
|
62
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-B6JC5RS3.js";
|
|
63
64
|
import {
|
|
64
65
|
isCliFailure
|
|
65
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-VBIZD5V5.js";
|
|
66
67
|
import {
|
|
67
68
|
CliError
|
|
68
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-IBQZT2YD.js";
|
|
69
70
|
import {
|
|
70
71
|
__name
|
|
71
72
|
} from "./chunk-ZVVMGPBJ.js";
|
|
72
73
|
|
|
73
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
74
|
-
import { openSync } from "node:fs";
|
|
75
|
-
import { createInterface } from "node:readline";
|
|
76
|
-
import { ReadStream } from "node:tty";
|
|
77
|
-
var fromTerminal = /* @__PURE__ */ __name(async (question) => {
|
|
78
|
-
if (!process.stdin.isTTY || !process.stderr.isTTY)
|
|
79
|
-
return null;
|
|
80
|
-
let input;
|
|
81
|
-
try {
|
|
82
|
-
input = new ReadStream(openSync("/dev/tty", "r"));
|
|
83
|
-
} catch {
|
|
84
|
-
return null;
|
|
85
|
-
}
|
|
86
|
-
const reader = createInterface({ input, output: process.stderr, terminal: true });
|
|
87
|
-
try {
|
|
88
|
-
return await new Promise((resolve, reject) => {
|
|
89
|
-
const cancel = /* @__PURE__ */ __name(() => reject(new CliError("cancelled", "cancelled \u2014 nothing was done")), "cancel");
|
|
90
|
-
reader.once("SIGINT", cancel);
|
|
91
|
-
reader.once("close", cancel);
|
|
92
|
-
reader.question(question, resolve);
|
|
93
|
-
});
|
|
94
|
-
} finally {
|
|
95
|
-
reader.close();
|
|
96
|
-
input.destroy();
|
|
97
|
-
}
|
|
98
|
-
}, "fromTerminal");
|
|
99
|
-
var what = /* @__PURE__ */ __name((key, { chatId, count, personIds, forEveryone }) => [
|
|
100
|
-
key,
|
|
101
|
-
forEveryone ? "for everyone" : void 0,
|
|
102
|
-
count !== void 0 ? `${count} ${count === 1 ? "item" : "items"}` : void 0,
|
|
103
|
-
personIds?.length ? `${personIds.length} ${personIds.length === 1 ? "person" : "people"}` : void 0,
|
|
104
|
-
chatId !== null ? `in chat ${chatId}` : void 0
|
|
105
|
-
].filter(Boolean).join(", "), "what");
|
|
106
|
-
var answerOf = /* @__PURE__ */ __name(async (command, question) => {
|
|
107
|
-
const given = command.optsWithGlobals();
|
|
108
|
-
if (given.json === true || given.jsonl === true)
|
|
109
|
-
return null;
|
|
110
|
-
return (environmentOf(command).answer ?? fromTerminal)(question);
|
|
111
|
-
}, "answerOf");
|
|
112
|
-
var terminalAsker = /* @__PURE__ */ __name((command) => async (key, request) => {
|
|
113
|
-
if (environmentOf(command).agent)
|
|
114
|
-
return;
|
|
115
|
-
const flag = skipFlagFor(key);
|
|
116
|
-
const given = command.optsWithGlobals();
|
|
117
|
-
if (flag === "--yes" ? given.yes === true : given.allowDangerous === true)
|
|
118
|
-
return;
|
|
119
|
-
const machine = given.json === true || given.jsonl === true;
|
|
120
|
-
const answer = machine ? null : await (environmentOf(command).answer ?? fromTerminal)(`${what(key, request)} \u2014 go ahead? [y/N] `);
|
|
121
|
-
if (answer === null) {
|
|
122
|
-
throw new CliError("confirmation_required", `${key} asks before it acts (its permission level is ask), and nobody is at a terminal to answer \u2014 add ${flag} to go ahead`, { permission: key });
|
|
123
|
-
}
|
|
124
|
-
if (!/^\s*y(es)?\s*$/i.test(answer))
|
|
125
|
-
throw new CliError("cancelled", `${key}: not done \u2014 the answer was no`);
|
|
126
|
-
}, "terminalAsker");
|
|
127
|
-
|
|
128
|
-
// 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/cli/permission-keys.js
|
|
129
|
-
var HOUSEKEEPING = /* @__PURE__ */ new Set([
|
|
130
|
-
"help",
|
|
131
|
-
"guide",
|
|
132
|
-
"config",
|
|
133
|
-
"session",
|
|
134
|
-
"doctor",
|
|
135
|
-
"commands",
|
|
136
|
-
"complete",
|
|
137
|
-
"upgrade",
|
|
138
|
-
"skill",
|
|
139
|
-
"mcp",
|
|
140
|
-
"runs"
|
|
141
|
-
]);
|
|
142
|
-
var commandPathKey = /* @__PURE__ */ __name((path) => path[0] === void 0 || HOUSEKEEPING.has(path[0]) && !KEYED_UNDER_HOUSEKEEPING.has(path.join(".")) ? null : path.join("."), "commandPathKey");
|
|
143
|
-
var commandPermissions = /* @__PURE__ */ __name(({ keyOf = commandPathKey, extra = [], defaults = {}, alsoChecks } = {}) => ({
|
|
144
|
-
keyOf,
|
|
145
|
-
extra: [AUTHORITY_KEY, ...extra],
|
|
146
|
-
defaults: { ...DEFAULT_PERMISSIONS, ...defaults },
|
|
147
|
-
...alsoChecks ? { alsoChecks } : {}
|
|
148
|
-
}), "commandPermissions");
|
|
149
|
-
var pathOf = /* @__PURE__ */ __name((command) => {
|
|
150
|
-
const words = [];
|
|
151
|
-
for (let at = command; at?.parent; at = at.parent)
|
|
152
|
-
words.unshift(at.name());
|
|
153
|
-
return words;
|
|
154
|
-
}, "pathOf");
|
|
155
|
-
var rootOf2 = /* @__PURE__ */ __name((command) => {
|
|
156
|
-
let at = command;
|
|
157
|
-
while (at.parent)
|
|
158
|
-
at = at.parent;
|
|
159
|
-
return at;
|
|
160
|
-
}, "rootOf");
|
|
161
|
-
var everyCommand = /* @__PURE__ */ __name((command) => [command, ...command.commands.flatMap(everyCommand)], "everyCommand");
|
|
162
|
-
var knownPermissionKeys = /* @__PURE__ */ __name((command, keyOf = (one) => keyForCommand(pathOf(one)), extra = []) => {
|
|
163
|
-
const known = /* @__PURE__ */ new Set();
|
|
164
|
-
const add = /* @__PURE__ */ __name((key) => {
|
|
165
|
-
for (let parts = key.split("."); parts.length > 0; parts = parts.slice(0, -1))
|
|
166
|
-
known.add(parts.join("."));
|
|
167
|
-
}, "add");
|
|
168
|
-
if (typeof keyOf !== "function") {
|
|
169
|
-
for (const one of everyCommand(rootOf2(command))) {
|
|
170
|
-
const key = keyOf.keyOf(pathOf(one));
|
|
171
|
-
if (key)
|
|
172
|
-
add(key);
|
|
173
|
-
}
|
|
174
|
-
for (const key of [...keyOf.extra, ...extra])
|
|
175
|
-
add(key);
|
|
176
|
-
return known;
|
|
177
|
-
}
|
|
178
|
-
for (const one of everyCommand(rootOf2(command))) {
|
|
179
|
-
const own = keyOf(one);
|
|
180
|
-
const key = own === void 0 ? keyForCommand(pathOf(one)) : own;
|
|
181
|
-
if (key)
|
|
182
|
-
add(key);
|
|
183
|
-
}
|
|
184
|
-
for (const key of [...WRITE_KEYS, ...extra])
|
|
185
|
-
add(key);
|
|
186
|
-
return known;
|
|
187
|
-
}, "knownPermissionKeys");
|
|
188
|
-
var knownBeside = /* @__PURE__ */ __name((key, known) => {
|
|
189
|
-
const parent = key.split(".").slice(0, -1).join(".");
|
|
190
|
-
const depth = parent === "" ? 1 : parent.split(".").length + 1;
|
|
191
|
-
return [...known].filter((one) => one.split(".").length === depth && (parent === "" || one.startsWith(`${parent}.`))).sort();
|
|
192
|
-
}, "knownBeside");
|
|
193
|
-
var unknownPermissionKeys = /* @__PURE__ */ __name((levels, known) => Object.keys(levels).filter((key) => key !== CEILING_KEY && !known.has(key)), "unknownPermissionKeys");
|
|
194
|
-
var unknownPermissionIssues = /* @__PURE__ */ __name((command, settings, tool, keyOf) => {
|
|
195
|
-
const saved = settings.savedPermissions ?? Object.keys(settings.permissions).filter((key) => key !== CEILING_KEY && settings.permissionSources[key] !== "flag").map((key) => ({ key, at: ["profiles", settings.profile, "permissions", key] }));
|
|
196
|
-
return permissionIssues(saved, knownPermissionKeys(command, keyOf), { file: settings.configPath, tool }).map(publicIssue);
|
|
197
|
-
}, "unknownPermissionIssues");
|
|
198
|
-
var refuseUnknownPermissionKeys = /* @__PURE__ */ __name((command, settings, tool, keyOf) => {
|
|
199
|
-
const issues = unknownPermissionIssues(command, settings, tool, keyOf);
|
|
200
|
-
if (issues.length > 0)
|
|
201
|
-
throw new CliError("configuration_error", issueMessage(issues), { permission: issues[0]?.key });
|
|
202
|
-
const flagged = Object.keys(settings.permissions).filter((key2) => settings.permissionSources[key2] === "flag");
|
|
203
|
-
const [key] = unknownPermissionKeys(Object.fromEntries(flagged.map((one) => [one, true])), knownPermissionKeys(command, keyOf));
|
|
204
|
-
if (key !== void 0)
|
|
205
|
-
throw new CliError("validation_error", `--permission ${key} names no command`, { permission: key });
|
|
206
|
-
}, "refuseUnknownPermissionKeys");
|
|
207
|
-
|
|
208
|
-
// 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/cli/messenger/stored.js
|
|
74
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/cli/messenger/stored.js
|
|
209
75
|
var REKEY_PACING = { lockMs: 50, pauseMs: 25 };
|
|
210
76
|
var stored = /* @__PURE__ */ __name((messenger, { account, store, warn, events, pending, announcing, deletedWithoutChat, profile, rekeyed, rekeyPacing = REKEY_PACING, closing, namesFromStore, recipientIds, countsUnread = false, historyLimits, command = "cli" }) => {
|
|
211
77
|
let warned = false;
|
|
@@ -781,15 +647,15 @@ var keep = /* @__PURE__ */ __name(async (store, account, event, seenAt, among, c
|
|
|
781
647
|
}
|
|
782
648
|
}, "keep");
|
|
783
649
|
|
|
784
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
650
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/cli/messenger/flooded.js
|
|
785
651
|
var LONG_LIVED = /* @__PURE__ */ new Set(["self", "newSendId", "close", "formatMarkdown", "formatHtml", "storedChats"]);
|
|
786
652
|
var LISTENING = /* @__PURE__ */ new Set(["watch", "feed", "listen", "listenHistory"]);
|
|
787
653
|
var BLOCKING = /* @__PURE__ */ new Set(["frozen", "limited", "banned"]);
|
|
788
654
|
var chatOf = /* @__PURE__ */ __name((args) => typeof args[0] === "string" && /^-?\d+$/.test(args[0]) ? args[0] : void 0, "chatOf");
|
|
789
655
|
var flooded = /* @__PURE__ */ __name((messenger, memory, { name, warn, pacer }) => {
|
|
790
|
-
const kept = /* @__PURE__ */ __name(async (operation,
|
|
656
|
+
const kept = /* @__PURE__ */ __name(async (operation, what) => {
|
|
791
657
|
try {
|
|
792
|
-
await
|
|
658
|
+
await what();
|
|
793
659
|
} catch (error) {
|
|
794
660
|
warn(`could not remember ${name}'s wait (${error instanceof Error ? error.message : String(error)})`, {
|
|
795
661
|
event: "warning",
|
|
@@ -878,7 +744,7 @@ var flooded = /* @__PURE__ */ __name((messenger, memory, { name, warn, pacer })
|
|
|
878
744
|
});
|
|
879
745
|
}, "flooded");
|
|
880
746
|
|
|
881
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
747
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/cli/messenger/observed.js
|
|
882
748
|
var observed = /* @__PURE__ */ __name((messenger, events) => {
|
|
883
749
|
const timed = /* @__PURE__ */ __name(async (operation, named, work, after) => {
|
|
884
750
|
const write = currentOperation();
|
|
@@ -977,7 +843,7 @@ var byPart = /* @__PURE__ */ __name((batch, counts) => {
|
|
|
977
843
|
counts[part] = (counts[part] ?? 0) + items.length;
|
|
978
844
|
}, "byPart");
|
|
979
845
|
|
|
980
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
846
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/cli/messenger/context.js
|
|
981
847
|
var lazyStore = /* @__PURE__ */ __name((env, command, version) => {
|
|
982
848
|
let opened;
|
|
983
849
|
return {
|
|
@@ -1071,7 +937,7 @@ var settled = /* @__PURE__ */ __name(async (pending, ms) => {
|
|
|
1071
937
|
clearTimeout(timer);
|
|
1072
938
|
}
|
|
1073
939
|
}, "settled");
|
|
1074
|
-
var listened = /* @__PURE__ */ __name(({ run, operation, what
|
|
940
|
+
var listened = /* @__PURE__ */ __name(({ run, operation, what }, events, warn, waitMs) => {
|
|
1075
941
|
const abort = new AbortController();
|
|
1076
942
|
let closing = false;
|
|
1077
943
|
const ended = Promise.resolve().then(() => run(abort.signal)).catch((error) => {
|
|
@@ -1079,11 +945,11 @@ var listened = /* @__PURE__ */ __name(({ run, operation, what: what2 }, events,
|
|
|
1079
945
|
return;
|
|
1080
946
|
const warning = { event: "warning", code: "listen_failed", operation };
|
|
1081
947
|
events(warning);
|
|
1082
|
-
warn(`${
|
|
948
|
+
warn(`${what} arriving during this command are not saved: ${error instanceof Error ? error.message : String(error)}`, warning);
|
|
1083
949
|
});
|
|
1084
950
|
return {
|
|
1085
951
|
operation,
|
|
1086
|
-
what
|
|
952
|
+
what,
|
|
1087
953
|
closing: /* @__PURE__ */ __name(() => {
|
|
1088
954
|
closing = true;
|
|
1089
955
|
}, "closing"),
|
|
@@ -1174,10 +1040,10 @@ var connected = /* @__PURE__ */ __name((connection, { app, provider, name, delet
|
|
|
1174
1040
|
events(warning);
|
|
1175
1041
|
warn(text, warning);
|
|
1176
1042
|
}, "warned");
|
|
1177
|
-
passives.forEach(({ operation, what
|
|
1043
|
+
passives.forEach(({ operation, what }, at) => {
|
|
1178
1044
|
if (ended[at])
|
|
1179
1045
|
return;
|
|
1180
|
-
warned({ event: "warning", code: "store_not_written", operation }, `not saved to the local store: the messenger was still handing on ${
|
|
1046
|
+
warned({ event: "warning", code: "store_not_written", operation }, `not saved to the local store: the messenger was still handing on ${what} at exit`);
|
|
1181
1047
|
});
|
|
1182
1048
|
await settled(/* @__PURE__ */ new Set([...pending, ...announcing]), closeWaitMs);
|
|
1183
1049
|
closing.abort();
|
|
@@ -1236,14 +1102,14 @@ var warnUnserved = /* @__PURE__ */ __name(async (messenger, profile, { env, rend
|
|
|
1236
1102
|
const newest = (await store.chats.chatStats(account)).map((one) => one.newestAt).reduce((latest, at) => at !== null && (latest === null || at > latest) ? at : latest, null);
|
|
1237
1103
|
renderer.warn(`no \`${messenger.app.command} ${profile} serve\` keeps profile "${profile}" up to date \u2014 ` + (newest === null ? "the local store holds no messages yet" : `the newest stored message is from ${newest}`));
|
|
1238
1104
|
}, "warnUnserved");
|
|
1239
|
-
var
|
|
1105
|
+
var pathOf = /* @__PURE__ */ __name((command) => {
|
|
1240
1106
|
const words = [];
|
|
1241
1107
|
for (let at = command; at?.parent; at = at.parent)
|
|
1242
1108
|
words.unshift(at.name());
|
|
1243
1109
|
return words;
|
|
1244
1110
|
}, "pathOf");
|
|
1245
1111
|
var refuseDenied = /* @__PURE__ */ __name((command, settings) => {
|
|
1246
|
-
for (const key of readKeysForCommand(
|
|
1112
|
+
for (const key of readKeysForCommand(pathOf(command))) {
|
|
1247
1113
|
const { level, key: named } = levelFor(settings.permissions, key);
|
|
1248
1114
|
if (level !== "deny")
|
|
1249
1115
|
continue;
|
|
@@ -1266,7 +1132,7 @@ var messengerContext = /* @__PURE__ */ __name((command, messenger, resolving = {
|
|
|
1266
1132
|
const base = baseContext(command, (flags, options) => messenger.resolveSettings(flags, { ...options, ...resolving }));
|
|
1267
1133
|
const { profile } = base.settings;
|
|
1268
1134
|
refuseDenied(command, base.settings);
|
|
1269
|
-
refuseLacking(messenger,
|
|
1135
|
+
refuseLacking(messenger, pathOf(command));
|
|
1270
1136
|
refuseUnknownPermissionKeys(command, base.settings, app.command, messenger.permissionKey);
|
|
1271
1137
|
const warn = /* @__PURE__ */ __name((text, warning) => base.renderer.warn(text, warning), "warn");
|
|
1272
1138
|
const accountFor = /* @__PURE__ */ __name(() => {
|
|
@@ -1378,15 +1244,6 @@ var messengerContext = /* @__PURE__ */ __name((command, messenger, resolving = {
|
|
|
1378
1244
|
}, "messengerContext");
|
|
1379
1245
|
|
|
1380
1246
|
export {
|
|
1381
|
-
answerOf,
|
|
1382
|
-
terminalAsker,
|
|
1383
|
-
commandPathKey,
|
|
1384
|
-
commandPermissions,
|
|
1385
|
-
knownPermissionKeys,
|
|
1386
|
-
knownBeside,
|
|
1387
|
-
unknownPermissionKeys,
|
|
1388
|
-
unknownPermissionIssues,
|
|
1389
|
-
refuseUnknownPermissionKeys,
|
|
1390
1247
|
stored,
|
|
1391
1248
|
fill,
|
|
1392
1249
|
connectFor,
|