@wirecat/cli-core 0.618.0 → 0.620.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (335) hide show
  1. package/CHANGELOG.md +453 -1
  2. package/README.md +1 -1
  3. package/THIRD_PARTY_NOTICES +3 -0
  4. package/dist/background/deliver.d.ts +5 -2
  5. package/dist/background/deliver.js +30 -12
  6. package/dist/background/report/render.d.ts +3 -1
  7. package/dist/background/report/render.js +3 -1
  8. package/dist/calendar/cli/answers.d.ts +1 -0
  9. package/dist/calendar/cli/answers.js +6 -1
  10. package/dist/calendar/cli/index.js +2 -14
  11. package/dist/calendar/cli/people-link.d.ts +3 -0
  12. package/dist/calendar/cli/people-link.js +23 -0
  13. package/dist/calendar/cli/search-all.d.ts +1 -1
  14. package/dist/calendar/cli/search-all.js +9 -10
  15. package/dist/calendar/index.d.ts +1 -1
  16. package/dist/calendar/index.js +1 -1
  17. package/dist/calendar/mcp/index.d.ts +12 -12
  18. package/dist/calendar/prepare.js +1 -0
  19. package/dist/cli/base-stages-command.d.ts +22 -0
  20. package/dist/cli/base-stages-command.js +174 -0
  21. package/dist/cli/bot/buttons.d.ts +3 -0
  22. package/dist/cli/bot/buttons.js +24 -0
  23. package/dist/cli/bot/messages.js +14 -1
  24. package/dist/cli/bot/port.d.ts +8 -0
  25. package/dist/cli/command-runs.d.ts +2 -0
  26. package/dist/cli/command-runs.js +3 -1
  27. package/dist/cli/config-command.js +6 -1
  28. package/dist/cli/context.js +1 -0
  29. package/dist/cli/contract-templates.js +31 -2
  30. package/dist/cli/group-lock.d.ts +42 -0
  31. package/dist/cli/group-lock.js +130 -0
  32. package/dist/cli/index.d.ts +7 -2
  33. package/dist/cli/index.js +7 -2
  34. package/dist/cli/messenger/backfill-command.js +27 -15
  35. package/dist/cli/messenger/contacts-command.js +12 -4
  36. package/dist/cli/messenger/context.js +1 -0
  37. package/dist/cli/messenger/conversations-command.js +2 -1
  38. package/dist/cli/messenger/doctor-command.js +3 -1
  39. package/dist/cli/messenger/message-items.js +1 -1
  40. package/dist/cli/messenger/models-command.js +1 -1
  41. package/dist/cli/messenger/search-answers.d.ts +5 -5
  42. package/dist/cli/messenger/search-answers.js +9 -20
  43. package/dist/cli/messenger/search-command.d.ts +2 -2
  44. package/dist/cli/messenger/search-command.js +8 -18
  45. package/dist/cli/messenger/store-maintenance-command.d.ts +22 -2
  46. package/dist/cli/messenger/store-maintenance-command.js +9 -4
  47. package/dist/cli/model-catalogue-command.d.ts +3 -1
  48. package/dist/cli/model-catalogue-command.js +48 -2
  49. package/dist/cli/profile.d.ts +8 -0
  50. package/dist/cli/profile.js +25 -0
  51. package/dist/cli/program.js +2 -0
  52. package/dist/cli/runs/search-query.d.ts +1 -1
  53. package/dist/cli/runs/search-query.js +4 -0
  54. package/dist/cli/runs/search.d.ts +5 -1
  55. package/dist/cli/runs/search.js +12 -1
  56. package/dist/cli/search-harder-consents-command.d.ts +18 -0
  57. package/dist/cli/search-harder-consents-command.js +83 -0
  58. package/dist/cli/search-left-out.d.ts +6 -1
  59. package/dist/cli/search-left-out.js +9 -4
  60. package/dist/cli/settings.d.ts +8 -0
  61. package/dist/cli/settings.js +17 -2
  62. package/dist/cli/shared-command-exports.d.ts +16 -0
  63. package/dist/cli/steps.js +0 -6
  64. package/dist/cli/store-recover.d.ts +3 -3
  65. package/dist/cli/store-recover.js +26 -26
  66. package/dist/cli/store-settings.d.ts +2 -0
  67. package/dist/cli/store-settings.js +37 -9
  68. package/dist/cli/templates-command.js +4 -4
  69. package/dist/crm/cli/index.js +40 -8
  70. package/dist/crm/cli/search-all.js +7 -6
  71. package/dist/crm/group-hint.d.ts +8 -0
  72. package/dist/crm/group-hint.js +13 -0
  73. package/dist/crm/source.d.ts +12 -1
  74. package/dist/crm/sync.d.ts +31 -2
  75. package/dist/crm/sync.js +110 -3
  76. package/dist/crm/testing/acme-scenario.d.ts +40 -0
  77. package/dist/crm/testing/acme-scenario.js +170 -0
  78. package/dist/crm/testing/index.d.ts +1 -0
  79. package/dist/crm/testing/index.js +1 -0
  80. package/dist/crm/testing/source-contract.js +12 -0
  81. package/dist/crm/testing/source.d.ts +2 -0
  82. package/dist/crm/testing/source.js +1 -0
  83. package/dist/domain/addresses.d.ts +13 -0
  84. package/dist/domain/addresses.js +63 -0
  85. package/dist/domain/categories.d.ts +3 -0
  86. package/dist/domain/categories.js +2 -0
  87. package/dist/domain/crm.d.ts +23 -0
  88. package/dist/domain/crm.js +7 -0
  89. package/dist/domain/mentions.d.ts +2 -12
  90. package/dist/domain/mentions.js +2 -19
  91. package/dist/domain/models.d.ts +2 -0
  92. package/dist/domain/orders.d.ts +8 -1
  93. package/dist/domain/orders.js +6 -2
  94. package/dist/domain/phones.d.ts +26 -0
  95. package/dist/domain/phones.js +48 -0
  96. package/dist/domain/record-types.d.ts +1 -1
  97. package/dist/domain/record-types.js +1 -0
  98. package/dist/domain/records.d.ts +5 -0
  99. package/dist/domain/ref-summaries.d.ts +39 -0
  100. package/dist/domain/ref-summaries.js +51 -3
  101. package/dist/domain/relations.d.ts +12 -2
  102. package/dist/domain/relations.js +14 -3
  103. package/dist/domain/vcard.d.ts +2 -2
  104. package/dist/domain/vcard.js +4 -10
  105. package/dist/embeddings/models.d.ts +11 -3
  106. package/dist/embeddings/models.js +28 -4
  107. package/dist/entities/business-context.d.ts +149 -0
  108. package/dist/entities/business-context.js +192 -0
  109. package/dist/entities/contact-activity.d.ts +2 -0
  110. package/dist/entities/contact-activity.js +7 -1
  111. package/dist/entities/contact-context.d.ts +160 -0
  112. package/dist/entities/contact-context.js +6 -0
  113. package/dist/entities/deal.d.ts +10 -0
  114. package/dist/entities/deal.js +2 -0
  115. package/dist/entities/hit.d.ts +9 -2
  116. package/dist/entities/hit.js +6 -2
  117. package/dist/entities/index.d.ts +32 -4
  118. package/dist/entities/index.js +5 -0
  119. package/dist/entities/mention.d.ts +4 -3
  120. package/dist/entities/mention.js +2 -1
  121. package/dist/entities/message-transfer.d.ts +4 -2
  122. package/dist/entities/message-transfer.js +2 -2
  123. package/dist/entities/model.d.ts +2 -2
  124. package/dist/entities/model.js +1 -1
  125. package/dist/entities/relationship.d.ts +4 -0
  126. package/dist/entities/relationship.js +4 -0
  127. package/dist/errors/reasons.js +39 -4
  128. package/dist/fetch/page.js +2 -1
  129. package/dist/index.d.ts +3 -2
  130. package/dist/index.js +3 -2
  131. package/dist/meetings/context-store.d.ts +2 -0
  132. package/dist/meetings/findings-rules.d.ts +4 -0
  133. package/dist/meetings/findings-rules.js +5 -2
  134. package/dist/meetings/hit-query.d.ts +1 -1
  135. package/dist/meetings/hit-query.js +2 -2
  136. package/dist/meetings/index.d.ts +1 -0
  137. package/dist/meetings/index.js +1 -0
  138. package/dist/meetings/result-items.d.ts +1 -0
  139. package/dist/meetings/result-items.js +1 -0
  140. package/dist/meetings/store.d.ts +4 -0
  141. package/dist/meetings/store.js +2 -1
  142. package/dist/models/anthropic.js +5 -0
  143. package/dist/models/index.js +22 -5
  144. package/dist/runs/events.d.ts +11 -1
  145. package/dist/runs/events.js +3 -1
  146. package/dist/runs/log-attributes.js +4 -0
  147. package/dist/runs/log-events.js +2 -0
  148. package/dist/runs/recording.d.ts +3 -0
  149. package/dist/runs/recording.js +36 -12
  150. package/dist/runs/run.d.ts +12 -3
  151. package/dist/runs/run.js +32 -13
  152. package/dist/search/account-list.d.ts +6 -0
  153. package/dist/search/account-list.js +9 -3
  154. package/dist/search/groups.d.ts +68 -0
  155. package/dist/search/groups.js +172 -0
  156. package/dist/search/question-period.d.ts +10 -0
  157. package/dist/search/question-period.js +133 -0
  158. package/dist/sends/buttons.d.ts +2 -0
  159. package/dist/sends/buttons.js +6 -1
  160. package/dist/services/account-groups.d.ts +28 -0
  161. package/dist/services/account-groups.js +89 -0
  162. package/dist/services/archive.d.ts +7 -1
  163. package/dist/services/archive.js +19 -3
  164. package/dist/services/business-context.d.ts +113 -0
  165. package/dist/services/business-context.js +156 -0
  166. package/dist/services/communications.d.ts +50 -0
  167. package/dist/services/communications.js +140 -0
  168. package/dist/services/deal-context.d.ts +90 -0
  169. package/dist/services/deal-context.js +131 -0
  170. package/dist/services/deps.d.ts +2 -0
  171. package/dist/services/enrichment.d.ts +12 -2
  172. package/dist/services/enrichment.js +47 -6
  173. package/dist/services/events-search.js +2 -1
  174. package/dist/services/group-guard.d.ts +28 -0
  175. package/dist/services/group-guard.js +131 -0
  176. package/dist/services/index.d.ts +19 -4
  177. package/dist/services/index.js +12 -3
  178. package/dist/services/ingest.d.ts +12 -0
  179. package/dist/services/ingest.js +4 -0
  180. package/dist/services/meaning-model.d.ts +7 -0
  181. package/dist/services/meaning-model.js +20 -0
  182. package/dist/services/meeting-context.d.ts +6 -1
  183. package/dist/services/meeting-context.js +12 -5
  184. package/dist/services/message-resolution.js +2 -3
  185. package/dist/services/messages-meaning.js +4 -5
  186. package/dist/services/messages-search.d.ts +5 -1
  187. package/dist/services/messages-search.js +1 -1
  188. package/dist/services/messages.d.ts +1 -4
  189. package/dist/services/messages.js +0 -2
  190. package/dist/services/metadata.d.ts +1 -1
  191. package/dist/services/model-downloads.d.ts +1 -1
  192. package/dist/services/model-downloads.js +6 -4
  193. package/dist/services/money-context.d.ts +73 -0
  194. package/dist/services/money-context.js +77 -0
  195. package/dist/services/notes-search.d.ts +4 -1
  196. package/dist/services/notes-search.js +19 -7
  197. package/dist/services/organization-context.d.ts +80 -0
  198. package/dist/services/organization-context.js +154 -0
  199. package/dist/services/people.d.ts +22 -6
  200. package/dist/services/people.js +38 -8
  201. package/dist/services/person-business.d.ts +43 -0
  202. package/dist/services/person-business.js +67 -0
  203. package/dist/services/person-context.d.ts +11 -1
  204. package/dist/services/person-context.js +25 -10
  205. package/dist/services/person-preparation.d.ts +5 -1
  206. package/dist/services/person-preparation.js +10 -3
  207. package/dist/services/person-timeline.d.ts +6 -1
  208. package/dist/services/person-timeline.js +10 -2
  209. package/dist/services/proposals/kinds/identity-link.d.ts +4 -0
  210. package/dist/services/proposals/kinds/identity-link.js +48 -0
  211. package/dist/services/proposals/kinds/orders.js +1 -1
  212. package/dist/services/proposals/registry.js +2 -0
  213. package/dist/services/search-all-deprecated.d.ts +40 -0
  214. package/dist/services/search-all-deprecated.js +10 -0
  215. package/dist/services/search-all-meetings.d.ts +50 -52
  216. package/dist/services/search-all-meetings.js +265 -272
  217. package/dist/services/search-all.d.ts +34 -6
  218. package/dist/services/search-all.js +118 -24
  219. package/dist/services/search-harder.d.ts +64 -0
  220. package/dist/services/search-harder.js +194 -0
  221. package/dist/services/search-kind.d.ts +12 -5
  222. package/dist/services/search-kind.js +49 -10
  223. package/dist/services/text-model-choice.js +1 -1
  224. package/dist/store/accounts.d.ts +18 -0
  225. package/dist/store/accounts.js +18 -3
  226. package/dist/store/chats.d.ts +3 -1
  227. package/dist/store/chats.js +6 -0
  228. package/dist/store/damage.d.ts +43 -10
  229. package/dist/store/damage.js +119 -36
  230. package/dist/store/decisions.js +3 -1
  231. package/dist/store/evidence-findings.d.ts +14 -0
  232. package/dist/store/evidence-findings.js +2 -0
  233. package/dist/store/exports.d.ts +2 -1
  234. package/dist/store/identity-links.d.ts +92 -0
  235. package/dist/store/identity-links.js +6 -0
  236. package/dist/store/index.d.ts +11 -5
  237. package/dist/store/index.js +5 -2
  238. package/dist/store/journal.d.ts +10 -0
  239. package/dist/store/journal.js +33 -0
  240. package/dist/store/marks.d.ts +19 -1
  241. package/dist/store/marks.js +23 -1
  242. package/dist/store/people.d.ts +28 -2
  243. package/dist/store/people.js +15 -1
  244. package/dist/store/sqlite/accounts.js +2 -0
  245. package/dist/store/sqlite/added-sources.d.ts +15 -3
  246. package/dist/store/sqlite/added-sources.js +26 -5
  247. package/dist/store/sqlite/base-stages.d.ts +122 -0
  248. package/dist/store/sqlite/base-stages.js +443 -0
  249. package/dist/store/sqlite/base-suggest.d.ts +13 -0
  250. package/dist/store/sqlite/base-suggest.js +62 -0
  251. package/dist/store/sqlite/business-contracts.js +10 -1
  252. package/dist/store/sqlite/chats.d.ts +2 -0
  253. package/dist/store/sqlite/chats.js +6 -0
  254. package/dist/store/sqlite/crm-settings.d.ts +12 -2
  255. package/dist/store/sqlite/crm-settings.js +56 -13
  256. package/dist/store/sqlite/crm.d.ts +13 -1
  257. package/dist/store/sqlite/crm.js +20 -4
  258. package/dist/store/sqlite/deals.d.ts +33 -0
  259. package/dist/store/sqlite/deals.js +42 -4
  260. package/dist/store/sqlite/decision-requests.js +7 -3
  261. package/dist/store/sqlite/email-index.js +8 -4
  262. package/dist/store/sqlite/evidence-findings.js +29 -5
  263. package/dist/store/sqlite/findings-core.js +4 -2
  264. package/dist/store/sqlite/identity-link-rows.d.ts +50 -0
  265. package/dist/store/sqlite/identity-link-rows.js +146 -0
  266. package/dist/store/sqlite/identity-proposals.d.ts +53 -0
  267. package/dist/store/sqlite/identity-proposals.js +234 -0
  268. package/dist/store/sqlite/involvements.d.ts +1 -1
  269. package/dist/store/sqlite/involvements.js +4 -2
  270. package/dist/store/sqlite/knowledge.js +2 -2
  271. package/dist/store/sqlite/link-kinds.d.ts +1 -0
  272. package/dist/store/sqlite/link-kinds.js +1 -0
  273. package/dist/store/sqlite/link-row.d.ts +6 -0
  274. package/dist/store/sqlite/link-row.js +35 -0
  275. package/dist/store/sqlite/link-source.d.ts +10 -0
  276. package/dist/store/sqlite/link-source.js +16 -0
  277. package/dist/store/sqlite/manifest.js +1 -0
  278. package/dist/store/sqlite/meeting-context-links.js +9 -6
  279. package/dist/store/sqlite/meeting-hit-query.d.ts +5 -0
  280. package/dist/store/sqlite/meeting-hit-query.js +33 -0
  281. package/dist/store/sqlite/meeting-hit-search.js +10 -8
  282. package/dist/store/sqlite/meetings.js +1 -1
  283. package/dist/store/sqlite/memories.js +9 -7
  284. package/dist/store/sqlite/mentions.d.ts +4 -1
  285. package/dist/store/sqlite/mentions.js +14 -9
  286. package/dist/store/sqlite/migrations.generated.js +8 -0
  287. package/dist/store/sqlite/notes.d.ts +8 -2
  288. package/dist/store/sqlite/notes.js +17 -34
  289. package/dist/store/sqlite/open-store.js +3 -0
  290. package/dist/store/sqlite/open.js +11 -2
  291. package/dist/store/sqlite/orders.d.ts +2 -0
  292. package/dist/store/sqlite/orders.js +9 -3
  293. package/dist/store/sqlite/organization-categories.d.ts +18 -0
  294. package/dist/store/sqlite/organization-categories.js +34 -0
  295. package/dist/store/sqlite/organizations.d.ts +5 -1
  296. package/dist/store/sqlite/organizations.js +14 -4
  297. package/dist/store/sqlite/person-links.d.ts +19 -4
  298. package/dist/store/sqlite/person-links.js +49 -11
  299. package/dist/store/sqlite/person-match-scan.d.ts +13 -0
  300. package/dist/store/sqlite/person-match-scan.js +251 -0
  301. package/dist/store/sqlite/person-matcher.d.ts +16 -0
  302. package/dist/store/sqlite/person-matcher.js +32 -0
  303. package/dist/store/sqlite/person-preparation.d.ts +7 -3
  304. package/dist/store/sqlite/person-preparation.js +20 -6
  305. package/dist/store/sqlite/proposed-actions.js +6 -0
  306. package/dist/store/sqlite/record-matching.d.ts +2 -8
  307. package/dist/store/sqlite/record-matching.js +8 -40
  308. package/dist/store/sqlite/record-projectors-phone.js +2 -1
  309. package/dist/store/sqlite/record-relationships.d.ts +52 -0
  310. package/dist/store/sqlite/record-relationships.js +243 -0
  311. package/dist/store/sqlite/record-run.d.ts +5 -0
  312. package/dist/store/sqlite/record-run.js +62 -2
  313. package/dist/store/sqlite/record-writes.d.ts +1 -1
  314. package/dist/store/sqlite/record-writes.js +4 -2
  315. package/dist/store/sqlite/records.js +27 -2
  316. package/dist/store/sqlite/ref-accounts.d.ts +13 -0
  317. package/dist/store/sqlite/ref-accounts.js +117 -0
  318. package/dist/store/sqlite/ref-summaries.js +5 -1
  319. package/dist/store/sqlite/relation-list.d.ts +4 -1
  320. package/dist/store/sqlite/relation-list.js +22 -4
  321. package/dist/store/sqlite/relation-proposals.d.ts +6 -0
  322. package/dist/store/sqlite/relation-proposals.js +3 -0
  323. package/dist/store/sqlite/relation-roles.js +12 -6
  324. package/dist/store/sqlite/reported-relations.d.ts +11 -1
  325. package/dist/store/sqlite/reported-relations.js +59 -18
  326. package/dist/store/sqlite/schema.d.ts +32 -0
  327. package/dist/store/sqlite/schema.js +3 -0
  328. package/dist/store/sqlite/transaction.js +11 -1
  329. package/dist/store/store.d.ts +3 -0
  330. package/dist/store/store.js +5 -0
  331. package/dist/store/write-events.d.ts +18 -0
  332. package/dist/store/write-events.js +88 -0
  333. package/package.json +3 -3
  334. package/parity.json +37 -16
  335. package/schemas/records-envelope.v1.schema.json +3 -0
package/CHANGELOG.md CHANGED
@@ -5,7 +5,437 @@ Notable changes to `@wirecat/cli-core` (`@wirecat/cli-messaging` up to 0.261.0,
5
5
  minor version may break callers, and says how under "Changed — may break callers". `pnpm docs:check` checks the
6
6
  shape of this file.
7
7
 
8
- ## Unreleased
8
+ ## 0.620.0 — 09.11.2026
9
+
10
+ ### Added
11
+
12
+ - **`bot messages send` and `bot messages edit` take inline buttons.** `--button <text>=<data>`, repeated, puts the
13
+ buttons in one row (up to 8; the data is 1 to 64 bytes, checked before anything is sent). `edit` replaces the
14
+ message's buttons with `--button`, takes them all off with `--no-buttons`, and leaves the choice to the messenger
15
+ when neither is given. A bot adapter gets `buttons` (`BotButton[][]`; `[]` means none) in the options of `send` and
16
+ `edit`; one that cannot draw buttons must refuse them. The bot MCP tools gain `button` (one button) and `no_buttons`.
17
+ - **`Button.data`**, what a callback button sends the bot, for an adapter that can read it. It is never printed.
18
+ - **`search all` moves up what is dated inside the period a question names.** "What did we decide in March?", "June
19
+ 22", "last week", «в прошлом месяце»: each source is read to 100 hits, and a hit dated inside the period gains 0.5 over
20
+ its place (1 - rank/100) before the page is cut. On LifeBench, over words and meaning merged, recall@10 went from 0.44
21
+ to 0.47 and hit@10 from 0.84 to 0.88; the v3 questions, which name no period, did not move. `SearchAllRequest.now`
22
+ sets the clock.
23
+ - **`search all` finds a meeting by its title.** A meeting whose title holds the words, each as the start of a word
24
+ as passages are matched, is a hit of its own (`scope: "title"`, `found_by: ["title"]`), within the 3 hits a meeting
25
+ gives. It ranks with the passages that hold the words, the newer meeting first, and before its own passages. A
26
+ question, whose passages need only some of its words, matches a title that holds every one. With `--exact` a title
27
+ must hold each word whole. The title is matched through the folded title the store already keeps, so no store
28
+ version is needed. A query with `from:`, `"a b"~N`, `project:` or `tag:` matches no title.
29
+ - **`meetings list` reads an account's meetings newest first through `meetings_by_time`**, stopping at the limit
30
+ instead of sorting every meeting; a meeting with no start still comes last.
31
+ - **`saveAddedSource` takes an optional `sourceKey`** (`<namespace>:<id>`, as `google-drive:<fileId>`). A source
32
+ saved again under the same key is the same document: changed text becomes its next revision, so a memory or fact
33
+ citing it gets a "source changed" review from `knowledge.checkSources` instead of a second copy beside it, and the
34
+ same text changes nothing. Different keys stay separate. The answer has a new optional `changed` field: whether
35
+ text was written; a host store that wraps `saveAddedSource` may leave it out. No store migration.
36
+ - **`searchAll` takes `harder`: a hosted model reorders the first 30 hits (off by default).** Claude Haiku reads the
37
+ question with the hits and puts the ones that answer it first; in the search lab, over a first stage with Haiku
38
+ rewrites, it lifted LifeBench recall@10 from 0.49 to 0.55 for about $0.0004 a question. It sends only when a search asks, the owner has agreed with
39
+ `models search-consents set anthropic --yes` (memo), and a key is found. Any failure or a 5 s wait keeps the plain
40
+ order, and the answer's `harder` field says why. See
41
+ [AI providers, "Search harder"](docs/search/ai-providers.md#search-harder-a-hosted-model-reorders-search-all-off-by-default).
42
+ - **The Anthropic model adapter takes `thinking` and `output_config` (effort, JSON schema format).**
43
+ - **`templates edit` and `templates preview` take `--file -` to read the template from stdin.** It matches
44
+ `digest brief edit --file -`, and lets a caller on Windows, where `/dev/stdin` does not exist, pass a template
45
+ without a temporary file.
46
+
47
+ ### Security
48
+
49
+ - **`messages press` refuses a callback button whose data starts with `wcr`**, the prefix of review decisions, with
50
+ `permission_error` and reason `press.owner-hand-only`, so an agent with the owner's account cannot press a decision
51
+ button. It needs the adapter to fill `Button.data`; a button without data is pressed as before.
52
+
53
+ ### Changed — may break callers
54
+
55
+ - **`search all` reads meetings from every meeting account, through their search index, ranked with the other
56
+ sources.** Meetings are one more resource of `searchAll` (`RESOURCES_SEARCHED` ends with `meetings`). Without
57
+ `--source`, every meeting account of the scope of the caller's stored account is read, so a work profile never
58
+ reads personal meetings; `meetingScopes` widens it. A named account of another scope is skipped with its scope.
59
+ With no meeting account to read, a caller that named meetings (`meetingsAsked`, from `--only meetings`) gets a
60
+ `meetings` skip with `not_found`; any other answer says nothing of meetings. `--source zoom:<account>` reads only
61
+ that one, and `--source zoom` or `meetings` reads them all instead of refusing several. The meeting query language
62
+ applies: phrases, OR, NOT, `"a b"~N`, `from:` (who said it), `date:` in `--timezone`, and `--exact`. A field
63
+ meetings lack (`in:`, `chat:`, `filename:`) skips meetings with the reason; a failure of one account (`from:` naming
64
+ two speakers) skips only that account. One meeting gives at most 3 passages, each its own hit, with an excerpt of
65
+ about 240 characters instead of 2000. Search all never builds the index: `meetings` in the answer has
66
+ `indexing: "ready" | "pending"` and `hasMore` per account, and the CLI answer names a pending account in `missing`.
67
+ Meeting hits carry `foundBy` (`found_by`); a hit found only through a garbled spelling says so with
68
+ `match: "corrected"` and `corrections`, and the excerpt is centred on the words the index matched (`searchHits` hits
69
+ carry them as `matchedWords`, with `speakerName`). Each account's index is read 200 rows a page, and a page past the
70
+ store's 4 MB budget is asked again with half the rows, down to one, before the account is skipped.
71
+ - **`--max-meetings` (MCP `max_meetings`) is gone from `search all`**, in the messenger, CRM and calendar commands,
72
+ and so are `MEETINGS_UNNAMED`, the `search.meetings` step, `searchAllWithMeetings` (and
73
+ `messages.searchAllWithMeetings`), `SearchAllWithMeetingsRequest` and `RESOURCES_SEARCHED_WITH_MEETINGS`. Call
74
+ `searchAll` (or `messages.searchAll`) with `source`; its answer is `SearchAllFound`, whose `hasMore` is always a
75
+ boolean. `SearchAllItem` is now `SearchAllRecordItem | MeetingSearchItem`. At their next bump of this package:
76
+ tg-cli and max-cli drop `--max-meetings` from `docs/commands.md`, `docs/dev/test-matrix.md` and
77
+ `scripts/test-matrix-untested.ts`; whatsapp-cli from `docs/commands.md` and its test matrix; gcal-cli and
78
+ bitrix24-cli from their `search all` tests and test matrix.
79
+ - **`searchAllIncludingMeetings`, `ResourceWithMeetings`, `MeetingSearchCursor`, `MeetingSearchCoverage` and the
80
+ `SearchAllIncludingMeetings*` types are deprecated**, kept until zoom-cli moves to `searchAll`
81
+ ([zoom-cli#344](https://github.com/WireCatLabs/zoom-cli/pull/344)). `searchAllIncludingMeetings` now calls
82
+ `searchAll`: `meetingAccount` becomes `scope.meetings`, `maxMeetings` and `meetingCursor` are ignored, pages are
83
+ `offset`, and its answer never has `meetings`. `allAnswer` takes either answer.
84
+ - **`sharedCommandTemplate(app, "search")` keeps the old `search all`** (its summary and description, the `--only`
85
+ and `--source` wording and `--max-meetings`), while the messenger's own `search all` has the new one. cli-memo,
86
+ zoom-cli and drive-cli review their overrides against those exact values. The template moves to the new shape in
87
+ the release that [cli-memo#703](https://github.com/WireCatLabs/cli-memo/pull/703), zoom-cli#344 and drive-cli's
88
+ matching change ship with; then each updates the `search all` entries of its shared contract overrides.
89
+ - **`liftMeetingFields` takes the caller's timezone** as a fourth argument for `date:`; without it, the process's.
90
+ - **`contacts prepare` and `contacts events` read only the scope of the account asked.** A person merged across a
91
+ personal and a work account brought every fact, note and task into `contacts prepare`, and every scope into
92
+ `contacts events`. Now the facts, the owner's notes and the tasks of projects with no account come only from the
93
+ asked account's scope, personal or work, or from the scopes the caller passes (`scopes`, as `personContext` takes).
94
+ A fact takes its own scope, then its project's. A note shows only when every scope it touches is read: its
95
+ project's, or those of the projects it is about. A note about the person alone is personal. Anything else unscoped
96
+ counts as personal, so a work profile no longer sees the owner's personal notes. `prepare.coverage.tasks`, `.facts`
97
+ and `.notes` name the `scopes` read. `contacts events` reads the same scopes and refuses `scope:` of another one
98
+ with `permission_error` / `selection.out-of-scope`, where it answered that scope's rows before. A chat pinned to the
99
+ other scope no longer shows in this account's events. `personTimeline` takes `scopes` and answers them.
100
+ `store.people.preparation` needs `scopes`, and `store.involvements.forPerson` takes `scopes` (a list) in place of
101
+ `scope`. `contacts context`, `contacts prepare` and calendar preparation also leave out a chat pinned to a scope
102
+ that is not read, even in a readable account: its shared chat, messages and mentions.
103
+ `store.chats.chatScopes(key, chatIds)` answers each chat's scope, its own or else its account's.
104
+ - **The CRM's `deals` and `leads` commands name their argument `<deal>` and `<lead>`, not `<ref>`** (WC-CMD-13).
105
+ `show`, `update`, `move`, `close` and `delete` take the same `deal:<id>` or `lead:<id>` as before; only the name
106
+ changes. Through MCP the argument is now `deal` or `lead`, so a call that sends `ref` is refused. Under
107
+ `<PREFIX>_GROUP_LOCK` a bare id such as `deals show 12` is now read as `deal:12` and checked against the group. A
108
+ CRM CLI runs `pnpm generate` and `pnpm exec cli-contract contracts/plan.json --update` on the bump that brings this.
109
+
110
+ ### Fixed
111
+
112
+ - **The links list and the relationships list read a merged person's old rows too.** `notes.links({ from, to })` with
113
+ the current person now lists links written on a uid merged into them, and `listRelations({ about })` marks such a
114
+ relationship `outgoing` or `incoming` by the person it is about, not by the uid written on it.
115
+ - **`bin/release` publishes when main has only `changes/` fragments and no `## Unreleased`.** With the version taken on
116
+ npm it looked for `## Unreleased` to put the next version under, found none and stopped before publishing 0.620.0.
117
+ It now adds the new version's heading above the newest one and collects the fragments into it.
118
+ - **Help and docs name EmbeddingGemma as the default text model.** `conversations embed --model` said
119
+ "default: e5-small" and now reads the name from `DEFAULT_TEXT_MODEL`. `docs/search/ai-providers.md` no longer
120
+ says e5-small is the default. e5-small stays a choice and the fallback on a machine that has only it.
121
+
122
+ ## 0.619.0 — 09.11.2026
123
+
124
+ ### Added
125
+
126
+ - **`models keys set|remove <provider>` beside `models consents`** (with `modelCatalogueCommand({ enrichment: true })`):
127
+ the key write-time enrichment sends, kept in the tool's keyring entry `embeddings:<provider>` (a 0600 file when no
128
+ keyring is reachable). `set` reads it at a hidden prompt or from stdin, never as an argument, and answers
129
+ `{ provider, stored: true, source: "keyring" | "file" }`; `remove` answers `{ provider, removed, from }`. A run with
130
+ moved folders writes and removes its own temporary entry, never the shared one. `modelCatalogueCommand` takes
131
+ `stdin` for tests.
132
+ - **`reason_id` on a stopped or failed enrichment run**, from `ENRICHMENT_REASON_IDS`: `enrichment.no-key`,
133
+ `key-rejected`, `unreachable`, `rate-limited`, `bad-replies`, `cancelled`, `error`. The model gateway tags a refused
134
+ key (`model.key-rejected`, HTTP 401 or 403) and a provider it cannot reach (`model.unreachable`) in the error's
135
+ `reason`; the code and the message stay the same.
136
+
137
+ - **A report or message (the digest, the weekly gaps, a failed schedule's notice) goes to an email route as
138
+ HTML.** The `email` template's rendering is sent on stdin with `mail <profile> messages send --html` and the title
139
+ as the subject; mail-cli 0.21.0 adds the plain-text part. A mail-cli older than 0.21.0 refuses the flag, and the
140
+ message then goes as the `text` rendering, as before, with `delivery.html-fallback` in `last.json`. A report that
141
+ failed its check still mails its one line as text.
142
+ - **`identity_link` proposals: "these two are one person", which only the owner decides.** `people.proposeLink` opens
143
+ one, at most one open per pair of people, and refuses a pair the owner separated (`identity.separated`) or rejected
144
+ before (`identity.rejected`). `people.decideLink` and the proposal registry decide it: an agent is refused whatever
145
+ `agent_decisions` says (`proposal.owner-only`), and a confirm after the owner took an identity off either person is
146
+ refused with `identity.stale`. A merge keeps open proposals up to date: one whose two people became one, or a second
147
+ for the same pair, is deleted, and a live one takes the people and identities it names now. The generic
148
+ `proposedActions` paths refuse to stage or approve the kind. `people.linkProposals({ person, status, limit, offset
149
+ })` reads them, newest first, naming the people as they are now, with `hasMore`.
150
+ - **`people.scanMatches({ full })`, one pass of the people matcher.** The same email address joins people in every
151
+ scope. A phone number two people share joins them when a messenger (telegram, max, whatsapp) holds it and no
152
+ proposal ever named the pair, and otherwise opens an `identity_link` proposal; so do three to six people on one
153
+ number or one address, and a meeting guest's typed address. More than six is a shared line or mailbox and proposes
154
+ no one. It never acts over the owner's separation or rejection and records its merges as the rule's. It reads
155
+ outside any transaction and takes the write lock only per group; after the first pass it looks only at identities
156
+ changed since the last one, unless `full`. On 51,000 identities and 1,100 proposals a first pass takes 1.3–3.7 s and
157
+ a repeat 0.15–0.6 s, where a repeat took 20 s in one transaction before.
158
+ - **Quoted evidence and owner-only batches in evidence findings.** A finding's evidence may carry `quote`: staging
159
+ refuses it unless the words are in the cited text (`finding.quote-not-found`), and an accepted fact or task keeps
160
+ the quote on its evidence link. `evidenceFindings.stage(input, agent, { ownerOnly: true })` stages a batch only the
161
+ owner decides, even with `agent_decisions` on, and the batch says `ownerOnly`. `evidenceFindings.citable(ref)` reads
162
+ a record with the fingerprint to cite it, and `./store` exports `quoteKept`, the quote check itself. Findings without
163
+ a quote keep their fingerprints.
164
+ - **`relations.syncReported` takes `onOutcome`**, called once per relationship with `{ outcome, key, id }`: `added`,
165
+ `kept`, `restored`, `withdrawn`, `proposed` or `skipped`, the relationship's key (`kind|from|to|role`) and the link
166
+ that answers for it (`null` when proposed or skipped). An import that reports in parts counts each one once per run.
167
+ - **A relationship answers `sourceRoles`**: the source's own words for it off the role list
168
+ (`metadata.source_role`). The CRM sync stores them as a list. An older row that holds one word still reads as a list.
169
+ - **Person, organization and deal contexts with their business relationships.** `canonicalPersonContext` answers
170
+ for any `person:<uid>` — a CRM contact, a name with no identity, someone two accounts saw — reading every account
171
+ in scope, with a `business` section (organizations, reporting lines both ways, deals and leads, projects,
172
+ categories) and `coverage`. `organizationContext` gives an organization's people, customers, suppliers, partners,
173
+ projects, open deals, invoices, payments and orders, counts of messages, mail and meetings through its people, and
174
+ open tasks. `dealContext` gives a deal's or lead's stages, client, participants, owner, project, money reached by
175
+ project or counterparty, and its people's messages, mail and meetings in its lifetime marked `proposed`;
176
+ `dealBrief` is its compact form. Every relationship says its standing, every section is bounded, and the shared
177
+ entities `person_context`, `organization_context`, `deal_context` and `deal_context.brief` describe them.
178
+ `organizationsInCategory` lists clients, suppliers, partners or employers, derived from relationships.
179
+ `@wirecat/cli-core/crm/testing` exports `acmeScenario`, a synthetic store for these. See
180
+ `docs/dev/BUSINESS-CONTEXT.md`.
181
+ - **Stage history, a CRM deal's project, own organizations, orders by supplier, organizations by category.**
182
+ `deals.stages(ref)` lists every stage a deal or lead entered; `deals.setProject(ref, { project, by })` sets its
183
+ project, on a CRM copy too: the project is the store's own field, which the CRM sync never writes.
184
+ `knowledge.ownOrganizations()` lists the owner's companies, his own mark first, else the CRM's;
185
+ `orders.list({ supplier })`; `deals.list({ accounts })` (copies from those CRM accounts, the owner's own always);
186
+ `knowledge.organizations(query, { category, accounts })` keeps one category's, chosen
187
+ in SQL. A context's `coverage` names each CRM account's sync gaps (`crmGapsOf`) and each kind the profile denies
188
+ (`deniedKinds`: no deal or lead row, title or count is answered). A relationship (`knowledge.relations`) answers
189
+ the `account` that reported it and how a source `derived` it.
190
+ - **Account groups for memo's group word (WC-ACCT-13).** The default group is `all`: every account, never saved, so
191
+ a run with no group reads everything, as before. A group the owner saves (`account_groups.<name>`) is exactly its
192
+ list, `personal` like any other, and a group never saved does not exist. Groups and the lock are opt-in narrowing
193
+ for agents; the default still reads everything. `search notes` in a group reads memo's own notes beside the group's
194
+ folders, since they are the owner's.
195
+ - **`runGroup` and `scopeToGroup`.** memo lifts the first word with `liftProfile`, as every CLI does. `runGroup` takes
196
+ it, or `<PREFIX>_GROUP`; `all` means no restriction, and a word that is no group name is `validation_error`. Under
197
+ `<PREFIX>_GROUP_LOCK` it refuses any other group, `all` included, with `permission_error`; a lock of `all` locks
198
+ nothing. `scopeToGroup` turns a run's `--source` into the group: none becomes `group:<name>`, a bare provider or
199
+ kind keeps the group's accounts of it, and `all` anywhere in the list, an account outside the group or a write's
200
+ `--account` outside it is refused (`validation_error`, or `permission_error` under the lock), naming the entry as
201
+ typed. An empty group fails as `group <name> is empty`; an unknown one is `validation_error` with
202
+ `details.groups`, and `details.suggested` when profiles carry its name. From `@wirecat/cli-core/cli` and
203
+ `@wirecat/cli-core/services`; memo wires them in its own release.
204
+ - **Under `<PREFIX>_GROUP_LOCK` a run refuses what does not keep to the group (`permission_error`).** A command
205
+ runs only when it, or a command above it, is marked `groupAware(command)` (`@wirecat/cli-core/cli`); `help`,
206
+ `commands` and the other words that read no account still run. Every reference typed into the run, in an argument
207
+ or an option value (`msg:`, `chat:`, `deal:`, `person:`, `event:`, …), is checked by
208
+ `refuseOutsideGroup(command, { app, env, store? })`: account data that belongs only to accounts outside the group
209
+ is refused, such as a message, a chat, mail, a calendar event, a CRM row, or a person seen only by outside
210
+ accounts. What the owner made, with no account (memo's notes, projects, tasks, invoices, owner deals and
211
+ organizations, memories, facts), passes in every group. A bare id counts too, as `<kind>:<id>`, where the command
212
+ says its kind: `refKinds(command, { id: "organization", "--note": "note" })`, or an argument or `--<kind>` option
213
+ named after a kind (`<organization>`, `--project`). A command that declares no kinds has any other argument value
214
+ refused; `refKinds(command, {})` lets free text through. `store.refs.accounts(ref)` says which accounts a
215
+ reference's thing belongs to (`[]` for the owner's own); an event is its calendars' and meetings' accounts, a
216
+ folder's file is its folder (`notes:<id>`). `inGroupOf(context, group)` (services) is the membership test.
217
+ Group edits are refused under the lock, and `listAccountGroups` lists only the locked group.
218
+ - **What a locked run shows of proposals and evidence: `groupGuardOf(store, app, env)` and `lockedRegistry`**
219
+ (services). The guard says whether a reference is `visible` in the locked group (every part of its thing: a
220
+ proposed action is its own account and its target's, a suggested link its two ends), `keep`s the visible references
221
+ of a list and `strip`s outside ones from every `evidence` and `sources` array of an answer, counting them as
222
+ `out_of_scope`; a memory's or fact's own text stays. `lockedRegistry` wraps the proposal registry so a proposal whose
223
+ subject, object or action is outside the group is not listed, shown or decided (`permission_error`), and shown ones
224
+ keep only the group's evidence. `refKinds` takes `action` (`actions confirm 17`) and `proposal` (`review confirm
225
+ 17070,link:17,fact:512`), and `store.refs.ends(ref)` gives each part. A key-document suggestion (`key:9`) is its
226
+ link's two ends, so a Drive or mail document of an outside account is refused; a close suggestion (`close:Q-15`) is
227
+ its task's, the owner's, with its evidence stripped; any other proposal prefix is refused. Under the lock `listContextOf` holds only the
228
+ group's accounts, notes folders included.
229
+ - **Under `<PREFIX>_GROUP_LOCK`, `listContextOf` holds only the group's accounts**, so every `--source` reader fails
230
+ closed: a list, a bare provider or `all` resolves inside the group, and `search messages`, `search mail` and
231
+ `search notes` without `--source` read the group. A lock naming no saved group is `permission_error`. The lock is
232
+ read from the run's `env` only, never `process.env`: `groupLockOf(app, env)`, `listContextOf(…, env)`,
233
+ `listedAccounts(…, env)`, `env` on `prepareLucene`/`searchLucene`'s messenger, on `searchNotesOf` and on a
234
+ `GroupStore`. A caller that passes no `env` reads without a lock.
235
+ - **Group membership for a settings page: `listAccountGroups`, `addGroupMember`, `removeGroupMember`,
236
+ `moveGroupMember`** (services), over `store.accounts.changeAccountGroups`. The list gives each saved group, then
237
+ `all` with every account (reason `all`), each member with every saved entry that names it, its profile names in
238
+ every app, its reason (`setting`) and `also_in`, plus `duplicates` (allowed, shown) and `suggested`: a profile name
239
+ that another app's profile or a saved group shares, for an account not in that group; never applied. A member is
240
+ saved as `provider:account`, so renaming a profile changes nothing. memo's own notes (`notes:internal`) and an
241
+ unsaved running account are listed in no group. A remove takes out every entry that names only that account, and
242
+ refuses one that names others too; a move does that and the add in one write, deciding which entries go inside it;
243
+ a move from `all` is an add. `all`, `bots` and the caller's `reserved` words cannot name a group, and `config set
244
+ account_groups.all` and `.bots` are refused.
245
+ - **`deniedKindsOf(permissions, kinds, by, defaults?)`** (`@wirecat/cli-core/cli`, with `deniedKinds`): the kinds
246
+ `search all` leaves out under a CLI's own permission levels, such as memo's, without messenger profile settings.
247
+ - **The first CRM sync of an account no saved group lists answers `group_hint`**: ``add it to a work group:
248
+ `memo groups add work <provider>:<account>` `` (memo's command ships with it). Not when a saved group lists the
249
+ account, and not on later syncs. `hint` still carries "run sync again to continue".
250
+ - **A CRM sync copies only the owner's deals and leads by default.** The account setting
251
+ `crm.<provider>:<account>.scope` is `mine` (the default) or `all`; `crm.<provider>:<account>.unassigned` lists the
252
+ CRM's numeric user ids whose deals and leads count as nobody's, which `mine` also keeps, as it keeps those with no
253
+ assignee. Both are set with `settings set`, which refuses a malformed `unassigned` entry by name. Contacts and
254
+ companies are copied whole as before. A source opts in with `self()`, its sign-in's own user; the engine applies
255
+ the scope to every page (`CrmScope`: `{ mode: "all" }` or `{ mode: "mine", self, also }`, ids normalised by
256
+ `normalCrmUserId`), so a deal given to another user leaves the copy at the next sync. A narrower scope is applied in
257
+ the store by each row's assignee, with no list from the CRM; a wider one lists deals and leads in full again. The
258
+ sync answer carries `scope` and each kind's `out_of_scope`; a kind that failed on a setting names it (`setting`)
259
+ and the answer offers no retry.
260
+ - **`store status` says each deal and lead kind's scope without a sync**: `scope.setting` is the saved
261
+ `crm.<provider>:<account>.scope` (`mine` when never set; `scope.explicit` says whether the owner stored it), and
262
+ `scope.applied` the scope new pages are read under, `{ mode: "all" }` or `{ mode: "mine", users }` (the own user
263
+ and the unassigned ones), `null` before the first sync. `scope.held: true` while a held narrowing keeps stored rows
264
+ outside it. `applied` is `all` under `mine` when the CRM's CLI names no own user (`self()`): its sync copies
265
+ everything.
266
+ - **A default `mine` that would mark most of a kind deleted is held** (`crm.narrowing-held`, naming the own user and
267
+ the count, and `held: true` on the kind) until the owner sets the `scope` setting; `--rescan` does not lift it.
268
+ While held, new pages are read under `mine` and the stored rows are kept; a later `scope all` lists every deal
269
+ and lead again. `config set` of a CRM account's `scope`, `self` or `unassigned` stops an agent's run
270
+ (`permission_error`), a guard against a change by mistake rather than a boundary. `self()` must answer a numeric user id
271
+ (`invalid_response` otherwise), and `crmSourceContract` checks that such a source gives every deal and lead an
272
+ assignee.
273
+ - **One account's copy belongs to one CRM user.** The first sync of a source with `self()` stores it as
274
+ `crm.<provider>:<account>.self`; a sync signed in as another user is refused (`validation_error`, the setting in
275
+ `details.setting`) until the owner unsets it.
276
+ - **`writesWithOf(account, profilesFor)` and `storedProfilesFor(profiles)`** (`./cli`): which CLI and profile change a
277
+ CRM copy on its server, so memo's `deals list`, `leads list` and `pipelines list` can name the writer of each row as
278
+ `writes_with: { tool, account, profile, profiles, why }`. `tool` is the command that registered the row's provider;
279
+ `profile` is set only when exactly one of that CLI's profiles is recorded on the row's account, otherwise it is
280
+ `null` and `profiles` and `why` say what there is to choose. The owner's own row answers `null`. The profiles come
281
+ from the store's record, which every run of a CLI saves, so a profile appears once it has run with that account.
282
+ `profilesOn(profiles, app, key)` is the filter both use.
283
+ `writesWithOf(…, { allowed })` takes the caller's profile or group lock: a profile it forbids is never named, and
284
+ the one it leaves is the answer. A write already refuses a row of another account than its profile's live one
285
+ (`not_found`), so a profile re-pointed to another portal cannot change the old portal's rows.
286
+ - **Base stages of deals and of leads, and CRM stages mapped onto them (store version 60).** One editable base set
287
+ per kind; every other pipeline's stage, a CRM's or the owner's own, maps onto one of its stages, suggested by the store and confirmed by the owner, one by one
288
+ or all at once. Store version 60 adds `pipeline_stages.base_stage_id` and `base_confirmed` (columns only;
289
+ `minCompatible` stays 56). `baseStagesCommand(app, { open, output, accounts })` from `./cli` builds the `stages`
290
+ group for memo: `show <kind>` (the columns, with open rows and mapped CRM stages each, and `unsorted`), `create`,
291
+ `rename`, `move` and `remove` of a base stage, `list` (every stage outside the base sets with `base_stage`, `confirmed` and the CRM's own `external_id`, which a CRM CLI's move matches first; `account` and `external_id` `null` for an own pipeline; query
292
+ `kind:`, `pipeline:`, `confirmed:`), `set <stage> <base-stage>` and `confirm --pipeline <p> | --all`. `accounts`
293
+ narrows reads and confirms to the CRM accounts a run may see, such as a group lock's. Deal and lead rows gain
294
+ `base_stage {ref, name}`, `null` until confirmed. A new set is named in the owner's first language (Russian while
295
+ `owner_languages` is unset, Spanish, else English); the seeded `Leads` becomes the lead set with capitalised names. An
296
+ agent's `stages set` records a suggestion; `confirm` and the set's edits refuse an agent (`stage.owner-only`). On a
297
+ read-only store `stages show` reads the set its first use would make without writing it. A CRM CLI's `deals move <ref> stage:<id>` (and `leads move`) moves
298
+ to the one stage of the card's pipeline mapped to that base stage, and refuses several (`stage.choice-required`,
299
+ with `candidates`) or none (`stage.unmapped`) before anything is written. `store.baseStages` holds the same
300
+ operations.
301
+ - **The events list's query, from `@wirecat/cli-core/calendar`.** `EVENT_TYPES`, `EVENTS_QUERY`,
302
+ `EVENTS_QUERY_NOTE`, `eventsFilter` (with `accountIds` for several accounts), `eventsAnswer`, `eventOf`,
303
+ `eventAnswer`, `sourceAccounts` and the `ReadAccount` type, so a tool that lists the events of several calendar
304
+ accounts reads the same query and answer as `events list` instead of copying them.
305
+ - **A records import reports its relationships as links of its account.** A deal's or lead's people, a contract's
306
+ parties, a person's `member-of` and an organization's `customer-of` and `partner-of` go through
307
+ `relations.syncReported` per chunk, so a re-import keeps them, a changed role adds a link and withdraws the old one,
308
+ a delete withdraws them, `records map` moves them with the entity, and rejecting a proposed contract withdraws its
309
+ parties at once. A role comes only from its list: any other word is kept on a link without a role, in the list
310
+ `metadata.source_role`, and named in the receipt's new `notices` (`relationship.role-unlisted`). A person's
311
+ `fields.position` is `metadata.position`, never the role. The receipt adds `relationships` (`added`, `kept`,
312
+ `restored`, `withdrawn`, `proposed`, `skippedOwnerRejected`), each link counted once per run, and a relationship's
313
+ issue is an error coded `relationship.*`, naming its `record` when that record came in an earlier batch. The
314
+ links' `source` is `import:<provider>`, so an import and a CRM sync on the same account keep each other's.
315
+ - **A contract may be related to a person or an organization,** with the roles `customer`, `supplier`, `signatory`
316
+ and `guarantor` (`CONTRACT_ROLES`), a `contract` list the owner may add to like the others.
317
+ - **One damage report for every surface (`storeDamageReport`).** `store recover` prints what happened, the likely
318
+ causes each with the one command that tells more, the impact, that the services keep the originals, the last known
319
+ good and what may be lost, and the steps as `{command, why, destructive}`: the first stops the writers, the last is
320
+ the deep check. `--json` answers it as `report`, and `next` lists the steps' commands.
321
+ - **A deleted or replaced journal file is seen.** A writable open notes a `-shm` without its `-wal`, and the outermost
322
+ commit refuses (`store.journal-replaced`) once the `-wal` it opened with is gone or is another file, since writing
323
+ on into an unlinked journal while another process starts a fresh one damages the store. Both leave
324
+ `<store>.journal.json`, which the report names as the first likely cause and a deep check that passes removes.
325
+ - **Runs say what they wrote to the store.** Each outermost write transaction that commits logs one `store.write`
326
+ event per table and change, `{kind: "store", table, op, n}`: counts only, read from the statement text and SQLite's
327
+ change count, so every writer is covered and no CLI passes anything. A success that wrote the store is kept for
328
+ `keep_store_runs_for_days` (default 3) even where `record: false`, Desktop or a server would not keep it
329
+ (`kept_because_store`). Past 100 in a run, they are summed by table and change into one event each at its end; the
330
+ run lists its `tables`. `search runs kind:store table:emails` finds them.
331
+
332
+ ### Changed — may break callers
333
+
334
+ - **An enrichment run that sent records and got none back enriched is `failed`**, with a reason, not `done`. A run
335
+ with some enriched stays `done` or `stopped`; one that sent nothing (no key) stays `stopped`. The no-key reason names
336
+ `models keys set <provider>`.
337
+
338
+ - **EmbeddingGemma is the default text model**, not e5-small (`DEFAULT_TEXT_MODEL`). With no `models set`, embeds
339
+ and searches by meaning use it; e5-small and e5-large stay choosable. A machine that has e5-small and not
340
+ EmbeddingGemma keeps e5-small (`PREVIOUS_DEFAULT_TEXT_MODEL`). Once EmbeddingGemma is downloaded, syncs embed with
341
+ it, and search by meaning in notes, mail, messages and events keeps reading e5-small's vectors while the store holds
342
+ more of them (`meaningModel`); about 20 minutes of embedding for 10,000 pieces, a part per sync. A caller that
343
+ expected e5-small without choosing it sees `embeddinggemma` in missing-model steps.
344
+ - **`models download` no longer asks to accept EmbeddingGemma's terms.** The Gemma Terms of Use ask for a notice with
345
+ each copy: the download writes `NOTICE` beside the model's files, and `THIRD_PARTY_NOTICES` names it.
346
+ `--accept-terms` is ignored; `models list --json` keeps `licence` and `terms`.
347
+
348
+ - **`contacts link` and a calendar's `people link` from an agent's terminal open an `identity_link` proposal instead
349
+ of linking, and an agent's `contacts unlink` is refused (`identity.owner-only`).** The run is attributed as
350
+ `mentions confirm` attributes it (`actorOf`: `AI_AGENT`, `CLAUDECODE` and the other agents' variables, or an MCP
351
+ server's run). An agent's link needs `--reason` (`proposal.reason-required`), answers with the person unchanged and
352
+ the proposal's id in the new `proposal` field of `linked_person` and `calendar_linked_person`, and an agent's
353
+ `<person> me` is refused (`identity.owner-only`). The owner's run links and unlinks at once, as before; no flag makes
354
+ an agent's run the owner's. `linkPeople(store, account, person, other, { by, reason?, method? })`,
355
+ `PeopleService.link` and `PeopleService.unlink(person, { by })` take who runs it, with no default: pass
356
+ `actorOf(command)`, or `"owner"` only from a path that established the owner runs it.
357
+ - **The meeting context service writes an agent's `memory.add` and `fact.add` as proposals.** It stored both as the
358
+ owner's, the memory confirmed and the fact accepted, whoever ran it. With `author: "agent"`, or no `author`, the
359
+ memory waits as `proposed` and the fact as `proposed`, as the memory and fact stores keep every agent's; pass
360
+ `author: "owner"` when the owner runs the command.
361
+ - **An agent's mention confirm or meeting participant association no longer moves an identity.** Unless `by` is
362
+ `"owner"`, `confirmMention` to a person and `linkParticipantPerson` open an `identity_link` proposal and return its
363
+ id as `proposal`, so an owner's link is never replaced. Such a mention has the new status `proposed` (in
364
+ `MENTION_STATUSES`, `status:` and the `mention_decision` answer) until the owner decides: `linked` on confirm,
365
+ `found` again on reject. The association's `changed` is `false` and its `person_uid` the participant's current
366
+ person.
367
+ - **`createMeetingContextService(store, account, { author })` takes who runs it: `"owner"` or `"agent"`.** It linked
368
+ every participant as the owner's; an agent's `person.link` now opens a proposal. Left out, `author` is `"agent"`, so
369
+ a caller that does not say who runs it no longer moves an identity as the owner: pass `"owner"` when the owner runs
370
+ the command (`actorOf`).
371
+ - **`mergePerson` keeps the owner's person whichever side it is on, and gives the person that stays.**
372
+ `linkIdentities`, the same-address join at import, a confirmed proposal and the scan could each move every identity
373
+ of the owner onto a contact; the owner's uid now always stays.
374
+ - **One email address pattern: a local part, `@` and a dotted domain (`isEmailAddress`).** The same-address join at
375
+ import took an address with no dot in its domain; it no longer does.
376
+ - **At import, an address two or more other people have joins no one, and neither does a pair the owner rejected.**
377
+ The whole batch of `savePeople` is noted before any join, so one `office@` on many contacts stays shared; the scan
378
+ proposes those people instead.
379
+ - `DealsStore` gains `stages` and `setProject`, and `OrganizationsStore` (so `KnowledgeStore`) gains
380
+ `ownOrganizations`: a hand-written store or fake implementing them must add these.
381
+ - **`listContextOf` returns a `GroupContext`**, a `ListContext` with `membership`, and `group:all` names every
382
+ account in a `--source` list.
383
+ - **The sync of an account whose source names its own user narrows to `mine` on its first run after the upgrade**,
384
+ unless that would mark more than half of a kind deleted (then it is held until the owner sets the scope):
385
+ other users' deals and leads are marked deleted in the local copy. They leave lists and search, but their earlier
386
+ copy stays in the store file. `settings set crm.<provider>:<account>.scope all` brings them back.
387
+ - **An id list that is empty is held whatever the copy's size**: a small copy is no longer emptied by it without
388
+ `--rescan`.
389
+ - **`CrmCopies.scope`, `ownUser`, `saveOwnUser` and `removeOutOfScope` are new required members**, and
390
+ `CrmSyncReport.scope` and `CrmSyncResult.outOfScope` are new required fields: a hand-made store object or a strict
391
+ reader of the answer needs them.
392
+ - **Only `bin/release` edits `CHANGELOG.md`.** The `standards` check fails a pull request that changes it unless its
393
+ branch is one of bin/release's `release/*` branches, so a release pull request can no longer conflict and stall
394
+ `bin/release`. Move an entry to `changes/<branch>.md` (lower case, `/` as `-`) under the changelog's `###` headings
395
+ ([CLAUDE.md, "Committing"](CLAUDE.md#committing)).
396
+ - **`explainDamage` is now `storeDamageReport(findings)`**, with the shape above; `store recover --json` answers
397
+ `report` instead of `explanation`, and `doctor`'s `store.damage` takes the same shape, keeping `what` beside it
398
+ for now.
399
+ - **A pair of people the owner rejected is proposed again on new evidence.** It is still never joined
400
+ automatically, and the evidence the owner rejected never proposes it again. New evidence is a signal and pair of
401
+ identities none of its rejected proposals had: a phone-based proposal rejected, and later the same email on both
402
+ people, opens a fresh `identity_link` proposal from `scanMatches`, from `savePeople`'s same-address join, or from
403
+ `proposeLink`. Rejecting that one adds its evidence to the rejected set. A pair the owner separated stays blocked.
404
+ `identity.rejected` now means "rejected on this evidence".
405
+ - **A role address (`info@`, `hello@`, `support@`…) never joins people automatically**, at import or in a scan, even
406
+ when only two people have it: `scanMatches` proposes the pair instead, so results move from `merged` to `proposed`.
407
+ A no-reply address (`noreply@`, `mailer-daemon@`, `bounces@`…) neither joins nor proposes anyone. The whole local
408
+ part must be a role word, any case, past a `+tag` and `.`, `-` or `_`. `ROLE_ADDRESS_WORDS`, `isRoleAddress` and
409
+ `isNoReplyAddress` are exported from `@wirecat/cli-core`.
410
+ - **`messages sync --all` leaves out muted chats.** A chat the messenger reports muted (`muted`, with no
411
+ `mutedUntil` or one still ahead) is not read, so a sync of an account with many muted groups no longer downloads
412
+ them all. The answer counts them in `limited.muted` and leaves them out of `chats`, `items` and the progress total;
413
+ a note says how to read them. Messages already stored stay. A chat named (`messages sync <chat>`) is read as
414
+ before, and one kept in full with `--full-history` is read by `--all` too. To read them again, pass the new
415
+ `--with-muted` to `messages sync --all` for one run (a background job keeps it), or set the new profile setting
416
+ `history_muted` to true.
417
+
418
+ ### Fixed
419
+
420
+ - **A mail's vector names its sender at the end, not first.** Every mail piece began "Name: Subject", so search by
421
+ meaning took the sender for the topic of each email they wrote; the piece now ends "From: Name". Every store cuts its
422
+ mail again once (`mail_pieces_cut`), and the next syncs re-embed it: about 3 minutes for 10,000 mail pieces with
423
+ e5-small and about 20 with EmbeddingGemma on an 8-thread laptop.
424
+ - **EmbeddingGemma's catalogued speed is 5 chunks a second, not 2.** A memo sync bounds its chunks by this speed, so
425
+ one sync embedded 39 chunks and a five-minute timer run did seconds of work; it now takes 97.
426
+ - **A relationship the owner confirmed counts as `kept` when a source reports it again.** It counted nowhere.
427
+ - **A reported relationship no longer duplicates the owner's link for the role its source named.** When the owner
428
+ confirmed or overrode a no-role link whose `metadata.source_role` (one word or a list) holds a role, and a source
429
+ later reports that role on the same pair, `relations.syncReported` adds no second link: the owner's stays the answer.
430
+ - **`relations.syncReported` withdraws only the links its own writer wrote**: those whose `links.source` is the
431
+ call's `source`. A CRM sync (`crm`) and an import on one account no longer withdraw each other's links.
432
+ - **A role only withdrawn links hold can be removed.** `knowledge.removeRole` no longer counts them as uses.
433
+ - **A link `relations.syncReported` writes carries the caller's author** (`by.kind`), not always `rule`, and a link
434
+ it still reports unchanged is not written again, so a sync no longer queues its people for involvement every page.
435
+ - **Pruning old decision requests works on Node 22.16.** The query bound a numbered `?1`, which Node 22.16's
436
+ `node:sqlite` rejects with "column index out of range". The old-Node CI job now runs a prune.
437
+ - **Under `<PREFIX>_READ_ONLY`, a first run writes no starter `config.json`.** The settings are read as the defaults
438
+ instead, as for a dry run. Without the lock, the file is still written on a first run.
9
439
 
10
440
  ## 0.618.0 — 09.11.2026
11
441
 
@@ -173,6 +603,28 @@ shape of this file.
173
603
  - **`account remove` is in the messenger parity manifest** (`parity.json`), with `--keep-data`, `--delete-data`
174
604
  and `--dry-run`, so tg, max and wa can adopt it without failing `parity:check`.
175
605
 
606
+ ### Fixed
607
+
608
+ - **A proposal whose sources the owner verified no longer blocks confirming another correction.** Confirming a
609
+ correction refused with `memory.already-superseded` when a rival correction of the same memory was still proposed but
610
+ the owner had confirmed its source review, since that sets `lastVerifiedAt`. A rival now counts as having retired the
611
+ memory once it left `proposed`, so one confirmed and later marked stale or corrected still refuses a queued
612
+ proposal. Confirming a correction of a memory that is already superseded is the owner's alone.
613
+
614
+ ### Fixed
615
+
616
+ - **A vCard's phone region is read in either case.** `envelopeOfVcard` and `ingestVcard` with `region: "GB"` left a
617
+ national number unmatched, as only `gb` worked; they now lowercase it as the envelope's `options.phone_region` does.
618
+ - **A sale's title names its customer.** An order with `direction: "sale"` was titled by its supplier, the owner
619
+ (`Order O-55 · owner, …`); its title and ref summary now read `Order O-55 · to <customer>, …`, and its review row's
620
+ `object` is the customer. A purchase still names its supplier.
621
+
622
+ ### Fixed
623
+
624
+ - **A private Google document's refusal names the drive command that adds it.** `source.needs-sign-in` now says
625
+ `drive documents add <url> --profiles <names|all>` instead of only "through Drive". The reason and its code are
626
+ unchanged.
627
+
176
628
  ## 0.614.0 — 08.11.2026
177
629
 
178
630
  ### Added
package/README.md CHANGED
@@ -132,7 +132,7 @@ code and its document must agree. A search plan that reads an index once per mes
132
132
  seven more find candidates, labelled as candidates.
133
133
  - **Search by meaning, opt in.** Conversations are split into chunks and embedded locally by ONNX Runtime — native
134
134
  on Linux (glibc), Apple-silicon Macs and Windows once `models download` has fetched it, WebAssembly elsewhere, on
135
- Node and Bun alike — e5-small by default, or any OpenAI-compatible API with your own key, after
135
+ Node and Bun alike — EmbeddingGemma by default (e5-small to choose), or any OpenAI-compatible API with your own key, after
136
136
  you see the cost. Results by meaning and by words are merged by reciprocal rank fusion.
137
137
  - **The archive and the server together.** `--backend both` also asks the messenger's own search; its hits are saved
138
138
  and filtered by the same query, so nothing is counted twice. `--thread` brings the reply thread around a hit.
@@ -799,3 +799,6 @@ dealings in these Data Files or Software without prior written
799
799
  authorization of the copyright holder.
800
800
 
801
801
  SPDX-License-Identifier: Unicode-3.0
802
+
803
+ EmbeddingGemma (Google) is used under the Gemma Terms of Use, https://ai.google.dev/gemma/terms, including its use
804
+ restrictions (https://ai.google.dev/gemma/prohibited_use_policy).
@@ -28,8 +28,9 @@ export declare const DELIVERY_REASONS: {
28
28
  export type DeliveryReason = (typeof DELIVERY_REASONS)[keyof typeof DELIVERY_REASONS];
29
29
  /**
30
30
  * One route's outcome, kept in `last.json`. `error` is the sending CLI's error code and reason id, never its message.
31
- * A send that went as plain text because Telegram refused the HTML is `ok` with the `html-fallback` reason, and the
32
- * one line sent in place of a report that failed its check is `ok` with `report-invalid`.
31
+ * A send that went as plain text because Telegram refused the HTML, or a mail-cli older than `--html` refused the
32
+ * flag, is `ok` with the `html-fallback` reason, and the one line sent in place of a report that failed its check is
33
+ * `ok` with `report-invalid`.
33
34
  */
34
35
  export interface Delivery {
35
36
  to: string;
@@ -56,6 +57,8 @@ export interface Parcel {
56
57
  }
57
58
  export interface RenderedParcel {
58
59
  telegram: string;
60
+ /** The email's HTML; without it, or when `mail` refuses `--html`, the email is `text`. */
61
+ email?: string;
59
62
  text: string;
60
63
  subject: string;
61
64
  /** The report failed its check and `text` is the one line that says so. */
@@ -60,16 +60,22 @@ export const headOf = (title, report, limit = CAPTION_CHARS) => {
60
60
  * more exact. Any other code (network_error, outcome_unknown, provider_error…) may mean the message arrived.
61
61
  */
62
62
  const REFUSED_CONTENT = "validation_error";
63
- const codeOf = (stderr) => {
63
+ const errorLineOf = (stderr) => {
64
64
  for (const line of stderr.split("\n").reverse()) {
65
65
  try {
66
- const { code } = JSON.parse(line).error ?? {};
66
+ const { code, message } = JSON.parse(line).error ?? {};
67
67
  if (typeof code === "string")
68
- return code;
68
+ return { code, message: typeof message === "string" ? message : "" };
69
69
  }
70
70
  catch { }
71
71
  }
72
72
  };
73
+ const codeOf = (stderr) => errorLineOf(stderr)?.code;
74
+ /** A mail-cli older than 0.21.0 has no `--html`, and commander refuses the flag before anything is sent. */
75
+ const refusesHtmlFlag = (stderr) => {
76
+ const error = errorLineOf(stderr);
77
+ return error?.code === REFUSED_CONTENT && error.message.includes("unknown option '--html'");
78
+ };
73
79
  /** Plain text for a bot when Telegram refused the HTML, cut where a line ends. */
74
80
  const plainFit = (text) => {
75
81
  if (text.length <= TELEGRAM_TEXT_CHARS)
@@ -82,7 +88,16 @@ const plainFit = (text) => {
82
88
  const renderedArgvOf = (program, route, rendered, plain = false) => {
83
89
  const lead = [program, route.profile, "--json", "--no-input"];
84
90
  if (route.kind === "email")
85
- return [...lead, "messages", "send", "--to", route.address, "--subject", rendered.subject];
91
+ return [
92
+ ...lead,
93
+ "messages",
94
+ "send",
95
+ ...(plain || rendered.email === undefined ? [] : ["--html"]),
96
+ "--to",
97
+ route.address,
98
+ "--subject",
99
+ rendered.subject,
100
+ ];
86
101
  return [
87
102
  ...lead,
88
103
  "bot",
@@ -174,21 +189,24 @@ export const deliver = async (system, env, routes, parcel, { find, errorOf, lock
174
189
  if (copy && parcel.file)
175
190
  copyFileSync(parcel.file.path, copy);
176
191
  const { [`${prefix}_PROFILE`]: _, ...childEnv } = env;
177
- const options = {
192
+ const mailInput = (plain) => rendered ? (plain ? rendered.text : (rendered.email ?? rendered.text)) : report.trim() ? report : parcel.title;
193
+ const options = (plain = false) => ({
178
194
  timeoutMs,
179
- ...(route.kind === "email" ? { input: rendered ? rendered.text : report.trim() ? report : parcel.title } : {}),
180
- };
195
+ ...(route.kind === "email" ? { input: mailInput(plain) } : {}),
196
+ });
181
197
  const argv = (plain = false) => rendered
182
198
  ? renderedArgvOf(program, route, rendered, plain)
183
199
  : argvOf(program, route, parcel.title, report, copy, plain);
184
- let ran = await system.run(argv(), childEnv, options);
200
+ let ran = await system.run(argv(), childEnv, options());
185
201
  let fellBack = "";
186
- if (route.kind === "telegram-bot" &&
187
- ran.code !== 0 &&
202
+ const refused = ran.code !== 0 &&
188
203
  ran.code !== TIMED_OUT &&
189
- codeOf(ran.stderr) === REFUSED_CONTENT) {
204
+ (route.kind === "telegram-bot"
205
+ ? codeOf(ran.stderr) === REFUSED_CONTENT
206
+ : rendered?.email !== undefined && refusesHtmlFlag(ran.stderr));
207
+ if (refused) {
190
208
  fellBack = errorOf(ran.stderr, ran.code);
191
- ran = await system.run(argv(true), childEnv, options);
209
+ ran = await system.run(argv(true), childEnv, options(true));
192
210
  }
193
211
  if (ran.code === 0) {
194
212
  out.push(rendered?.invalid
@@ -58,7 +58,9 @@ export interface ReportRun {
58
58
  }
59
59
  export interface PreparedReport {
60
60
  telegram: string;
61
- /** Plain text with web links: the email's plain part. */
61
+ /** HTML with inline CSS for `mail messages send --html`; absent for an invalid report, which goes as `text`. */
62
+ email?: string;
63
+ /** Plain text with web links: the email when the installed mail cannot send `--html`. */
62
64
  text: string;
63
65
  /** Plain text with app links (`wirecat://`), which a desktop terminal opens: `latest.txt`. */
64
66
  terminal: string;