@wirecat/drive-cli 0.66.0 → 0.68.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 +29 -1
- package/dist/bin/drive.js +2 -2
- package/dist/bundle/{all-profiles-WCQLIHUG.js → all-profiles-BU6XUFUP.js} +14 -14
- package/dist/bundle/{anthropic-5RJMB6O7.js → anthropic-ZP5B7S2Z.js} +8 -8
- package/dist/bundle/{app-server-3RGYXPKG.js → app-server-EB4DH6T7.js} +60 -56
- package/dist/bundle/{bun-L34VEKGG.js → bun-PWMM6L45.js} +2 -2
- package/dist/bundle/{bun-sqlite-H6IAXQXI.js → bun-sqlite-6VPR2SVC.js} +9 -9
- package/dist/bundle/{chunk-HPKE2GDP.js → chunk-2UHQVRH2.js} +18 -18
- package/dist/bundle/{chunk-2AF77WMH.js → chunk-2VYEGKQ3.js} +1 -1
- package/dist/bundle/{chunk-TAHISPDE.js → chunk-43NEDPXB.js} +39 -35
- package/dist/bundle/{chunk-OT7SQQJK.js → chunk-5G2BY4B6.js} +17 -17
- package/dist/bundle/{chunk-NYZS2LKF.js → chunk-5TK2YQCO.js} +2 -2
- package/dist/bundle/{chunk-5XLU4NN6.js → chunk-5W65QTYS.js} +4 -4
- package/dist/bundle/{chunk-YTIPTHEE.js → chunk-6HFZZ2PW.js} +2 -2
- package/dist/bundle/{chunk-GY4DAJSK.js → chunk-6QR7NKMG.js} +35 -6
- package/dist/bundle/{chunk-BIJW6AYA.js → chunk-6WAC2LOS.js} +3698 -3594
- package/dist/bundle/{chunk-VR3YKXHL.js → chunk-74NCZKRW.js} +33 -20
- package/dist/bundle/{chunk-5HVJK3ZJ.js → chunk-7A77GYCE.js} +4 -4
- package/dist/bundle/{chunk-7ZGJRVBH.js → chunk-7BXVI7XF.js} +4 -4
- package/dist/bundle/{chunk-UNTIVT47.js → chunk-7JKECODO.js} +1 -1
- package/dist/bundle/{chunk-FKKPVPZR.js → chunk-7TNQZKRD.js} +57 -57
- package/dist/bundle/{chunk-3SDJIMZB.js → chunk-AIEMFRBU.js} +1 -1
- package/dist/bundle/{chunk-QJ57PV55.js → chunk-AXYG2DDY.js} +136 -90
- package/dist/bundle/{chunk-T3ULDA7C.js → chunk-BXHFJTU5.js} +3 -3
- package/dist/bundle/{chunk-HPSHQVJU.js → chunk-CK2SQ2CE.js} +28 -22
- package/dist/bundle/{chunk-KRG5X5PH.js → chunk-CMWFYZ45.js} +2 -2
- package/dist/bundle/{chunk-3QFUDXMQ.js → chunk-CRIEW4FP.js} +3 -2
- package/dist/bundle/{chunk-V2WXTILT.js → chunk-CVAJMRRD.js} +6 -6
- package/dist/bundle/{chunk-JCHF7LZT.js → chunk-D4MVEOU2.js} +4 -4
- package/dist/bundle/{chunk-FHBTQPA3.js → chunk-DIZBJLPM.js} +41 -37
- package/dist/bundle/{chunk-VUUPFDRU.js → chunk-DU23ET2O.js} +113 -39
- package/dist/bundle/{chunk-IRNDYNQX.js → chunk-DYLYH7VE.js} +4 -4
- package/dist/bundle/{chunk-IIHZTV6V.js → chunk-EA2OB75T.js} +1 -1
- package/dist/bundle/{chunk-AP4MX247.js → chunk-EEE4H2PA.js} +12 -12
- package/dist/bundle/{chunk-UAKX6DP4.js → chunk-EOC7RHJ2.js} +5 -5
- package/dist/bundle/{chunk-HHRJPLFO.js → chunk-EXWZCI5G.js} +1 -1
- package/dist/bundle/{chunk-KOY5HUBY.js → chunk-F7KAMSXA.js} +4 -4
- package/dist/bundle/{chunk-D4MIMH2N.js → chunk-FAMXUI2X.js} +5 -5
- package/dist/bundle/{chunk-PJGOQSE5.js → chunk-FIVFP53N.js} +1 -1
- package/dist/bundle/{chunk-XVZNFA2P.js → chunk-GTLXBAJV.js} +309 -278
- package/dist/bundle/{chunk-JQXK3M5M.js → chunk-HCZYJMBP.js} +1 -1
- package/dist/bundle/{chunk-NK4GVFJH.js → chunk-IJCUAKR5.js} +4 -4
- package/dist/bundle/{chunk-MZWXTJ4O.js → chunk-IVOG6T6P.js} +3 -3
- package/dist/bundle/{chunk-PKM55ZRR.js → chunk-J5LXL435.js} +20 -20
- package/dist/bundle/{chunk-G4TNKBDX.js → chunk-JMZQBRRZ.js} +7 -7
- package/dist/bundle/{chunk-VQKNKJYL.js → chunk-JRFKCYMW.js} +6 -6
- package/dist/bundle/{chunk-XLGDNI4S.js → chunk-JZ3MT7IE.js} +5 -40
- package/dist/bundle/{chunk-UG3GHFGY.js → chunk-KPKIHJIT.js} +6 -8
- package/dist/bundle/{chunk-OIF4B526.js → chunk-M4OP5ASJ.js} +1 -1
- package/dist/bundle/{chunk-5PLINHEY.js → chunk-MLSXHTUB.js} +153 -149
- package/dist/bundle/{chunk-Y5U4HIZS.js → chunk-MOKEB656.js} +2 -2
- package/dist/bundle/{chunk-6X3KUFRQ.js → chunk-MW46BLWH.js} +20 -20
- package/dist/bundle/{chunk-I5R5CMQR.js → chunk-MWCPKUU4.js} +5 -5
- package/dist/bundle/{chunk-6UJCCOZC.js → chunk-NV75QPML.js} +4 -4
- package/dist/bundle/{chunk-OZOQLAWK.js → chunk-O7T3WGCV.js} +6 -6
- package/dist/bundle/{chunk-H7XL6WTW.js → chunk-PGPHEC2X.js} +2 -2
- package/dist/bundle/{chunk-UQPW42HF.js → chunk-PJ3FKBXG.js} +1 -1
- package/dist/bundle/{chunk-ALE67WRR.js → chunk-PV3AWPHR.js} +5 -5
- package/dist/bundle/{chunk-HQBLJLYH.js → chunk-PWIEOATY.js} +8 -8
- package/dist/bundle/{chunk-WYTYHUFH.js → chunk-Q6BD6RUH.js} +43 -43
- package/dist/bundle/{chunk-BQXSE645.js → chunk-QKY24RWV.js} +12 -12
- package/dist/bundle/{chunk-2S3E2HVV.js → chunk-QRSPFCRY.js} +17 -17
- package/dist/bundle/{chunk-3NYH756U.js → chunk-QTRYJZL7.js} +11 -6
- package/dist/bundle/{chunk-QF7VL4C3.js → chunk-QVJMFZFW.js} +1 -1
- package/dist/bundle/{chunk-ULXEW6FT.js → chunk-QWGEOQHA.js} +1 -1
- package/dist/bundle/{chunk-JLCR24UM.js → chunk-R5FTCNLJ.js} +1 -1
- package/dist/bundle/{chunk-M7543RUJ.js → chunk-RT5NT62B.js} +220 -15
- package/dist/bundle/{chunk-SZ6JFOL4.js → chunk-SOS4U2RF.js} +62 -41
- package/dist/bundle/{chunk-PUMDOCAF.js → chunk-TI2OANJZ.js} +1 -1
- package/dist/bundle/{chunk-COGWKO2T.js → chunk-U52QE4QV.js} +3 -3
- package/dist/bundle/{chunk-LVAPSAHF.js → chunk-UFPRP7MG.js} +8 -8
- package/dist/bundle/{chunk-5VDVGDOC.js → chunk-UIKVP23D.js} +1 -1
- package/dist/bundle/{chunk-7LT2G5BC.js → chunk-ULNN3LCY.js} +29 -27
- package/dist/bundle/{chunk-GVA3KTCD.js → chunk-UPCEHSIZ.js} +10 -10
- package/dist/bundle/{chunk-4UHBJSMI.js → chunk-UUQJVKPB.js} +516 -458
- package/dist/bundle/{chunk-O53WLYX3.js → chunk-UYBLNGZ2.js} +2 -2
- package/dist/bundle/{chunk-D7KOAPG6.js → chunk-WCNTDETD.js} +2 -2
- package/dist/bundle/{chunk-JHMEETXI.js → chunk-WGX4DZPW.js} +2 -2
- package/dist/bundle/{chunk-P7HQFII6.js → chunk-WUFZGPXX.js} +7 -7
- package/dist/bundle/{chunk-5K54RZBK.js → chunk-Y2QVNVHK.js} +1 -1
- package/dist/bundle/{chunk-7EP4AU6A.js → chunk-YUGTJBV3.js} +3 -3
- package/dist/bundle/{chunk-QSELSDWE.js → chunk-YYIWPH53.js} +13 -13
- package/dist/bundle/{chunk-E2F2XIX6.js → chunk-Z5BMYI2V.js} +8 -8
- package/dist/bundle/{chunk-TYLEICTX.js → chunk-ZAIE3G5I.js} +3 -3
- package/dist/bundle/{chunk-SOOU5WO6.js → chunk-ZSVMZH5O.js} +2 -2
- package/dist/bundle/{chunk-FA2TNA5X.js → chunk-ZVQDOKDY.js} +1 -1
- package/dist/bundle/{cli-KW6QQVS5.js → cli-L7P36YUH.js} +61 -61
- package/dist/bundle/command-contract-EYFGMKIG.js +41 -0
- package/dist/bundle/{command-server-entry-OC4E4DED.js → command-server-entry-H3VGPOLJ.js} +31 -31
- package/dist/bundle/{decode-AH5ZLLDK.js → decode-JEU6JWCV.js} +8 -8
- package/dist/bundle/{dispatch-CDWZZ54Q.js → dispatch-WBEOHZDV.js} +9 -9
- package/dist/bundle/drive.js +11 -11
- package/dist/bundle/{echarts-VC7MTXWY.js → echarts-SDZA2SWG.js} +2 -2
- package/dist/bundle/{embed-EPSQY6QG.js → embed-WUKOASQG.js} +9 -9
- package/dist/bundle/{embedder-TK4U4TJR.js → embedder-UBRAXRDZ.js} +12 -12
- package/dist/bundle/entry-C4NUQFTF.js +25 -0
- package/dist/bundle/{failure-WSVZOPFE.js → failure-X6PSLVSO.js} +4 -4
- package/dist/bundle/first-run-PKHBS7B4.js +30 -0
- package/dist/bundle/first-screen-QOVOM4BF.js +39 -0
- package/dist/bundle/google-XXHSMTVK.js +45 -0
- package/dist/bundle/{google-api-AV4X2JH3.js → google-api-SQQ4BSNR.js} +63 -63
- package/dist/bundle/grants-2U4JVT6O.js +111 -0
- package/dist/bundle/{identity-CGHHF7AK.js → identity-SRL6RSU2.js} +6 -6
- package/dist/bundle/{instructions-24PHDBBE.js → instructions-7T6JJIFS.js} +1 -1
- package/dist/bundle/{login-XHFESAFM.js → login-N243GGEE.js} +69 -69
- package/dist/bundle/{mcp-M5YCSWJJ.js → mcp-TDKGDB4V.js} +2 -2
- package/dist/bundle/{node-GIDULTV5.js → node-BZDMUFTW.js} +2 -2
- package/dist/bundle/{node-sqlite-LINBOAWK.js → node-sqlite-SZQCCMV2.js} +10 -10
- package/dist/bundle/oauth-CMAFXX6A.js +22 -0
- package/dist/bundle/{open-RYFKPNCJ.js → open-RVTPKDA3.js} +8 -8
- package/dist/bundle/{openai-Q7YYUHJF.js → openai-6NN63BMH.js} +19 -19
- package/dist/bundle/{process-VPIZTIJR.js → process-756VBE7E.js} +1 -1
- package/dist/bundle/{program-IUXFRBZA.js → program-B4QBJYB5.js} +187 -228
- package/dist/bundle/{prompt-LF4KX3XL.js → prompt-HGP2DSRW.js} +8 -8
- package/dist/bundle/{reasons-JPYOU5GV.js → reasons-KSYP5VDJ.js} +5 -5
- package/dist/bundle/{recognize-KEWTJXFH.js → recognize-26SHB7HI.js} +7 -7
- package/dist/bundle/{remote-HGGLB76S.js → remote-Z4PWHZ5N.js} +13 -13
- package/dist/bundle/{rerank-TDUKETFT.js → rerank-QHJZJK3Q.js} +10 -10
- package/dist/bundle/{serve-XFYMKW5W.js → serve-MYJW5IEM.js} +12 -12
- package/dist/bundle/server-HBZPIHDX.js +74 -0
- package/dist/bundle/{server-PXIPSGFP.js → server-XFW3V7CR.js} +49 -47
- package/dist/bundle/{services-2BOCGMJU.js → services-IQG2RVTO.js} +36 -36
- package/dist/bundle/{sqlite-runtime-R7M5XUMW.js → sqlite-runtime-X4GB5PBV.js} +9 -9
- package/dist/bundle/{start-YRLT4MQZ.js → start-C6EXYXAL.js} +7 -7
- package/dist/bundle/{state-NZ7WRJWH.js → state-ATQK2X3W.js} +9 -9
- package/dist/bundle/{store-ICDGPSEN.js → store-MEHEUOJH.js} +19 -19
- package/dist/bundle/{store-7LCVDO7G.js → store-QUBUPK6F.js} +21 -21
- package/dist/bundle/store-maintenance-command-33ULVDWY.js +65 -0
- package/dist/bundle/tokens-A2GP4F34.js +111 -0
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +5 -3
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/search.js +4 -4
- package/dist/commands/search.js.map +1 -1
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +2 -1
- package/dist/commands/sync.js.map +1 -1
- package/dist/commands/transcripts.d.ts +4 -0
- package/dist/commands/transcripts.d.ts.map +1 -0
- package/dist/commands/transcripts.js +42 -0
- package/dist/commands/transcripts.js.map +1 -0
- package/dist/config.d.ts +9 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +14 -1
- package/dist/config.js.map +1 -1
- package/dist/google.d.ts.map +1 -1
- package/dist/google.js +31 -28
- package/dist/google.js.map +1 -1
- package/dist/list-queries.d.ts +10 -0
- package/dist/list-queries.d.ts.map +1 -1
- package/dist/list-queries.js +12 -1
- package/dist/list-queries.js.map +1 -1
- package/dist/model.d.ts +4 -1
- package/dist/model.d.ts.map +1 -1
- package/dist/policy.d.ts +2 -0
- package/dist/policy.d.ts.map +1 -1
- package/dist/policy.js +3 -2
- package/dist/policy.js.map +1 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +5 -2
- package/dist/program.js.map +1 -1
- package/dist/state.d.ts.map +1 -1
- package/dist/state.js +2 -0
- package/dist/state.js.map +1 -1
- package/dist/sync.d.ts.map +1 -1
- package/dist/sync.js +5 -1
- package/dist/sync.js.map +1 -1
- package/dist/transcripts.d.ts +21 -0
- package/dist/transcripts.d.ts.map +1 -0
- package/dist/transcripts.js +48 -0
- package/dist/transcripts.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/dist/bundle/command-contract-CE543JBN.js +0 -41
- package/dist/bundle/entry-3VN23M7M.js +0 -25
- package/dist/bundle/first-run-7ZYJ7EB3.js +0 -30
- package/dist/bundle/first-screen-CZDH7QY3.js +0 -39
- package/dist/bundle/google-OBZMWA7J.js +0 -45
- package/dist/bundle/grants-WTRLN4ZI.js +0 -111
- package/dist/bundle/oauth-JHUX3KE3.js +0 -22
- package/dist/bundle/server-BDEV3CZJ.js +0 -74
- package/dist/bundle/store-maintenance-command-SJPLY6IH.js +0 -65
- package/dist/bundle/tokens-FGTBE7VW.js +0 -111
- /package/dist/bundle/{chunk-HVJJWJYQ.js → chunk-XWBPP2HX.js} +0 -0
|
@@ -1,29 +1,31 @@
|
|
|
1
1
|
import { createRequire as __bundleRequire } from "node:module";
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
|
-
DOC,
|
|
5
4
|
MAX_ENTRIES,
|
|
6
5
|
READABLE,
|
|
7
|
-
SHEET,
|
|
8
6
|
XLSX,
|
|
9
7
|
supported,
|
|
10
8
|
tooManyEntries
|
|
11
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-JZ3MT7IE.js";
|
|
10
|
+
import {
|
|
11
|
+
DOC,
|
|
12
|
+
SHEET
|
|
13
|
+
} from "./chunk-DU23ET2O.js";
|
|
12
14
|
import {
|
|
13
15
|
googleError
|
|
14
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-Y2QVNVHK.js";
|
|
15
17
|
import {
|
|
16
18
|
extractText
|
|
17
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-Q6BD6RUH.js";
|
|
18
20
|
import {
|
|
19
21
|
MAX_TEXT_CHARS
|
|
20
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-BXHFJTU5.js";
|
|
21
23
|
import {
|
|
22
24
|
importFrom
|
|
23
25
|
} from "./chunk-Y5E2WNWB.js";
|
|
24
26
|
import {
|
|
25
27
|
CliError
|
|
26
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-EA2OB75T.js";
|
|
27
29
|
import {
|
|
28
30
|
__name
|
|
29
31
|
} from "./chunk-ZVVMGPBJ.js";
|
|
@@ -116,6 +118,34 @@ var googleSource = /* @__PURE__ */ __name((auth) => {
|
|
|
116
118
|
throw googleError(error);
|
|
117
119
|
}
|
|
118
120
|
}, "safe");
|
|
121
|
+
const listed = /* @__PURE__ */ __name((q, what) => safe(async () => {
|
|
122
|
+
const files = [];
|
|
123
|
+
const seen = /* @__PURE__ */ new Set();
|
|
124
|
+
let pageToken;
|
|
125
|
+
for (let page = 0; page < MAX_PAGES; page++) {
|
|
126
|
+
const { data } = await api.files.list({
|
|
127
|
+
q,
|
|
128
|
+
fields: `nextPageToken,incompleteSearch,files(${FIELDS})`,
|
|
129
|
+
pageSize: 1e3,
|
|
130
|
+
supportsAllDrives: true,
|
|
131
|
+
includeItemsFromAllDrives: true,
|
|
132
|
+
...pageToken ? { pageToken } : {}
|
|
133
|
+
}, { timeout: 3e4 });
|
|
134
|
+
if (data.incompleteSearch)
|
|
135
|
+
throw new CliError("provider_error", `Google ${what} was incomplete; sync state was preserved`);
|
|
136
|
+
for (const file of data.files ?? [])
|
|
137
|
+
files.push(metadataOf(file));
|
|
138
|
+
if (files.length > MAX_ENTRIES)
|
|
139
|
+
throw tooManyEntries();
|
|
140
|
+
if (!data.nextPageToken)
|
|
141
|
+
return files;
|
|
142
|
+
if (seen.has(data.nextPageToken))
|
|
143
|
+
throw new CliError("invalid_response", "Google repeated a folder page token");
|
|
144
|
+
seen.add(data.nextPageToken);
|
|
145
|
+
pageToken = data.nextPageToken;
|
|
146
|
+
}
|
|
147
|
+
throw new CliError("provider_error", `${what} pagination exceeded its bound; sync state was preserved`);
|
|
148
|
+
}), "listed");
|
|
119
149
|
const metadata = /* @__PURE__ */ __name((id) => safe(async () => metadataOf((await api.files.get({ fileId: id, fields: FIELDS, supportsAllDrives: true }, { timeout: 3e4 })).data)), "metadata");
|
|
120
150
|
return {
|
|
121
151
|
metadata,
|
|
@@ -125,34 +155,8 @@ var googleSource = /* @__PURE__ */ __name((auth) => {
|
|
|
125
155
|
throw new CliError("invalid_response", "Google did not identify the signed-in account");
|
|
126
156
|
return id;
|
|
127
157
|
}), "identity"),
|
|
128
|
-
children: /* @__PURE__ */ __name((id) =>
|
|
129
|
-
|
|
130
|
-
const seen = /* @__PURE__ */ new Set();
|
|
131
|
-
let pageToken;
|
|
132
|
-
for (let page = 0; page < MAX_PAGES; page++) {
|
|
133
|
-
const { data } = await api.files.list({
|
|
134
|
-
q: `'${id}' in parents and trashed = false`,
|
|
135
|
-
fields: `nextPageToken,incompleteSearch,files(${FIELDS})`,
|
|
136
|
-
pageSize: 1e3,
|
|
137
|
-
supportsAllDrives: true,
|
|
138
|
-
includeItemsFromAllDrives: true,
|
|
139
|
-
...pageToken ? { pageToken } : {}
|
|
140
|
-
}, { timeout: 3e4 });
|
|
141
|
-
if (data.incompleteSearch)
|
|
142
|
-
throw new CliError("provider_error", "Google folder listing was incomplete; sync state was preserved");
|
|
143
|
-
for (const file of data.files ?? [])
|
|
144
|
-
files.push(metadataOf(file));
|
|
145
|
-
if (files.length > MAX_ENTRIES)
|
|
146
|
-
throw tooManyEntries();
|
|
147
|
-
if (!data.nextPageToken)
|
|
148
|
-
return files;
|
|
149
|
-
if (seen.has(data.nextPageToken))
|
|
150
|
-
throw new CliError("invalid_response", "Google repeated a folder page token");
|
|
151
|
-
seen.add(data.nextPageToken);
|
|
152
|
-
pageToken = data.nextPageToken;
|
|
153
|
-
}
|
|
154
|
-
throw new CliError("provider_error", "folder pagination exceeded its bound; sync state was preserved");
|
|
155
|
-
}), "children"),
|
|
158
|
+
children: /* @__PURE__ */ __name((id) => listed(`'${id}' in parents and trashed = false`, "folder listing"), "children"),
|
|
159
|
+
search: /* @__PURE__ */ __name((q) => listed(q, "transcript search"), "search"),
|
|
156
160
|
startToken: /* @__PURE__ */ __name(() => safe(async () => {
|
|
157
161
|
const token = (await api.changes.getStartPageToken({ supportsAllDrives: true }, { timeout: 3e4 })).data.startPageToken;
|
|
158
162
|
if (!token)
|
|
@@ -2,7 +2,7 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
refuseLacking
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-2UHQVRH2.js";
|
|
6
6
|
import {
|
|
7
7
|
FloodMemory,
|
|
8
8
|
OFFLINE,
|
|
@@ -18,10 +18,10 @@ import {
|
|
|
18
18
|
servicesFor,
|
|
19
19
|
throughWrapper,
|
|
20
20
|
withFileLockAsync
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-GTLXBAJV.js";
|
|
22
22
|
import {
|
|
23
23
|
servingProfiles
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-U52QE4QV.js";
|
|
25
25
|
import {
|
|
26
26
|
asFirstWord,
|
|
27
27
|
baseContext,
|
|
@@ -32,10 +32,10 @@ import {
|
|
|
32
32
|
recalledAccount,
|
|
33
33
|
rememberAccount,
|
|
34
34
|
rootOf2 as rootOf
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-MLSXHTUB.js";
|
|
36
36
|
import {
|
|
37
37
|
providerErrorKey
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-WUFZGPXX.js";
|
|
39
39
|
import {
|
|
40
40
|
AUTHORITY_KEY,
|
|
41
41
|
CEILING_KEY,
|
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
limitBatch,
|
|
50
50
|
readKeysForCommand,
|
|
51
51
|
skipFlagFor
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-J5LXL435.js";
|
|
53
53
|
import {
|
|
54
54
|
chatReferenceOf,
|
|
55
55
|
ensureAccount,
|
|
@@ -57,21 +57,21 @@ import {
|
|
|
57
57
|
isId,
|
|
58
58
|
openStore,
|
|
59
59
|
pickPerson
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-6WAC2LOS.js";
|
|
61
61
|
import {
|
|
62
62
|
isCliFailure
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-UYBLNGZ2.js";
|
|
64
64
|
import {
|
|
65
65
|
resolvePaths
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-MW46BLWH.js";
|
|
67
67
|
import {
|
|
68
68
|
CliError
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-EA2OB75T.js";
|
|
70
70
|
import {
|
|
71
71
|
__name
|
|
72
72
|
} from "./chunk-ZVVMGPBJ.js";
|
|
73
73
|
|
|
74
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
74
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/cli/messenger/ask.js
|
|
75
75
|
import { openSync } from "node:fs";
|
|
76
76
|
import { createInterface } from "node:readline";
|
|
77
77
|
import { ReadStream } from "node:tty";
|
|
@@ -126,7 +126,7 @@ var terminalAsker = /* @__PURE__ */ __name((command) => async (key, request) =>
|
|
|
126
126
|
throw new CliError("cancelled", `${key}: not done \u2014 the answer was no`);
|
|
127
127
|
}, "terminalAsker");
|
|
128
128
|
|
|
129
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
129
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/cli/permission-keys.js
|
|
130
130
|
var HOUSEKEEPING = /* @__PURE__ */ new Set([
|
|
131
131
|
"help",
|
|
132
132
|
"guide",
|
|
@@ -206,7 +206,7 @@ var refuseUnknownPermissionKeys = /* @__PURE__ */ __name((command, settings, too
|
|
|
206
206
|
throw new CliError("validation_error", `--permission ${key} names no command`, { permission: key });
|
|
207
207
|
}, "refuseUnknownPermissionKeys");
|
|
208
208
|
|
|
209
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
209
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/cli/messenger/stored.js
|
|
210
210
|
var REKEY_PACING = { lockMs: 50, pauseMs: 25 };
|
|
211
211
|
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" }) => {
|
|
212
212
|
let warned = false;
|
|
@@ -782,7 +782,7 @@ var keep = /* @__PURE__ */ __name(async (store, account, event, seenAt, among, c
|
|
|
782
782
|
}
|
|
783
783
|
}, "keep");
|
|
784
784
|
|
|
785
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
785
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/sends/pace.js
|
|
786
786
|
import { readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
787
787
|
import { join } from "node:path";
|
|
788
788
|
var DEFAULT_PACE = { perMinute: 60, burst: 20 };
|
|
@@ -877,7 +877,7 @@ var waitForTurn = /* @__PURE__ */ __name(async (pacer, options) => {
|
|
|
877
877
|
await (options.sleep ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms))))(waitMs);
|
|
878
878
|
}, "waitForTurn");
|
|
879
879
|
|
|
880
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
880
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/cli/messenger/flooded.js
|
|
881
881
|
var LONG_LIVED = /* @__PURE__ */ new Set(["self", "newSendId", "close", "formatMarkdown", "formatHtml", "storedChats"]);
|
|
882
882
|
var LISTENING = /* @__PURE__ */ new Set(["watch", "feed", "listen", "listenHistory"]);
|
|
883
883
|
var BLOCKING = /* @__PURE__ */ new Set(["frozen", "limited", "banned"]);
|
|
@@ -974,7 +974,7 @@ var flooded = /* @__PURE__ */ __name((messenger, memory, { name, warn, pacer })
|
|
|
974
974
|
});
|
|
975
975
|
}, "flooded");
|
|
976
976
|
|
|
977
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
977
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/cli/messenger/observed.js
|
|
978
978
|
var observed = /* @__PURE__ */ __name((messenger, events) => {
|
|
979
979
|
const timed = /* @__PURE__ */ __name(async (operation, named, work, after) => {
|
|
980
980
|
const write = currentOperation();
|
|
@@ -1073,7 +1073,7 @@ var byPart = /* @__PURE__ */ __name((batch, counts) => {
|
|
|
1073
1073
|
counts[part] = (counts[part] ?? 0) + items.length;
|
|
1074
1074
|
}, "byPart");
|
|
1075
1075
|
|
|
1076
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1076
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/cli/messenger/context.js
|
|
1077
1077
|
var lazyStore = /* @__PURE__ */ __name((env, command, version) => {
|
|
1078
1078
|
let opened;
|
|
1079
1079
|
return {
|
|
@@ -15,12 +15,12 @@ import {
|
|
|
15
15
|
string,
|
|
16
16
|
text,
|
|
17
17
|
unknown
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-JRFKCYMW.js";
|
|
19
19
|
import {
|
|
20
20
|
__name
|
|
21
21
|
} from "./chunk-ZVVMGPBJ.js";
|
|
22
22
|
|
|
23
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
23
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/log.js
|
|
24
24
|
var LOG_SEVERITIES = ["trace", "debug", "info", "warn", "error", "fatal"];
|
|
25
25
|
var logRecordSchema = strictObject({
|
|
26
26
|
time: isoTime,
|
|
@@ -2,15 +2,15 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
wirecatDirectory
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-CRIEW4FP.js";
|
|
6
6
|
import {
|
|
7
7
|
CliError
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-EA2OB75T.js";
|
|
9
9
|
import {
|
|
10
10
|
__name
|
|
11
11
|
} from "./chunk-ZVVMGPBJ.js";
|
|
12
12
|
|
|
13
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/speech/models.js
|
|
14
14
|
var huggingFace = /* @__PURE__ */ __name((repository, commit) => (name) => `https://huggingface.co/csukuangfj/${repository}/resolve/${commit}/${name}`, "huggingFace");
|
|
15
15
|
var gigaam = huggingFace("sherpa-onnx-nemo-transducer-punct-giga-am-v3-russian-2025-12-16", "a6039be7cee829a9044a69ac0ebaf1c191217c97");
|
|
16
16
|
var gigaamCtc = huggingFace("sherpa-onnx-nemo-ctc-punct-giga-am-v3-russian-2025-12-16", "4fb5407ff028a69fec516cdf4c10fac9ddea7c16");
|
|
@@ -137,7 +137,7 @@ var speechModel = /* @__PURE__ */ __name((id) => {
|
|
|
137
137
|
return model;
|
|
138
138
|
}, "speechModel");
|
|
139
139
|
|
|
140
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
140
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/speech/install.js
|
|
141
141
|
import { createHash, randomUUID } from "node:crypto";
|
|
142
142
|
import { createReadStream, createWriteStream, mkdirSync, statSync } from "node:fs";
|
|
143
143
|
import { rename, rm } from "node:fs/promises";
|
|
@@ -2,10 +2,10 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
REASONS
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-7JKECODO.js";
|
|
6
6
|
|
|
7
7
|
// dist/version.js
|
|
8
|
-
var VERSION = "0.
|
|
8
|
+
var VERSION = "0.68.0";
|
|
9
9
|
|
|
10
10
|
// dist/identity.js
|
|
11
11
|
var PACKAGE = "@wirecat/drive-cli";
|
|
@@ -3,12 +3,12 @@ const require = __bundleRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
CliError,
|
|
5
5
|
isCliError
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-EA2OB75T.js";
|
|
7
7
|
import {
|
|
8
8
|
__name
|
|
9
9
|
} from "./chunk-ZVVMGPBJ.js";
|
|
10
10
|
|
|
11
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
11
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/http/hosts.js
|
|
12
12
|
var LABEL = "[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?";
|
|
13
13
|
var HOST_PATTERN = new RegExp(`^(?:${LABEL}(?:\\.${LABEL})*|\\*\\.${LABEL}(?:\\.${LABEL})+)$`);
|
|
14
14
|
var hostProblems = /* @__PURE__ */ __name((hosts) => [
|
|
@@ -20,7 +20,7 @@ var hostCovered = /* @__PURE__ */ __name((hostname, hosts) => {
|
|
|
20
20
|
return hosts.some((host) => host.startsWith("*.") ? name.endsWith(host.slice(1)) : name === host);
|
|
21
21
|
}, "hostCovered");
|
|
22
22
|
|
|
23
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
23
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/http/fetch.js
|
|
24
24
|
var HOST_FETCH_TIMEOUT_MS = 3e4;
|
|
25
25
|
var REDIRECTS = 5;
|
|
26
26
|
var REDIRECT_STATUSES = /* @__PURE__ */ new Set([301, 302, 303, 307, 308]);
|
|
@@ -108,7 +108,7 @@ var hostFetch = /* @__PURE__ */ __name((options) => {
|
|
|
108
108
|
};
|
|
109
109
|
}, "hostFetch");
|
|
110
110
|
|
|
111
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
111
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/http/index.js
|
|
112
112
|
var parseRetryAfter = /* @__PURE__ */ __name((header, now) => {
|
|
113
113
|
if (!header)
|
|
114
114
|
return void 0;
|
|
@@ -132,7 +132,7 @@ var parseRateLimitReset = /* @__PURE__ */ __name((header, now) => {
|
|
|
132
132
|
}, "parseRateLimitReset");
|
|
133
133
|
var providerWaitMs = /* @__PURE__ */ __name((headers, now) => parseRetryAfter(headers.get("retry-after"), now) ?? parseRateLimitReset(headers.get("x-ratelimit-reset"), now), "providerWaitMs");
|
|
134
134
|
|
|
135
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
135
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/models/endpoint.js
|
|
136
136
|
var endpoint = /* @__PURE__ */ __name((value) => {
|
|
137
137
|
try {
|
|
138
138
|
const url = new URL(value);
|
|
@@ -151,9 +151,38 @@ var onThisComputer = /* @__PURE__ */ __name((value) => {
|
|
|
151
151
|
}, "onThisComputer");
|
|
152
152
|
var modelAddressAllowed = /* @__PURE__ */ __name((value) => endpoint(value) && (new URL(value).protocol === "https:" || onThisComputer(value)), "modelAddressAllowed");
|
|
153
153
|
var PLAIN_HTTP_REFUSED = "this address is not allowed: use https, or http only on this computer";
|
|
154
|
+
var literalFetch = /* @__PURE__ */ __name((hostname, timeoutMs) => async (input, init = {}) => {
|
|
155
|
+
const url = new URL(input instanceof Request ? input.url : String(input));
|
|
156
|
+
if (url.hostname !== hostname)
|
|
157
|
+
throw new CliError("configuration_error", `${url.hostname} is not the model address's host, ${hostname}`, {
|
|
158
|
+
reason: "network.host-undeclared",
|
|
159
|
+
sent: false
|
|
160
|
+
});
|
|
161
|
+
const deadline2 = AbortSignal.timeout(timeoutMs);
|
|
162
|
+
const signal = init.signal ? AbortSignal.any([init.signal, deadline2]) : deadline2;
|
|
163
|
+
try {
|
|
164
|
+
const response = await fetch(input, { ...init, signal, redirect: "manual" });
|
|
165
|
+
if (response.status >= 300 && response.status < 400) {
|
|
166
|
+
void response.body?.cancel().catch(() => {
|
|
167
|
+
});
|
|
168
|
+
throw new CliError("invalid_response", `${hostname} answered with a redirect, which is not followed`);
|
|
169
|
+
}
|
|
170
|
+
return response;
|
|
171
|
+
} catch (error) {
|
|
172
|
+
if (isCliError(error))
|
|
173
|
+
throw error;
|
|
174
|
+
if (init.signal?.aborted)
|
|
175
|
+
throw new CliError("cancelled", "request cancelled");
|
|
176
|
+
if (deadline2.aborted)
|
|
177
|
+
throw new CliError("timeout", `${hostname} did not answer within ${timeoutMs} ms`, { retryable: true });
|
|
178
|
+
throw new CliError("network_error", `${hostname} could not be reached`, { retryable: true });
|
|
179
|
+
}
|
|
180
|
+
}, "literalFetch");
|
|
154
181
|
var endpointFetch = /* @__PURE__ */ __name((address, timeoutMs) => {
|
|
155
182
|
const { hostname } = new URL(address);
|
|
156
|
-
|
|
183
|
+
if (hostname === "[::1]")
|
|
184
|
+
return fetch;
|
|
185
|
+
return hostname.startsWith("[") ? literalFetch(hostname, timeoutMs) : hostFetch({ hosts: [hostname], timeoutMs });
|
|
157
186
|
}, "endpointFetch");
|
|
158
187
|
|
|
159
188
|
export {
|