@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,48 +1,71 @@
|
|
|
1
1
|
import { createRequire as __bundleRequire } from "node:module";
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
DOC
|
|
5
|
+
} from "./chunk-DU23ET2O.js";
|
|
3
6
|
import {
|
|
4
7
|
operations
|
|
5
8
|
} from "./chunk-NYECVHFH.js";
|
|
6
9
|
import {
|
|
7
10
|
privateFiles
|
|
8
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-UUQJVKPB.js";
|
|
9
12
|
import {
|
|
10
13
|
commandPathKey,
|
|
11
14
|
commandPermissions
|
|
12
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-5G2BY4B6.js";
|
|
16
|
+
import {
|
|
17
|
+
listQuery,
|
|
18
|
+
queryTerms,
|
|
19
|
+
typedQuery,
|
|
20
|
+
withQuery
|
|
21
|
+
} from "./chunk-2UHQVRH2.js";
|
|
13
22
|
import {
|
|
14
23
|
AI_ENTRIES,
|
|
24
|
+
answerEntity,
|
|
15
25
|
checkConfigText,
|
|
16
26
|
issueMessage,
|
|
17
27
|
settingsFor,
|
|
18
28
|
usableProfileName,
|
|
19
29
|
withSettingDefaults
|
|
20
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-MLSXHTUB.js";
|
|
21
31
|
import {
|
|
22
32
|
LEVELS
|
|
23
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-J5LXL435.js";
|
|
34
|
+
import {
|
|
35
|
+
note
|
|
36
|
+
} from "./chunk-IVOG6T6P.js";
|
|
24
37
|
import {
|
|
25
38
|
MAX_TEXT_CHARS
|
|
26
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-BXHFJTU5.js";
|
|
40
|
+
import {
|
|
41
|
+
dateRange,
|
|
42
|
+
queryError,
|
|
43
|
+
queryFieldsOf,
|
|
44
|
+
timezoneOf
|
|
45
|
+
} from "./chunk-UPCEHSIZ.js";
|
|
27
46
|
import {
|
|
28
47
|
DRIVE_APP
|
|
29
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-6HFZZ2PW.js";
|
|
30
49
|
import {
|
|
31
50
|
BASE_CONSTANTS,
|
|
32
51
|
baseConstantsSchema,
|
|
33
52
|
loadConstants,
|
|
34
53
|
resolvePaths,
|
|
35
54
|
saveConfigFile
|
|
36
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-MW46BLWH.js";
|
|
37
56
|
import {
|
|
38
57
|
array,
|
|
39
58
|
boolean,
|
|
40
59
|
integer,
|
|
60
|
+
isoTime,
|
|
41
61
|
literal,
|
|
62
|
+
looseObject,
|
|
63
|
+
maxLength,
|
|
42
64
|
maxValue,
|
|
43
65
|
minLength,
|
|
44
66
|
minValue,
|
|
45
67
|
nonEmpty,
|
|
68
|
+
nullable,
|
|
46
69
|
number,
|
|
47
70
|
object,
|
|
48
71
|
optional,
|
|
@@ -55,16 +78,17 @@ import {
|
|
|
55
78
|
string,
|
|
56
79
|
transform,
|
|
57
80
|
trim,
|
|
58
|
-
union
|
|
59
|
-
|
|
81
|
+
union,
|
|
82
|
+
unknown
|
|
83
|
+
} from "./chunk-JRFKCYMW.js";
|
|
60
84
|
import {
|
|
61
85
|
CliError
|
|
62
|
-
} from "./chunk-
|
|
86
|
+
} from "./chunk-EA2OB75T.js";
|
|
63
87
|
import {
|
|
64
88
|
__name
|
|
65
89
|
} from "./chunk-ZVVMGPBJ.js";
|
|
66
90
|
|
|
67
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
91
|
+
// 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/oauth/client-file.js
|
|
68
92
|
import { readFileSync } from "node:fs";
|
|
69
93
|
var readClientFile = /* @__PURE__ */ __name((location, options = {}) => {
|
|
70
94
|
if (!options.shipped && typeof location === "string") {
|
|
@@ -85,7 +109,7 @@ var readClientFile = /* @__PURE__ */ __name((location, options = {}) => {
|
|
|
85
109
|
}
|
|
86
110
|
}, "readClientFile");
|
|
87
111
|
|
|
88
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
112
|
+
// 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/constants/obscure.js
|
|
89
113
|
import { createDecipheriv } from "node:crypto";
|
|
90
114
|
var KEY = Buffer.from("d43012779aa2dded3e98092a3dbcf5d8980c564172f5ce0a5fd0574e5f740339", "hex");
|
|
91
115
|
var reveal = /* @__PURE__ */ __name((obscured) => {
|
|
@@ -94,7 +118,7 @@ var reveal = /* @__PURE__ */ __name((obscured) => {
|
|
|
94
118
|
return Buffer.concat([decipher.update(bytes.subarray(16)), decipher.final()]).toString("utf8");
|
|
95
119
|
}, "reveal");
|
|
96
120
|
|
|
97
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
121
|
+
// 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/constants/index.js
|
|
98
122
|
var CORE_CONSTANTS = new URL("../../constants.json", new URL("constants/index.js", import.meta.resolve("@wirecat/cli-core")).href);
|
|
99
123
|
var constantsSchema = object({
|
|
100
124
|
...baseConstantsSchema.entries,
|
|
@@ -216,6 +240,152 @@ var methodPolicyKeys = /* @__PURE__ */ __name((method, body) => {
|
|
|
216
240
|
// dist/config.js
|
|
217
241
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
218
242
|
import { join } from "node:path";
|
|
243
|
+
|
|
244
|
+
// dist/list-queries.js
|
|
245
|
+
var registry = /* @__PURE__ */ __name((entity, schema, native, examples) => ({
|
|
246
|
+
entity,
|
|
247
|
+
backend: "native",
|
|
248
|
+
fields: queryFieldsOf(schema, { native, examples }).map((field) => field.native ? { ...field, operators: ["term", "phrase"] } : field)
|
|
249
|
+
}), "registry");
|
|
250
|
+
var folderRow = strictObject({ id: string() });
|
|
251
|
+
var mirrorRow = strictObject({ id: string(), path: string(), folder: string() });
|
|
252
|
+
var sessionRow = strictObject({
|
|
253
|
+
profile: string(),
|
|
254
|
+
selected_folders: number(),
|
|
255
|
+
storage: picklist(["keyring", "file"])
|
|
256
|
+
});
|
|
257
|
+
var tagRow = strictObject({ tag: string() });
|
|
258
|
+
var linkRow = looseObject({
|
|
259
|
+
id: string(),
|
|
260
|
+
from: string(),
|
|
261
|
+
to: nullable(string()),
|
|
262
|
+
kind: string(),
|
|
263
|
+
role: nullable(string()),
|
|
264
|
+
confirmed: boolean(),
|
|
265
|
+
origin: picklist(["file", "owner", "suggested", "message"])
|
|
266
|
+
});
|
|
267
|
+
var identityRow = looseObject({
|
|
268
|
+
google_id: nullable(string()),
|
|
269
|
+
role: picklist(["owner", "last-editor"]),
|
|
270
|
+
person: nullable(record(string(), unknown()))
|
|
271
|
+
});
|
|
272
|
+
var fileRow = looseObject({
|
|
273
|
+
id: optional(string()),
|
|
274
|
+
name: optional(string()),
|
|
275
|
+
trashed: optional(boolean()),
|
|
276
|
+
modified_time: optional(isoTime),
|
|
277
|
+
created_time: optional(isoTime),
|
|
278
|
+
viewed_by_me_time: optional(isoTime)
|
|
279
|
+
});
|
|
280
|
+
var transcriptRow = strictObject({
|
|
281
|
+
id: string(),
|
|
282
|
+
name: string(),
|
|
283
|
+
url: string(),
|
|
284
|
+
owned_by_me: nullable(boolean()),
|
|
285
|
+
modified_at: nullable(string())
|
|
286
|
+
});
|
|
287
|
+
var TRANSCRIPTS_QUERY = registry("drive_transcript", transcriptRow, ["owned_by_me"], {
|
|
288
|
+
owned_by_me: "owned_by_me:false"
|
|
289
|
+
});
|
|
290
|
+
var FOLDERS_QUERY = registry("drive_selected_folder", folderRow, ["id"], { id: "id:FOLDER_ID" });
|
|
291
|
+
var MIRRORS_QUERY = registry("drive_mirror", mirrorRow, ["id", "path", "folder"], {
|
|
292
|
+
id: "id:example",
|
|
293
|
+
path: 'path:"/example/notes"',
|
|
294
|
+
folder: "folder:FOLDER_ID"
|
|
295
|
+
});
|
|
296
|
+
var SESSIONS_QUERY = registry("drive_session", sessionRow, ["profile", "storage"], {
|
|
297
|
+
profile: "profile:personal",
|
|
298
|
+
storage: "storage:keyring"
|
|
299
|
+
});
|
|
300
|
+
var TAGS_QUERY = registry("drive_document_tag", tagRow, ["tag"], { tag: "tag:budget" });
|
|
301
|
+
var NOTES_QUERY = registry("note", note, ["text"], { text: "text:review" });
|
|
302
|
+
var LINKS_QUERY = registry("drive_document_relationship", linkRow, ["id", "role", "origin", "confirmed"], {
|
|
303
|
+
id: "id:1",
|
|
304
|
+
role: "role:reviewer",
|
|
305
|
+
origin: "origin:owner",
|
|
306
|
+
confirmed: "confirmed:true"
|
|
307
|
+
});
|
|
308
|
+
var IDENTITIES_QUERY = registry("drive_document_identity", identityRow, ["google_id", "role"], {
|
|
309
|
+
google_id: "google_id:example",
|
|
310
|
+
role: "role:owner"
|
|
311
|
+
});
|
|
312
|
+
var FILES_QUERY = {
|
|
313
|
+
entity: "drive_remote_file",
|
|
314
|
+
backend: "native",
|
|
315
|
+
fields: queryFieldsOf(fileRow, {
|
|
316
|
+
native: ["name", "trashed", "modified_time", "created_time", "viewed_by_me_time"],
|
|
317
|
+
examples: {
|
|
318
|
+
name: 'name:"Example plan"',
|
|
319
|
+
trashed: "trashed:false",
|
|
320
|
+
modified_time: "modified_time>=2026-01-01",
|
|
321
|
+
created_time: "created_time>=2026-01-01",
|
|
322
|
+
viewed_by_me_time: "viewed_by_me_time>=2026-01-01"
|
|
323
|
+
}
|
|
324
|
+
}).map((field) => field.native ? { ...field, operators: field.type === "time" ? ["term", "range"] : ["term", "phrase"] } : field),
|
|
325
|
+
defaults: ["trashed:false"]
|
|
326
|
+
};
|
|
327
|
+
var bindQuery = /* @__PURE__ */ __name((command, query, schema) => answerEntity(withQuery(command, query), query.entity, schema), "bindQuery");
|
|
328
|
+
var termsOf = /* @__PURE__ */ __name((words, query, command) => Object.fromEntries(queryTerms(words, query, command)), "termsOf");
|
|
329
|
+
var quote = /* @__PURE__ */ __name((value) => `'${value.replaceAll("\\", "\\\\").replaceAll("'", "\\'")}'`, "quote");
|
|
330
|
+
var driveFileQuery = /* @__PURE__ */ __name((words, timezone) => {
|
|
331
|
+
const ast = listQuery(typedQuery(words), FILES_QUERY, "files list");
|
|
332
|
+
const zone = timezoneOf(timezone);
|
|
333
|
+
const column = {
|
|
334
|
+
modified_time: "modifiedTime",
|
|
335
|
+
created_time: "createdTime",
|
|
336
|
+
viewed_by_me_time: "viewedByMeTime"
|
|
337
|
+
};
|
|
338
|
+
const render = /* @__PURE__ */ __name((node) => {
|
|
339
|
+
if (node.kind === "boolean") {
|
|
340
|
+
if (node.clauses.some((clause) => clause.occur !== "must"))
|
|
341
|
+
queryError("query.unsupported-operator", node.span, "files list accepts AND terms only");
|
|
342
|
+
return node.clauses.map((clause) => render(clause.node)).join(" and ");
|
|
343
|
+
}
|
|
344
|
+
if (node.field === "name")
|
|
345
|
+
return `name = ${quote(node.value)}`;
|
|
346
|
+
if (node.field === "trashed")
|
|
347
|
+
return `trashed = ${node.value.toLowerCase()}`;
|
|
348
|
+
const range = dateRange(node.value, node.operator === "range" ? node.upper ?? "*" : node.value, node.lower_inclusive ?? true, node.upper_inclusive ?? true, zone, node.span);
|
|
349
|
+
return [
|
|
350
|
+
range.lower === void 0 ? void 0 : `${column[node.field]} ${range.lower_inclusive ? ">=" : ">"} ${quote(new Date(range.lower).toISOString())}`,
|
|
351
|
+
range.upper === void 0 ? void 0 : `${column[node.field]} ${range.upper_inclusive ? "<=" : "<"} ${quote(new Date(range.upper).toISOString())}`
|
|
352
|
+
].filter(Boolean).join(" and ");
|
|
353
|
+
}, "render");
|
|
354
|
+
return { query: ast ? render(ast.root) : "trashed = false", timezone: zone };
|
|
355
|
+
}, "driveFileQuery");
|
|
356
|
+
|
|
357
|
+
// dist/transcripts.js
|
|
358
|
+
var TRANSCRIPT_MODES = ["include", "skip", "exclude"];
|
|
359
|
+
var TRANSCRIPT_WORDS = [
|
|
360
|
+
"Transcript",
|
|
361
|
+
"Notes by Gemini",
|
|
362
|
+
"\u0422\u0440\u0430\u043D\u0441\u043A\u0440\u0438\u043F\u0442",
|
|
363
|
+
"\u0417\u0430\u043C\u0435\u0442\u043A\u0438 Gemini",
|
|
364
|
+
"Transcripci\xF3n",
|
|
365
|
+
"Notas de Gemini"
|
|
366
|
+
];
|
|
367
|
+
var folded = /* @__PURE__ */ __name((text) => text.normalize("NFC").toLowerCase(), "folded");
|
|
368
|
+
var isTranscript = /* @__PURE__ */ __name((words) => (file) => file.mime === DOC && !file.trashed && words.some((word) => folded(file.name).includes(folded(word))), "isTranscript");
|
|
369
|
+
var transcriptsDriveQuery = /* @__PURE__ */ __name((words) => {
|
|
370
|
+
const longest = /* @__PURE__ */ __name((phrase) => phrase.trim().split(/\s+/).reduce((a, b) => b.length > a.length ? b : a, ""), "longest");
|
|
371
|
+
const asked = [...new Set(words.map(longest).filter(Boolean))];
|
|
372
|
+
return `mimeType = '${DOC}' and trashed = false and (${asked.map((word) => `name contains ${quote(word)}`).join(" or ")})`;
|
|
373
|
+
}, "transcriptsDriveQuery");
|
|
374
|
+
var findTranscripts = /* @__PURE__ */ __name(async (search, words) => {
|
|
375
|
+
if (!search)
|
|
376
|
+
throw new CliError("configuration_error", "finding transcripts needs a signed-in Google account");
|
|
377
|
+
const matches = isTranscript(words);
|
|
378
|
+
return (await search(transcriptsDriveQuery(words))).filter(matches);
|
|
379
|
+
}, "findTranscripts");
|
|
380
|
+
var transcriptQuery = /* @__PURE__ */ __name((mode, words, search) => {
|
|
381
|
+
if (mode === void 0 || mode === "skip")
|
|
382
|
+
return void 0;
|
|
383
|
+
const key = JSON.stringify([...new Set(words.map(folded))].sort());
|
|
384
|
+
const query = { key, mode, matches: isTranscript(words) };
|
|
385
|
+
return mode === "include" ? { ...query, list: /* @__PURE__ */ __name(() => findTranscripts(search, words), "list") } : query;
|
|
386
|
+
}, "transcriptQuery");
|
|
387
|
+
|
|
388
|
+
// dist/config.js
|
|
219
389
|
var Common = {
|
|
220
390
|
...AI_ENTRIES,
|
|
221
391
|
permissions: optional(record(string(), picklist(LEVELS))),
|
|
@@ -246,7 +416,12 @@ var DEFAULTS_ONLY = /* @__PURE__ */ new Set([
|
|
|
246
416
|
"update_check",
|
|
247
417
|
"skill_hint"
|
|
248
418
|
]);
|
|
249
|
-
var
|
|
419
|
+
var Transcripts = {
|
|
420
|
+
transcripts: optional(picklist(TRANSCRIPT_MODES)),
|
|
421
|
+
transcript_words: optional(pipe(array(pipe(string(), trim(), minLength(1), maxLength(100))), minLength(1), maxLength(50)))
|
|
422
|
+
};
|
|
423
|
+
var PROFILE_ONLY = /* @__PURE__ */ new Set(["picture_search", ...Object.keys(Transcripts)]);
|
|
424
|
+
var SETTING_NAMES = /* @__PURE__ */ new Set([...Object.keys(Common), ...PROFILE_ONLY, ...DEFAULTS_ONLY]);
|
|
250
425
|
var Mirror = strictObject({
|
|
251
426
|
id: pipe(string(), regex(/^[a-z0-9-]{1,40}$/)),
|
|
252
427
|
path: pipe(string(), minLength(1)),
|
|
@@ -258,6 +433,7 @@ var Profile = strictObject({
|
|
|
258
433
|
mirrors: optional(array(Mirror)),
|
|
259
434
|
storage: picklist(["keyring", "file"]),
|
|
260
435
|
picture_search: optional(boolean()),
|
|
436
|
+
...Transcripts,
|
|
261
437
|
...Common
|
|
262
438
|
});
|
|
263
439
|
var ConfigSchema = strictObject({
|
|
@@ -283,7 +459,8 @@ var configuration = settingsFor(DRIVE_APP, {
|
|
|
283
459
|
mirrors: optional(array(Mirror)),
|
|
284
460
|
storage: optional(picklist(["keyring", "file"])),
|
|
285
461
|
max_text_chars: Common.max_text_chars,
|
|
286
|
-
google_client_id: Common.google_client_id
|
|
462
|
+
google_client_id: Common.google_client_id,
|
|
463
|
+
...Transcripts
|
|
287
464
|
},
|
|
288
465
|
settings: [
|
|
289
466
|
{
|
|
@@ -389,6 +566,10 @@ var checkTextLimit = /* @__PURE__ */ __name((value) => {
|
|
|
389
566
|
return value;
|
|
390
567
|
}, "checkTextLimit");
|
|
391
568
|
var textLimit = /* @__PURE__ */ __name((env, name) => activeProfile(env, name).max_text_chars ?? readConfig(env).defaults?.max_text_chars ?? MAX_TEXT_CHARS, "textLimit");
|
|
569
|
+
var transcriptsOf = /* @__PURE__ */ __name((env, name) => {
|
|
570
|
+
const profile = activeProfile(env, name);
|
|
571
|
+
return { mode: profile.transcripts, words: profile.transcript_words ?? [...TRANSCRIPT_WORDS] };
|
|
572
|
+
}, "transcriptsOf");
|
|
392
573
|
var pictureSearch = /* @__PURE__ */ __name((env, name) => activeProfile(env, name).picture_search ?? false, "pictureSearch");
|
|
393
574
|
var googleAppOf = /* @__PURE__ */ __name((env, { file, clientId, profile } = {}) => {
|
|
394
575
|
const own = file || clientId || env.DRIVE_GOOGLE_CLIENT_ID;
|
|
@@ -417,7 +598,30 @@ export {
|
|
|
417
598
|
permissionNames,
|
|
418
599
|
DEFAULT_LEVELS,
|
|
419
600
|
methodPolicyKeys,
|
|
601
|
+
folderRow,
|
|
602
|
+
mirrorRow,
|
|
603
|
+
sessionRow,
|
|
604
|
+
tagRow,
|
|
605
|
+
linkRow,
|
|
606
|
+
identityRow,
|
|
607
|
+
fileRow,
|
|
608
|
+
transcriptRow,
|
|
609
|
+
TRANSCRIPTS_QUERY,
|
|
610
|
+
FOLDERS_QUERY,
|
|
611
|
+
MIRRORS_QUERY,
|
|
612
|
+
SESSIONS_QUERY,
|
|
613
|
+
TAGS_QUERY,
|
|
614
|
+
NOTES_QUERY,
|
|
615
|
+
LINKS_QUERY,
|
|
616
|
+
IDENTITIES_QUERY,
|
|
617
|
+
FILES_QUERY,
|
|
618
|
+
bindQuery,
|
|
619
|
+
termsOf,
|
|
620
|
+
driveFileQuery,
|
|
621
|
+
findTranscripts,
|
|
622
|
+
transcriptQuery,
|
|
420
623
|
DEFAULTS_ONLY,
|
|
624
|
+
PROFILE_ONLY,
|
|
421
625
|
SETTING_NAMES,
|
|
422
626
|
configuration,
|
|
423
627
|
paths,
|
|
@@ -434,6 +638,7 @@ export {
|
|
|
434
638
|
activeProfile,
|
|
435
639
|
checkTextLimit,
|
|
436
640
|
textLimit,
|
|
641
|
+
transcriptsOf,
|
|
437
642
|
pictureSearch,
|
|
438
643
|
googleAppOf,
|
|
439
644
|
application,
|