@wirecat/drive-cli 0.65.0 → 0.66.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 (204) hide show
  1. package/contracts/wirecat.json +2871 -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-WCQLIHUG.js} +14 -14
  8. package/dist/bundle/{anthropic-PJKFON5H.js → anthropic-5RJMB6O7.js} +20 -13
  9. package/dist/bundle/{app-server-6ELQA6FJ.js → app-server-3RGYXPKG.js} +67 -56
  10. package/dist/bundle/{bun-P54TGES2.js → bun-L34VEKGG.js} +2 -2
  11. package/dist/bundle/{bun-sqlite-TND5ZRJH.js → bun-sqlite-H6IAXQXI.js} +9 -9
  12. package/dist/bundle/{chunk-VHQYWFWV.js → chunk-2AF77WMH.js} +1 -1
  13. package/dist/bundle/{chunk-CWLL63JD.js → chunk-2S3E2HVV.js} +17 -17
  14. package/dist/bundle/{chunk-I272E6UR.js → chunk-3NYH756U.js} +49 -117
  15. package/dist/bundle/{chunk-UTNRBOEN.js → chunk-3QFUDXMQ.js} +2 -2
  16. package/dist/bundle/{chunk-RNHGQ35R.js → chunk-3SDJIMZB.js} +1 -1
  17. package/dist/bundle/{chunk-NQ5XMSLA.js → chunk-4UHBJSMI.js} +22086 -29123
  18. package/dist/bundle/{chunk-OWMZUWCM.js → chunk-5HVJK3ZJ.js} +6 -14
  19. package/dist/bundle/chunk-5K54RZBK.js +70 -0
  20. package/dist/bundle/{chunk-SIWXYB4E.js → chunk-5PLINHEY.js} +2987 -2717
  21. package/dist/bundle/{chunk-O7ZDCOZE.js → chunk-5VDVGDOC.js} +1 -1
  22. package/dist/bundle/{chunk-B2LPCHQN.js → chunk-5XLU4NN6.js} +4 -4
  23. package/dist/bundle/{chunk-5XSBCMAF.js → chunk-6UJCCOZC.js} +4 -4
  24. package/dist/bundle/{chunk-7AQGVX5O.js → chunk-6X3KUFRQ.js} +60 -29
  25. package/dist/bundle/{chunk-WRMJN6UQ.js → chunk-7EP4AU6A.js} +3 -3
  26. package/dist/bundle/{chunk-GW3LBY3T.js → chunk-7LT2G5BC.js} +146 -133
  27. package/dist/bundle/{chunk-ZILALBYQ.js → chunk-7ZGJRVBH.js} +7 -5
  28. package/dist/bundle/{chunk-PLP5527C.js → chunk-ALE67WRR.js} +5 -5
  29. package/dist/bundle/{chunk-EHU6EYGO.js → chunk-AP4MX247.js} +12 -12
  30. package/dist/bundle/{chunk-NI5PD5KM.js → chunk-BIJW6AYA.js} +14124 -12049
  31. package/dist/bundle/{chunk-54V4H6PM.js → chunk-BQXSE645.js} +12 -12
  32. package/dist/bundle/{chunk-EM7NL5ES.js → chunk-COGWKO2T.js} +3 -3
  33. package/dist/bundle/{chunk-II4S2DBJ.js → chunk-D4MIMH2N.js} +12 -6
  34. package/dist/bundle/{chunk-42G2XNPN.js → chunk-D7KOAPG6.js} +2 -2
  35. package/dist/bundle/{chunk-NQRTKYJB.js → chunk-E2F2XIX6.js} +47 -80
  36. package/dist/bundle/{chunk-VDZY3L7U.js → chunk-FA2TNA5X.js} +1 -1
  37. package/dist/bundle/{chunk-A4QNADEX.js → chunk-FHBTQPA3.js} +49 -49
  38. package/dist/bundle/{chunk-7TAP7Y2E.js → chunk-FKKPVPZR.js} +196 -112
  39. package/dist/bundle/{chunk-2AFI4KGI.js → chunk-G4TNKBDX.js} +7 -7
  40. package/dist/bundle/{chunk-ECEP4SO3.js → chunk-GVA3KTCD.js} +10 -10
  41. package/dist/bundle/{chunk-PHOL2DZM.js → chunk-GY4DAJSK.js} +34 -5
  42. package/dist/bundle/{chunk-Z2ADO6UA.js → chunk-H7XL6WTW.js} +2 -2
  43. package/dist/bundle/{chunk-SE352DBY.js → chunk-HHRJPLFO.js} +1 -1
  44. package/dist/bundle/{chunk-WRAUO5EJ.js → chunk-HPKE2GDP.js} +45 -22
  45. package/dist/bundle/{chunk-D7WB54P7.js → chunk-HPSHQVJU.js} +540 -456
  46. package/dist/bundle/{chunk-4Y5YBFMS.js → chunk-HQBLJLYH.js} +7 -7
  47. package/dist/bundle/{chunk-IMHW7VIV.js → chunk-I5R5CMQR.js} +5 -5
  48. package/dist/bundle/{chunk-ELJUBPY4.js → chunk-IIHZTV6V.js} +1 -1
  49. package/dist/bundle/{chunk-M7ELUGU6.js → chunk-IRNDYNQX.js} +4 -4
  50. package/dist/bundle/{chunk-TTP4NOP3.js → chunk-JCHF7LZT.js} +4 -4
  51. package/dist/bundle/{chunk-3HXNDF6Q.js → chunk-JHMEETXI.js} +2 -2
  52. package/dist/bundle/{chunk-4EDWLR22.js → chunk-JLCR24UM.js} +1 -1
  53. package/dist/bundle/{chunk-6DCLZLGX.js → chunk-JQXK3M5M.js} +1 -1
  54. package/dist/bundle/{chunk-EZ2OLYEK.js → chunk-KOY5HUBY.js} +14 -5
  55. package/dist/bundle/{chunk-IBO23OID.js → chunk-KRG5X5PH.js} +2 -2
  56. package/dist/bundle/{chunk-FA6JNXCC.js → chunk-LVAPSAHF.js} +8 -8
  57. package/dist/bundle/{chunk-ZR2EJPMQ.js → chunk-M7543RUJ.js} +18 -15
  58. package/dist/bundle/{chunk-A27UVLPK.js → chunk-MZWXTJ4O.js} +3 -3
  59. package/dist/bundle/{chunk-XPWZSW6Y.js → chunk-NK4GVFJH.js} +4 -4
  60. package/dist/bundle/chunk-NYECVHFH.js +10283 -0
  61. package/dist/bundle/{chunk-W2XY6C5S.js → chunk-NYZS2LKF.js} +2 -2
  62. package/dist/bundle/{chunk-4AOINPN2.js → chunk-O53WLYX3.js} +8 -2
  63. package/dist/bundle/{chunk-RX5CJ55S.js → chunk-OIF4B526.js} +1 -1
  64. package/dist/bundle/{chunk-SS4LKLD7.js → chunk-OT7SQQJK.js} +371 -362
  65. package/dist/bundle/chunk-OZOQLAWK.js +72 -0
  66. package/dist/bundle/{chunk-DA63E2UM.js → chunk-P7HQFII6.js} +18 -15
  67. package/dist/bundle/{chunk-MCPOZNWG.js → chunk-PJGOQSE5.js} +1 -1
  68. package/dist/bundle/{chunk-F56DRBGY.js → chunk-PKM55ZRR.js} +75 -20
  69. package/dist/bundle/{chunk-SNLSEYJO.js → chunk-PUMDOCAF.js} +1 -1
  70. package/dist/bundle/{chunk-LMKPP2JP.js → chunk-QF7VL4C3.js} +1 -1
  71. package/dist/bundle/{chunk-D6Z43SOG.js → chunk-QJ57PV55.js} +383 -361
  72. package/dist/bundle/{chunk-EU5MD24W.js → chunk-QSELSDWE.js} +13 -13
  73. package/dist/bundle/{chunk-TMHF4BCL.js → chunk-SOOU5WO6.js} +2 -2
  74. package/dist/bundle/{chunk-3ONWN3IA.js → chunk-SZ6JFOL4.js} +137 -45
  75. package/dist/bundle/{chunk-WVJHZIDH.js → chunk-T3ULDA7C.js} +3 -3
  76. package/dist/bundle/{chunk-XYE7XZPB.js → chunk-TAHISPDE.js} +5 -5
  77. package/dist/bundle/{chunk-HP3NT6JJ.js → chunk-TYLEICTX.js} +3 -3
  78. package/dist/bundle/{chunk-Y5PKRITX.js → chunk-UAKX6DP4.js} +5 -5
  79. package/dist/bundle/{chunk-VLXWAH5E.js → chunk-UG3GHFGY.js} +4 -4
  80. package/dist/bundle/{chunk-X7YGGWXI.js → chunk-ULXEW6FT.js} +3 -2
  81. package/dist/bundle/{chunk-JPPPLKAO.js → chunk-UNTIVT47.js} +1 -2
  82. package/dist/bundle/{chunk-SEQWBZYH.js → chunk-UQPW42HF.js} +1 -1
  83. package/dist/bundle/{chunk-JMJIH6JH.js → chunk-V2WXTILT.js} +6 -6
  84. package/dist/bundle/{chunk-TOVWMURV.js → chunk-VQKNKJYL.js} +22 -7
  85. package/dist/bundle/{chunk-OFJXHEFT.js → chunk-VR3YKXHL.js} +93 -31
  86. package/dist/bundle/{chunk-VMAMRFFC.js → chunk-VUUPFDRU.js} +26 -27
  87. package/dist/bundle/{chunk-FBHSWQU7.js → chunk-WYTYHUFH.js} +319 -102
  88. package/dist/bundle/{chunk-ZD4MB7NH.js → chunk-XLGDNI4S.js} +1 -1
  89. package/dist/bundle/{chunk-O6K2E7OA.js → chunk-XVZNFA2P.js} +1507 -1107
  90. package/dist/bundle/chunk-Y5U4HIZS.js +71 -0
  91. package/dist/bundle/chunk-YTIPTHEE.js +47 -0
  92. package/dist/bundle/cli-KW6QQVS5.js +1101 -0
  93. package/dist/bundle/command-contract-CE543JBN.js +41 -0
  94. package/dist/bundle/{command-server-entry-36JXYIJB.js → command-server-entry-OC4E4DED.js} +31 -30
  95. package/dist/bundle/{decode-T5ZW57WZ.js → decode-AH5ZLLDK.js} +8 -8
  96. package/dist/bundle/{dispatch-RMA2XFYA.js → dispatch-CDWZZ54Q.js} +9 -9
  97. package/dist/bundle/drive.js +13 -13
  98. package/dist/bundle/{echarts-KQ44LPSF.js → echarts-VC7MTXWY.js} +2 -2
  99. package/dist/bundle/{embed-Q7XST53J.js → embed-EPSQY6QG.js} +9 -9
  100. package/dist/bundle/{embedder-RWZSBVW2.js → embedder-TK4U4TJR.js} +12 -12
  101. package/dist/bundle/entry-3VN23M7M.js +25 -0
  102. package/dist/bundle/{failure-7NP4QPIN.js → failure-WSVZOPFE.js} +4 -4
  103. package/dist/bundle/first-run-7ZYJ7EB3.js +30 -0
  104. package/dist/bundle/first-screen-CZDH7QY3.js +39 -0
  105. package/dist/bundle/google-OBZMWA7J.js +45 -0
  106. package/dist/bundle/{google-api-P5DRHD7L.js → google-api-AV4X2JH3.js} +68 -63
  107. package/dist/bundle/grants-WTRLN4ZI.js +111 -0
  108. package/dist/bundle/{identity-VDV6CHRW.js → identity-CGHHF7AK.js} +8 -6
  109. package/dist/bundle/{instructions-Q45FVY6H.js → instructions-24PHDBBE.js} +1 -1
  110. package/dist/bundle/{login-XKN3NI6X.js → login-XHFESAFM.js} +73 -70
  111. package/dist/bundle/{mcp-7KQUJNFN.js → mcp-M5YCSWJJ.js} +2 -2
  112. package/dist/bundle/{node-MSW565D3.js → node-GIDULTV5.js} +2 -2
  113. package/dist/bundle/{node-sqlite-S74XVVHL.js → node-sqlite-LINBOAWK.js} +10 -10
  114. package/dist/bundle/oauth-JHUX3KE3.js +22 -0
  115. package/dist/bundle/{open-P7UQG7XJ.js → open-RYFKPNCJ.js} +8 -8
  116. package/dist/bundle/{openai-DDHJ57KZ.js → openai-Q7YYUHJF.js} +28 -21
  117. package/dist/bundle/{process-NMUB5SHK.js → process-VPIZTIJR.js} +1 -1
  118. package/dist/bundle/{program-PJNWP6JW.js → program-IUXFRBZA.js} +213 -555
  119. package/dist/bundle/{prompt-VOSMK4C2.js → prompt-LF4KX3XL.js} +8 -8
  120. package/dist/bundle/{reasons-KDAXOC5S.js → reasons-JPYOU5GV.js} +5 -5
  121. package/dist/bundle/{recognize-GZIY63HS.js → recognize-KEWTJXFH.js} +7 -7
  122. package/dist/bundle/{remote-V3YGN7LN.js → remote-HGGLB76S.js} +13 -10
  123. package/dist/bundle/{rerank-XRU6AVN7.js → rerank-TDUKETFT.js} +10 -10
  124. package/dist/bundle/{serve-NDOAFA57.js → serve-XFYMKW5W.js} +12 -12
  125. package/dist/bundle/server-BDEV3CZJ.js +74 -0
  126. package/dist/bundle/{server-BKGWJYMC.js → server-PXIPSGFP.js} +47 -45
  127. package/dist/bundle/{services-TYDMFQCA.js → services-2BOCGMJU.js} +44 -34
  128. package/dist/bundle/{sqlite-runtime-UAFJKSJR.js → sqlite-runtime-R7M5XUMW.js} +9 -9
  129. package/dist/bundle/{start-2ZLDP2OE.js → start-YRLT4MQZ.js} +7 -7
  130. package/dist/bundle/{state-6SP27J2K.js → state-NZ7WRJWH.js} +9 -9
  131. package/dist/bundle/{store-EJN27MXI.js → store-7LCVDO7G.js} +23 -21
  132. package/dist/bundle/{store-4UUY545Q.js → store-ICDGPSEN.js} +21 -19
  133. package/dist/bundle/store-maintenance-command-SJPLY6IH.js +65 -0
  134. package/dist/bundle/tokens-FGTBE7VW.js +111 -0
  135. package/dist/commands/discovery.d.ts +0 -1
  136. package/dist/commands/discovery.d.ts.map +1 -1
  137. package/dist/commands/discovery.js +6 -26
  138. package/dist/commands/discovery.js.map +1 -1
  139. package/dist/commands/knowledge.d.ts.map +1 -1
  140. package/dist/commands/knowledge.js +7 -6
  141. package/dist/commands/knowledge.js.map +1 -1
  142. package/dist/commands/search.d.ts.map +1 -1
  143. package/dist/commands/search.js +11 -8
  144. package/dist/commands/search.js.map +1 -1
  145. package/dist/config.d.ts +1 -0
  146. package/dist/config.d.ts.map +1 -1
  147. package/dist/config.js +3 -2
  148. package/dist/config.js.map +1 -1
  149. package/dist/contract-overrides.d.ts +16 -4
  150. package/dist/contract-overrides.d.ts.map +1 -1
  151. package/dist/contract-overrides.js +86 -410
  152. package/dist/contract-overrides.js.map +1 -1
  153. package/dist/errors.d.ts.map +1 -1
  154. package/dist/errors.js +4 -0
  155. package/dist/errors.js.map +1 -1
  156. package/dist/google-api.d.ts.map +1 -1
  157. package/dist/google-api.js +4 -1
  158. package/dist/google-api.js.map +1 -1
  159. package/dist/identity.d.ts +4 -0
  160. package/dist/identity.d.ts.map +1 -1
  161. package/dist/identity.js +22 -0
  162. package/dist/identity.js.map +1 -1
  163. package/dist/knowledge.js +2 -2
  164. package/dist/knowledge.js.map +1 -1
  165. package/dist/login.d.ts.map +1 -1
  166. package/dist/login.js +2 -2
  167. package/dist/login.js.map +1 -1
  168. package/dist/program.d.ts.map +1 -1
  169. package/dist/program.js +8 -6
  170. package/dist/program.js.map +1 -1
  171. package/dist/reasons.d.ts.map +1 -1
  172. package/dist/reasons.js +0 -1
  173. package/dist/reasons.js.map +1 -1
  174. package/dist/store-transition.js +2 -2
  175. package/dist/store-transition.js.map +1 -1
  176. package/dist/store.d.ts.map +1 -1
  177. package/dist/store.js +7 -7
  178. package/dist/store.js.map +1 -1
  179. package/dist/tokens.d.ts +9 -2
  180. package/dist/tokens.d.ts.map +1 -1
  181. package/dist/tokens.js +18 -15
  182. package/dist/tokens.js.map +1 -1
  183. package/dist/version.d.ts +1 -1
  184. package/dist/version.js +1 -1
  185. package/dist/wcat.d.ts +3 -0
  186. package/dist/wcat.d.ts.map +1 -0
  187. package/dist/wcat.js +4 -0
  188. package/dist/wcat.js.map +1 -0
  189. package/package.json +7 -7
  190. package/dist/bundle/chunk-CGQRZRTH.js +0 -26
  191. package/dist/bundle/chunk-IKHOIXJR.js +0 -27
  192. package/dist/bundle/chunk-SBZB7HMU.js +0 -1055
  193. package/dist/bundle/command-contract-25E4PYMD.js +0 -40
  194. package/dist/bundle/dist-PY3MVR3G.js +0 -21
  195. package/dist/bundle/entry-HPLW4QL2.js +0 -25
  196. package/dist/bundle/first-run-RL3RKYZW.js +0 -30
  197. package/dist/bundle/first-screen-NX3TM2VJ.js +0 -38
  198. package/dist/bundle/google-DPD5N6AQ.js +0 -42
  199. package/dist/bundle/grants-TX4MHLI4.js +0 -109
  200. package/dist/bundle/oauth-6R7AWAES.js +0 -22
  201. package/dist/bundle/server-QD2MUJJZ.js +0 -72
  202. package/dist/bundle/store-maintenance-command-LETURZDC.js +0 -60
  203. package/dist/bundle/tokens-MTFJPTYT.js +0 -107
  204. /package/dist/bundle/{chunk-YVNHQFLC.js → chunk-HVJJWJYQ.js} +0 -0
@@ -8,7 +8,7 @@ import {
8
8
  metadataJson,
9
9
  supported,
10
10
  tooManyEntries
11
- } from "./chunk-ZD4MB7NH.js";
11
+ } from "./chunk-XLGDNI4S.js";
12
12
  import {
13
13
  ACCOUNT_FREE_COMMANDS,
14
14
  ANY_PROFILE_COMMANDS,
@@ -19,7 +19,7 @@ import {
19
19
  describeDriveProgram,
20
20
  examples,
21
21
  markProfileFree
22
- } from "./chunk-WRMJN6UQ.js";
22
+ } from "./chunk-7EP4AU6A.js";
23
23
  import {
24
24
  DEFAULTS_ONLY,
25
25
  DEFAULT_LEVELS,
@@ -53,7 +53,7 @@ import {
53
53
  unknownProfile,
54
54
  withDefaults,
55
55
  writeConfig
56
- } from "./chunk-ZR2EJPMQ.js";
56
+ } from "./chunk-M7543RUJ.js";
57
57
  import {
58
58
  blockKey,
59
59
  blocksMarkdown,
@@ -72,7 +72,7 @@ import {
72
72
  syncDocuments,
73
73
  syncMirrors,
74
74
  watchMirrors
75
- } from "./chunk-VMAMRFFC.js";
75
+ } from "./chunk-VUUPFDRU.js";
76
76
  import {
77
77
  apiMethod,
78
78
  apiMethods,
@@ -81,7 +81,14 @@ import {
81
81
  schemas,
82
82
  validateApiParams,
83
83
  validateRequest
84
- } from "./chunk-ZILALBYQ.js";
84
+ } from "./chunk-7ZGJRVBH.js";
85
+ import {
86
+ operations
87
+ } from "./chunk-NYECVHFH.js";
88
+ import {
89
+ googleError,
90
+ offlineRefused
91
+ } from "./chunk-5K54RZBK.js";
85
92
  import {
86
93
  DISCOVERY_DESCRIPTIONS,
87
94
  MEMO_SCENARIOS,
@@ -89,20 +96,21 @@ import {
89
96
  addContractInfo,
90
97
  answerFields,
91
98
  apiPlainJson,
99
+ appCompleteCommand,
92
100
  appDoctorCommand,
93
101
  appMcpCommand,
94
102
  checkApiBody,
95
103
  checkApiParameter,
96
104
  checkJson,
97
105
  commandRuns,
106
+ commandsText,
98
107
  createProgram,
99
108
  entityFields,
100
- formatSuggestions,
101
109
  generatedApiCommand,
102
110
  guideCommand,
103
111
  identifier,
112
+ inSection,
104
113
  modelCatalogueCommand,
105
- operations,
106
114
  parseApiJson,
107
115
  readApiBody,
108
116
  run,
@@ -110,23 +118,17 @@ import {
110
118
  sharedCommandTemplate,
111
119
  signInSteps,
112
120
  skillCommand,
113
- suggest,
114
121
  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";
122
+ } from "./chunk-4UHBJSMI.js";
123
+ import "./chunk-HHRJPLFO.js";
124
+ import "./chunk-PUMDOCAF.js";
125
+ import "./chunk-7LT2G5BC.js";
126
+ import "./chunk-HPSHQVJU.js";
126
127
  import {
127
128
  storeInfo
128
- } from "./chunk-7TAP7Y2E.js";
129
- import "./chunk-SS4LKLD7.js";
129
+ } from "./chunk-FKKPVPZR.js";
130
+ import "./chunk-E2F2XIX6.js";
131
+ import "./chunk-OT7SQQJK.js";
130
132
  import {
131
133
  LIST_QUERY_GUIDE,
132
134
  listQuery,
@@ -137,47 +139,45 @@ import {
137
139
  typedQuery,
138
140
  unfilteredQuery,
139
141
  withQuery
140
- } from "./chunk-WRAUO5EJ.js";
142
+ } from "./chunk-HPKE2GDP.js";
141
143
  import {
142
144
  RecipientList,
143
145
  SendJournal,
144
146
  newOperationId,
145
147
  sendGuard
146
- } from "./chunk-O6K2E7OA.js";
148
+ } from "./chunk-XVZNFA2P.js";
147
149
  import {
148
150
  columnName,
149
151
  modelGateway,
150
152
  readSpreadsheet
151
- } from "./chunk-FBHSWQU7.js";
152
- import "./chunk-EU5MD24W.js";
153
- import {
154
- commandsText,
155
- inSection
156
- } from "./chunk-I272E6UR.js";
153
+ } from "./chunk-WYTYHUFH.js";
154
+ import "./chunk-QSELSDWE.js";
155
+ import "./chunk-3NYH756U.js";
157
156
  import "./chunk-HTQTIKWP.js";
158
- import "./chunk-54V4H6PM.js";
157
+ import "./chunk-BQXSE645.js";
159
158
  import {
160
159
  latestVersion,
161
160
  runUpdate,
162
161
  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";
162
+ } from "./chunk-JCHF7LZT.js";
163
+ import "./chunk-PJGOQSE5.js";
164
+ import "./chunk-AP4MX247.js";
165
+ import "./chunk-6UJCCOZC.js";
166
+ import "./chunk-COGWKO2T.js";
167
+ import "./chunk-KOY5HUBY.js";
168
+ import "./chunk-D4MIMH2N.js";
169
+ import "./chunk-OZOQLAWK.js";
170
170
  import {
171
171
  applyDocumentTransfer,
172
172
  previewDocumentTransfer
173
- } from "./chunk-CWLL63JD.js";
174
- import "./chunk-IMHW7VIV.js";
173
+ } from "./chunk-2S3E2HVV.js";
174
+ import "./chunk-I5R5CMQR.js";
175
175
  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";
176
+ import "./chunk-G4TNKBDX.js";
177
+ import "./chunk-UQPW42HF.js";
178
+ import "./chunk-2AF77WMH.js";
179
+ import "./chunk-SOOU5WO6.js";
180
+ import "./chunk-UAKX6DP4.js";
181
181
  import {
182
182
  FETCH,
183
183
  InvalidArgumentError,
@@ -191,7 +191,6 @@ import {
191
191
  changesAuthority,
192
192
  commandWords,
193
193
  customizeSharedCommand,
194
- describeOptions,
195
194
  environmentOf,
196
195
  flatten,
197
196
  grantsAuthority,
@@ -207,9 +206,10 @@ import {
207
206
  resolveAISettings,
208
207
  rootOf,
209
208
  settingRows,
209
+ sharedContracts,
210
210
  snakeKeys
211
- } from "./chunk-SIWXYB4E.js";
212
- import "./chunk-DA63E2UM.js";
211
+ } from "./chunk-5PLINHEY.js";
212
+ import "./chunk-P7HQFII6.js";
213
213
  import {
214
214
  CEILING_KEY,
215
215
  LEVELS,
@@ -217,32 +217,35 @@ import {
217
217
  layerPermissions,
218
218
  levelFor,
219
219
  parseDuration
220
- } from "./chunk-F56DRBGY.js";
220
+ } from "./chunk-PKM55ZRR.js";
221
221
  import {
222
222
  modelTarget
223
- } from "./chunk-OWMZUWCM.js";
223
+ } from "./chunk-5HVJK3ZJ.js";
224
224
  import {
225
225
  setupPermissionCeiling
226
- } from "./chunk-VLXWAH5E.js";
226
+ } from "./chunk-UG3GHFGY.js";
227
227
  import {
228
228
  readOnlyLockOf,
229
229
  readOnlyRefusal
230
- } from "./chunk-IKHOIXJR.js";
231
- import "./chunk-O7ZDCOZE.js";
230
+ } from "./chunk-Y5U4HIZS.js";
231
+ import "./chunk-5VDVGDOC.js";
232
+ import {
233
+ hostFetch
234
+ } from "./chunk-GY4DAJSK.js";
232
235
  import {
233
236
  note
234
- } from "./chunk-A27UVLPK.js";
235
- import "./chunk-B2LPCHQN.js";
236
- import "./chunk-HP3NT6JJ.js";
237
- import "./chunk-Z2ADO6UA.js";
237
+ } from "./chunk-MZWXTJ4O.js";
238
+ import "./chunk-5XLU4NN6.js";
239
+ import "./chunk-TYLEICTX.js";
240
+ import "./chunk-H7XL6WTW.js";
238
241
  import {
239
242
  CATALOG_QUERY,
240
243
  IMPORTED_DOCUMENT_QUERY,
241
244
  openStore
242
- } from "./chunk-NI5PD5KM.js";
243
- import "./chunk-WVJHZIDH.js";
244
- import "./chunk-FA6JNXCC.js";
245
- import "./chunk-JMJIH6JH.js";
245
+ } from "./chunk-BIJW6AYA.js";
246
+ import "./chunk-T3ULDA7C.js";
247
+ import "./chunk-LVAPSAHF.js";
248
+ import "./chunk-V2WXTILT.js";
246
249
  import {
247
250
  FACT_STATUSES,
248
251
  FACT_TYPES,
@@ -250,7 +253,7 @@ import {
250
253
  MEMORY_SCOPES,
251
254
  MEMORY_STATUSES,
252
255
  inRun
253
- } from "./chunk-D6Z43SOG.js";
256
+ } from "./chunk-QJ57PV55.js";
254
257
  import {
255
258
  dateRange,
256
259
  defineQuery,
@@ -260,37 +263,37 @@ import {
260
263
  timezoneOf,
261
264
  validateQuery,
262
265
  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";
266
+ } from "./chunk-GVA3KTCD.js";
267
+ import "./chunk-ULXEW6FT.js";
268
+ import "./chunk-O53WLYX3.js";
269
+ import "./chunk-HQBLJLYH.js";
270
+ import "./chunk-QF7VL4C3.js";
268
271
  import "./chunk-D72URWJE.js";
269
272
  import {
270
273
  installerOf
271
- } from "./chunk-RX5CJ55S.js";
274
+ } from "./chunk-OIF4B526.js";
272
275
  import {
273
276
  DRIVE_APP,
274
277
  PACKAGE,
275
278
  VERSION
276
- } from "./chunk-CGQRZRTH.js";
279
+ } from "./chunk-YTIPTHEE.js";
277
280
  import {
278
281
  REASONS
279
- } from "./chunk-JPPPLKAO.js";
280
- import "./chunk-YVNHQFLC.js";
281
- import "./chunk-VDZY3L7U.js";
282
+ } from "./chunk-UNTIVT47.js";
283
+ import "./chunk-HVJJWJYQ.js";
284
+ import "./chunk-FA2TNA5X.js";
282
285
  import {
283
286
  storePath
284
- } from "./chunk-UTNRBOEN.js";
287
+ } from "./chunk-3QFUDXMQ.js";
285
288
  import {
286
289
  processStreams,
287
290
  saveConfigFile,
288
291
  writeSecurely
289
- } from "./chunk-7AQGVX5O.js";
290
- import "./chunk-PLP5527C.js";
292
+ } from "./chunk-6X3KUFRQ.js";
293
+ import "./chunk-ALE67WRR.js";
291
294
  import "./chunk-Y5E2WNWB.js";
292
- import "./chunk-6DCLZLGX.js";
293
- import "./chunk-W2XY6C5S.js";
295
+ import "./chunk-JQXK3M5M.js";
296
+ import "./chunk-NYZS2LKF.js";
294
297
  import {
295
298
  array,
296
299
  boolean,
@@ -314,11 +317,11 @@ import {
314
317
  string,
315
318
  unknown,
316
319
  writes
317
- } from "./chunk-TOVWMURV.js";
320
+ } from "./chunk-VQKNKJYL.js";
318
321
  import {
319
322
  CliError,
320
323
  isCliError
321
- } from "./chunk-ELJUBPY4.js";
324
+ } from "./chunk-IIHZTV6V.js";
322
325
  import {
323
326
  __commonJS,
324
327
  __name,
@@ -2155,7 +2158,7 @@ var profileLocked2 = /* @__PURE__ */ __name((env, name) => import_proper_lockfil
2155
2158
  var removal = {
2156
2159
  signOut: /* @__PURE__ */ __name(async (profile, { env, keyring, mayRevoke }) => {
2157
2160
  const storage = readConfig(env).profiles[profile]?.storage ?? "keyring";
2158
- const { sessionKeeper } = await import("./tokens-MTFJPTYT.js");
2161
+ const { sessionKeeper } = await import("./tokens-FGTBE7VW.js");
2159
2162
  const { revoked } = await sessionKeeper({
2160
2163
  env,
2161
2164
  name: profile,
@@ -2771,7 +2774,7 @@ var installModelCommands = /* @__PURE__ */ __name((program, { env, output, strea
2771
2774
  const download = /* @__PURE__ */ __name(async (kind, id, acceptTerms) => {
2772
2775
  if (policyFlags().offline)
2773
2776
  throw offlineRefused("downloading a model needs the network");
2774
- const { downloadImageModel, downloadTextModel } = await import("./services-TYDMFQCA.js");
2777
+ const { downloadImageModel, downloadTextModel } = await import("./services-2BOCGMJU.js");
2775
2778
  const progress = /* @__PURE__ */ __name((line) => {
2776
2779
  if (!program.opts().quiet)
2777
2780
  streams.diagnostic(line);
@@ -2819,55 +2822,52 @@ var offset = /* @__PURE__ */ __name((input) => {
2819
2822
  }, "offset");
2820
2823
 
2821
2824
  // dist/contract-overrides.js
2825
+ import { createHash } from "node:crypto";
2822
2826
  var NOTES_REASON = "Drive notes annotate one explicitly selected imported document; document-bound arguments and receipts replace the generic note scope.";
2823
2827
  var SEARCH_REASON = "Drive searches imported documents and embeddings rather than live messenger messages; its default action and pagination are explicitly provider-specific.";
2828
+ 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");
2829
+ var fingerprint = /* @__PURE__ */ __name((value) => createHash("sha256").update(JSON.stringify(canonical(value ?? null))).digest("hex").slice(0, 16), "fingerprint");
2830
+ var reviewedOverrides = /* @__PURE__ */ __name((reference, reviewed) => reviewed.map((override) => {
2831
+ let node = reference;
2832
+ for (const name of override.command.slice(1))
2833
+ node = node.commands.find((child) => child.name() === name) ?? node;
2834
+ const before = sharedContracts(node)[node.name()]?.[override.field] ?? null;
2835
+ return { ...override, before: fingerprint(before) === override.before ? before : override.before };
2836
+ }), "reviewedOverrides");
2824
2837
  var SHELL_OVERRIDES = {
2825
2838
  notes: [
2826
2839
  {
2827
2840
  command: ["notes"],
2828
2841
  field: "description",
2829
- before: "notes kept in the shared store",
2842
+ before: "073d38b6d7256579",
2830
2843
  after: "write notes about an imported document",
2831
2844
  reason: NOTES_REASON
2832
2845
  },
2833
2846
  {
2834
2847
  command: ["notes"],
2835
2848
  field: "effects",
2836
- before: {
2837
- remote: "none",
2838
- local: "none"
2839
- },
2840
- after: {
2841
- remote: "none",
2842
- local: "read"
2843
- },
2849
+ before: "b98c7b06ed808dfb",
2850
+ after: { remote: "none", local: "read" },
2844
2851
  reason: NOTES_REASON
2845
2852
  },
2846
2853
  {
2847
2854
  command: ["notes"],
2848
2855
  field: "children",
2849
- before: ["list", "show", "add", "edit", "remove"],
2856
+ before: "6cfec8425c19582f",
2850
2857
  after: ["add", "list", "show", "edit", "remove"],
2851
2858
  reason: NOTES_REASON
2852
2859
  },
2853
2860
  {
2854
2861
  command: ["notes", "add"],
2855
2862
  field: "description",
2856
- before: "write a note",
2863
+ before: "98b319044cba6b7f",
2857
2864
  after: "write a note about a document",
2858
2865
  reason: NOTES_REASON
2859
2866
  },
2860
2867
  {
2861
2868
  command: ["notes", "add"],
2862
2869
  field: "arguments",
2863
- before: [
2864
- {
2865
- name: "text",
2866
- required: true,
2867
- variadic: false,
2868
- description: "note text"
2869
- }
2870
- ],
2870
+ before: "d5010f078464b8d0",
2871
2871
  after: [
2872
2872
  {
2873
2873
  name: "document",
@@ -2875,303 +2875,58 @@ var SHELL_OVERRIDES = {
2875
2875
  variadic: false,
2876
2876
  description: "Google file or folder id or URL in the local catalog, or a document:<n> ref"
2877
2877
  },
2878
- {
2879
- name: "text",
2880
- required: true,
2881
- variadic: false,
2882
- description: "the note's text"
2883
- }
2878
+ { name: "text", required: true, variadic: false, description: "the note's text" }
2884
2879
  ],
2885
2880
  reason: NOTES_REASON
2886
2881
  },
2887
2882
  {
2888
2883
  command: ["notes", "add"],
2889
2884
  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
- ],
2885
+ before: "213adb539c248d7f",
2886
+ after: [{ flags: "--title <title>", description: "a title for the note", takes_value: true, mandatory: false }],
2906
2887
  reason: NOTES_REASON
2907
2888
  },
2908
2889
  {
2909
2890
  command: ["notes", "add"],
2910
2891
  field: "examples",
2911
- before: null,
2892
+ before: "74234e98afe7498f",
2912
2893
  after: ['drive personal notes add DOC_ID "Check the numbers" --title Review'],
2913
2894
  reason: NOTES_REASON
2914
2895
  },
2915
2896
  {
2916
2897
  command: ["notes", "list"],
2917
2898
  field: "description",
2918
- before: "list stored notes",
2899
+ before: "6b866a022b5e84ce",
2919
2900
  after: "list a document's notes",
2920
2901
  reason: NOTES_REASON
2921
2902
  },
2922
2903
  {
2923
2904
  command: ["notes", "list"],
2924
2905
  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
- },
2906
+ before: "0b0517429a4f9613",
3054
2907
  after: {
3055
2908
  entity: "note",
3056
2909
  backend: "native",
3057
2910
  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
- },
2911
+ { name: "ref", type: "ref", operators: ["term", "phrase"], example: 'ref:"note:42"' },
2912
+ { name: "kind", type: "enum", values: ["note", "document"], operators: ["term"], example: "kind:note" },
2913
+ { name: "provider", type: "kw", operators: ["term", "phrase", "wildcard"], example: "provider:abc" },
2914
+ { name: "account", type: "kw", operators: ["term", "phrase", "wildcard"], example: "account:abc" },
2915
+ { name: "url", type: "kw", operators: ["term", "phrase", "wildcard"], example: "url:abc" },
2916
+ { name: "id", type: "kw", operators: ["term", "phrase", "wildcard"], example: "id:abc" },
2917
+ { name: "source", type: "enum", values: ["file", "internal"], operators: ["term"], example: "source:file" },
2918
+ { name: "folder_id", type: "kw", operators: ["term", "phrase", "wildcard"], example: "folder_id:abc" },
2919
+ { name: "path", type: "kw", operators: ["term", "phrase", "wildcard"], example: "path:abc" },
2920
+ { name: "title", type: "kw", operators: ["term", "phrase", "wildcard"], example: "title:abc" },
2921
+ { name: "text", type: "kw", operators: ["term", "phrase"], example: "text:review", native: true },
2922
+ { name: "revision", type: "num", operators: ["term", "range"], example: "revision>0" },
2923
+ { name: "content_hash", type: "kw", operators: ["term", "phrase", "wildcard"], example: "content_hash:abc" },
2924
+ { name: "export_path", type: "kw", operators: ["term", "phrase", "wildcard"], example: "export_path:abc" },
2925
+ { name: "created_at", type: "time", operators: ["term", "range"], example: "created_at>=7d" },
2926
+ { name: "updated_at", type: "time", operators: ["term", "range"], example: "updated_at>=7d" },
2927
+ { name: "deleted_at", type: "time", operators: ["term", "range"], example: "deleted_at>=7d" },
2928
+ { name: "tags", type: "kw", operators: ["term", "phrase", "wildcard"], example: "tags:abc" },
2929
+ { name: "excerpt", type: "kw", operators: ["term", "phrase", "wildcard"], example: "excerpt:abc" },
3175
2930
  {
3176
2931
  name: "found_by",
3177
2932
  type: "enum",
@@ -3186,14 +2941,7 @@ var SHELL_OVERRIDES = {
3186
2941
  {
3187
2942
  command: ["notes", "list"],
3188
2943
  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
- ],
2944
+ before: "350998d1fcef909c",
3197
2945
  after: [
3198
2946
  {
3199
2947
  name: "document",
@@ -3213,7 +2961,7 @@ var SHELL_OVERRIDES = {
3213
2961
  {
3214
2962
  command: ["notes", "list"],
3215
2963
  field: "options",
3216
- before: [],
2964
+ before: "4f53cda18c2baa0c",
3217
2965
  after: [
3218
2966
  {
3219
2967
  flags: "--limit <n>",
@@ -3222,34 +2970,21 @@ var SHELL_OVERRIDES = {
3222
2970
  mandatory: false,
3223
2971
  default: 50
3224
2972
  },
3225
- {
3226
- flags: "--page <n>",
3227
- description: "which page to return",
3228
- takes_value: true,
3229
- mandatory: false,
3230
- default: 1
3231
- }
2973
+ { flags: "--page <n>", description: "which page to return", takes_value: true, mandatory: false, default: 1 }
3232
2974
  ],
3233
2975
  reason: NOTES_REASON
3234
2976
  },
3235
2977
  {
3236
2978
  command: ["notes", "list"],
3237
2979
  field: "examples",
3238
- before: null,
2980
+ before: "74234e98afe7498f",
3239
2981
  after: ["drive personal notes list DOC_ID", "drive personal notes list DOC_ID text:review --limit 10"],
3240
2982
  reason: NOTES_REASON
3241
2983
  },
3242
2984
  {
3243
2985
  command: ["notes", "show"],
3244
2986
  field: "arguments",
3245
- before: [
3246
- {
3247
- name: "note",
3248
- required: true,
3249
- variadic: false,
3250
- description: "stored note reference"
3251
- }
3252
- ],
2987
+ before: "ae549d47fb4ad5ab",
3253
2988
  after: [
3254
2989
  {
3255
2990
  name: "document",
@@ -3257,46 +2992,28 @@ var SHELL_OVERRIDES = {
3257
2992
  variadic: false,
3258
2993
  description: "Google file or folder id or URL in the local catalog, or a document:<n> ref"
3259
2994
  },
3260
- {
3261
- name: "note",
3262
- required: true,
3263
- variadic: false,
3264
- description: "note:<id> reference, as notes list prints it"
3265
- }
2995
+ { name: "note", required: true, variadic: false, description: "note:<id> reference, as notes list prints it" }
3266
2996
  ],
3267
2997
  reason: NOTES_REASON
3268
2998
  },
3269
2999
  {
3270
3000
  command: ["notes", "show"],
3271
3001
  field: "examples",
3272
- before: null,
3002
+ before: "74234e98afe7498f",
3273
3003
  after: ["drive personal notes show DOC_ID note:NOTE_ID"],
3274
3004
  reason: NOTES_REASON
3275
3005
  },
3276
3006
  {
3277
3007
  command: ["notes", "edit"],
3278
3008
  field: "description",
3279
- before: "change a note",
3009
+ before: "e67289f2731a50ff",
3280
3010
  after: "replace a note's text",
3281
3011
  reason: NOTES_REASON
3282
3012
  },
3283
3013
  {
3284
3014
  command: ["notes", "edit"],
3285
3015
  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
- ],
3016
+ before: "c7d2686d3041bb14",
3300
3017
  after: [
3301
3018
  {
3302
3019
  name: "document",
@@ -3304,25 +3021,15 @@ var SHELL_OVERRIDES = {
3304
3021
  variadic: false,
3305
3022
  description: "Google file or folder id or URL in the local catalog, or a document:<n> ref"
3306
3023
  },
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
- }
3024
+ { name: "note", required: true, variadic: false, description: "note:<id> reference, as notes list prints it" },
3025
+ { name: "text", required: true, variadic: false, description: "the note's new text" }
3319
3026
  ],
3320
3027
  reason: NOTES_REASON
3321
3028
  },
3322
3029
  {
3323
3030
  command: ["notes", "edit"],
3324
3031
  field: "options",
3325
- before: [],
3032
+ before: "4f53cda18c2baa0c",
3326
3033
  after: [
3327
3034
  {
3328
3035
  flags: "--revision <n>",
@@ -3336,28 +3043,21 @@ var SHELL_OVERRIDES = {
3336
3043
  {
3337
3044
  command: ["notes", "edit"],
3338
3045
  field: "examples",
3339
- before: null,
3046
+ before: "74234e98afe7498f",
3340
3047
  after: ['drive personal notes edit DOC_ID note:NOTE_ID "Numbers checked" --revision 2'],
3341
3048
  reason: NOTES_REASON
3342
3049
  },
3343
3050
  {
3344
3051
  command: ["notes", "remove"],
3345
3052
  field: "description",
3346
- before: "remove a note",
3053
+ before: "aa644f1603858b41",
3347
3054
  after: "delete one note",
3348
3055
  reason: NOTES_REASON
3349
3056
  },
3350
3057
  {
3351
3058
  command: ["notes", "remove"],
3352
3059
  field: "arguments",
3353
- before: [
3354
- {
3355
- name: "note",
3356
- required: true,
3357
- variadic: false,
3358
- description: "stored note reference"
3359
- }
3360
- ],
3060
+ before: "ae549d47fb4ad5ab",
3361
3061
  after: [
3362
3062
  {
3363
3063
  name: "document",
@@ -3365,19 +3065,14 @@ var SHELL_OVERRIDES = {
3365
3065
  variadic: false,
3366
3066
  description: "Google file or folder id or URL in the local catalog, or a document:<n> ref"
3367
3067
  },
3368
- {
3369
- name: "note",
3370
- required: true,
3371
- variadic: false,
3372
- description: "note:<id> reference, as notes list prints it"
3373
- }
3068
+ { name: "note", required: true, variadic: false, description: "note:<id> reference, as notes list prints it" }
3374
3069
  ],
3375
3070
  reason: NOTES_REASON
3376
3071
  },
3377
3072
  {
3378
3073
  command: ["notes", "remove"],
3379
3074
  field: "examples",
3380
- before: null,
3075
+ before: "74234e98afe7498f",
3381
3076
  after: ["drive personal notes remove DOC_ID note:NOTE_ID"],
3382
3077
  reason: NOTES_REASON
3383
3078
  }
@@ -3386,49 +3081,28 @@ var SHELL_OVERRIDES = {
3386
3081
  {
3387
3082
  command: ["commands"],
3388
3083
  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
- ],
3084
+ before: "2a309b1318d3ae57",
3085
+ after: [{ name: "path", required: false, variadic: true, description: "only this command or group, as words" }],
3405
3086
  reason: "Drive binds discovery to its profile-aware usage renderer while retaining the shared command document and evidence endpoint."
3406
3087
  },
3407
3088
  {
3408
3089
  command: ["commands"],
3409
3090
  field: "examples",
3410
- before: null,
3091
+ before: "74234e98afe7498f",
3411
3092
  after: ["drive commands", "drive commands files copy --json"],
3412
3093
  reason: "Drive binds discovery to its profile-aware usage renderer while retaining the shared command document and evidence endpoint."
3413
3094
  },
3414
3095
  {
3415
3096
  command: ["commands", "info"],
3416
3097
  field: "examples",
3417
- before: ["drive commands info commands"],
3098
+ before: "b5111d1de1d39c3d",
3418
3099
  after: ["drive commands info --json"],
3419
3100
  reason: "Drive binds discovery to its profile-aware usage renderer while retaining the shared command document and evidence endpoint."
3420
3101
  },
3421
3102
  {
3422
3103
  command: ["commands", "info"],
3423
3104
  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
- ],
3105
+ before: "51e2a792c77a31bd",
3432
3106
  after: [
3433
3107
  {
3434
3108
  name: "path",
@@ -3444,21 +3118,21 @@ var SHELL_OVERRIDES = {
3444
3118
  {
3445
3119
  command: ["search"],
3446
3120
  field: "summary",
3447
- before: "search the local archive",
3121
+ before: "d8f6dac5b4fe912b",
3448
3122
  after: null,
3449
3123
  reason: SEARCH_REASON
3450
3124
  },
3451
3125
  {
3452
3126
  command: ["search"],
3453
3127
  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",
3128
+ before: "600ae3fd56e9ef36",
3455
3129
  after: "search imported documents by words, and by meaning when indexed",
3456
3130
  reason: SEARCH_REASON
3457
3131
  },
3458
3132
  {
3459
3133
  command: ["search"],
3460
3134
  field: "arguments",
3461
- before: [],
3135
+ before: "4f53cda18c2baa0c",
3462
3136
  after: [
3463
3137
  {
3464
3138
  name: "query",
@@ -3472,7 +3146,7 @@ var SHELL_OVERRIDES = {
3472
3146
  {
3473
3147
  command: ["search"],
3474
3148
  field: "options",
3475
- before: [],
3149
+ before: "4f53cda18c2baa0c",
3476
3150
  after: [
3477
3151
  {
3478
3152
  flags: "--limit <n>",
@@ -3481,13 +3155,7 @@ var SHELL_OVERRIDES = {
3481
3155
  mandatory: false,
3482
3156
  default: 20
3483
3157
  },
3484
- {
3485
- flags: "--page <n>",
3486
- description: "which page to return",
3487
- takes_value: true,
3488
- mandatory: false,
3489
- default: 1
3490
- },
3158
+ { flags: "--page <n>", description: "which page to return", takes_value: true, mandatory: false, default: 1 },
3491
3159
  {
3492
3160
  flags: "--exact",
3493
3161
  description: "match the words exactly: no word forms, no meaning",
@@ -3500,24 +3168,21 @@ var SHELL_OVERRIDES = {
3500
3168
  {
3501
3169
  command: ["search"],
3502
3170
  field: "children",
3503
- before: ["all", "messages", "notes", "conversations", "runs"],
3171
+ before: "595cc576273270f2",
3504
3172
  after: [],
3505
3173
  reason: SEARCH_REASON
3506
3174
  },
3507
3175
  {
3508
3176
  command: ["search"],
3509
3177
  field: "effects",
3510
- before: null,
3511
- after: {
3512
- remote: "none",
3513
- local: "read"
3514
- },
3178
+ before: "74234e98afe7498f",
3179
+ after: { remote: "none", local: "read" },
3515
3180
  reason: SEARCH_REASON
3516
3181
  },
3517
3182
  {
3518
3183
  command: ["search"],
3519
3184
  field: "examples",
3520
- before: null,
3185
+ before: "74234e98afe7498f",
3521
3186
  after: ["drive personal search budget", 'drive personal search "quarterly plan" --exact --limit 5'],
3522
3187
  reason: SEARCH_REASON
3523
3188
  }
@@ -3525,19 +3190,6 @@ var SHELL_OVERRIDES = {
3525
3190
  };
3526
3191
 
3527
3192
  // 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
3193
  var installCommandsCommandDefinition = /* @__PURE__ */ __name((program, { print, streams }) => {
3542
3194
  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
3195
  const document = commandsDocument(program, path);
@@ -3558,14 +3210,15 @@ var installCommandsCommandDefinition = /* @__PURE__ */ __name((program, { print,
3558
3210
  }, "installCommandsCommandDefinition");
3559
3211
  var installCommandsCommand = /* @__PURE__ */ __name((...args) => {
3560
3212
  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.", () => {
3213
+ const reference = sharedCommandTemplate(DRIVE_APP, "commands");
3214
+ customizeSharedCommand(reference, "Drive binds discovery to its profile-aware usage renderer while retaining the shared command document and evidence endpoint.", () => {
3562
3215
  installCommandsCommandDefinition(...args);
3563
3216
  addContractInfo(program, (value) => context.streams.data(JSON.stringify(value)));
3564
3217
  const command = program.commands.find((command2) => command2.name() === "commands");
3565
3218
  if (!command)
3566
3219
  throw new Error("discovery builder did not install its command");
3567
3220
  return command;
3568
- }, SHELL_OVERRIDES.commands);
3221
+ }, reviewedOverrides(reference, SHELL_OVERRIDES.commands));
3569
3222
  }, "installCommandsCommand");
3570
3223
 
3571
3224
  // dist/commands/documents.js
@@ -3847,7 +3500,7 @@ Each item, one level of the tree (--json prints them under "items"):
3847
3500
  child_folders folders directly inside it, or null when not counted (Shared with me, a level of over 1000 folders)
3848
3501
  added whether sync already imports this folder (folders add)
3849
3502
  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),
3503
+ Failures carry error.reason: session.missing (not signed in), oauth.expired (sign in again),
3851
3504
  provider.rate-limited (retry later), not_found code (no such folder).`;
3852
3505
  var PAGE_BOUND = 1e3;
3853
3506
  var COUNTED_LEVEL = 1e3;
@@ -4170,7 +3823,7 @@ var installKnowledgeCommandsDefinition = /* @__PURE__ */ __name((program, helper
4170
3823
  ...terms.has("status") ? { status: terms.get("status") } : {},
4171
3824
  ...terms.has("scope") ? { scope: terms.get("scope") } : {}
4172
3825
  };
4173
- output(allOf((await run3(doc, (k, p, ref) => k.memories(p, ref, { ...filters, limit }))).map(memoryItem)));
3826
+ output(allOf((await run3(doc, (k, p, ref) => k.memories(p, ref, { ...filters, limit }))).items.map(memoryItem)));
4174
3827
  });
4175
3828
  const memoryActions = {
4176
3829
  show: "show one memory",
@@ -4187,7 +3840,7 @@ var installKnowledgeCommandsDefinition = /* @__PURE__ */ __name((program, helper
4187
3840
  const found = await run3(doc, (k, p, ref) => k.searchMemories(p, ref, text, scope2));
4188
3841
  output({
4189
3842
  ...allOf(found.items.map(memoryItem)),
4190
- ...found.limit_reached ? { meta: { truncated: true } } : {}
3843
+ ...found.hasMore ? { meta: { truncated: true } } : {}
4191
3844
  });
4192
3845
  });
4193
3846
  annotate(search, { query: defineQuery(MEMORY_SEARCH_QUERY), output: { entity: "memory" } });
@@ -4227,7 +3880,7 @@ var installKnowledgeCommandsDefinition = /* @__PURE__ */ __name((program, helper
4227
3880
  ...terms.has("kind") ? { type: terms.get("kind") } : {},
4228
3881
  ...terms.has("status") ? { status: terms.get("status") } : {}
4229
3882
  };
4230
- output(allOf((await run3(doc, (k, p, ref) => k.facts(p, ref, { ...filters, limit }))).map(factItem)));
3883
+ output(allOf((await run3(doc, (k, p, ref) => k.facts(p, ref, { ...filters, limit }))).items.map(factItem)));
4231
3884
  });
4232
3885
  const factActions = {
4233
3886
  show: "show one fact",
@@ -4244,13 +3897,14 @@ var installKnowledgeCommandsDefinition = /* @__PURE__ */ __name((program, helper
4244
3897
  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
3898
  }, "installKnowledgeCommandsDefinition");
4246
3899
  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.", () => {
3900
+ const reference = sharedCommandTemplate(DRIVE_APP, "notes");
3901
+ customizeSharedCommand(reference, "Drive notes annotate one explicitly selected imported document; document-bound arguments and receipts replace the generic note scope.", () => {
4248
3902
  installKnowledgeCommandsDefinition(...args);
4249
3903
  const command = args[0].commands.find((command2) => command2.name() === "notes");
4250
3904
  if (!command)
4251
3905
  throw new Error("notes builder did not install its command");
4252
3906
  return command;
4253
- }, SHELL_OVERRIDES.notes);
3907
+ }, reviewedOverrides(reference, SHELL_OVERRIDES.notes));
4254
3908
  }, "installKnowledgeCommands");
4255
3909
 
4256
3910
  // dist/commands/mirrors.js
@@ -4261,7 +3915,7 @@ import { join as join5, resolve } from "node:path";
4261
3915
  import { readFileSync as readFileSync3 } from "node:fs";
4262
3916
 
4263
3917
  // dist/mirror-sheets.js
4264
- import { createHash } from "node:crypto";
3918
+ import { createHash as createHash2 } from "node:crypto";
4265
3919
  import { readFileSync as readFileSync2 } from "node:fs";
4266
3920
  var lastChange = /* @__PURE__ */ __name(async (call, id) => {
4267
3921
  try {
@@ -4369,7 +4023,7 @@ var trimmed = /* @__PURE__ */ __name((rows) => {
4369
4023
  out.pop();
4370
4024
  return out;
4371
4025
  }, "trimmed");
4372
- var hashRows = /* @__PURE__ */ __name((rows) => createHash("sha256").update(JSON.stringify(trimmed(rows))).digest("hex"), "hashRows");
4026
+ var hashRows = /* @__PURE__ */ __name((rows) => createHash2("sha256").update(JSON.stringify(trimmed(rows))).digest("hex"), "hashRows");
4373
4027
  var size = /* @__PURE__ */ __name((rows) => ({ rows: rows.length, columns: Math.max(0, ...rows.map((row) => row.length)) }), "size");
4374
4028
  var quoted = /* @__PURE__ */ __name((title2) => `'${title2.replace(/'/g, "''")}'`, "quoted");
4375
4029
  var range = /* @__PURE__ */ __name((title2, rows, columns) => `${quoted(title2)}!A1:${columnName(Math.max(columns, 1))}${Math.max(rows, 1)}`, "range");
@@ -22850,13 +22504,16 @@ var notImported = /* @__PURE__ */ __name((name, folders, documents) => {
22850
22504
  return void 0;
22851
22505
  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`;
22852
22506
  }, "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");
22507
+ var installSearchCommand = /* @__PURE__ */ __name((...args) => {
22508
+ const reference = sharedCommandTemplate(DRIVE_APP, "search");
22509
+ return customizeSharedCommand(reference, "Drive searches imported documents and embeddings rather than live messenger messages; its default action and pagination are explicitly provider-specific.", () => {
22510
+ installSearchCommandDefinition(...args);
22511
+ const command = args[0].commands.find((command2) => command2.name() === "search");
22512
+ if (!command)
22513
+ throw new Error("search builder did not install its command");
22514
+ return command;
22515
+ }, reviewedOverrides(reference, SHELL_OVERRIDES.search));
22516
+ }, "installSearchCommand");
22860
22517
 
22861
22518
  // dist/commands/session.js
22862
22519
  var GRANTS = ["write", "activity", "apps"];
@@ -22887,7 +22544,7 @@ var installSessionCommands = /* @__PURE__ */ __name((program, context) => {
22887
22544
  const app = application(env, { file: args.clientFile, clientId: args.clientId, profile: selected() });
22888
22545
  if (!app.clientSecret)
22889
22546
  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");
22547
+ const { login } = await import("./login-XHFESAFM.js");
22891
22548
  output(itemOf(await login({
22892
22549
  env,
22893
22550
  profile: selected(),
@@ -22918,7 +22575,7 @@ var installSessionCommands = /* @__PURE__ */ __name((program, context) => {
22918
22575
  const name = selected();
22919
22576
  const config = readConfig(env);
22920
22577
  const profile = activeProfile(env, name);
22921
- const { credentials } = await import("./tokens-MTFJPTYT.js");
22578
+ const { credentials } = await import("./tokens-FGTBE7VW.js");
22922
22579
  const store = credentials(env, profile.storage, options.keyring);
22923
22580
  store.remove(name);
22924
22581
  writeConfig(env, config);
@@ -22965,7 +22622,7 @@ var selection = /* @__PURE__ */ __name((env, name, source) => {
22965
22622
  return { profile, state, options: { source, destination, collection: `google-drive:${profile.principal}`, env } };
22966
22623
  }, "selection");
22967
22624
  var checkStoreImport = /* @__PURE__ */ __name(async (env, name, source, bindings) => {
22968
- const { ensureSqlite } = await import("./sqlite-runtime-UAFJKSJR.js");
22625
+ const { ensureSqlite } = await import("./sqlite-runtime-R7M5XUMW.js");
22969
22626
  await ensureSqlite();
22970
22627
  const { state, options } = selection(env, name, source);
22971
22628
  const preview = await previewDocumentTransfer({ ...options, bindings });
@@ -22978,14 +22635,14 @@ var checkStoreImport = /* @__PURE__ */ __name(async (env, name, source, bindings
22978
22635
  throw new CliError("configuration_error", "this profile already uses the selected store; only an existing transfer can be retried");
22979
22636
  return preview;
22980
22637
  }, "checkStoreImport");
22981
- var importStore = /* @__PURE__ */ __name(async (env, name, source, fingerprint, bindings) => {
22638
+ var importStore = /* @__PURE__ */ __name(async (env, name, source, fingerprint2, bindings) => {
22982
22639
  await checkStoreImport(env, name, source, bindings);
22983
22640
  const lock = await lockProfile(env, name);
22984
22641
  try {
22985
22642
  const { profile, state, options } = selection(env, name, source);
22986
22643
  lock.assertHeld();
22987
22644
  await checkStoreImport(env, name, source, bindings);
22988
- const receipt = await applyDocumentTransfer({ ...options, bindings, expected_fingerprint: fingerprint });
22645
+ const receipt = await applyDocumentTransfer({ ...options, bindings, expected_fingerprint: fingerprint2 });
22989
22646
  for (const [id, document] of Object.entries(state.documents)) {
22990
22647
  const reference = receipt.documents[`${id}.md`];
22991
22648
  if (!reference)
@@ -23139,9 +22796,10 @@ var installSyncCommands = /* @__PURE__ */ __name((program, context) => {
23139
22796
  // dist/commands/upgrade.js
23140
22797
  import { join as join8 } from "node:path";
23141
22798
 
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
22799
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/update/index.js
23143
22800
  import { realpathSync } from "node:fs";
23144
22801
  import { fileURLToPath } from "node:url";
22802
+ var npmRegistry = /* @__PURE__ */ __name(() => hostFetch({ hosts: ["registry.npmjs.org"] }), "npmRegistry");
23145
22803
  var QUIET_WORDS = [
23146
22804
  "--help",
23147
22805
  "-h",
@@ -23165,7 +22823,7 @@ var appUpdate = /* @__PURE__ */ __name((app) => {
23165
22823
  }, "enabled");
23166
22824
  return {
23167
22825
  installer,
23168
- latest: /* @__PURE__ */ __name((environment = {}) => latestVersion(app.packageName, environment.fetch ?? fetch, { timeoutMs: 3e3 }), "latest"),
22826
+ latest: /* @__PURE__ */ __name((environment = {}) => latestVersion(app.packageName, environment.fetch ?? npmRegistry(), { timeoutMs: 3e3 }), "latest"),
23169
22827
  /** The package manager's output goes to stderr, so stdout stays one result. */
23170
22828
  runUpdate: /* @__PURE__ */ __name((argv, environment = {}) => environment.spawn ? environment.spawn(argv) : runUpdate(argv), "runUpdate"),
23171
22829
  /**
@@ -23186,7 +22844,7 @@ var appUpdate = /* @__PURE__ */ __name((app) => {
23186
22844
  command: app.command,
23187
22845
  version: app.version,
23188
22846
  statePath: app.statePath(env),
23189
- fetch: environment.fetch ?? fetch,
22847
+ fetch: environment.fetch ?? npmRegistry(),
23190
22848
  ...environment.now ? { now: environment.now } : {},
23191
22849
  format: pretty ? "pretty" : "json",
23192
22850
  stderrIsTTY: environment.stderrIsTTY ?? process.stderr.isTTY === true,
@@ -23356,8 +23014,8 @@ var documentKnowledge2 = /* @__PURE__ */ __name((store, folder) => {
23356
23014
  tags: await store.notes.noteTags(ref),
23357
23015
  links: await store.notes.links({ from: ref }),
23358
23016
  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),
23017
+ memories: (await store.memories.list({ subject: ref, limit: 100 })).items.map(memoryItem),
23018
+ facts: (await store.facts.list({ subject: ref, limit: 100 })).items.map(factItem),
23361
23019
  people: await port.people(principal, ref)
23362
23020
  };
23363
23021
  }, "context"),
@@ -23484,8 +23142,8 @@ var prepareStore = /* @__PURE__ */ __name(async (index, env, name, rescan = fals
23484
23142
  for (const note2 of page.items) {
23485
23143
  counts.tags += (await old.notes.noteTags(note2.ref)).length;
23486
23144
  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;
23145
+ counts.memories += (await old.memories.list({ subject: note2.ref, limit: 1 })).items.length;
23146
+ counts.facts += (await old.facts.list({ subject: note2.ref, limit: 1 })).items.length;
23489
23147
  counts.links += (await old.notes.links({ from: note2.ref })).filter((link) => link.origin !== "file").length;
23490
23148
  counts.links += (await old.notes.links({ to: note2.ref })).length;
23491
23149
  }
@@ -23563,15 +23221,12 @@ var syncedDocument = /* @__PURE__ */ __name(async (store, driveFileId) => {
23563
23221
  var openIndex = /* @__PURE__ */ __name(async (env, name, rescan = false) => {
23564
23222
  if (name)
23565
23223
  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
23224
  if (env.DRIVE_STORE)
23570
23225
  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 });
23226
+ const { openAppStore } = await import("./cli-KW6QQVS5.js");
23227
+ const store = await openAppStore(env, { app: { command: "drive", version: VERSION }, provider: DRIVE_PROVIDER });
23572
23228
  const index = indexOver(store, env);
23573
23229
  try {
23574
- await store.accounts.registerProvider(DRIVE_PROVIDER);
23575
23230
  if (name)
23576
23231
  await prepareStore(index, env, name, rescan);
23577
23232
  return index;
@@ -23619,7 +23274,7 @@ var indexOver = /* @__PURE__ */ __name((store, env, pictureEmbedder) => {
23619
23274
  linkMessages: /* @__PURE__ */ __name((documents, since) => store.notes.linkMessages({ documents, ...since ? { since } : {} }), "linkMessages"),
23620
23275
  knowledge: documentKnowledge2(store, async (principal) => (await folder(principal, false))?.id),
23621
23276
  openPictures: /* @__PURE__ */ __name(async () => {
23622
- const { openPictureEmbedderFor, savePicture } = await import("./services-TYDMFQCA.js");
23277
+ const { openPictureEmbedderFor, savePicture } = await import("./services-2BOCGMJU.js");
23623
23278
  const embedder = pictureEmbedder ?? await openPictureEmbedderFor({ env, command: "drive" });
23624
23279
  return {
23625
23280
  save: /* @__PURE__ */ __name((reference, bytes) => savePicture(store, { ref: reference }, bytes, { embedder }), "save"),
@@ -23638,7 +23293,7 @@ var indexOver = /* @__PURE__ */ __name((store, env, pictureEmbedder) => {
23638
23293
  has_more: false,
23639
23294
  meaning_skipped: "this Google account has no imported sources"
23640
23295
  };
23641
- const { searchNotes } = await import("./services-TYDMFQCA.js");
23296
+ const { searchNotes } = await import("./services-2BOCGMJU.js");
23642
23297
  const result = await searchNotes(store, query, {
23643
23298
  ...options,
23644
23299
  folderIds: selected ? [selected.id] : [],
@@ -23651,11 +23306,13 @@ var indexOver = /* @__PURE__ */ __name((store, env, pictureEmbedder) => {
23651
23306
  const [file] = await store.files.ofDocument(picture.ref);
23652
23307
  return { ...picture, title: note2.title, url: file?.url ?? null };
23653
23308
  }));
23654
- const { pictures: _, ...rest } = result;
23309
+ const { pictures: _, items, hasMore, nextOffset, ...rest } = result;
23655
23310
  return {
23656
23311
  ...rest,
23312
+ has_more: hasMore,
23313
+ ...nextOffset === void 0 ? {} : { next_offset: nextOffset },
23657
23314
  ...result.pictures ? { pictures } : {},
23658
- hits: await Promise.all(result.hits.map(async (hit) => {
23315
+ hits: await Promise.all(items.map(async (hit) => {
23659
23316
  const note2 = await store.notes.note(hit.ref);
23660
23317
  const metadata = note2.frontMatter;
23661
23318
  const entry = note2.path ? await store.catalog.get(selected.id, note2.path) : void 0;
@@ -23669,7 +23326,7 @@ var indexOver = /* @__PURE__ */ __name((store, env, pictureEmbedder) => {
23669
23326
  };
23670
23327
  }, "search"),
23671
23328
  embed: /* @__PURE__ */ __name(async (max) => {
23672
- const { embedNotes } = await import("./services-TYDMFQCA.js");
23329
+ const { embedNotes } = await import("./services-2BOCGMJU.js");
23673
23330
  return embedNotes(store, { maxChunks: max, env, command: "drive" });
23674
23331
  }, "embed"),
23675
23332
  close: /* @__PURE__ */ __name(() => store.close(), "close")
@@ -23677,7 +23334,7 @@ var indexOver = /* @__PURE__ */ __name((store, env, pictureEmbedder) => {
23677
23334
  }, "indexOver");
23678
23335
 
23679
23336
  // dist/upload.js
23680
- import { createHash as createHash2 } from "node:crypto";
23337
+ import { createHash as createHash3 } from "node:crypto";
23681
23338
  import { createReadStream, mkdirSync as mkdirSync3, readFileSync as readFileSync5, rmSync as rmSync2, statSync as statSync3, writeFileSync as writeFileSync3 } from "node:fs";
23682
23339
  import { open } from "node:fs/promises";
23683
23340
  import { basename, join as join10, resolve as resolve6 } from "node:path";
@@ -23686,7 +23343,7 @@ var FIELDS = "id,name,size,md5Checksum,mimeType,parents";
23686
23343
  var QUANTUM = 256 * 1024;
23687
23344
  var CHUNK_BYTES = 32 * QUANTUM;
23688
23345
  var md5Of = /* @__PURE__ */ __name((path) => new Promise((done2, fail) => {
23689
- const hash = createHash2("md5");
23346
+ const hash = createHash3("md5");
23690
23347
  createReadStream(path).on("data", (chunk) => hash.update(chunk)).on("error", fail).on("end", () => done2(hash.digest("hex")));
23691
23348
  }), "md5Of");
23692
23349
  var nextByte = /* @__PURE__ */ __name((response) => {
@@ -23710,7 +23367,7 @@ var uploadFile = /* @__PURE__ */ __name(async (input) => {
23710
23367
  if (chunk % QUANTUM !== 0)
23711
23368
  throw new CliError("validation_error", "a chunk must be a multiple of 256 KiB");
23712
23369
  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);
23370
+ const key = createHash3("sha256").update(JSON.stringify([path, size2, stat.mtimeMs, name, input.parent ?? ""])).digest("hex").slice(0, 24);
23714
23371
  const checkpointPath = join10(input.stateDir, "uploads", `${key}.json`);
23715
23372
  const readCheckpoint = /* @__PURE__ */ __name(() => {
23716
23373
  try {
@@ -23923,7 +23580,8 @@ var installDrive = /* @__PURE__ */ __name((program) => {
23923
23580
  permissionKeys: knownKeys
23924
23581
  };
23925
23582
  }, "policyFlags");
23926
- const runId = randomUUID2();
23583
+ const fallbackRunId = randomUUID2();
23584
+ const runId = /* @__PURE__ */ __name(() => runs.runId() ?? fallbackRunId, "runId");
23927
23585
  const shown = /* @__PURE__ */ __name(() => outputFor(currentAction ?? program), "shown");
23928
23586
  const print = /* @__PURE__ */ __name((render) => {
23929
23587
  const { renderer, format, streams: out } = shown();
@@ -23934,7 +23592,7 @@ var installDrive = /* @__PURE__ */ __name((program) => {
23934
23592
  const whole = {
23935
23593
  ...snaked,
23936
23594
  meta: {
23937
- run_id: runId,
23595
+ run_id: runId(),
23938
23596
  duration_ms: Math.max(0, Math.round(Date.now() - startedAt)),
23939
23597
  complete: true,
23940
23598
  ...body.meta
@@ -23955,7 +23613,7 @@ var installDrive = /* @__PURE__ */ __name((program) => {
23955
23613
  }, "output");
23956
23614
  const signal = /* @__PURE__ */ __name(() => environment().signal, "signal");
23957
23615
  const signedIn = /* @__PURE__ */ __name(async (name, scope2) => {
23958
- const { authorizedClient, checkAuthorization } = await import("./tokens-MTFJPTYT.js");
23616
+ const { authorizedClient, checkAuthorization } = await import("./tokens-FGTBE7VW.js");
23959
23617
  const client = authorizedClient(env, name, environment().keyring, signal());
23960
23618
  await checkAuthorization(client, scope2);
23961
23619
  return client;
@@ -23965,7 +23623,7 @@ var installDrive = /* @__PURE__ */ __name((program) => {
23965
23623
  const fake = environment().source;
23966
23624
  if (fake)
23967
23625
  return fake(name);
23968
- const [{ googleSource }, client] = await Promise.all([import("./google-DPD5N6AQ.js"), signedIn(name)]);
23626
+ const [{ googleSource }, client] = await Promise.all([import("./google-OBZMWA7J.js"), signedIn(name)]);
23969
23627
  return googleSource(client);
23970
23628
  }, "source");
23971
23629
  const withIndex = /* @__PURE__ */ __name(async (fn, profile) => {
@@ -24109,7 +23767,7 @@ var installDrive = /* @__PURE__ */ __name((program) => {
24109
23767
  if (fake)
24110
23768
  return await fake.call(method, params, body);
24111
23769
  const [{ googleApi }, client] = await Promise.all([
24112
- import("./google-api-P5DRHD7L.js"),
23770
+ import("./google-api-AV4X2JH3.js"),
24113
23771
  signedIn(selected(), descriptor.scope)
24114
23772
  ]);
24115
23773
  return await googleApi(client).call(method, params, body);
@@ -24135,7 +23793,7 @@ var installDrive = /* @__PURE__ */ __name((program) => {
24135
23793
  if (fake)
24136
23794
  return fake(id, mime);
24137
23795
  const [{ googleDownload }, client] = await Promise.all([
24138
- import("./google-api-P5DRHD7L.js"),
23796
+ import("./google-api-AV4X2JH3.js"),
24139
23797
  signedIn(selected(), apiMethod(method).scope)
24140
23798
  ]);
24141
23799
  return googleDownload(client)(id, mime);
@@ -24153,7 +23811,7 @@ var installDrive = /* @__PURE__ */ __name((program) => {
24153
23811
  let request = environment().uploadRequest;
24154
23812
  if (!request) {
24155
23813
  const [{ googleUploadRequest }, client] = await Promise.all([
24156
- import("./google-api-P5DRHD7L.js"),
23814
+ import("./google-api-AV4X2JH3.js"),
24157
23815
  signedIn(selected(), apiMethod(method).scope)
24158
23816
  ]);
24159
23817
  request = googleUploadRequest(client);
@@ -24171,7 +23829,7 @@ var installDrive = /* @__PURE__ */ __name((program) => {
24171
23829
  installRemoteCommands(program, remote);
24172
23830
  installMirrorCommands(program, context, remote);
24173
23831
  installConfigCommands(program, context);
24174
- installCompleteCommand(program, context);
23832
+ program.addCommand(appCompleteCommand(DRIVE_APP, configuration));
24175
23833
  installModelCommands(program, context);
24176
23834
  installCommandsCommand(program, context);
24177
23835
  installUpgradeCommand(program, context);
@@ -24318,7 +23976,7 @@ Availability: unavailable \u2014 ${availability.reason}
24318
23976
  const parse = program.parseAsync.bind(program);
24319
23977
  const scope = {
24320
23978
  get runId() {
24321
- return runs.runId() ?? runId;
23979
+ return runId();
24322
23980
  },
24323
23981
  command: "",
24324
23982
  startedAt,
@@ -24365,7 +24023,7 @@ var mcpCommand = /* @__PURE__ */ __name(() => {
24365
24023
  const environment = environmentOf(action);
24366
24024
  if (environment.api)
24367
24025
  return;
24368
- const { grantAvailability } = await import("./grants-TX4MHLI4.js");
24026
+ const { grantAvailability } = await import("./grants-WTRLN4ZI.js");
24369
24027
  availability = grantAvailability(rootOf(root), environment.env ?? process.env, environment.keyring);
24370
24028
  });
24371
24029
  }, "mcpCommand");