@wirecat/drive-cli 0.65.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 (233) hide show
  1. package/contracts/wirecat.json +2899 -0
  2. package/dist/bin/drive.js +2 -2
  3. package/dist/bin/drive.js.map +1 -1
  4. package/dist/browse.d.ts +1 -1
  5. package/dist/browse.d.ts.map +1 -1
  6. package/dist/browse.js +1 -1
  7. package/dist/bundle/{all-profiles-PD7GJHFA.js → all-profiles-DVZUVAPQ.js} +14 -14
  8. package/dist/bundle/{anthropic-PJKFON5H.js → anthropic-Y45C45O2.js} +20 -13
  9. package/dist/bundle/{app-server-6ELQA6FJ.js → app-server-GTXUOUGD.js} +67 -56
  10. package/dist/bundle/{bun-P54TGES2.js → bun-QVJV76QJ.js} +2 -2
  11. package/dist/bundle/{bun-sqlite-TND5ZRJH.js → bun-sqlite-CC7PIAMH.js} +9 -9
  12. package/dist/bundle/{chunk-Y5PKRITX.js → chunk-2MEVCMBW.js} +5 -5
  13. package/dist/bundle/{chunk-ZILALBYQ.js → chunk-2PIA45FC.js} +7 -5
  14. package/dist/bundle/{chunk-SIWXYB4E.js → chunk-2Y3YBDZX.js} +3123 -2851
  15. package/dist/bundle/{chunk-54V4H6PM.js → chunk-3RG6LL25.js} +12 -12
  16. package/dist/bundle/{chunk-UTNRBOEN.js → chunk-4G7WQNG7.js} +3 -2
  17. package/dist/bundle/{chunk-OWMZUWCM.js → chunk-4VH7M2OD.js} +6 -14
  18. package/dist/bundle/{chunk-EM7NL5ES.js → chunk-5DMPGTNR.js} +3 -3
  19. package/dist/bundle/{chunk-W2XY6C5S.js → chunk-5TK2YQCO.js} +2 -2
  20. package/dist/bundle/{chunk-NQ5XMSLA.js → chunk-5TSILGTO.js} +21668 -28647
  21. package/dist/bundle/{chunk-FBHSWQU7.js → chunk-6ERQE4FS.js} +319 -102
  22. package/dist/bundle/{chunk-4AOINPN2.js → chunk-7AZCAUST.js} +8 -2
  23. package/dist/bundle/{chunk-DA63E2UM.js → chunk-7J2IP3WL.js} +18 -15
  24. package/dist/bundle/{chunk-JPPPLKAO.js → chunk-7JKECODO.js} +1 -2
  25. package/dist/bundle/{chunk-SEQWBZYH.js → chunk-AAZPDWRD.js} +1 -1
  26. package/dist/bundle/{chunk-CWLL63JD.js → chunk-ABJQ6IDU.js} +17 -17
  27. package/dist/bundle/{chunk-PHOL2DZM.js → chunk-AJ3DFPRT.js} +63 -5
  28. package/dist/bundle/{chunk-4EDWLR22.js → chunk-AZKFZ7J7.js} +1 -1
  29. package/dist/bundle/{chunk-IMHW7VIV.js → chunk-BHSLMJF7.js} +5 -5
  30. package/dist/bundle/{chunk-EHU6EYGO.js → chunk-C72WYRXD.js} +12 -12
  31. package/dist/bundle/chunk-CWDC6QJM.js +72 -0
  32. package/dist/bundle/{chunk-TTP4NOP3.js → chunk-D4MVEOU2.js} +4 -4
  33. package/dist/bundle/{chunk-ZR2EJPMQ.js → chunk-DAFKV6DJ.js} +226 -18
  34. package/dist/bundle/{chunk-RNHGQ35R.js → chunk-E3XA56TS.js} +1 -1
  35. package/dist/bundle/{chunk-ELJUBPY4.js → chunk-EA2OB75T.js} +1 -1
  36. package/dist/bundle/{chunk-7TAP7Y2E.js → chunk-ETAFFY3J.js} +196 -112
  37. package/dist/bundle/{chunk-D6Z43SOG.js → chunk-EXWOOST5.js} +402 -362
  38. package/dist/bundle/{chunk-MCPOZNWG.js → chunk-FIVFP53N.js} +1 -1
  39. package/dist/bundle/{chunk-HP3NT6JJ.js → chunk-FOMQ4MG3.js} +3 -3
  40. package/dist/bundle/{chunk-VMAMRFFC.js → chunk-FS2PG2PE.js} +117 -44
  41. package/dist/bundle/{chunk-6DCLZLGX.js → chunk-HCZYJMBP.js} +1 -1
  42. package/dist/bundle/{chunk-OFJXHEFT.js → chunk-HJF2QGOX.js} +93 -31
  43. package/dist/bundle/{chunk-XPWZSW6Y.js → chunk-IJCUAKR5.js} +4 -4
  44. package/dist/bundle/{chunk-O6K2E7OA.js → chunk-IRULPE5M.js} +1522 -1107
  45. package/dist/bundle/{chunk-EU5MD24W.js → chunk-JCNEPYQZ.js} +13 -13
  46. package/dist/bundle/{chunk-VDZY3L7U.js → chunk-JEMBW6IO.js} +1 -1
  47. package/dist/bundle/{chunk-Z2ADO6UA.js → chunk-JJHDV32D.js} +2 -2
  48. package/dist/bundle/{chunk-FA6JNXCC.js → chunk-JLUQZZ26.js} +8 -8
  49. package/dist/bundle/{chunk-WRAUO5EJ.js → chunk-JO7BJYAP.js} +45 -22
  50. package/dist/bundle/{chunk-TOVWMURV.js → chunk-JRFKCYMW.js} +22 -7
  51. package/dist/bundle/{chunk-M7ELUGU6.js → chunk-JY2GZDJL.js} +4 -4
  52. package/dist/bundle/chunk-LSAIXPAX.js +47 -0
  53. package/dist/bundle/{chunk-WVJHZIDH.js → chunk-LXRBTXCZ.js} +3 -3
  54. package/dist/bundle/{chunk-RX5CJ55S.js → chunk-M4OP5ASJ.js} +1 -1
  55. package/dist/bundle/{chunk-F56DRBGY.js → chunk-MBLB4TQI.js} +75 -20
  56. package/dist/bundle/{chunk-4Y5YBFMS.js → chunk-MEQNAZ6R.js} +7 -7
  57. package/dist/bundle/{chunk-XYE7XZPB.js → chunk-MEY7URZZ.js} +39 -35
  58. package/dist/bundle/{chunk-IBO23OID.js → chunk-MF46W7PQ.js} +2 -2
  59. package/dist/bundle/{chunk-7AQGVX5O.js → chunk-MW46BLWH.js} +60 -29
  60. package/dist/bundle/{chunk-VHQYWFWV.js → chunk-NFIR346J.js} +1 -1
  61. package/dist/bundle/{chunk-NI5PD5KM.js → chunk-NWYVOHIX.js} +18611 -16472
  62. package/dist/bundle/chunk-NYECVHFH.js +10283 -0
  63. package/dist/bundle/{chunk-D7WB54P7.js → chunk-OOBSSU2G.js} +546 -457
  64. package/dist/bundle/{chunk-VLXWAH5E.js → chunk-P6A77LMP.js} +4 -4
  65. package/dist/bundle/{chunk-ZD4MB7NH.js → chunk-PDHN4GHU.js} +5 -40
  66. package/dist/bundle/{chunk-PLP5527C.js → chunk-PV3AWPHR.js} +5 -5
  67. package/dist/bundle/{chunk-TMHF4BCL.js → chunk-QOKPRFHM.js} +2 -2
  68. package/dist/bundle/{chunk-JMJIH6JH.js → chunk-RC72RU66.js} +6 -6
  69. package/dist/bundle/{chunk-NQRTKYJB.js → chunk-RLH6BOEG.js} +47 -80
  70. package/dist/bundle/{chunk-II4S2DBJ.js → chunk-SJE7UGOW.js} +12 -6
  71. package/dist/bundle/{chunk-LMKPP2JP.js → chunk-SXJDCRXE.js} +1 -1
  72. package/dist/bundle/{chunk-B2LPCHQN.js → chunk-T2VAEDJS.js} +4 -4
  73. package/dist/bundle/{chunk-I272E6UR.js → chunk-U2ERT45N.js} +54 -117
  74. package/dist/bundle/{chunk-A27UVLPK.js → chunk-UFNE57VY.js} +3 -3
  75. package/dist/bundle/{chunk-5XSBCMAF.js → chunk-ULH3TNUP.js} +4 -4
  76. package/dist/bundle/{chunk-3ONWN3IA.js → chunk-UOAHZV3K.js} +161 -48
  77. package/dist/bundle/{chunk-ECEP4SO3.js → chunk-UPCEHSIZ.js} +10 -10
  78. package/dist/bundle/{chunk-42G2XNPN.js → chunk-V7E25BUU.js} +2 -2
  79. package/dist/bundle/{chunk-EZ2OLYEK.js → chunk-VZ5KETIX.js} +14 -5
  80. package/dist/bundle/{chunk-X7YGGWXI.js → chunk-WBKYZZQT.js} +3 -2
  81. package/dist/bundle/{chunk-GW3LBY3T.js → chunk-WKIQKGOF.js} +146 -133
  82. package/dist/bundle/{chunk-O7ZDCOZE.js → chunk-WWW7YTFG.js} +1 -1
  83. package/dist/bundle/{chunk-2AFI4KGI.js → chunk-XZCF5XU7.js} +7 -7
  84. package/dist/bundle/chunk-Y2QVNVHK.js +70 -0
  85. package/dist/bundle/{chunk-WRMJN6UQ.js → chunk-Y5WSRG3F.js} +3 -3
  86. package/dist/bundle/{chunk-A4QNADEX.js → chunk-YI4DXASF.js} +49 -49
  87. package/dist/bundle/{chunk-SS4LKLD7.js → chunk-YVUAG7RF.js} +371 -362
  88. package/dist/bundle/chunk-ZEPDEFVT.js +71 -0
  89. package/dist/bundle/{chunk-SE352DBY.js → chunk-ZH4H5XTA.js} +1 -1
  90. package/dist/bundle/{chunk-3HXNDF6Q.js → chunk-ZK46UHDP.js} +2 -2
  91. package/dist/bundle/{chunk-SNLSEYJO.js → chunk-ZU5VQYNY.js} +1 -1
  92. package/dist/bundle/cli-U4LSBYDV.js +1101 -0
  93. package/dist/bundle/command-contract-UU5T24ZZ.js +41 -0
  94. package/dist/bundle/{command-server-entry-36JXYIJB.js → command-server-entry-PK6FBUPO.js} +31 -30
  95. package/dist/bundle/{decode-T5ZW57WZ.js → decode-3ZE6NBKV.js} +8 -8
  96. package/dist/bundle/{dispatch-RMA2XFYA.js → dispatch-WBEOHZDV.js} +9 -9
  97. package/dist/bundle/drive.js +13 -13
  98. package/dist/bundle/{echarts-KQ44LPSF.js → echarts-6FWNCNXK.js} +2 -2
  99. package/dist/bundle/{embed-Q7XST53J.js → embed-DGYBBZUW.js} +9 -9
  100. package/dist/bundle/{embedder-RWZSBVW2.js → embedder-O7A6VMWI.js} +12 -12
  101. package/dist/bundle/entry-CDJ2QSU2.js +25 -0
  102. package/dist/bundle/{failure-7NP4QPIN.js → failure-X6PSLVSO.js} +4 -4
  103. package/dist/bundle/first-run-UOQW7DN5.js +30 -0
  104. package/dist/bundle/first-screen-SNDV4YKF.js +39 -0
  105. package/dist/bundle/google-HPX52KMC.js +45 -0
  106. package/dist/bundle/{google-api-P5DRHD7L.js → google-api-HIMN4XL5.js} +68 -63
  107. package/dist/bundle/grants-RO42I6E4.js +111 -0
  108. package/dist/bundle/{identity-VDV6CHRW.js → identity-NFGHDPLL.js} +8 -6
  109. package/dist/bundle/{instructions-Q45FVY6H.js → instructions-6JAQYCM6.js} +1 -1
  110. package/dist/bundle/{login-XKN3NI6X.js → login-RZOQN63N.js} +73 -70
  111. package/dist/bundle/{mcp-7KQUJNFN.js → mcp-TDKGDB4V.js} +2 -2
  112. package/dist/bundle/{node-MSW565D3.js → node-KSIX3GIH.js} +2 -2
  113. package/dist/bundle/{node-sqlite-S74XVVHL.js → node-sqlite-4FJ6WJXN.js} +10 -10
  114. package/dist/bundle/oauth-BKZAMFKK.js +22 -0
  115. package/dist/bundle/{open-P7UQG7XJ.js → open-4AQJGH42.js} +8 -8
  116. package/dist/bundle/{openai-DDHJ57KZ.js → openai-24F2OX55.js} +28 -21
  117. package/dist/bundle/{process-NMUB5SHK.js → process-7NOA2T7H.js} +1 -1
  118. package/dist/bundle/{program-PJNWP6JW.js → program-7JHMLDEX.js} +306 -692
  119. package/dist/bundle/{prompt-VOSMK4C2.js → prompt-NM66MAZ4.js} +8 -8
  120. package/dist/bundle/{reasons-KDAXOC5S.js → reasons-KSYP5VDJ.js} +5 -5
  121. package/dist/bundle/{recognize-GZIY63HS.js → recognize-DBKV2JYZ.js} +7 -7
  122. package/dist/bundle/{remote-V3YGN7LN.js → remote-ABWUTBVB.js} +13 -10
  123. package/dist/bundle/{rerank-XRU6AVN7.js → rerank-FQAU4ENY.js} +10 -10
  124. package/dist/bundle/{serve-NDOAFA57.js → serve-QLJG4QZD.js} +12 -12
  125. package/dist/bundle/server-NUBLY5SV.js +74 -0
  126. package/dist/bundle/{server-BKGWJYMC.js → server-VGZNK5XD.js} +47 -45
  127. package/dist/bundle/{services-TYDMFQCA.js → services-5KARVUHK.js} +44 -34
  128. package/dist/bundle/{sqlite-runtime-UAFJKSJR.js → sqlite-runtime-ILF6EFQJ.js} +9 -9
  129. package/dist/bundle/{start-2ZLDP2OE.js → start-C6EXYXAL.js} +7 -7
  130. package/dist/bundle/{state-6SP27J2K.js → state-R2M56GPU.js} +9 -9
  131. package/dist/bundle/{store-4UUY545Q.js → store-2OBVMUQL.js} +21 -19
  132. package/dist/bundle/{store-EJN27MXI.js → store-DA4K7HWW.js} +23 -21
  133. package/dist/bundle/store-maintenance-command-KSIPI5B5.js +65 -0
  134. package/dist/bundle/tokens-VQDGSHRB.js +111 -0
  135. package/dist/commands/config.d.ts.map +1 -1
  136. package/dist/commands/config.js +5 -3
  137. package/dist/commands/config.js.map +1 -1
  138. package/dist/commands/discovery.d.ts +0 -1
  139. package/dist/commands/discovery.d.ts.map +1 -1
  140. package/dist/commands/discovery.js +6 -26
  141. package/dist/commands/discovery.js.map +1 -1
  142. package/dist/commands/knowledge.d.ts.map +1 -1
  143. package/dist/commands/knowledge.js +7 -6
  144. package/dist/commands/knowledge.js.map +1 -1
  145. package/dist/commands/search.d.ts.map +1 -1
  146. package/dist/commands/search.js +15 -12
  147. package/dist/commands/search.js.map +1 -1
  148. package/dist/commands/sync.d.ts.map +1 -1
  149. package/dist/commands/sync.js +2 -1
  150. package/dist/commands/sync.js.map +1 -1
  151. package/dist/commands/transcripts.d.ts +4 -0
  152. package/dist/commands/transcripts.d.ts.map +1 -0
  153. package/dist/commands/transcripts.js +42 -0
  154. package/dist/commands/transcripts.js.map +1 -0
  155. package/dist/config.d.ts +10 -0
  156. package/dist/config.d.ts.map +1 -1
  157. package/dist/config.js +17 -3
  158. package/dist/config.js.map +1 -1
  159. package/dist/contract-overrides.d.ts +16 -4
  160. package/dist/contract-overrides.d.ts.map +1 -1
  161. package/dist/contract-overrides.js +86 -410
  162. package/dist/contract-overrides.js.map +1 -1
  163. package/dist/errors.d.ts.map +1 -1
  164. package/dist/errors.js +4 -0
  165. package/dist/errors.js.map +1 -1
  166. package/dist/google-api.d.ts.map +1 -1
  167. package/dist/google-api.js +4 -1
  168. package/dist/google-api.js.map +1 -1
  169. package/dist/google.d.ts.map +1 -1
  170. package/dist/google.js +31 -28
  171. package/dist/google.js.map +1 -1
  172. package/dist/identity.d.ts +4 -0
  173. package/dist/identity.d.ts.map +1 -1
  174. package/dist/identity.js +22 -0
  175. package/dist/identity.js.map +1 -1
  176. package/dist/knowledge.js +2 -2
  177. package/dist/knowledge.js.map +1 -1
  178. package/dist/list-queries.d.ts +10 -0
  179. package/dist/list-queries.d.ts.map +1 -1
  180. package/dist/list-queries.js +12 -1
  181. package/dist/list-queries.js.map +1 -1
  182. package/dist/login.d.ts.map +1 -1
  183. package/dist/login.js +2 -2
  184. package/dist/login.js.map +1 -1
  185. package/dist/model.d.ts +4 -1
  186. package/dist/model.d.ts.map +1 -1
  187. package/dist/program.d.ts.map +1 -1
  188. package/dist/program.js +10 -6
  189. package/dist/program.js.map +1 -1
  190. package/dist/reasons.d.ts.map +1 -1
  191. package/dist/reasons.js +0 -1
  192. package/dist/reasons.js.map +1 -1
  193. package/dist/state.d.ts.map +1 -1
  194. package/dist/state.js +2 -0
  195. package/dist/state.js.map +1 -1
  196. package/dist/store-transition.js +2 -2
  197. package/dist/store-transition.js.map +1 -1
  198. package/dist/store.d.ts.map +1 -1
  199. package/dist/store.js +7 -7
  200. package/dist/store.js.map +1 -1
  201. package/dist/sync.d.ts.map +1 -1
  202. package/dist/sync.js +5 -1
  203. package/dist/sync.js.map +1 -1
  204. package/dist/tokens.d.ts +9 -2
  205. package/dist/tokens.d.ts.map +1 -1
  206. package/dist/tokens.js +18 -15
  207. package/dist/tokens.js.map +1 -1
  208. package/dist/transcripts.d.ts +21 -0
  209. package/dist/transcripts.d.ts.map +1 -0
  210. package/dist/transcripts.js +48 -0
  211. package/dist/transcripts.js.map +1 -0
  212. package/dist/version.d.ts +1 -1
  213. package/dist/version.js +1 -1
  214. package/dist/wcat.d.ts +3 -0
  215. package/dist/wcat.d.ts.map +1 -0
  216. package/dist/wcat.js +4 -0
  217. package/dist/wcat.js.map +1 -0
  218. package/package.json +7 -7
  219. package/dist/bundle/chunk-CGQRZRTH.js +0 -26
  220. package/dist/bundle/chunk-IKHOIXJR.js +0 -27
  221. package/dist/bundle/chunk-SBZB7HMU.js +0 -1055
  222. package/dist/bundle/command-contract-25E4PYMD.js +0 -40
  223. package/dist/bundle/dist-PY3MVR3G.js +0 -21
  224. package/dist/bundle/entry-HPLW4QL2.js +0 -25
  225. package/dist/bundle/first-run-RL3RKYZW.js +0 -30
  226. package/dist/bundle/first-screen-NX3TM2VJ.js +0 -38
  227. package/dist/bundle/google-DPD5N6AQ.js +0 -42
  228. package/dist/bundle/grants-TX4MHLI4.js +0 -109
  229. package/dist/bundle/oauth-6R7AWAES.js +0 -22
  230. package/dist/bundle/server-QD2MUJJZ.js +0 -72
  231. package/dist/bundle/store-maintenance-command-LETURZDC.js +0 -60
  232. package/dist/bundle/tokens-MTFJPTYT.js +0 -107
  233. /package/dist/bundle/{chunk-YVNHQFLC.js → chunk-XWBPP2HX.js} +0 -0
@@ -1,14 +1,10 @@
1
1
  import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
- DOC,
5
- DOCUMENT_LIST_FIELDS,
6
- FOLDER,
7
4
  MAX_ENTRIES,
8
- metadataJson,
9
5
  supported,
10
6
  tooManyEntries
11
- } from "./chunk-ZD4MB7NH.js";
7
+ } from "./chunk-PDHN4GHU.js";
12
8
  import {
13
9
  ACCOUNT_FREE_COMMANDS,
14
10
  ANY_PROFILE_COMMANDS,
@@ -19,13 +15,24 @@ import {
19
15
  describeDriveProgram,
20
16
  examples,
21
17
  markProfileFree
22
- } from "./chunk-WRMJN6UQ.js";
18
+ } from "./chunk-Y5WSRG3F.js";
23
19
  import {
24
20
  DEFAULTS_ONLY,
25
21
  DEFAULT_LEVELS,
22
+ FILES_QUERY,
23
+ FOLDERS_QUERY,
24
+ IDENTITIES_QUERY,
25
+ LINKS_QUERY,
26
+ MIRRORS_QUERY,
27
+ NOTES_QUERY,
28
+ PROFILE_ONLY,
29
+ SESSIONS_QUERY,
26
30
  SETTING_NAMES,
31
+ TAGS_QUERY,
32
+ TRANSCRIPTS_QUERY,
27
33
  activeProfile,
28
34
  application,
35
+ bindQuery,
29
36
  checkAddProfiles,
30
37
  checkTextLimit,
31
38
  configIssues,
@@ -33,11 +40,18 @@ import {
33
40
  configuration,
34
41
  configuredMirrors,
35
42
  configuredSessions,
43
+ driveFileQuery,
36
44
  fileId,
45
+ fileRow,
46
+ findTranscripts,
47
+ folderRow,
37
48
  googleAppOf,
49
+ identityRow,
38
50
  inspectConfig,
51
+ linkRow,
39
52
  maxAddProfiles,
40
53
  methodPolicyKeys,
54
+ mirrorRow,
41
55
  oauthClientReport,
42
56
  paths,
43
57
  permissionKeys,
@@ -49,12 +63,21 @@ import {
49
63
  readConfig,
50
64
  refusal,
51
65
  selectedFolders,
66
+ sessionRow,
67
+ tagRow,
68
+ termsOf,
52
69
  textLimit,
70
+ transcriptQuery,
71
+ transcriptRow,
72
+ transcriptsOf,
53
73
  unknownProfile,
54
74
  withDefaults,
55
75
  writeConfig
56
- } from "./chunk-ZR2EJPMQ.js";
76
+ } from "./chunk-DAFKV6DJ.js";
57
77
  import {
78
+ DOC,
79
+ DOCUMENT_LIST_FIELDS,
80
+ FOLDER,
58
81
  blockKey,
59
82
  blocksMarkdown,
60
83
  catalogFiles,
@@ -65,6 +88,7 @@ import {
65
88
  fileMirrorState,
66
89
  markdownBlocks,
67
90
  mergeBlocks,
91
+ metadataJson,
68
92
  mirrorId,
69
93
  mirrorStatus,
70
94
  normalizeInlines,
@@ -72,7 +96,7 @@ import {
72
96
  syncDocuments,
73
97
  syncMirrors,
74
98
  watchMirrors
75
- } from "./chunk-VMAMRFFC.js";
99
+ } from "./chunk-FS2PG2PE.js";
76
100
  import {
77
101
  apiMethod,
78
102
  apiMethods,
@@ -81,7 +105,14 @@ import {
81
105
  schemas,
82
106
  validateApiParams,
83
107
  validateRequest
84
- } from "./chunk-ZILALBYQ.js";
108
+ } from "./chunk-2PIA45FC.js";
109
+ import {
110
+ operations
111
+ } from "./chunk-NYECVHFH.js";
112
+ import {
113
+ googleError,
114
+ offlineRefused
115
+ } from "./chunk-Y2QVNVHK.js";
85
116
  import {
86
117
  DISCOVERY_DESCRIPTIONS,
87
118
  MEMO_SCENARIOS,
@@ -89,20 +120,21 @@ import {
89
120
  addContractInfo,
90
121
  answerFields,
91
122
  apiPlainJson,
123
+ appCompleteCommand,
92
124
  appDoctorCommand,
93
125
  appMcpCommand,
94
126
  checkApiBody,
95
127
  checkApiParameter,
96
128
  checkJson,
97
129
  commandRuns,
130
+ commandsText,
98
131
  createProgram,
99
132
  entityFields,
100
- formatSuggestions,
101
133
  generatedApiCommand,
102
134
  guideCommand,
103
135
  identifier,
136
+ inSection,
104
137
  modelCatalogueCommand,
105
- operations,
106
138
  parseApiJson,
107
139
  readApiBody,
108
140
  run,
@@ -110,23 +142,17 @@ import {
110
142
  sharedCommandTemplate,
111
143
  signInSteps,
112
144
  skillCommand,
113
- suggest,
114
145
  upgradeCommand
115
- } from "./chunk-NQ5XMSLA.js";
116
- import {
117
- googleError,
118
- offlineRefused
119
- } from "./chunk-NQRTKYJB.js";
120
- import "./chunk-SE352DBY.js";
121
- import "./chunk-SBZB7HMU.js";
122
- import "./chunk-PHOL2DZM.js";
123
- import "./chunk-SNLSEYJO.js";
124
- import "./chunk-GW3LBY3T.js";
125
- import "./chunk-D7WB54P7.js";
146
+ } from "./chunk-5TSILGTO.js";
147
+ import "./chunk-ZH4H5XTA.js";
148
+ import "./chunk-ZU5VQYNY.js";
149
+ import "./chunk-WKIQKGOF.js";
150
+ import "./chunk-OOBSSU2G.js";
126
151
  import {
127
152
  storeInfo
128
- } from "./chunk-7TAP7Y2E.js";
129
- import "./chunk-SS4LKLD7.js";
153
+ } from "./chunk-ETAFFY3J.js";
154
+ import "./chunk-RLH6BOEG.js";
155
+ import "./chunk-YVUAG7RF.js";
130
156
  import {
131
157
  LIST_QUERY_GUIDE,
132
158
  listQuery,
@@ -137,47 +163,45 @@ import {
137
163
  typedQuery,
138
164
  unfilteredQuery,
139
165
  withQuery
140
- } from "./chunk-WRAUO5EJ.js";
166
+ } from "./chunk-JO7BJYAP.js";
141
167
  import {
142
168
  RecipientList,
143
169
  SendJournal,
144
170
  newOperationId,
145
171
  sendGuard
146
- } from "./chunk-O6K2E7OA.js";
172
+ } from "./chunk-IRULPE5M.js";
147
173
  import {
148
174
  columnName,
149
175
  modelGateway,
150
176
  readSpreadsheet
151
- } from "./chunk-FBHSWQU7.js";
152
- import "./chunk-EU5MD24W.js";
153
- import {
154
- commandsText,
155
- inSection
156
- } from "./chunk-I272E6UR.js";
177
+ } from "./chunk-6ERQE4FS.js";
178
+ import "./chunk-JCNEPYQZ.js";
179
+ import "./chunk-U2ERT45N.js";
157
180
  import "./chunk-HTQTIKWP.js";
158
- import "./chunk-54V4H6PM.js";
181
+ import "./chunk-3RG6LL25.js";
159
182
  import {
160
183
  latestVersion,
161
184
  runUpdate,
162
185
  updateNotice
163
- } from "./chunk-TTP4NOP3.js";
164
- import "./chunk-MCPOZNWG.js";
165
- import "./chunk-EHU6EYGO.js";
166
- import "./chunk-5XSBCMAF.js";
167
- import "./chunk-EM7NL5ES.js";
168
- import "./chunk-EZ2OLYEK.js";
169
- import "./chunk-II4S2DBJ.js";
186
+ } from "./chunk-D4MVEOU2.js";
187
+ import "./chunk-FIVFP53N.js";
188
+ import "./chunk-C72WYRXD.js";
189
+ import "./chunk-ULH3TNUP.js";
190
+ import "./chunk-5DMPGTNR.js";
191
+ import "./chunk-VZ5KETIX.js";
192
+ import "./chunk-SJE7UGOW.js";
193
+ import "./chunk-CWDC6QJM.js";
170
194
  import {
171
195
  applyDocumentTransfer,
172
196
  previewDocumentTransfer
173
- } from "./chunk-CWLL63JD.js";
174
- import "./chunk-IMHW7VIV.js";
197
+ } from "./chunk-ABJQ6IDU.js";
198
+ import "./chunk-BHSLMJF7.js";
175
199
  import "./chunk-5DPV7X27.js";
176
- import "./chunk-2AFI4KGI.js";
177
- import "./chunk-SEQWBZYH.js";
178
- import "./chunk-VHQYWFWV.js";
179
- import "./chunk-TMHF4BCL.js";
180
- import "./chunk-Y5PKRITX.js";
200
+ import "./chunk-XZCF5XU7.js";
201
+ import "./chunk-AAZPDWRD.js";
202
+ import "./chunk-NFIR346J.js";
203
+ import "./chunk-QOKPRFHM.js";
204
+ import "./chunk-2MEVCMBW.js";
181
205
  import {
182
206
  FETCH,
183
207
  InvalidArgumentError,
@@ -191,7 +215,6 @@ import {
191
215
  changesAuthority,
192
216
  commandWords,
193
217
  customizeSharedCommand,
194
- describeOptions,
195
218
  environmentOf,
196
219
  flatten,
197
220
  grantsAuthority,
@@ -207,9 +230,10 @@ import {
207
230
  resolveAISettings,
208
231
  rootOf,
209
232
  settingRows,
233
+ sharedContracts,
210
234
  snakeKeys
211
- } from "./chunk-SIWXYB4E.js";
212
- import "./chunk-DA63E2UM.js";
235
+ } from "./chunk-2Y3YBDZX.js";
236
+ import "./chunk-7J2IP3WL.js";
213
237
  import {
214
238
  CEILING_KEY,
215
239
  LEVELS,
@@ -217,32 +241,33 @@ import {
217
241
  layerPermissions,
218
242
  levelFor,
219
243
  parseDuration
220
- } from "./chunk-F56DRBGY.js";
244
+ } from "./chunk-MBLB4TQI.js";
221
245
  import {
222
246
  modelTarget
223
- } from "./chunk-OWMZUWCM.js";
247
+ } from "./chunk-4VH7M2OD.js";
224
248
  import {
225
249
  setupPermissionCeiling
226
- } from "./chunk-VLXWAH5E.js";
250
+ } from "./chunk-P6A77LMP.js";
227
251
  import {
228
252
  readOnlyLockOf,
229
253
  readOnlyRefusal
230
- } from "./chunk-IKHOIXJR.js";
231
- import "./chunk-O7ZDCOZE.js";
254
+ } from "./chunk-ZEPDEFVT.js";
255
+ import "./chunk-WWW7YTFG.js";
232
256
  import {
233
- note
234
- } from "./chunk-A27UVLPK.js";
235
- import "./chunk-B2LPCHQN.js";
236
- import "./chunk-HP3NT6JJ.js";
237
- import "./chunk-Z2ADO6UA.js";
257
+ hostFetch
258
+ } from "./chunk-AJ3DFPRT.js";
259
+ import "./chunk-UFNE57VY.js";
260
+ import "./chunk-T2VAEDJS.js";
261
+ import "./chunk-FOMQ4MG3.js";
262
+ import "./chunk-JJHDV32D.js";
238
263
  import {
239
264
  CATALOG_QUERY,
240
265
  IMPORTED_DOCUMENT_QUERY,
241
266
  openStore
242
- } from "./chunk-NI5PD5KM.js";
243
- import "./chunk-WVJHZIDH.js";
244
- import "./chunk-FA6JNXCC.js";
245
- import "./chunk-JMJIH6JH.js";
267
+ } from "./chunk-NWYVOHIX.js";
268
+ import "./chunk-LXRBTXCZ.js";
269
+ import "./chunk-JLUQZZ26.js";
270
+ import "./chunk-RC72RU66.js";
246
271
  import {
247
272
  FACT_STATUSES,
248
273
  FACT_TYPES,
@@ -250,53 +275,50 @@ import {
250
275
  MEMORY_SCOPES,
251
276
  MEMORY_STATUSES,
252
277
  inRun
253
- } from "./chunk-D6Z43SOG.js";
278
+ } from "./chunk-EXWOOST5.js";
254
279
  import {
255
- dateRange,
256
280
  defineQuery,
257
281
  parseLucene,
258
282
  queryError,
259
- queryFieldsOf,
260
283
  timezoneOf,
261
284
  validateQuery,
262
285
  zonedMoment
263
- } from "./chunk-ECEP4SO3.js";
264
- import "./chunk-X7YGGWXI.js";
265
- import "./chunk-4AOINPN2.js";
266
- import "./chunk-4Y5YBFMS.js";
267
- import "./chunk-LMKPP2JP.js";
286
+ } from "./chunk-UPCEHSIZ.js";
287
+ import "./chunk-WBKYZZQT.js";
288
+ import "./chunk-7AZCAUST.js";
289
+ import "./chunk-MEQNAZ6R.js";
290
+ import "./chunk-SXJDCRXE.js";
268
291
  import "./chunk-D72URWJE.js";
269
292
  import {
270
293
  installerOf
271
- } from "./chunk-RX5CJ55S.js";
294
+ } from "./chunk-M4OP5ASJ.js";
272
295
  import {
273
296
  DRIVE_APP,
274
297
  PACKAGE,
275
298
  VERSION
276
- } from "./chunk-CGQRZRTH.js";
299
+ } from "./chunk-LSAIXPAX.js";
277
300
  import {
278
301
  REASONS
279
- } from "./chunk-JPPPLKAO.js";
280
- import "./chunk-YVNHQFLC.js";
281
- import "./chunk-VDZY3L7U.js";
302
+ } from "./chunk-7JKECODO.js";
303
+ import "./chunk-XWBPP2HX.js";
304
+ import "./chunk-JEMBW6IO.js";
282
305
  import {
283
306
  storePath
284
- } from "./chunk-UTNRBOEN.js";
307
+ } from "./chunk-4G7WQNG7.js";
285
308
  import {
286
309
  processStreams,
287
310
  saveConfigFile,
288
311
  writeSecurely
289
- } from "./chunk-7AQGVX5O.js";
290
- import "./chunk-PLP5527C.js";
312
+ } from "./chunk-MW46BLWH.js";
313
+ import "./chunk-PV3AWPHR.js";
291
314
  import "./chunk-Y5E2WNWB.js";
292
- import "./chunk-6DCLZLGX.js";
293
- import "./chunk-W2XY6C5S.js";
315
+ import "./chunk-HCZYJMBP.js";
316
+ import "./chunk-5TK2YQCO.js";
294
317
  import {
295
318
  array,
296
319
  boolean,
297
320
  defineSteps,
298
321
  integer,
299
- isoTime,
300
322
  literal,
301
323
  looseObject,
302
324
  minValue,
@@ -314,11 +336,11 @@ import {
314
336
  string,
315
337
  unknown,
316
338
  writes
317
- } from "./chunk-TOVWMURV.js";
339
+ } from "./chunk-JRFKCYMW.js";
318
340
  import {
319
341
  CliError,
320
342
  isCliError
321
- } from "./chunk-ELJUBPY4.js";
343
+ } from "./chunk-EA2OB75T.js";
322
344
  import {
323
345
  __commonJS,
324
346
  __name,
@@ -2030,13 +2052,15 @@ var State = object({
2030
2052
  picture: optional(picklist(["saved", "too-large"]))
2031
2053
  })),
2032
2054
  skipped: array(Skip),
2055
+ matched: optional(array(ID)),
2033
2056
  lastSync: optional(string()),
2034
2057
  pending: optional(object({
2035
2058
  cursor: string(),
2036
2059
  scope: string(),
2037
2060
  folders: record(ID, File),
2038
2061
  jobs: array(object({ id: ID, kind: picklist(["save", "remove"]), file: optional(File) })),
2039
- skipped: array(Skip)
2062
+ skipped: array(Skip),
2063
+ matched: optional(array(ID))
2040
2064
  }))
2041
2065
  });
2042
2066
  var Walk = object({
@@ -2155,7 +2179,7 @@ var profileLocked2 = /* @__PURE__ */ __name((env, name) => import_proper_lockfil
2155
2179
  var removal = {
2156
2180
  signOut: /* @__PURE__ */ __name(async (profile, { env, keyring, mayRevoke }) => {
2157
2181
  const storage = readConfig(env).profiles[profile]?.storage ?? "keyring";
2158
- const { sessionKeeper } = await import("./tokens-MTFJPTYT.js");
2182
+ const { sessionKeeper } = await import("./tokens-VQDGSHRB.js");
2159
2183
  const { revoked } = await sessionKeeper({
2160
2184
  env,
2161
2185
  name: profile,
@@ -2283,109 +2307,6 @@ var CATALOG_FIELDS = Object.keys({
2283
2307
  content: true
2284
2308
  });
2285
2309
 
2286
- // dist/list-queries.js
2287
- var registry = /* @__PURE__ */ __name((entity, schema, native, examples2) => ({
2288
- entity,
2289
- backend: "native",
2290
- fields: queryFieldsOf(schema, { native, examples: examples2 }).map((field) => field.native ? { ...field, operators: ["term", "phrase"] } : field)
2291
- }), "registry");
2292
- var folderRow = strictObject({ id: string() });
2293
- var mirrorRow = strictObject({ id: string(), path: string(), folder: string() });
2294
- var sessionRow = strictObject({
2295
- profile: string(),
2296
- selected_folders: number(),
2297
- storage: picklist(["keyring", "file"])
2298
- });
2299
- var tagRow = strictObject({ tag: string() });
2300
- var linkRow = looseObject({
2301
- id: string(),
2302
- from: string(),
2303
- to: nullable(string()),
2304
- kind: string(),
2305
- role: nullable(string()),
2306
- confirmed: boolean(),
2307
- origin: picklist(["file", "owner", "suggested", "message"])
2308
- });
2309
- var identityRow = looseObject({
2310
- google_id: nullable(string()),
2311
- role: picklist(["owner", "last-editor"]),
2312
- person: nullable(record(string(), unknown()))
2313
- });
2314
- var fileRow = looseObject({
2315
- id: optional(string()),
2316
- name: optional(string()),
2317
- trashed: optional(boolean()),
2318
- modified_time: optional(isoTime),
2319
- created_time: optional(isoTime),
2320
- viewed_by_me_time: optional(isoTime)
2321
- });
2322
- var FOLDERS_QUERY = registry("drive_selected_folder", folderRow, ["id"], { id: "id:FOLDER_ID" });
2323
- var MIRRORS_QUERY = registry("drive_mirror", mirrorRow, ["id", "path", "folder"], {
2324
- id: "id:example",
2325
- path: 'path:"/example/notes"',
2326
- folder: "folder:FOLDER_ID"
2327
- });
2328
- var SESSIONS_QUERY = registry("drive_session", sessionRow, ["profile", "storage"], {
2329
- profile: "profile:personal",
2330
- storage: "storage:keyring"
2331
- });
2332
- var TAGS_QUERY = registry("drive_document_tag", tagRow, ["tag"], { tag: "tag:budget" });
2333
- var NOTES_QUERY = registry("note", note, ["text"], { text: "text:review" });
2334
- var LINKS_QUERY = registry("drive_document_relationship", linkRow, ["id", "role", "origin", "confirmed"], {
2335
- id: "id:1",
2336
- role: "role:reviewer",
2337
- origin: "origin:owner",
2338
- confirmed: "confirmed:true"
2339
- });
2340
- var IDENTITIES_QUERY = registry("drive_document_identity", identityRow, ["google_id", "role"], {
2341
- google_id: "google_id:example",
2342
- role: "role:owner"
2343
- });
2344
- var FILES_QUERY = {
2345
- entity: "drive_remote_file",
2346
- backend: "native",
2347
- fields: queryFieldsOf(fileRow, {
2348
- native: ["name", "trashed", "modified_time", "created_time", "viewed_by_me_time"],
2349
- examples: {
2350
- name: 'name:"Example plan"',
2351
- trashed: "trashed:false",
2352
- modified_time: "modified_time>=2026-01-01",
2353
- created_time: "created_time>=2026-01-01",
2354
- viewed_by_me_time: "viewed_by_me_time>=2026-01-01"
2355
- }
2356
- }).map((field) => field.native ? { ...field, operators: field.type === "time" ? ["term", "range"] : ["term", "phrase"] } : field),
2357
- defaults: ["trashed:false"]
2358
- };
2359
- var bindQuery = /* @__PURE__ */ __name((command, query, schema) => answerEntity(withQuery(command, query), query.entity, schema), "bindQuery");
2360
- var termsOf = /* @__PURE__ */ __name((words, query, command) => Object.fromEntries(queryTerms(words, query, command)), "termsOf");
2361
- var driveFileQuery = /* @__PURE__ */ __name((words, timezone) => {
2362
- const ast = listQuery(typedQuery(words), FILES_QUERY, "files list");
2363
- const quote = /* @__PURE__ */ __name((value) => `'${value.replaceAll("\\", "\\\\").replaceAll("'", "\\'")}'`, "quote");
2364
- const zone = timezoneOf(timezone);
2365
- const column = {
2366
- modified_time: "modifiedTime",
2367
- created_time: "createdTime",
2368
- viewed_by_me_time: "viewedByMeTime"
2369
- };
2370
- const render = /* @__PURE__ */ __name((node) => {
2371
- if (node.kind === "boolean") {
2372
- if (node.clauses.some((clause) => clause.occur !== "must"))
2373
- queryError("query.unsupported-operator", node.span, "files list accepts AND terms only");
2374
- return node.clauses.map((clause) => render(clause.node)).join(" and ");
2375
- }
2376
- if (node.field === "name")
2377
- return `name = ${quote(node.value)}`;
2378
- if (node.field === "trashed")
2379
- return `trashed = ${node.value.toLowerCase()}`;
2380
- const range2 = dateRange(node.value, node.operator === "range" ? node.upper ?? "*" : node.value, node.lower_inclusive ?? true, node.upper_inclusive ?? true, zone, node.span);
2381
- return [
2382
- range2.lower === void 0 ? void 0 : `${column[node.field]} ${range2.lower_inclusive ? ">=" : ">"} ${quote(new Date(range2.lower).toISOString())}`,
2383
- range2.upper === void 0 ? void 0 : `${column[node.field]} ${range2.upper_inclusive ? "<=" : "<"} ${quote(new Date(range2.upper).toISOString())}`
2384
- ].filter(Boolean).join(" and ");
2385
- }, "render");
2386
- return { query: ast ? render(ast.root) : "trashed = false", timezone: zone };
2387
- }, "driveFileQuery");
2388
-
2389
2310
  // dist/output.js
2390
2311
  var VERBATIM = /* @__PURE__ */ new Set([
2391
2312
  "frontMatter",
@@ -2671,8 +2592,8 @@ var installConfigCommands = /* @__PURE__ */ __name((program, { env, selected, ou
2671
2592
  examples(annotate(grantsAuthority(config.command("set")), { effects: LOCAL_WRITE }).description("set one setting of this profile, or of the defaults"), [
2672
2593
  "drive personal config set max_text_chars 100000",
2673
2594
  `drive personal config set permissions.files '"readonly"' --defaults`,
2674
- "drive personal config set record true --defaults"
2675
- ]).argument("<key>", "max_text_chars, picture_search, google_client_id, max_add_profiles, record, record_input, keep_runs_for_days, keep_successful_runs_for_days, runs_size_limit_mb, shared AI settings, permissions.<key> or models.<purpose>.<field>").argument("<json-value>", "the new value, as JSON").option("--defaults", "change the defaults instead of this profile").action((key, raw, args) => {
2595
+ `drive personal config set transcripts '"include"'`
2596
+ ]).argument("<key>", "max_text_chars, picture_search, transcripts, transcript_words, google_client_id, max_add_profiles, record, record_input, keep_runs_for_days, keep_successful_runs_for_days, runs_size_limit_mb, shared AI settings, permissions.<key> or models.<purpose>.<field>").argument("<json-value>", "the new value, as JSON").option("--defaults", "change the defaults instead of this profile").action((key, raw, args) => {
2676
2597
  const file = editable();
2677
2598
  const { at: scope, scope: name } = scopeOf(file, args.defaults);
2678
2599
  const setting = settingAt(key);
@@ -2692,6 +2613,8 @@ var installConfigCommands = /* @__PURE__ */ __name((program, { env, selected, ou
2692
2613
  throw new CliError("validation_error", `${head} is set for every profile at once: add --defaults`);
2693
2614
  if (head === "picture_search" && (args.defaults || typeof parsed !== "boolean"))
2694
2615
  throw new CliError("validation_error", "picture_search is true or false, set per profile");
2616
+ if (PROFILE_ONLY.has(head) && args.defaults)
2617
+ throw new CliError("validation_error", `${head} is set per profile, not in the defaults`);
2695
2618
  if (head === "max_text_chars")
2696
2619
  parsed = checkTextLimit(parsed);
2697
2620
  if (head === "max_add_profiles")
@@ -2771,7 +2694,7 @@ var installModelCommands = /* @__PURE__ */ __name((program, { env, output, strea
2771
2694
  const download = /* @__PURE__ */ __name(async (kind, id, acceptTerms) => {
2772
2695
  if (policyFlags().offline)
2773
2696
  throw offlineRefused("downloading a model needs the network");
2774
- const { downloadImageModel, downloadTextModel } = await import("./services-TYDMFQCA.js");
2697
+ const { downloadImageModel, downloadTextModel } = await import("./services-5KARVUHK.js");
2775
2698
  const progress = /* @__PURE__ */ __name((line) => {
2776
2699
  if (!program.opts().quiet)
2777
2700
  streams.diagnostic(line);
@@ -2819,55 +2742,52 @@ var offset = /* @__PURE__ */ __name((input) => {
2819
2742
  }, "offset");
2820
2743
 
2821
2744
  // dist/contract-overrides.js
2745
+ import { createHash } from "node:crypto";
2822
2746
  var NOTES_REASON = "Drive notes annotate one explicitly selected imported document; document-bound arguments and receipts replace the generic note scope.";
2823
2747
  var SEARCH_REASON = "Drive searches imported documents and embeddings rather than live messenger messages; its default action and pagination are explicitly provider-specific.";
2748
+ var canonical = /* @__PURE__ */ __name((value) => Array.isArray(value) ? value.map(canonical) : value && typeof value === "object" ? Object.fromEntries(Object.keys(value).sort().map((key) => [key, canonical(value[key])])) : value, "canonical");
2749
+ var fingerprint = /* @__PURE__ */ __name((value) => createHash("sha256").update(JSON.stringify(canonical(value ?? null))).digest("hex").slice(0, 16), "fingerprint");
2750
+ var reviewedOverrides = /* @__PURE__ */ __name((reference, reviewed) => reviewed.map((override) => {
2751
+ let node = reference;
2752
+ for (const name of override.command.slice(1))
2753
+ node = node.commands.find((child) => child.name() === name) ?? node;
2754
+ const before = sharedContracts(node)[node.name()]?.[override.field] ?? null;
2755
+ return { ...override, before: fingerprint(before) === override.before ? before : override.before };
2756
+ }), "reviewedOverrides");
2824
2757
  var SHELL_OVERRIDES = {
2825
2758
  notes: [
2826
2759
  {
2827
2760
  command: ["notes"],
2828
2761
  field: "description",
2829
- before: "notes kept in the shared store",
2762
+ before: "073d38b6d7256579",
2830
2763
  after: "write notes about an imported document",
2831
2764
  reason: NOTES_REASON
2832
2765
  },
2833
2766
  {
2834
2767
  command: ["notes"],
2835
2768
  field: "effects",
2836
- before: {
2837
- remote: "none",
2838
- local: "none"
2839
- },
2840
- after: {
2841
- remote: "none",
2842
- local: "read"
2843
- },
2769
+ before: "b98c7b06ed808dfb",
2770
+ after: { remote: "none", local: "read" },
2844
2771
  reason: NOTES_REASON
2845
2772
  },
2846
2773
  {
2847
2774
  command: ["notes"],
2848
2775
  field: "children",
2849
- before: ["list", "show", "add", "edit", "remove"],
2776
+ before: "6cfec8425c19582f",
2850
2777
  after: ["add", "list", "show", "edit", "remove"],
2851
2778
  reason: NOTES_REASON
2852
2779
  },
2853
2780
  {
2854
2781
  command: ["notes", "add"],
2855
2782
  field: "description",
2856
- before: "write a note",
2783
+ before: "98b319044cba6b7f",
2857
2784
  after: "write a note about a document",
2858
2785
  reason: NOTES_REASON
2859
2786
  },
2860
2787
  {
2861
2788
  command: ["notes", "add"],
2862
2789
  field: "arguments",
2863
- before: [
2864
- {
2865
- name: "text",
2866
- required: true,
2867
- variadic: false,
2868
- description: "note text"
2869
- }
2870
- ],
2790
+ before: "d5010f078464b8d0",
2871
2791
  after: [
2872
2792
  {
2873
2793
  name: "document",
@@ -2875,303 +2795,58 @@ var SHELL_OVERRIDES = {
2875
2795
  variadic: false,
2876
2796
  description: "Google file or folder id or URL in the local catalog, or a document:<n> ref"
2877
2797
  },
2878
- {
2879
- name: "text",
2880
- required: true,
2881
- variadic: false,
2882
- description: "the note's text"
2883
- }
2798
+ { name: "text", required: true, variadic: false, description: "the note's text" }
2884
2799
  ],
2885
2800
  reason: NOTES_REASON
2886
2801
  },
2887
2802
  {
2888
2803
  command: ["notes", "add"],
2889
2804
  field: "options",
2890
- before: [
2891
- {
2892
- flags: "--subject <ref>",
2893
- description: "stored resource the note describes",
2894
- takes_value: true,
2895
- mandatory: false
2896
- }
2897
- ],
2898
- after: [
2899
- {
2900
- flags: "--title <title>",
2901
- description: "a title for the note",
2902
- takes_value: true,
2903
- mandatory: false
2904
- }
2905
- ],
2805
+ before: "213adb539c248d7f",
2806
+ after: [{ flags: "--title <title>", description: "a title for the note", takes_value: true, mandatory: false }],
2906
2807
  reason: NOTES_REASON
2907
2808
  },
2908
2809
  {
2909
2810
  command: ["notes", "add"],
2910
2811
  field: "examples",
2911
- before: null,
2812
+ before: "74234e98afe7498f",
2912
2813
  after: ['drive personal notes add DOC_ID "Check the numbers" --title Review'],
2913
2814
  reason: NOTES_REASON
2914
2815
  },
2915
2816
  {
2916
2817
  command: ["notes", "list"],
2917
2818
  field: "description",
2918
- before: "list stored notes",
2819
+ before: "6b866a022b5e84ce",
2919
2820
  after: "list a document's notes",
2920
2821
  reason: NOTES_REASON
2921
2822
  },
2922
2823
  {
2923
2824
  command: ["notes", "list"],
2924
2825
  field: "query",
2925
- before: {
2926
- entity: "note",
2927
- backend: "native",
2928
- fields: [
2929
- {
2930
- name: "ref",
2931
- type: "ref",
2932
- operators: ["term", "phrase"],
2933
- example: 'ref:"note:42"'
2934
- },
2935
- {
2936
- name: "kind",
2937
- type: "enum",
2938
- values: ["note", "document"],
2939
- operators: ["term"],
2940
- example: "kind:note"
2941
- },
2942
- {
2943
- name: "provider",
2944
- type: "kw",
2945
- operators: ["term", "phrase", "wildcard"],
2946
- example: "provider:abc"
2947
- },
2948
- {
2949
- name: "account",
2950
- type: "kw",
2951
- operators: ["term", "phrase", "wildcard"],
2952
- example: "account:abc"
2953
- },
2954
- {
2955
- name: "url",
2956
- type: "kw",
2957
- operators: ["term", "phrase", "wildcard"],
2958
- example: "url:abc"
2959
- },
2960
- {
2961
- name: "id",
2962
- type: "kw",
2963
- operators: ["term", "phrase", "wildcard"],
2964
- example: "id:abc"
2965
- },
2966
- {
2967
- name: "source",
2968
- type: "enum",
2969
- values: ["file", "internal"],
2970
- operators: ["term"],
2971
- example: "source:file"
2972
- },
2973
- {
2974
- name: "folder_id",
2975
- type: "kw",
2976
- operators: ["term", "phrase", "wildcard"],
2977
- example: "folder_id:abc"
2978
- },
2979
- {
2980
- name: "path",
2981
- type: "kw",
2982
- operators: ["term", "phrase", "wildcard"],
2983
- example: "path:abc"
2984
- },
2985
- {
2986
- name: "title",
2987
- type: "kw",
2988
- operators: ["term", "phrase", "wildcard"],
2989
- example: "title:abc"
2990
- },
2991
- {
2992
- name: "text",
2993
- type: "kw",
2994
- operators: ["term", "phrase", "wildcard"],
2995
- example: "text:abc"
2996
- },
2997
- {
2998
- name: "revision",
2999
- type: "num",
3000
- operators: ["term", "range"],
3001
- example: "revision>0"
3002
- },
3003
- {
3004
- name: "content_hash",
3005
- type: "kw",
3006
- operators: ["term", "phrase", "wildcard"],
3007
- example: "content_hash:abc"
3008
- },
3009
- {
3010
- name: "export_path",
3011
- type: "kw",
3012
- operators: ["term", "phrase", "wildcard"],
3013
- example: "export_path:abc"
3014
- },
3015
- {
3016
- name: "created_at",
3017
- type: "time",
3018
- operators: ["term", "range"],
3019
- example: "created_at>=7d"
3020
- },
3021
- {
3022
- name: "updated_at",
3023
- type: "time",
3024
- operators: ["term", "range"],
3025
- example: "updated_at>=7d"
3026
- },
3027
- {
3028
- name: "deleted_at",
3029
- type: "time",
3030
- operators: ["term", "range"],
3031
- example: "deleted_at>=7d"
3032
- },
3033
- {
3034
- name: "tags",
3035
- type: "kw",
3036
- operators: ["term", "phrase", "wildcard"],
3037
- example: "tags:abc"
3038
- },
3039
- {
3040
- name: "excerpt",
3041
- type: "kw",
3042
- operators: ["term", "phrase", "wildcard"],
3043
- example: "excerpt:abc"
3044
- },
3045
- {
3046
- name: "found_by",
3047
- type: "enum",
3048
- values: ["title", "words", "meaning"],
3049
- operators: ["term"],
3050
- example: "found_by:title"
3051
- }
3052
- ]
3053
- },
2826
+ before: "0b0517429a4f9613",
3054
2827
  after: {
3055
2828
  entity: "note",
3056
2829
  backend: "native",
3057
2830
  fields: [
3058
- {
3059
- name: "ref",
3060
- type: "ref",
3061
- operators: ["term", "phrase"],
3062
- example: 'ref:"note:42"'
3063
- },
3064
- {
3065
- name: "kind",
3066
- type: "enum",
3067
- values: ["note", "document"],
3068
- operators: ["term"],
3069
- example: "kind:note"
3070
- },
3071
- {
3072
- name: "provider",
3073
- type: "kw",
3074
- operators: ["term", "phrase", "wildcard"],
3075
- example: "provider:abc"
3076
- },
3077
- {
3078
- name: "account",
3079
- type: "kw",
3080
- operators: ["term", "phrase", "wildcard"],
3081
- example: "account:abc"
3082
- },
3083
- {
3084
- name: "url",
3085
- type: "kw",
3086
- operators: ["term", "phrase", "wildcard"],
3087
- example: "url:abc"
3088
- },
3089
- {
3090
- name: "id",
3091
- type: "kw",
3092
- operators: ["term", "phrase", "wildcard"],
3093
- example: "id:abc"
3094
- },
3095
- {
3096
- name: "source",
3097
- type: "enum",
3098
- values: ["file", "internal"],
3099
- operators: ["term"],
3100
- example: "source:file"
3101
- },
3102
- {
3103
- name: "folder_id",
3104
- type: "kw",
3105
- operators: ["term", "phrase", "wildcard"],
3106
- example: "folder_id:abc"
3107
- },
3108
- {
3109
- name: "path",
3110
- type: "kw",
3111
- operators: ["term", "phrase", "wildcard"],
3112
- example: "path:abc"
3113
- },
3114
- {
3115
- name: "title",
3116
- type: "kw",
3117
- operators: ["term", "phrase", "wildcard"],
3118
- example: "title:abc"
3119
- },
3120
- {
3121
- name: "text",
3122
- type: "kw",
3123
- operators: ["term", "phrase"],
3124
- example: "text:review",
3125
- native: true
3126
- },
3127
- {
3128
- name: "revision",
3129
- type: "num",
3130
- operators: ["term", "range"],
3131
- example: "revision>0"
3132
- },
3133
- {
3134
- name: "content_hash",
3135
- type: "kw",
3136
- operators: ["term", "phrase", "wildcard"],
3137
- example: "content_hash:abc"
3138
- },
3139
- {
3140
- name: "export_path",
3141
- type: "kw",
3142
- operators: ["term", "phrase", "wildcard"],
3143
- example: "export_path:abc"
3144
- },
3145
- {
3146
- name: "created_at",
3147
- type: "time",
3148
- operators: ["term", "range"],
3149
- example: "created_at>=7d"
3150
- },
3151
- {
3152
- name: "updated_at",
3153
- type: "time",
3154
- operators: ["term", "range"],
3155
- example: "updated_at>=7d"
3156
- },
3157
- {
3158
- name: "deleted_at",
3159
- type: "time",
3160
- operators: ["term", "range"],
3161
- example: "deleted_at>=7d"
3162
- },
3163
- {
3164
- name: "tags",
3165
- type: "kw",
3166
- operators: ["term", "phrase", "wildcard"],
3167
- example: "tags:abc"
3168
- },
3169
- {
3170
- name: "excerpt",
3171
- type: "kw",
3172
- operators: ["term", "phrase", "wildcard"],
3173
- example: "excerpt:abc"
3174
- },
2831
+ { name: "ref", type: "ref", operators: ["term", "phrase"], example: 'ref:"note:42"' },
2832
+ { name: "kind", type: "enum", values: ["note", "document"], operators: ["term"], example: "kind:note" },
2833
+ { name: "provider", type: "kw", operators: ["term", "phrase", "wildcard"], example: "provider:abc" },
2834
+ { name: "account", type: "kw", operators: ["term", "phrase", "wildcard"], example: "account:abc" },
2835
+ { name: "url", type: "kw", operators: ["term", "phrase", "wildcard"], example: "url:abc" },
2836
+ { name: "id", type: "kw", operators: ["term", "phrase", "wildcard"], example: "id:abc" },
2837
+ { name: "source", type: "enum", values: ["file", "internal"], operators: ["term"], example: "source:file" },
2838
+ { name: "folder_id", type: "kw", operators: ["term", "phrase", "wildcard"], example: "folder_id:abc" },
2839
+ { name: "path", type: "kw", operators: ["term", "phrase", "wildcard"], example: "path:abc" },
2840
+ { name: "title", type: "kw", operators: ["term", "phrase", "wildcard"], example: "title:abc" },
2841
+ { name: "text", type: "kw", operators: ["term", "phrase"], example: "text:review", native: true },
2842
+ { name: "revision", type: "num", operators: ["term", "range"], example: "revision>0" },
2843
+ { name: "content_hash", type: "kw", operators: ["term", "phrase", "wildcard"], example: "content_hash:abc" },
2844
+ { name: "export_path", type: "kw", operators: ["term", "phrase", "wildcard"], example: "export_path:abc" },
2845
+ { name: "created_at", type: "time", operators: ["term", "range"], example: "created_at>=7d" },
2846
+ { name: "updated_at", type: "time", operators: ["term", "range"], example: "updated_at>=7d" },
2847
+ { name: "deleted_at", type: "time", operators: ["term", "range"], example: "deleted_at>=7d" },
2848
+ { name: "tags", type: "kw", operators: ["term", "phrase", "wildcard"], example: "tags:abc" },
2849
+ { name: "excerpt", type: "kw", operators: ["term", "phrase", "wildcard"], example: "excerpt:abc" },
3175
2850
  {
3176
2851
  name: "found_by",
3177
2852
  type: "enum",
@@ -3186,14 +2861,7 @@ var SHELL_OVERRIDES = {
3186
2861
  {
3187
2862
  command: ["notes", "list"],
3188
2863
  field: "arguments",
3189
- before: [
3190
- {
3191
- name: "query",
3192
- required: false,
3193
- variadic: true,
3194
- description: "field:value terms; this list filters by none yet"
3195
- }
3196
- ],
2864
+ before: "350998d1fcef909c",
3197
2865
  after: [
3198
2866
  {
3199
2867
  name: "document",
@@ -3213,7 +2881,7 @@ var SHELL_OVERRIDES = {
3213
2881
  {
3214
2882
  command: ["notes", "list"],
3215
2883
  field: "options",
3216
- before: [],
2884
+ before: "4f53cda18c2baa0c",
3217
2885
  after: [
3218
2886
  {
3219
2887
  flags: "--limit <n>",
@@ -3222,34 +2890,21 @@ var SHELL_OVERRIDES = {
3222
2890
  mandatory: false,
3223
2891
  default: 50
3224
2892
  },
3225
- {
3226
- flags: "--page <n>",
3227
- description: "which page to return",
3228
- takes_value: true,
3229
- mandatory: false,
3230
- default: 1
3231
- }
2893
+ { flags: "--page <n>", description: "which page to return", takes_value: true, mandatory: false, default: 1 }
3232
2894
  ],
3233
2895
  reason: NOTES_REASON
3234
2896
  },
3235
2897
  {
3236
2898
  command: ["notes", "list"],
3237
2899
  field: "examples",
3238
- before: null,
2900
+ before: "74234e98afe7498f",
3239
2901
  after: ["drive personal notes list DOC_ID", "drive personal notes list DOC_ID text:review --limit 10"],
3240
2902
  reason: NOTES_REASON
3241
2903
  },
3242
2904
  {
3243
2905
  command: ["notes", "show"],
3244
2906
  field: "arguments",
3245
- before: [
3246
- {
3247
- name: "note",
3248
- required: true,
3249
- variadic: false,
3250
- description: "stored note reference"
3251
- }
3252
- ],
2907
+ before: "ae549d47fb4ad5ab",
3253
2908
  after: [
3254
2909
  {
3255
2910
  name: "document",
@@ -3257,46 +2912,28 @@ var SHELL_OVERRIDES = {
3257
2912
  variadic: false,
3258
2913
  description: "Google file or folder id or URL in the local catalog, or a document:<n> ref"
3259
2914
  },
3260
- {
3261
- name: "note",
3262
- required: true,
3263
- variadic: false,
3264
- description: "note:<id> reference, as notes list prints it"
3265
- }
2915
+ { name: "note", required: true, variadic: false, description: "note:<id> reference, as notes list prints it" }
3266
2916
  ],
3267
2917
  reason: NOTES_REASON
3268
2918
  },
3269
2919
  {
3270
2920
  command: ["notes", "show"],
3271
2921
  field: "examples",
3272
- before: null,
2922
+ before: "74234e98afe7498f",
3273
2923
  after: ["drive personal notes show DOC_ID note:NOTE_ID"],
3274
2924
  reason: NOTES_REASON
3275
2925
  },
3276
2926
  {
3277
2927
  command: ["notes", "edit"],
3278
2928
  field: "description",
3279
- before: "change a note",
2929
+ before: "e67289f2731a50ff",
3280
2930
  after: "replace a note's text",
3281
2931
  reason: NOTES_REASON
3282
2932
  },
3283
2933
  {
3284
2934
  command: ["notes", "edit"],
3285
2935
  field: "arguments",
3286
- before: [
3287
- {
3288
- name: "note",
3289
- required: true,
3290
- variadic: false,
3291
- description: "stored note reference"
3292
- },
3293
- {
3294
- name: "text",
3295
- required: true,
3296
- variadic: false,
3297
- description: "replacement text"
3298
- }
3299
- ],
2936
+ before: "c7d2686d3041bb14",
3300
2937
  after: [
3301
2938
  {
3302
2939
  name: "document",
@@ -3304,25 +2941,15 @@ var SHELL_OVERRIDES = {
3304
2941
  variadic: false,
3305
2942
  description: "Google file or folder id or URL in the local catalog, or a document:<n> ref"
3306
2943
  },
3307
- {
3308
- name: "note",
3309
- required: true,
3310
- variadic: false,
3311
- description: "note:<id> reference, as notes list prints it"
3312
- },
3313
- {
3314
- name: "text",
3315
- required: true,
3316
- variadic: false,
3317
- description: "the note's new text"
3318
- }
2944
+ { name: "note", required: true, variadic: false, description: "note:<id> reference, as notes list prints it" },
2945
+ { name: "text", required: true, variadic: false, description: "the note's new text" }
3319
2946
  ],
3320
2947
  reason: NOTES_REASON
3321
2948
  },
3322
2949
  {
3323
2950
  command: ["notes", "edit"],
3324
2951
  field: "options",
3325
- before: [],
2952
+ before: "4f53cda18c2baa0c",
3326
2953
  after: [
3327
2954
  {
3328
2955
  flags: "--revision <n>",
@@ -3336,28 +2963,21 @@ var SHELL_OVERRIDES = {
3336
2963
  {
3337
2964
  command: ["notes", "edit"],
3338
2965
  field: "examples",
3339
- before: null,
2966
+ before: "74234e98afe7498f",
3340
2967
  after: ['drive personal notes edit DOC_ID note:NOTE_ID "Numbers checked" --revision 2'],
3341
2968
  reason: NOTES_REASON
3342
2969
  },
3343
2970
  {
3344
2971
  command: ["notes", "remove"],
3345
2972
  field: "description",
3346
- before: "remove a note",
2973
+ before: "aa644f1603858b41",
3347
2974
  after: "delete one note",
3348
2975
  reason: NOTES_REASON
3349
2976
  },
3350
2977
  {
3351
2978
  command: ["notes", "remove"],
3352
2979
  field: "arguments",
3353
- before: [
3354
- {
3355
- name: "note",
3356
- required: true,
3357
- variadic: false,
3358
- description: "stored note reference"
3359
- }
3360
- ],
2980
+ before: "ae549d47fb4ad5ab",
3361
2981
  after: [
3362
2982
  {
3363
2983
  name: "document",
@@ -3365,19 +2985,14 @@ var SHELL_OVERRIDES = {
3365
2985
  variadic: false,
3366
2986
  description: "Google file or folder id or URL in the local catalog, or a document:<n> ref"
3367
2987
  },
3368
- {
3369
- name: "note",
3370
- required: true,
3371
- variadic: false,
3372
- description: "note:<id> reference, as notes list prints it"
3373
- }
2988
+ { name: "note", required: true, variadic: false, description: "note:<id> reference, as notes list prints it" }
3374
2989
  ],
3375
2990
  reason: NOTES_REASON
3376
2991
  },
3377
2992
  {
3378
2993
  command: ["notes", "remove"],
3379
2994
  field: "examples",
3380
- before: null,
2995
+ before: "74234e98afe7498f",
3381
2996
  after: ["drive personal notes remove DOC_ID note:NOTE_ID"],
3382
2997
  reason: NOTES_REASON
3383
2998
  }
@@ -3386,49 +3001,28 @@ var SHELL_OVERRIDES = {
3386
3001
  {
3387
3002
  command: ["commands"],
3388
3003
  field: "arguments",
3389
- before: [
3390
- {
3391
- name: "path",
3392
- required: false,
3393
- variadic: true,
3394
- description: "one command path, for example: commands info; inspect other groups in separate calls"
3395
- }
3396
- ],
3397
- after: [
3398
- {
3399
- name: "path",
3400
- required: false,
3401
- variadic: true,
3402
- description: "only this command or group, as words"
3403
- }
3404
- ],
3004
+ before: "2a309b1318d3ae57",
3005
+ after: [{ name: "path", required: false, variadic: true, description: "only this command or group, as words" }],
3405
3006
  reason: "Drive binds discovery to its profile-aware usage renderer while retaining the shared command document and evidence endpoint."
3406
3007
  },
3407
3008
  {
3408
3009
  command: ["commands"],
3409
3010
  field: "examples",
3410
- before: null,
3011
+ before: "74234e98afe7498f",
3411
3012
  after: ["drive commands", "drive commands files copy --json"],
3412
3013
  reason: "Drive binds discovery to its profile-aware usage renderer while retaining the shared command document and evidence endpoint."
3413
3014
  },
3414
3015
  {
3415
3016
  command: ["commands", "info"],
3416
3017
  field: "examples",
3417
- before: ["drive commands info commands"],
3018
+ before: "b5111d1de1d39c3d",
3418
3019
  after: ["drive commands info --json"],
3419
3020
  reason: "Drive binds discovery to its profile-aware usage renderer while retaining the shared command document and evidence endpoint."
3420
3021
  },
3421
3022
  {
3422
3023
  command: ["commands", "info"],
3423
3024
  field: "arguments",
3424
- before: [
3425
- {
3426
- name: "path",
3427
- required: false,
3428
- variadic: true,
3429
- description: "one command path; without one, export schemas, error reasons and explicit overrides"
3430
- }
3431
- ],
3025
+ before: "51e2a792c77a31bd",
3432
3026
  after: [
3433
3027
  {
3434
3028
  name: "path",
@@ -3444,21 +3038,21 @@ var SHELL_OVERRIDES = {
3444
3038
  {
3445
3039
  command: ["search"],
3446
3040
  field: "summary",
3447
- before: "search the local archive",
3041
+ before: "d8f6dac5b4fe912b",
3448
3042
  after: null,
3449
3043
  reason: SEARCH_REASON
3450
3044
  },
3451
3045
  {
3452
3046
  command: ["search"],
3453
3047
  field: "description",
3454
- before: "find things by text: one resource when you know it (messages, notes), or search all across messages and notes; for mail, the separate memo CLI: memo search mail",
3048
+ before: "600ae3fd56e9ef36",
3455
3049
  after: "search imported documents by words, and by meaning when indexed",
3456
3050
  reason: SEARCH_REASON
3457
3051
  },
3458
3052
  {
3459
3053
  command: ["search"],
3460
3054
  field: "arguments",
3461
- before: [],
3055
+ before: "4f53cda18c2baa0c",
3462
3056
  after: [
3463
3057
  {
3464
3058
  name: "query",
@@ -3472,7 +3066,7 @@ var SHELL_OVERRIDES = {
3472
3066
  {
3473
3067
  command: ["search"],
3474
3068
  field: "options",
3475
- before: [],
3069
+ before: "4f53cda18c2baa0c",
3476
3070
  after: [
3477
3071
  {
3478
3072
  flags: "--limit <n>",
@@ -3481,13 +3075,7 @@ var SHELL_OVERRIDES = {
3481
3075
  mandatory: false,
3482
3076
  default: 20
3483
3077
  },
3484
- {
3485
- flags: "--page <n>",
3486
- description: "which page to return",
3487
- takes_value: true,
3488
- mandatory: false,
3489
- default: 1
3490
- },
3078
+ { flags: "--page <n>", description: "which page to return", takes_value: true, mandatory: false, default: 1 },
3491
3079
  {
3492
3080
  flags: "--exact",
3493
3081
  description: "match the words exactly: no word forms, no meaning",
@@ -3500,24 +3088,21 @@ var SHELL_OVERRIDES = {
3500
3088
  {
3501
3089
  command: ["search"],
3502
3090
  field: "children",
3503
- before: ["all", "messages", "notes", "conversations", "runs"],
3091
+ before: "595cc576273270f2",
3504
3092
  after: [],
3505
3093
  reason: SEARCH_REASON
3506
3094
  },
3507
3095
  {
3508
3096
  command: ["search"],
3509
3097
  field: "effects",
3510
- before: null,
3511
- after: {
3512
- remote: "none",
3513
- local: "read"
3514
- },
3098
+ before: "74234e98afe7498f",
3099
+ after: { remote: "none", local: "read" },
3515
3100
  reason: SEARCH_REASON
3516
3101
  },
3517
3102
  {
3518
3103
  command: ["search"],
3519
3104
  field: "examples",
3520
- before: null,
3105
+ before: "74234e98afe7498f",
3521
3106
  after: ["drive personal search budget", 'drive personal search "quarterly plan" --exact --limit 5'],
3522
3107
  reason: SEARCH_REASON
3523
3108
  }
@@ -3525,19 +3110,6 @@ var SHELL_OVERRIDES = {
3525
3110
  };
3526
3111
 
3527
3112
  // dist/commands/discovery.js
3528
- var installCompleteCommand = /* @__PURE__ */ __name((program, { streams }) => {
3529
- examples(annotate(program.command("complete"), { mcp: false, effects: NO_EFFECTS }).description("print a shell completion script, or complete words"), ["drive complete zsh"]).argument("[words...]", "a shell name, or after -- the words typed so far").allowUnknownOption().helpOption(false).action(async function(words) {
3530
- if (!program.rawArgs.includes("--")) {
3531
- if (words[0] === "--help" || words[0] === "-h")
3532
- return streams.data(this.helpInformation());
3533
- if (!["bash", "zsh", "fish", "powershell"].includes(words[0] ?? ""))
3534
- throw new CliError("validation_error", "choose a supported shell");
3535
- const { script } = await import("./dist-PY3MVR3G.js");
3536
- script(words[0], "drive", "drive");
3537
- } else
3538
- streams.data(formatSuggestions(suggest({ commands: describeDriveProgram(program), globalOptions: describeOptions(program), words })));
3539
- });
3540
- }, "installCompleteCommand");
3541
3113
  var installCommandsCommandDefinition = /* @__PURE__ */ __name((program, { print, streams }) => {
3542
3114
  examples(annotate(program.command("commands"), { effects: NO_EFFECTS }).description(DISCOVERY_DESCRIPTIONS.commands), ["drive commands", "drive commands files copy --json"]).argument("[path...]", "only this command or group, as words").action((path) => {
3543
3115
  const document = commandsDocument(program, path);
@@ -3558,14 +3130,15 @@ var installCommandsCommandDefinition = /* @__PURE__ */ __name((program, { print,
3558
3130
  }, "installCommandsCommandDefinition");
3559
3131
  var installCommandsCommand = /* @__PURE__ */ __name((...args) => {
3560
3132
  const [program, context] = args;
3561
- customizeSharedCommand(sharedCommandTemplate(DRIVE_APP, "commands"), "Drive binds discovery to its profile-aware usage renderer while retaining the shared command document and evidence endpoint.", () => {
3133
+ const reference = sharedCommandTemplate(DRIVE_APP, "commands");
3134
+ customizeSharedCommand(reference, "Drive binds discovery to its profile-aware usage renderer while retaining the shared command document and evidence endpoint.", () => {
3562
3135
  installCommandsCommandDefinition(...args);
3563
3136
  addContractInfo(program, (value) => context.streams.data(JSON.stringify(value)));
3564
3137
  const command = program.commands.find((command2) => command2.name() === "commands");
3565
3138
  if (!command)
3566
3139
  throw new Error("discovery builder did not install its command");
3567
3140
  return command;
3568
- }, SHELL_OVERRIDES.commands);
3141
+ }, reviewedOverrides(reference, SHELL_OVERRIDES.commands));
3569
3142
  }, "installCommandsCommand");
3570
3143
 
3571
3144
  // dist/commands/documents.js
@@ -3763,10 +3336,10 @@ var installDocumentCommands = /* @__PURE__ */ __name((program, context) => {
3763
3336
  const age = ageOf(state);
3764
3337
  output(listOf("documents list", {
3765
3338
  ...staleCopy(state),
3766
- items: found.items.map((note2) => {
3767
- const id = (note2.path ?? "").replace(/\.md$/, "");
3339
+ items: found.items.map((note) => {
3340
+ const id = (note.path ?? "").replace(/\.md$/, "");
3768
3341
  const doc = state.documents[id];
3769
- return doc ? { ...metadataJson(doc.metadata), reference: doc.reference, tabs: doc.tabs, ...age } : { id, name: note2.title, reference: note2.ref, tabs: 0, ...age };
3342
+ return doc ? { ...metadataJson(doc.metadata), reference: doc.reference, tabs: doc.tabs, ...age } : { id, name: note.title, reference: note.ref, tabs: 0, ...age };
3770
3343
  }),
3771
3344
  limit,
3772
3345
  has_more: found.hasMore,
@@ -3847,7 +3420,7 @@ Each item, one level of the tree (--json prints them under "items"):
3847
3420
  child_folders folders directly inside it, or null when not counted (Shared with me, a level of over 1000 folders)
3848
3421
  added whether sync already imports this folder (folders add)
3849
3422
  Folders are listed by name. Only folders are listed; files inside them are not.
3850
- Failures carry error.reason: oauth.missing (not signed in), oauth.expired (sign in again),
3423
+ Failures carry error.reason: session.missing (not signed in), oauth.expired (sign in again),
3851
3424
  provider.rate-limited (retry later), not_found code (no such folder).`;
3852
3425
  var PAGE_BOUND = 1e3;
3853
3426
  var COUNTED_LEVEL = 1e3;
@@ -4170,7 +3743,7 @@ var installKnowledgeCommandsDefinition = /* @__PURE__ */ __name((program, helper
4170
3743
  ...terms.has("status") ? { status: terms.get("status") } : {},
4171
3744
  ...terms.has("scope") ? { scope: terms.get("scope") } : {}
4172
3745
  };
4173
- output(allOf((await run3(doc, (k, p, ref) => k.memories(p, ref, { ...filters, limit }))).map(memoryItem)));
3746
+ output(allOf((await run3(doc, (k, p, ref) => k.memories(p, ref, { ...filters, limit }))).items.map(memoryItem)));
4174
3747
  });
4175
3748
  const memoryActions = {
4176
3749
  show: "show one memory",
@@ -4187,7 +3760,7 @@ var installKnowledgeCommandsDefinition = /* @__PURE__ */ __name((program, helper
4187
3760
  const found = await run3(doc, (k, p, ref) => k.searchMemories(p, ref, text, scope2));
4188
3761
  output({
4189
3762
  ...allOf(found.items.map(memoryItem)),
4190
- ...found.limit_reached ? { meta: { truncated: true } } : {}
3763
+ ...found.hasMore ? { meta: { truncated: true } } : {}
4191
3764
  });
4192
3765
  });
4193
3766
  annotate(search, { query: defineQuery(MEMORY_SEARCH_QUERY), output: { entity: "memory" } });
@@ -4227,7 +3800,7 @@ var installKnowledgeCommandsDefinition = /* @__PURE__ */ __name((program, helper
4227
3800
  ...terms.has("kind") ? { type: terms.get("kind") } : {},
4228
3801
  ...terms.has("status") ? { status: terms.get("status") } : {}
4229
3802
  };
4230
- output(allOf((await run3(doc, (k, p, ref) => k.facts(p, ref, { ...filters, limit }))).map(factItem)));
3803
+ output(allOf((await run3(doc, (k, p, ref) => k.facts(p, ref, { ...filters, limit }))).items.map(factItem)));
4231
3804
  });
4232
3805
  const factActions = {
4233
3806
  show: "show one fact",
@@ -4244,13 +3817,14 @@ var installKnowledgeCommandsDefinition = /* @__PURE__ */ __name((program, helper
4244
3817
  examples(annotate(identities.command("link"), { effects: LOCAL_WRITE }).description("record that a Google account belongs to a known person"), ["drive personal identities link DOC_ID GOOGLE_ID person:PERSON_UID"]).argument("<document>", documentArgument).argument("<google-id>", "Google account id, as identities list prints it").argument("<person>", "person:<uid> reference of someone already known").action(async (doc, googleId, personRef) => output(itemOf(await run3(doc, (k, p, ref) => k.linkPerson(p, ref, googleId, personRef)))));
4245
3818
  }, "installKnowledgeCommandsDefinition");
4246
3819
  var installKnowledgeCommands = /* @__PURE__ */ __name((...args) => {
4247
- customizeSharedCommand(sharedCommandTemplate(DRIVE_APP, "notes"), "Drive notes annotate one explicitly selected imported document; document-bound arguments and receipts replace the generic note scope.", () => {
3820
+ const reference = sharedCommandTemplate(DRIVE_APP, "notes");
3821
+ customizeSharedCommand(reference, "Drive notes annotate one explicitly selected imported document; document-bound arguments and receipts replace the generic note scope.", () => {
4248
3822
  installKnowledgeCommandsDefinition(...args);
4249
3823
  const command = args[0].commands.find((command2) => command2.name() === "notes");
4250
3824
  if (!command)
4251
3825
  throw new Error("notes builder did not install its command");
4252
3826
  return command;
4253
- }, SHELL_OVERRIDES.notes);
3827
+ }, reviewedOverrides(reference, SHELL_OVERRIDES.notes));
4254
3828
  }, "installKnowledgeCommands");
4255
3829
 
4256
3830
  // dist/commands/mirrors.js
@@ -4261,7 +3835,7 @@ import { join as join5, resolve } from "node:path";
4261
3835
  import { readFileSync as readFileSync3 } from "node:fs";
4262
3836
 
4263
3837
  // dist/mirror-sheets.js
4264
- import { createHash } from "node:crypto";
3838
+ import { createHash as createHash2 } from "node:crypto";
4265
3839
  import { readFileSync as readFileSync2 } from "node:fs";
4266
3840
  var lastChange = /* @__PURE__ */ __name(async (call, id) => {
4267
3841
  try {
@@ -4369,7 +3943,7 @@ var trimmed = /* @__PURE__ */ __name((rows) => {
4369
3943
  out.pop();
4370
3944
  return out;
4371
3945
  }, "trimmed");
4372
- var hashRows = /* @__PURE__ */ __name((rows) => createHash("sha256").update(JSON.stringify(trimmed(rows))).digest("hex"), "hashRows");
3946
+ var hashRows = /* @__PURE__ */ __name((rows) => createHash2("sha256").update(JSON.stringify(trimmed(rows))).digest("hex"), "hashRows");
4373
3947
  var size = /* @__PURE__ */ __name((rows) => ({ rows: rows.length, columns: Math.max(0, ...rows.map((row) => row.length)) }), "size");
4374
3948
  var quoted = /* @__PURE__ */ __name((title2) => `'${title2.replace(/'/g, "''")}'`, "quoted");
4375
3949
  var range = /* @__PURE__ */ __name((title2, rows, columns) => `${quoted(title2)}!A1:${columnName(Math.max(columns, 1))}${Math.max(rows, 1)}`, "range");
@@ -22841,22 +22415,25 @@ var installSearchCommandDefinition = /* @__PURE__ */ __name((program, { env, sel
22841
22415
  exact: args.exact ?? false,
22842
22416
  ...pictureSearch(env, name) ? { pictures: true } : {}
22843
22417
  }));
22844
- const hint = notImported(name, profile.roots.length, Object.keys(readState(env, name, profile.principal).documents));
22418
+ const hint = notImported(name, profile.roots.length > 0 || transcriptsOf(env, name).mode === "include", Object.keys(readState(env, name, profile.principal).documents));
22845
22419
  output(itemOf(hint ? { ...result, not_imported: hint } : result));
22846
22420
  });
22847
22421
  }, "installSearchCommandDefinition");
22848
- var notImported = /* @__PURE__ */ __name((name, folders, documents) => {
22422
+ var notImported = /* @__PURE__ */ __name((name, chosen, documents) => {
22849
22423
  if (documents.length > 0)
22850
22424
  return void 0;
22851
- return folders === 0 ? `profile ${name} has no folders selected, so nothing is imported to search \u2014 drive ${name} folders add FOLDER_ID, then drive ${name} sync` : `profile ${name} has imported no documents yet \u2014 drive ${name} sync`;
22425
+ return !chosen ? `profile ${name} has no folders selected, so nothing is imported to search \u2014 drive ${name} folders add FOLDER_ID, then drive ${name} sync` : `profile ${name} has imported no documents yet \u2014 drive ${name} sync`;
22852
22426
  }, "notImported");
22853
- var installSearchCommand = /* @__PURE__ */ __name((...args) => customizeSharedCommand(sharedCommandTemplate(DRIVE_APP, "search"), "Drive searches imported documents and embeddings rather than live messenger messages; its default action and pagination are explicitly provider-specific.", () => {
22854
- installSearchCommandDefinition(...args);
22855
- const command = args[0].commands.find((command2) => command2.name() === "search");
22856
- if (!command)
22857
- throw new Error("search builder did not install its command");
22858
- return command;
22859
- }, SHELL_OVERRIDES.search), "installSearchCommand");
22427
+ var installSearchCommand = /* @__PURE__ */ __name((...args) => {
22428
+ const reference = sharedCommandTemplate(DRIVE_APP, "search");
22429
+ return customizeSharedCommand(reference, "Drive searches imported documents and embeddings rather than live messenger messages; its default action and pagination are explicitly provider-specific.", () => {
22430
+ installSearchCommandDefinition(...args);
22431
+ const command = args[0].commands.find((command2) => command2.name() === "search");
22432
+ if (!command)
22433
+ throw new Error("search builder did not install its command");
22434
+ return command;
22435
+ }, reviewedOverrides(reference, SHELL_OVERRIDES.search));
22436
+ }, "installSearchCommand");
22860
22437
 
22861
22438
  // dist/commands/session.js
22862
22439
  var GRANTS = ["write", "activity", "apps"];
@@ -22887,7 +22464,7 @@ var installSessionCommands = /* @__PURE__ */ __name((program, context) => {
22887
22464
  const app = application(env, { file: args.clientFile, clientId: args.clientId, profile: selected() });
22888
22465
  if (!app.clientSecret)
22889
22466
  streams.diagnostic("your Google app has no secret here, and Google refuses a Desktop app without one: set DRIVE_GOOGLE_CLIENT_SECRET\n");
22890
- const { login } = await import("./login-XKN3NI6X.js");
22467
+ const { login } = await import("./login-RZOQN63N.js");
22891
22468
  output(itemOf(await login({
22892
22469
  env,
22893
22470
  profile: selected(),
@@ -22918,7 +22495,7 @@ var installSessionCommands = /* @__PURE__ */ __name((program, context) => {
22918
22495
  const name = selected();
22919
22496
  const config = readConfig(env);
22920
22497
  const profile = activeProfile(env, name);
22921
- const { credentials } = await import("./tokens-MTFJPTYT.js");
22498
+ const { credentials } = await import("./tokens-VQDGSHRB.js");
22922
22499
  const store = credentials(env, profile.storage, options.keyring);
22923
22500
  store.remove(name);
22924
22501
  writeConfig(env, config);
@@ -22965,7 +22542,7 @@ var selection = /* @__PURE__ */ __name((env, name, source) => {
22965
22542
  return { profile, state, options: { source, destination, collection: `google-drive:${profile.principal}`, env } };
22966
22543
  }, "selection");
22967
22544
  var checkStoreImport = /* @__PURE__ */ __name(async (env, name, source, bindings) => {
22968
- const { ensureSqlite } = await import("./sqlite-runtime-UAFJKSJR.js");
22545
+ const { ensureSqlite } = await import("./sqlite-runtime-ILF6EFQJ.js");
22969
22546
  await ensureSqlite();
22970
22547
  const { state, options } = selection(env, name, source);
22971
22548
  const preview = await previewDocumentTransfer({ ...options, bindings });
@@ -22978,14 +22555,14 @@ var checkStoreImport = /* @__PURE__ */ __name(async (env, name, source, bindings
22978
22555
  throw new CliError("configuration_error", "this profile already uses the selected store; only an existing transfer can be retried");
22979
22556
  return preview;
22980
22557
  }, "checkStoreImport");
22981
- var importStore = /* @__PURE__ */ __name(async (env, name, source, fingerprint, bindings) => {
22558
+ var importStore = /* @__PURE__ */ __name(async (env, name, source, fingerprint2, bindings) => {
22982
22559
  await checkStoreImport(env, name, source, bindings);
22983
22560
  const lock = await lockProfile(env, name);
22984
22561
  try {
22985
22562
  const { profile, state, options } = selection(env, name, source);
22986
22563
  lock.assertHeld();
22987
22564
  await checkStoreImport(env, name, source, bindings);
22988
- const receipt = await applyDocumentTransfer({ ...options, bindings, expected_fingerprint: fingerprint });
22565
+ const receipt = await applyDocumentTransfer({ ...options, bindings, expected_fingerprint: fingerprint2 });
22989
22566
  for (const [id, document] of Object.entries(state.documents)) {
22990
22567
  const reference = receipt.documents[`${id}.md`];
22991
22568
  if (!reference)
@@ -23042,7 +22619,10 @@ var sync = /* @__PURE__ */ __name(async (source, index, env, name, max, signal,
23042
22619
  await index.registerProfile?.(name, profile.principal);
23043
22620
  const before = readState(env, name, profile.principal);
23044
22621
  const started = (/* @__PURE__ */ new Date()).toISOString();
22622
+ const transcripts = transcriptsOf(env, name);
22623
+ const query = transcriptQuery(transcripts.mode, transcripts.words, source?.search);
23045
22624
  const result = await syncDocuments({
22625
+ ...query ? { query } : {},
23046
22626
  source,
23047
22627
  index,
23048
22628
  principal: profile.principal,
@@ -23095,7 +22675,8 @@ var sync = /* @__PURE__ */ __name(async (source, index, env, name, max, signal,
23095
22675
  var installSyncCommands = /* @__PURE__ */ __name((program, context) => {
23096
22676
  const { env, streams, selected, output, source, withIndex } = context;
23097
22677
  examples(annotate(program.command("sync"), { effects: FETCH }).summary("import what changed in the chosen folders, and finish an unfinished sync").description(`import what changed in the chosen folders, and finish an unfinished sync; one sync reads at most ${MAX_ENTRIES} entries under the chosen folders, and as many changes`), ["drive personal sync", "drive personal sync --rescan --limit 500"]).option("--limit <n>", "how many documents to read from Google in this run", positive, 200).option("--rescan", "read every chosen folder again instead of only what changed").option("--embed", "also index pending text for meaning search, with a model already downloaded").action(async (args) => {
23098
- const remote = activeProfile(env, selected()).roots.length ? await source() : void 0;
22678
+ const profile = activeProfile(env, selected());
22679
+ const remote = profile.roots.length || profile.transcripts === "include" ? await source() : void 0;
23099
22680
  const result = await withIndex(async (index) => ({
23100
22681
  ...await sync(remote, index, env, selected(), args.limit, context.signal(), args.rescan),
23101
22682
  ...args.embed ? { embeddings: await index.embed(600) } : {}
@@ -23136,12 +22717,44 @@ var installSyncCommands = /* @__PURE__ */ __name((program, context) => {
23136
22717
  });
23137
22718
  }, "installSyncCommands");
23138
22719
 
22720
+ // dist/commands/transcripts.js
22721
+ var TRANSCRIPTS_HELP = `
22722
+ Each item, a Google Doc whose name holds one of the transcript words (--json prints them under "items"):
22723
+ id the Google file id
22724
+ name the document's name as Google shows it
22725
+ url where it opens in Google Docs
22726
+ owned_by_me false for a document in the meeting organizer's Drive, shared with this account
22727
+ modified_at when it last changed
22728
+ Whether sync takes them is the profile's transcripts setting: include imports them wherever they sit, skip (or unset)
22729
+ leaves them alone, exclude leaves them out even inside a chosen folder (drive <profile> config set transcripts
22730
+ '"include"'). transcript_words replaces the words that find them.`;
22731
+ var installTranscriptCommands = /* @__PURE__ */ __name((program, context) => {
22732
+ const { env, selected, output, source } = context;
22733
+ const transcripts = annotate(program.command("transcripts"), { effects: LOCAL_READ }).description("meet transcripts and Gemini notes in this account's Drive or shared with it");
22734
+ bindQuery(examples(annotate(transcripts.command("list"), { effects: GOOGLE_READ }).summary("list Google Docs named like Meet transcripts or Gemini notes").description("list the Google Docs named like Meet transcripts or Gemini notes, wherever they sit; imports nothing"), ["drive personal transcripts list --json", "drive personal transcripts list owned_by_me:false"]), TRANSCRIPTS_QUERY, transcriptRow).addHelpText("after", TRANSCRIPTS_HELP).action(async (words) => {
22735
+ const filter = termsOf(words, TRANSCRIPTS_QUERY, "transcripts list");
22736
+ if (filter.owned_by_me !== void 0 && !["true", "false"].includes(filter.owned_by_me))
22737
+ throw new CliError("validation_error", "owned_by_me takes true or false");
22738
+ const remote = await source();
22739
+ const found = await findTranscripts(remote.search, transcriptsOf(env, selected()).words);
22740
+ const rows = found.map((file) => ({
22741
+ id: file.id,
22742
+ name: file.name,
22743
+ url: file.url,
22744
+ owned_by_me: file.providerMetadata?.ownedByMe ?? null,
22745
+ modified_at: file.modifiedAt ?? null
22746
+ }));
22747
+ output(allOf(rows.filter((row) => filter.owned_by_me === void 0 || String(row.owned_by_me) === filter.owned_by_me)));
22748
+ });
22749
+ }, "installTranscriptCommands");
22750
+
23139
22751
  // dist/commands/upgrade.js
23140
22752
  import { join as join8 } from "node:path";
23141
22753
 
23142
- // node_modules/.pnpm/@wirecat+cli-core@0.634.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_795ed7a67bda78d624888739490b3720/node_modules/@wirecat/cli-core/dist/update/index.js
22754
+ // 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/update/index.js
23143
22755
  import { realpathSync } from "node:fs";
23144
22756
  import { fileURLToPath } from "node:url";
22757
+ var npmRegistry = /* @__PURE__ */ __name(() => hostFetch({ hosts: ["registry.npmjs.org"] }), "npmRegistry");
23145
22758
  var QUIET_WORDS = [
23146
22759
  "--help",
23147
22760
  "-h",
@@ -23165,7 +22778,7 @@ var appUpdate = /* @__PURE__ */ __name((app) => {
23165
22778
  }, "enabled");
23166
22779
  return {
23167
22780
  installer,
23168
- latest: /* @__PURE__ */ __name((environment = {}) => latestVersion(app.packageName, environment.fetch ?? fetch, { timeoutMs: 3e3 }), "latest"),
22781
+ latest: /* @__PURE__ */ __name((environment = {}) => latestVersion(app.packageName, environment.fetch ?? npmRegistry(), { timeoutMs: 3e3 }), "latest"),
23169
22782
  /** The package manager's output goes to stderr, so stdout stays one result. */
23170
22783
  runUpdate: /* @__PURE__ */ __name((argv, environment = {}) => environment.spawn ? environment.spawn(argv) : runUpdate(argv), "runUpdate"),
23171
22784
  /**
@@ -23186,7 +22799,7 @@ var appUpdate = /* @__PURE__ */ __name((app) => {
23186
22799
  command: app.command,
23187
22800
  version: app.version,
23188
22801
  statePath: app.statePath(env),
23189
- fetch: environment.fetch ?? fetch,
22802
+ fetch: environment.fetch ?? npmRegistry(),
23190
22803
  ...environment.now ? { now: environment.now } : {},
23191
22804
  format: pretty ? "pretty" : "json",
23192
22805
  stderrIsTTY: environment.stderrIsTTY ?? process.stderr.isTTY === true,
@@ -23350,20 +22963,20 @@ var documentKnowledge2 = /* @__PURE__ */ __name((store, folder) => {
23350
22963
  const port = {
23351
22964
  ...shared,
23352
22965
  context: /* @__PURE__ */ __name(async (principal, ref) => {
23353
- const note2 = await document(principal, ref);
22966
+ const note = await document(principal, ref);
23354
22967
  return {
23355
- document: note2,
22968
+ document: note,
23356
22969
  tags: await store.notes.noteTags(ref),
23357
22970
  links: await store.notes.links({ from: ref }),
23358
22971
  notes: await store.notes.notes({ source: "internal", about: ref, limit: 100 }),
23359
- memories: (await store.memories.list({ subject: ref, limit: 100 })).map(memoryItem),
23360
- facts: (await store.facts.list({ subject: ref, limit: 100 })).map(factItem),
22972
+ memories: (await store.memories.list({ subject: ref, limit: 100 })).items.map(memoryItem),
22973
+ facts: (await store.facts.list({ subject: ref, limit: 100 })).items.map(factItem),
23361
22974
  people: await port.people(principal, ref)
23362
22975
  };
23363
22976
  }, "context"),
23364
22977
  people: /* @__PURE__ */ __name(async (principal, ref, filter = {}) => {
23365
- const note2 = await document(principal, ref);
23366
- const metadata = note2.frontMatter;
22978
+ const note = await document(principal, ref);
22979
+ const metadata = note.frontMatter;
23367
22980
  const contributors = [
23368
22981
  ...(metadata.owners ?? []).map((user) => ({ ...user, role: "owner" })),
23369
22982
  ...metadata.lastModifiedBy ? [{ ...metadata.lastModifiedBy, role: "last-editor" }] : []
@@ -23382,8 +22995,8 @@ var documentKnowledge2 = /* @__PURE__ */ __name((store, folder) => {
23382
22995
  };
23383
22996
  }, "people"),
23384
22997
  linkPerson: /* @__PURE__ */ __name(async (principal, ref, googleId, personRef) => {
23385
- const note2 = await document(principal, ref);
23386
- const metadata = note2.frontMatter;
22998
+ const note = await document(principal, ref);
22999
+ const metadata = note.frontMatter;
23387
23000
  const users = [...metadata.owners ?? [], ...metadata.lastModifiedBy ? [metadata.lastModifiedBy] : []];
23388
23001
  if (!users.some((user) => googleUserId(user) === googleId))
23389
23002
  throw new CliError("not_found", "Google identity was not observed on this document");
@@ -23481,13 +23094,13 @@ var prepareStore = /* @__PURE__ */ __name(async (index, env, name, rescan = fals
23481
23094
  if (folder) {
23482
23095
  for (let offset2 = 0; ; offset2 += 500) {
23483
23096
  const page = await old.notes.notes({ folderId: folder.id, source: "file", limit: 500, offset: offset2 });
23484
- for (const note2 of page.items) {
23485
- counts.tags += (await old.notes.noteTags(note2.ref)).length;
23486
- counts.notes += (await old.notes.notes({ source: "internal", about: note2.ref, limit: 1 })).items.length;
23487
- counts.memories += (await old.memories.list({ subject: note2.ref, limit: 1 })).length;
23488
- counts.facts += (await old.facts.list({ subject: note2.ref, limit: 1 })).length;
23489
- counts.links += (await old.notes.links({ from: note2.ref })).filter((link) => link.origin !== "file").length;
23490
- counts.links += (await old.notes.links({ to: note2.ref })).length;
23097
+ for (const note of page.items) {
23098
+ counts.tags += (await old.notes.noteTags(note.ref)).length;
23099
+ counts.notes += (await old.notes.notes({ source: "internal", about: note.ref, limit: 1 })).items.length;
23100
+ counts.memories += (await old.memories.list({ subject: note.ref, limit: 1 })).items.length;
23101
+ counts.facts += (await old.facts.list({ subject: note.ref, limit: 1 })).items.length;
23102
+ counts.links += (await old.notes.links({ from: note.ref })).filter((link) => link.origin !== "file").length;
23103
+ counts.links += (await old.notes.links({ to: note.ref })).length;
23491
23104
  }
23492
23105
  if (!page.hasMore)
23493
23106
  break;
@@ -23563,15 +23176,12 @@ var syncedDocument = /* @__PURE__ */ __name(async (store, driveFileId) => {
23563
23176
  var openIndex = /* @__PURE__ */ __name(async (env, name, rescan = false) => {
23564
23177
  if (name)
23565
23178
  activeProfile(env, name);
23566
- const { ensureSqlite } = await import("./sqlite-runtime-UAFJKSJR.js");
23567
- await ensureSqlite();
23568
- const { openStore: openStore2, storePath: storePath2 } = await import("./store-EJN27MXI.js");
23569
23179
  if (env.DRIVE_STORE)
23570
23180
  throw new CliError("configuration_error", "DRIVE_STORE has been retired; use MESSAGING_STORE to select the shared database", { reason: "store.override-retired" });
23571
- const store = await openStore2({ path: storePath2(env), env, command: "drive", version: VERSION });
23181
+ const { openAppStore } = await import("./cli-U4LSBYDV.js");
23182
+ const store = await openAppStore(env, { app: { command: "drive", version: VERSION }, provider: DRIVE_PROVIDER });
23572
23183
  const index = indexOver(store, env);
23573
23184
  try {
23574
- await store.accounts.registerProvider(DRIVE_PROVIDER);
23575
23185
  if (name)
23576
23186
  await prepareStore(index, env, name, rescan);
23577
23187
  return index;
@@ -23619,7 +23229,7 @@ var indexOver = /* @__PURE__ */ __name((store, env, pictureEmbedder) => {
23619
23229
  linkMessages: /* @__PURE__ */ __name((documents, since) => store.notes.linkMessages({ documents, ...since ? { since } : {} }), "linkMessages"),
23620
23230
  knowledge: documentKnowledge2(store, async (principal) => (await folder(principal, false))?.id),
23621
23231
  openPictures: /* @__PURE__ */ __name(async () => {
23622
- const { openPictureEmbedderFor, savePicture } = await import("./services-TYDMFQCA.js");
23232
+ const { openPictureEmbedderFor, savePicture } = await import("./services-5KARVUHK.js");
23623
23233
  const embedder = pictureEmbedder ?? await openPictureEmbedderFor({ env, command: "drive" });
23624
23234
  return {
23625
23235
  save: /* @__PURE__ */ __name((reference, bytes) => savePicture(store, { ref: reference }, bytes, { embedder }), "save"),
@@ -23638,7 +23248,7 @@ var indexOver = /* @__PURE__ */ __name((store, env, pictureEmbedder) => {
23638
23248
  has_more: false,
23639
23249
  meaning_skipped: "this Google account has no imported sources"
23640
23250
  };
23641
- const { searchNotes } = await import("./services-TYDMFQCA.js");
23251
+ const { searchNotes } = await import("./services-5KARVUHK.js");
23642
23252
  const result = await searchNotes(store, query, {
23643
23253
  ...options,
23644
23254
  folderIds: selected ? [selected.id] : [],
@@ -23647,18 +23257,20 @@ var indexOver = /* @__PURE__ */ __name((store, env, pictureEmbedder) => {
23647
23257
  ...pictureEmbedder ? { pictureEmbedder } : {}
23648
23258
  });
23649
23259
  const pictures = await Promise.all((result.pictures ?? []).map(async (picture) => {
23650
- const note2 = await store.notes.note(picture.ref);
23260
+ const note = await store.notes.note(picture.ref);
23651
23261
  const [file] = await store.files.ofDocument(picture.ref);
23652
- return { ...picture, title: note2.title, url: file?.url ?? null };
23262
+ return { ...picture, title: note.title, url: file?.url ?? null };
23653
23263
  }));
23654
- const { pictures: _, ...rest } = result;
23264
+ const { pictures: _, items, hasMore, nextOffset, ...rest } = result;
23655
23265
  return {
23656
23266
  ...rest,
23267
+ has_more: hasMore,
23268
+ ...nextOffset === void 0 ? {} : { next_offset: nextOffset },
23657
23269
  ...result.pictures ? { pictures } : {},
23658
- hits: await Promise.all(result.hits.map(async (hit) => {
23659
- const note2 = await store.notes.note(hit.ref);
23660
- const metadata = note2.frontMatter;
23661
- const entry = note2.path ? await store.catalog.get(selected.id, note2.path) : void 0;
23270
+ hits: await Promise.all(items.map(async (hit) => {
23271
+ const note = await store.notes.note(hit.ref);
23272
+ const metadata = note.frontMatter;
23273
+ const entry = note.path ? await store.catalog.get(selected.id, note.path) : void 0;
23662
23274
  return {
23663
23275
  ...hit,
23664
23276
  tabs: Array.isArray(metadata?.tabs) ? metadata.tabs : [],
@@ -23669,7 +23281,7 @@ var indexOver = /* @__PURE__ */ __name((store, env, pictureEmbedder) => {
23669
23281
  };
23670
23282
  }, "search"),
23671
23283
  embed: /* @__PURE__ */ __name(async (max) => {
23672
- const { embedNotes } = await import("./services-TYDMFQCA.js");
23284
+ const { embedNotes } = await import("./services-5KARVUHK.js");
23673
23285
  return embedNotes(store, { maxChunks: max, env, command: "drive" });
23674
23286
  }, "embed"),
23675
23287
  close: /* @__PURE__ */ __name(() => store.close(), "close")
@@ -23677,7 +23289,7 @@ var indexOver = /* @__PURE__ */ __name((store, env, pictureEmbedder) => {
23677
23289
  }, "indexOver");
23678
23290
 
23679
23291
  // dist/upload.js
23680
- import { createHash as createHash2 } from "node:crypto";
23292
+ import { createHash as createHash3 } from "node:crypto";
23681
23293
  import { createReadStream, mkdirSync as mkdirSync3, readFileSync as readFileSync5, rmSync as rmSync2, statSync as statSync3, writeFileSync as writeFileSync3 } from "node:fs";
23682
23294
  import { open } from "node:fs/promises";
23683
23295
  import { basename, join as join10, resolve as resolve6 } from "node:path";
@@ -23686,7 +23298,7 @@ var FIELDS = "id,name,size,md5Checksum,mimeType,parents";
23686
23298
  var QUANTUM = 256 * 1024;
23687
23299
  var CHUNK_BYTES = 32 * QUANTUM;
23688
23300
  var md5Of = /* @__PURE__ */ __name((path) => new Promise((done2, fail) => {
23689
- const hash = createHash2("md5");
23301
+ const hash = createHash3("md5");
23690
23302
  createReadStream(path).on("data", (chunk) => hash.update(chunk)).on("error", fail).on("end", () => done2(hash.digest("hex")));
23691
23303
  }), "md5Of");
23692
23304
  var nextByte = /* @__PURE__ */ __name((response) => {
@@ -23710,7 +23322,7 @@ var uploadFile = /* @__PURE__ */ __name(async (input) => {
23710
23322
  if (chunk % QUANTUM !== 0)
23711
23323
  throw new CliError("validation_error", "a chunk must be a multiple of 256 KiB");
23712
23324
  const sleep = input.sleep ?? ((ms) => new Promise((wake) => setTimeout(wake, ms)));
23713
- const key = createHash2("sha256").update(JSON.stringify([path, size2, stat.mtimeMs, name, input.parent ?? ""])).digest("hex").slice(0, 24);
23325
+ const key = createHash3("sha256").update(JSON.stringify([path, size2, stat.mtimeMs, name, input.parent ?? ""])).digest("hex").slice(0, 24);
23714
23326
  const checkpointPath = join10(input.stateDir, "uploads", `${key}.json`);
23715
23327
  const readCheckpoint = /* @__PURE__ */ __name(() => {
23716
23328
  try {
@@ -23923,7 +23535,8 @@ var installDrive = /* @__PURE__ */ __name((program) => {
23923
23535
  permissionKeys: knownKeys
23924
23536
  };
23925
23537
  }, "policyFlags");
23926
- const runId = randomUUID2();
23538
+ const fallbackRunId = randomUUID2();
23539
+ const runId = /* @__PURE__ */ __name(() => runs.runId() ?? fallbackRunId, "runId");
23927
23540
  const shown = /* @__PURE__ */ __name(() => outputFor(currentAction ?? program), "shown");
23928
23541
  const print = /* @__PURE__ */ __name((render) => {
23929
23542
  const { renderer, format, streams: out } = shown();
@@ -23934,7 +23547,7 @@ var installDrive = /* @__PURE__ */ __name((program) => {
23934
23547
  const whole = {
23935
23548
  ...snaked,
23936
23549
  meta: {
23937
- run_id: runId,
23550
+ run_id: runId(),
23938
23551
  duration_ms: Math.max(0, Math.round(Date.now() - startedAt)),
23939
23552
  complete: true,
23940
23553
  ...body.meta
@@ -23955,7 +23568,7 @@ var installDrive = /* @__PURE__ */ __name((program) => {
23955
23568
  }, "output");
23956
23569
  const signal = /* @__PURE__ */ __name(() => environment().signal, "signal");
23957
23570
  const signedIn = /* @__PURE__ */ __name(async (name, scope2) => {
23958
- const { authorizedClient, checkAuthorization } = await import("./tokens-MTFJPTYT.js");
23571
+ const { authorizedClient, checkAuthorization } = await import("./tokens-VQDGSHRB.js");
23959
23572
  const client = authorizedClient(env, name, environment().keyring, signal());
23960
23573
  await checkAuthorization(client, scope2);
23961
23574
  return client;
@@ -23965,7 +23578,7 @@ var installDrive = /* @__PURE__ */ __name((program) => {
23965
23578
  const fake = environment().source;
23966
23579
  if (fake)
23967
23580
  return fake(name);
23968
- const [{ googleSource }, client] = await Promise.all([import("./google-DPD5N6AQ.js"), signedIn(name)]);
23581
+ const [{ googleSource }, client] = await Promise.all([import("./google-HPX52KMC.js"), signedIn(name)]);
23969
23582
  return googleSource(client);
23970
23583
  }, "source");
23971
23584
  const withIndex = /* @__PURE__ */ __name(async (fn, profile) => {
@@ -24035,6 +23648,7 @@ var installDrive = /* @__PURE__ */ __name((program) => {
24035
23648
  installAccountCommands(program, context);
24036
23649
  installFolderCommands(program, context, (method, params) => remote.call(method, params));
24037
23650
  installSyncCommands(program, context);
23651
+ installTranscriptCommands(program, context);
24038
23652
  installStoreCommands(program, context);
24039
23653
  installDocumentCommands(program, context);
24040
23654
  installSearchCommand(program, context);
@@ -24109,7 +23723,7 @@ var installDrive = /* @__PURE__ */ __name((program) => {
24109
23723
  if (fake)
24110
23724
  return await fake.call(method, params, body);
24111
23725
  const [{ googleApi }, client] = await Promise.all([
24112
- import("./google-api-P5DRHD7L.js"),
23726
+ import("./google-api-HIMN4XL5.js"),
24113
23727
  signedIn(selected(), descriptor.scope)
24114
23728
  ]);
24115
23729
  return await googleApi(client).call(method, params, body);
@@ -24135,7 +23749,7 @@ var installDrive = /* @__PURE__ */ __name((program) => {
24135
23749
  if (fake)
24136
23750
  return fake(id, mime);
24137
23751
  const [{ googleDownload }, client] = await Promise.all([
24138
- import("./google-api-P5DRHD7L.js"),
23752
+ import("./google-api-HIMN4XL5.js"),
24139
23753
  signedIn(selected(), apiMethod(method).scope)
24140
23754
  ]);
24141
23755
  return googleDownload(client)(id, mime);
@@ -24153,7 +23767,7 @@ var installDrive = /* @__PURE__ */ __name((program) => {
24153
23767
  let request = environment().uploadRequest;
24154
23768
  if (!request) {
24155
23769
  const [{ googleUploadRequest }, client] = await Promise.all([
24156
- import("./google-api-P5DRHD7L.js"),
23770
+ import("./google-api-HIMN4XL5.js"),
24157
23771
  signedIn(selected(), apiMethod(method).scope)
24158
23772
  ]);
24159
23773
  request = googleUploadRequest(client);
@@ -24171,7 +23785,7 @@ var installDrive = /* @__PURE__ */ __name((program) => {
24171
23785
  installRemoteCommands(program, remote);
24172
23786
  installMirrorCommands(program, context, remote);
24173
23787
  installConfigCommands(program, context);
24174
- installCompleteCommand(program, context);
23788
+ program.addCommand(appCompleteCommand(DRIVE_APP, configuration));
24175
23789
  installModelCommands(program, context);
24176
23790
  installCommandsCommand(program, context);
24177
23791
  installUpgradeCommand(program, context);
@@ -24318,7 +23932,7 @@ Availability: unavailable \u2014 ${availability.reason}
24318
23932
  const parse = program.parseAsync.bind(program);
24319
23933
  const scope = {
24320
23934
  get runId() {
24321
- return runs.runId() ?? runId;
23935
+ return runId();
24322
23936
  },
24323
23937
  command: "",
24324
23938
  startedAt,
@@ -24365,7 +23979,7 @@ var mcpCommand = /* @__PURE__ */ __name(() => {
24365
23979
  const environment = environmentOf(action);
24366
23980
  if (environment.api)
24367
23981
  return;
24368
- const { grantAvailability } = await import("./grants-TX4MHLI4.js");
23982
+ const { grantAvailability } = await import("./grants-RO42I6E4.js");
24369
23983
  availability = grantAvailability(rootOf(root), environment.env ?? process.env, environment.keyring);
24370
23984
  });
24371
23985
  }, "mcpCommand");