@wirecat/cli-memo 0.131.77 → 0.131.79

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 (158) hide show
  1. package/dist/bin/memo.js +2 -2
  2. package/dist/bundle/{all-profiles-4UWCPMRQ.js → all-profiles-ZMIHTBZD.js} +9 -9
  3. package/dist/bundle/{anthropic-HECHQVOK.js → anthropic-PNRUKJHS.js} +6 -6
  4. package/dist/bundle/{app-server-GQEQWFYQ.js → app-server-RNASTWZO.js} +41 -41
  5. package/dist/bundle/auto-TRSJQGJH.js +91 -0
  6. package/dist/bundle/{bun-IWGIAD7H.js → bun-QU4I5GWB.js} +2 -2
  7. package/dist/bundle/{bun-sqlite-VJFM4TVN.js → bun-sqlite-J4KG5VML.js} +10 -6
  8. package/dist/bundle/{chunk-D7KQYLAN.js → chunk-24FOGKJI.js} +7 -7
  9. package/dist/bundle/{chunk-JKLJM7EG.js → chunk-2C536VQW.js} +1 -1
  10. package/dist/bundle/{chunk-3QBRLN6T.js → chunk-2EGS6BXF.js} +2 -2
  11. package/dist/bundle/{chunk-JSGRDE5Q.js → chunk-2TIK6LHL.js} +443 -344
  12. package/dist/bundle/{chunk-PPARTGFE.js → chunk-3GOMBG55.js} +8 -8
  13. package/dist/bundle/{chunk-OQSIFLZS.js → chunk-3HCGK4FN.js} +1 -1
  14. package/dist/bundle/{chunk-MRUE3BWX.js → chunk-46Z7UUCG.js} +1 -1
  15. package/dist/bundle/{chunk-ZPB3VTS7.js → chunk-4BSNHOEV.js} +28 -11
  16. package/dist/bundle/{chunk-BNOSAHVH.js → chunk-4FPSZCWN.js} +2 -2
  17. package/dist/bundle/{chunk-4VO2RJAE.js → chunk-4XOAQ5EQ.js} +10 -10
  18. package/dist/bundle/{chunk-6A37YXAL.js → chunk-5LEIPSJG.js} +24 -0
  19. package/dist/bundle/{chunk-M4MM4QUM.js → chunk-5YS4WS74.js} +1 -1
  20. package/dist/bundle/{chunk-HFZHXP4U.js → chunk-6ZO2ZVKV.js} +5 -5
  21. package/dist/bundle/{chunk-C3HS26N5.js → chunk-7SGURCSQ.js} +1 -1
  22. package/dist/bundle/chunk-A5TSIMI2.js +53 -0
  23. package/dist/bundle/{chunk-UDRKGCDS.js → chunk-AWUANCLC.js} +1 -1
  24. package/dist/bundle/{chunk-KYW7RWGE.js → chunk-BBJBWSGN.js} +2 -2
  25. package/dist/bundle/{chunk-OAWNQZ3V.js → chunk-CLZHPHKI.js} +3 -3
  26. package/dist/bundle/{chunk-NGWUFB4K.js → chunk-CQPXUMIS.js} +1 -1
  27. package/dist/bundle/{chunk-LO74ISD6.js → chunk-CX3D6D43.js} +3 -3
  28. package/dist/bundle/{chunk-5APYWW46.js → chunk-CY7WACM7.js} +31 -31
  29. package/dist/bundle/{chunk-7YALAAL4.js → chunk-DAJEINOF.js} +1193 -905
  30. package/dist/bundle/{chunk-EXFRC4OT.js → chunk-DCK5AT3D.js} +1 -1
  31. package/dist/bundle/{chunk-JTLPFUIQ.js → chunk-DP2RZ6FO.js} +3 -3
  32. package/dist/bundle/{chunk-YZ4J67GU.js → chunk-FCHVDLEL.js} +3 -3
  33. package/dist/bundle/{chunk-BFEXVALS.js → chunk-GDSCR5BG.js} +1 -1
  34. package/dist/bundle/{chunk-AH6V2UJZ.js → chunk-GJ7KTKIP.js} +16 -16
  35. package/dist/bundle/{chunk-DJYMK7EI.js → chunk-GTYESBB2.js} +3 -3
  36. package/dist/bundle/{chunk-TIHQFMH2.js → chunk-H6QELEPY.js} +6 -6
  37. package/dist/bundle/{chunk-6VISMU6R.js → chunk-HKOHKYDY.js} +7 -7
  38. package/dist/bundle/{chunk-IYINNZQE.js → chunk-IE6AEPW3.js} +10 -10
  39. package/dist/bundle/{chunk-EY46RMMS.js → chunk-IHWPNLCI.js} +170 -152
  40. package/dist/bundle/{chunk-76T57Y3Q.js → chunk-IU2QDYBO.js} +5 -5
  41. package/dist/bundle/{chunk-W36BMC6F.js → chunk-J2KPUG2X.js} +4 -4
  42. package/dist/bundle/{chunk-VMTTWF2M.js → chunk-JDI7CKLO.js} +7 -7
  43. package/dist/bundle/{chunk-CPKS7JKX.js → chunk-JX4YNSYT.js} +1 -1
  44. package/dist/bundle/{chunk-WZZ426CJ.js → chunk-LQBVQX47.js} +80 -80
  45. package/dist/bundle/{chunk-6RN34ZWU.js → chunk-MQ6XB6BV.js} +5 -5
  46. package/dist/bundle/{chunk-UIS44ZMF.js → chunk-O4ZIN4AY.js} +6 -6
  47. package/dist/bundle/{chunk-TFXKS2WG.js → chunk-OP5MKU7T.js} +1 -1
  48. package/dist/bundle/{chunk-XLZPP5MB.js → chunk-PB4ZGGR4.js} +1 -1
  49. package/dist/bundle/{chunk-MZHH5XMX.js → chunk-PI42ZHZQ.js} +2 -2
  50. package/dist/bundle/{chunk-QNJ6O6J4.js → chunk-Q5YM3JWV.js} +2 -2
  51. package/dist/bundle/{chunk-3URQNBDV.js → chunk-QNI3Q7XS.js} +2 -2
  52. package/dist/bundle/{chunk-OB3OPV55.js → chunk-QOFD6JSB.js} +5 -5
  53. package/dist/bundle/{chunk-CFZZUGUD.js → chunk-R24Q24U5.js} +26 -23
  54. package/dist/bundle/{chunk-X2SA73EE.js → chunk-RK24IARI.js} +1 -1
  55. package/dist/bundle/{chunk-VIY77EDM.js → chunk-RMKJWDVT.js} +47 -47
  56. package/dist/bundle/{chunk-TXXKLYJQ.js → chunk-RUHFWDHD.js} +3 -3
  57. package/dist/bundle/{chunk-2IQWMWMC.js → chunk-SB3AOH3M.js} +3 -3
  58. package/dist/bundle/{chunk-4EFQOTNQ.js → chunk-SEIRBXJT.js} +7 -7
  59. package/dist/bundle/{chunk-INXIJXU2.js → chunk-SM7PB5CU.js} +7 -7
  60. package/dist/bundle/{chunk-UD5JUJES.js → chunk-TBCHID7L.js} +23644 -22657
  61. package/dist/bundle/{chunk-HKDUGTWQ.js → chunk-TH3LLEA2.js} +3 -3
  62. package/dist/bundle/{chunk-LHVNZ25W.js → chunk-U3VXKVKI.js} +12 -12
  63. package/dist/bundle/{chunk-A54EZ6DV.js → chunk-UC5YCXKS.js} +15 -14
  64. package/dist/bundle/{chunk-DE5BNDIA.js → chunk-UYKKJOND.js} +4 -4
  65. package/dist/bundle/{chunk-SHO3T3F2.js → chunk-VIZBCX3C.js} +4 -4
  66. package/dist/bundle/{chunk-DNPE4LOZ.js → chunk-VSSWVVOZ.js} +11 -11
  67. package/dist/bundle/{chunk-2DLCQ4AK.js → chunk-WN7BSOD2.js} +1 -1
  68. package/dist/bundle/{chunk-S5T4SO7I.js → chunk-XO6RP5FV.js} +20 -2
  69. package/dist/bundle/{chunk-KTBPBMNR.js → chunk-YJUVVYS6.js} +5 -5
  70. package/dist/bundle/{chunk-ZPPMGXER.js → chunk-ZFUYVQII.js} +34 -34
  71. package/dist/bundle/{chunk-HWIKY7KF.js → chunk-ZIDR2CSX.js} +2 -2
  72. package/dist/bundle/command-contract-4ZJOMSQ2.js +34 -0
  73. package/dist/bundle/{command-server-entry-TQBKNSM3.js → command-server-entry-VSWZ5K2Q.js} +21 -21
  74. package/dist/bundle/{decode-VFRSEIBD.js → decode-OPD4OHCW.js} +6 -6
  75. package/dist/bundle/{dispatch-N73TJNYM.js → dispatch-BRRZ6TLX.js} +1 -1
  76. package/dist/bundle/{echarts-DP2GC2C6.js → echarts-AXYKRYU7.js} +2 -2
  77. package/dist/bundle/{embed-BIINGRNY.js → embed-6DBZRTQ7.js} +7 -7
  78. package/dist/bundle/{embedder-2AUO2PHQ.js → embedder-SQI6IDZC.js} +10 -10
  79. package/dist/bundle/{entry-APUFP74B.js → entry-2GKNMGW6.js} +9 -9
  80. package/dist/bundle/{entry-LGJ2Y7AS.js → entry-RV5QAV44.js} +9 -9
  81. package/dist/bundle/failure-7RJ4HOL4.js +71 -0
  82. package/dist/bundle/{failure-IPHFR3KW.js → failure-ECNGLVHX.js} +2 -2
  83. package/dist/bundle/{first-run-7UMKRQL7.js → first-run-BBMUDHYX.js} +10 -10
  84. package/dist/bundle/first-screen-4BS5M4JW.js +32 -0
  85. package/dist/bundle/{instructions-WDKCHEG6.js → instructions-JNAROG65.js} +1 -1
  86. package/dist/bundle/mcp-3MBYSBNS.js +92 -0
  87. package/dist/bundle/memo.js +6 -6
  88. package/dist/bundle/{node-QBL3F2VF.js → node-6OTEDFSP.js} +2 -2
  89. package/dist/bundle/{node-sqlite-WFKC73E5.js → node-sqlite-HBHJOJX6.js} +11 -7
  90. package/dist/bundle/{oauth-4PT7N4SE.js → oauth-PVQSSPPE.js} +8 -8
  91. package/dist/bundle/{open-I7XENSGI.js → open-ARBTD4LX.js} +6 -6
  92. package/dist/bundle/{openai-DUSBTUFI.js → openai-2JRFTWUA.js} +11 -11
  93. package/dist/bundle/{process-TVXEHAK6.js → process-4ERCV4WX.js} +1 -1
  94. package/dist/bundle/{program-3X4EPBEW.js → program-5KVHPFJU.js} +299 -133
  95. package/dist/bundle/{prompt-QRYXTON7.js → prompt-4I34VBPK.js} +6 -6
  96. package/dist/bundle/{recognize-ZLDPIN36.js → recognize-22BJ7RWB.js} +5 -5
  97. package/dist/bundle/{remote-3GRP5YE3.js → remote-BON3MKY5.js} +8 -8
  98. package/dist/bundle/{rerank-6B2FI6LN.js → rerank-6CCCIZDS.js} +8 -8
  99. package/dist/bundle/{serve-ZP3TEANT.js → serve-FB54DFIV.js} +10 -10
  100. package/dist/bundle/server-SG4BOF6U.js +64 -0
  101. package/dist/bundle/{server-3SJJNNSX.js → server-TL5WPR3I.js} +59 -59
  102. package/dist/bundle/server-UYEXFEEB.js +50 -0
  103. package/dist/bundle/{state-JDH2X2CY.js → state-23IF45K6.js} +7 -7
  104. package/dist/bundle/{store-FDNYGJUF.js → store-FGNXSGJU.js} +13 -13
  105. package/dist/bundle/store-maintenance-command-PDLIZ4J2.js +49 -0
  106. package/dist/bundle/update-QTZREQD6.js +74 -0
  107. package/dist/examples.d.ts.map +1 -1
  108. package/dist/examples.js +12 -3
  109. package/dist/examples.js.map +1 -1
  110. package/dist/mcp/catalogue.d.ts +4 -4
  111. package/dist/mcp/catalogue.d.ts.map +1 -1
  112. package/dist/mcp/catalogue.js +2 -2
  113. package/dist/mcp/catalogue.js.map +1 -1
  114. package/dist/people/command.d.ts.map +1 -1
  115. package/dist/people/command.js +3 -2
  116. package/dist/people/command.js.map +1 -1
  117. package/dist/people/doubts-command.d.ts +5 -0
  118. package/dist/people/doubts-command.d.ts.map +1 -0
  119. package/dist/people/doubts-command.js +46 -0
  120. package/dist/people/doubts-command.js.map +1 -0
  121. package/dist/people/identities-command.d.ts.map +1 -1
  122. package/dist/people/identities-command.js +54 -57
  123. package/dist/people/identities-command.js.map +1 -1
  124. package/dist/people/proposal-rows.d.ts +48 -0
  125. package/dist/people/proposal-rows.d.ts.map +1 -0
  126. package/dist/people/proposal-rows.js +61 -0
  127. package/dist/people/proposal-rows.js.map +1 -0
  128. package/dist/people/proposals-command.d.ts +5 -0
  129. package/dist/people/proposals-command.d.ts.map +1 -0
  130. package/dist/people/proposals-command.js +107 -0
  131. package/dist/people/proposals-command.js.map +1 -0
  132. package/dist/reasons.d.ts.map +1 -1
  133. package/dist/reasons.js +18 -0
  134. package/dist/reasons.js.map +1 -1
  135. package/dist/review/kinds.d.ts +1 -1
  136. package/dist/review/kinds.d.ts.map +1 -1
  137. package/dist/review/kinds.js +1 -0
  138. package/dist/review/kinds.js.map +1 -1
  139. package/dist/sources/readers/ai-model.js +3 -3
  140. package/dist/sources/readers/ai-model.js.map +1 -1
  141. package/dist/tasks/shared.d.ts.map +1 -1
  142. package/dist/tasks/shared.js +14 -2
  143. package/dist/tasks/shared.js.map +1 -1
  144. package/dist/version.d.ts +1 -1
  145. package/dist/version.js +1 -1
  146. package/package.json +2 -2
  147. package/skills/cli-memo/topics/proposals.md +10 -6
  148. package/dist/bundle/auto-3O7JD27U.js +0 -91
  149. package/dist/bundle/chunk-YABNPKKQ.js +0 -35
  150. package/dist/bundle/command-contract-SEDOYJIJ.js +0 -34
  151. package/dist/bundle/failure-5QSMH2CD.js +0 -71
  152. package/dist/bundle/first-screen-H5CQSLIX.js +0 -32
  153. package/dist/bundle/mcp-3HKOGYHL.js +0 -92
  154. package/dist/bundle/server-72VZYABL.js +0 -50
  155. package/dist/bundle/server-UY47EXPQ.js +0 -64
  156. package/dist/bundle/store-maintenance-command-5LFS45JM.js +0 -49
  157. package/dist/bundle/update-257J2SPM.js +0 -74
  158. /package/dist/bundle/{chunk-6AALVDEA.js → chunk-2AFREBSM.js} +0 -0
@@ -6,18 +6,18 @@ import {
6
6
  autoState,
7
7
  lastAutoRun,
8
8
  recordAutoRun
9
- } from "./chunk-76T57Y3Q.js";
9
+ } from "./chunk-IU2QDYBO.js";
10
10
  import {
11
11
  installer,
12
12
  latest,
13
13
  upgradeCommand
14
- } from "./chunk-INXIJXU2.js";
14
+ } from "./chunk-SM7PB5CU.js";
15
15
  import {
16
16
  mcpOwnerAllowed,
17
17
  memoLevels,
18
18
  readOnlyAvailability,
19
19
  refuseWritesUnderLock
20
- } from "./chunk-6RN34ZWU.js";
20
+ } from "./chunk-MQ6XB6BV.js";
21
21
  import {
22
22
  answers,
23
23
  atDetail,
@@ -29,7 +29,7 @@ import {
29
29
  trackAnswers,
30
30
  wholeList,
31
31
  withStore
32
- } from "./chunk-D7KQYLAN.js";
32
+ } from "./chunk-24FOGKJI.js";
33
33
  import {
34
34
  ATTACHMENT_CHARS,
35
35
  DIALECTS,
@@ -66,15 +66,15 @@ import {
66
66
  showMail,
67
67
  unsetConfigKey,
68
68
  updateConfig
69
- } from "./chunk-ZPPMGXER.js";
69
+ } from "./chunk-ZFUYVQII.js";
70
70
  import "./chunk-QP3KNC5D.js";
71
- import "./chunk-QNJ6O6J4.js";
72
- import "./chunk-PPARTGFE.js";
73
- import "./chunk-OAWNQZ3V.js";
71
+ import "./chunk-Q5YM3JWV.js";
72
+ import "./chunk-3GOMBG55.js";
73
+ import "./chunk-CLZHPHKI.js";
74
74
  import {
75
75
  errorObject,
76
76
  recognisable
77
- } from "./chunk-TIHQFMH2.js";
77
+ } from "./chunk-H6QELEPY.js";
78
78
  import {
79
79
  provideTerminal,
80
80
  terminalOf
@@ -151,34 +151,34 @@ import {
151
151
  thisMachine,
152
152
  withSqliteSidecars,
153
153
  writeSchedule
154
- } from "./chunk-7YALAAL4.js";
155
- import "./chunk-BFEXVALS.js";
154
+ } from "./chunk-DAJEINOF.js";
155
+ import "./chunk-GDSCR5BG.js";
156
156
  import "./chunk-A3QZXQI3.js";
157
- import "./chunk-XLZPP5MB.js";
157
+ import "./chunk-PB4ZGGR4.js";
158
158
  import {
159
159
  allHitItem,
160
160
  coverageGaps,
161
161
  messageHitItem,
162
162
  noteHitItem,
163
163
  shownOf
164
- } from "./chunk-CFZZUGUD.js";
165
- import "./chunk-JKLJM7EG.js";
164
+ } from "./chunk-R24Q24U5.js";
165
+ import "./chunk-2C536VQW.js";
166
166
  import {
167
167
  REASONS as REASONS2,
168
168
  SKILL_TARGETS,
169
169
  skillCommand,
170
170
  skillPath,
171
171
  skillVersion
172
- } from "./chunk-ZPB3VTS7.js";
173
- import "./chunk-DE5BNDIA.js";
172
+ } from "./chunk-4BSNHOEV.js";
173
+ import "./chunk-UYKKJOND.js";
174
174
  import {
175
175
  recoveryNotes,
176
176
  storeInfo,
177
177
  storeRecoveryCheck,
178
178
  storeRecoveryRun,
179
179
  storeSummary
180
- } from "./chunk-VIY77EDM.js";
181
- import "./chunk-A54EZ6DV.js";
180
+ } from "./chunk-RMKJWDVT.js";
181
+ import "./chunk-UC5YCXKS.js";
182
182
  import {
183
183
  LIST_QUERY_GUIDE,
184
184
  RESOURCES_SEARCHED,
@@ -255,33 +255,35 @@ import {
255
255
  timeLimit,
256
256
  typedQuery,
257
257
  withQuery
258
- } from "./chunk-JSGRDE5Q.js";
258
+ } from "./chunk-2TIK6LHL.js";
259
259
  import {
260
260
  readBoundedUtf8File,
261
261
  writeFileAtomic
262
- } from "./chunk-LHVNZ25W.js";
262
+ } from "./chunk-U3VXKVKI.js";
263
263
  import {
264
264
  releaseLock,
265
265
  servingProfiles,
266
266
  takeLock
267
- } from "./chunk-YZ4J67GU.js";
268
- import "./chunk-KYW7RWGE.js";
267
+ } from "./chunk-FCHVDLEL.js";
268
+ import "./chunk-BBJBWSGN.js";
269
269
  import {
270
270
  commandsText,
271
271
  inSection,
272
272
  installHelp
273
- } from "./chunk-6VISMU6R.js";
273
+ } from "./chunk-HKOHKYDY.js";
274
274
  import "./chunk-HTQTIKWP.js";
275
- import "./chunk-DNPE4LOZ.js";
275
+ import "./chunk-VSSWVVOZ.js";
276
276
  import {
277
277
  isNewer
278
- } from "./chunk-3QBRLN6T.js";
278
+ } from "./chunk-2EGS6BXF.js";
279
279
  import "./chunk-OYKQX4H3.js";
280
- import "./chunk-IYINNZQE.js";
281
- import "./chunk-BNOSAHVH.js";
282
- import "./chunk-OQSIFLZS.js";
280
+ import "./chunk-IE6AEPW3.js";
281
+ import "./chunk-4FPSZCWN.js";
282
+ import "./chunk-3HCGK4FN.js";
283
283
  import {
284
284
  EVIDENCE_FINDINGS_KIND,
285
+ IDENTITY_LINK_KIND,
286
+ IDENTITY_SPLIT_KIND,
285
287
  MAIL_FINDINGS_KIND,
286
288
  MAX_FILE_BYTES,
287
289
  MAX_TEXT_CHARS,
@@ -319,25 +321,25 @@ import {
319
321
  refLabel,
320
322
  storedProfilesFor,
321
323
  writesWithOf
322
- } from "./chunk-UD5JUJES.js";
323
- import "./chunk-VMTTWF2M.js";
324
- import "./chunk-M4MM4QUM.js";
325
- import "./chunk-DJYMK7EI.js";
326
- import "./chunk-OB3OPV55.js";
324
+ } from "./chunk-TBCHID7L.js";
325
+ import "./chunk-JDI7CKLO.js";
326
+ import "./chunk-5YS4WS74.js";
327
+ import "./chunk-GTYESBB2.js";
328
+ import "./chunk-QOFD6JSB.js";
327
329
  import {
328
330
  APP,
329
331
  REASONS,
330
332
  STORE_CLIENT,
331
333
  VERSION
332
- } from "./chunk-S5T4SO7I.js";
334
+ } from "./chunk-XO6RP5FV.js";
333
335
  import "./chunk-NT5IOEEK.js";
334
336
  import "./chunk-D72URWJE.js";
335
- import "./chunk-UIS44ZMF.js";
336
- import "./chunk-TFXKS2WG.js";
337
- import "./chunk-HKDUGTWQ.js";
338
- import "./chunk-HFZHXP4U.js";
339
- import "./chunk-NGWUFB4K.js";
340
- import "./chunk-JTLPFUIQ.js";
337
+ import "./chunk-O4ZIN4AY.js";
338
+ import "./chunk-OP5MKU7T.js";
339
+ import "./chunk-TH3LLEA2.js";
340
+ import "./chunk-6ZO2ZVKV.js";
341
+ import "./chunk-CQPXUMIS.js";
342
+ import "./chunk-DP2RZ6FO.js";
341
343
  import {
342
344
  Command,
343
345
  DEFAULT_TEXT_MODEL,
@@ -377,11 +379,11 @@ import {
377
379
  snakeKeys,
378
380
  textModels,
379
381
  textModelsFile
380
- } from "./chunk-EY46RMMS.js";
381
- import "./chunk-4EFQOTNQ.js";
382
- import "./chunk-MRUE3BWX.js";
383
- import "./chunk-TXXKLYJQ.js";
384
- import "./chunk-UDRKGCDS.js";
382
+ } from "./chunk-IHWPNLCI.js";
383
+ import "./chunk-SEIRBXJT.js";
384
+ import "./chunk-46Z7UUCG.js";
385
+ import "./chunk-RUHFWDHD.js";
386
+ import "./chunk-AWUANCLC.js";
385
387
  import {
386
388
  CATALOG_KINDS,
387
389
  CATEGORIES,
@@ -454,16 +456,16 @@ import {
454
456
  timezoneOf,
455
457
  validateQuery,
456
458
  walkQuery
457
- } from "./chunk-WZZ426CJ.js";
458
- import "./chunk-HWIKY7KF.js";
459
- import "./chunk-KTBPBMNR.js";
459
+ } from "./chunk-LQBVQX47.js";
460
+ import "./chunk-ZIDR2CSX.js";
461
+ import "./chunk-YJUVVYS6.js";
460
462
  import {
461
463
  sharedModelsDirectory
462
- } from "./chunk-LO74ISD6.js";
464
+ } from "./chunk-CX3D6D43.js";
465
+ import "./chunk-G5GW3FFJ.js";
463
466
  import {
464
467
  storePath
465
- } from "./chunk-YABNPKKQ.js";
466
- import "./chunk-G5GW3FFJ.js";
468
+ } from "./chunk-A5TSIMI2.js";
467
469
  import {
468
470
  Credentials,
469
471
  configFilePath,
@@ -477,9 +479,9 @@ import {
477
479
  readBatchInput,
478
480
  resolvePaths,
479
481
  writeSecurely
480
- } from "./chunk-2IQWMWMC.js";
481
- import "./chunk-EXFRC4OT.js";
482
- import "./chunk-X2SA73EE.js";
482
+ } from "./chunk-SB3AOH3M.js";
483
+ import "./chunk-DCK5AT3D.js";
484
+ import "./chunk-RK24IARI.js";
483
485
  import {
484
486
  MAX_NEXT_STEPS,
485
487
  array,
@@ -501,7 +503,7 @@ import {
501
503
  trim,
502
504
  union,
503
505
  unknown
504
- } from "./chunk-6A37YXAL.js";
506
+ } from "./chunk-5LEIPSJG.js";
505
507
  import "./chunk-Y5E2WNWB.js";
506
508
  import {
507
509
  CliError,
@@ -887,7 +889,7 @@ var readScope = /* @__PURE__ */ __name((command, help = ONE_ACCOUNT_HELP) => sou
887
889
  var writeScope = /* @__PURE__ */ __name((command, help) => writeOptions(command, help).option("--json", "print JSON; --json=id,title keeps only those fields"), "writeScope");
888
890
  var jsonOption = /* @__PURE__ */ __name((command, fields = "ref,title") => command.option("--json", `print JSON; --json=${fields} keeps only those fields`), "jsonOption");
889
891
 
890
- // node_modules/.pnpm/@wirecat+cli-core@0.628.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_ae6a34897f184099b1a87c0d4b483e54/node_modules/@wirecat/cli-core/dist/mail/sender-scores.js
892
+ // node_modules/.pnpm/@wirecat+cli-core@0.633.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_6b55a08b64e6f66e5ab3a99b7d6b1e87/node_modules/@wirecat/cli-core/dist/mail/sender-scores.js
891
893
  var SCORED = "mail_sender_scores";
892
894
  var DAY = 864e5;
893
895
  var RECENT = 2 * 365 * DAY;
@@ -903,7 +905,7 @@ var demotedSenders = /* @__PURE__ */ __name(async (store) => {
903
905
  return senders;
904
906
  }, "demotedSenders");
905
907
 
906
- // node_modules/.pnpm/@wirecat+cli-core@0.628.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_ae6a34897f184099b1a87c0d4b483e54/node_modules/@wirecat/cli-core/dist/mail/sync.js
908
+ // node_modules/.pnpm/@wirecat+cli-core@0.633.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_6b55a08b64e6f66e5ab3a99b7d6b1e87/node_modules/@wirecat/cli-core/dist/mail/sync.js
907
909
  var DAY2 = 864e5;
908
910
  var EDGE = 2 * DAY2;
909
911
 
@@ -927,7 +929,8 @@ var REVIEW_KINDS = [
927
929
  "subscription",
928
930
  "subscription_price",
929
931
  "transaction",
930
- "identity_link"
932
+ "identity_link",
933
+ "identity_split"
931
934
  ];
932
935
  var BY_ACCOUNT = [MEETING_FINDINGS_KIND, MAIL_FINDINGS_KIND];
933
936
  var reviewRegistry = /* @__PURE__ */ __name((store) => {
@@ -1799,23 +1802,23 @@ var notesReaching = /* @__PURE__ */ __name(async (store, subject) => {
1799
1802
  const linking = await live((await Promise.all(refs.map((to) => store.notes.links({ to })))).flat().filter((link2) => link2.kind === "links-to"), "link");
1800
1803
  const through = await live((await Promise.all(about.map(({ note }) => store.notes.links({ to: note.ref })))).flat().filter((link2) => link2.kind === "links-to"), "through");
1801
1804
  const names = new Set([subject.person?.name, ...subject.person?.identities.map(({ name: name2 }) => name2) ?? []].filter((name2) => !!name2?.trim()).map(fold));
1802
- const waiting2 = names.size === 0 ? [] : await live((await store.notes.links({ unresolved: true })).filter((link2) => names.has(fold(link2.targetText ?? ""))), "name");
1803
- return [...about, ...linking, ...through, ...waiting2];
1805
+ const waiting3 = names.size === 0 ? [] : await live((await store.notes.links({ unresolved: true })).filter((link2) => names.has(fold(link2.targetText ?? ""))), "name");
1806
+ return [...about, ...linking, ...through, ...waiting3];
1804
1807
  }, "notesReaching");
1805
1808
  var notesAbout = /* @__PURE__ */ __name(async (store, subject, limit = 20) => {
1806
1809
  const found = await notesReaching(store, subject);
1807
1810
  const unique = /* @__PURE__ */ __name((via) => [
1808
1811
  ...new Map(found.filter((item) => item.via === via).map((item) => [`${item.note.ref}#${item.anchor ?? ""}`, item])).values()
1809
1812
  ].sort((a, b) => refOf(b.note).modifiedAt.localeCompare(refOf(a.note).modifiedAt)), "unique");
1810
- const [about, linking, through, waiting2] = ["about", "link", "through", "name"].map(unique);
1813
+ const [about, linking, through, waiting3] = ["about", "link", "through", "name"].map(unique);
1811
1814
  return {
1812
1815
  subject: subject.ref,
1813
1816
  name: subject.person?.name ?? null,
1814
1817
  about: (about ?? []).slice(0, limit).map(({ note }) => refOf(note)),
1815
1818
  linking: (linking ?? []).slice(0, limit).map(({ note, anchor }) => refOf(note, anchor)),
1816
1819
  throughNotes: (through ?? []).slice(0, limit).map(({ note, anchor }) => refOf(note, anchor)),
1817
- waiting: (waiting2 ?? []).slice(0, limit).map(({ note, text: text3 }) => ({ ...refOf(note), text: text3 ?? "" })),
1818
- hasMore: [about, linking, through, waiting2].some((list) => (list ?? []).length > limit)
1820
+ waiting: (waiting3 ?? []).slice(0, limit).map(({ note, text: text3 }) => ({ ...refOf(note), text: text3 ?? "" })),
1821
+ hasMore: [about, linking, through, waiting3].some((list) => (list ?? []).length > limit)
1819
1822
  };
1820
1823
  }, "notesAbout");
1821
1824
 
@@ -2348,7 +2351,7 @@ import { createHash } from "node:crypto";
2348
2351
  import { existsSync, readFileSync as readFileSync2, statSync } from "node:fs";
2349
2352
  import { basename, extname, relative, sep } from "node:path";
2350
2353
 
2351
- // node_modules/.pnpm/@wirecat+cli-core@0.628.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_ae6a34897f184099b1a87c0d4b483e54/node_modules/@wirecat/cli-core/dist/services/documents/extraction.js
2354
+ // node_modules/.pnpm/@wirecat+cli-core@0.633.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_6b55a08b64e6f66e5ab3a99b7d6b1e87/node_modules/@wirecat/cli-core/dist/services/documents/extraction.js
2352
2355
  var Proposal = object({
2353
2356
  kind: picklist(["summary", "digest", "fact", "preference"]),
2354
2357
  body: pipe(string(), trim(), minLength(1), maxLength(15e3)),
@@ -2356,13 +2359,13 @@ var Proposal = object({
2356
2359
  });
2357
2360
  var Proposals = object({ items: pipe(array(Proposal), maxLength(20)) });
2358
2361
 
2359
- // node_modules/.pnpm/@wirecat+cli-core@0.628.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_ae6a34897f184099b1a87c0d4b483e54/node_modules/@wirecat/cli-core/dist/services/documents/mirrors.js
2362
+ // node_modules/.pnpm/@wirecat+cli-core@0.633.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_6b55a08b64e6f66e5ab3a99b7d6b1e87/node_modules/@wirecat/cli-core/dist/services/documents/mirrors.js
2360
2363
  var ID = pipe(string(), regex(/^[A-Za-z0-9_-]{1,200}$/));
2361
2364
 
2362
- // node_modules/.pnpm/@wirecat+cli-core@0.628.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_ae6a34897f184099b1a87c0d4b483e54/node_modules/@wirecat/cli-core/dist/services/documents/sync.js
2365
+ // node_modules/.pnpm/@wirecat+cli-core@0.633.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_6b55a08b64e6f66e5ab3a99b7d6b1e87/node_modules/@wirecat/cli-core/dist/services/documents/sync.js
2363
2366
  var MAX_PICTURE_BYTES = 25 * 1024 * 1024;
2364
2367
 
2365
- // node_modules/.pnpm/@wirecat+cli-core@0.628.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_ae6a34897f184099b1a87c0d4b483e54/node_modules/@wirecat/cli-core/dist/fetch/addresses.js
2368
+ // node_modules/.pnpm/@wirecat+cli-core@0.633.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_6b55a08b64e6f66e5ab3a99b7d6b1e87/node_modules/@wirecat/cli-core/dist/fetch/addresses.js
2366
2369
  import { isIP } from "node:net";
2367
2370
  var within3 = /* @__PURE__ */ __name((address, [prefix, bits]) => {
2368
2371
  for (let bit = 0; bit < bits; bit++) {
@@ -2433,7 +2436,7 @@ var isPublicAddress = /* @__PURE__ */ __name((address) => {
2433
2436
  return within3(bytes, [[32], 3]) && !V6_PRIVATE.some((prefix) => within3(bytes, prefix));
2434
2437
  }, "isPublicAddress");
2435
2438
 
2436
- // node_modules/.pnpm/@wirecat+cli-core@0.628.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_ae6a34897f184099b1a87c0d4b483e54/node_modules/@wirecat/cli-core/dist/fetch/page.js
2439
+ // node_modules/.pnpm/@wirecat+cli-core@0.633.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_6b55a08b64e6f66e5ab3a99b7d6b1e87/node_modules/@wirecat/cli-core/dist/fetch/page.js
2437
2440
  import { lookup as dnsLookup } from "node:dns/promises";
2438
2441
  import { request as httpRequest } from "node:http";
2439
2442
  import { request as httpsRequest } from "node:https";
@@ -2928,9 +2931,9 @@ var importNotes = /* @__PURE__ */ __name(async (store, folder, { ignore = [], sk
2928
2931
  const documents = [...stored.values()].map(documentOf);
2929
2932
  const relink = new Map(parsed2);
2930
2933
  if (renamed + deleted + added > 0) {
2931
- const waiting2 = new Set((await store.notes.links({ unresolved: true })).map(({ from }) => from.replace(/^note:/, "")));
2934
+ const waiting3 = new Set((await store.notes.links({ unresolved: true })).map(({ from }) => from.replace(/^note:/, "")));
2932
2935
  for (const note of stored.values())
2933
- if (waiting2.has(note.id) && !relink.has(note.path) && TEXT_NOTE.test(note.path))
2936
+ if (waiting3.has(note.id) && !relink.has(note.path) && TEXT_NOTE.test(note.path))
2934
2937
  relink.set(note.path, dialect.parse(note.text, note.path));
2935
2938
  }
2936
2939
  for (const [id, note] of relink) {
@@ -5099,13 +5102,13 @@ var cutsOf = /* @__PURE__ */ __name((items) => {
5099
5102
  }
5100
5103
  return [...cuts.values()].sort((a, b) => Number.parseInt(a.cursor, 10) - Number.parseInt(b.cursor, 10));
5101
5104
  }, "cutsOf");
5102
- var lines = /* @__PURE__ */ __name((source, review, { key, cursor, items, waiting: waiting2 }) => {
5105
+ var lines = /* @__PURE__ */ __name((source, review, { key, cursor, items, waiting: waiting3 }) => {
5103
5106
  const left = (review.missing ?? []).map((one2) => one2.why).filter(Boolean);
5104
5107
  return [
5105
5108
  `## ${source}`,
5106
5109
  ...key ? [`key: ${key}`] : [],
5107
5110
  `cursor: ${cursor ?? "none"}`,
5108
- waiting2 > 0 ? `more mail waits past the cursor: true \u2014 ${waiting2} emails did not fit this input; the next run reads them, do not review this mailbox again now` : `more mail waits past the cursor: ${review.meta?.complete === false}`,
5111
+ waiting3 > 0 ? `more mail waits past the cursor: true \u2014 ${waiting3} emails did not fit this input; the next run reads them, do not review this mailbox again now` : `more mail waits past the cursor: ${review.meta?.complete === false}`,
5109
5112
  ...left.length ? [`left out: ${left.join("; ")}`] : [],
5110
5113
  ...items.some((item) => item.text_cut) ? [
5111
5114
  "text_cut: only the start of that email's text fits here; read it whole with `memo messages show '<ref>' --trimmed --json` before you stage a finding from it"
@@ -6248,7 +6251,7 @@ var gatherDigest = /* @__PURE__ */ __name(async (store, env, { since, now: clock
6248
6251
  why: "changed since a memory or fact cited it; no findings batch reads it yet"
6249
6252
  }
6250
6253
  });
6251
- const waiting2 = await counted2(store, env, { status: "proposed" });
6254
+ const waiting3 = await counted2(store, env, { status: "proposed" });
6252
6255
  const proposed = await listReview(store, env, [], { limit, page: 1 });
6253
6256
  const proposals = proposed.items.map((row) => ({
6254
6257
  item: {
@@ -6283,7 +6286,7 @@ var gatherDigest = /* @__PURE__ */ __name(async (store, env, { since, now: clock
6283
6286
  ...reviewCount > 0 ? [`# decide them: ${REVIEW_SOURCES}`] : [],
6284
6287
  ...sourceItems.length > reviewCount ? [`# read changed sources again: memo memories check --since-time ${days2} --json`] : []
6285
6288
  ]),
6286
- await section("proposals", upTo(proposals), limit, ["memo review list"], waiting2.total)
6289
+ await section("proposals", upTo(proposals), limit, ["memo review list"], waiting3.total)
6287
6290
  ];
6288
6291
  const providerCount = /* @__PURE__ */ __name((provider) => accounts.filter((key) => key.provider === provider).length, "providerCount");
6289
6292
  const meetingAccounts = accounts.filter((key) => kindOf(key.provider) === "meetings").length;
@@ -6968,7 +6971,7 @@ var doctorCommand = /* @__PURE__ */ __name((...args) => {
6968
6971
  }, SHELL_OVERRIDES.doctor);
6969
6972
  }, "doctorCommand");
6970
6973
 
6971
- // node_modules/.pnpm/@wirecat+cli-core@0.628.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_ae6a34897f184099b1a87c0d4b483e54/node_modules/@wirecat/cli-core/dist/calendar/sync.js
6974
+ // node_modules/.pnpm/@wirecat+cli-core@0.633.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_6b55a08b64e6f66e5ab3a99b7d6b1e87/node_modules/@wirecat/cli-core/dist/calendar/sync.js
6972
6975
  var DAY8 = 864e5;
6973
6976
  var SLOTS_EVERY = 7 * DAY8;
6974
6977
  var isWindow = /* @__PURE__ */ __name((value) => typeof value?.from === "number" && typeof value.to === "number", "isWindow");
@@ -7048,10 +7051,10 @@ var calendarStatus = /* @__PURE__ */ __name(async (store, accountId, { profile,
7048
7051
  return { items, page: 1, limit: Math.max(1, items.length), hasMore: false };
7049
7052
  }, "calendarStatus");
7050
7053
 
7051
- // node_modules/.pnpm/@wirecat+cli-core@0.628.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_ae6a34897f184099b1a87c0d4b483e54/node_modules/@wirecat/cli-core/dist/calendar/feeds.js
7054
+ // node_modules/.pnpm/@wirecat+cli-core@0.633.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_6b55a08b64e6f66e5ab3a99b7d6b1e87/node_modules/@wirecat/cli-core/dist/calendar/feeds.js
7052
7055
  var FEED_LIMITS = { maxBytes: 10 * 1024 * 1024, timeoutMs: 3e4, redirects: 5 };
7053
7056
 
7054
- // node_modules/.pnpm/@wirecat+cli-core@0.628.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_ae6a34897f184099b1a87c0d4b483e54/node_modules/@wirecat/cli-core/dist/calendar/reads.js
7057
+ // node_modules/.pnpm/@wirecat+cli-core@0.633.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_6b55a08b64e6f66e5ab3a99b7d6b1e87/node_modules/@wirecat/cli-core/dist/calendar/reads.js
7055
7058
  var LIST = "events list";
7056
7059
  var EVENT_TYPES = [
7057
7060
  "default",
@@ -7128,7 +7131,7 @@ var accountsMeta = /* @__PURE__ */ __name(async (store, accounts, skipped, now)
7128
7131
  };
7129
7132
  }, "accountsMeta");
7130
7133
 
7131
- // node_modules/.pnpm/@wirecat+cli-core@0.628.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_ae6a34897f184099b1a87c0d4b483e54/node_modules/@wirecat/cli-core/dist/calendar/writer.js
7134
+ // node_modules/.pnpm/@wirecat+cli-core@0.633.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_6b55a08b64e6f66e5ab3a99b7d6b1e87/node_modules/@wirecat/cli-core/dist/calendar/writer.js
7132
7135
  var EVENTS_NOTIFY_KEY = "events.notify";
7133
7136
  var EVENTS_DELETE_SERIES_KEY = "events.delete.series";
7134
7137
  var EVENTS_REMIND_HOOK_KEY = "events.remind.hook";
@@ -7500,14 +7503,23 @@ var EXAMPLES = {
7500
7503
  "people check": ["memo people check ivan petrov --json"],
7501
7504
  "people add": ["memo people add Lena Example"],
7502
7505
  "people show": ["memo people show person:12", "memo people show telegram:Lena --json"],
7503
- "people review": ["memo people review", "memo people review --json"],
7506
+ "people review": ["memo people review", "memo people review --kind split --json"],
7507
+ "people confirm": ["memo people confirm 17080 17082-17085", "memo people confirm all --kind split --yes"],
7508
+ "people reject": [
7509
+ "memo people reject 17081 --reason 'two people'",
7510
+ "memo people reject all --kind link --reason 'not one'"
7511
+ ],
7512
+ "people links check": ["memo people links check", "memo people links check --page 2 --json"],
7504
7513
  "people scan": ["memo people scan"],
7505
7514
  "people link": [
7506
7515
  "memo people link max:Lena telegram:Lena",
7507
7516
  "memo people link max:Lena telegram:Lena --reason 'same phone in her signature'"
7508
7517
  ],
7509
- "people unlink": ["memo people unlink telegram:12345", "memo people unlink email:lena@example.com max:6789"],
7510
- "people unmerge": ["memo people unmerge merge:12-34"],
7518
+ "people unlink": [
7519
+ "memo people unlink telegram:12345",
7520
+ "memo people unlink email:lena@example.com max:6789 --reason 'her husband's mailbox'"
7521
+ ],
7522
+ "people unmerge": ["memo people unmerge merge:12-34", "memo people unmerge merge:12-34 --reason 'a shared mailbox'"],
7511
7523
  "tasks agenda": [
7512
7524
  "memo tasks agenda --source telegram:1",
7513
7525
  "memo tasks agenda --source max:1 --waiting 3d --within 90d --json"
@@ -9674,7 +9686,7 @@ var projectContext = /* @__PURE__ */ __name(async (store, env, reference2) => {
9674
9686
  const documents = await keyDocuments(store, project);
9675
9687
  const proposals = await proposalsOf(store, env);
9676
9688
  const pending = /* @__PURE__ */ __name((kind) => proposals.list({ project: project.ref, kinds: [kind], status: "proposed", limit: 50, offset: 0 }), "pending");
9677
- const [facts, tasks, findings, keys, links, waiting2] = await Promise.all([
9689
+ const [facts, tasks, findings, keys, links, waiting3] = await Promise.all([
9678
9690
  store.facts.list({ project: project.ref, status: "proposed", limit: 21 }),
9679
9691
  store.tasks.find({ project: project.ref, status: "open", limit: 21 }),
9680
9692
  projectFindings(store, project.ref, relationships),
@@ -9691,7 +9703,7 @@ var projectContext = /* @__PURE__ */ __name(async (store, env, reference2) => {
9691
9703
  tags: await store.knowledge.tags(null, { type: "project", id: project.id }),
9692
9704
  review: {
9693
9705
  waiting: {
9694
- ...waiting2,
9706
+ ...waiting3,
9695
9707
  next: { command: "review list", args: { query: `project:${project.key ?? project.id}` } }
9696
9708
  },
9697
9709
  keyDocuments: keys.items.map((row) => ({
@@ -10864,10 +10876,10 @@ var mcpCommandDefinition = /* @__PURE__ */ __name((program, streams, env, create
10864
10876
  }).summary("serve this profile's commands to an AI agent").description("serve memo commands over MCP on stdio or authenticated HTTP, limited by saved permissions").option("--permission <key=level>", "tighten one saved permission for this server; repeat for more keys", (value, previous = []) => [...previous, value]).option("--http", "serve on 127.0.0.1 behind an HTTPS tunnel with an owner access-code login").option("--port <port>", `local HTTP port (default ${DEFAULT_PORT}); requires --http`).option("--public-url <url>", "tunnel's HTTPS address without /mcp, or a path of it such as https://<name>.ts.net/memo; requires --http").action(async (options) => {
10865
10877
  if (!options.http && (options.port !== void 0 || options.publicUrl !== void 0))
10866
10878
  throw new CliError("validation_error", "--port and --public-url require --http");
10867
- const { createMemoServer } = await import("./server-3SJJNNSX.js");
10879
+ const { createMemoServer } = await import("./server-TL5WPR3I.js");
10868
10880
  const build = /* @__PURE__ */ __name(() => createMemoServer(env, createProgram2, options.permission), "build");
10869
10881
  if (options.http) {
10870
- const { httpLockFile, mcpUrlOf, portOf, publicUrlOf, serveOverHttp } = await import("./mcp-3HKOGYHL.js");
10882
+ const { httpLockFile, mcpUrlOf, portOf, publicUrlOf, serveOverHttp } = await import("./mcp-3MBYSBNS.js");
10871
10883
  const publicUrl = publicUrlOf(options.publicUrl, {
10872
10884
  missing: "--http",
10873
10885
  reaches: "the browser apps reach memo",
@@ -10919,7 +10931,7 @@ var mcpCommandDefinition = /* @__PURE__ */ __name((program, streams, env, create
10919
10931
  });
10920
10932
  });
10921
10933
  annotate(mcp2.command("revoke"), { effects: LOCAL_WRITE, mcp: false, examples: ["memo mcp revoke --json"] }).summary("forget every login given to a browser app").description("forget every login `memo mcp serve --http` gave a browser app; each app must log in again").option("--json", "print JSON").action(async function() {
10922
- const { revokeAll } = await import("./mcp-3HKOGYHL.js");
10934
+ const { revokeAll } = await import("./mcp-3MBYSBNS.js");
10923
10935
  revokeAll(httpTokenFile(env));
10924
10936
  out.print(this.opts().json, itemAnswer({ revoked: true }));
10925
10937
  });
@@ -11713,11 +11725,164 @@ var foldersCommand = /* @__PURE__ */ __name((program, streams, env) => {
11713
11725
  // dist/people/command.js
11714
11726
  import { join as join13 } from "node:path";
11715
11727
 
11728
+ // dist/people/doubts-command.js
11729
+ var textOf2 = /* @__PURE__ */ __name((doubt) => [
11730
+ `${doubt.person}${doubt.name ? ` ${doubt.name}` : ""}${doubt.owner ? " (you)" : ""} \xB7 ${doubt.reason}`,
11731
+ ` ${doubt.why}`,
11732
+ ...doubt.identities.map(({ identity, name: name2, method, by, at: at2 }) => ` ${identity}${name2 ? ` ${name2}` : ""} (${method} by ${by}, ${at2.slice(0, 10)})`),
11733
+ ...doubt.fix.map((command) => ` fix: memo ${command}`)
11734
+ ].join("\n"), "textOf");
11735
+ var doubtsCommand = /* @__PURE__ */ __name((people, program, streams, env) => {
11736
+ const { print } = answers(program, streams, env);
11737
+ const links = people.commands.find((command) => command.name() === "links") ?? people.command("links").description("who is who: the links that make identities one person");
11738
+ annotate(links.command("check"), { effects: LOCAL_READ }).summary("people that may be wrong, with why and the command that fixes each").description("people that may be wrong, you first: your person holding an identity under another name, test data, an identity joined by an address a person of another name has, one person with different names and nothing in common. Each says why and gives the unlink or unmerge that fixes it; an agent adds --reason and it waits for you in people review. What you linked by hand, or kept together by turning a split down, is left out").option("--limit <n>", "most people on a page, up to 200", positive, 20).option("--page <n>", "which page, from 1", positive, 1).option("--json", "print JSON; --json=id,title keeps only those fields").action(async (options) => {
11739
+ const limit = Math.min(options.limit, 200);
11740
+ const counted3 = groupOf(env) === void 0;
11741
+ const found = await withStore(env, async (store) => {
11742
+ const page = await store.people.doubts({ limit, offset: (options.page - 1) * limit });
11743
+ return { ...page, items: await keepInGroup(store, env, page.items, ({ person }) => person) };
11744
+ });
11745
+ print(options.json, listAnswer("people links check", {
11746
+ items: found.items,
11747
+ limit,
11748
+ page: options.page,
11749
+ has_more: found.hasMore,
11750
+ ...counted3 ? { total: { value: found.total, relation: "eq" } } : {}
11751
+ }), [
11752
+ found.items.map(textOf2).join("\n\n") || (found.hasMore ? "none on this page" : "no person looks wrong"),
11753
+ ...found.hasMore ? [`more: --page ${options.page + 1}`] : []
11754
+ ].join("\n\n"));
11755
+ });
11756
+ }, "doubtsCommand");
11757
+
11758
+ // dist/people/proposal-rows.js
11759
+ var asOwner = /* @__PURE__ */ __name(async (command, env, question) => {
11760
+ const options = command.opts();
11761
+ const who = await whoRuns(command, env, { asOwner: options.asOwner, question });
11762
+ if (who !== "owner")
11763
+ throw new CliError("permission_error", `only the owner can ${question.replace(/\?$/, "")}`, {
11764
+ reason: "identity.owner-only"
11765
+ });
11766
+ return who;
11767
+ }, "asOwner");
11768
+ var matchAnswer = /* @__PURE__ */ __name((row) => ({
11769
+ id: row.id,
11770
+ kind: "identity_link",
11771
+ persons: row.persons,
11772
+ joins: row.joins,
11773
+ identity: row.identity,
11774
+ with: row.with,
11775
+ signal: row.signal,
11776
+ score: row.score,
11777
+ candidates: row.candidates,
11778
+ reason: row.reason,
11779
+ evidence: row.evidence,
11780
+ proposedBy: row.proposedBy,
11781
+ createdAt: row.createdAt
11782
+ }), "matchAnswer");
11783
+ var splitAnswer = /* @__PURE__ */ __name((row) => ({
11784
+ id: row.id,
11785
+ kind: "identity_split",
11786
+ split: row.split,
11787
+ person: row.person,
11788
+ identities: row.identities,
11789
+ merge: row.merge,
11790
+ reason: row.reason,
11791
+ evidence: row.evidence,
11792
+ proposedBy: row.proposedBy,
11793
+ createdAt: row.createdAt
11794
+ }), "splitAnswer");
11795
+ var summaryOf2 = /* @__PURE__ */ __name((row) => {
11796
+ if (row.kind === "identity_link")
11797
+ return `${row.identity} may be the same person as ${row.with ?? row.persons[1]} (${row.signal})`;
11798
+ return row.split === "unmerge" ? `undo ${row.merge}: ${row.identities.join(" ")} go back to their own person` : `take ${row.identities.join(" ")} off ${row.person}`;
11799
+ }, "summaryOf");
11800
+ var PROPOSAL_KINDS = ["all", "link", "split"];
11801
+ var waiting2 = /* @__PURE__ */ __name(async (store, { kind, limit }) => {
11802
+ const none = { items: [], hasMore: false };
11803
+ const page = { status: "proposed", limit, offset: 0 };
11804
+ const links = kind === "split" ? none : await store.people.linkProposals(page);
11805
+ const splits = kind === "link" ? none : await store.people.splitProposals(page);
11806
+ const rows = [...links.items.map(matchAnswer), ...splits.items.map(splitAnswer)].sort((a, b) => b.createdAt.localeCompare(a.createdAt) || Number(b.id) - Number(a.id));
11807
+ return { items: rows.slice(0, limit), hasMore: links.hasMore || splits.hasMore || rows.length > limit };
11808
+ }, "waiting");
11809
+
11810
+ // dist/people/proposals-command.js
11811
+ var PEOPLE_KINDS = [IDENTITY_LINK_KIND, IDENTITY_SPLIT_KIND];
11812
+ var limitOf = /* @__PURE__ */ __name((limit) => {
11813
+ if (limit > 500)
11814
+ throw new CliError("validation_error", "--limit takes 1\u2013500", { param: "limit" });
11815
+ return limit;
11816
+ }, "limitOf");
11817
+ var peopleIds = /* @__PURE__ */ __name(async (store, ids) => {
11818
+ const kept2 = [];
11819
+ const refused2 = [];
11820
+ for (const id of ids) {
11821
+ const kind = await store.proposedActions.get(id).then((action) => action.kind, () => void 0);
11822
+ if (kind === void 0)
11823
+ refused2.push({ id, code: "not_found", reason: "proposal.not-found", message: `no proposal ${id}` });
11824
+ else if (!PEOPLE_KINDS.includes(kind))
11825
+ refused2.push({
11826
+ id,
11827
+ code: "validation_error",
11828
+ reason: "proposal.not-people",
11829
+ message: `${id} is a ${kind} proposal; memo review decides it`
11830
+ });
11831
+ else
11832
+ kept2.push(id);
11833
+ }
11834
+ return { ids: kept2, refused: refused2 };
11835
+ }, "peopleIds");
11836
+ var peopleProposalCommands = /* @__PURE__ */ __name((people, program, streams, env) => {
11837
+ const { print } = answers(program, streams, env);
11838
+ annotate(people.command("review"), { effects: LOCAL_READ }).summary("people that may be one, and splits an agent proposed, waiting for you").description("what waits for the owner about who is who: matches (people that may be one) and splits (identities an agent says are not this person), newest first; people confirm or people reject answers them").option("--kind <kind>", `${PROPOSAL_KINDS.join(", ")} (default all)`, oneOf(PROPOSAL_KINDS), "all").option("--limit <n>", "most proposals, up to 500", positive, 50).option("--json", "print JSON; --json=id,title keeps only those fields").action(async (options) => {
11839
+ const limit = limitOf(options.limit);
11840
+ const found = await withStore(env, (store) => waiting2(store, { kind: options.kind, limit }));
11841
+ print(options.json, listAnswer("people review", { items: found.items, limit, has_more: found.hasMore }), [
11842
+ ...found.items.map((row) => `${row.id} ${summaryOf2(row)}${row.reason ? ` \u2014 ${row.reason}` : ""}`),
11843
+ ...found.hasMore ? [`more wait: --limit ${Math.min(500, limit * 2)}`] : []
11844
+ ].join("\n") || "nothing about people waits for you");
11845
+ });
11846
+ for (const name2 of ["confirm", "reject"]) {
11847
+ const confirm = name2 === "confirm";
11848
+ const command = byOption(annotate(people.command(name2), { effects: LOCAL_WRITE }).summary(confirm ? "confirm matches and splits by id, or all that people review lists; only you" : "turn down matches and splits by id, or all that people review lists; only you").description(confirm ? "confirm matches (the people become one) and splits (the identities leave their person) by id or range as people review lists them, or `all` of what it lists with the same --kind and --limit; each is decided on its own, so a refusal leaves the others decided. `all` shows what it would do until --yes" : "turn down matches and splits by id or range, or `all` of what people review lists; a turned-down match comes back only on new evidence, a turned-down split not while its identities stay on that person. `all` shows what it would do until --yes").argument("<ids...>", "ids or ranges as people review lists them (17080 17082-17085), or all")).option("--kind <kind>", `with all: ${PROPOSAL_KINDS.join(", ")} (default all)`, oneOf(PROPOSAL_KINDS), "all").option("--limit <n>", "with all: as many as people review lists, up to 500", positive, 50).option("--yes", "with all: do it, not only show what would be done");
11849
+ if (confirm)
11850
+ command.option("--reason <text>", "why, in a few words");
11851
+ else
11852
+ command.requiredOption("--reason <text>", "why they are turned down, in a few words");
11853
+ command.option("--json", "print JSON; --json=id,title keeps only those fields");
11854
+ command.action(async (words, options) => {
11855
+ const everything = words.length === 1 && words[0]?.toLowerCase() === "all";
11856
+ const limit = limitOf(options.limit);
11857
+ await asOwner(command, env, `${name2} ${everything ? "all waiting" : words.join(" ")} people proposals?`);
11858
+ const result = await withStore(env, async (store) => {
11859
+ const listed2 = everything ? await waiting2(store, { kind: options.kind, limit }) : void 0;
11860
+ const chosen3 = listed2 ? { ids: listed2.items.map(({ id }) => id), refused: [] } : await peopleIds(store, parseProposalIds(words));
11861
+ const more2 = listed2?.hasMore ?? false;
11862
+ if (everything && !options.yes)
11863
+ return { kind: "preview", preview: chosen3.ids, more: more2 };
11864
+ const done = await (await reviewOf(store, env)).decide(chosen3.ids, decisionOf(confirm, "owner", options.reason));
11865
+ return { kind: "decided", ...done, refused: [...chosen3.refused, ...done.refused], more: more2 };
11866
+ });
11867
+ const moreText = result.more ? `
11868
+ more wait than --limit ${limit}; run it again for the rest` : "";
11869
+ if (result.kind === "preview") {
11870
+ const count = result.preview.length;
11871
+ print(options.json, itemAnswer({ outcome: "preview", would: name2, ids: result.preview, has_more: result.more }), count === 0 ? "nothing about people waits for you" : `would ${name2} ${count}: ${result.preview.join(" ")}
11872
+ nothing changed; add --yes to ${name2} them${moreText}`);
11873
+ return;
11874
+ }
11875
+ const { more, kind: _, ...decided } = result;
11876
+ const issues = decided.refused.map((one2) => ({ code: one2.code, source: one2.id, reason: one2.reason }));
11877
+ print(options.json, itemAnswer({ ...decided, has_more: more }, issues.length ? { meta: { complete: false, issues } } : void 0), decidedText(decided) + moreText);
11878
+ });
11879
+ }
11880
+ }, "peopleProposalCommands");
11881
+
11716
11882
  // dist/people/identities-command.js
11717
- var OWNER_ONLY = "identity.owner-only";
11718
11883
  var PERSON = /^person:([1-9]\d*)$/;
11719
11884
  var personOf = /* @__PURE__ */ __name(async (store, who) => {
11720
- const uid = PERSON.exec(who.trim())?.[1];
11885
+ const uid = PERSON.exec((await withOwner(store, who)).trim())?.[1];
11721
11886
  const found = uid === void 0 ? await store.people.personOf(await identityOf(store, who)) : await store.people.personByUid(uid);
11722
11887
  if (found === void 0)
11723
11888
  throw new CliError("not_found", `the store has no person for "${who}"`, { reason: "person.not-found" });
@@ -11731,34 +11896,14 @@ var personAnswer = /* @__PURE__ */ __name((person) => ({
11731
11896
  identity: `${identity.provider}:${identity.id}`,
11732
11897
  name: identity.name,
11733
11898
  username: identity.username,
11899
+ phone: identity.phone ?? null,
11900
+ email: identity.email ?? null,
11734
11901
  seenIn: identity.seenIn,
11735
11902
  method: identity.method,
11736
11903
  linkedBy: identity.linkedBy,
11737
11904
  linkedAt: identity.linkedAt
11738
11905
  }))
11739
11906
  }), "personAnswer");
11740
- var matchAnswer = /* @__PURE__ */ __name((row) => ({
11741
- id: row.id,
11742
- persons: row.persons,
11743
- joins: row.joins,
11744
- identity: row.identity,
11745
- with: row.with,
11746
- signal: row.signal,
11747
- score: row.score,
11748
- candidates: row.candidates,
11749
- reason: row.reason,
11750
- evidence: row.evidence,
11751
- proposedBy: row.proposedBy,
11752
- createdAt: row.createdAt
11753
- }), "matchAnswer");
11754
- var summaryOf2 = /* @__PURE__ */ __name(({ identity, with: other, persons, signal }) => `${identity} may be the same person as ${other ?? persons[1]} (${signal})`, "summaryOf");
11755
- var asOwner = /* @__PURE__ */ __name(async (command, env, question) => {
11756
- const options = command.opts();
11757
- const who = await whoRuns(command, env, { asOwner: options.asOwner, question });
11758
- if (who !== "owner")
11759
- throw new CliError("permission_error", `only the owner can ${question.replace(/\?$/, "")}`, { reason: OWNER_ONLY });
11760
- return who;
11761
- }, "asOwner");
11762
11907
  var identitiesOf = /* @__PURE__ */ __name(async (store, refs) => {
11763
11908
  const found = [];
11764
11909
  for (const ref of refs)
@@ -11780,20 +11925,12 @@ var identitiesCommands = /* @__PURE__ */ __name((people, program, streams, env)
11780
11925
  print(options.json, itemAnswer(shown3), [
11781
11926
  `${shown3.ref} ${shown3.name ?? ""}`.trim(),
11782
11927
  ...shown3.identities.map(({ identity, name: name2 }) => ` ${identity}${name2 ? ` ${name2}` : ""}`),
11783
- ...shown3.merges.map(({ id, from }) => ` merged: ${id} (person:${from})`),
11928
+ ...shown3.merges.map(({ id, from, method, by, at: at2 }) => ` merged: ${id} (person:${from}) by ${by} via ${method}, ${at2.slice(0, 10)}`),
11784
11929
  ...shown3.matches.map((match) => ` match ${match.id}: ${summaryOf2(match)}`)
11785
11930
  ].join("\n"));
11786
11931
  });
11787
- annotate(people.command("review"), { effects: LOCAL_READ }).summary("people that may be one person, waiting for the owner").description("people that may be one person, waiting for the owner; memo review confirms or rejects them").option("--limit <n>", "most matches, up to 500", positive, 50).option("--json", "print JSON; --json=id,title keeps only those fields").action(async (options) => {
11788
- if (options.limit > 500)
11789
- throw new CliError("validation_error", "--limit takes 1\u2013500", { param: "limit" });
11790
- const found = await withStore(env, (store) => store.people.linkProposals({ status: "proposed", limit: options.limit, offset: 0 }));
11791
- const items = found.items.map(matchAnswer);
11792
- print(options.json, listAnswer("people review", { items, limit: options.limit, has_more: found.hasMore }), [
11793
- ...items.map((match) => `${match.id} ${summaryOf2(match)}`),
11794
- ...found.hasMore ? [`more wait: --limit ${Math.min(500, options.limit * 2)}`] : []
11795
- ].join("\n") || "no matches wait for you");
11796
- });
11932
+ peopleProposalCommands(people, program, streams, env);
11933
+ doubtsCommand(people, program, streams, env);
11797
11934
  annotate(people.command("scan"), { effects: LOCAL_WRITE }).summary("match people across sources now; memo sync does it too").description("match people across sources now: the same address or a phone two people share joins them, the rest waits in people review; memo sync runs it too").option("--json", "print JSON; --json=id,title keeps only those fields").action(async (options) => {
11798
11935
  const scan = await withStore(env, (store) => store.people.scanMatches());
11799
11936
  print(options.json, itemAnswer(scan), `${scan.merged.length} joined, ${scan.proposed.filter(({ opened }) => opened).length} new matches, ${scan.skipped.length} left apart`);
@@ -11825,12 +11962,26 @@ var identitiesCommands = /* @__PURE__ */ __name((people, program, streams, env)
11825
11962
  });
11826
11963
  print(options.json, itemAnswer(done), done.outcome === "linked" ? `linked: ${done.person}` : `waits for the owner as match ${done.proposal}`);
11827
11964
  });
11828
- byOption(annotate(people.command("unlink"), { effects: LOCAL_WRITE }).summary("take identities off a person, to one new person; only you").description("take identities off their person: one gets a person of its own again, several move together to one new person; only you, and no automatic match joins them back").argument("<identities...>", "the identities that leave, each <messenger>:<id> exactly, all of one person")).option("--json", "print JSON; --json=id,title keeps only those fields").action(async (refs, options, command) => {
11829
- await asOwner(command, env, `unlink ${refs.join(" ")}?`);
11830
- const person = await withStore(env, async (store) => {
11965
+ const separation = /* @__PURE__ */ __name(async (command, question, reason) => {
11966
+ const who = await whoRuns(command, env, { asOwner: command.opts().asOwner, question });
11967
+ if (who !== "owner" && !reason?.trim())
11968
+ throw new CliError("validation_error", "an agent's split waits for the owner; say why with --reason", {
11969
+ reason: "proposal.reason-required",
11970
+ param: "reason"
11971
+ });
11972
+ return who;
11973
+ }, "separation");
11974
+ const proposed = /* @__PURE__ */ __name((json5, proposal) => print(json5, itemAnswer({ outcome: "proposed", proposal }), `waits for the owner as split ${proposal}: memo people review`), "proposed");
11975
+ reasonOption(byOption(annotate(people.command("unlink"), { effects: LOCAL_WRITE }).summary("take identities off a person, to one new person; an agent's waits for you").description("take identities off their person: one gets a person of its own again, several move together to one new person, and no automatic match joins them back; yours applies at once, an agent's waits for you in people review").argument("<identities...>", "the identities that leave, each <messenger>:<id> exactly, all of one person"))).option("--json", "print JSON; --json=id,title keeps only those fields").action(async (refs, options, command) => {
11976
+ const who = await separation(command, `unlink ${refs.join(" ")}?`, options.reason);
11977
+ const done = await withStore(env, async (store) => {
11831
11978
  const chosen3 = [];
11832
11979
  for (const ref of refs)
11833
11980
  chosen3.push(await exactIdentityOf(store, ref));
11981
+ if (who !== "owner") {
11982
+ const reason = options.reason?.trim();
11983
+ return { proposal: (await store.people.proposeSplit({ identities: chosen3, by: who, reason })).id };
11984
+ }
11834
11985
  const [first] = chosen3;
11835
11986
  if (chosen3.length === 1)
11836
11987
  return store.people.unlinkIdentity(first, { method: "unlink", by: "owner" });
@@ -11839,11 +11990,20 @@ var identitiesCommands = /* @__PURE__ */ __name((people, program, streams, env)
11839
11990
  throw new CliError("not_found", `the store has no person for "${refs[0]}"`, { reason: "person.not-found" });
11840
11991
  return store.people.split(held.uid, chosen3, "owner");
11841
11992
  });
11842
- print(options.json, itemAnswer(personAnswer(person)), `person:${person.uid}`);
11993
+ if ("proposal" in done)
11994
+ proposed(options.json, done.proposal);
11995
+ else
11996
+ print(options.json, itemAnswer(personAnswer(done)), `person:${done.uid}`);
11843
11997
  });
11844
- byOption(annotate(people.command("unmerge"), { effects: LOCAL_WRITE }).summary("undo a merge: its identities go back to their person; only you").description("give the identities a merge brought back to the person they came from; only you").argument("<merge>", "merge:<to>-<from>, as people show lists it")).option("--json", "print JSON; --json=id,title keeps only those fields").action(async (merge, options, command) => {
11998
+ reasonOption(byOption(annotate(people.command("unmerge"), { effects: LOCAL_WRITE }).summary("undo a merge: its identities go back to their person; an agent's waits for you").description("give the identities a merge brought back to the person they came from; yours applies at once, an agent's waits for you in people review").argument("<merge>", "merge:<to>-<from>, as people show lists it"))).option("--json", "print JSON; --json=id,title keeps only those fields").action(async (merge, options, command) => {
11845
11999
  const { to, from } = parseMergeId(merge);
11846
- await asOwner(command, env, `undo ${merge}?`);
12000
+ const who = await separation(command, `undo ${merge}?`, options.reason);
12001
+ if (who !== "owner") {
12002
+ const reason = options.reason?.trim();
12003
+ const proposal = await withStore(env, (store) => store.people.proposeSplit({ merge, by: who, reason }));
12004
+ proposed(options.json, proposal.id);
12005
+ return;
12006
+ }
11847
12007
  const person = await withStore(env, (store) => store.people.undoMerge(to, from, "owner"));
11848
12008
  print(options.json, itemAnswer(personAnswer(person)), `person:${person.uid}`);
11849
12009
  });
@@ -11922,6 +12082,7 @@ var personRow = /* @__PURE__ */ __name((person) => ({
11922
12082
  phone: person.phone,
11923
12083
  email: person.email,
11924
12084
  username: person.username,
12085
+ username_source: person.usernameSource,
11925
12086
  messages_from: person.messagesFrom,
11926
12087
  last_contact: person.lastContact,
11927
12088
  ties: person.ties
@@ -11970,7 +12131,7 @@ var peopleCommand = /* @__PURE__ */ __name((program, streams, env) => {
11970
12131
  termField("kind", "enum", "kind:organization", { values: [...PERSON_KINDS, "all"] })
11971
12132
  ]
11972
12133
  };
11973
- withQuery(annotate(people.command("list"), { effects: LOCAL_READ }).summary("people of one kind, most messages first: person by default").description("people of one kind: person (the default: the owner, people added by hand or assigned a task, and named people with a tie to you, such as a one-to-one chat, a group of at most 10, mail you wrote, a meeting, a CRM or your address book), organization, automated (bots, newsletters, notifications), unsorted (no tie or no name) or all. The owner first, then by the messages and mail they sent"), query).option("--sort <field>", `${PEOPLE_SORTS.join(", ")} (default interactions)`, oneOf(PEOPLE_SORTS), "interactions").option("--limit <n>", "most people on a page, up to 5000", positive, 500).option("--page <n>", "which page, from 1", positive, 1).option("--json", "print JSON; --json=id,title keeps only those fields").action(async (words, { json: json5, ...options }) => {
12134
+ withQuery(annotate(people.command("list"), { effects: LOCAL_READ }).summary("people of one kind, most messages first: person by default").description("people of one kind: person (the default: the owner, people added by hand or assigned a task, and named people with a tie to you, such as a one-to-one chat, a group of at most 10, mail you wrote, a meeting, a CRM deal of yours or your address book), organization, automated (bots, newsletters, notifications), stranger (no tie), unsorted (no name) or all. The owner first, then by the messages and mail they sent"), query).option("--sort <field>", `${PEOPLE_SORTS.join(", ")} (default interactions)`, oneOf(PEOPLE_SORTS), "interactions").option("--limit <n>", "most people on a page, up to 5000", positive, 500).option("--page <n>", "which page, from 1", positive, 1).option("--json", "print JSON; --json=id,title keeps only those fields").action(async (words, { json: json5, ...options }) => {
11974
12135
  const terms2 = queryTerms(words, query, "people list");
11975
12136
  const name2 = terms2.get("name");
11976
12137
  const kind = terms2.get("kind") ?? "person";
@@ -13804,9 +13965,7 @@ var aiModel = {
13804
13965
  read: /* @__PURE__ */ __name(async (context, { system, prompt }) => {
13805
13966
  const found = reader(context);
13806
13967
  if ("refused" in found)
13807
- throw new CliError("configuration_error", problemOf(found.refused), {
13808
- reason: found.refused === "ai.not-set" ? "reader.ai-not-set" : "reader.no-key"
13809
- });
13968
+ throw found.refused === "ai.not-set" ? new CliError("configuration_error", problemOf(found.refused), { reason: "reader.ai-not-set" }) : new CliError("authentication_error", problemOf(found.refused), { reason: "reader.no-key" });
13810
13969
  try {
13811
13970
  return await found.complete({ purpose: "sources", system, prompt, maxTokens: 4096 });
13812
13971
  } catch (error) {
@@ -14893,6 +15052,7 @@ var WRITES = /* @__PURE__ */ new Set(["update", "link", "claim", "release"]);
14893
15052
  var TASKISH = /^(task:.+|\d+|[A-Z][A-Z0-9]*-\d+)$/;
14894
15053
  var settings = settingsFor({ ...APP, appName: "cli-memo-tasks", envPrefix: "MEMO_TASKS" });
14895
15054
  var resolved = /* @__PURE__ */ new WeakMap();
15055
+ var across = /* @__PURE__ */ new WeakMap();
14896
15056
  var messenger = {
14897
15057
  app: APP,
14898
15058
  provider: "memo",
@@ -14901,7 +15061,8 @@ var messenger = {
14901
15061
  connect: /* @__PURE__ */ __name(async () => {
14902
15062
  throw new CliError("validation_error", "memo reads no messenger: these commands answer from the store");
14903
15063
  }, "connect"),
14904
- accountOf: /* @__PURE__ */ __name((command) => resolved.get(command), "accountOf")
15064
+ accountOf: /* @__PURE__ */ __name((command) => resolved.get(command), "accountOf"),
15065
+ accountsOf: /* @__PURE__ */ __name((command) => across.get(command), "accountsOf")
14905
15066
  };
14906
15067
  var requireAccount = /* @__PURE__ */ __name((env, warn) => async (_, command) => {
14907
15068
  const writes = WRITES.has(command.name());
@@ -14915,6 +15076,10 @@ var requireAccount = /* @__PURE__ */ __name((env, warn) => async (_, command) =>
14915
15076
  resolved.set(command, await oneAccountOf(store, env, value, option));
14916
15077
  return;
14917
15078
  }
15079
+ if (isTaskStats(command) && command.opts().chat === void 0) {
15080
+ across.set(command, await scopedAccounts(store, env));
15081
+ return;
15082
+ }
14918
15083
  if (command.name() === "link" && targets.length > 0 && chats.length === 0 && targets.every((one2) => TASKISH.test(one2)))
14919
15084
  return;
14920
15085
  if (["show", "update", "claim", "release"].includes(command.name()) && first !== void 0 && await store.tasks.projectTask(first))
@@ -14925,9 +15090,10 @@ var requireAccount = /* @__PURE__ */ __name((env, warn) => async (_, command) =>
14925
15090
  await store.close();
14926
15091
  }
14927
15092
  }, "requireAccount");
15093
+ var isTaskStats = /* @__PURE__ */ __name((command) => command.name() === "show" && command.parent?.name() === "tasks" && command.parent.parent?.name() === "stats", "isTaskStats");
14928
15094
  var scoped2 = /* @__PURE__ */ __name((command, env, warn) => overrideSharedContract(command, "Memo names stored accounts with --source or --account and uses command-local JSON without messenger profiles.", (one2) => {
14929
15095
  ;
14930
- (WRITES.has(one2.name()) ? writeOptions(one2, "the account it acts as: telegram:<account>, email:<account>, notes:<id>") : sourceOptions(one2, "the account: telegram:<account>, email:<account>, notes:<id>, or group:<name> of one")).option("--json", "print JSON").hook("preAction", requireAccount(env, warn));
15096
+ (WRITES.has(one2.name()) ? writeOptions(one2, "the account it acts as: telegram:<account>, email:<account>, notes:<id>") : sourceOptions(one2, isTaskStats(one2) ? "only this account: telegram:<account>, email:<account>, notes:<id>, or group:<name>; every stored account without it" : "the account: telegram:<account>, email:<account>, notes:<id>, or group:<name> of one")).option("--json", "print JSON").hook("preAction", requireAccount(env, warn));
14931
15097
  }), "scoped");
14932
15098
  var sharedTaskCommands = /* @__PURE__ */ __name((program, tasks, streams, env) => {
14933
15099
  provide(program, { streams, env });