@wirecat/cli-core 3.1.0-dev → 3.2.0-dev

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 (351) hide show
  1. package/CHANGELOG.md +102 -0
  2. package/dist/background/daily-archive-timer.d.ts +1 -1
  3. package/dist/bundle/{agent-RMLBQXJF-CuqJBQqf.js → agent-J75WGZEV-K_l-bQ-h.js} +5 -5
  4. package/dist/bundle/{all-profiles-3GEKS7PR-Bi_zb5_-.js → all-profiles-3GEKS7PR-BohqgNvP.js} +6 -6
  5. package/dist/bundle/{anthropic-EVM6I7MZ-BWI01JgC.js → anthropic-EVM6I7MZ-CqB3j7dB.js} +2 -2
  6. package/dist/bundle/{app-server-76XGUZHU-__6SrMhc.js → app-server-5BL62GAL-Osw_tMej.js} +20 -15
  7. package/dist/bundle/{bun-AWMVU72K-COHrAYHA.js → bun-AWMVU72K-Bk0oN5Sm.js} +2 -2
  8. package/dist/bundle/{bun-sqlite-CYFVVXXR-r_kJOwku.js → bun-sqlite-CYFVVXXR-4iGlaI9X.js} +3 -3
  9. package/dist/bundle/{chunk-4ZM6SE7G-DNDxhi8l.js → chunk-4HGRFFTO-fNvELOjI.js} +330 -56
  10. package/dist/bundle/{chunk-6G6TIMKP-CoVYG_I3.js → chunk-6G6TIMKP-Byea1UGV.js} +4 -4
  11. package/dist/bundle/{chunk-M5CHOMME-BIcASmVb.js → chunk-6OLVBOBX-Ch2rblZk.js} +17 -11
  12. package/dist/bundle/{chunk-CCFBHR4O-DAuKd8rI.js → chunk-CCFBHR4O-Bhxq5eaI.js} +1 -1
  13. package/dist/bundle/{chunk-DDXCCEI4-CHLrblc1.js → chunk-DDXCCEI4-CBg_l4Ro.js} +2 -2
  14. package/dist/bundle/{chunk-DZPIGAKP-nrRAPNTz.js → chunk-DZPIGAKP-BZy6DShN.js} +1 -1
  15. package/dist/bundle/{chunk-ERNCGLKE-4JdU74o6.js → chunk-ERNCGLKE-D3HStkJC.js} +1 -1
  16. package/dist/bundle/{chunk-GBNNGOIB-DVUFOYzA.js → chunk-GBNNGOIB-DS3rusdH.js} +5 -5
  17. package/dist/bundle/{chunk-GJTANPFI-5L6Owk-H.js → chunk-GJTANPFI-DlUMnFUQ.js} +3 -3
  18. package/dist/bundle/{chunk-6ZUQA7OL-ofpF0AvH.js → chunk-GRGGW52W-Fkw6omOx.js} +5 -5
  19. package/dist/bundle/{chunk-KSUALCA7-DB6cYuSU.js → chunk-KSUALCA7-SMNQ85c6.js} +1 -1
  20. package/dist/bundle/{chunk-LBVI4Z2X-COUoJmWU.js → chunk-LBVI4Z2X-D9_8iC1S.js} +1 -1
  21. package/dist/bundle/{chunk-M23BPYSL-ChiHsEsy.js → chunk-M23BPYSL-ByTcRixP.js} +3 -3
  22. package/dist/bundle/{chunk-Z3ZVBBWR-whNBW-iH.js → chunk-M4KMNZN6-CBeUwDlF.js} +2 -2
  23. package/dist/bundle/{chunk-NG7F5L7N-BKCEXGxy.js → chunk-NG7F5L7N-Ch_ERSNz.js} +1 -1
  24. package/dist/bundle/{chunk-NX2VS2ER-DS6Urg3e.js → chunk-NX2VS2ER-CWN0zXqZ.js} +1 -1
  25. package/dist/bundle/{chunk-O2HOOK7X-Dboq6vxP.js → chunk-O2HOOK7X-Dyw_Dcql.js} +4 -4
  26. package/dist/bundle/{chunk-PSD6373C-wlicX185.js → chunk-PSD6373C-DgL0rhKe.js} +1 -1
  27. package/dist/bundle/{chunk-RTCT4N7Y-Dn-lP1zF.js → chunk-RTCT4N7Y-BEZ3cJ5d.js} +1 -1
  28. package/dist/bundle/{chunk-S34BE7ZC-p6NeYmqQ.js → chunk-S34BE7ZC-BO0yaVoX.js} +1 -1
  29. package/dist/bundle/{chunk-E6KETVFF-wOOXf4op.js → chunk-SRAGL5LI-CKhhwRrx.js} +5 -5
  30. package/dist/bundle/{chunk-T6V6LFHT-Dwv7XUuC.js → chunk-T6V6LFHT-BazTZ25Y.js} +1 -1
  31. package/dist/bundle/{chunk-ACWFPMZF-DkR70AOW.js → chunk-TFRAD7RO-BVAK9frq.js} +50 -4
  32. package/dist/bundle/{chunk-UH2H3OLE-R_6H5D7o.js → chunk-UH2H3OLE-QNxQo07O.js} +1 -1
  33. package/dist/bundle/{chunk-UQJGYQ56-CANeLx5l.js → chunk-UQJGYQ56-PoYTv6WX.js} +1 -1
  34. package/dist/bundle/{chunk-VKZDPPVI-d7RS_QOW.js → chunk-VKZDPPVI-BOmnhxVJ.js} +2 -2
  35. package/dist/bundle/{chunk-UNGNJ255-CtLEiDap.js → chunk-W3AAOYWE-Cyx1kZsd.js} +7 -7
  36. package/dist/bundle/{chunk-WXEJSLMO-DbSxVCq9.js → chunk-WXEJSLMO-DCjDRcYe.js} +8 -8
  37. package/dist/bundle/{chunk-XW3IHFDH-CjmXc8aI.js → chunk-XW3IHFDH-CA9Bby7o.js} +1 -1
  38. package/dist/bundle/{chunk-YHBBPJW6-jAof9asy.js → chunk-YHBBPJW6-DKIU2gC4.js} +2 -2
  39. package/dist/bundle/{chunk-YITG2CE5-Bg4SA8X1.js → chunk-YITG2CE5-o18mzaka.js} +1 -1
  40. package/dist/bundle/{chunk-ZMRSCVFX-Dwxb-Yg1.js → chunk-ZMRSCVFX-uhwzmZUP.js} +1 -1
  41. package/dist/bundle/chunks.json +83 -83
  42. package/dist/bundle/{command-contract-4X4JDKH7-BsU8tW9N.js → command-contract-DHFUF6RM-Bnc6nJSk.js} +2 -2
  43. package/dist/bundle/{command-server-entry-3JEJBUK5-CF-VyCRd.js → command-server-entry-UQSMAHYK-DzjTaTCZ.js} +2 -2
  44. package/dist/bundle/{decode-KVUA3TLF-Ds0C1R9U.js → decode-KVUA3TLF-BoJfgCpS.js} +2 -2
  45. package/dist/bundle/{dist-TPSNLFVO-D1tJd0aB.js → dist-TPSNLFVO-55jBf4N-.js} +2 -2
  46. package/dist/bundle/documents.js +5 -5
  47. package/dist/bundle/{echarts-6Q4CQ2DC-BvZMDYNl.js → echarts-6Q4CQ2DC-w9WhKUJu.js} +1 -1
  48. package/dist/bundle/{embed-JGGK2WKR-h5ppwooq.js → embed-JGGK2WKR-Cl3meWl4.js} +2 -2
  49. package/dist/bundle/{embedder-5SIVKVWO-D4yt4YCy.js → embedder-5SIVKVWO-DJEa9hBn.js} +2 -2
  50. package/dist/bundle/{first-run-FFHXPGFC-CyHZ4KM3.js → first-run-BT3X33BP-JikrW5_w.js} +2 -2
  51. package/dist/bundle/{first-screen-2NGQNWIN-BkvwnUdE.js → first-screen-KGQQK446-D2MchUuo.js} +2 -2
  52. package/dist/bundle/{hast-util-from-html-WLAUHN53-BfAYjYKc.js → hast-util-from-html-WLAUHN53-BOWgHBLv.js} +4 -4
  53. package/dist/bundle/{hast-util-to-html-PJC36XDP-C8DGIyzU.js → hast-util-to-html-PJC36XDP-QwbM5c4F.js} +5 -5
  54. package/dist/bundle/{hast-util-to-mdast-ZQ5OFYUM-9p6MJEBi.js → hast-util-to-mdast-ZQ5OFYUM-BidjUANu.js} +6 -6
  55. package/dist/bundle/{index-BOgkxLir.js → index-CTvUjqLX.js} +331 -345
  56. package/dist/bundle/index.js +66 -66
  57. package/dist/bundle/install-IPXFNLYZ-BGKW94IA.js +5 -0
  58. package/dist/bundle/{instructions-NHSD6EUE-BfefgySD.js → instructions-34FSWDC6-BR7mbjJH.js} +2 -2
  59. package/dist/bundle/mail.js +3 -3
  60. package/dist/bundle/{mcp-server-5FM4GA2C-CNWjKPAi.js → mcp-server-5FM4GA2C-B4Sqou0Z.js} +2 -2
  61. package/dist/bundle/mcp.js +12 -12
  62. package/dist/bundle/{mdast-util-from-markdown-Y7N3XA5A-ZkhTz5VO.js → mdast-util-from-markdown-Y7N3XA5A-CBCtetYX.js} +8 -8
  63. package/dist/bundle/{mdast-util-gfm-52PMOHWQ-gfhFQVZ5.js → mdast-util-gfm-52PMOHWQ-Bv-Hkixb.js} +12 -12
  64. package/dist/bundle/{mdast-util-to-hast-4MTEM3TB-Bomsq1EU.js → mdast-util-to-hast-4MTEM3TB-40gSN0gV.js} +6 -6
  65. package/dist/bundle/mdast-util-to-markdown-UGCOLDXA-DnYraMQX.js +12 -0
  66. package/dist/bundle/{meeting-combined-G3OVTNM6-CFHWFlT-.js → meeting-combined-G3OVTNM6-C4Jdctiy.js} +2 -2
  67. package/dist/bundle/{meeting-model-RINL42I5-Bab4crMQ.js → meeting-model-RINL42I5-BLAAT6mv.js} +2 -2
  68. package/dist/bundle/meeting-semantic-I7AZQTEI-DQ19wjn5.js +5 -0
  69. package/dist/bundle/{micromark-extension-gfm-FRHRNOIW-81l4O6kr.js → micromark-extension-gfm-FRHRNOIW-BvJCT_wq.js} +6 -6
  70. package/dist/bundle/{node-ZIYT5JOL-WfCpdwZ2.js → node-ZIYT5JOL-DoWqiI0I.js} +2 -2
  71. package/dist/bundle/{node-sqlite-VFGFD4MA-CrKdzJgw.js → node-sqlite-VFGFD4MA-QH9swjUN.js} +3 -3
  72. package/dist/bundle/notes-search-2Q3C65PA-D2HqYyaY.js +5 -0
  73. package/dist/bundle/oauth-TVUNW3GM-uN6u_RWy.js +7 -0
  74. package/dist/bundle/{open-36SZHLGF-kGan0BjP.js → open-36SZHLGF-CPBs6fdy.js} +1 -1
  75. package/dist/bundle/{openai-Z2WIZ6AC-D-aH-As-.js → openai-Z2WIZ6AC-CcEngcFj.js} +2 -2
  76. package/dist/bundle/preload.js +1 -1
  77. package/dist/bundle/{process-KJQOPRSP-C6W_P1_I.js → process-KJQOPRSP-BNqvUqBZ.js} +2 -2
  78. package/dist/bundle/{prompt-S2W33X57-BEDbCA8B.js → prompt-S2W33X57-BiF1939t.js} +2 -2
  79. package/dist/bundle/{recognize-NBWDLXLD-B2LTlDUy.js → recognize-NBWDLXLD-BCqQ8iG1.js} +2 -2
  80. package/dist/bundle/{remote-O54ANXYL-DOEubnhV.js → remote-O54ANXYL-BixLG9XM.js} +2 -2
  81. package/dist/bundle/{rerank-HTCSXPM6-CVIU4cUa.js → rerank-HTCSXPM6-FGYUs2VW.js} +2 -2
  82. package/dist/bundle/serve-7KRXCBBZ-EVSG16Mc.js +8 -0
  83. package/dist/bundle/server-BFD6QUV7-OmgCCeuX.js +11 -0
  84. package/dist/bundle/server-G7VWUBA2-C3Gq_HlM.js +12 -0
  85. package/dist/bundle/{sqlite-runtime-KC3NKKRB-DYslMC-g.js → sqlite-runtime-KC3NKKRB-y_O8PNsQ.js} +1 -1
  86. package/dist/bundle/{start-Dtq56YXe.js → start-CqQGB7xI.js} +5 -5
  87. package/dist/bundle/start.js +1 -1
  88. package/dist/bundle/state-3CFS2SAC-CYYQ103I.js +5 -0
  89. package/dist/bundle/store-BSVRVKTV-Uot4OGm0.js +5 -0
  90. package/dist/bundle/{store-6CM2A3HP-CtnMVUVK.js → store-LGAEGNFF-BzNIKnoK.js} +2 -2
  91. package/dist/bundle/{store-maintenance-command-WYO5PN4V-B0wefBHZ.js → store-maintenance-command-Z27R7URJ-CoJCYGVq.js} +2 -2
  92. package/dist/bundle/surface-ZEEHYD5Q-DRIV3XG3.js +8 -0
  93. package/dist/bundle/testing.js +8 -8
  94. package/dist/cli/app-doctor-command.d.ts +187 -1
  95. package/dist/cli/app-doctor-command.d.ts.map +1 -1
  96. package/dist/cli/app-doctor-command.js +3 -2
  97. package/dist/cli/app-doctor-command.js.map +1 -1
  98. package/dist/cli/app-mcp-command.d.ts +187 -2
  99. package/dist/cli/app-mcp-command.d.ts.map +1 -1
  100. package/dist/cli/app-mcp-command.js +3 -2
  101. package/dist/cli/app-mcp-command.js.map +1 -1
  102. package/dist/cli/built-commands.d.ts +10 -0
  103. package/dist/cli/built-commands.d.ts.map +1 -0
  104. package/dist/cli/built-commands.js +33 -0
  105. package/dist/cli/built-commands.js.map +1 -0
  106. package/dist/cli/commands-command.d.ts.map +1 -1
  107. package/dist/cli/commands-command.js +3 -2
  108. package/dist/cli/commands-command.js.map +1 -1
  109. package/dist/cli/complete-command.d.ts +187 -2
  110. package/dist/cli/complete-command.d.ts.map +1 -1
  111. package/dist/cli/complete-command.js +3 -2
  112. package/dist/cli/complete-command.js.map +1 -1
  113. package/dist/cli/config-command.d.ts +189 -3
  114. package/dist/cli/config-command.d.ts.map +1 -1
  115. package/dist/cli/config-command.js +3 -2
  116. package/dist/cli/config-command.js.map +1 -1
  117. package/dist/cli/context.d.ts +8 -0
  118. package/dist/cli/context.d.ts.map +1 -1
  119. package/dist/cli/context.js +39 -2
  120. package/dist/cli/context.js.map +1 -1
  121. package/dist/cli/documents/words.d.ts +1 -1
  122. package/dist/cli/dry-run-guard.d.ts.map +1 -1
  123. package/dist/cli/dry-run-guard.js +6 -28
  124. package/dist/cli/dry-run-guard.js.map +1 -1
  125. package/dist/cli/first-run.js +1 -1
  126. package/dist/cli/first-run.js.map +1 -1
  127. package/dist/cli/guide.d.ts.map +1 -1
  128. package/dist/cli/guide.js +3 -2
  129. package/dist/cli/guide.js.map +1 -1
  130. package/dist/cli/messenger/archive-commands.d.ts.map +1 -1
  131. package/dist/cli/messenger/archive-commands.js +3 -2
  132. package/dist/cli/messenger/archive-commands.js.map +1 -1
  133. package/dist/cli/messenger/complete-command.d.ts +187 -2
  134. package/dist/cli/messenger/complete-command.d.ts.map +1 -1
  135. package/dist/cli/messenger/complete-command.js +3 -2
  136. package/dist/cli/messenger/complete-command.js.map +1 -1
  137. package/dist/cli/messenger/doctor-command.d.ts.map +1 -1
  138. package/dist/cli/messenger/doctor-command.js +3 -2
  139. package/dist/cli/messenger/doctor-command.js.map +1 -1
  140. package/dist/cli/messenger/flood-command.d.ts.map +1 -1
  141. package/dist/cli/messenger/flood-command.js +3 -2
  142. package/dist/cli/messenger/flood-command.js.map +1 -1
  143. package/dist/cli/messenger/mcp-command.d.ts.map +1 -1
  144. package/dist/cli/messenger/mcp-command.js +3 -2
  145. package/dist/cli/messenger/mcp-command.js.map +1 -1
  146. package/dist/cli/messenger/metadata-command.d.ts.map +1 -1
  147. package/dist/cli/messenger/metadata-command.js +3 -2
  148. package/dist/cli/messenger/metadata-command.js.map +1 -1
  149. package/dist/cli/messenger/models-command.d.ts.map +1 -1
  150. package/dist/cli/messenger/models-command.js +3 -2
  151. package/dist/cli/messenger/models-command.js.map +1 -1
  152. package/dist/cli/messenger/server-command.d.ts +1 -1
  153. package/dist/cli/messenger/server-command.d.ts.map +1 -1
  154. package/dist/cli/messenger/server-command.js +3 -2
  155. package/dist/cli/messenger/server-command.js.map +1 -1
  156. package/dist/cli/messenger/session-commands.d.ts.map +1 -1
  157. package/dist/cli/messenger/session-commands.js +3 -2
  158. package/dist/cli/messenger/session-commands.js.map +1 -1
  159. package/dist/cli/messenger/store-maintenance-command.d.ts.map +1 -1
  160. package/dist/cli/messenger/store-maintenance-command.js +11 -5
  161. package/dist/cli/messenger/store-maintenance-command.js.map +1 -1
  162. package/dist/cli/model-catalogue-command.d.ts.map +1 -1
  163. package/dist/cli/model-catalogue-command.js +3 -2
  164. package/dist/cli/model-catalogue-command.js.map +1 -1
  165. package/dist/cli/oauth-session.d.ts.map +1 -1
  166. package/dist/cli/oauth-session.js +3 -2
  167. package/dist/cli/oauth-session.js.map +1 -1
  168. package/dist/cli/runs/command.d.ts.map +1 -1
  169. package/dist/cli/runs/command.js +3 -2
  170. package/dist/cli/runs/command.js.map +1 -1
  171. package/dist/cli/schedule/schedule-command.d.ts +1 -1
  172. package/dist/cli/schedule/schedule-command.d.ts.map +1 -1
  173. package/dist/cli/schedule/schedule-command.js +5 -3
  174. package/dist/cli/schedule/schedule-command.js.map +1 -1
  175. package/dist/cli/setup-command.d.ts.map +1 -1
  176. package/dist/cli/setup-command.js +3 -2
  177. package/dist/cli/setup-command.js.map +1 -1
  178. package/dist/cli/skill-command.d.ts.map +1 -1
  179. package/dist/cli/skill-command.js +3 -2
  180. package/dist/cli/skill-command.js.map +1 -1
  181. package/dist/cli/store-info.d.ts.map +1 -1
  182. package/dist/cli/store-info.js +5 -4
  183. package/dist/cli/store-info.js.map +1 -1
  184. package/dist/cli/token-session.d.ts.map +1 -1
  185. package/dist/cli/token-session.js +2 -1
  186. package/dist/cli/token-session.js.map +1 -1
  187. package/dist/cli/upgrade-command.d.ts.map +1 -1
  188. package/dist/cli/upgrade-command.js +4 -5
  189. package/dist/cli/upgrade-command.js.map +1 -1
  190. package/dist/cli/upkeep.d.ts +8 -0
  191. package/dist/cli/upkeep.d.ts.map +1 -0
  192. package/dist/cli/upkeep.js +11 -0
  193. package/dist/cli/upkeep.js.map +1 -0
  194. package/dist/entities/attachment.d.ts +0 -8
  195. package/dist/entities/attachment.d.ts.map +1 -1
  196. package/dist/entities/attachment.js +22 -20
  197. package/dist/entities/attachment.js.map +1 -1
  198. package/dist/entities/chat.d.ts +0 -4
  199. package/dist/entities/chat.d.ts.map +1 -1
  200. package/dist/entities/chat.js +6 -10
  201. package/dist/entities/chat.js.map +1 -1
  202. package/dist/entities/contact.d.ts +0 -7
  203. package/dist/entities/contact.d.ts.map +1 -1
  204. package/dist/entities/contact.js +9 -16
  205. package/dist/entities/contact.js.map +1 -1
  206. package/dist/entities/deal.d.ts +0 -36
  207. package/dist/entities/deal.d.ts.map +1 -1
  208. package/dist/entities/deal.js +22 -48
  209. package/dist/entities/deal.js.map +1 -1
  210. package/dist/entities/document.d.ts +0 -2
  211. package/dist/entities/document.d.ts.map +1 -1
  212. package/dist/entities/document.js +3 -5
  213. package/dist/entities/document.js.map +1 -1
  214. package/dist/entities/fields.d.ts +5 -1
  215. package/dist/entities/fields.d.ts.map +1 -1
  216. package/dist/entities/fields.js +6 -2
  217. package/dist/entities/fields.js.map +1 -1
  218. package/dist/entities/hit.d.ts +0 -18
  219. package/dist/entities/hit.d.ts.map +1 -1
  220. package/dist/entities/hit.js +19 -37
  221. package/dist/entities/hit.js.map +1 -1
  222. package/dist/entities/index.d.ts +0 -1
  223. package/dist/entities/index.d.ts.map +1 -1
  224. package/dist/entities/index.js +2 -3
  225. package/dist/entities/index.js.map +1 -1
  226. package/dist/entities/message.d.ts +2 -34
  227. package/dist/entities/message.d.ts.map +1 -1
  228. package/dist/entities/message.js +35 -67
  229. package/dist/entities/message.js.map +1 -1
  230. package/dist/entities/task.d.ts +0 -19
  231. package/dist/entities/task.d.ts.map +1 -1
  232. package/dist/entities/task.js +18 -35
  233. package/dist/entities/task.js.map +1 -1
  234. package/dist/mcp/agent.d.ts +3 -0
  235. package/dist/mcp/agent.d.ts.map +1 -1
  236. package/dist/mcp/agent.js +48 -1
  237. package/dist/mcp/agent.js.map +1 -1
  238. package/dist/mcp/app-server.d.ts.map +1 -1
  239. package/dist/mcp/app-server.js +8 -5
  240. package/dist/mcp/app-server.js.map +1 -1
  241. package/dist/mcp/bot/instructions.js +1 -1
  242. package/dist/mcp/bot/instructions.js.map +1 -1
  243. package/dist/mcp/index.d.ts +4 -0
  244. package/dist/mcp/index.d.ts.map +1 -1
  245. package/dist/mcp/index.js +4 -0
  246. package/dist/mcp/index.js.map +1 -1
  247. package/dist/mcp/instructions.js +4 -4
  248. package/dist/mcp/instructions.js.map +1 -1
  249. package/dist/mcp/lean.d.ts +9 -0
  250. package/dist/mcp/lean.d.ts.map +1 -0
  251. package/dist/mcp/lean.js +7 -0
  252. package/dist/mcp/lean.js.map +1 -0
  253. package/dist/mcp/server.d.ts.map +1 -1
  254. package/dist/mcp/server.js +6 -2
  255. package/dist/mcp/server.js.map +1 -1
  256. package/dist/mcp/surface.d.ts +51 -2
  257. package/dist/mcp/surface.d.ts.map +1 -1
  258. package/dist/mcp/surface.js +379 -52
  259. package/dist/mcp/surface.js.map +1 -1
  260. package/dist/mcp/tool.d.ts +9 -1
  261. package/dist/mcp/tool.d.ts.map +1 -1
  262. package/dist/mcp/tool.js +20 -6
  263. package/dist/mcp/tool.js.map +1 -1
  264. package/dist/output-detail.d.ts +8 -0
  265. package/dist/output-detail.d.ts.map +1 -1
  266. package/dist/output-detail.js +55 -0
  267. package/dist/output-detail.js.map +1 -1
  268. package/dist/services/package-upgrade.d.ts.map +1 -1
  269. package/dist/services/package-upgrade.js +3 -1
  270. package/dist/services/package-upgrade.js.map +1 -1
  271. package/dist/store/compatibility.d.ts +2 -0
  272. package/dist/store/compatibility.d.ts.map +1 -1
  273. package/dist/store/compatibility.js +12 -0
  274. package/dist/store/compatibility.js.map +1 -1
  275. package/dist/store/migrations.d.ts +3 -3
  276. package/dist/store/migrations.js +3 -3
  277. package/dist/store/sqlite/clients.d.ts +6 -0
  278. package/dist/store/sqlite/clients.d.ts.map +1 -1
  279. package/dist/store/sqlite/clients.js +6 -4
  280. package/dist/store/sqlite/clients.js.map +1 -1
  281. package/dist/store/sqlite/manifest.d.ts +4 -0
  282. package/dist/store/sqlite/manifest.d.ts.map +1 -1
  283. package/dist/store/sqlite/manifest.js.map +1 -1
  284. package/package.json +1 -1
  285. package/skills/link-conversations/SKILL.md +1 -1
  286. package/src/cli/app-doctor-command.ts +41 -42
  287. package/src/cli/app-mcp-command.ts +55 -52
  288. package/src/cli/built-commands.ts +32 -0
  289. package/src/cli/commands-command.ts +3 -2
  290. package/src/cli/complete-command.ts +53 -48
  291. package/src/cli/config-command.ts +180 -177
  292. package/src/cli/context.ts +44 -2
  293. package/src/cli/dry-run-guard.ts +11 -23
  294. package/src/cli/first-run.ts +1 -1
  295. package/src/cli/guide.ts +3 -2
  296. package/src/cli/messenger/archive-commands.ts +3 -2
  297. package/src/cli/messenger/complete-command.ts +30 -30
  298. package/src/cli/messenger/doctor-command.ts +3 -2
  299. package/src/cli/messenger/flood-command.ts +3 -2
  300. package/src/cli/messenger/mcp-command.ts +3 -2
  301. package/src/cli/messenger/metadata-command.ts +3 -2
  302. package/src/cli/messenger/models-command.ts +3 -2
  303. package/src/cli/messenger/server-command.ts +3 -2
  304. package/src/cli/messenger/session-commands.ts +3 -2
  305. package/src/cli/messenger/store-maintenance-command.ts +18 -12
  306. package/src/cli/model-catalogue-command.ts +3 -2
  307. package/src/cli/oauth-session.ts +3 -2
  308. package/src/cli/runs/command.ts +3 -2
  309. package/src/cli/schedule/schedule-command.ts +412 -410
  310. package/src/cli/setup-command.ts +3 -2
  311. package/src/cli/skill-command.ts +3 -2
  312. package/src/cli/store-info.ts +21 -16
  313. package/src/cli/token-session.ts +3 -2
  314. package/src/cli/upgrade-command.ts +59 -62
  315. package/src/cli/upkeep.ts +15 -0
  316. package/src/entities/attachment.ts +44 -30
  317. package/src/entities/chat.ts +9 -10
  318. package/src/entities/contact.ts +20 -21
  319. package/src/entities/deal.ts +66 -53
  320. package/src/entities/document.ts +3 -5
  321. package/src/entities/fields.ts +11 -2
  322. package/src/entities/hit.ts +52 -37
  323. package/src/entities/index.ts +2 -3
  324. package/src/entities/message.ts +101 -80
  325. package/src/entities/task.ts +37 -38
  326. package/src/mcp/agent.ts +51 -1
  327. package/src/mcp/app-server.ts +8 -5
  328. package/src/mcp/bot/instructions.ts +1 -1
  329. package/src/mcp/index.ts +4 -0
  330. package/src/mcp/instructions.ts +4 -4
  331. package/src/mcp/lean.ts +8 -0
  332. package/src/mcp/server.ts +6 -2
  333. package/src/mcp/surface.ts +436 -64
  334. package/src/mcp/tool.ts +27 -4
  335. package/src/output-detail.ts +61 -0
  336. package/src/services/package-upgrade.ts +3 -1
  337. package/src/store/compatibility.ts +12 -0
  338. package/src/store/migrations.ts +3 -3
  339. package/src/store/sqlite/clients.ts +17 -6
  340. package/src/store/sqlite/manifest.ts +4 -0
  341. package/dist/bundle/install-IPXFNLYZ-BSWiztYR.js +0 -5
  342. package/dist/bundle/mdast-util-to-markdown-UGCOLDXA-7D6EJn9r.js +0 -12
  343. package/dist/bundle/meeting-semantic-I7AZQTEI-BgZ3ZzQB.js +0 -5
  344. package/dist/bundle/notes-search-2Q3C65PA-CWKHboCy.js +0 -5
  345. package/dist/bundle/oauth-TVUNW3GM-BqlyhUfp.js +0 -7
  346. package/dist/bundle/serve-7KRXCBBZ-BO9BKhWL.js +0 -8
  347. package/dist/bundle/server-PIT6UZRZ-C6I-VrDd.js +0 -11
  348. package/dist/bundle/server-ZL4FMEHH-DP1oYgCn.js +0 -12
  349. package/dist/bundle/state-3CFS2SAC-xptBCfut.js +0 -5
  350. package/dist/bundle/store-ASWYHJ4Q-C7EFfvzB.js +0 -5
  351. package/dist/bundle/surface-DDH4HGT3-CBZnEqH_.js +0 -8
@@ -7,6 +7,7 @@ import { storePath } from "../../store/path.js"
7
7
  import { openStore } from "../../store/store.js"
8
8
  import { appCompleteCommand } from "../complete-command.js"
9
9
  import type { Configuration } from "../settings.js"
10
+ import { upkeepCommand } from "../upkeep.js"
10
11
  import { recalledAccount } from "./accounts.js"
11
12
  import type { Messenger } from "./context.js"
12
13
 
@@ -19,37 +20,36 @@ export interface CompletionOptions {
19
20
  * `tg complete zsh`, as `appCompleteCommand` answers it, with the profile's chats and people from the message store
20
21
  * if it exists — no store, no names.
21
22
  */
22
- export const completeCommand = (
23
- messenger: Messenger,
24
- config: Pick<Configuration, "configuredProfiles">,
25
- options: CompletionOptions = {},
26
- ): Command =>
27
- appCompleteCommand(messenger.app, config, {
28
- sources: async ({ profile, words, env }) => {
29
- if (!profile) return undefined
30
- const custom = options.sources?.(profile, words, env)
31
- if (custom) return custom
32
- const account = accountOf(messenger, profile, env, options)
33
- const store = account && existsSync(storePath(env)) ? await openStore({ env }).catch(() => undefined) : undefined
34
- if (!store || !account) return sourcesFrom([], [])
35
- try {
36
- // Read up front: `suggest` asks its sources synchronously, and the store answers asynchronously.
37
- const chats = (await store.chats.chats(account, { limit: 500 })).items
38
- const people = (await store.people.people(account.provider, { account: account.account })).all()
39
- const known = new Map(
40
- people.map((person) => [person.id, { value: person.id, description: singleLine(person.name ?? "") }]),
41
- )
42
- for (const chat of chats.filter((chat) => chat.kind === "dialog")) {
43
- const id = messenger.partnerOf ? messenger.partnerOf(chat) : chat.id
44
- if (id !== undefined && !known.has(id))
45
- known.set(id, { value: id, description: singleLine(chat.title ?? "") })
23
+ export const completeCommand = upkeepCommand(
24
+ (messenger: Messenger, config: Pick<Configuration, "configuredProfiles">, options: CompletionOptions = {}): Command =>
25
+ appCompleteCommand(messenger.app, config, {
26
+ sources: async ({ profile, words, env }) => {
27
+ if (!profile) return undefined
28
+ const custom = options.sources?.(profile, words, env)
29
+ if (custom) return custom
30
+ const account = accountOf(messenger, profile, env, options)
31
+ const store =
32
+ account && existsSync(storePath(env)) ? await openStore({ env }).catch(() => undefined) : undefined
33
+ if (!store || !account) return sourcesFrom([], [])
34
+ try {
35
+ // Read up front: `suggest` asks its sources synchronously, and the store answers asynchronously.
36
+ const chats = (await store.chats.chats(account, { limit: 500 })).items
37
+ const people = (await store.people.people(account.provider, { account: account.account })).all()
38
+ const known = new Map(
39
+ people.map((person) => [person.id, { value: person.id, description: singleLine(person.name ?? "") }]),
40
+ )
41
+ for (const chat of chats.filter((chat) => chat.kind === "dialog")) {
42
+ const id = messenger.partnerOf ? messenger.partnerOf(chat) : chat.id
43
+ if (id !== undefined && !known.has(id))
44
+ known.set(id, { value: id, description: singleLine(chat.title ?? "") })
45
+ }
46
+ return sourcesFrom(chats, [...known.values()])
47
+ } finally {
48
+ await store.close()
46
49
  }
47
- return sourcesFrom(chats, [...known.values()])
48
- } finally {
49
- await store.close()
50
- }
51
- },
52
- })
50
+ },
51
+ }),
52
+ )
53
53
 
54
54
  const accountOf = (messenger: Messenger, profile: string, env: NodeJS.ProcessEnv, options: CompletionOptions) => {
55
55
  if (!options.account) return recalledAccount(messenger.app, messenger.provider, profile, env)
@@ -20,6 +20,7 @@ import { itemOf, renderAnswer, snakeKeys } from "../envelope.js"
20
20
  import { unknownPermissionIssues } from "../permission-keys.js"
21
21
  import { NONE_NAMED } from "../settings.js"
22
22
  import { nextStep } from "../steps.js"
23
+ import { upkeepCommand } from "../upkeep.js"
23
24
  import { recalledAccount } from "./accounts.js"
24
25
  import { type DoctorCheck, type Messenger, messengerContext } from "./context.js"
25
26
  import { type PrivateFiles, privateFiles, withSqliteSidecars } from "./private-files.js"
@@ -32,7 +33,7 @@ import { storeSummary } from "./store-maintenance-command.js"
32
33
  * a configuration that will not load, a store written by a newer version, a keyring that will not
33
34
  * open — each is a field in the answer, never an exception.
34
35
  */
35
- export const doctorCommand = (messenger: Messenger): Command => {
36
+ export const doctorCommand = upkeepCommand((messenger: Messenger): Command => {
36
37
  const command = annotate(new Command("doctor"), { effects: REMOTE_READ })
37
38
  .description(DOCTOR_SUMMARY)
38
39
  .option("--online", DOCTOR_ONLINE_OPTION)
@@ -63,7 +64,7 @@ export const doctorCommand = (messenger: Messenger): Command => {
63
64
  })
64
65
  command.addCommand(reportCommand(messenger))
65
66
  return command
66
- }
67
+ })
67
68
 
68
69
  /** @experimental */
69
70
  export const DOCTOR_DEEP_OPTION =
@@ -4,13 +4,14 @@ import { FloodMemory, floodPathFor, holdEnd } from "../../sends/flood.js"
4
4
  import { DEFAULT_PACE, Pacer, pacePathFor } from "../../sends/pace.js"
5
5
  import { grantsAuthority, LOCAL_WRITE } from "../effects.js"
6
6
  import { itemOf, renderAnswer, snakeKeys } from "../envelope.js"
7
+ import { upkeepCommand } from "../upkeep.js"
7
8
  import { type Messenger, messengerContext } from "./context.js"
8
9
 
9
10
  /**
10
11
  * The owner's way out of a remembered wait or a hold on writes, once they know it is over. An agent gets it only
11
12
  * under `mcp.authority`: one that could lift a hold would send straight into a spam limit again.
12
13
  */
13
- export const floodCommand = (messenger: Messenger): Command => {
14
+ export const floodCommand = upkeepCommand((messenger: Messenger): Command => {
14
15
  const { app } = messenger
15
16
  const name = messenger.name ?? app.command
16
17
  return new Command("flood")
@@ -44,4 +45,4 @@ export const floodCommand = (messenger: Messenger): Command => {
44
45
  )
45
46
  }),
46
47
  )
47
- }
48
+ })
@@ -20,6 +20,7 @@ import { MCP_HTTP_DEFAULT_PORT, mcpServerCommand } from "../mcp-server-command.j
20
20
  import { rootOf } from "../profile.js"
21
21
  import { type GlobalFlags, NoProfileHere, namedProfile, type ResolveOptions, type Settings } from "../settings.js"
22
22
  import { nextStep } from "../steps.js"
23
+ import { upkeepCommand } from "../upkeep.js"
23
24
  import { recalledAccount } from "./accounts.js"
24
25
  import { type Messenger, type MessengerContext, messengerContext } from "./context.js"
25
26
 
@@ -205,7 +206,7 @@ const messengerHost = (messenger: Messenger): McpHost => ({
205
206
 
206
207
  export const mcpCommand = (messenger: Messenger): Command => mcpGroup(messengerHost(messenger))
207
208
 
208
- export const mcpGroup = (host: McpHost): Command => {
209
+ export const mcpGroup = upkeepCommand((host: McpHost): Command => {
209
210
  const { app } = host
210
211
  const flagged = (command: Command) => withFlags(command, host.permissionExample)
211
212
  const command = annotate(new Command("mcp"), { effects: LOCAL_READ, mcp: false })
@@ -488,7 +489,7 @@ export const mcpGroup = (host: McpHost): Command => {
488
489
  }),
489
490
  )
490
491
  return command
491
- }
492
+ })
492
493
 
493
494
  /** How the startup and status lines name a set, so the owner sees which accounts an agent reaches. */
494
495
  export const profileSetLabel = (set: ProfileSet): string => {
@@ -4,9 +4,10 @@ import { Command } from "commander"
4
4
  import { FETCH, LOCAL_READ } from "../effects.js"
5
5
  import { itemOf, renderAnswer, snakeKeys } from "../envelope.js"
6
6
  import { positiveCount } from "../paging.js"
7
+ import { upkeepCommand } from "../upkeep.js"
7
8
  import { type Messenger, messengerContext, refuseLocalWrite } from "./context.js"
8
9
 
9
- export const metadataCommand = (messenger: Messenger): Command => {
10
+ export const metadataCommand = upkeepCommand((messenger: Messenger): Command => {
10
11
  const tool = messenger.app.command
11
12
  const command = new Command("metadata").description("cached group/channel descriptions for local automatic tags")
12
13
  annotate(command.command("show"), {
@@ -64,4 +65,4 @@ export const metadataCommand = (messenger: Messenger): Command => {
64
65
  renderAnswer(this, context, itemOf(snakeKeys({ chats: items, has_more: chats.length > limit })))
65
66
  })
66
67
  return command
67
- }
68
+ })
@@ -56,6 +56,7 @@ import {
56
56
  textModelItem,
57
57
  } from "../model-catalogue-command.js"
58
58
  import { nextStep } from "../steps.js"
59
+ import { upkeepCommand } from "../upkeep.js"
59
60
  import type { Messenger } from "./context.js"
60
61
 
61
62
  /**
@@ -239,7 +240,7 @@ const modelKeysCommand = (messenger: Messenger, tool: string): Command => {
239
240
  return key
240
241
  }
241
242
 
242
- export const modelsCommand = (messenger: Messenger): Command => {
243
+ export const modelsCommand = upkeepCommand((messenger: Messenger): Command => {
243
244
  const tool = `${messenger.app.command} personal`
244
245
  const models = new Command("models").description("models that run on this machine")
245
246
  models.addCommand(modelKeysCommand(messenger, tool))
@@ -365,7 +366,7 @@ export const modelsCommand = (messenger: Messenger): Command => {
365
366
  })
366
367
  })
367
368
  return models
368
- }
369
+ })
369
370
 
370
371
  /** `images models`: registered with picture search, the only thing these models serve. */
371
372
  export const imageModelsCommand = (messenger: Messenger): Command => {
@@ -15,6 +15,7 @@ import { type BaseEnvironment, environmentOf } from "../context.js"
15
15
  import { destroysNothing, grantsAuthority, LOCAL_READ, LOCAL_WRITE } from "../effects.js"
16
16
  import { itemOf, renderAnswer, snakeKeys } from "../envelope.js"
17
17
  import { nextStep } from "../steps.js"
18
+ import { upkeepCommand } from "../upkeep.js"
18
19
  import { wholeList } from "./chat-answers.js"
19
20
  import { type Messenger, type MessengerContext, messengerContext } from "./context.js"
20
21
 
@@ -112,7 +113,7 @@ const lockProcess =
112
113
  * under linger) until `uninstall`. What the server does stays each CLI's; `options.process` says how to find,
113
114
  * start and stop it.
114
115
  */
115
- export const serverCommand = (messenger: Messenger, options: ServerOptions = {}): Command => {
116
+ export const serverCommand = upkeepCommand((messenger: Messenger, options: ServerOptions = {}): Command => {
116
117
  const { app } = messenger
117
118
  const command = new Command("server")
118
119
  .summary("manage this profile's background server")
@@ -458,7 +459,7 @@ export const serverCommand = (messenger: Messenger, options: ServerOptions = {})
458
459
  })
459
460
 
460
461
  return command
461
- }
462
+ })
462
463
 
463
464
  const wholeNumber = (value: string): number => {
464
465
  const parsed = Number(value)
@@ -9,6 +9,7 @@ import { itemOf, renderAnswer } from "../envelope.js"
9
9
  import { queryTerms, withQuery } from "../list-query.js"
10
10
  import { profileFree } from "../profile.js"
11
11
  import { NONE_NAMED } from "../settings.js"
12
+ import { upkeepCommand } from "../upkeep.js"
12
13
  import { ACCOUNT_PROFILES_QUERY } from "./account-profile-query.js"
13
14
  import { recalledAccount } from "./accounts.js"
14
15
  import { accountAnswer, wholeList } from "./chat-answers.js"
@@ -58,7 +59,7 @@ export const listProfiles = async (command: Command, messenger: Messenger, words
58
59
  * `session status` and `session list`, for a messenger's own `session` group beside its `start` and `end`
59
60
  * (WC-ACCT-12). Both read this computer; only `status --check` asks the messenger.
60
61
  */
61
- export const messengerSessionCommands = (messenger: Messenger): Command[] => {
62
+ export const messengerSessionCommands = upkeepCommand((messenger: Messenger): Command[] => {
62
63
  const cli = messenger.app.command
63
64
  const status = annotate(new Command("status"), {
64
65
  effects: REMOTE_READ,
@@ -114,4 +115,4 @@ export const messengerSessionCommands = (messenger: Messenger): Command[] => {
114
115
  await listProfiles(this, messenger, words, "session list")
115
116
  })
116
117
  return [status, list]
117
- }
118
+ })
@@ -22,7 +22,7 @@ import type { AppIdentity } from "../../ports/app.js"
22
22
  import { syncsOneChat } from "../../ports/traits.js"
23
23
  import { isSealed, sealFile, unsealFile } from "../../sealed.js"
24
24
  import { refuseLockedOutput } from "../../sends/upload.js"
25
- import { fileSchemaOf, SPEAKS, writableBy } from "../../store/compatibility.js"
25
+ import { fileSchemaOf, pendingLockout, SPEAKS, writableBy } from "../../store/compatibility.js"
26
26
  import { storeDamageReport } from "../../store/damage.js"
27
27
  import type { CacheDatabase } from "../../store/driver.js"
28
28
  import { QUICK_HEALTH_CHECKS, storeHealth } from "../../store/health.js"
@@ -62,6 +62,7 @@ import { inStoreBackups } from "../path-options.js"
62
62
  import { commandAt, lineOf, nextStep } from "../steps.js"
63
63
  import { storeInfoCommand } from "../store-info.js"
64
64
  import { storeRecoverCommand } from "../store-recover.js"
65
+ import { upkeepCommand } from "../upkeep.js"
65
66
  import { answerOf } from "./ask.js"
66
67
  import type { Messenger } from "./context.js"
67
68
  import { ENCRYPT_OPTION, passwordOf } from "./password.js"
@@ -236,14 +237,16 @@ const EXAMPLES: Record<string, string> = {
236
237
  * Mounts the store file's commands — `store info`, `check`, `backup`, `restore`, `repair` and the rest — on a CLI's
237
238
  * `store` group, with examples under `profile`. Every WireCat tool shares the one file, so any of them looks after it.
238
239
  */
239
- export const addStoreMaintenanceCommands = (store: Command, owner: StoreOwner, profile: string): Command => {
240
- for (const command of storeMaintenanceCommands(owner)) store.addCommand(command)
241
- for (const [path, args] of Object.entries(EXAMPLES)) {
242
- const command = commandAt(store, path)
243
- if (command) annotate(command, { examples: [`${owner.app.command} ${profile} store ${path} ${args}`.trimEnd()] })
244
- }
245
- return store
246
- }
240
+ export const addStoreMaintenanceCommands = upkeepCommand(
241
+ (store: Command, owner: StoreOwner, profile: string): Command => {
242
+ for (const command of storeMaintenanceCommands(owner)) store.addCommand(command)
243
+ for (const [path, args] of Object.entries(EXAMPLES)) {
244
+ const command = commandAt(store, path)
245
+ if (command) annotate(command, { examples: [`${owner.app.command} ${profile} store ${path} ${args}`.trimEnd()] })
246
+ }
247
+ return store
248
+ },
249
+ )
247
250
 
248
251
  /** Renaming tables under a running `serve` would pull them from under its statements. */
249
252
  const refuseWhileServing = (command: Command, owner: StoreOwner) => {
@@ -338,9 +341,10 @@ const checkCommand = (owner: StoreOwner): Command =>
338
341
  result(this, { path, exists: false, ok: true })
339
342
  return
340
343
  }
341
- let answer: Awaited<ReturnType<typeof inspect>>
344
+ let answer: Omit<Awaited<ReturnType<typeof inspect>>, "lockout">
345
+ let lockout: string | undefined
342
346
  try {
343
- answer = await inspect(path)
347
+ ;({ lockout, ...answer } = await inspect(path, owner.app.command))
344
348
  } catch (error) {
345
349
  result(this, { path, exists: true, ok: false, opens: false, error: messageOf(error) })
346
350
  return
@@ -364,6 +368,7 @@ const checkCommand = (owner: StoreOwner): Command =>
364
368
  renderer.note(
365
369
  `the file is behind this build — a copy first, \`${command} store backup <file>\`, then \`${command} store migrate\``,
366
370
  )
371
+ if (lockout) renderer.warn(lockout)
367
372
  } else if (!answer.schema.writable) {
368
373
  renderer.note(
369
374
  `the file is at schema ${answer.schema.version} and needs at least ${answer.schema.minCompatible}; ` +
@@ -391,7 +396,7 @@ const checkCommand = (owner: StoreOwner): Command =>
391
396
  }
392
397
  })
393
398
 
394
- const inspect = (path: string) =>
399
+ const inspect = (path: string, command: string) =>
395
400
  reading(path, (database) => {
396
401
  const schema = schemaOf(database)
397
402
  const integrity = database
@@ -445,6 +450,7 @@ const inspect = (path: string) =>
445
450
  conversations: conversationsBuilt(database),
446
451
  vectors: vectorsHeld(database),
447
452
  vectorIndexes,
453
+ lockout: pendingLockout(database, command),
448
454
  }
449
455
  })
450
456
 
@@ -22,6 +22,7 @@ import { listQuery, nativeTerms, termField, typedQuery, withQuery } from "./list
22
22
  import { localOnlyCommand } from "./local-only-command.js"
23
23
  import { pictureReadingCommand } from "./picture-reading-command.js"
24
24
  import { harderConsentsCommand } from "./search-harder-consents-command.js"
25
+ import { upkeepCommand } from "./upkeep.js"
25
26
 
26
27
  /** @experimental */
27
28
  export const MODEL_CATALOGUE_QUERY = defineQuery({
@@ -54,7 +55,7 @@ export interface ModelCatalogueOptions {
54
55
  }
55
56
 
56
57
  /** Provider composition supplies I/O and supported kinds; parsing, receipts and download policy stay shared. */
57
- export const modelCatalogueCommand = (app: AppIdentity, options: ModelCatalogueOptions): Command => {
58
+ export const modelCatalogueCommand = upkeepCommand((app: AppIdentity, options: ModelCatalogueOptions): Command => {
58
59
  if (options.kinds.length === 0) throw new CliError("configuration_error", "declare at least one supported model kind")
59
60
  const audio = (id: string, env: NodeJS.ProcessEnv) => {
60
61
  const model = speechModel(id)
@@ -189,7 +190,7 @@ export const modelCatalogueCommand = (app: AppIdentity, options: ModelCatalogueO
189
190
  for (const command of models.commands.flatMap((one) => (one.commands.length ? one.commands : [one])))
190
191
  command.option("--json", "print JSON")
191
192
  return models
192
- }
193
+ })
193
194
 
194
195
  const PROVIDER = /^[a-z0-9][a-z0-9.:-]*$/
195
196
 
@@ -26,6 +26,7 @@ import type { TokenStorage } from "./profile-token.js"
26
26
  import type { ServiceApiManifest } from "./service-api-manifest.js"
27
27
  import type { GlobalFlags, ResolveOptions, Settings } from "./settings.js"
28
28
  import { storageOf, unknownSignIn } from "./token-session.js"
29
+ import { upkeepCommand } from "./upkeep.js"
29
30
 
30
31
  /**
31
32
  * The authorization code flow an OpenAPI spec declares; a GraphQL service (Linear) writes the same object by hand.
@@ -175,7 +176,7 @@ const PASTE_PROMPT = "the address the browser shows after you allow access, when
175
176
  * removes the owner's sign-in.
176
177
  * @experimental
177
178
  */
178
- export const oauthSessionCommand = (options: OAuthSessionOptions): Command => {
179
+ export const oauthSessionCommand = upkeepCommand((options: OAuthSessionOptions): Command => {
179
180
  const { app, providerId, service } = options
180
181
  const codec = options.codec ?? standardCodec(providerId)
181
182
  const pathsOf = (env: NodeJS.ProcessEnv) => ({ appName: app.appName, prefix: app.envPrefix, env })
@@ -437,4 +438,4 @@ export const oauthSessionCommand = (options: OAuthSessionOptions): Command => {
437
438
  .addCommand(status)
438
439
  .addCommand(end)
439
440
  .addCommand(list)
440
- }
441
+ })
@@ -10,10 +10,11 @@ import { typedQuery, withQuery } from "../list-query.js"
10
10
  import { answerLocally } from "../local-times.js"
11
11
  import { configuredLimit, positiveCount } from "../paging.js"
12
12
  import { lineOf } from "../steps.js"
13
+ import { upkeepCommand } from "../upkeep.js"
13
14
  import { RUNS_QUERY, runListFilter } from "./query.js"
14
15
 
15
16
  /** Reading the log is not itself worth recording, so **nothing here starts a run**. */
16
- export const runsCommand = (app: AppIdentity): Command => {
17
+ export const runsCommand = upkeepCommand((app: AppIdentity): Command => {
17
18
  const command = new Command("runs").description("recorded runs — what this tool did, and when")
18
19
  const dir = (from: Command) => runsDirFor(app, environmentOf(from).env ?? process.env)
19
20
  const runOrRefuse = (from: Command, id: string) => {
@@ -103,7 +104,7 @@ export const runsCommand = (app: AppIdentity): Command => {
103
104
  })
104
105
 
105
106
  return command
106
- }
107
+ })
107
108
 
108
109
  /** What went wrong, and nothing that went right. */
109
110
  const notable = (event: Record<string, unknown>): boolean =>