@wirecat/cli-memo 0.131.79 → 0.131.81

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 (147) hide show
  1. package/dist/bin/memo.js +2 -2
  2. package/dist/bundle/{all-profiles-ZMIHTBZD.js → all-profiles-AG3WU2VX.js} +5 -5
  3. package/dist/bundle/{anthropic-PNRUKJHS.js → anthropic-5OJ6VVBT.js} +2 -2
  4. package/dist/bundle/{app-server-RNASTWZO.js → app-server-CYMFIH4U.js} +36 -36
  5. package/dist/bundle/auto-PI3CSWZS.js +91 -0
  6. package/dist/bundle/{bun-QU4I5GWB.js → bun-YI3OK27Z.js} +2 -2
  7. package/dist/bundle/{bun-sqlite-J4KG5VML.js → bun-sqlite-YXHIEV5I.js} +3 -3
  8. package/dist/bundle/{chunk-RMKJWDVT.js → chunk-26HACUK7.js} +45 -45
  9. package/dist/bundle/{chunk-GTYESBB2.js → chunk-2DLWUJW2.js} +2 -2
  10. package/dist/bundle/{chunk-4XOAQ5EQ.js → chunk-3UQC4O3L.js} +8 -8
  11. package/dist/bundle/{chunk-PB4ZGGR4.js → chunk-5MGGZJAL.js} +1 -1
  12. package/dist/bundle/{chunk-FCHVDLEL.js → chunk-6GFML7RP.js} +2 -2
  13. package/dist/bundle/{chunk-O4ZIN4AY.js → chunk-6KPJKZNM.js} +5 -5
  14. package/dist/bundle/{chunk-H6QELEPY.js → chunk-7CU4TLEU.js} +4 -4
  15. package/dist/bundle/{chunk-IE6AEPW3.js → chunk-7END7RSM.js} +9 -9
  16. package/dist/bundle/{chunk-JX4YNSYT.js → chunk-7TGAZTZ7.js} +1 -1
  17. package/dist/bundle/{chunk-WN7BSOD2.js → chunk-ACUFYEMU.js} +1 -1
  18. package/dist/bundle/{chunk-CLZHPHKI.js → chunk-B44MN5AV.js} +3 -3
  19. package/dist/bundle/{chunk-ZIDR2CSX.js → chunk-BM7X632R.js} +2 -2
  20. package/dist/bundle/{chunk-GDSCR5BG.js → chunk-BXFFFWJC.js} +1 -1
  21. package/dist/bundle/{chunk-R24Q24U5.js → chunk-C4PKTIIC.js} +20 -20
  22. package/dist/bundle/{chunk-DP2RZ6FO.js → chunk-CYNITS32.js} +2 -2
  23. package/dist/bundle/{chunk-CY7WACM7.js → chunk-D6QYOZQ7.js} +29 -29
  24. package/dist/bundle/{chunk-TBCHID7L.js → chunk-DWWQE6QB.js} +1168 -860
  25. package/dist/bundle/{chunk-AWUANCLC.js → chunk-EHBC5J5T.js} +1 -1
  26. package/dist/bundle/{chunk-SEIRBXJT.js → chunk-ENNO7YI4.js} +6 -6
  27. package/dist/bundle/{chunk-MQ6XB6BV.js → chunk-F5G2ECJT.js} +5 -5
  28. package/dist/bundle/{chunk-GJ7KTKIP.js → chunk-FSWVWWK6.js} +12 -12
  29. package/dist/bundle/{chunk-J2KPUG2X.js → chunk-GAGGDEEV.js} +4 -4
  30. package/dist/bundle/{chunk-Q5YM3JWV.js → chunk-GTOC7CVD.js} +2 -2
  31. package/dist/bundle/{chunk-7SGURCSQ.js → chunk-HMLUAJ5X.js} +1 -1
  32. package/dist/bundle/{chunk-RUHFWDHD.js → chunk-IMGEDPEG.js} +3 -3
  33. package/dist/bundle/{chunk-XO6RP5FV.js → chunk-IMOHS6Z4.js} +1 -1
  34. package/dist/bundle/{chunk-IU2QDYBO.js → chunk-ISODMBTI.js} +4 -4
  35. package/dist/bundle/{chunk-4BSNHOEV.js → chunk-J53G4IDW.js} +14 -9
  36. package/dist/bundle/{chunk-LQBVQX47.js → chunk-JURO45D4.js} +83 -78
  37. package/dist/bundle/{chunk-VSSWVVOZ.js → chunk-KAJJEVBN.js} +10 -10
  38. package/dist/bundle/{chunk-CX3D6D43.js → chunk-L4JRQ3EF.js} +3 -3
  39. package/dist/bundle/{chunk-5YS4WS74.js → chunk-LEVVMGYP.js} +1 -1
  40. package/dist/bundle/{chunk-A5TSIMI2.js → chunk-LQRUSNYT.js} +1 -1
  41. package/dist/bundle/{chunk-3GOMBG55.js → chunk-M27DVXQY.js} +7 -7
  42. package/dist/bundle/{chunk-ZFUYVQII.js → chunk-OW7QEJQC.js} +32 -32
  43. package/dist/bundle/{chunk-JDI7CKLO.js → chunk-OXUVXJQZ.js} +7 -7
  44. package/dist/bundle/{chunk-DAJEINOF.js → chunk-QACKJE66.js} +281 -281
  45. package/dist/bundle/{chunk-U3VXKVKI.js → chunk-QKDLZFET.js} +12 -12
  46. package/dist/bundle/{chunk-YJUVVYS6.js → chunk-RRAO2HEO.js} +4 -4
  47. package/dist/bundle/{chunk-TH3LLEA2.js → chunk-SFZATVW3.js} +3 -3
  48. package/dist/bundle/{chunk-46Z7UUCG.js → chunk-SUN4Z4O5.js} +1 -1
  49. package/dist/bundle/{chunk-UYKKJOND.js → chunk-SZXP5BLK.js} +4 -4
  50. package/dist/bundle/{chunk-CQPXUMIS.js → chunk-TGKW746D.js} +1 -1
  51. package/dist/bundle/{chunk-BBJBWSGN.js → chunk-TM7HPDDC.js} +2 -2
  52. package/dist/bundle/{chunk-OP5MKU7T.js → chunk-U5KHIIEZ.js} +1 -1
  53. package/dist/bundle/{chunk-2TIK6LHL.js → chunk-UIPF5ZPZ.js} +393 -305
  54. package/dist/bundle/{chunk-24FOGKJI.js → chunk-UXAVR5L4.js} +5 -5
  55. package/dist/bundle/{chunk-IHWPNLCI.js → chunk-VR5JZXFD.js} +148 -148
  56. package/dist/bundle/{chunk-QOFD6JSB.js → chunk-W2NETMA4.js} +5 -5
  57. package/dist/bundle/{chunk-3HCGK4FN.js → chunk-W6JVRWUC.js} +1 -1
  58. package/dist/bundle/{chunk-2C536VQW.js → chunk-WVTH7Q23.js} +1 -1
  59. package/dist/bundle/{chunk-SM7PB5CU.js → chunk-Y22BK4VX.js} +5 -5
  60. package/dist/bundle/{chunk-4FPSZCWN.js → chunk-YMM7JV6G.js} +2 -2
  61. package/dist/bundle/{chunk-VIZBCX3C.js → chunk-YVY6VV6C.js} +4 -4
  62. package/dist/bundle/{chunk-6ZO2ZVKV.js → chunk-YZLQY6MO.js} +5 -5
  63. package/dist/bundle/{chunk-UC5YCXKS.js → chunk-ZA3QA66B.js} +13 -13
  64. package/dist/bundle/{chunk-QNI3Q7XS.js → chunk-ZQRDE63F.js} +2 -2
  65. package/dist/bundle/{chunk-PI42ZHZQ.js → chunk-ZSDIUMUQ.js} +2 -2
  66. package/dist/bundle/{chunk-HKOHKYDY.js → chunk-ZYBFT7EU.js} +6 -6
  67. package/dist/bundle/{command-contract-4ZJOMSQ2.js → command-contract-G4GWD3V6.js} +11 -11
  68. package/dist/bundle/{command-server-entry-VSWZ5K2Q.js → command-server-entry-CNTXCJJ4.js} +17 -17
  69. package/dist/bundle/{decode-OPD4OHCW.js → decode-LV4O5H3M.js} +2 -2
  70. package/dist/bundle/{echarts-AXYKRYU7.js → echarts-7FYCTGV2.js} +2 -2
  71. package/dist/bundle/{embed-6DBZRTQ7.js → embed-BJ6VBMFC.js} +3 -3
  72. package/dist/bundle/{embedder-SQI6IDZC.js → embedder-EMU2SEDZ.js} +6 -6
  73. package/dist/bundle/{entry-2GKNMGW6.js → entry-IXBQ4UNV.js} +5 -5
  74. package/dist/bundle/{entry-RV5QAV44.js → entry-SWFZ52CW.js} +5 -5
  75. package/dist/bundle/failure-KXBXKFBC.js +71 -0
  76. package/dist/bundle/{first-run-BBMUDHYX.js → first-run-74EADT2V.js} +5 -5
  77. package/dist/bundle/{first-screen-4BS5M4JW.js → first-screen-IW4EUPTH.js} +12 -12
  78. package/dist/bundle/{instructions-JNAROG65.js → instructions-HTJ3I5F5.js} +1 -1
  79. package/dist/bundle/{mcp-3MBYSBNS.js → mcp-RO7CEZ4P.js} +35 -35
  80. package/dist/bundle/memo.js +3 -3
  81. package/dist/bundle/{node-6OTEDFSP.js → node-GTF4PZZJ.js} +2 -2
  82. package/dist/bundle/{node-sqlite-HBHJOJX6.js → node-sqlite-TCF6PKCK.js} +4 -4
  83. package/dist/bundle/{oauth-PVQSSPPE.js → oauth-MQWM7KWY.js} +4 -4
  84. package/dist/bundle/{open-ARBTD4LX.js → open-NDV2TOBL.js} +2 -2
  85. package/dist/bundle/{openai-2JRFTWUA.js → openai-BQAQJD34.js} +7 -7
  86. package/dist/bundle/{process-4ERCV4WX.js → process-YWF25XAX.js} +1 -1
  87. package/dist/bundle/{program-5KVHPFJU.js → program-L4PM3UNK.js} +244 -83
  88. package/dist/bundle/{prompt-4I34VBPK.js → prompt-ME3B7BVG.js} +2 -2
  89. package/dist/bundle/{recognize-22BJ7RWB.js → recognize-NJTH7EAF.js} +1 -1
  90. package/dist/bundle/{remote-BON3MKY5.js → remote-2SQT2DEL.js} +4 -4
  91. package/dist/bundle/{rerank-6CCCIZDS.js → rerank-OYYNHRTD.js} +4 -4
  92. package/dist/bundle/{serve-FB54DFIV.js → serve-KMZU3JKX.js} +6 -6
  93. package/dist/bundle/server-K3HNYEDO.js +64 -0
  94. package/dist/bundle/{server-TL5WPR3I.js → server-OPVBIS67.js} +54 -53
  95. package/dist/bundle/server-QP3EDFBW.js +50 -0
  96. package/dist/bundle/{state-23IF45K6.js → state-Y6JT6KT3.js} +3 -3
  97. package/dist/bundle/{store-FGNXSGJU.js → store-X53QOU4W.js} +9 -9
  98. package/dist/bundle/store-maintenance-command-ELTUGXWJ.js +49 -0
  99. package/dist/bundle/update-4NPCGZ2P.js +74 -0
  100. package/dist/examples.d.ts.map +1 -1
  101. package/dist/examples.js +6 -0
  102. package/dist/examples.js.map +1 -1
  103. package/dist/knowledge/command.d.ts.map +1 -1
  104. package/dist/knowledge/command.js +2 -0
  105. package/dist/knowledge/command.js.map +1 -1
  106. package/dist/knowledge/document-context.d.ts +14 -0
  107. package/dist/knowledge/document-context.d.ts.map +1 -0
  108. package/dist/knowledge/document-context.js +33 -0
  109. package/dist/knowledge/document-context.js.map +1 -0
  110. package/dist/knowledge/project-activity-command.d.ts +5 -0
  111. package/dist/knowledge/project-activity-command.d.ts.map +1 -0
  112. package/dist/knowledge/project-activity-command.js +71 -0
  113. package/dist/knowledge/project-activity-command.js.map +1 -0
  114. package/dist/knowledge/relationships.d.ts +4 -0
  115. package/dist/knowledge/relationships.d.ts.map +1 -1
  116. package/dist/knowledge/relationships.js +14 -0
  117. package/dist/knowledge/relationships.js.map +1 -1
  118. package/dist/knowledge/roles-command.d.ts.map +1 -1
  119. package/dist/knowledge/roles-command.js +7 -4
  120. package/dist/knowledge/roles-command.js.map +1 -1
  121. package/dist/mcp/catalogue.d.ts +3 -0
  122. package/dist/mcp/catalogue.d.ts.map +1 -1
  123. package/dist/mcp/catalogue.js +1 -0
  124. package/dist/mcp/catalogue.js.map +1 -1
  125. package/dist/people/proposal-rows.d.ts +6 -1
  126. package/dist/people/proposal-rows.d.ts.map +1 -1
  127. package/dist/people/proposal-rows.js +14 -5
  128. package/dist/people/proposal-rows.js.map +1 -1
  129. package/dist/people/proposals-command.d.ts.map +1 -1
  130. package/dist/people/proposals-command.js +45 -1
  131. package/dist/people/proposals-command.js.map +1 -1
  132. package/dist/program.d.ts.map +1 -1
  133. package/dist/program.js +1 -0
  134. package/dist/program.js.map +1 -1
  135. package/dist/store/groups-command.d.ts.map +1 -1
  136. package/dist/store/groups-command.js +37 -2
  137. package/dist/store/groups-command.js.map +1 -1
  138. package/dist/version.d.ts +1 -1
  139. package/dist/version.js +1 -1
  140. package/package.json +2 -2
  141. package/dist/bundle/auto-TRSJQGJH.js +0 -91
  142. package/dist/bundle/failure-7RJ4HOL4.js +0 -71
  143. package/dist/bundle/server-SG4BOF6U.js +0 -64
  144. package/dist/bundle/server-UYEXFEEB.js +0 -50
  145. package/dist/bundle/store-maintenance-command-PDLIZ4J2.js +0 -49
  146. package/dist/bundle/update-QTZREQD6.js +0 -74
  147. /package/dist/bundle/{chunk-2AFREBSM.js → chunk-VI7FFUEX.js} +0 -0
@@ -6,18 +6,18 @@ import {
6
6
  autoState,
7
7
  lastAutoRun,
8
8
  recordAutoRun
9
- } from "./chunk-IU2QDYBO.js";
9
+ } from "./chunk-ISODMBTI.js";
10
10
  import {
11
11
  installer,
12
12
  latest,
13
13
  upgradeCommand
14
- } from "./chunk-SM7PB5CU.js";
14
+ } from "./chunk-Y22BK4VX.js";
15
15
  import {
16
16
  mcpOwnerAllowed,
17
17
  memoLevels,
18
18
  readOnlyAvailability,
19
19
  refuseWritesUnderLock
20
- } from "./chunk-MQ6XB6BV.js";
20
+ } from "./chunk-F5G2ECJT.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-24FOGKJI.js";
32
+ } from "./chunk-UXAVR5L4.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-ZFUYVQII.js";
69
+ } from "./chunk-OW7QEJQC.js";
70
70
  import "./chunk-QP3KNC5D.js";
71
- import "./chunk-Q5YM3JWV.js";
72
- import "./chunk-3GOMBG55.js";
73
- import "./chunk-CLZHPHKI.js";
71
+ import "./chunk-GTOC7CVD.js";
72
+ import "./chunk-M27DVXQY.js";
73
+ import "./chunk-B44MN5AV.js";
74
74
  import {
75
75
  errorObject,
76
76
  recognisable
77
- } from "./chunk-H6QELEPY.js";
77
+ } from "./chunk-7CU4TLEU.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-DAJEINOF.js";
155
- import "./chunk-GDSCR5BG.js";
154
+ } from "./chunk-QACKJE66.js";
155
+ import "./chunk-BXFFFWJC.js";
156
156
  import "./chunk-A3QZXQI3.js";
157
- import "./chunk-PB4ZGGR4.js";
157
+ import "./chunk-5MGGZJAL.js";
158
158
  import {
159
159
  allHitItem,
160
160
  coverageGaps,
161
161
  messageHitItem,
162
162
  noteHitItem,
163
163
  shownOf
164
- } from "./chunk-R24Q24U5.js";
165
- import "./chunk-2C536VQW.js";
164
+ } from "./chunk-C4PKTIIC.js";
165
+ import "./chunk-WVTH7Q23.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-4BSNHOEV.js";
173
- import "./chunk-UYKKJOND.js";
172
+ } from "./chunk-J53G4IDW.js";
173
+ import "./chunk-SZXP5BLK.js";
174
174
  import {
175
175
  recoveryNotes,
176
176
  storeInfo,
177
177
  storeRecoveryCheck,
178
178
  storeRecoveryRun,
179
179
  storeSummary
180
- } from "./chunk-RMKJWDVT.js";
181
- import "./chunk-UC5YCXKS.js";
180
+ } from "./chunk-26HACUK7.js";
181
+ import "./chunk-ZA3QA66B.js";
182
182
  import {
183
183
  LIST_QUERY_GUIDE,
184
184
  RESOURCES_SEARCHED,
@@ -229,6 +229,7 @@ import {
229
229
  personBusiness,
230
230
  personContext,
231
231
  previewProjectAnnotationSnapshot,
232
+ projectActivity,
232
233
  projectStatus,
233
234
  proposalRegistry,
234
235
  purposeList,
@@ -246,6 +247,8 @@ import {
246
247
  searchNotesOf,
247
248
  searchNotesQuery,
248
249
  searchStore,
250
+ setAccountScope,
251
+ setChatScope,
249
252
  snapshotProjectAnnotations,
250
253
  storeOnlyDeps,
251
254
  storedNeighbours,
@@ -255,31 +258,31 @@ import {
255
258
  timeLimit,
256
259
  typedQuery,
257
260
  withQuery
258
- } from "./chunk-2TIK6LHL.js";
261
+ } from "./chunk-UIPF5ZPZ.js";
259
262
  import {
260
263
  readBoundedUtf8File,
261
264
  writeFileAtomic
262
- } from "./chunk-U3VXKVKI.js";
265
+ } from "./chunk-QKDLZFET.js";
263
266
  import {
264
267
  releaseLock,
265
268
  servingProfiles,
266
269
  takeLock
267
- } from "./chunk-FCHVDLEL.js";
268
- import "./chunk-BBJBWSGN.js";
270
+ } from "./chunk-6GFML7RP.js";
271
+ import "./chunk-TM7HPDDC.js";
269
272
  import {
270
273
  commandsText,
271
274
  inSection,
272
275
  installHelp
273
- } from "./chunk-HKOHKYDY.js";
276
+ } from "./chunk-ZYBFT7EU.js";
274
277
  import "./chunk-HTQTIKWP.js";
275
- import "./chunk-VSSWVVOZ.js";
278
+ import "./chunk-KAJJEVBN.js";
276
279
  import {
277
280
  isNewer
278
281
  } from "./chunk-2EGS6BXF.js";
279
282
  import "./chunk-OYKQX4H3.js";
280
- import "./chunk-IE6AEPW3.js";
281
- import "./chunk-4FPSZCWN.js";
282
- import "./chunk-3HCGK4FN.js";
283
+ import "./chunk-7END7RSM.js";
284
+ import "./chunk-YMM7JV6G.js";
285
+ import "./chunk-W6JVRWUC.js";
283
286
  import {
284
287
  EVIDENCE_FINDINGS_KIND,
285
288
  IDENTITY_LINK_KIND,
@@ -321,25 +324,25 @@ import {
321
324
  refLabel,
322
325
  storedProfilesFor,
323
326
  writesWithOf
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
+ } from "./chunk-DWWQE6QB.js";
328
+ import "./chunk-OXUVXJQZ.js";
329
+ import "./chunk-LEVVMGYP.js";
330
+ import "./chunk-2DLWUJW2.js";
331
+ import "./chunk-W2NETMA4.js";
329
332
  import {
330
333
  APP,
331
334
  REASONS,
332
335
  STORE_CLIENT,
333
336
  VERSION
334
- } from "./chunk-XO6RP5FV.js";
337
+ } from "./chunk-IMOHS6Z4.js";
335
338
  import "./chunk-NT5IOEEK.js";
336
339
  import "./chunk-D72URWJE.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";
340
+ import "./chunk-6KPJKZNM.js";
341
+ import "./chunk-U5KHIIEZ.js";
342
+ import "./chunk-SFZATVW3.js";
343
+ import "./chunk-YZLQY6MO.js";
344
+ import "./chunk-TGKW746D.js";
345
+ import "./chunk-CYNITS32.js";
343
346
  import {
344
347
  Command,
345
348
  DEFAULT_TEXT_MODEL,
@@ -379,11 +382,11 @@ import {
379
382
  snakeKeys,
380
383
  textModels,
381
384
  textModelsFile
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
+ } from "./chunk-VR5JZXFD.js";
386
+ import "./chunk-ENNO7YI4.js";
387
+ import "./chunk-SUN4Z4O5.js";
388
+ import "./chunk-IMGEDPEG.js";
389
+ import "./chunk-EHBC5J5T.js";
387
390
  import {
388
391
  CATALOG_KINDS,
389
392
  CATEGORIES,
@@ -410,6 +413,7 @@ import {
410
413
  PROJECT_ROLES,
411
414
  REF_KINDS,
412
415
  RELATION_KINDS,
416
+ ROLE_LISTS,
413
417
  SOURCE_REVIEW_KIND,
414
418
  STANDINGS,
415
419
  SUBSCRIPTION_STATUSES,
@@ -456,16 +460,16 @@ import {
456
460
  timezoneOf,
457
461
  validateQuery,
458
462
  walkQuery
459
- } from "./chunk-LQBVQX47.js";
460
- import "./chunk-ZIDR2CSX.js";
461
- import "./chunk-YJUVVYS6.js";
463
+ } from "./chunk-JURO45D4.js";
464
+ import "./chunk-BM7X632R.js";
465
+ import "./chunk-RRAO2HEO.js";
462
466
  import {
463
467
  sharedModelsDirectory
464
- } from "./chunk-CX3D6D43.js";
468
+ } from "./chunk-L4JRQ3EF.js";
465
469
  import "./chunk-G5GW3FFJ.js";
466
470
  import {
467
471
  storePath
468
- } from "./chunk-A5TSIMI2.js";
472
+ } from "./chunk-LQRUSNYT.js";
469
473
  import {
470
474
  Credentials,
471
475
  configFilePath,
@@ -889,7 +893,7 @@ var readScope = /* @__PURE__ */ __name((command, help = ONE_ACCOUNT_HELP) => sou
889
893
  var writeScope = /* @__PURE__ */ __name((command, help) => writeOptions(command, help).option("--json", "print JSON; --json=id,title keeps only those fields"), "writeScope");
890
894
  var jsonOption = /* @__PURE__ */ __name((command, fields = "ref,title") => command.option("--json", `print JSON; --json=${fields} keeps only those fields`), "jsonOption");
891
895
 
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
896
+ // node_modules/.pnpm/@wirecat+cli-core@0.635.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_3655968b1fddf86e6ebc40f56f82dd2f/node_modules/@wirecat/cli-core/dist/mail/sender-scores.js
893
897
  var SCORED = "mail_sender_scores";
894
898
  var DAY = 864e5;
895
899
  var RECENT = 2 * 365 * DAY;
@@ -905,7 +909,7 @@ var demotedSenders = /* @__PURE__ */ __name(async (store) => {
905
909
  return senders;
906
910
  }, "demotedSenders");
907
911
 
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
912
+ // node_modules/.pnpm/@wirecat+cli-core@0.635.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_3655968b1fddf86e6ebc40f56f82dd2f/node_modules/@wirecat/cli-core/dist/mail/sync.js
909
913
  var DAY2 = 864e5;
910
914
  var EDGE = 2 * DAY2;
911
915
 
@@ -2351,7 +2355,7 @@ import { createHash } from "node:crypto";
2351
2355
  import { existsSync, readFileSync as readFileSync2, statSync } from "node:fs";
2352
2356
  import { basename, extname, relative, sep } from "node:path";
2353
2357
 
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
2358
+ // node_modules/.pnpm/@wirecat+cli-core@0.635.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_3655968b1fddf86e6ebc40f56f82dd2f/node_modules/@wirecat/cli-core/dist/services/documents/extraction.js
2355
2359
  var Proposal = object({
2356
2360
  kind: picklist(["summary", "digest", "fact", "preference"]),
2357
2361
  body: pipe(string(), trim(), minLength(1), maxLength(15e3)),
@@ -2359,13 +2363,13 @@ var Proposal = object({
2359
2363
  });
2360
2364
  var Proposals = object({ items: pipe(array(Proposal), maxLength(20)) });
2361
2365
 
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
2366
+ // node_modules/.pnpm/@wirecat+cli-core@0.635.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_3655968b1fddf86e6ebc40f56f82dd2f/node_modules/@wirecat/cli-core/dist/services/documents/mirrors.js
2363
2367
  var ID = pipe(string(), regex(/^[A-Za-z0-9_-]{1,200}$/));
2364
2368
 
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
2369
+ // node_modules/.pnpm/@wirecat+cli-core@0.635.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_3655968b1fddf86e6ebc40f56f82dd2f/node_modules/@wirecat/cli-core/dist/services/documents/sync.js
2366
2370
  var MAX_PICTURE_BYTES = 25 * 1024 * 1024;
2367
2371
 
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
2372
+ // node_modules/.pnpm/@wirecat+cli-core@0.635.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_3655968b1fddf86e6ebc40f56f82dd2f/node_modules/@wirecat/cli-core/dist/fetch/addresses.js
2369
2373
  import { isIP } from "node:net";
2370
2374
  var within3 = /* @__PURE__ */ __name((address, [prefix, bits]) => {
2371
2375
  for (let bit = 0; bit < bits; bit++) {
@@ -2436,7 +2440,7 @@ var isPublicAddress = /* @__PURE__ */ __name((address) => {
2436
2440
  return within3(bytes, [[32], 3]) && !V6_PRIVATE.some((prefix) => within3(bytes, prefix));
2437
2441
  }, "isPublicAddress");
2438
2442
 
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
2443
+ // node_modules/.pnpm/@wirecat+cli-core@0.635.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_3655968b1fddf86e6ebc40f56f82dd2f/node_modules/@wirecat/cli-core/dist/fetch/page.js
2440
2444
  import { lookup as dnsLookup } from "node:dns/promises";
2441
2445
  import { request as httpRequest } from "node:http";
2442
2446
  import { request as httpsRequest } from "node:https";
@@ -6971,7 +6975,7 @@ var doctorCommand = /* @__PURE__ */ __name((...args) => {
6971
6975
  }, SHELL_OVERRIDES.doctor);
6972
6976
  }, "doctorCommand");
6973
6977
 
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
6978
+ // node_modules/.pnpm/@wirecat+cli-core@0.635.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_3655968b1fddf86e6ebc40f56f82dd2f/node_modules/@wirecat/cli-core/dist/calendar/sync.js
6975
6979
  var DAY8 = 864e5;
6976
6980
  var SLOTS_EVERY = 7 * DAY8;
6977
6981
  var isWindow = /* @__PURE__ */ __name((value) => typeof value?.from === "number" && typeof value.to === "number", "isWindow");
@@ -7051,10 +7055,10 @@ var calendarStatus = /* @__PURE__ */ __name(async (store, accountId, { profile,
7051
7055
  return { items, page: 1, limit: Math.max(1, items.length), hasMore: false };
7052
7056
  }, "calendarStatus");
7053
7057
 
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
7058
+ // node_modules/.pnpm/@wirecat+cli-core@0.635.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_3655968b1fddf86e6ebc40f56f82dd2f/node_modules/@wirecat/cli-core/dist/calendar/feeds.js
7055
7059
  var FEED_LIMITS = { maxBytes: 10 * 1024 * 1024, timeoutMs: 3e4, redirects: 5 };
7056
7060
 
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
7061
+ // node_modules/.pnpm/@wirecat+cli-core@0.635.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_3655968b1fddf86e6ebc40f56f82dd2f/node_modules/@wirecat/cli-core/dist/calendar/reads.js
7058
7062
  var LIST = "events list";
7059
7063
  var EVENT_TYPES = [
7060
7064
  "default",
@@ -7131,7 +7135,7 @@ var accountsMeta = /* @__PURE__ */ __name(async (store, accounts, skipped, now)
7131
7135
  };
7132
7136
  }, "accountsMeta");
7133
7137
 
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
7138
+ // node_modules/.pnpm/@wirecat+cli-core@0.635.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_3655968b1fddf86e6ebc40f56f82dd2f/node_modules/@wirecat/cli-core/dist/calendar/writer.js
7135
7139
  var EVENTS_NOTIFY_KEY = "events.notify";
7136
7140
  var EVENTS_DELETE_SERIES_KEY = "events.delete.series";
7137
7141
  var EVENTS_REMIND_HOOK_KEY = "events.remind.hook";
@@ -7396,6 +7400,10 @@ var EXAMPLES = {
7396
7400
  "groups add": ["memo groups add work bitrix24:acme", "memo groups add personal telegram:102"],
7397
7401
  "groups remove": ["memo groups remove work telegram:102"],
7398
7402
  "groups move": ["memo groups move telegram:102 personal work"],
7403
+ "groups update": [
7404
+ "memo groups update bitrix24:acme --scope work",
7405
+ "memo groups update telegram:102 --chat 7 --scope account"
7406
+ ],
7399
7407
  "config show": ["memo config show", "memo config show --json"],
7400
7408
  "config migrate": ["memo config migrate"],
7401
7409
  "config unset": ["memo config unset permissions.notes.edit"],
@@ -7509,6 +7517,7 @@ var EXAMPLES = {
7509
7517
  "memo people reject 17081 --reason 'two people'",
7510
7518
  "memo people reject all --kind link --reason 'not one'"
7511
7519
  ],
7520
+ "people resolve": ["memo people resolve 17092 company", "memo people resolve 17093 company organization:12 --json"],
7512
7521
  "people links check": ["memo people links check", "memo people links check --page 2 --json"],
7513
7522
  "people scan": ["memo people scan"],
7514
7523
  "people link": [
@@ -7527,6 +7536,7 @@ var EXAMPLES = {
7527
7536
  "tasks claim": ["memo tasks claim HRB-1 --lease 2h --account telegram:1"],
7528
7537
  "tasks release": ["memo tasks release HRB-1 --account telegram:1"],
7529
7538
  "tasks show": ["memo tasks show 1a2b3c4d --source telegram:1 --json"],
7539
+ "stats projects show": ["memo stats projects show", "memo stats projects show --since-time 7d --json"],
7530
7540
  "stats tasks show": [
7531
7541
  "memo stats tasks show --source telegram:1",
7532
7542
  "memo stats tasks show --type question --source telegram:1 --json"
@@ -9639,6 +9649,52 @@ var projectActionsCommand = /* @__PURE__ */ __name((projects, streams, env) => {
9639
9649
  }
9640
9650
  }, "projectActionsCommand");
9641
9651
 
9652
+ // dist/knowledge/project-activity-command.js
9653
+ var DAY9 = 864e5;
9654
+ var sinceOf2 = /* @__PURE__ */ __name((value, now) => {
9655
+ if (value.trim().toLowerCase() === "all")
9656
+ return 0;
9657
+ const window = projectWindowOf(value);
9658
+ return "days" in window ? now - window.days * DAY9 : window.after;
9659
+ }, "sinceOf");
9660
+ var textOf = /* @__PURE__ */ __name((one2) => [
9661
+ `${one2.key ?? one2.ref} ${one2.name} \xB7 ${one2.chats} chats${one2.muted ? ` (${one2.muted} muted, not counted)` : ""} \xB7 ${one2.messages} messages (${one2.sent} yours)${one2.lastAt ? ` \xB7 last ${one2.lastAt.slice(0, 10)}` : ""}` + (one2.partial ? " \xB7 some sub-projects not counted" : ""),
9662
+ ...one2.top.map((chat) => ` ${chat.messages} ${chat.title ?? chat.ref}`)
9663
+ ].join("\n"), "textOf");
9664
+ var projectActivityCommand = /* @__PURE__ */ __name((program, streams, env) => {
9665
+ const { print } = answers(program, streams, env);
9666
+ const stats = program.commands.find((command) => command.name() === "stats") ?? program.command("stats").description("statistics about what the store holds");
9667
+ const projects = new Command("projects").description("project statistics");
9668
+ stats.addCommand(projects);
9669
+ annotate(projects.command("show"), { effects: LOCAL_READ }).summary("each project's linked chats: messages in a period, last activity, busiest chats").description("for each of your projects, the chats linked to it or its child projects (every confirmed link, any purpose, no chat limit, unlike projects status): how many, how many are muted, messages and yours in the period by when they were sent, the newest message and the three busiest chats; a muted chat's messages are not counted. Busiest first. One read for all projects; projects status <project> says where one stands").option("--since-time <time>", "how far back: days (30d, at most 730d), a start date (2026-09-01) or all", "30d").option("--limit <n>", "most projects 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) => {
9670
+ const now = Date.now();
9671
+ const since = sinceOf2(options.sinceTime, now);
9672
+ const limit = Math.min(options.limit, 200);
9673
+ const found = await withStore(env, async (store) => {
9674
+ const scope = await groupScopeOf(store, env);
9675
+ return projectActivity(store, {
9676
+ since,
9677
+ until: now,
9678
+ limit,
9679
+ offset: (options.page - 1) * limit,
9680
+ ...scope === void 0 ? {} : { accounts: scope.accounts }
9681
+ });
9682
+ });
9683
+ print(options.json, listAnswer("stats projects show", {
9684
+ items: found.items,
9685
+ limit,
9686
+ page: options.page,
9687
+ has_more: found.hasMore,
9688
+ total: { value: found.total, relation: "eq" },
9689
+ args: { since_time: options.sinceTime, limit }
9690
+ }), [
9691
+ since === 0 ? "all time" : `since ${new Date(since).toISOString().slice(0, 10)}`,
9692
+ ...found.items.length ? found.items.map(textOf) : [options.page > 1 ? "no projects on this page" : "no projects"],
9693
+ ...found.hasMore ? [`more: --since-time ${options.sinceTime} --limit ${limit} --page ${options.page + 1}`] : []
9694
+ ].join("\n\n"));
9695
+ });
9696
+ }, "projectActivityCommand");
9697
+
9642
9698
  // dist/knowledge/project-findings.js
9643
9699
  var projectFindings = /* @__PURE__ */ __name(async (store, project, links) => {
9644
9700
  const ids = /* @__PURE__ */ new Set();
@@ -9756,7 +9812,7 @@ var projectContextText = /* @__PURE__ */ __name((context) => {
9756
9812
  }, "projectContextText");
9757
9813
 
9758
9814
  // dist/knowledge/relationships-scan.js
9759
- var DAY9 = 864e5;
9815
+ var DAY10 = 864e5;
9760
9816
  var SCAN_STEP = {
9761
9817
  id: "relationships.scan",
9762
9818
  kind: "command",
@@ -9830,7 +9886,7 @@ var relationshipsScanCommand = /* @__PURE__ */ __name((relations, print, env, wa
9830
9886
  if (options.limit > 50)
9831
9887
  throw new CliError("validation_error", "--limit is at most 50", { param: "limit" });
9832
9888
  const window = projectWindowOf(options.sinceTime);
9833
- const since = new Date("days" in window ? Date.now() - window.days * DAY9 : window.after).toISOString();
9889
+ const since = new Date("days" in window ? Date.now() - window.days * DAY10 : window.after).toISOString();
9834
9890
  const written2 = options.yes === true;
9835
9891
  const { body, text: text3 } = await withStore(env, async (store) => {
9836
9892
  const sources = await namedAccounts(store, env, options, warn);
@@ -10100,6 +10156,38 @@ var projectTransferCommand = /* @__PURE__ */ __name((projects, streams, env) =>
10100
10156
  }
10101
10157
  }, "projectTransferCommand");
10102
10158
 
10159
+ // dist/knowledge/document-context.js
10160
+ var MAX_DEPTH = 20;
10161
+ var documentContext = /* @__PURE__ */ __name(async (store, ref) => {
10162
+ const note = await store.notes.note(ref).catch(() => null);
10163
+ if (!note || note.deletedAt)
10164
+ return null;
10165
+ const { folderId } = note;
10166
+ const entryOf2 = /* @__PURE__ */ __name(async (externalId) => folderId === null ? void 0 : await store.catalog.get(folderId, externalId).catch(() => void 0), "entryOf");
10167
+ const entry = note.path === null ? void 0 : await entryOf2(note.path);
10168
+ if (!entry)
10169
+ return { ref: note.ref, title: note.title, path: null, url: null, modifiedAt: note.modifiedAt, mime: null };
10170
+ const names = [entry.name];
10171
+ const seen = /* @__PURE__ */ new Set([note.path]);
10172
+ let parent = entry.parents[0];
10173
+ for (let depth = 0; parent !== void 0 && !seen.has(parent) && depth < MAX_DEPTH; depth++) {
10174
+ seen.add(parent);
10175
+ const folder = await entryOf2(parent);
10176
+ if (!folder)
10177
+ break;
10178
+ names.unshift(folder.name);
10179
+ parent = folder.parents[0];
10180
+ }
10181
+ return {
10182
+ ref: note.ref,
10183
+ title: entry.name,
10184
+ path: names.join("/"),
10185
+ url: entry.url ?? null,
10186
+ modifiedAt: entry.modifiedAt ?? note.modifiedAt,
10187
+ mime: entry.mime ?? null
10188
+ };
10189
+ }, "documentContext");
10190
+
10103
10191
  // dist/knowledge/relationships.js
10104
10192
  var RELATIONSHIP_QUERY = {
10105
10193
  entity: "relationship",
@@ -10118,10 +10206,10 @@ var RELATIONSHIP_QUERY = {
10118
10206
  termField("include", "enum", "include:ended", { values: ["ended"] })
10119
10207
  ]
10120
10208
  };
10121
- var DAY10 = /^\d{4}-\d{2}-\d{2}$/;
10209
+ var DAY11 = /^\d{4}-\d{2}-\d{2}$/;
10122
10210
  var atOf = /* @__PURE__ */ __name((day2) => {
10123
10211
  const at2 = Date.parse(`${day2}T00:00:00Z`);
10124
- if (!DAY10.test(day2) || Number.isNaN(at2))
10212
+ if (!DAY11.test(day2) || Number.isNaN(at2))
10125
10213
  throw new CliError("validation_error", `at: takes a day, such as at:2026-10-01 \u2014 not "${day2}"`, {
10126
10214
  reason: "input.invalid"
10127
10215
  });
@@ -10152,6 +10240,18 @@ var listRelationships = /* @__PURE__ */ __name(async (store, env, words, { limit
10152
10240
  if (guard === void 0 || await guard.visible(one2.from) && await guard.visible(one2.to))
10153
10241
  rows.push(one2);
10154
10242
  const label = await labelsFor(store, rows.flatMap((one2) => [one2.from, one2.to]));
10243
+ const documents = /* @__PURE__ */ new Map();
10244
+ const documentOf2 = /* @__PURE__ */ __name((ref) => {
10245
+ if (!ref.startsWith("document:"))
10246
+ return void 0;
10247
+ if (!documents.has(ref))
10248
+ documents.set(ref, documentContext(store, ref));
10249
+ return documents.get(ref);
10250
+ }, "documentOf");
10251
+ const ends = /* @__PURE__ */ __name(async (one2) => {
10252
+ const [from, to] = await Promise.all([documentOf2(one2.from), documentOf2(one2.to)]);
10253
+ return { ...from === void 0 ? {} : { fromDocument: from }, ...to === void 0 ? {} : { toDocument: to } };
10254
+ }, "ends");
10155
10255
  return {
10156
10256
  hasMore: found.hasMore,
10157
10257
  limit,
@@ -10162,7 +10262,8 @@ var listRelationships = /* @__PURE__ */ __name(async (store, env, words, { limit
10162
10262
  // Who proposed it is the review's to name; the list says it beside the proposal.
10163
10263
  ...one2.source === "proposal" ? { proposer: proposerName((await store.proposedActions.get(one2.id)).proposedBy) } : {},
10164
10264
  fromTitle: label(one2.from),
10165
- toTitle: label(one2.to)
10265
+ toTitle: label(one2.to),
10266
+ ...await ends(one2)
10166
10267
  })))
10167
10268
  };
10168
10269
  }, "listRelationships");
@@ -10181,13 +10282,13 @@ var relationshipsText = /* @__PURE__ */ __name((items) => items.length ? items.m
10181
10282
  ].filter(Boolean).join(" ")).join("\n") : "no relationships", "relationshipsText");
10182
10283
 
10183
10284
  // dist/knowledge/roles-command.js
10184
- var LISTS = ["organization", "project", "deal"];
10285
+ var LISTS = Object.keys(ROLE_LISTS);
10185
10286
  var ROLES_QUERY = {
10186
10287
  entity: "relationship_role",
10187
10288
  backend: "native",
10188
10289
  fields: [termField("list", "enum", "list:organization", { values: LISTS })]
10189
10290
  };
10190
- var LIST_HELP = "organization (roles in an organization), project or deal (a deal's or a lead's)";
10291
+ var LIST_HELP = "organization (roles in an organization), project, deal (a deal's or a lead's), contract (a party's) or related (what a person or an organization is to another)";
10191
10292
  var ownerOnly = /* @__PURE__ */ __name(async (command, env, asOwner2, question) => {
10192
10293
  if (await whoRuns(command, env, { asOwner: asOwner2, question }) !== "owner")
10193
10294
  throw new CliError("permission_error", "only the owner changes the role lists; an agent uses the roles they hold", {
@@ -10199,9 +10300,9 @@ var relationshipRolesCommand = /* @__PURE__ */ __name((relations, { print }, env
10199
10300
  const rows = /* @__PURE__ */ __name(async (lists) => withStore(env, async (store) => (await Promise.all(lists.map(async (list) => (await store.knowledge.roles(list)).map((one2) => ({ list, ...one2 }))))).flat()), "rows");
10200
10301
  const show = /* @__PURE__ */ __name(async (json5, command, lists) => {
10201
10302
  const items = await rows(lists);
10202
- print(json5, listAnswer(command, { items, limit: Math.max(1, items.length), has_more: false }), items.map(({ list, id, label, builtIn }) => `${list} ${id}${label ? ` ${label}` : ""}${builtIn ? "" : " (yours)"}`).join("\n"));
10303
+ print(json5, listAnswer(command, { items, limit: Math.max(1, items.length), has_more: false }), items.map(({ list, id, label, labels, builtIn }) => `${list} ${id}${label ?? labels?.en ? ` ${label ?? labels?.en}` : ""}${builtIn ? "" : " (yours)"}`).join("\n"));
10203
10304
  }, "show");
10204
- withQuery(annotate(roles.command("list"), { effects: LOCAL_READ, output: { entity: "relationship_role" } }), ROLES_QUERY).description("the roles of every list, or of one with list:organization, list:project or list:deal; each built in or yours").summary("the roles a relationship may take").option("--json", "print JSON; --json=id,title keeps only those fields").action((words, options) => {
10305
+ withQuery(annotate(roles.command("list"), { effects: LOCAL_READ, output: { entity: "relationship_role" } }), ROLES_QUERY).description("the roles of every list, or of one with list:<name>; each built in (with labels in English, Russian and Spanish) or yours").summary("the roles a relationship may take").option("--json", "print JSON; --json=id,title keeps only those fields").action((words, options) => {
10205
10306
  const list = queryTerms(words, ROLES_QUERY, "relationships roles list").get("list");
10206
10307
  return show(options.json, "relationships roles list", list === void 0 ? LISTS : [list]);
10207
10308
  });
@@ -10325,6 +10426,7 @@ var knowledgeCommands = /* @__PURE__ */ __name((program, streams, env) => {
10325
10426
  });
10326
10427
  projectGatherCommand(projects, print, env, warn);
10327
10428
  projectStatusCommand(projects, print, env);
10429
+ projectActivityCommand(program, streams, env);
10328
10430
  projectActionsCommand(projects, streams, env);
10329
10431
  projectTransferCommand(projects, streams, env);
10330
10432
  const keys = projects.command("key-documents").description("the notes, files and messages to read first about a project, each with why");
@@ -10876,10 +10978,10 @@ var mcpCommandDefinition = /* @__PURE__ */ __name((program, streams, env, create
10876
10978
  }).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) => {
10877
10979
  if (!options.http && (options.port !== void 0 || options.publicUrl !== void 0))
10878
10980
  throw new CliError("validation_error", "--port and --public-url require --http");
10879
- const { createMemoServer } = await import("./server-TL5WPR3I.js");
10981
+ const { createMemoServer } = await import("./server-OPVBIS67.js");
10880
10982
  const build = /* @__PURE__ */ __name(() => createMemoServer(env, createProgram2, options.permission), "build");
10881
10983
  if (options.http) {
10882
- const { httpLockFile, mcpUrlOf, portOf, publicUrlOf, serveOverHttp } = await import("./mcp-3MBYSBNS.js");
10984
+ const { httpLockFile, mcpUrlOf, portOf, publicUrlOf, serveOverHttp } = await import("./mcp-RO7CEZ4P.js");
10883
10985
  const publicUrl = publicUrlOf(options.publicUrl, {
10884
10986
  missing: "--http",
10885
10987
  reaches: "the browser apps reach memo",
@@ -10931,7 +11033,7 @@ var mcpCommandDefinition = /* @__PURE__ */ __name((program, streams, env, create
10931
11033
  });
10932
11034
  });
10933
11035
  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() {
10934
- const { revokeAll } = await import("./mcp-3MBYSBNS.js");
11036
+ const { revokeAll } = await import("./mcp-RO7CEZ4P.js");
10935
11037
  revokeAll(httpTokenFile(env));
10936
11038
  out.print(this.opts().json, itemAnswer({ revoked: true }));
10937
11039
  });
@@ -11426,7 +11528,7 @@ var refuseOverMcp = /* @__PURE__ */ __name((options, mcp2) => {
11426
11528
  param: "export"
11427
11529
  });
11428
11530
  }, "refuseOverMcp");
11429
- var textOf = /* @__PURE__ */ __name((options, given2) => {
11531
+ var textOf2 = /* @__PURE__ */ __name((options, given2) => {
11430
11532
  const sources = [given2, options.text, options.textFile].filter((value) => value !== void 0);
11431
11533
  if (sources.length !== 1)
11432
11534
  throw new CliError("validation_error", "give the text once: as an argument, --text or --text-file");
@@ -11522,7 +11624,7 @@ var notesCommandDefinition = /* @__PURE__ */ __name((program, streams, env) => {
11522
11624
  }).description("write a note of your own about messages, people, projects or other notes").argument("[text]", "the note; or --text, or --text-file").option("--text <text>", "the note").option("--text-file <path>", "read the note from a file; - reads stdin").option("--title <title>", "a title").option("--subject <ref>", "what it is about: <messenger>:<name or id>, msg:, chat:, person:, organization:, project:, task:, note:, document:, meeting:; repeat for more", collect).option("--meeting <id>", "also about this meeting, by its store id, with --account");
11523
11625
  writeOptions(noteAdd, `the account of --meeting: ${MEETING_WRITE_HELP}`).option("--export [dir]", "also write it as a file \u2014 to this folder, or notes.export.dir").option("--format <format>", `the file's format: ${DIALECTS.join(", ")}`, formatOf).option("--json", "print JSON; --json=id,title keeps only those fields").action(async (given2, options, command) => {
11524
11626
  refuseOverMcp(options, isMcpRun(command, env));
11525
- const body = textOf(options, given2);
11627
+ const body = textOf2(options, given2);
11526
11628
  const value = writeAccountOf(options, (text3) => streams.diagnostic(text3));
11527
11629
  if (options.meeting === void 0 && value !== void 0)
11528
11630
  throw new CliError("validation_error", "--account selects the account of --meeting");
@@ -11544,7 +11646,7 @@ var notesCommandDefinition = /* @__PURE__ */ __name((program, streams, env) => {
11544
11646
  });
11545
11647
  annotate(notes2.command("edit"), { effects: LOCAL_WRITE, output: { entity: "note" }, literal_after_dashes: true }).description("change a note you wrote here; a file's note is edited in its file").argument("<id>", "note:<id>").requiredOption("--revision <n>", "its current revision, so an edit made meanwhile is not lost", positive).option("--text <text>", "the new text").option("--text-file <path>", "read the new text from a file; - reads stdin").option("--export [dir]", "also rewrite its file \u2014 in this folder, or notes.export.dir").option("--format <format>", `the file's format: ${DIALECTS.join(", ")}`, formatOf).option("--json", "print JSON; --json=id,title keeps only those fields").action(async (id, options, command) => {
11546
11648
  refuseOverMcp(options, isMcpRun(command, env));
11547
- const body = textOf(options);
11649
+ const body = textOf2(options);
11548
11650
  const answer = await withNotes(async (store) => {
11549
11651
  await refuseBareNumber(store, id, ["note"]);
11550
11652
  const note = await store.notes.editNote(id.replace(/^note:/, ""), body, options.revision);
@@ -11726,7 +11828,7 @@ var foldersCommand = /* @__PURE__ */ __name((program, streams, env) => {
11726
11828
  import { join as join13 } from "node:path";
11727
11829
 
11728
11830
  // dist/people/doubts-command.js
11729
- var textOf2 = /* @__PURE__ */ __name((doubt) => [
11831
+ var textOf3 = /* @__PURE__ */ __name((doubt) => [
11730
11832
  `${doubt.person}${doubt.name ? ` ${doubt.name}` : ""}${doubt.owner ? " (you)" : ""} \xB7 ${doubt.reason}`,
11731
11833
  ` ${doubt.why}`,
11732
11834
  ...doubt.identities.map(({ identity, name: name2, method, by, at: at2 }) => ` ${identity}${name2 ? ` ${name2}` : ""} (${method} by ${by}, ${at2.slice(0, 10)})`),
@@ -11749,7 +11851,7 @@ var doubtsCommand = /* @__PURE__ */ __name((people, program, streams, env) => {
11749
11851
  has_more: found.hasMore,
11750
11852
  ...counted3 ? { total: { value: found.total, relation: "eq" } } : {}
11751
11853
  }), [
11752
- found.items.map(textOf2).join("\n\n") || (found.hasMore ? "none on this page" : "no person looks wrong"),
11854
+ found.items.map(textOf3).join("\n\n") || (found.hasMore ? "none on this page" : "no person looks wrong"),
11753
11855
  ...found.hasMore ? [`more: --page ${options.page + 1}`] : []
11754
11856
  ].join("\n\n"));
11755
11857
  });
@@ -11774,6 +11876,8 @@ var matchAnswer = /* @__PURE__ */ __name((row) => ({
11774
11876
  with: row.with,
11775
11877
  signal: row.signal,
11776
11878
  score: row.score,
11879
+ shared: row.shared,
11880
+ mailbox: row.mailbox,
11777
11881
  candidates: row.candidates,
11778
11882
  reason: row.reason,
11779
11883
  evidence: row.evidence,
@@ -11793,17 +11897,21 @@ var splitAnswer = /* @__PURE__ */ __name((row) => ({
11793
11897
  createdAt: row.createdAt
11794
11898
  }), "splitAnswer");
11795
11899
  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})`;
11900
+ if (row.kind === "identity_link") {
11901
+ const why = [row.signal, ...row.mailbox ? [`shared mailbox ${row.mailbox}`] : []];
11902
+ const score = row.score === null ? "" : `, score ${row.score}`;
11903
+ return `${row.identity} may be the same person as ${row.with ?? row.persons[1]} (${why.join(", ")}${score})`;
11904
+ }
11798
11905
  return row.split === "unmerge" ? `undo ${row.merge}: ${row.identities.join(" ")} go back to their own person` : `take ${row.identities.join(" ")} off ${row.person}`;
11799
11906
  }, "summaryOf");
11800
11907
  var PROPOSAL_KINDS = ["all", "link", "split"];
11908
+ var scoreOf = /* @__PURE__ */ __name((row) => row.kind === "identity_link" ? row.score ?? -1 : -1, "scoreOf");
11801
11909
  var waiting2 = /* @__PURE__ */ __name(async (store, { kind, limit }) => {
11802
11910
  const none = { items: [], hasMore: false };
11803
11911
  const page = { status: "proposed", limit, offset: 0 };
11804
- const links = kind === "split" ? none : await store.people.linkProposals(page);
11912
+ const links = kind === "split" ? none : await store.people.linkProposals({ ...page, order: "score" });
11805
11913
  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));
11914
+ const rows = [...links.items.map(matchAnswer), ...splits.items.map(splitAnswer)].sort((a, b) => scoreOf(b) - scoreOf(a) || b.createdAt.localeCompare(a.createdAt) || Number(b.id) - Number(a.id));
11807
11915
  return { items: rows.slice(0, limit), hasMore: links.hasMore || splits.hasMore || rows.length > limit };
11808
11916
  }, "waiting");
11809
11917
 
@@ -11833,9 +11941,20 @@ var peopleIds = /* @__PURE__ */ __name(async (store, ids) => {
11833
11941
  }
11834
11942
  return { ids: kept2, refused: refused2 };
11835
11943
  }, "peopleIds");
11944
+ var RESOLVE_ANSWERS = ["company"];
11945
+ var organizationOf = /* @__PURE__ */ __name((word) => {
11946
+ if (word === void 0)
11947
+ return void 0;
11948
+ const id = /^(?:organization:)?(\d+)$/.exec(word)?.[1];
11949
+ if (id === void 0)
11950
+ throw new CliError("validation_error", `${word} is not an organization; it looks like organization:12`, {
11951
+ param: "organization"
11952
+ });
11953
+ return Number(id);
11954
+ }, "organizationOf");
11836
11955
  var peopleProposalCommands = /* @__PURE__ */ __name((people, program, streams, env) => {
11837
11956
  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) => {
11957
+ 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), highest score first, then newest; people confirm or people reject answers them, and people resolve company answers a match on a shared mailbox").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
11958
  const limit = limitOf(options.limit);
11840
11959
  const found = await withStore(env, (store) => waiting2(store, { kind: options.kind, limit }));
11841
11960
  print(options.json, listAnswer("people review", { items: found.items, limit, has_more: found.hasMore }), [
@@ -11877,6 +11996,26 @@ nothing changed; add --yes to ${name2} them${moreText}`);
11877
11996
  print(options.json, itemAnswer({ ...decided, has_more: more }, issues.length ? { meta: { complete: false, issues } } : void 0), decidedText(decided) + moreText);
11878
11997
  });
11879
11998
  }
11999
+ const company = byOption(annotate(people.command("resolve"), { effects: LOCAL_WRITE }).summary("say a shared mailbox is a company's, not either person's; only you").description("answers a match on a shared mailbox (people review shows shared and mailbox) with company: the address goes to the organization you name, else to the one that has the address or its company domain, else to one named --name, else to a new company named after the domain. The two people are not joined and are not proposed again on that address").argument("<id>", "the match's id as people review lists it").argument("<answer>", "company: the mailbox is a company's, not either person's", oneOf(RESOLVE_ANSWERS)).argument("[organization]", "organization:<id> to give the address to")).option("--name <name>", "the company's name, when no organization is named").option("--reason <text>", "why, in a few words").option("--json", "print JSON; --json=id,title keeps only those fields");
12000
+ company.action(async (id, _answer, organization, options) => {
12001
+ const owned = organizationOf(organization);
12002
+ await asOwner(company, env, `say the mailbox of people proposal ${id} is a company's?`);
12003
+ const decided = await withStore(env, async (store) => {
12004
+ await (await reviewOf(store, env)).get(id);
12005
+ return store.people.decideLink(id, {
12006
+ confirm: false,
12007
+ by: "owner",
12008
+ company: {
12009
+ ...owned === void 0 ? {} : { organization: owned },
12010
+ ...options.name ? { name: options.name } : {}
12011
+ },
12012
+ ...options.reason ? { reason: options.reason } : {}
12013
+ });
12014
+ });
12015
+ const given2 = decided.result?.organization ?? null;
12016
+ const mailbox = decided.payload.mailbox ?? null;
12017
+ print(options.json, itemAnswer({ id, kind: IDENTITY_LINK_KIND, status: "rejected", mailbox, organization: given2 }), `${id}: ${mailbox} is ${given2}'s mailbox now; the two people stay apart`);
12018
+ });
11880
12019
  }, "peopleProposalCommands");
11881
12020
 
11882
12021
  // dist/people/identities-command.js
@@ -14819,6 +14958,13 @@ var sourcesCommand = /* @__PURE__ */ __name((program, streams, env, { fetch: fet
14819
14958
  }, "sourcesCommand");
14820
14959
 
14821
14960
  // dist/store/groups-command.js
14961
+ var scopeOption = /* @__PURE__ */ __name((scope, chat) => {
14962
+ if (scope === "personal" || scope === "work")
14963
+ return scope;
14964
+ if (scope === "account" && chat !== void 0)
14965
+ return null;
14966
+ throw new CliError("validation_error", chat === void 0 ? `--scope ${scope}: personal or work` : `--scope ${scope}: personal, work, or account to let the chat follow its account`, { reason: "input.invalid", param: "scope" });
14967
+ }, "scopeOption");
14822
14968
  var MEMBER_HELP = "one account, as --source names it: telegram:102, tg:work, email:me@work.example, bitrix24:<portal>";
14823
14969
  var GROUPS_QUERY = { entity: "account_group", backend: "native", fields: [] };
14824
14970
  var at = /* @__PURE__ */ __name((store, env) => ({ store, account: MEMO_ACCOUNT, app: APP, env }), "at");
@@ -14866,6 +15012,20 @@ var groupsCommand = /* @__PURE__ */ __name((program, streams, env) => {
14866
15012
  grantsAuthority(annotate(groups.command("add"), { effects: LOCAL_WRITE, output: { entity: "account_group" } })).description("put an account in a group, which is made when it does not exist; it may stay in others too").summary("put an account in a group").argument("<group>", "the group: letters, digits, - and _, not a memo command word").argument("<source>", MEMBER_HELP).option("--json", "print JSON; --json=id,title keeps only those fields").action((group, member, options) => show("groups add", options.json, (store) => addGroupMember(at(store, env), { group, member, reserved: reserved() })));
14867
15013
  grantsAuthority(annotate(groups.command("remove"), { effects: LOCAL_WRITE, output: { entity: "account_group" } })).description("take an account out of a group; the account and its data stay, and `all` still reads it").summary("take an account out of a group").argument("<group>", "the group").argument("<source>", MEMBER_HELP).option("--json", "print JSON; --json=id,title keeps only those fields").action((group, member, options) => show("groups remove", options.json, (store) => removeGroupMember(at(store, env), { group, member })));
14868
15014
  grantsAuthority(annotate(groups.command("move"), { effects: LOCAL_WRITE, output: { entity: "account_group" } })).description("move an account from one group to another in one write; the other group is made when it is new").summary("move an account between groups").argument("<source>", MEMBER_HELP).argument("<from>", "the group it leaves").argument("<to>", "the group it joins").option("--json", "print JSON; --json=id,title keeps only those fields").action((member, from, to, options) => show("groups move", options.json, (store) => moveGroupMember(at(store, env), { member, from, to, reserved: reserved() })));
15015
+ grantsAuthority(annotate(groups.command("update"), {
15016
+ effects: LOCAL_WRITE,
15017
+ mcp: false,
15018
+ output: { entity: "account_scope" }
15019
+ })).description("set an account's scope, personal or work, which decides whether work views and meeting preparation read it; with --chat, pin one chat of it to a scope, or let it follow its account again").summary("set an account's or one chat's scope, personal or work").argument("<source>", MEMBER_HELP).requiredOption("--scope <scope>", "personal or work; with --chat also account, which takes the chat's own off").option("--chat <chat>", "one chat of the account, by its id there").option("--json", "print JSON; --json=id,title keeps only those fields").action(async (member, options) => {
15020
+ const scope = scopeOption(options.scope, options.chat);
15021
+ if (options.chat === void 0) {
15022
+ const account2 = await withStore(env, (store) => setAccountScope(at(store, env), { member, scope }));
15023
+ print(options.json, itemAnswer(account2), `${account2.provider}:${account2.account} is ${account2.scope}`);
15024
+ return;
15025
+ }
15026
+ const chat = await withStore(env, (store) => setChatScope(at(store, env), { member, chat: options.chat, scope }));
15027
+ print(options.json, itemAnswer(chat), `chat ${chat.chat} of ${chat.provider}:${chat.account} is ${chat.scope}` + (chat.own === null ? ", as its account" : ", its own"));
15028
+ });
14869
15029
  }, "groupsCommand");
14870
15030
 
14871
15031
  // dist/store/info-command.js
@@ -15983,7 +16143,8 @@ var GROUP_AWARE = [
15983
16143
  "projects add",
15984
16144
  "projects context",
15985
16145
  "projects status",
15986
- "projects key-documents"
16146
+ "projects key-documents",
16147
+ "stats projects show"
15987
16148
  ];
15988
16149
  var isSimpleKind = /* @__PURE__ */ __name((name2) => REF_KINDS.some(({ type }) => type === name2), "isSimpleKind");
15989
16150
  var REF_KINDS_OF = {