@wirecat/drive-cli 0.47.0 → 0.50.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/dist/age.d.ts +36 -0
- package/dist/age.d.ts.map +1 -1
- package/dist/age.js +17 -0
- package/dist/age.js.map +1 -1
- package/dist/bin/drive.js +2 -2
- package/dist/bundle/{all-profiles-O7CNQ7FO.js → all-profiles-WQTVOCIS.js} +8 -8
- package/dist/bundle/{anthropic-6T67J2CE.js → anthropic-YCA2AWIJ.js} +5 -5
- package/dist/bundle/{app-server-BVBZT3UY.js → app-server-ZQOYUQJH.js} +52 -52
- package/dist/bundle/{bun-O6RL6LRQ.js → bun-5NFIDHGM.js} +2 -2
- package/dist/bundle/{bun-sqlite-54W7JUY3.js → bun-sqlite-OAQE4M2E.js} +4 -4
- package/dist/bundle/{chunk-NLEB26GA.js → chunk-24TOKSZE.js} +2 -2
- package/dist/bundle/{chunk-DL7D6Y3B.js → chunk-2M5XEGVE.js} +3413 -3293
- package/dist/bundle/{chunk-4NGLRHWO.js → chunk-3CQNJKJT.js} +1 -1
- package/dist/bundle/{chunk-CYCQBQBH.js → chunk-3HNUH632.js} +6 -6
- package/dist/bundle/{chunk-5TC3NCAF.js → chunk-3XX52F42.js} +2 -2
- package/dist/bundle/{chunk-R2A3K7ZF.js → chunk-4J7UGHPK.js} +5 -5
- package/dist/bundle/{chunk-GHOWRW7E.js → chunk-4OLWMHS6.js} +10 -3
- package/dist/bundle/{chunk-NDNTLUPS.js → chunk-4SSUKRO4.js} +2 -2
- package/dist/bundle/{chunk-CVIKKIGE.js → chunk-4VLUX3V5.js} +1 -1
- package/dist/bundle/{chunk-AIXLOMH4.js → chunk-53UWCVSU.js} +1 -1
- package/dist/bundle/{chunk-3Z7WSD2A.js → chunk-5OMLYNYB.js} +8 -8
- package/dist/bundle/{chunk-VCYFEWPD.js → chunk-5WN7JHQE.js} +26 -26
- package/dist/bundle/{chunk-GQW4GRYR.js → chunk-5Z63NTC7.js} +6 -6
- package/dist/bundle/{chunk-D67JGWSC.js → chunk-5ZJHQ4TN.js} +7 -4
- package/dist/bundle/{chunk-XF5MFUEB.js → chunk-652YTDT5.js} +15 -15
- package/dist/bundle/{chunk-PJ7IQVOM.js → chunk-6DDXB5WB.js} +2 -2
- package/dist/bundle/{chunk-DXKVEOSS.js → chunk-6E4PFCQ4.js} +1 -1
- package/dist/bundle/{chunk-G3FAOS52.js → chunk-7SYSC7KX.js} +2 -2
- package/dist/bundle/{chunk-BQUPOB5H.js → chunk-AO3NCZNT.js} +8 -8
- package/dist/bundle/{chunk-U2OD7MKK.js → chunk-BUALWXBT.js} +1 -1
- package/dist/bundle/{chunk-OWXTPXIQ.js → chunk-C4PNAHI4.js} +11 -11
- package/dist/bundle/{recognize-IFXOJHEA.js → chunk-CCEVICWU.js} +7 -7
- package/dist/bundle/{chunk-IGMRWQP3.js → chunk-CEUEXMIR.js} +86 -35
- package/dist/bundle/{chunk-5MGIL5LW.js → chunk-CTIQ77AB.js} +20 -17
- package/dist/bundle/{chunk-VHQNVG3J.js → chunk-DTHWL5YU.js} +5 -5
- package/dist/bundle/{chunk-67BQ3XMH.js → chunk-E656DAZT.js} +1 -1
- package/dist/bundle/{chunk-WUFCYDKB.js → chunk-EXYEDKTX.js} +2 -2
- package/dist/bundle/{chunk-BJ3JRO34.js → chunk-EY4CUQW2.js} +7 -7
- package/dist/bundle/{chunk-QW36EOAM.js → chunk-FABKIQ24.js} +2 -2
- package/dist/bundle/{chunk-SMHQA5J6.js → chunk-FSAM4Y2S.js} +15 -8
- package/dist/bundle/{chunk-R2QRP7EJ.js → chunk-G75FZQAZ.js} +13 -9
- package/dist/bundle/{chunk-VHT2WI4I.js → chunk-HGWMX7BM.js} +101 -73
- package/dist/bundle/{chunk-44FV5JAS.js → chunk-HURI56SB.js} +21 -21
- package/dist/bundle/{chunk-GWPKIRNQ.js → chunk-IA6LNKCF.js} +5 -5
- package/dist/bundle/{chunk-LHIL46I3.js → chunk-IFM2APQB.js} +2 -2
- package/dist/bundle/{chunk-BEXHAGXH.js → chunk-IGG4RBIZ.js} +170 -146
- package/dist/bundle/{chunk-PDBBBUY7.js → chunk-INVF3GXW.js} +10 -10
- package/dist/bundle/{chunk-KADPV4YA.js → chunk-IUZ4PT2V.js} +2 -2
- package/dist/bundle/{chunk-K74PQVQZ.js → chunk-JA2YY7D4.js} +7 -7
- package/dist/bundle/{chunk-K7FRUB33.js → chunk-JHBX53SK.js} +35 -35
- package/dist/bundle/{chunk-QTJUH3LS.js → chunk-JSMPSOEM.js} +3 -3
- package/dist/bundle/{chunk-PH74B2VZ.js → chunk-KEQ35HQQ.js} +3 -3
- package/dist/bundle/{chunk-NW7IMGRR.js → chunk-KYMGVMOS.js} +1 -1
- package/dist/bundle/{chunk-AOOD3RMK.js → chunk-KZEOWOZV.js} +7 -7
- package/dist/bundle/{chunk-VYBOYBLX.js → chunk-LNWRRK2H.js} +6 -6
- package/dist/bundle/{chunk-RCS2SCX5.js → chunk-M2D4FXKY.js} +5 -5
- package/dist/bundle/{chunk-KJMBV574.js → chunk-M6FQOGUW.js} +392 -319
- package/dist/bundle/{chunk-GOR3Z2FR.js → chunk-MMOG7ZVF.js} +2 -2
- package/dist/bundle/{chunk-RJ633GFA.js → chunk-NHRJW3PH.js} +2 -2
- package/dist/bundle/{chunk-MFS52LTZ.js → chunk-OKSS7YUN.js} +1 -1
- package/dist/bundle/{chunk-ZBM4GEV2.js → chunk-OL22OOIW.js} +4 -4
- package/dist/bundle/{chunk-BHE7ZY2N.js → chunk-OQEBGY74.js} +74 -46
- package/dist/bundle/{chunk-MAXN7COO.js → chunk-P3T2SZW2.js} +1 -1
- package/dist/bundle/{chunk-LJARCTGL.js → chunk-P6VN5UB4.js} +4 -4
- package/dist/bundle/{chunk-A3FU4RR6.js → chunk-PNUS224S.js} +4 -4
- package/dist/bundle/{chunk-JVTVAZ5X.js → chunk-POD2GHQB.js} +58 -19
- package/dist/bundle/{chunk-FEULDMWM.js → chunk-Q27HCATD.js} +1980 -1557
- package/dist/bundle/{chunk-4DW6QGEV.js → chunk-Q3VG3UYV.js} +11 -11
- package/dist/bundle/{chunk-AUS6TKP5.js → chunk-QBECV7NO.js} +33 -32
- package/dist/bundle/{chunk-DORXXBFC.js → chunk-QNLD7Y6Z.js} +7 -7
- package/dist/bundle/{chunk-3HRDEJJW.js → chunk-QSDXVUJG.js} +4 -4
- package/dist/bundle/{chunk-GNFHZZ55.js → chunk-QY3LK3OT.js} +5 -5
- package/dist/bundle/{chunk-CFZWPIVC.js → chunk-R7XMCREL.js} +39 -21
- package/dist/bundle/{chunk-NP3XLLN3.js → chunk-RTIMGPLN.js} +3 -3
- package/dist/bundle/{chunk-SWMMR3FR.js → chunk-T7UZHKAS.js} +2 -2
- package/dist/bundle/{chunk-IKNU5A5Y.js → chunk-TATRMMOG.js} +3 -3
- package/dist/bundle/{chunk-QWSRPXCJ.js → chunk-UVPKSZSC.js} +4 -4
- package/dist/bundle/{chunk-CKR3DVUK.js → chunk-VAETCXRI.js} +54 -26
- package/dist/bundle/{chunk-6T7NSOYC.js → chunk-VAK2Q2XG.js} +14 -14
- package/dist/bundle/{chunk-DDYR6DYL.js → chunk-XEETGCOC.js} +1 -1
- package/dist/bundle/{chunk-XAZQTJXR.js → chunk-XGJUEH5C.js} +27 -27
- package/dist/bundle/{chunk-VAGF723Z.js → chunk-Y73IZWRI.js} +1 -1
- package/dist/bundle/{chunk-2DLAJGRN.js → chunk-YOABRW2M.js} +1 -1
- package/dist/bundle/{chunk-TRMIV3OA.js → chunk-YROVFHPJ.js} +2 -2
- package/dist/bundle/{chunk-NB2N6L3R.js → chunk-Z54E5LKF.js} +6 -6
- package/dist/bundle/{chunk-IAW5A7OR.js → chunk-ZJBRKR42.js} +32 -28
- package/dist/bundle/{chunk-LOTQ2HMT.js → chunk-ZKGYW63J.js} +9 -9
- package/dist/bundle/{chunk-XEBFFKXO.js → chunk-ZP735UUT.js} +3 -3
- package/dist/bundle/{chunk-HEPIOCHN.js → chunk-ZXD2I5ZQ.js} +58 -51
- package/dist/bundle/command-contract-TAWVO2G3.js +38 -0
- package/dist/bundle/decode-YZRTP54O.js +159 -0
- package/dist/bundle/drive.js +7 -7
- package/dist/bundle/{echarts-LD3AI55P.js → echarts-C6HUK2FL.js} +2 -2
- package/dist/bundle/{embed-FJKIIM43.js → embed-QRQ7ITFC.js} +5 -5
- package/dist/bundle/{embedder-NNQ5ZC25.js → embedder-EZDB3JPA.js} +8 -8
- package/dist/bundle/{entry-ZYSNPDSD.js → entry-4WQQKSYG.js} +6 -6
- package/dist/bundle/failure-EEJGMWEP.js +37 -0
- package/dist/bundle/{first-run-KA2UPZAU.js → first-run-ZAS4OV3T.js} +9 -9
- package/dist/bundle/first-screen-6ICWD2N3.js +36 -0
- package/dist/bundle/{google-ZYDFTHLN.js → google-KNILTIDW.js} +9 -9
- package/dist/bundle/google-api-CZACYX5T.js +82 -0
- package/dist/bundle/{identity-7JM62OER.js → identity-VBCGUXT5.js} +2 -2
- package/dist/bundle/{instructions-RZMSW3OC.js → instructions-II4M2WL3.js} +1 -1
- package/dist/bundle/{login-JU6NKW5P.js → login-4JACQVMD.js} +62 -62
- package/dist/bundle/mcp-2BR2EX7L.js +95 -0
- package/dist/bundle/{mcp-KWXNBIAI.js → mcp-6ZIAWU3N.js} +76 -76
- package/dist/bundle/{mcp-OQBZXELQ.js → mcp-ZYZ4DFW2.js} +2 -2
- package/dist/bundle/{node-ZRLYQL7J.js → node-LIN7L4VQ.js} +2 -2
- package/dist/bundle/node-sqlite-VAH4KZN3.js +62 -0
- package/dist/bundle/{oauth-NAIBKERJ.js → oauth-QUE3VCTU.js} +6 -6
- package/dist/bundle/{open-3P5EPXPV.js → open-DQ3EVYPB.js} +3 -3
- package/dist/bundle/{process-LL77573L.js → process-46XDWPVW.js} +1 -1
- package/dist/bundle/{program-VKHR42BF.js → program-X3CZ4XDN.js} +141 -99
- package/dist/bundle/{prompt-3TX2SWOY.js → prompt-SAZYCZV3.js} +4 -4
- package/dist/bundle/{reasons-GF2TYGX6.js → reasons-366PI7OV.js} +3 -3
- package/dist/bundle/recognize-SSBOHOTW.js +22 -0
- package/dist/bundle/{remote-663M42Y5.js → remote-EL3FWCQE.js} +6 -6
- package/dist/bundle/{rerank-OT2F2DBV.js → rerank-RPIQRJIW.js} +6 -6
- package/dist/bundle/{serve-PDNNI6O6.js → serve-AX44DIKK.js} +8 -8
- package/dist/bundle/server-DCJIGUW2.js +56 -0
- package/dist/bundle/server-WWQSQBFT.js +69 -0
- package/dist/bundle/{services-5MCTECBU.js → services-K4UOEMQD.js} +28 -28
- package/dist/bundle/{sqlite-runtime-BF3KDM7W.js → sqlite-runtime-N7N3EYGH.js} +4 -4
- package/dist/bundle/{state-SZX65E74.js → state-C3S5FD7V.js} +5 -5
- package/dist/bundle/{store-TCWNLA3V.js → store-4N3NBUGX.js} +14 -14
- package/dist/bundle/{store-UKPGGAPW.js → store-QV4ZNEQ3.js} +16 -16
- package/dist/bundle/store-maintenance-command-QL4AECBD.js +57 -0
- package/dist/bundle/tokens-Y7HCOXOA.js +103 -0
- package/dist/commands/documents.d.ts +5 -1
- package/dist/commands/documents.d.ts.map +1 -1
- package/dist/commands/documents.js +11 -5
- package/dist/commands/documents.js.map +1 -1
- package/dist/commands/remote.d.ts +8 -0
- package/dist/commands/remote.d.ts.map +1 -1
- package/dist/commands/remote.js +16 -0
- package/dist/commands/remote.js.map +1 -1
- package/dist/commands/session.d.ts.map +1 -1
- package/dist/commands/session.js +10 -2
- package/dist/commands/session.js.map +1 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +4 -1
- package/dist/program.js.map +1 -1
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +2 -2
- package/dist/tokens.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/dist/bundle/command-contract-MXCBV3GJ.js +0 -38
- package/dist/bundle/failure-KZDBSYBR.js +0 -37
- package/dist/bundle/first-screen-VQ3RXDMF.js +0 -36
- package/dist/bundle/google-api-2GT5PAW2.js +0 -82
- package/dist/bundle/mcp-JOQMFGBC.js +0 -95
- package/dist/bundle/node-sqlite-TXPSRROT.js +0 -46
- package/dist/bundle/server-BFOEPMR7.js +0 -56
- package/dist/bundle/server-K566PJ7H.js +0 -69
- package/dist/bundle/store-maintenance-command-QHLUVBTJ.js +0 -57
- package/dist/bundle/tokens-DFCFRF7I.js +0 -103
- /package/dist/bundle/{chunk-O5EHUB2V.js → chunk-2WNDZFGG.js} +0 -0
- /package/dist/bundle/{chunk-Q2Z3VCM4.js → chunk-VDZZ46RT.js} +0 -0
|
@@ -3,7 +3,7 @@ const require = __bundleRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
answerOf,
|
|
5
5
|
messengerContext
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ZJBRKR42.js";
|
|
7
7
|
import {
|
|
8
8
|
chatEventAnswer,
|
|
9
9
|
memberAnswer,
|
|
@@ -12,26 +12,27 @@ import {
|
|
|
12
12
|
serveRelay,
|
|
13
13
|
typedQuery,
|
|
14
14
|
withQuery
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-POD2GHQB.js";
|
|
16
16
|
import {
|
|
17
17
|
renderMessages
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-5ZJHQ4TN.js";
|
|
19
19
|
import {
|
|
20
20
|
holdLock,
|
|
21
21
|
lockPath,
|
|
22
22
|
releaseLock,
|
|
23
23
|
servingProfiles,
|
|
24
24
|
takeLock
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-RTIMGPLN.js";
|
|
26
26
|
import {
|
|
27
27
|
RULES_VERSION,
|
|
28
28
|
applyTaskRulesOnArrival,
|
|
29
29
|
newSendId,
|
|
30
30
|
onlineDeps,
|
|
31
31
|
openRequestTask,
|
|
32
|
+
senderIsMe,
|
|
32
33
|
servicesFor,
|
|
33
34
|
syncsOneChat
|
|
34
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-2M5XEGVE.js";
|
|
35
36
|
import {
|
|
36
37
|
LOCAL_READ,
|
|
37
38
|
LOCAL_WRITE,
|
|
@@ -53,39 +54,39 @@ import {
|
|
|
53
54
|
snakeKeys,
|
|
54
55
|
storeTable,
|
|
55
56
|
withoutProviderRefs
|
|
56
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-QBECV7NO.js";
|
|
57
58
|
import {
|
|
58
59
|
Command,
|
|
59
60
|
annotate
|
|
60
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-ZKGYW63J.js";
|
|
61
62
|
import {
|
|
62
63
|
holdersOf
|
|
63
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-53UWCVSU.js";
|
|
64
65
|
import {
|
|
65
66
|
codeOf,
|
|
66
67
|
currentRun
|
|
67
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-R7XMCREL.js";
|
|
68
69
|
import {
|
|
69
70
|
failureKey
|
|
70
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-MMOG7ZVF.js";
|
|
71
72
|
import {
|
|
72
73
|
levelFor
|
|
73
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-6DDXB5WB.js";
|
|
74
75
|
import {
|
|
75
76
|
envName
|
|
76
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-NHRJW3PH.js";
|
|
77
78
|
import {
|
|
78
79
|
readSecret
|
|
79
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-TATRMMOG.js";
|
|
80
81
|
import {
|
|
81
82
|
checkedOptions,
|
|
82
83
|
range
|
|
83
|
-
} from "./chunk-
|
|
84
|
+
} from "./chunk-IFM2APQB.js";
|
|
84
85
|
import {
|
|
85
86
|
messagesFor,
|
|
86
87
|
systemFor,
|
|
87
88
|
validateImages
|
|
88
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-IUZ4PT2V.js";
|
|
89
90
|
import {
|
|
90
91
|
MIGRATIONS,
|
|
91
92
|
drainNoteIndex,
|
|
@@ -112,26 +113,26 @@ import {
|
|
|
112
113
|
storeClients,
|
|
113
114
|
storeContents,
|
|
114
115
|
vectorIndexCounts
|
|
115
|
-
} from "./chunk-
|
|
116
|
+
} from "./chunk-Q27HCATD.js";
|
|
116
117
|
import {
|
|
117
118
|
formatLocator,
|
|
118
119
|
parseLocator
|
|
119
|
-
} from "./chunk-
|
|
120
|
+
} from "./chunk-KZEOWOZV.js";
|
|
120
121
|
import {
|
|
121
122
|
queryFieldsOf
|
|
122
|
-
} from "./chunk-
|
|
123
|
+
} from "./chunk-G75FZQAZ.js";
|
|
123
124
|
import {
|
|
124
125
|
storePath
|
|
125
|
-
} from "./chunk-
|
|
126
|
+
} from "./chunk-YROVFHPJ.js";
|
|
126
127
|
import {
|
|
127
128
|
openCache
|
|
128
|
-
} from "./chunk-
|
|
129
|
+
} from "./chunk-LNWRRK2H.js";
|
|
129
130
|
import {
|
|
130
131
|
Credentials,
|
|
131
132
|
pathsAreOverridden,
|
|
132
133
|
resolvePaths,
|
|
133
134
|
writeSecurely
|
|
134
|
-
} from "./chunk-
|
|
135
|
+
} from "./chunk-HGWMX7BM.js";
|
|
135
136
|
import {
|
|
136
137
|
CliError,
|
|
137
138
|
array,
|
|
@@ -156,7 +157,7 @@ import {
|
|
|
156
157
|
transform,
|
|
157
158
|
trim,
|
|
158
159
|
union
|
|
159
|
-
} from "./chunk-
|
|
160
|
+
} from "./chunk-EY4CUQW2.js";
|
|
160
161
|
import {
|
|
161
162
|
__commonJS,
|
|
162
163
|
__name,
|
|
@@ -5496,11 +5497,11 @@ var require_liquid_node = __commonJS({
|
|
|
5496
5497
|
}
|
|
5497
5498
|
});
|
|
5498
5499
|
|
|
5499
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5500
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/cli/messenger/store-maintenance-command.js
|
|
5500
5501
|
import { chmodSync, constants, copyFileSync, existsSync as existsSync7, mkdirSync, realpathSync, renameSync as renameSync2, rmSync as rmSync2, statfsSync, statSync as statSync3, writeFileSync } from "node:fs";
|
|
5501
5502
|
import { dirname, resolve } from "node:path";
|
|
5502
5503
|
|
|
5503
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5504
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/sealed.js
|
|
5504
5505
|
import { createCipheriv, createDecipheriv, createHash, randomBytes, scrypt, timingSafeEqual } from "node:crypto";
|
|
5505
5506
|
import { closeSync, createReadStream, createWriteStream, existsSync, openSync, readSync, renameSync, rmSync, statSync } from "node:fs";
|
|
5506
5507
|
import { Transform } from "node:stream";
|
|
@@ -5607,7 +5608,7 @@ var unsealFile = /* @__PURE__ */ __name(async (from, to, password) => {
|
|
|
5607
5608
|
renameSync(pending, to);
|
|
5608
5609
|
}, "unsealFile");
|
|
5609
5610
|
|
|
5610
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5611
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/compatibility.js
|
|
5611
5612
|
var SPEAKS = MIGRATIONS.at(-1)?.version ?? 0;
|
|
5612
5613
|
var fileSchemaOf = /* @__PURE__ */ __name((database) => {
|
|
5613
5614
|
const tracked = database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'schema_migrations'").get();
|
|
@@ -5631,7 +5632,7 @@ var compatibilityOf = /* @__PURE__ */ __name((file2, migrations = MIGRATIONS) =>
|
|
|
5631
5632
|
};
|
|
5632
5633
|
}, "compatibilityOf");
|
|
5633
5634
|
|
|
5634
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5635
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/repair.js
|
|
5635
5636
|
import { createHash as createHash2 } from "node:crypto";
|
|
5636
5637
|
var COPY_MARK = "__repair_";
|
|
5637
5638
|
var COPY_NAME = /__repair_[0-9a-f]{8}(_\d+)?$/;
|
|
@@ -5885,7 +5886,7 @@ var deleteCopy = /* @__PURE__ */ __name((database, name) => {
|
|
|
5885
5886
|
return found;
|
|
5886
5887
|
}, "deleteCopy");
|
|
5887
5888
|
|
|
5888
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5889
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/cli/store-info.js
|
|
5889
5890
|
import { existsSync as existsSync2, statSync as statSync2 } from "node:fs";
|
|
5890
5891
|
var pendingIfKnown = /* @__PURE__ */ __name((database) => database.prepare("SELECT 1 FROM pragma_table_info('messages') WHERE name = 'normalized_text'").get() ? pendingNormalization(database) : null, "pendingIfKnown");
|
|
5891
5892
|
var bytesOf = /* @__PURE__ */ __name((path) => existsSync2(path) ? statSync2(path).size : 0, "bytesOf");
|
|
@@ -5932,7 +5933,7 @@ var storeInfoCommand = /* @__PURE__ */ __name(() => annotate(new Command("info")
|
|
|
5932
5933
|
renderAnswer(this, outputFor(this), itemOf(answer));
|
|
5933
5934
|
}), "storeInfoCommand");
|
|
5934
5935
|
|
|
5935
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5936
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/cli/messenger/password.js
|
|
5936
5937
|
var ENCRYPT_OPTION = [
|
|
5937
5938
|
"--encrypt",
|
|
5938
5939
|
"compress and encrypt with a password, typed at a hidden prompt or piped on stdin; it is never kept \u2014 lose it and the file cannot be opened"
|
|
@@ -5951,7 +5952,7 @@ var passwordOf = /* @__PURE__ */ __name(async (command, { twice }) => {
|
|
|
5951
5952
|
return password;
|
|
5952
5953
|
}, "passwordOf");
|
|
5953
5954
|
|
|
5954
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5955
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/replies/rules.js
|
|
5955
5956
|
import { existsSync as existsSync3, readFileSync } from "node:fs";
|
|
5956
5957
|
import { join } from "node:path";
|
|
5957
5958
|
var REPLY_ACTIONS = ["reply", "task"];
|
|
@@ -6122,7 +6123,7 @@ var problem = /* @__PURE__ */ __name((issue) => {
|
|
|
6122
6123
|
}, "problem");
|
|
6123
6124
|
var broken = /* @__PURE__ */ __name((path, why) => new CliError("configuration_error", `the reply rules ${path} cannot be read (${why}) \u2014 fix the file`), "broken");
|
|
6124
6125
|
|
|
6125
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6126
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/replies/state.js
|
|
6126
6127
|
import { existsSync as existsSync4, readFileSync as readFileSync2 } from "node:fs";
|
|
6127
6128
|
import { join as join2 } from "node:path";
|
|
6128
6129
|
var ANSWERED_KEPT = 1e3;
|
|
@@ -6175,7 +6176,7 @@ var recordReply = /* @__PURE__ */ __name((state, rule2, message, now) => {
|
|
|
6175
6176
|
}, "recordReply");
|
|
6176
6177
|
var broken2 = /* @__PURE__ */ __name((path, why) => new CliError("configuration_error", `the reply state ${path} cannot be read (${why}) \u2014 fix or move the file`), "broken");
|
|
6177
6178
|
|
|
6178
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6179
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/replies/decide.js
|
|
6179
6180
|
var skip = /* @__PURE__ */ __name((why) => ({ skip: why }), "skip");
|
|
6180
6181
|
var decide = /* @__PURE__ */ __name((rule2, incoming, state, now) => {
|
|
6181
6182
|
const { message, chat, owner, sender } = incoming;
|
|
@@ -6281,7 +6282,7 @@ var filled = /* @__PURE__ */ __name((template2, senderName) => {
|
|
|
6281
6282
|
return template2.replaceAll("{firstName}", name.split(/\s+/)[0] ?? name).replaceAll("{name}", name);
|
|
6282
6283
|
}, "filled");
|
|
6283
6284
|
|
|
6284
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6285
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/replies/template.js
|
|
6285
6286
|
var import_liquidjs = __toESM(require_liquid_node(), 1);
|
|
6286
6287
|
var TEMPLATE_LIMITS = {
|
|
6287
6288
|
parse: 32768,
|
|
@@ -6441,7 +6442,7 @@ var renderReplyTemplate = /* @__PURE__ */ __name(async (reply, input) => {
|
|
|
6441
6442
|
}
|
|
6442
6443
|
}, "renderReplyTemplate");
|
|
6443
6444
|
|
|
6444
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6445
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/replies/dry-run.js
|
|
6445
6446
|
var DRY_RUN_DAYS = 7;
|
|
6446
6447
|
var PAGE = 500;
|
|
6447
6448
|
var dryRun = /* @__PURE__ */ __name(async (store, account, rules, { since, until = Date.now(), only, audience, render }) => {
|
|
@@ -6555,7 +6556,7 @@ var storedSince = /* @__PURE__ */ __name(async (store, account, chat, since) =>
|
|
|
6555
6556
|
}
|
|
6556
6557
|
}, "storedSince");
|
|
6557
6558
|
|
|
6558
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6559
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/embeddings/keys.js
|
|
6559
6560
|
var endpointKeyName = /* @__PURE__ */ __name((baseUrl) => {
|
|
6560
6561
|
const host = new URL(baseUrl).host;
|
|
6561
6562
|
return ["openai", "anthropic"].includes(host) ? `endpoint:${host}` : host;
|
|
@@ -6586,7 +6587,7 @@ var embeddingKeys = /* @__PURE__ */ __name((app, env = process.env, keyring) =>
|
|
|
6586
6587
|
};
|
|
6587
6588
|
}, "embeddingKeys");
|
|
6588
6589
|
|
|
6589
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6590
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/models/openai.js
|
|
6590
6591
|
var options = strictObject({
|
|
6591
6592
|
temperature: range(0, 2),
|
|
6592
6593
|
top_p: range(0, 1),
|
|
@@ -6635,7 +6636,7 @@ var openai = {
|
|
|
6635
6636
|
}, "complete")
|
|
6636
6637
|
};
|
|
6637
6638
|
|
|
6638
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6639
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/models/index.js
|
|
6639
6640
|
var modelGateway = /* @__PURE__ */ __name((deps) => ({
|
|
6640
6641
|
complete: /* @__PURE__ */ __name(async (request) => {
|
|
6641
6642
|
if (deps.signal?.aborted)
|
|
@@ -6650,7 +6651,7 @@ var modelGateway = /* @__PURE__ */ __name((deps) => ({
|
|
|
6650
6651
|
if (!adapter && target.provider === "openai")
|
|
6651
6652
|
adapter = openai;
|
|
6652
6653
|
if (!adapter && target.provider === "anthropic")
|
|
6653
|
-
adapter = (await import("./anthropic-
|
|
6654
|
+
adapter = (await import("./anthropic-YCA2AWIJ.js")).anthropic;
|
|
6654
6655
|
if (!adapter)
|
|
6655
6656
|
throw new CliError("validation_error", `no model adapter for ${target.provider}`);
|
|
6656
6657
|
if (request.images !== void 0 && adapter.images !== true)
|
|
@@ -6691,7 +6692,7 @@ var modelGateway = /* @__PURE__ */ __name((deps) => ({
|
|
|
6691
6692
|
}, "complete")
|
|
6692
6693
|
}), "modelGateway");
|
|
6693
6694
|
|
|
6694
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6695
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/replies/consents.js
|
|
6695
6696
|
import { existsSync as existsSync5, readFileSync as readFileSync3 } from "node:fs";
|
|
6696
6697
|
import { join as join3 } from "node:path";
|
|
6697
6698
|
var shape = strictObject({
|
|
@@ -6716,7 +6717,7 @@ var mayModelReply = /* @__PURE__ */ __name((path, provider, chat) => {
|
|
|
6716
6717
|
return consent.provider === provider && !consent.deniedChats.includes(chat);
|
|
6717
6718
|
}, "mayModelReply");
|
|
6718
6719
|
|
|
6719
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6720
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/replies/rendering.js
|
|
6720
6721
|
var replyRenderer = /* @__PURE__ */ __name((app, profile, settings, env, warn, options2 = {
|
|
6721
6722
|
ai: true
|
|
6722
6723
|
}) => async (rule2, message, chat, now) => {
|
|
@@ -6763,7 +6764,7 @@ var replyRenderer = /* @__PURE__ */ __name((app, profile, settings, env, warn, o
|
|
|
6763
6764
|
return result2;
|
|
6764
6765
|
}, "replyRenderer");
|
|
6765
6766
|
|
|
6766
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6767
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/replies/serve.js
|
|
6767
6768
|
var NOT_ALLOWED = "replies.send is not allow";
|
|
6768
6769
|
var NO_RULES = "no rules";
|
|
6769
6770
|
var ONLY_TASK = "opened a task, sent nothing";
|
|
@@ -6856,7 +6857,7 @@ var replyTo = /* @__PURE__ */ __name(async (deps, message) => {
|
|
|
6856
6857
|
return { skip: why };
|
|
6857
6858
|
}, "replyTo");
|
|
6858
6859
|
|
|
6859
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6860
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-members.js
|
|
6860
6861
|
var FIRST_FETCH_MS = 6e4;
|
|
6861
6862
|
var DAY_MS = 864e5;
|
|
6862
6863
|
var memberFetches = /* @__PURE__ */ __name(({ withStore, fetch: fetch2, warn, firstMs = FIRST_FETCH_MS, everyMs = DAY_MS }) => {
|
|
@@ -6910,7 +6911,7 @@ var memberFetches = /* @__PURE__ */ __name(({ withStore, fetch: fetch2, warn, fi
|
|
|
6910
6911
|
};
|
|
6911
6912
|
}, "memberFetches");
|
|
6912
6913
|
|
|
6913
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6914
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-notice.js
|
|
6914
6915
|
var record2 = /* @__PURE__ */ __name((context, app, severity, attributes) => recordLogFor(context.streams.diagnostic, app, { command: currentRun().command || "serve" })[severity](attributes), "record");
|
|
6915
6916
|
var noticeFor = /* @__PURE__ */ __name((context, app, severity = "warn") => ({ text, ...attributes }) => {
|
|
6916
6917
|
if (context.format === "pretty") {
|
|
@@ -6943,7 +6944,7 @@ var recordDiagnostics = /* @__PURE__ */ __name((context, app) => {
|
|
|
6943
6944
|
return context;
|
|
6944
6945
|
}, "recordDiagnostics");
|
|
6945
6946
|
|
|
6946
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6947
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-stems.js
|
|
6947
6948
|
var STEMS_EVERY_MS = 3e4;
|
|
6948
6949
|
var STEMS_SLICE_MS = 2e3;
|
|
6949
6950
|
var stemFills = /* @__PURE__ */ __name(({ withStore, warn, everyMs = STEMS_EVERY_MS, sliceMs = STEMS_SLICE_MS }) => {
|
|
@@ -6983,7 +6984,7 @@ var stemFills = /* @__PURE__ */ __name(({ withStore, warn, everyMs = STEMS_EVERY
|
|
|
6983
6984
|
};
|
|
6984
6985
|
}, "stemFills");
|
|
6985
6986
|
|
|
6986
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6987
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/cli/messenger/message-items.js
|
|
6987
6988
|
var defined = /* @__PURE__ */ __name((value) => Object.fromEntries(Object.entries(value).filter(([, one]) => one !== void 0)), "defined");
|
|
6988
6989
|
var attachmentItem = /* @__PURE__ */ __name((attachment) => defined({
|
|
6989
6990
|
kind: attachment.kind,
|
|
@@ -6995,6 +6996,13 @@ var attachmentItem = /* @__PURE__ */ __name((attachment) => defined({
|
|
|
6995
6996
|
width: attachment.width,
|
|
6996
6997
|
height: attachment.height,
|
|
6997
6998
|
duration: attachment.duration,
|
|
6999
|
+
contact: attachment.contact && defined({
|
|
7000
|
+
name: attachment.contact.name,
|
|
7001
|
+
first_name: attachment.contact.firstName,
|
|
7002
|
+
last_name: attachment.contact.lastName,
|
|
7003
|
+
phone: attachment.contact.phone,
|
|
7004
|
+
user_id: attachment.contact.userId
|
|
7005
|
+
}),
|
|
6998
7006
|
buttons: attachment.buttons
|
|
6999
7007
|
}), "attachmentItem");
|
|
7000
7008
|
var quotedItem = /* @__PURE__ */ __name((quoted) => quoted === null ? null : {
|
|
@@ -7020,8 +7028,7 @@ var messageItem = /* @__PURE__ */ __name((message, reader) => {
|
|
|
7020
7028
|
sender_name: message.senderName,
|
|
7021
7029
|
sender_username: message.senderUsername,
|
|
7022
7030
|
sender_is_chat: message.senderIsChat,
|
|
7023
|
-
|
|
7024
|
-
sender_is_me: message.outgoing === true || message.senderId !== null && String(message.senderId) === account,
|
|
7031
|
+
sender_is_me: senderIsMe(message, account),
|
|
7025
7032
|
mentions: message.mentions,
|
|
7026
7033
|
timestamp: message.timestamp,
|
|
7027
7034
|
edited_at: message.editedAt,
|
|
@@ -7072,7 +7079,7 @@ var viewOf = /* @__PURE__ */ __name((context, messenger) => ({
|
|
|
7072
7079
|
locale: messenger.app.locale
|
|
7073
7080
|
}), "viewOf");
|
|
7074
7081
|
|
|
7075
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7082
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/cli/messenger/watch-answers.js
|
|
7076
7083
|
var observed = /* @__PURE__ */ __name((value) => ({
|
|
7077
7084
|
value: value.value,
|
|
7078
7085
|
observed_at: value.observedAt,
|
|
@@ -7139,7 +7146,7 @@ var watchEventItem = /* @__PURE__ */ __name((value, account) => {
|
|
|
7139
7146
|
}
|
|
7140
7147
|
}, "watchEventItem");
|
|
7141
7148
|
|
|
7142
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7149
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/cli/messenger/watch-command.js
|
|
7143
7150
|
var watchCommand = /* @__PURE__ */ __name((messenger) => annotate(new Command("watch"), {
|
|
7144
7151
|
output: { entity: "watch_item" },
|
|
7145
7152
|
effects: REMOTE_READ,
|
|
@@ -7294,7 +7301,7 @@ var describe = /* @__PURE__ */ __name((event, render) => {
|
|
|
7294
7301
|
}
|
|
7295
7302
|
}, "describe");
|
|
7296
7303
|
|
|
7297
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7304
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-command.js
|
|
7298
7305
|
var serveCommand = /* @__PURE__ */ __name((messenger) => {
|
|
7299
7306
|
const command = annotate(new Command("serve"), {
|
|
7300
7307
|
output: { entity: "serve_summary" },
|
|
@@ -7510,7 +7517,7 @@ var tasking = /* @__PURE__ */ __name((context, warn) => {
|
|
|
7510
7517
|
};
|
|
7511
7518
|
}, "tasking");
|
|
7512
7519
|
|
|
7513
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7520
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/cli/messenger/store-tables-command.js
|
|
7514
7521
|
import { existsSync as existsSync6 } from "node:fs";
|
|
7515
7522
|
var PATH = "store tables list";
|
|
7516
7523
|
var STORE_TABLES_QUERY = {
|
|
@@ -7553,7 +7560,7 @@ var storeTablesCommand = /* @__PURE__ */ __name((messenger) => {
|
|
|
7553
7560
|
return tables;
|
|
7554
7561
|
}, "storeTablesCommand");
|
|
7555
7562
|
|
|
7556
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7563
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/cli/messenger/store-maintenance-command.js
|
|
7557
7564
|
var SEARCH_INDEXES = ["messages_fts", "chats_fts", "identities_fts"];
|
|
7558
7565
|
var WORD_INDEX = "message_words";
|
|
7559
7566
|
var schemaOf = /* @__PURE__ */ __name((database) => {
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
SCHEMA_DIALECT,
|
|
5
|
+
commandContract,
|
|
6
|
+
commandPathOf,
|
|
7
|
+
findCommand,
|
|
8
|
+
outputOf
|
|
9
|
+
} from "./chunk-JA2YY7D4.js";
|
|
10
|
+
import "./chunk-IGG4RBIZ.js";
|
|
11
|
+
import "./chunk-QBECV7NO.js";
|
|
12
|
+
import "./chunk-5OMLYNYB.js";
|
|
13
|
+
import "./chunk-ZKGYW63J.js";
|
|
14
|
+
import "./chunk-53UWCVSU.js";
|
|
15
|
+
import "./chunk-R7XMCREL.js";
|
|
16
|
+
import "./chunk-MMOG7ZVF.js";
|
|
17
|
+
import "./chunk-6DDXB5WB.js";
|
|
18
|
+
import "./chunk-OL22OOIW.js";
|
|
19
|
+
import "./chunk-P6VN5UB4.js";
|
|
20
|
+
import "./chunk-NHRJW3PH.js";
|
|
21
|
+
import "./chunk-QY3LK3OT.js";
|
|
22
|
+
import "./chunk-Z54E5LKF.js";
|
|
23
|
+
import "./chunk-OQEBGY74.js";
|
|
24
|
+
import "./chunk-G75FZQAZ.js";
|
|
25
|
+
import "./chunk-2WNDZFGG.js";
|
|
26
|
+
import "./chunk-5Z63NTC7.js";
|
|
27
|
+
import "./chunk-YROVFHPJ.js";
|
|
28
|
+
import "./chunk-HGWMX7BM.js";
|
|
29
|
+
import "./chunk-EY4CUQW2.js";
|
|
30
|
+
import "./chunk-Y5E2WNWB.js";
|
|
31
|
+
import "./chunk-ZVVMGPBJ.js";
|
|
32
|
+
export {
|
|
33
|
+
SCHEMA_DIALECT,
|
|
34
|
+
commandContract,
|
|
35
|
+
commandPathOf,
|
|
36
|
+
findCommand,
|
|
37
|
+
outputOf
|
|
38
|
+
};
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
SAMPLE_RATE,
|
|
5
|
+
decodeOgg
|
|
6
|
+
} from "./chunk-CCEVICWU.js";
|
|
7
|
+
import "./chunk-HGWMX7BM.js";
|
|
8
|
+
import {
|
|
9
|
+
CliError
|
|
10
|
+
} from "./chunk-EY4CUQW2.js";
|
|
11
|
+
import {
|
|
12
|
+
importFrom
|
|
13
|
+
} from "./chunk-Y5E2WNWB.js";
|
|
14
|
+
import {
|
|
15
|
+
__name
|
|
16
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
17
|
+
|
|
18
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/speech/decode.js
|
|
19
|
+
import { spawn } from "node:child_process";
|
|
20
|
+
import { mkdtemp, rm, writeFile } from "node:fs/promises";
|
|
21
|
+
import { createRequire } from "node:module";
|
|
22
|
+
import { tmpdir } from "node:os";
|
|
23
|
+
import { join } from "node:path";
|
|
24
|
+
import { pathToFileURL } from "node:url";
|
|
25
|
+
var LONGEST_AUDIO_SECONDS = 3600;
|
|
26
|
+
var FFMPEG_TIMEOUT_MS = 12e4;
|
|
27
|
+
var FFMPEG_FORMATS = "mov,mp4,m4a,3gp,3g2,mj2,aac,mp3,wav,amr,caf,aiff,flac,ogg,matroska,webm,asf";
|
|
28
|
+
var text = /* @__PURE__ */ __name((bytes, from, length) => String.fromCharCode(...bytes.subarray(from, from + length)), "text");
|
|
29
|
+
var contains = /* @__PURE__ */ __name((bytes, needle, within) => Buffer.from(bytes.buffer, bytes.byteOffset, Math.min(bytes.length, within)).includes(needle, 0, "latin1"), "contains");
|
|
30
|
+
var formatOf = /* @__PURE__ */ __name((bytes) => {
|
|
31
|
+
if (text(bytes, 0, 4) === "OggS") {
|
|
32
|
+
if (contains(bytes, "OpusHead", 128))
|
|
33
|
+
return "opus";
|
|
34
|
+
if (contains(bytes, "vorbis", 128))
|
|
35
|
+
return "vorbis";
|
|
36
|
+
return "other";
|
|
37
|
+
}
|
|
38
|
+
if (text(bytes, 0, 4) === "fLaC")
|
|
39
|
+
return "flac";
|
|
40
|
+
const frame = bytes[0] === 255 && ((bytes[1] ?? 0) & 224) === 224 && ((bytes[1] ?? 0) >> 1 & 3) !== 0;
|
|
41
|
+
if (text(bytes, 0, 3) === "ID3" || frame)
|
|
42
|
+
return "mp3";
|
|
43
|
+
return "other";
|
|
44
|
+
}, "formatOf");
|
|
45
|
+
var firstChannel = /* @__PURE__ */ __name((decoded) => {
|
|
46
|
+
const samples = decoded.channelData[0];
|
|
47
|
+
if (!samples || decoded.samplesDecoded === 0)
|
|
48
|
+
throw new CliError("validation_error", "no audio in that file");
|
|
49
|
+
return { samples, rate: decoded.sampleRate };
|
|
50
|
+
}, "firstChannel");
|
|
51
|
+
var load = /* @__PURE__ */ __name((name) => importFrom(new URL("speech/decode.js", import.meta.resolve("@wirecat/cli-core")).href, pathToFileURL(createRequire(new URL("speech/decode.js", import.meta.resolve("@wirecat/cli-core")).href).resolve(name)).href), "load");
|
|
52
|
+
var decodeVorbis = /* @__PURE__ */ __name(async (bytes) => {
|
|
53
|
+
const { OggVorbisDecoder } = await load("@wasm-audio-decoders/ogg-vorbis");
|
|
54
|
+
const decoder = new OggVorbisDecoder();
|
|
55
|
+
await decoder.ready;
|
|
56
|
+
try {
|
|
57
|
+
return firstChannel(await decoder.decodeFile(bytes));
|
|
58
|
+
} finally {
|
|
59
|
+
decoder.free();
|
|
60
|
+
}
|
|
61
|
+
}, "decodeVorbis");
|
|
62
|
+
var decodeFlac = /* @__PURE__ */ __name(async (bytes) => {
|
|
63
|
+
const { FLACDecoder } = await load("@wasm-audio-decoders/flac");
|
|
64
|
+
const decoder = new FLACDecoder();
|
|
65
|
+
await decoder.ready;
|
|
66
|
+
try {
|
|
67
|
+
return firstChannel(await decoder.decodeFile(bytes));
|
|
68
|
+
} finally {
|
|
69
|
+
decoder.free();
|
|
70
|
+
}
|
|
71
|
+
}, "decodeFlac");
|
|
72
|
+
var decodeMp3 = /* @__PURE__ */ __name(async (bytes) => {
|
|
73
|
+
const { MPEGDecoder } = await load("mpg123-decoder");
|
|
74
|
+
const decoder = new MPEGDecoder();
|
|
75
|
+
await decoder.ready;
|
|
76
|
+
try {
|
|
77
|
+
return firstChannel(decoder.decode(bytes));
|
|
78
|
+
} finally {
|
|
79
|
+
decoder.free();
|
|
80
|
+
}
|
|
81
|
+
}, "decodeMp3");
|
|
82
|
+
var runFfmpeg = /* @__PURE__ */ __name(async (bytes) => {
|
|
83
|
+
const directory = await mkdtemp(join(tmpdir(), "wirecat-audio-"));
|
|
84
|
+
try {
|
|
85
|
+
const input = join(directory, "audio");
|
|
86
|
+
await writeFile(input, bytes, { mode: 384 });
|
|
87
|
+
const largest = LONGEST_AUDIO_SECONDS * SAMPLE_RATE * 4;
|
|
88
|
+
const output = await new Promise((resolve, reject) => {
|
|
89
|
+
const child = spawn("ffmpeg", [
|
|
90
|
+
"-nostdin",
|
|
91
|
+
"-hide_banner",
|
|
92
|
+
"-loglevel",
|
|
93
|
+
"error",
|
|
94
|
+
"-protocol_whitelist",
|
|
95
|
+
"file",
|
|
96
|
+
"-format_whitelist",
|
|
97
|
+
FFMPEG_FORMATS,
|
|
98
|
+
"-i",
|
|
99
|
+
input,
|
|
100
|
+
"-vn",
|
|
101
|
+
"-ac",
|
|
102
|
+
"1",
|
|
103
|
+
"-ar",
|
|
104
|
+
String(SAMPLE_RATE),
|
|
105
|
+
"-f",
|
|
106
|
+
"f32le",
|
|
107
|
+
"pipe:1"
|
|
108
|
+
], { stdio: ["ignore", "pipe", "pipe"], timeout: FFMPEG_TIMEOUT_MS });
|
|
109
|
+
const chunks = [];
|
|
110
|
+
let size = 0;
|
|
111
|
+
let errors = "";
|
|
112
|
+
child.stdout.on("data", (chunk) => {
|
|
113
|
+
size += chunk.length;
|
|
114
|
+
if (size > largest)
|
|
115
|
+
child.kill();
|
|
116
|
+
else
|
|
117
|
+
chunks.push(chunk);
|
|
118
|
+
});
|
|
119
|
+
child.stderr.on("data", (chunk) => {
|
|
120
|
+
errors = (errors + chunk.toString()).slice(-500);
|
|
121
|
+
});
|
|
122
|
+
child.on("error", (error) => reject(error.code === "ENOENT" ? new CliError("validation_error", "only ffmpeg reads this audio format, and ffmpeg is not installed") : error));
|
|
123
|
+
child.on("close", (code) => {
|
|
124
|
+
if (size > largest)
|
|
125
|
+
reject(new CliError("validation_error", `the audio is longer than ${LONGEST_AUDIO_SECONDS / 60} minutes`));
|
|
126
|
+
else if (code === 0)
|
|
127
|
+
resolve(Buffer.concat(chunks));
|
|
128
|
+
else
|
|
129
|
+
reject(new CliError("validation_error", `ffmpeg could not read the audio: ${errors.trim() || code}`));
|
|
130
|
+
});
|
|
131
|
+
});
|
|
132
|
+
const samples = new Float32Array(Math.floor(output.length / 4));
|
|
133
|
+
Buffer.from(samples.buffer).set(output.subarray(0, samples.length * 4));
|
|
134
|
+
return { samples, rate: SAMPLE_RATE };
|
|
135
|
+
} finally {
|
|
136
|
+
await rm(directory, { recursive: true, force: true });
|
|
137
|
+
}
|
|
138
|
+
}, "runFfmpeg");
|
|
139
|
+
var BUNDLED = {
|
|
140
|
+
opus: decodeOgg,
|
|
141
|
+
vorbis: decodeVorbis,
|
|
142
|
+
flac: decodeFlac,
|
|
143
|
+
mp3: decodeMp3
|
|
144
|
+
};
|
|
145
|
+
var decodeAudio = /* @__PURE__ */ __name(async (bytes, ffmpeg = runFfmpeg) => {
|
|
146
|
+
const format = formatOf(bytes);
|
|
147
|
+
const pcm = format === "other" ? await ffmpeg(bytes) : await BUNDLED[format](bytes).catch((error) => ffmpeg(bytes).catch(() => {
|
|
148
|
+
throw error;
|
|
149
|
+
}));
|
|
150
|
+
if (pcm.samples.length / pcm.rate > LONGEST_AUDIO_SECONDS)
|
|
151
|
+
throw new CliError("validation_error", `the audio is longer than ${LONGEST_AUDIO_SECONDS / 60} minutes`);
|
|
152
|
+
return pcm;
|
|
153
|
+
}, "decodeAudio");
|
|
154
|
+
export {
|
|
155
|
+
LONGEST_AUDIO_SECONDS,
|
|
156
|
+
decodeAudio,
|
|
157
|
+
formatOf,
|
|
158
|
+
runFfmpeg
|
|
159
|
+
};
|
package/dist/bundle/drive.js
CHANGED
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
exitCodeOfError,
|
|
7
7
|
processStreams,
|
|
8
8
|
renderError
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-HGWMX7BM.js";
|
|
10
|
+
import "./chunk-EY4CUQW2.js";
|
|
11
11
|
import "./chunk-Y5E2WNWB.js";
|
|
12
12
|
import {
|
|
13
13
|
__name
|
|
@@ -17,9 +17,9 @@ import {
|
|
|
17
17
|
import { enableCompileCache } from "node:module";
|
|
18
18
|
enableCompileCache();
|
|
19
19
|
var [{ startCli }, { DRIVE_APP }, { REASONS }, { interactiveOf }] = await Promise.all([
|
|
20
|
-
import("./entry-
|
|
21
|
-
import("./identity-
|
|
22
|
-
import("./reasons-
|
|
20
|
+
import("./entry-4WQQKSYG.js"),
|
|
21
|
+
import("./identity-VBCGUXT5.js"),
|
|
22
|
+
import("./reasons-366PI7OV.js"),
|
|
23
23
|
import("./terminal-TFCTWLOS.js")
|
|
24
24
|
]);
|
|
25
25
|
var program;
|
|
@@ -29,8 +29,8 @@ await startCli({
|
|
|
29
29
|
interactive: interactiveOf,
|
|
30
30
|
reasons: REASONS,
|
|
31
31
|
run: /* @__PURE__ */ __name(async (entry) => {
|
|
32
|
-
failure = await import("./failure-
|
|
33
|
-
const { createProgram } = await import("./program-
|
|
32
|
+
failure = await import("./failure-EEJGMWEP.js");
|
|
33
|
+
const { createProgram } = await import("./program-X3CZ4XDN.js");
|
|
34
34
|
program = createProgram({
|
|
35
35
|
signal: entry.signal,
|
|
36
36
|
atStart: entry.atStart,
|
|
@@ -42399,7 +42399,7 @@ function install11(registers) {
|
|
|
42399
42399
|
}
|
|
42400
42400
|
__name(install11, "install");
|
|
42401
42401
|
|
|
42402
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42402
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/charts/echarts-option.js
|
|
42403
42403
|
var echartsOption = /* @__PURE__ */ __name((chart) => ({
|
|
42404
42404
|
animation: false,
|
|
42405
42405
|
backgroundColor: "#111827",
|
|
@@ -42447,7 +42447,7 @@ var echartsOption = /* @__PURE__ */ __name((chart) => ({
|
|
|
42447
42447
|
} : {}
|
|
42448
42448
|
}), "echartsOption");
|
|
42449
42449
|
|
|
42450
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42450
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/charts/echarts.js
|
|
42451
42451
|
use([install2, install, install6, install5, install10, install7, install11]);
|
|
42452
42452
|
var echartsRenderer = {
|
|
42453
42453
|
render: /* @__PURE__ */ __name(async (chart, size) => {
|