@wirecat/drive-cli 0.66.0 → 0.67.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.
Files changed (181) hide show
  1. package/contracts/wirecat.json +29 -1
  2. package/dist/bin/drive.js +2 -2
  3. package/dist/bundle/{all-profiles-WCQLIHUG.js → all-profiles-DVZUVAPQ.js} +14 -14
  4. package/dist/bundle/{anthropic-5RJMB6O7.js → anthropic-Y45C45O2.js} +8 -8
  5. package/dist/bundle/{app-server-3RGYXPKG.js → app-server-GTXUOUGD.js} +56 -56
  6. package/dist/bundle/{bun-L34VEKGG.js → bun-QVJV76QJ.js} +2 -2
  7. package/dist/bundle/{bun-sqlite-H6IAXQXI.js → bun-sqlite-CC7PIAMH.js} +9 -9
  8. package/dist/bundle/{chunk-UAKX6DP4.js → chunk-2MEVCMBW.js} +5 -5
  9. package/dist/bundle/{chunk-7ZGJRVBH.js → chunk-2PIA45FC.js} +4 -4
  10. package/dist/bundle/{chunk-5PLINHEY.js → chunk-2Y3YBDZX.js} +151 -149
  11. package/dist/bundle/{chunk-BQXSE645.js → chunk-3RG6LL25.js} +12 -12
  12. package/dist/bundle/{chunk-3QFUDXMQ.js → chunk-4G7WQNG7.js} +3 -2
  13. package/dist/bundle/{chunk-5HVJK3ZJ.js → chunk-4VH7M2OD.js} +4 -4
  14. package/dist/bundle/{chunk-COGWKO2T.js → chunk-5DMPGTNR.js} +3 -3
  15. package/dist/bundle/{chunk-NYZS2LKF.js → chunk-5TK2YQCO.js} +2 -2
  16. package/dist/bundle/{chunk-4UHBJSMI.js → chunk-5TSILGTO.js} +508 -450
  17. package/dist/bundle/{chunk-WYTYHUFH.js → chunk-6ERQE4FS.js} +43 -43
  18. package/dist/bundle/{chunk-O53WLYX3.js → chunk-7AZCAUST.js} +2 -2
  19. package/dist/bundle/{chunk-P7HQFII6.js → chunk-7J2IP3WL.js} +7 -7
  20. package/dist/bundle/{chunk-UNTIVT47.js → chunk-7JKECODO.js} +1 -1
  21. package/dist/bundle/{chunk-UQPW42HF.js → chunk-AAZPDWRD.js} +1 -1
  22. package/dist/bundle/{chunk-2S3E2HVV.js → chunk-ABJQ6IDU.js} +17 -17
  23. package/dist/bundle/{chunk-GY4DAJSK.js → chunk-AJ3DFPRT.js} +35 -6
  24. package/dist/bundle/{chunk-JLCR24UM.js → chunk-AZKFZ7J7.js} +1 -1
  25. package/dist/bundle/{chunk-I5R5CMQR.js → chunk-BHSLMJF7.js} +5 -5
  26. package/dist/bundle/{chunk-AP4MX247.js → chunk-C72WYRXD.js} +12 -12
  27. package/dist/bundle/{chunk-OZOQLAWK.js → chunk-CWDC6QJM.js} +6 -6
  28. package/dist/bundle/{chunk-JCHF7LZT.js → chunk-D4MVEOU2.js} +4 -4
  29. package/dist/bundle/{chunk-M7543RUJ.js → chunk-DAFKV6DJ.js} +220 -15
  30. package/dist/bundle/{chunk-3SDJIMZB.js → chunk-E3XA56TS.js} +1 -1
  31. package/dist/bundle/{chunk-IIHZTV6V.js → chunk-EA2OB75T.js} +1 -1
  32. package/dist/bundle/{chunk-FKKPVPZR.js → chunk-ETAFFY3J.js} +57 -57
  33. package/dist/bundle/{chunk-QJ57PV55.js → chunk-EXWOOST5.js} +102 -84
  34. package/dist/bundle/{chunk-PJGOQSE5.js → chunk-FIVFP53N.js} +1 -1
  35. package/dist/bundle/{chunk-TYLEICTX.js → chunk-FOMQ4MG3.js} +3 -3
  36. package/dist/bundle/{chunk-VUUPFDRU.js → chunk-FS2PG2PE.js} +113 -39
  37. package/dist/bundle/{chunk-JQXK3M5M.js → chunk-HCZYJMBP.js} +1 -1
  38. package/dist/bundle/{chunk-VR3YKXHL.js → chunk-HJF2QGOX.js} +16 -16
  39. package/dist/bundle/{chunk-NK4GVFJH.js → chunk-IJCUAKR5.js} +4 -4
  40. package/dist/bundle/{chunk-XVZNFA2P.js → chunk-IRULPE5M.js} +293 -278
  41. package/dist/bundle/{chunk-QSELSDWE.js → chunk-JCNEPYQZ.js} +13 -13
  42. package/dist/bundle/{chunk-FA2TNA5X.js → chunk-JEMBW6IO.js} +1 -1
  43. package/dist/bundle/{chunk-H7XL6WTW.js → chunk-JJHDV32D.js} +2 -2
  44. package/dist/bundle/{chunk-LVAPSAHF.js → chunk-JLUQZZ26.js} +8 -8
  45. package/dist/bundle/{chunk-HPKE2GDP.js → chunk-JO7BJYAP.js} +18 -18
  46. package/dist/bundle/{chunk-VQKNKJYL.js → chunk-JRFKCYMW.js} +6 -6
  47. package/dist/bundle/{chunk-IRNDYNQX.js → chunk-JY2GZDJL.js} +4 -4
  48. package/dist/bundle/{chunk-YTIPTHEE.js → chunk-LSAIXPAX.js} +2 -2
  49. package/dist/bundle/{chunk-T3ULDA7C.js → chunk-LXRBTXCZ.js} +3 -3
  50. package/dist/bundle/{chunk-OIF4B526.js → chunk-M4OP5ASJ.js} +1 -1
  51. package/dist/bundle/{chunk-PKM55ZRR.js → chunk-MBLB4TQI.js} +20 -20
  52. package/dist/bundle/{chunk-HQBLJLYH.js → chunk-MEQNAZ6R.js} +7 -7
  53. package/dist/bundle/{chunk-TAHISPDE.js → chunk-MEY7URZZ.js} +39 -35
  54. package/dist/bundle/{chunk-KRG5X5PH.js → chunk-MF46W7PQ.js} +2 -2
  55. package/dist/bundle/{chunk-6X3KUFRQ.js → chunk-MW46BLWH.js} +20 -20
  56. package/dist/bundle/{chunk-2AF77WMH.js → chunk-NFIR346J.js} +1 -1
  57. package/dist/bundle/{chunk-BIJW6AYA.js → chunk-NWYVOHIX.js} +3662 -3598
  58. package/dist/bundle/{chunk-HPSHQVJU.js → chunk-OOBSSU2G.js} +24 -19
  59. package/dist/bundle/{chunk-UG3GHFGY.js → chunk-P6A77LMP.js} +4 -4
  60. package/dist/bundle/{chunk-XLGDNI4S.js → chunk-PDHN4GHU.js} +5 -40
  61. package/dist/bundle/{chunk-ALE67WRR.js → chunk-PV3AWPHR.js} +5 -5
  62. package/dist/bundle/{chunk-SOOU5WO6.js → chunk-QOKPRFHM.js} +2 -2
  63. package/dist/bundle/{chunk-V2WXTILT.js → chunk-RC72RU66.js} +6 -6
  64. package/dist/bundle/{chunk-E2F2XIX6.js → chunk-RLH6BOEG.js} +8 -8
  65. package/dist/bundle/{chunk-D4MIMH2N.js → chunk-SJE7UGOW.js} +5 -5
  66. package/dist/bundle/{chunk-QF7VL4C3.js → chunk-SXJDCRXE.js} +1 -1
  67. package/dist/bundle/{chunk-5XLU4NN6.js → chunk-T2VAEDJS.js} +4 -4
  68. package/dist/bundle/{chunk-3NYH756U.js → chunk-U2ERT45N.js} +11 -6
  69. package/dist/bundle/{chunk-MZWXTJ4O.js → chunk-UFNE57VY.js} +3 -3
  70. package/dist/bundle/{chunk-6UJCCOZC.js → chunk-ULH3TNUP.js} +4 -4
  71. package/dist/bundle/{chunk-SZ6JFOL4.js → chunk-UOAHZV3K.js} +58 -37
  72. package/dist/bundle/{chunk-GVA3KTCD.js → chunk-UPCEHSIZ.js} +10 -10
  73. package/dist/bundle/{chunk-D7KOAPG6.js → chunk-V7E25BUU.js} +2 -2
  74. package/dist/bundle/{chunk-KOY5HUBY.js → chunk-VZ5KETIX.js} +4 -4
  75. package/dist/bundle/{chunk-ULXEW6FT.js → chunk-WBKYZZQT.js} +1 -1
  76. package/dist/bundle/{chunk-7LT2G5BC.js → chunk-WKIQKGOF.js} +26 -26
  77. package/dist/bundle/{chunk-5VDVGDOC.js → chunk-WWW7YTFG.js} +1 -1
  78. package/dist/bundle/{chunk-G4TNKBDX.js → chunk-XZCF5XU7.js} +7 -7
  79. package/dist/bundle/{chunk-5K54RZBK.js → chunk-Y2QVNVHK.js} +1 -1
  80. package/dist/bundle/{chunk-7EP4AU6A.js → chunk-Y5WSRG3F.js} +3 -3
  81. package/dist/bundle/{chunk-FHBTQPA3.js → chunk-YI4DXASF.js} +37 -37
  82. package/dist/bundle/{chunk-OT7SQQJK.js → chunk-YVUAG7RF.js} +17 -17
  83. package/dist/bundle/{chunk-Y5U4HIZS.js → chunk-ZEPDEFVT.js} +2 -2
  84. package/dist/bundle/{chunk-HHRJPLFO.js → chunk-ZH4H5XTA.js} +1 -1
  85. package/dist/bundle/{chunk-JHMEETXI.js → chunk-ZK46UHDP.js} +2 -2
  86. package/dist/bundle/{chunk-PUMDOCAF.js → chunk-ZU5VQYNY.js} +1 -1
  87. package/dist/bundle/{cli-KW6QQVS5.js → cli-U4LSBYDV.js} +61 -61
  88. package/dist/bundle/command-contract-UU5T24ZZ.js +41 -0
  89. package/dist/bundle/{command-server-entry-OC4E4DED.js → command-server-entry-PK6FBUPO.js} +31 -31
  90. package/dist/bundle/{decode-AH5ZLLDK.js → decode-3ZE6NBKV.js} +8 -8
  91. package/dist/bundle/{dispatch-CDWZZ54Q.js → dispatch-WBEOHZDV.js} +9 -9
  92. package/dist/bundle/drive.js +11 -11
  93. package/dist/bundle/{echarts-VC7MTXWY.js → echarts-6FWNCNXK.js} +2 -2
  94. package/dist/bundle/{embed-EPSQY6QG.js → embed-DGYBBZUW.js} +9 -9
  95. package/dist/bundle/{embedder-TK4U4TJR.js → embedder-O7A6VMWI.js} +12 -12
  96. package/dist/bundle/entry-CDJ2QSU2.js +25 -0
  97. package/dist/bundle/{failure-WSVZOPFE.js → failure-X6PSLVSO.js} +4 -4
  98. package/dist/bundle/first-run-UOQW7DN5.js +30 -0
  99. package/dist/bundle/first-screen-SNDV4YKF.js +39 -0
  100. package/dist/bundle/google-HPX52KMC.js +45 -0
  101. package/dist/bundle/{google-api-AV4X2JH3.js → google-api-HIMN4XL5.js} +63 -63
  102. package/dist/bundle/grants-RO42I6E4.js +111 -0
  103. package/dist/bundle/{identity-CGHHF7AK.js → identity-NFGHDPLL.js} +6 -6
  104. package/dist/bundle/{instructions-24PHDBBE.js → instructions-6JAQYCM6.js} +1 -1
  105. package/dist/bundle/{login-XHFESAFM.js → login-RZOQN63N.js} +69 -69
  106. package/dist/bundle/{mcp-M5YCSWJJ.js → mcp-TDKGDB4V.js} +2 -2
  107. package/dist/bundle/{node-GIDULTV5.js → node-KSIX3GIH.js} +2 -2
  108. package/dist/bundle/{node-sqlite-LINBOAWK.js → node-sqlite-4FJ6WJXN.js} +10 -10
  109. package/dist/bundle/oauth-BKZAMFKK.js +22 -0
  110. package/dist/bundle/{open-RYFKPNCJ.js → open-4AQJGH42.js} +8 -8
  111. package/dist/bundle/{openai-Q7YYUHJF.js → openai-24F2OX55.js} +19 -19
  112. package/dist/bundle/{process-VPIZTIJR.js → process-7NOA2T7H.js} +1 -1
  113. package/dist/bundle/{program-IUXFRBZA.js → program-7JHMLDEX.js} +181 -225
  114. package/dist/bundle/{prompt-LF4KX3XL.js → prompt-NM66MAZ4.js} +8 -8
  115. package/dist/bundle/{reasons-JPYOU5GV.js → reasons-KSYP5VDJ.js} +5 -5
  116. package/dist/bundle/{recognize-KEWTJXFH.js → recognize-DBKV2JYZ.js} +7 -7
  117. package/dist/bundle/{remote-HGGLB76S.js → remote-ABWUTBVB.js} +13 -13
  118. package/dist/bundle/{rerank-TDUKETFT.js → rerank-FQAU4ENY.js} +10 -10
  119. package/dist/bundle/{serve-XFYMKW5W.js → serve-QLJG4QZD.js} +12 -12
  120. package/dist/bundle/server-NUBLY5SV.js +74 -0
  121. package/dist/bundle/{server-PXIPSGFP.js → server-VGZNK5XD.js} +47 -47
  122. package/dist/bundle/{services-2BOCGMJU.js → services-5KARVUHK.js} +36 -36
  123. package/dist/bundle/{sqlite-runtime-R7M5XUMW.js → sqlite-runtime-ILF6EFQJ.js} +9 -9
  124. package/dist/bundle/{start-YRLT4MQZ.js → start-C6EXYXAL.js} +7 -7
  125. package/dist/bundle/{state-NZ7WRJWH.js → state-R2M56GPU.js} +9 -9
  126. package/dist/bundle/{store-ICDGPSEN.js → store-2OBVMUQL.js} +19 -19
  127. package/dist/bundle/{store-7LCVDO7G.js → store-DA4K7HWW.js} +21 -21
  128. package/dist/bundle/store-maintenance-command-KSIPI5B5.js +65 -0
  129. package/dist/bundle/tokens-VQDGSHRB.js +111 -0
  130. package/dist/commands/config.d.ts.map +1 -1
  131. package/dist/commands/config.js +5 -3
  132. package/dist/commands/config.js.map +1 -1
  133. package/dist/commands/search.js +4 -4
  134. package/dist/commands/search.js.map +1 -1
  135. package/dist/commands/sync.d.ts.map +1 -1
  136. package/dist/commands/sync.js +2 -1
  137. package/dist/commands/sync.js.map +1 -1
  138. package/dist/commands/transcripts.d.ts +4 -0
  139. package/dist/commands/transcripts.d.ts.map +1 -0
  140. package/dist/commands/transcripts.js +42 -0
  141. package/dist/commands/transcripts.js.map +1 -0
  142. package/dist/config.d.ts +9 -0
  143. package/dist/config.d.ts.map +1 -1
  144. package/dist/config.js +14 -1
  145. package/dist/config.js.map +1 -1
  146. package/dist/google.d.ts.map +1 -1
  147. package/dist/google.js +31 -28
  148. package/dist/google.js.map +1 -1
  149. package/dist/list-queries.d.ts +10 -0
  150. package/dist/list-queries.d.ts.map +1 -1
  151. package/dist/list-queries.js +12 -1
  152. package/dist/list-queries.js.map +1 -1
  153. package/dist/model.d.ts +4 -1
  154. package/dist/model.d.ts.map +1 -1
  155. package/dist/program.d.ts.map +1 -1
  156. package/dist/program.js +2 -0
  157. package/dist/program.js.map +1 -1
  158. package/dist/state.d.ts.map +1 -1
  159. package/dist/state.js +2 -0
  160. package/dist/state.js.map +1 -1
  161. package/dist/sync.d.ts.map +1 -1
  162. package/dist/sync.js +5 -1
  163. package/dist/sync.js.map +1 -1
  164. package/dist/transcripts.d.ts +21 -0
  165. package/dist/transcripts.d.ts.map +1 -0
  166. package/dist/transcripts.js +48 -0
  167. package/dist/transcripts.js.map +1 -0
  168. package/dist/version.d.ts +1 -1
  169. package/dist/version.js +1 -1
  170. package/package.json +3 -3
  171. package/dist/bundle/command-contract-CE543JBN.js +0 -41
  172. package/dist/bundle/entry-3VN23M7M.js +0 -25
  173. package/dist/bundle/first-run-7ZYJ7EB3.js +0 -30
  174. package/dist/bundle/first-screen-CZDH7QY3.js +0 -39
  175. package/dist/bundle/google-OBZMWA7J.js +0 -45
  176. package/dist/bundle/grants-WTRLN4ZI.js +0 -111
  177. package/dist/bundle/oauth-JHUX3KE3.js +0 -22
  178. package/dist/bundle/server-BDEV3CZJ.js +0 -74
  179. package/dist/bundle/store-maintenance-command-SJPLY6IH.js +0 -65
  180. package/dist/bundle/tokens-FGTBE7VW.js +0 -111
  181. /package/dist/bundle/{chunk-HVJJWJYQ.js → chunk-XWBPP2HX.js} +0 -0
@@ -3,12 +3,12 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  CliError,
5
5
  isCliError
6
- } from "./chunk-IIHZTV6V.js";
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.98.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
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.98.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
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.98.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
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.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/models/endpoint.js
135
+ // node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/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
- return hostname === "[::1]" ? fetch : hostFetch({ hosts: [hostname], timeoutMs });
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 {
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/mcp/stdio-wire.js
7
+ // node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/mcp/stdio-wire.js
8
8
  import { PassThrough, Writable } from "node:stream";
9
9
  var lineReader = /* @__PURE__ */ __name((onMessage) => {
10
10
  let rest = "";
@@ -8,23 +8,23 @@ import {
8
8
  installFiles,
9
9
  megabytes,
10
10
  sharedModelsDirectory
11
- } from "./chunk-5XLU4NN6.js";
11
+ } from "./chunk-T2VAEDJS.js";
12
12
  import {
13
13
  importFrom
14
14
  } from "./chunk-Y5E2WNWB.js";
15
15
  import {
16
16
  CliError
17
- } from "./chunk-IIHZTV6V.js";
17
+ } from "./chunk-EA2OB75T.js";
18
18
  import {
19
19
  __name
20
20
  } from "./chunk-ZVVMGPBJ.js";
21
21
 
22
- // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/embeddings/embed.js
22
+ // node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/embeddings/embed.js
23
23
  import { readFileSync as readFileSync2 } from "node:fs";
24
24
  import { availableParallelism } from "node:os";
25
25
  import { basename, join as join2 } from "node:path";
26
26
 
27
- // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/embeddings/onnx-runtime.js
27
+ // node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/embeddings/onnx-runtime.js
28
28
  import { createHash } from "node:crypto";
29
29
  import { copyFileSync, mkdirSync, mkdtempSync, readFileSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
30
30
  import { join } from "node:path";
@@ -207,7 +207,7 @@ var openSession = /* @__PURE__ */ __name(async (bytes, threads, options = {}) =>
207
207
  return { ort, session: await ort.InferenceSession.create(bytes, options) };
208
208
  }, "openSession");
209
209
 
210
- // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/embeddings/embed.js
210
+ // node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/embeddings/embed.js
211
211
  var textModelsDirectory = /* @__PURE__ */ __name((env = process.env) => sharedModelsDirectory("text", env), "textModelsDirectory");
212
212
  var placedText = /* @__PURE__ */ __name((model, directory) => model.files.map((file) => [file, join2(directory, model.id, file.name)]), "placedText");
213
213
  var isTextModelInstalled = /* @__PURE__ */ __name((model, directory) => filesPresent(placedText(model, directory)), "isTextModelInstalled");
@@ -2,28 +2,28 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  isCommandServer
5
- } from "./chunk-2AF77WMH.js";
5
+ } from "./chunk-NFIR346J.js";
6
6
  import {
7
7
  ensureSqlite
8
- } from "./chunk-SOOU5WO6.js";
8
+ } from "./chunk-QOKPRFHM.js";
9
9
  import {
10
10
  envName,
11
11
  readOnlyLockOf
12
- } from "./chunk-Y5U4HIZS.js";
12
+ } from "./chunk-ZEPDEFVT.js";
13
13
  import {
14
14
  catchCrashes
15
- } from "./chunk-ALE67WRR.js";
15
+ } from "./chunk-PV3AWPHR.js";
16
16
  import {
17
17
  CliError
18
- } from "./chunk-IIHZTV6V.js";
18
+ } from "./chunk-EA2OB75T.js";
19
19
  import {
20
20
  __name
21
21
  } from "./chunk-ZVVMGPBJ.js";
22
22
 
23
- // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/cli/entry.js
23
+ // node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/cli/entry.js
24
24
  import { spawn } from "node:child_process";
25
25
 
26
- // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/cli/argv-log.js
26
+ // node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/cli/argv-log.js
27
27
  import { appendFileSync } from "node:fs";
28
28
  var logParsedArgv = /* @__PURE__ */ __name((file, action) => {
29
29
  const words = [];
@@ -47,7 +47,7 @@ var logVersion = /* @__PURE__ */ __name((file) => {
47
47
  `);
48
48
  }, "logVersion");
49
49
 
50
- // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/cli/entry.js
50
+ // node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/cli/entry.js
51
51
  var processIo = /* @__PURE__ */ __name(() => ({
52
52
  argv: process.argv,
53
53
  env: process.env,
@@ -67,7 +67,7 @@ var startCli = /* @__PURE__ */ __name(async (entry) => {
67
67
  if (args.length === 1 && (args[0] === "--version" || args[0] === "-V"))
68
68
  return printVersion(entry.app, io);
69
69
  if (isCommandServer(args)) {
70
- const { serveEntry } = await import("./command-server-entry-OC4E4DED.js");
70
+ const { serveEntry } = await import("./command-server-entry-PK6FBUPO.js");
71
71
  return serveEntry(entry, io, { firstRunAt, commanderExit });
72
72
  }
73
73
  const tty = io.stdout.isTTY === true;
@@ -105,7 +105,7 @@ var startCli = /* @__PURE__ */ __name(async (entry) => {
105
105
  ask: /* @__PURE__ */ __name(async (question, command) => {
106
106
  if (headless(command) || io.stdin.isTTY !== true)
107
107
  return false;
108
- const { readSecret } = await import("./prompt-LF4KX3XL.js");
108
+ const { readSecret } = await import("./prompt-NM66MAZ4.js");
109
109
  const answer = await readSecret(`${question} [y/N] `, {
110
110
  input: io.stdin,
111
111
  output: io.stderr,
@@ -148,8 +148,8 @@ var firstRunAt = /* @__PURE__ */ __name((entry, io, headless) => async (command)
148
148
  if (command.optsWithGlobals().dryRun === true)
149
149
  return;
150
150
  const [{ setupAtStart }, { commandPathOf }] = await Promise.all([
151
- import("./first-run-7ZYJ7EB3.js"),
152
- import("./command-contract-CE543JBN.js")
151
+ import("./first-run-UOQW7DN5.js"),
152
+ import("./command-contract-UU5T24ZZ.js")
153
153
  ]);
154
154
  await setupAtStart({
155
155
  command: entry.app.command,
@@ -4,15 +4,15 @@ import {
4
4
  PLAIN_HTTP_REFUSED,
5
5
  modelAddressAllowed,
6
6
  onThisComputer
7
- } from "./chunk-GY4DAJSK.js";
7
+ } from "./chunk-AJ3DFPRT.js";
8
8
  import {
9
9
  readSharedSection,
10
10
  sharedConfigPath,
11
11
  writeSharedSection
12
- } from "./chunk-HQBLJLYH.js";
12
+ } from "./chunk-MEQNAZ6R.js";
13
13
  import {
14
14
  storePath
15
- } from "./chunk-3QFUDXMQ.js";
15
+ } from "./chunk-4G7WQNG7.js";
16
16
  import {
17
17
  boolean,
18
18
  isoTimestamp,
@@ -20,15 +20,15 @@ import {
20
20
  safeParse,
21
21
  strictObject,
22
22
  string
23
- } from "./chunk-VQKNKJYL.js";
23
+ } from "./chunk-JRFKCYMW.js";
24
24
  import {
25
25
  CliError
26
- } from "./chunk-IIHZTV6V.js";
26
+ } from "./chunk-EA2OB75T.js";
27
27
  import {
28
28
  __name
29
29
  } from "./chunk-ZVVMGPBJ.js";
30
30
 
31
- // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/models/local-only.js
31
+ // node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/models/local-only.js
32
32
  var SECTION = "local_only";
33
33
  var Setting = strictObject({
34
34
  on: boolean(),
@@ -3,26 +3,26 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  executableEnvironment,
5
5
  executableOnPath
6
- } from "./chunk-PJGOQSE5.js";
6
+ } from "./chunk-FIVFP53N.js";
7
7
  import {
8
8
  require_cross_spawn
9
9
  } from "./chunk-D72URWJE.js";
10
10
  import {
11
11
  loadConfigFile,
12
12
  saveConfigFile
13
- } from "./chunk-6X3KUFRQ.js";
13
+ } from "./chunk-MW46BLWH.js";
14
14
  import {
15
15
  number,
16
16
  object,
17
17
  optional,
18
18
  string
19
- } from "./chunk-VQKNKJYL.js";
19
+ } from "./chunk-JRFKCYMW.js";
20
20
  import {
21
21
  __name,
22
22
  __toESM
23
23
  } from "./chunk-ZVVMGPBJ.js";
24
24
 
25
- // node_modules/.pnpm/@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/update/index.js
25
+ // 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/update/index.js
26
26
  var import_cross_spawn = __toESM(require_cross_spawn(), 1);
27
27
  import { existsSync } from "node:fs";
28
28
  var updateCommand = /* @__PURE__ */ __name((installer, packageName) => {
@@ -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-FS2PG2PE.js";
3
6
  import {
4
7
  operations
5
8
  } from "./chunk-NYECVHFH.js";
6
9
  import {
7
10
  privateFiles
8
- } from "./chunk-4UHBJSMI.js";
11
+ } from "./chunk-5TSILGTO.js";
9
12
  import {
10
13
  commandPathKey,
11
14
  commandPermissions
12
- } from "./chunk-OT7SQQJK.js";
15
+ } from "./chunk-YVUAG7RF.js";
16
+ import {
17
+ listQuery,
18
+ queryTerms,
19
+ typedQuery,
20
+ withQuery
21
+ } from "./chunk-JO7BJYAP.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-5PLINHEY.js";
30
+ } from "./chunk-2Y3YBDZX.js";
21
31
  import {
22
32
  LEVELS
23
- } from "./chunk-PKM55ZRR.js";
33
+ } from "./chunk-MBLB4TQI.js";
34
+ import {
35
+ note
36
+ } from "./chunk-UFNE57VY.js";
24
37
  import {
25
38
  MAX_TEXT_CHARS
26
- } from "./chunk-T3ULDA7C.js";
39
+ } from "./chunk-LXRBTXCZ.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-YTIPTHEE.js";
48
+ } from "./chunk-LSAIXPAX.js";
30
49
  import {
31
50
  BASE_CONSTANTS,
32
51
  baseConstantsSchema,
33
52
  loadConstants,
34
53
  resolvePaths,
35
54
  saveConfigFile
36
- } from "./chunk-6X3KUFRQ.js";
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
- } from "./chunk-VQKNKJYL.js";
81
+ union,
82
+ unknown
83
+ } from "./chunk-JRFKCYMW.js";
60
84
  import {
61
85
  CliError
62
- } from "./chunk-IIHZTV6V.js";
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.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/oauth/client-file.js
91
+ // node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/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.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/constants/obscure.js
112
+ // node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/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.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/constants/index.js
121
+ // node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/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 SETTING_NAMES = /* @__PURE__ */ new Set([...Object.keys(Common), "picture_search", ...DEFAULTS_ONLY]);
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,
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/mcp/instructions.js
7
+ // node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/mcp/instructions.js
8
8
  var instructions = /* @__PURE__ */ __name(({ command, name, profile, writes, skill }) => {
9
9
  const all = typeof profile !== "string";
10
10
  const offers = /* @__PURE__ */ __name((key) => all || writes.includes(key), "offers");
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/errors.js
7
+ // 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/errors.js
8
8
  var errorCodes = [
9
9
  "validation_error",
10
10
  "configuration_error",