@wirecat/drive-cli 0.64.0 → 0.66.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/contracts/wirecat.json +2871 -0
- package/dist/bin/drive.js +2 -2
- package/dist/bin/drive.js.map +1 -1
- package/dist/browse.d.ts +1 -1
- package/dist/browse.d.ts.map +1 -1
- package/dist/browse.js +1 -1
- package/dist/bundle/{all-profiles-BPPT2AK5.js → all-profiles-WCQLIHUG.js} +14 -13
- package/dist/bundle/{anthropic-JW6GOJUD.js → anthropic-5RJMB6O7.js} +32 -16
- package/dist/bundle/{app-server-KAQIOJMZ.js → app-server-3RGYXPKG.js} +72 -58
- package/dist/bundle/{bun-UT7GNTPV.js → bun-L34VEKGG.js} +2 -2
- package/dist/bundle/{bun-sqlite-2OIVV3LS.js → bun-sqlite-H6IAXQXI.js} +12 -8
- package/dist/bundle/chunk-2AF77WMH.js +13 -0
- package/dist/bundle/{chunk-KVW4XNKB.js → chunk-2S3E2HVV.js} +107 -48
- package/dist/bundle/{chunk-IX7NQJLY.js → chunk-3NYH756U.js} +49 -116
- package/dist/bundle/chunk-3QFUDXMQ.js +53 -0
- package/dist/bundle/{chunk-5ZBR55US.js → chunk-3SDJIMZB.js} +1 -1
- package/dist/bundle/{chunk-AHB4OJCI.js → chunk-4UHBJSMI.js} +21735 -27143
- package/dist/bundle/chunk-5HVJK3ZJ.js +101 -0
- package/dist/bundle/{chunk-GSMYXGFR.js → chunk-5K54RZBK.js} +13 -5
- package/dist/bundle/{chunk-LOMW6F2E.js → chunk-5PLINHEY.js} +5403 -4847
- package/dist/bundle/{chunk-J62DI53V.js → chunk-5VDVGDOC.js} +1 -1
- package/dist/bundle/{chunk-66AF4FBW.js → chunk-5XLU4NN6.js} +4 -4
- package/dist/bundle/{chunk-4CNTID2X.js → chunk-6UJCCOZC.js} +4 -4
- package/dist/bundle/{chunk-G4KEKKDE.js → chunk-6X3KUFRQ.js} +60 -29
- package/dist/bundle/{chunk-QEAD2LF4.js → chunk-7EP4AU6A.js} +3 -3
- package/dist/bundle/{chunk-ZRZ4HTCK.js → chunk-7LT2G5BC.js} +171 -174
- package/dist/bundle/{chunk-2W464HAE.js → chunk-7ZGJRVBH.js} +7 -5
- package/dist/bundle/{chunk-FXBHOCJK.js → chunk-ADLS6FVG.js} +1 -1
- package/dist/bundle/{chunk-KG2XKEHL.js → chunk-ALE67WRR.js} +5 -5
- package/dist/bundle/{chunk-ZSZJLJIA.js → chunk-AP4MX247.js} +38 -28
- package/dist/bundle/{chunk-EWGVDFPT.js → chunk-BIJW6AYA.js} +41873 -36466
- package/dist/bundle/{chunk-B7XBIOMR.js → chunk-BQXSE645.js} +16 -16
- package/dist/bundle/{chunk-F2VDAG32.js → chunk-COGWKO2T.js} +3 -3
- package/dist/bundle/{chunk-EZ6O3ST3.js → chunk-D4MIMH2N.js} +12 -6
- package/dist/bundle/{chunk-4YRENUB5.js → chunk-D7KOAPG6.js} +2 -2
- package/dist/bundle/chunk-E2F2XIX6.js +224 -0
- package/dist/bundle/{chunk-36GPBPWM.js → chunk-FA2TNA5X.js} +3 -1
- package/dist/bundle/{chunk-SIOIMO62.js → chunk-FHBTQPA3.js} +69 -63
- package/dist/bundle/{chunk-34BIDKF4.js → chunk-FKKPVPZR.js} +649 -212
- package/dist/bundle/chunk-G4TNKBDX.js +185 -0
- package/dist/bundle/{chunk-2FEZ24DK.js → chunk-GVA3KTCD.js} +20 -20
- package/dist/bundle/chunk-GY4DAJSK.js +167 -0
- package/dist/bundle/{chunk-5OFA5EXE.js → chunk-H7XL6WTW.js} +2 -2
- package/dist/bundle/{chunk-K6BSB53R.js → chunk-HHRJPLFO.js} +1 -1
- package/dist/bundle/{chunk-P7DEGRZA.js → chunk-HPKE2GDP.js} +49 -28
- package/dist/bundle/{chunk-QXCKJUZY.js → chunk-HPSHQVJU.js} +633 -465
- package/dist/bundle/{chunk-BEZJA44H.js → chunk-HQBLJLYH.js} +7 -7
- package/dist/bundle/{chunk-JRXFW7HE.js → chunk-I5R5CMQR.js} +5 -5
- package/dist/bundle/{chunk-EJ4PNHPP.js → chunk-IIHZTV6V.js} +1 -1
- package/dist/bundle/{chunk-G3NULXOM.js → chunk-IRNDYNQX.js} +4 -4
- package/dist/bundle/{chunk-N622LRPM.js → chunk-JCHF7LZT.js} +4 -4
- package/dist/bundle/{chunk-WWCYTMAV.js → chunk-JHMEETXI.js} +2 -2
- package/dist/bundle/{chunk-ZF6GUZCE.js → chunk-JLCR24UM.js} +1 -1
- package/dist/bundle/{chunk-IDAK4DDK.js → chunk-JQXK3M5M.js} +1 -1
- package/dist/bundle/{chunk-KIN6PDFE.js → chunk-KOY5HUBY.js} +14 -5
- package/dist/bundle/{chunk-5HSRQ53R.js → chunk-KRG5X5PH.js} +2 -2
- package/dist/bundle/{chunk-VIJ6ACYB.js → chunk-LVAPSAHF.js} +8 -8
- package/dist/bundle/{chunk-OEVHZOHC.js → chunk-M7543RUJ.js} +50 -18
- package/dist/bundle/{chunk-BZ2ZKILM.js → chunk-MZWXTJ4O.js} +3 -3
- package/dist/bundle/{chunk-EC2XGDKJ.js → chunk-NK4GVFJH.js} +4 -4
- package/dist/bundle/chunk-NYECVHFH.js +10283 -0
- package/dist/bundle/{chunk-HW4UPST2.js → chunk-NYZS2LKF.js} +2 -2
- package/dist/bundle/chunk-O53WLYX3.js +72 -0
- package/dist/bundle/{chunk-IK6KH3RE.js → chunk-OIF4B526.js} +1 -1
- package/dist/bundle/{chunk-UJR272CP.js → chunk-OT7SQQJK.js} +359 -903
- package/dist/bundle/chunk-OZOQLAWK.js +72 -0
- package/dist/bundle/{chunk-VT2UFYPJ.js → chunk-P7HQFII6.js} +22 -15
- package/dist/bundle/{chunk-6G53ZFUT.js → chunk-PJGOQSE5.js} +1 -1
- package/dist/bundle/{chunk-OH3K2E7X.js → chunk-PKM55ZRR.js} +704 -1214
- package/dist/bundle/{chunk-GW3U6OLD.js → chunk-PUMDOCAF.js} +1 -1
- package/dist/bundle/{chunk-EQEGJVO2.js → chunk-QF7VL4C3.js} +1 -1
- package/dist/bundle/{chunk-CPMRM3GQ.js → chunk-QJ57PV55.js} +1941 -662
- package/dist/bundle/{chunk-O2QO5UZC.js → chunk-QSELSDWE.js} +13 -13
- package/dist/bundle/{chunk-BEUAICUD.js → chunk-SOOU5WO6.js} +2 -2
- package/dist/bundle/{chunk-46CD64J2.js → chunk-SZ6JFOL4.js} +269 -64
- package/dist/bundle/{chunk-UD55VB2N.js → chunk-T3ULDA7C.js} +3 -3
- package/dist/bundle/{chunk-E2LBCCTG.js → chunk-TAHISPDE.js} +5 -5
- package/dist/bundle/{chunk-6B37XO6B.js → chunk-TYLEICTX.js} +3 -3
- package/dist/bundle/{chunk-TNV2FXVK.js → chunk-UAKX6DP4.js} +5 -5
- package/dist/bundle/{chunk-VPLFD5RJ.js → chunk-UG3GHFGY.js} +4 -4
- package/dist/bundle/{chunk-B67BLRAI.js → chunk-ULXEW6FT.js} +3 -60
- package/dist/bundle/{chunk-C7WBNOYW.js → chunk-UNTIVT47.js} +26 -2
- package/dist/bundle/chunk-UQPW42HF.js +18 -0
- package/dist/bundle/{chunk-USLZE36C.js → chunk-V2WXTILT.js} +6 -6
- package/dist/bundle/{chunk-BDYWZ7JE.js → chunk-VQKNKJYL.js} +46 -7
- package/dist/bundle/{chunk-XPXKD63J.js → chunk-VR3YKXHL.js} +93 -31
- package/dist/bundle/{chunk-UIEA6FIV.js → chunk-VUUPFDRU.js} +27 -28
- package/dist/bundle/{chunk-KE4XPPRQ.js → chunk-WYTYHUFH.js} +1750 -138
- package/dist/bundle/{chunk-PBMSBCVB.js → chunk-XLGDNI4S.js} +1 -1
- package/dist/bundle/{chunk-3J5KAFNA.js → chunk-XVZNFA2P.js} +4935 -3623
- package/dist/bundle/chunk-Y5U4HIZS.js +71 -0
- package/dist/bundle/chunk-YTIPTHEE.js +47 -0
- package/dist/bundle/cli-KW6QQVS5.js +1101 -0
- package/dist/bundle/command-contract-CE543JBN.js +41 -0
- package/dist/bundle/command-server-entry-OC4E4DED.js +171 -0
- package/dist/bundle/{decode-HTOQ6S3V.js → decode-AH5ZLLDK.js} +8 -8
- package/dist/bundle/{dispatch-SH5SP6LA.js → dispatch-CDWZZ54Q.js} +9 -9
- package/dist/bundle/drive.js +13 -13
- package/dist/bundle/{echarts-KFHB6SLX.js → echarts-VC7MTXWY.js} +2 -2
- package/dist/bundle/{embed-YATFB2PN.js → embed-EPSQY6QG.js} +9 -9
- package/dist/bundle/{embedder-MQPDFGTJ.js → embedder-TK4U4TJR.js} +12 -12
- package/dist/bundle/entry-3VN23M7M.js +25 -0
- package/dist/bundle/{failure-4FQL4XJI.js → failure-WSVZOPFE.js} +4 -4
- package/dist/bundle/first-run-7ZYJ7EB3.js +30 -0
- package/dist/bundle/first-screen-CZDH7QY3.js +39 -0
- package/dist/bundle/google-OBZMWA7J.js +45 -0
- package/dist/bundle/{google-api-QMFGCXBM.js → google-api-AV4X2JH3.js} +68 -57
- package/dist/bundle/grants-WTRLN4ZI.js +111 -0
- package/dist/bundle/{identity-FYVDK4M2.js → identity-CGHHF7AK.js} +8 -6
- package/dist/bundle/{instructions-D3GF3B7M.js → instructions-24PHDBBE.js} +1 -1
- package/dist/bundle/{login-COFZ2IWP.js → login-XHFESAFM.js} +73 -64
- package/dist/bundle/{mcp-RKJG22KM.js → mcp-M5YCSWJJ.js} +2 -2
- package/dist/bundle/{node-OFICOKX3.js → node-GIDULTV5.js} +2 -2
- package/dist/bundle/{node-KM3CUABH.js → node-P4E63KXA.js} +9 -9
- package/dist/bundle/{node-sqlite-DNBTDOXD.js → node-sqlite-LINBOAWK.js} +13 -9
- package/dist/bundle/oauth-JHUX3KE3.js +22 -0
- package/dist/bundle/{open-PTPR2YWX.js → open-RYFKPNCJ.js} +8 -8
- package/dist/bundle/{openai-2KV5LUW4.js → openai-Q7YYUHJF.js} +28 -42
- package/dist/bundle/{process-EAW6NST2.js → process-VPIZTIJR.js} +1 -1
- package/dist/bundle/{program-6UV5Q5YN.js → program-IUXFRBZA.js} +419 -604
- package/dist/bundle/{prompt-634TPMJK.js → prompt-LF4KX3XL.js} +8 -8
- package/dist/bundle/{reasons-DDWCEYSQ.js → reasons-JPYOU5GV.js} +5 -5
- package/dist/bundle/{recognize-SJO6QUDW.js → recognize-KEWTJXFH.js} +7 -7
- package/dist/bundle/{remote-6JXZITKF.js → remote-HGGLB76S.js} +13 -10
- package/dist/bundle/{rerank-MD5VOPQ6.js → rerank-TDUKETFT.js} +10 -10
- package/dist/bundle/{serve-LZTROA2M.js → serve-XFYMKW5W.js} +12 -12
- package/dist/bundle/server-BDEV3CZJ.js +74 -0
- package/dist/bundle/{server-NSA3UAFY.js → server-PXIPSGFP.js} +48 -44
- package/dist/bundle/{services-F5A6XQCV.js → services-2BOCGMJU.js} +111 -41
- package/dist/bundle/{sqlite-runtime-7YF6REKS.js → sqlite-runtime-R7M5XUMW.js} +9 -9
- package/dist/bundle/{start-MUFLE6FA.js → start-YRLT4MQZ.js} +7 -7
- package/dist/bundle/{state-UC54F3YZ.js → state-NZ7WRJWH.js} +9 -9
- package/dist/bundle/{store-F5FJGWMR.js → store-7LCVDO7G.js} +63 -28
- package/dist/bundle/{store-J53YNAH6.js → store-ICDGPSEN.js} +27 -18
- package/dist/bundle/store-maintenance-command-SJPLY6IH.js +65 -0
- package/dist/bundle/tokens-FGTBE7VW.js +111 -0
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +6 -5
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/context.d.ts +4 -2
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/discovery.d.ts +0 -1
- package/dist/commands/discovery.d.ts.map +1 -1
- package/dist/commands/discovery.js +6 -26
- package/dist/commands/discovery.js.map +1 -1
- package/dist/commands/documents.d.ts +2 -0
- package/dist/commands/documents.d.ts.map +1 -1
- package/dist/commands/documents.js +39 -3
- package/dist/commands/documents.js.map +1 -1
- package/dist/commands/knowledge.d.ts.map +1 -1
- package/dist/commands/knowledge.js +7 -6
- package/dist/commands/knowledge.js.map +1 -1
- package/dist/commands/search.d.ts.map +1 -1
- package/dist/commands/search.js +11 -8
- package/dist/commands/search.js.map +1 -1
- package/dist/config.d.ts +14 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +35 -4
- package/dist/config.js.map +1 -1
- package/dist/contract-overrides.d.ts +16 -4
- package/dist/contract-overrides.d.ts.map +1 -1
- package/dist/contract-overrides.js +86 -410
- package/dist/contract-overrides.js.map +1 -1
- package/dist/documents-add.d.ts +49 -0
- package/dist/documents-add.d.ts.map +1 -0
- package/dist/documents-add.js +122 -0
- package/dist/documents-add.js.map +1 -0
- package/dist/errors.d.ts +1 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +13 -1
- package/dist/errors.js.map +1 -1
- package/dist/google-api.d.ts.map +1 -1
- package/dist/google-api.js +4 -1
- package/dist/google-api.js.map +1 -1
- package/dist/identity.d.ts +4 -0
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +22 -0
- package/dist/identity.js.map +1 -1
- package/dist/knowledge.d.ts +1 -1
- package/dist/knowledge.d.ts.map +1 -1
- package/dist/knowledge.js +17 -19
- package/dist/knowledge.js.map +1 -1
- package/dist/login.d.ts.map +1 -1
- package/dist/login.js +2 -2
- package/dist/login.js.map +1 -1
- package/dist/model.d.ts +3 -0
- package/dist/model.d.ts.map +1 -1
- package/dist/model.js.map +1 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +30 -21
- package/dist/program.js.map +1 -1
- package/dist/reasons.d.ts.map +1 -1
- package/dist/reasons.js +25 -1
- package/dist/reasons.js.map +1 -1
- package/dist/store-transition.js +2 -2
- package/dist/store-transition.js.map +1 -1
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +27 -7
- package/dist/store.js.map +1 -1
- package/dist/tokens.d.ts +9 -2
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +18 -15
- package/dist/tokens.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/wcat.d.ts +3 -0
- package/dist/wcat.d.ts.map +1 -0
- package/dist/wcat.js +4 -0
- package/dist/wcat.js.map +1 -0
- package/package.json +8 -8
- package/dist/bundle/chunk-3NULZGQU.js +0 -27
- package/dist/bundle/chunk-DD7EFG6B.js +0 -35
- package/dist/bundle/chunk-M73NNJ3X.js +0 -26
- package/dist/bundle/chunk-SBZB7HMU.js +0 -1055
- package/dist/bundle/command-contract-H5OYJOPF.js +0 -38
- package/dist/bundle/dist-PY3MVR3G.js +0 -21
- package/dist/bundle/entry-YZBB647C.js +0 -22
- package/dist/bundle/first-run-5JT3UQZB.js +0 -30
- package/dist/bundle/first-screen-BEMDEWO7.js +0 -36
- package/dist/bundle/google-DVADVICN.js +0 -36
- package/dist/bundle/grants-WKB2E4TA.js +0 -103
- package/dist/bundle/oauth-PDQHWFBF.js +0 -22
- package/dist/bundle/server-GT7X666D.js +0 -69
- package/dist/bundle/store-maintenance-command-GJVXLBAB.js +0 -58
- package/dist/bundle/tokens-H2EJKGA5.js +0 -101
- package/dist/bundle/{chunk-SW6C6WH5.js → chunk-HVJJWJYQ.js} +0 -0
- package/dist/bundle/{mdast-util-from-markdown-FXEPSNER.js → mdast-util-from-markdown-CE73EWJ2.js} +3 -3
|
@@ -3,27 +3,35 @@ const require = __bundleRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
activeProfile,
|
|
5
5
|
paths
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-M7543RUJ.js";
|
|
7
7
|
import {
|
|
8
8
|
READ_SCOPE,
|
|
9
|
-
WRITE_SCOPE
|
|
10
|
-
|
|
11
|
-
} from "./chunk-AHB4OJCI.js";
|
|
9
|
+
WRITE_SCOPE
|
|
10
|
+
} from "./chunk-NYECVHFH.js";
|
|
12
11
|
import {
|
|
13
12
|
googleError
|
|
14
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-5K54RZBK.js";
|
|
14
|
+
import {
|
|
15
|
+
providerRequest
|
|
16
|
+
} from "./chunk-4UHBJSMI.js";
|
|
15
17
|
import {
|
|
16
18
|
withTimeLimit
|
|
17
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-WYTYHUFH.js";
|
|
18
20
|
import {
|
|
19
21
|
acquireLock
|
|
20
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-QSELSDWE.js";
|
|
23
|
+
import {
|
|
24
|
+
hostFetch
|
|
25
|
+
} from "./chunk-GY4DAJSK.js";
|
|
26
|
+
import {
|
|
27
|
+
DESKTOP
|
|
28
|
+
} from "./chunk-YTIPTHEE.js";
|
|
21
29
|
import {
|
|
22
30
|
Credentials,
|
|
23
31
|
isMovedRun,
|
|
24
32
|
keyringService,
|
|
25
33
|
systemKeyring
|
|
26
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-6X3KUFRQ.js";
|
|
27
35
|
import {
|
|
28
36
|
minLength,
|
|
29
37
|
nullable,
|
|
@@ -33,16 +41,16 @@ import {
|
|
|
33
41
|
pipe,
|
|
34
42
|
safeParse,
|
|
35
43
|
string
|
|
36
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-VQKNKJYL.js";
|
|
37
45
|
import {
|
|
38
46
|
CliError,
|
|
39
47
|
isCliError
|
|
40
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-IIHZTV6V.js";
|
|
41
49
|
import {
|
|
42
50
|
__name
|
|
43
51
|
} from "./chunk-ZVVMGPBJ.js";
|
|
44
52
|
|
|
45
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/oauth/authorize.js
|
|
46
54
|
import { createHash, randomBytes } from "node:crypto";
|
|
47
55
|
import { createServer } from "node:http";
|
|
48
56
|
var DEFAULT_TIMEOUT_MS = 3e5;
|
|
@@ -178,12 +186,12 @@ var authorize = /* @__PURE__ */ __name(async (options) => {
|
|
|
178
186
|
}
|
|
179
187
|
}, "authorize");
|
|
180
188
|
|
|
181
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
189
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/oauth/keeper.js
|
|
182
190
|
import { createHash as createHash2 } from "node:crypto";
|
|
183
191
|
import { join } from "node:path";
|
|
184
192
|
import { setTimeout as delay } from "node:timers/promises";
|
|
185
193
|
|
|
186
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
194
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/oauth/requests.js
|
|
187
195
|
var REQUEST_LIMIT_MS = 3e4;
|
|
188
196
|
var TOKEN_LOG_EVENT = "oauth.token";
|
|
189
197
|
var object2 = /* @__PURE__ */ __name((value) => {
|
|
@@ -303,7 +311,7 @@ var revokeToken = /* @__PURE__ */ __name(async (provider, tokens, context) => {
|
|
|
303
311
|
});
|
|
304
312
|
}, "revokeToken");
|
|
305
313
|
|
|
306
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
314
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/oauth/keeper.js
|
|
307
315
|
var inFlight = /* @__PURE__ */ new Map();
|
|
308
316
|
var refreshedInMemory = /* @__PURE__ */ new Map();
|
|
309
317
|
var tokenKeeper = /* @__PURE__ */ __name((options) => {
|
|
@@ -328,7 +336,7 @@ var tokenKeeper = /* @__PURE__ */ __name((options) => {
|
|
|
328
336
|
}), "context");
|
|
329
337
|
const exchange = /* @__PURE__ */ __name((params, ctx) => provider.exchange ? provider.exchange(params, ctx) : requestTokens(provider, params, ctx), "exchange");
|
|
330
338
|
const notSignedIn = /* @__PURE__ */ __name(() => new CliError("authentication_error", `not signed in to ${provider.name}; run ${options.signInCommand}`, {
|
|
331
|
-
reason: "
|
|
339
|
+
reason: "session.missing"
|
|
332
340
|
}), "notSignedIn");
|
|
333
341
|
const busy = /* @__PURE__ */ __name((error) => isCliError(error) && error.details.reason === "file.locked", "busy");
|
|
334
342
|
const acquire = /* @__PURE__ */ __name(async () => {
|
|
@@ -465,7 +473,24 @@ var tokenKeeper = /* @__PURE__ */ __name((options) => {
|
|
|
465
473
|
};
|
|
466
474
|
}, "tokenKeeper");
|
|
467
475
|
|
|
468
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
476
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/oauth/provider.js
|
|
477
|
+
var googleProvider = /* @__PURE__ */ __name((client, { loginHint } = {}) => ({
|
|
478
|
+
id: "google",
|
|
479
|
+
name: "Google",
|
|
480
|
+
authorizeUrl: "https://accounts.google.com/o/oauth2/v2/auth",
|
|
481
|
+
tokenUrl: "https://oauth2.googleapis.com/token",
|
|
482
|
+
revokeUrl: "https://oauth2.googleapis.com/revoke",
|
|
483
|
+
client,
|
|
484
|
+
redirect: { kind: "loopback" },
|
|
485
|
+
// Without offline access Google returns no refresh token; without consent it does not return one again.
|
|
486
|
+
authorizeParams: {
|
|
487
|
+
access_type: "offline",
|
|
488
|
+
prompt: "select_account consent",
|
|
489
|
+
...loginHint ? { login_hint: loginHint } : {}
|
|
490
|
+
}
|
|
491
|
+
}), "googleProvider");
|
|
492
|
+
|
|
493
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/oauth/storage.js
|
|
469
494
|
var invalid = /* @__PURE__ */ __name(() => new CliError("authentication_error", "the saved sign-in cannot be read; sign in again", { reason: "oauth.invalid" }), "invalid");
|
|
470
495
|
var parse = /* @__PURE__ */ __name((raw) => {
|
|
471
496
|
let value;
|
|
@@ -490,6 +515,44 @@ var previousOf = /* @__PURE__ */ __name((raw) => {
|
|
|
490
515
|
}
|
|
491
516
|
}, "previousOf");
|
|
492
517
|
var defined = /* @__PURE__ */ __name((value) => Object.fromEntries(Object.entries(value).filter(([, field]) => field !== void 0)), "defined");
|
|
518
|
+
var standardCodec = /* @__PURE__ */ __name((providerId) => ({
|
|
519
|
+
decode: /* @__PURE__ */ __name((raw) => {
|
|
520
|
+
const value = parse(raw);
|
|
521
|
+
const refreshToken = text(value.refreshToken);
|
|
522
|
+
const clientId = text(value.clientId);
|
|
523
|
+
if (value.version !== 1 || value.provider !== providerId || !refreshToken || !clientId)
|
|
524
|
+
throw invalid();
|
|
525
|
+
if (!Array.isArray(value.scopes) || !value.scopes.every((scope) => typeof scope === "string"))
|
|
526
|
+
throw invalid();
|
|
527
|
+
const source = text(value.clientSource);
|
|
528
|
+
return {
|
|
529
|
+
client: defined({ clientId, clientSecret: text(value.clientSecret), source }),
|
|
530
|
+
tokens: defined({
|
|
531
|
+
accessToken: text(value.accessToken),
|
|
532
|
+
refreshToken,
|
|
533
|
+
expiresAt: finite(value.expiresAt),
|
|
534
|
+
scopes: value.scopes,
|
|
535
|
+
tokenType: text(value.tokenType)
|
|
536
|
+
})
|
|
537
|
+
};
|
|
538
|
+
}, "decode"),
|
|
539
|
+
encode: /* @__PURE__ */ __name(({ tokens, client, previous, extra }) => JSON.stringify(defined({
|
|
540
|
+
...previousOf(previous),
|
|
541
|
+
...extra,
|
|
542
|
+
version: 1,
|
|
543
|
+
provider: providerId,
|
|
544
|
+
clientId: client.clientId,
|
|
545
|
+
// Only WireCat's secret, which is public: a later release may ship another default app, and a refresh needs
|
|
546
|
+
// the secret of the app that signed in. An owner's own secret stays where the owner keeps it.
|
|
547
|
+
clientSecret: client.source === "constants" ? client.clientSecret : void 0,
|
|
548
|
+
clientSource: client.source,
|
|
549
|
+
accessToken: tokens.accessToken,
|
|
550
|
+
refreshToken: tokens.refreshToken,
|
|
551
|
+
expiresAt: tokens.expiresAt,
|
|
552
|
+
scopes: tokens.scopes,
|
|
553
|
+
tokenType: tokens.tokenType
|
|
554
|
+
})), "encode")
|
|
555
|
+
}), "standardCodec");
|
|
493
556
|
var driveSessionCodec = {
|
|
494
557
|
decode: /* @__PURE__ */ __name((raw) => {
|
|
495
558
|
const value = parse(raw);
|
|
@@ -539,6 +602,7 @@ var driveSessionCodec = {
|
|
|
539
602
|
return JSON.stringify(session);
|
|
540
603
|
}, "encode")
|
|
541
604
|
};
|
|
605
|
+
var googleStandard = standardCodec("google");
|
|
542
606
|
var keyringFailure = /* @__PURE__ */ __name((thrown, secret) => {
|
|
543
607
|
const failure = new CliError("configuration_error", "could not reach the saved sign-in; use an available keyring or file storage", { reason: "oauth.not-saved" });
|
|
544
608
|
const words = thrown instanceof Error ? thrown.message : String(thrown);
|
|
@@ -616,6 +680,14 @@ var Session = object({
|
|
|
616
680
|
token_type: optional(nullable(string()))
|
|
617
681
|
})
|
|
618
682
|
});
|
|
683
|
+
var viaDeclaredHosts = /* @__PURE__ */ __name((timeoutMs) => (input, init) => hostFetch({ hosts: DESKTOP.hosts, ...timeoutMs ? { timeoutMs } : {} })(input, init), "viaDeclaredHosts");
|
|
684
|
+
var googleFetch = viaDeclaredHosts();
|
|
685
|
+
var sdkFetch = viaDeclaredHosts(24 * 60 * 6e4);
|
|
686
|
+
var transporterOptions = /* @__PURE__ */ __name((signal) => ({
|
|
687
|
+
timeout: 3e4,
|
|
688
|
+
fetchImplementation: sdkFetch,
|
|
689
|
+
...signal ? { signal } : {}
|
|
690
|
+
}), "transporterOptions");
|
|
619
691
|
var credentialOptions = /* @__PURE__ */ __name((env, storage, keyring) => ({
|
|
620
692
|
configDir: paths(env).config,
|
|
621
693
|
service: "drive-cli",
|
|
@@ -634,17 +706,6 @@ var saveSession = /* @__PURE__ */ __name((env, name, session, storage, keyring)
|
|
|
634
706
|
throw notSaved();
|
|
635
707
|
}
|
|
636
708
|
}, "saveSession");
|
|
637
|
-
var googleProvider = /* @__PURE__ */ __name((client) => ({
|
|
638
|
-
id: "google",
|
|
639
|
-
name: "Google",
|
|
640
|
-
authorizeUrl: "https://accounts.google.com/o/oauth2/v2/auth",
|
|
641
|
-
tokenUrl: "https://oauth2.googleapis.com/token",
|
|
642
|
-
revokeUrl: "https://oauth2.googleapis.com/revoke",
|
|
643
|
-
client,
|
|
644
|
-
redirect: { kind: "loopback" },
|
|
645
|
-
// Without offline access Google returns no refresh token; without consent it does not return one again.
|
|
646
|
-
authorizeParams: { access_type: "offline", prompt: "select_account consent" }
|
|
647
|
-
}), "googleProvider");
|
|
648
709
|
var sessionKeeper = /* @__PURE__ */ __name((options) => tokenKeeper({
|
|
649
710
|
provider: googleProvider(options.client),
|
|
650
711
|
storage: credentialStorage({
|
|
@@ -653,7 +714,7 @@ var sessionKeeper = /* @__PURE__ */ __name((options) => tokenKeeper({
|
|
|
653
714
|
codec: driveSessionCodec
|
|
654
715
|
}),
|
|
655
716
|
lockDir: paths(options.env).config,
|
|
656
|
-
fetch: options.fetch ??
|
|
717
|
+
fetch: options.fetch ?? googleFetch,
|
|
657
718
|
signInCommand: `drive ${options.name} session start`,
|
|
658
719
|
// Above the client's own 5-minute early refresh, so a token it asks to replace is replaced.
|
|
659
720
|
freshForMs: 6 * 6e4,
|
|
@@ -672,7 +733,7 @@ var authorizedClient = /* @__PURE__ */ __name((env, name, keyring, signal) => {
|
|
|
672
733
|
}
|
|
673
734
|
if (!secret)
|
|
674
735
|
throw new CliError("authentication_error", `this profile has no saved Google sign-in \u2014 run drive ${name} session start`, {
|
|
675
|
-
reason: "
|
|
736
|
+
reason: "session.missing"
|
|
676
737
|
});
|
|
677
738
|
let parsed;
|
|
678
739
|
try {
|
|
@@ -696,7 +757,7 @@ var authorizedClient = /* @__PURE__ */ __name((env, name, keyring, signal) => {
|
|
|
696
757
|
const client = new OAuth2Client({
|
|
697
758
|
clientId: session.clientId,
|
|
698
759
|
clientSecret: session.clientSecret,
|
|
699
|
-
transporterOptions:
|
|
760
|
+
transporterOptions: transporterOptions(signal)
|
|
700
761
|
});
|
|
701
762
|
client.refreshHandler = async () => {
|
|
702
763
|
try {
|
|
@@ -807,10 +868,11 @@ var observeRequests = /* @__PURE__ */ __name((client) => {
|
|
|
807
868
|
}, "observeRequests");
|
|
808
869
|
|
|
809
870
|
export {
|
|
871
|
+
googleFetch,
|
|
872
|
+
transporterOptions,
|
|
810
873
|
credentials,
|
|
811
874
|
notSaved,
|
|
812
875
|
saveSession,
|
|
813
|
-
googleProvider,
|
|
814
876
|
sessionKeeper,
|
|
815
877
|
authorizedClient,
|
|
816
878
|
covers,
|
|
@@ -2,10 +2,10 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
walkQuery
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-GVA3KTCD.js";
|
|
6
6
|
import {
|
|
7
7
|
writeSecurely
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-6X3KUFRQ.js";
|
|
9
9
|
import {
|
|
10
10
|
array,
|
|
11
11
|
literal,
|
|
@@ -21,16 +21,16 @@ import {
|
|
|
21
21
|
safeParse,
|
|
22
22
|
string,
|
|
23
23
|
trim
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-VQKNKJYL.js";
|
|
25
25
|
import {
|
|
26
26
|
CliError,
|
|
27
27
|
isCliError
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-IIHZTV6V.js";
|
|
29
29
|
import {
|
|
30
30
|
__name
|
|
31
31
|
} from "./chunk-ZVVMGPBJ.js";
|
|
32
32
|
|
|
33
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/documents/blocks.js
|
|
34
34
|
var MARKS = ["bold", "italic", "strike", "code", "link"];
|
|
35
35
|
var sameMarks = /* @__PURE__ */ __name((a, b) => MARKS.every((mark) => a[mark] === b[mark]), "sameMarks");
|
|
36
36
|
var normalizeInlines = /* @__PURE__ */ __name((inlines) => {
|
|
@@ -78,7 +78,7 @@ var key = /* @__PURE__ */ __name((block, withChecked) => {
|
|
|
78
78
|
var blockKey = /* @__PURE__ */ __name((block) => JSON.stringify(key(block, true)), "blockKey");
|
|
79
79
|
var blockShape = /* @__PURE__ */ __name((block) => JSON.stringify(key(block, false)), "blockShape");
|
|
80
80
|
|
|
81
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
81
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/services/documents/block-diff.js
|
|
82
82
|
var MAX_CELLS = 4e6;
|
|
83
83
|
var matches = /* @__PURE__ */ __name((a, b, keyOf) => {
|
|
84
84
|
const ka = a.map(keyOf);
|
|
@@ -224,7 +224,7 @@ var mergeBlocks = /* @__PURE__ */ __name((baseLocal, baseRemote, local, remote,
|
|
|
224
224
|
return { status: "clean", blocks, conflicts };
|
|
225
225
|
}, "mergeBlocks");
|
|
226
226
|
|
|
227
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
227
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/services/documents/extraction.js
|
|
228
228
|
var Proposal = object({
|
|
229
229
|
kind: picklist(["summary", "digest", "fact", "preference"]),
|
|
230
230
|
body: pipe(string(), trim(), minLength(1), maxLength(15e3)),
|
|
@@ -259,7 +259,7 @@ var extractMemories = /* @__PURE__ */ __name(async (text, complete) => {
|
|
|
259
259
|
return { ...proposals, provider: answer.provider, model: answer.model, tokens: answer.tokens };
|
|
260
260
|
}, "extractMemories");
|
|
261
261
|
|
|
262
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
262
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/services/documents/ingestion.js
|
|
263
263
|
var documentIngestion = /* @__PURE__ */ __name((store, options) => {
|
|
264
264
|
const folder = /* @__PURE__ */ __name(async (principal, create) => {
|
|
265
265
|
if (options.provider)
|
|
@@ -295,10 +295,10 @@ var documentIngestion = /* @__PURE__ */ __name((store, options) => {
|
|
|
295
295
|
const stale = /* @__PURE__ */ __name(async (ref) => {
|
|
296
296
|
for (const status of ["proposed", "confirmed"]) {
|
|
297
297
|
for (let batch = 0; ; batch++) {
|
|
298
|
-
const
|
|
299
|
-
for (const memory of
|
|
298
|
+
const { items, hasMore } = await store.memories.list({ subject: ref, status, limit: 500 });
|
|
299
|
+
for (const memory of items)
|
|
300
300
|
await store.memories.markStale(memory.ref, "owner");
|
|
301
|
-
if (
|
|
301
|
+
if (!hasMore)
|
|
302
302
|
break;
|
|
303
303
|
if (batch >= 20)
|
|
304
304
|
throw new CliError("provider_error", "memory invalidation exceeded its batch bound");
|
|
@@ -386,7 +386,7 @@ var documentIngestion = /* @__PURE__ */ __name((store, options) => {
|
|
|
386
386
|
};
|
|
387
387
|
}, "documentIngestion");
|
|
388
388
|
|
|
389
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
389
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/services/documents/knowledge.js
|
|
390
390
|
var writer = /* @__PURE__ */ __name((by) => {
|
|
391
391
|
if (by === void 0)
|
|
392
392
|
throw new CliError("validation_error", "name who writes it: the owner or an agent; there is no default", {
|
|
@@ -508,8 +508,7 @@ var documentKnowledge = /* @__PURE__ */ __name((store, folder) => {
|
|
|
508
508
|
}, "memory"),
|
|
509
509
|
searchMemories: /* @__PURE__ */ __name(async (principal, ref, query, scope) => {
|
|
510
510
|
await document(principal, ref);
|
|
511
|
-
|
|
512
|
-
return { items, limit_reached: items.length === 200 };
|
|
511
|
+
return store.memories.search(query, { subject: ref, ...scope ? { scope } : {}, limit: 200 });
|
|
513
512
|
}, "searchMemories"),
|
|
514
513
|
addFact: /* @__PURE__ */ __name(async (principal, ref, { statement, type, scope, by, supersedes, occurredAt }) => {
|
|
515
514
|
await document(principal, ref);
|
|
@@ -542,10 +541,10 @@ var documentKnowledge = /* @__PURE__ */ __name((store, folder) => {
|
|
|
542
541
|
return port;
|
|
543
542
|
}, "documentKnowledge");
|
|
544
543
|
|
|
545
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
544
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/documents/markdown-blocks.js
|
|
546
545
|
var parser;
|
|
547
546
|
var loadParser = /* @__PURE__ */ __name(() => parser ??= Promise.all([
|
|
548
|
-
import("./mdast-util-from-markdown-
|
|
547
|
+
import("./mdast-util-from-markdown-CE73EWJ2.js"),
|
|
549
548
|
import("./mdast-util-gfm-SZM5GBDF.js"),
|
|
550
549
|
import("./micromark-extension-gfm-GRL24TU6.js")
|
|
551
550
|
]).then(([{ fromMarkdown }, { gfmFromMarkdown }, { gfm }]) => (markdown) => fromMarkdown(markdown, { extensions: [gfm()], mdastExtensions: [gfmFromMarkdown()] })), "loadParser");
|
|
@@ -667,7 +666,7 @@ var placedMarkdownBlocks = /* @__PURE__ */ __name(async (markdown) => {
|
|
|
667
666
|
return blocks(tree.children);
|
|
668
667
|
}, "placedMarkdownBlocks");
|
|
669
668
|
|
|
670
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
669
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/services/documents/markdown-splice.js
|
|
671
670
|
var escapeText = /* @__PURE__ */ __name((text) => text.replace(/[\\`*_[\]<>~|]/g, "\\$&"), "escapeText");
|
|
672
671
|
var codeSpan = /* @__PURE__ */ __name((text) => {
|
|
673
672
|
const longest = (text.match(/`+/g) ?? []).reduce((most, run) => Math.max(most, run.length), 0);
|
|
@@ -853,15 +852,15 @@ var columnsBefore = /* @__PURE__ */ __name((placed, index) => {
|
|
|
853
852
|
return columns;
|
|
854
853
|
}, "columnsBefore");
|
|
855
854
|
|
|
856
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
855
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/services/documents/mirror-watch.js
|
|
857
856
|
import { watch } from "node:fs";
|
|
858
857
|
|
|
859
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
858
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/services/documents/mirrors.js
|
|
860
859
|
import { createHash as createHash2 } from "node:crypto";
|
|
861
860
|
import { mkdirSync, readFileSync } from "node:fs";
|
|
862
861
|
import { join as join2 } from "node:path";
|
|
863
862
|
|
|
864
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
863
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/services/documents/push.js
|
|
865
864
|
import { createHash, randomUUID } from "node:crypto";
|
|
866
865
|
import { createReadStream } from "node:fs";
|
|
867
866
|
import { chmod, readdir, rename, rm, stat, writeFile } from "node:fs/promises";
|
|
@@ -1113,7 +1112,7 @@ var pushDocuments = /* @__PURE__ */ __name(async (options) => {
|
|
|
1113
1112
|
return result;
|
|
1114
1113
|
}, "pushDocuments");
|
|
1115
1114
|
|
|
1116
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1115
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/services/documents/mirrors.js
|
|
1117
1116
|
var mirrorId = /* @__PURE__ */ __name((root, folder) => createHash2("sha256").update(JSON.stringify([root, folder])).digest("hex").slice(0, 8), "mirrorId");
|
|
1118
1117
|
var ID = pipe(string(), regex(/^[A-Za-z0-9_-]{1,200}$/));
|
|
1119
1118
|
var stateSchema = /* @__PURE__ */ __name((kinds) => object({
|
|
@@ -1235,7 +1234,7 @@ var syncMirrors = /* @__PURE__ */ __name(async (options) => {
|
|
|
1235
1234
|
};
|
|
1236
1235
|
}, "syncMirrors");
|
|
1237
1236
|
|
|
1238
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1237
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/services/documents/mirror-watch.js
|
|
1239
1238
|
var sleep = /* @__PURE__ */ __name((milliseconds, signal) => new Promise((resolve) => {
|
|
1240
1239
|
const finish = /* @__PURE__ */ __name(() => {
|
|
1241
1240
|
clearTimeout(timer);
|
|
@@ -1374,7 +1373,7 @@ async function* watchMirrors(sync, options) {
|
|
|
1374
1373
|
}
|
|
1375
1374
|
__name(watchMirrors, "watchMirrors");
|
|
1376
1375
|
|
|
1377
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1376
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/services/documents/proposals.js
|
|
1378
1377
|
var extractDocumentMemories = /* @__PURE__ */ __name(async (options) => {
|
|
1379
1378
|
const source = options.read();
|
|
1380
1379
|
const text = options.tab ? source.snapshot.tabs.find((tab) => tab.id === options.tab)?.text : source.snapshot.text;
|
|
@@ -1424,10 +1423,10 @@ Snapshot: ${source.hash}`;
|
|
|
1424
1423
|
};
|
|
1425
1424
|
}, "extractDocumentMemories");
|
|
1426
1425
|
|
|
1427
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1426
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/services/documents/sync.js
|
|
1428
1427
|
import { createHash as createHash4 } from "node:crypto";
|
|
1429
1428
|
|
|
1430
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1429
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/documents/scope.js
|
|
1431
1430
|
var within = /* @__PURE__ */ __name((file, roots, folders, seen = /* @__PURE__ */ new Set()) => {
|
|
1432
1431
|
if (file.trashed)
|
|
1433
1432
|
return false;
|
|
@@ -1442,7 +1441,7 @@ var within = /* @__PURE__ */ __name((file, roots, folders, seen = /* @__PURE__ *
|
|
|
1442
1441
|
});
|
|
1443
1442
|
}, "within");
|
|
1444
1443
|
|
|
1445
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1444
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/documents/catalog.js
|
|
1446
1445
|
var catalogFiles = /* @__PURE__ */ __name((state, roots) => {
|
|
1447
1446
|
const folders = state.pending?.folders ?? state.folders;
|
|
1448
1447
|
const files = new Map(Object.values(state.documents).map((doc) => [doc.metadata.id, doc.metadata]));
|
|
@@ -1460,7 +1459,7 @@ var catalogFiles = /* @__PURE__ */ __name((state, roots) => {
|
|
|
1460
1459
|
return [...files.values()].filter((file) => within(file, roots, folders));
|
|
1461
1460
|
}, "catalogFiles");
|
|
1462
1461
|
|
|
1463
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1462
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/services/documents/plan.js
|
|
1464
1463
|
import { createHash as createHash3 } from "node:crypto";
|
|
1465
1464
|
var scopeHash = /* @__PURE__ */ __name((roots) => createHash3("sha256").update(JSON.stringify([...roots].sort())).digest("hex"), "scopeHash");
|
|
1466
1465
|
var changedSince = /* @__PURE__ */ __name((previous, file) => previous.version !== file.version || previous.modifiedAt !== file.modifiedAt || previous.name !== file.name || previous.canDownload !== file.canDownload || JSON.stringify(previous.parents) !== JSON.stringify(file.parents), "changedSince");
|
|
@@ -1644,7 +1643,7 @@ var planDocuments = /* @__PURE__ */ __name(async (options, source, state, roots,
|
|
|
1644
1643
|
return { scope, cursor: finalCursor, folders: scopedFolders, jobs, skipped };
|
|
1645
1644
|
}, "planDocuments");
|
|
1646
1645
|
|
|
1647
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1646
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/services/documents/sync.js
|
|
1648
1647
|
var MAX_PICTURE_BYTES = 25 * 1024 * 1024;
|
|
1649
1648
|
var SAVE_EVERY_MS2 = 2e3;
|
|
1650
1649
|
var SAVE_EVERY_ITEMS = 25;
|