@wirecat/cli-memo 0.0.0 → 0.5.1

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 (191) hide show
  1. package/LICENSE +204 -0
  2. package/README.md +315 -0
  3. package/dist/answers/command.d.ts +35 -0
  4. package/dist/answers/command.d.ts.map +1 -0
  5. package/dist/answers/command.js +117 -0
  6. package/dist/answers/command.js.map +1 -0
  7. package/dist/app.d.ts +9 -0
  8. package/dist/app.d.ts.map +1 -0
  9. package/dist/app.js +10 -0
  10. package/dist/app.js.map +1 -0
  11. package/dist/bin/memo.d.ts +3 -0
  12. package/dist/bin/memo.d.ts.map +1 -0
  13. package/dist/bin/memo.js +14 -0
  14. package/dist/bin/memo.js.map +1 -0
  15. package/dist/config.d.ts +39 -0
  16. package/dist/config.d.ts.map +1 -0
  17. package/dist/config.js +40 -0
  18. package/dist/config.js.map +1 -0
  19. package/dist/context/command.d.ts +6 -0
  20. package/dist/context/command.d.ts.map +1 -0
  21. package/dist/context/command.js +73 -0
  22. package/dist/context/command.js.map +1 -0
  23. package/dist/context/context.d.ts +28 -0
  24. package/dist/context/context.d.ts.map +1 -0
  25. package/dist/context/context.js +49 -0
  26. package/dist/context/context.js.map +1 -0
  27. package/dist/knowledge/command.d.ts +4 -0
  28. package/dist/knowledge/command.d.ts.map +1 -0
  29. package/dist/knowledge/command.js +158 -0
  30. package/dist/knowledge/command.js.map +1 -0
  31. package/dist/mail/command.d.ts +4 -0
  32. package/dist/mail/command.d.ts.map +1 -0
  33. package/dist/mail/command.js +61 -0
  34. package/dist/mail/command.js.map +1 -0
  35. package/dist/mail/gmail.d.ts +18 -0
  36. package/dist/mail/gmail.d.ts.map +1 -0
  37. package/dist/mail/gmail.js +103 -0
  38. package/dist/mail/gmail.js.map +1 -0
  39. package/dist/mail/himalaya.d.ts +4 -0
  40. package/dist/mail/himalaya.d.ts.map +1 -0
  41. package/dist/mail/himalaya.js +13 -0
  42. package/dist/mail/himalaya.js.map +1 -0
  43. package/dist/mail/import.d.ts +53 -0
  44. package/dist/mail/import.d.ts.map +1 -0
  45. package/dist/mail/import.js +170 -0
  46. package/dist/mail/import.js.map +1 -0
  47. package/dist/mail/parse.d.ts +21 -0
  48. package/dist/mail/parse.d.ts.map +1 -0
  49. package/dist/mail/parse.js +86 -0
  50. package/dist/mail/parse.js.map +1 -0
  51. package/dist/notes/about.d.ts +31 -0
  52. package/dist/notes/about.d.ts.map +1 -0
  53. package/dist/notes/about.js +69 -0
  54. package/dist/notes/about.js.map +1 -0
  55. package/dist/notes/bound.d.ts +24 -0
  56. package/dist/notes/bound.d.ts.map +1 -0
  57. package/dist/notes/bound.js +57 -0
  58. package/dist/notes/bound.js.map +1 -0
  59. package/dist/notes/command.d.ts +4 -0
  60. package/dist/notes/command.d.ts.map +1 -0
  61. package/dist/notes/command.js +222 -0
  62. package/dist/notes/command.js.map +1 -0
  63. package/dist/notes/dialects/common.d.ts +18 -0
  64. package/dist/notes/dialects/common.d.ts.map +1 -0
  65. package/dist/notes/dialects/common.js +79 -0
  66. package/dist/notes/dialects/common.js.map +1 -0
  67. package/dist/notes/dialects/index.d.ts +5 -0
  68. package/dist/notes/dialects/index.d.ts.map +1 -0
  69. package/dist/notes/dialects/index.js +6 -0
  70. package/dist/notes/dialects/index.js.map +1 -0
  71. package/dist/notes/dialects/markdown.d.ts +7 -0
  72. package/dist/notes/dialects/markdown.d.ts.map +1 -0
  73. package/dist/notes/dialects/markdown.js +51 -0
  74. package/dist/notes/dialects/markdown.js.map +1 -0
  75. package/dist/notes/dialects/obsidian.d.ts +6 -0
  76. package/dist/notes/dialects/obsidian.d.ts.map +1 -0
  77. package/dist/notes/dialects/obsidian.js +33 -0
  78. package/dist/notes/dialects/obsidian.js.map +1 -0
  79. package/dist/notes/dialects/types.d.ts +39 -0
  80. package/dist/notes/dialects/types.d.ts.map +1 -0
  81. package/dist/notes/dialects/types.js +2 -0
  82. package/dist/notes/dialects/types.js.map +1 -0
  83. package/dist/notes/embed.d.ts +51 -0
  84. package/dist/notes/embed.d.ts.map +1 -0
  85. package/dist/notes/embed.js +109 -0
  86. package/dist/notes/embed.js.map +1 -0
  87. package/dist/notes/export.d.ts +27 -0
  88. package/dist/notes/export.d.ts.map +1 -0
  89. package/dist/notes/export.js +76 -0
  90. package/dist/notes/export.js.map +1 -0
  91. package/dist/notes/files.d.ts +14 -0
  92. package/dist/notes/files.d.ts.map +1 -0
  93. package/dist/notes/files.js +77 -0
  94. package/dist/notes/files.js.map +1 -0
  95. package/dist/notes/folders-command.d.ts +4 -0
  96. package/dist/notes/folders-command.d.ts.map +1 -0
  97. package/dist/notes/folders-command.js +113 -0
  98. package/dist/notes/folders-command.js.map +1 -0
  99. package/dist/notes/folders.d.ts +27 -0
  100. package/dist/notes/folders.d.ts.map +1 -0
  101. package/dist/notes/folders.js +46 -0
  102. package/dist/notes/folders.js.map +1 -0
  103. package/dist/notes/import.d.ts +33 -0
  104. package/dist/notes/import.d.ts.map +1 -0
  105. package/dist/notes/import.js +183 -0
  106. package/dist/notes/import.js.map +1 -0
  107. package/dist/notes/internal.d.ts +17 -0
  108. package/dist/notes/internal.d.ts.map +1 -0
  109. package/dist/notes/internal.js +47 -0
  110. package/dist/notes/internal.js.map +1 -0
  111. package/dist/notes/links.d.ts +18 -0
  112. package/dist/notes/links.d.ts.map +1 -0
  113. package/dist/notes/links.js +44 -0
  114. package/dist/notes/links.js.map +1 -0
  115. package/dist/notes/renames.d.ts +11 -0
  116. package/dist/notes/renames.d.ts.map +1 -0
  117. package/dist/notes/renames.js +24 -0
  118. package/dist/notes/renames.js.map +1 -0
  119. package/dist/notes/search.d.ts +5 -0
  120. package/dist/notes/search.d.ts.map +1 -0
  121. package/dist/notes/search.js +20 -0
  122. package/dist/notes/search.js.map +1 -0
  123. package/dist/notes/state.d.ts +14 -0
  124. package/dist/notes/state.d.ts.map +1 -0
  125. package/dist/notes/state.js +21 -0
  126. package/dist/notes/state.js.map +1 -0
  127. package/dist/options.d.ts +4 -0
  128. package/dist/options.d.ts.map +1 -0
  129. package/dist/options.js +12 -0
  130. package/dist/options.js.map +1 -0
  131. package/dist/people/command.d.ts +5 -0
  132. package/dist/people/command.d.ts.map +1 -0
  133. package/dist/people/command.js +57 -0
  134. package/dist/people/command.js.map +1 -0
  135. package/dist/people/identity.d.ts +4 -0
  136. package/dist/people/identity.d.ts.map +1 -0
  137. package/dist/people/identity.js +13 -0
  138. package/dist/people/identity.js.map +1 -0
  139. package/dist/people/notes-map.d.ts +13 -0
  140. package/dist/people/notes-map.d.ts.map +1 -0
  141. package/dist/people/notes-map.js +49 -0
  142. package/dist/people/notes-map.js.map +1 -0
  143. package/dist/people/subject.d.ts +8 -0
  144. package/dist/people/subject.d.ts.map +1 -0
  145. package/dist/people/subject.js +19 -0
  146. package/dist/people/subject.js.map +1 -0
  147. package/dist/program.d.ts +7 -0
  148. package/dist/program.d.ts.map +1 -0
  149. package/dist/program.js +34 -0
  150. package/dist/program.js.map +1 -0
  151. package/dist/run/auto.d.ts +20 -0
  152. package/dist/run/auto.d.ts.map +1 -0
  153. package/dist/run/auto.js +139 -0
  154. package/dist/run/auto.js.map +1 -0
  155. package/dist/run/import.d.ts +18 -0
  156. package/dist/run/import.d.ts.map +1 -0
  157. package/dist/run/import.js +114 -0
  158. package/dist/run/import.js.map +1 -0
  159. package/dist/search/command.d.ts +38 -0
  160. package/dist/search/command.d.ts.map +1 -0
  161. package/dist/search/command.js +269 -0
  162. package/dist/search/command.js.map +1 -0
  163. package/dist/store/gone.d.ts +17 -0
  164. package/dist/store/gone.d.ts.map +1 -0
  165. package/dist/store/gone.js +52 -0
  166. package/dist/store/gone.js.map +1 -0
  167. package/dist/store/scope.d.ts +19 -0
  168. package/dist/store/scope.d.ts.map +1 -0
  169. package/dist/store/scope.js +34 -0
  170. package/dist/store/scope.js.map +1 -0
  171. package/dist/store/source-target.d.ts +18 -0
  172. package/dist/store/source-target.d.ts.map +1 -0
  173. package/dist/store/source-target.js +28 -0
  174. package/dist/store/source-target.js.map +1 -0
  175. package/dist/tags/command.d.ts +4 -0
  176. package/dist/tags/command.d.ts.map +1 -0
  177. package/dist/tags/command.js +166 -0
  178. package/dist/tags/command.js.map +1 -0
  179. package/dist/tasks/command.d.ts +4 -0
  180. package/dist/tasks/command.d.ts.map +1 -0
  181. package/dist/tasks/command.js +83 -0
  182. package/dist/tasks/command.js.map +1 -0
  183. package/dist/tasks/context.d.ts +16 -0
  184. package/dist/tasks/context.d.ts.map +1 -0
  185. package/dist/tasks/context.js +68 -0
  186. package/dist/tasks/context.js.map +1 -0
  187. package/dist/version.d.ts +2 -0
  188. package/dist/version.d.ts.map +1 -0
  189. package/dist/version.js +2 -0
  190. package/dist/version.js.map +1 -0
  191. package/package.json +48 -3
package/LICENSE ADDED
@@ -0,0 +1,204 @@
1
+ Copyright (c) 2026 Viacheslav Ptsarev
2
+
3
+
4
+ Apache License
5
+ Version 2.0, January 2004
6
+ http://www.apache.org/licenses/
7
+
8
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
9
+
10
+ 1. Definitions.
11
+
12
+ "License" shall mean the terms and conditions for use, reproduction,
13
+ and distribution as defined by Sections 1 through 9 of this document.
14
+
15
+ "Licensor" shall mean the copyright owner or entity authorized by
16
+ the copyright owner that is granting the License.
17
+
18
+ "Legal Entity" shall mean the union of the acting entity and all
19
+ other entities that control, are controlled by, or are under common
20
+ control with that entity. For the purposes of this definition,
21
+ "control" means (i) the power, direct or indirect, to cause the
22
+ direction or management of such entity, whether by contract or
23
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
24
+ outstanding shares, or (iii) beneficial ownership of such entity.
25
+
26
+ "You" (or "Your") shall mean an individual or Legal Entity
27
+ exercising permissions granted by this License.
28
+
29
+ "Source" form shall mean the preferred form for making modifications,
30
+ including but not limited to software source code, documentation
31
+ source, and configuration files.
32
+
33
+ "Object" form shall mean any form resulting from mechanical
34
+ transformation or translation of a Source form, including but
35
+ not limited to compiled object code, generated documentation,
36
+ and conversions to other media types.
37
+
38
+ "Work" shall mean the work of authorship, whether in Source or
39
+ Object form, made available under the License, as indicated by a
40
+ copyright notice that is included in or attached to the work
41
+ (an example is provided in the Appendix below).
42
+
43
+ "Derivative Works" shall mean any work, whether in Source or Object
44
+ form, that is based on (or derived from) the Work and for which the
45
+ editorial revisions, annotations, elaborations, or other modifications
46
+ represent, as a whole, an original work of authorship. For the purposes
47
+ of this License, Derivative Works shall not include works that remain
48
+ separable from, or merely link (or bind by name) to the interfaces of,
49
+ the Work and Derivative Works thereof.
50
+
51
+ "Contribution" shall mean any work of authorship, including
52
+ the original version of the Work and any modifications or additions
53
+ to that Work or Derivative Works thereof, that is intentionally
54
+ submitted to Licensor for inclusion in the Work by the copyright owner
55
+ or by an individual or Legal Entity authorized to submit on behalf of
56
+ the copyright owner. For the purposes of this definition, "submitted"
57
+ means any form of electronic, verbal, or written communication sent
58
+ to the Licensor or its representatives, including but not limited to
59
+ communication on electronic mailing lists, source code control systems,
60
+ and issue tracking systems that are managed by, or on behalf of, the
61
+ Licensor for the purpose of discussing and improving the Work, but
62
+ excluding communication that is conspicuously marked or otherwise
63
+ designated in writing by the copyright owner as "Not a Contribution."
64
+
65
+ "Contributor" shall mean Licensor and any individual or Legal Entity
66
+ on behalf of whom a Contribution has been received by Licensor and
67
+ subsequently incorporated within the Work.
68
+
69
+ 2. Grant of Copyright License. Subject to the terms and conditions of
70
+ this License, each Contributor hereby grants to You a perpetual,
71
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
72
+ copyright license to reproduce, prepare Derivative Works of,
73
+ publicly display, publicly perform, sublicense, and distribute the
74
+ Work and such Derivative Works in Source or Object form.
75
+
76
+ 3. Grant of Patent License. Subject to the terms and conditions of
77
+ this License, each Contributor hereby grants to You a perpetual,
78
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
79
+ (except as stated in this section) patent license to make, have made,
80
+ use, offer to sell, sell, import, and otherwise transfer the Work,
81
+ where such license applies only to those patent claims licensable
82
+ by such Contributor that are necessarily infringed by their
83
+ Contribution(s) alone or by combination of their Contribution(s)
84
+ with the Work to which such Contribution(s) was submitted. If You
85
+ institute patent litigation against any entity (including a
86
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
87
+ or a Contribution incorporated within the Work constitutes direct
88
+ or contributory patent infringement, then any patent licenses
89
+ granted to You under this License for that Work shall terminate
90
+ as of the date such litigation is filed.
91
+
92
+ 4. Redistribution. You may reproduce and distribute copies of the
93
+ Work or Derivative Works thereof in any medium, with or without
94
+ modifications, and in Source or Object form, provided that You
95
+ meet the following conditions:
96
+
97
+ (a) You must give any other recipients of the Work or
98
+ Derivative Works a copy of this License; and
99
+
100
+ (b) You must cause any modified files to carry prominent notices
101
+ stating that You changed the files; and
102
+
103
+ (c) You must retain, in the Source form of any Derivative Works
104
+ that You distribute, all copyright, patent, trademark, and
105
+ attribution notices from the Source form of the Work,
106
+ excluding those notices that do not pertain to any part of
107
+ the Derivative Works; and
108
+
109
+ (d) If the Work includes a "NOTICE" text file as part of its
110
+ distribution, then any Derivative Works that You distribute must
111
+ include a readable copy of the attribution notices contained
112
+ within such NOTICE file, excluding those notices that do not
113
+ pertain to any part of the Derivative Works, in at least one
114
+ of the following places: within a NOTICE text file distributed
115
+ as part of the Derivative Works; within the Source form or
116
+ documentation, if provided along with the Derivative Works; or,
117
+ within a display generated by the Derivative Works, if and
118
+ wherever such third-party notices normally appear. The contents
119
+ of the NOTICE file are for informational purposes only and
120
+ do not modify the License. You may add Your own attribution
121
+ notices within Derivative Works that You distribute, alongside
122
+ or as an addendum to the NOTICE text from the Work, provided
123
+ that such additional attribution notices cannot be construed
124
+ as modifying the License.
125
+
126
+ You may add Your own copyright statement to Your modifications and
127
+ may provide additional or different license terms and conditions
128
+ for use, reproduction, or distribution of Your modifications, or
129
+ for any such Derivative Works as a whole, provided Your use,
130
+ reproduction, and distribution of the Work otherwise complies with
131
+ the conditions stated in this License.
132
+
133
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
134
+ any Contribution intentionally submitted for inclusion in the Work
135
+ by You to the Licensor shall be under the terms and conditions of
136
+ this License, without any additional terms or conditions.
137
+ Notwithstanding the above, nothing herein shall supersede or modify
138
+ the terms of any separate license agreement you may have executed
139
+ with Licensor regarding such Contributions.
140
+
141
+ 6. Trademarks. This License does not grant permission to use the trade
142
+ names, trademarks, service marks, or product names of the Licensor,
143
+ except as required for reasonable and customary use in describing the
144
+ origin of the Work and reproducing the content of the NOTICE file.
145
+
146
+ 7. Disclaimer of Warranty. Unless required by applicable law or
147
+ agreed to in writing, Licensor provides the Work (and each
148
+ Contributor provides its Contributions) on an "AS IS" BASIS,
149
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
150
+ implied, including, without limitation, any warranties or conditions
151
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
152
+ PARTICULAR PURPOSE. You are solely responsible for determining the
153
+ appropriateness of using or redistributing the Work and assume any
154
+ risks associated with Your exercise of permissions under this License.
155
+
156
+ 8. Limitation of Liability. In no event and under no legal theory,
157
+ whether in tort (including negligence), contract, or otherwise,
158
+ unless required by applicable law (such as deliberate and grossly
159
+ negligent acts) or agreed to in writing, shall any Contributor be
160
+ liable to You for damages, including any direct, indirect, special,
161
+ incidental, or consequential damages of any character arising as a
162
+ result of this License or out of the use or inability to use the
163
+ Work (including but not limited to damages for loss of goodwill,
164
+ work stoppage, computer failure or malfunction, or any and all
165
+ other commercial damages or losses), even if such Contributor
166
+ has been advised of the possibility of such damages.
167
+
168
+ 9. Accepting Warranty or Additional Liability. While redistributing
169
+ the Work or Derivative Works thereof, You may choose to offer,
170
+ and charge a fee for, acceptance of support, warranty, indemnity,
171
+ or other liability obligations and/or rights consistent with this
172
+ License. However, in accepting such obligations, You may act only
173
+ on Your own behalf and on Your sole responsibility, not on behalf
174
+ of any other Contributor, and only if You agree to indemnify,
175
+ defend, and hold each Contributor harmless for any liability
176
+ incurred by, or claims asserted against, such Contributor by reason
177
+ of your accepting any such warranty or additional liability.
178
+
179
+ END OF TERMS AND CONDITIONS
180
+
181
+ APPENDIX: How to apply the Apache License to your work.
182
+
183
+ To apply the Apache License to your work, attach the following
184
+ boilerplate notice, with the fields enclosed by brackets "[]"
185
+ replaced with your own identifying information. (Don't include
186
+ the brackets!) The text should be enclosed in the appropriate
187
+ comment syntax for the file format. We also recommend that a
188
+ file or class name and description of purpose be included on the
189
+ same "printed page" as the copyright notice for easier
190
+ identification within third-party archives.
191
+
192
+ Copyright [yyyy] [name of copyright owner]
193
+
194
+ Licensed under the Apache License, Version 2.0 (the "License");
195
+ you may not use this file except in compliance with the License.
196
+ You may obtain a copy of the License at
197
+
198
+ http://www.apache.org/licenses/LICENSE-2.0
199
+
200
+ Unless required by applicable law or agreed to in writing, software
201
+ distributed under the License is distributed on an "AS IS" BASIS,
202
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
203
+ See the License for the specific language governing permissions and
204
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,315 @@
1
+ # cli-memo
2
+
3
+ `memo` answers "what do I need to know about this person": who they are in each messenger, the
4
+ newest messages each way, the notes about them, and the newest mail threads — each item with a link
5
+ to its source.
6
+
7
+ It reads the local message store that [tg-cli](https://github.com/WireCatLabs/tg-cli) and
8
+ [max-cli](https://github.com/WireCatLabs/max-cli) share, Markdown notes such as an Obsidian vault, and mail
9
+ through [Himalaya](https://github.com/pimalaya/himalaya). Source files and mailboxes are read-only.
10
+ Notes you write here, links, labels, relationships and task reminders live in the local store.
11
+ Retrieval is local; an explicitly selected model receives evidence only with the configured consent.
12
+
13
+ **Status:** early. Context, notes and their links, document import, Gmail and IMAP imports, tasks,
14
+ manual relationships, evidence bundles and local reminders work.
15
+
16
+ ## Your notes on messages, people and projects
17
+
18
+ ```sh
19
+ memo notes add 'Prefers mornings' --about telegram:'Rin Example'
20
+ memo notes add --file review.md --about 'msg:telegram/1/77/42' --about entity:ENTITY_ID --export
21
+ memo notes list --about telegram:'Rin Example' --json
22
+ memo notes edit NOTE_ID --revision 1 --text 'Prefers early mornings'
23
+ memo notes remove NOTE_ID
24
+ memo notes export --to /path/to/vault/memo --format obsidian
25
+ ```
26
+
27
+ A note written here is the store's, not a file's, and is about whatever `--about` names: a person by
28
+ `<messenger>:<name or id>`, or any stored record by its reference — `msg:`, `chat:`, `contact:`,
29
+ `person:`, `entity:`, `task:`, `note:`. Several `--about` give it several subjects. An edit names the
30
+ revision it changes, so an edit made meanwhile is never lost. tg and max `contacts notes` are the same
31
+ notes.
32
+
33
+ `export` writes them as files, in a folder's format, with `memo-id` and `memo-hash` in the front
34
+ matter: import skips such a file, so an export inside a vault never comes back as a second note. A
35
+ file edited since memo wrote it is left alone and reported; nothing is deleted. `--export [dir]` on `add`
36
+ and `edit` writes one; with no folder given, `notes.export: { "dir": "…", "format": "…" }` in the
37
+ config says where.
38
+
39
+ ## Open work
40
+
41
+ ```sh
42
+ memo tasks add 'msg:telegram/1/77/42' --type request
43
+ memo tasks add 'note:NOTE_ID' --provider telegram --account 1 --type request
44
+ memo tasks list --provider telegram --account 1 --json
45
+ memo tasks assign TASK_ID PERSON_UID --provider telegram --account 1
46
+ memo tasks close TASK_ID --provider telegram --account 1 --as done
47
+ ```
48
+
49
+ Native note tasks belong to the explicitly selected stored account. Their previews read current note
50
+ text; deleting a note keeps its task with an unavailable source. Repeated creation of the same kind
51
+ returns the existing task, including one already closed.
52
+
53
+ `context` includes directly related open tasks and explicit task assignments. A task in a shared group
54
+ belongs in a person's context only when they authored its source or you assigned it explicitly. Closed
55
+ tasks stay closed on repeated creation. If several accounts of the requested provider exist, use
56
+ `memo context telegram:101 --account 1`.
57
+
58
+ ## Search and gather evidence
59
+
60
+ ```sh
61
+ memo search notes '"budget review" AND NOT cancelled' --limit 20
62
+ memo search notes 'project progress' --filter 'date:2026-10-08' --tag project --folder /path/to/vault
63
+ memo notes show note:NOTE_ID --json
64
+ memo search all 'budget AND after:2026-09-01' --json
65
+ memo ask 'What work is pending?' --query budget --all --json
66
+ ```
67
+
68
+ Notes are searched by their words and word stems, in the query language messages use: phrases,
69
+ `AND`/`OR`/`NOT`, `tag:`, `date:`; `--exact` matches every word as written. A message-only field such as
70
+ `from:` is refused. They are also searched by meaning when the model is downloaded, and the two are
71
+ ranked together: `by` says which ran, each hit's `foundBy` which found it, and `meaningSkipped` why
72
+ meaning did not run. Each hit carries its reference, the first matching line and the links the note
73
+ holds; `linked` counts what the notes found link to, with each person's name. Follow `nextOffset` with
74
+ `--offset`.
75
+
76
+ `notes show` takes `note:<id>` or a file in a configured folder, and answers with the note's tags, its
77
+ links, its backlinks and, for a PDF or sheet, where its text came from.
78
+
79
+ `search all` searches messages, imported mail and native notes together. Use `search messages`,
80
+ `search mail`, or `search notes` for one resource; `search notes --type internal|file` narrows note kinds.
81
+ `search all` includes a separate `tasks` list for open work linked to matching sources. Results identify source
82
+ kind/account and skipped-resource coverage; a query using a field only messages have (`from:`, `after:`)
83
+ searches the messages and says the notes were not searched. Missing hits do not prove that an event
84
+ never happened.
85
+
86
+ `ask` returns an evidence bundle for your chosen agent by default. To call a model, configure
87
+ `MEMO_MODELS_ANALYSIS_PROVIDER`, `MEMO_MODELS_ANALYSIS_MODEL`, optionally
88
+ `MEMO_MODELS_ANALYSIS_BASE_URL` and `MEMO_MODEL_API_KEY`, then pass `--model`. Remote calls also require
89
+ `--allow-remote`. Model claims are generated and unverified, cite supplied evidence, and distinguish
90
+ assertions, conclusions and inferences. Suggestions create no task until you explicitly run
91
+ `memo tasks add <source> --type <kind>`. Answers are not saved as independent facts.
92
+
93
+ ## Organizations, families and projects
94
+
95
+ ```sh
96
+ memo entities add 'Synthetic Studio' --kind organization
97
+ memo relationships add person:PERSON_UID entity:ENTITY_ID --role author
98
+ memo entities context ENTITY_ID --json
99
+ memo tags add project --entity ENTITY_ID
100
+ memo tags add follow-up --task TASK_ID
101
+ ```
102
+
103
+ Organisations, families, projects and groups are yours, not one account's. Relationships use
104
+ `member-of` or `related-to`; `list`, `remove` and `confirm` manage them. They are manual statements and
105
+ never merge identities because names or domains match. `entities context` lists the entity's
106
+ relationships, the notes about or linking it, and its tags. Tags on a task need no account; its
107
+ reminders name the account it waits on.
108
+
109
+ `memo relationships suggest --provider email --account owner@example.test` stores bounded weak
110
+ shared-domain proposals for direct email contacts. Proposals retain rule provenance and remain
111
+ unconfirmed; they do not enter confirmed person context. `relationships confirm <id>` records your
112
+ explicit acceptance. Common free-mail domains are excluded from this heuristic.
113
+
114
+ ## Local task reminders
115
+
116
+ ```sh
117
+ memo reminders schedule TASK_ID --at 2026-10-09T09:00:00+02:00 --timezone Europe/Madrid --provider telegram --account 1
118
+ memo reminders poll --provider telegram --account 1 --json
119
+ memo reminders ack REMINDER_ID RECEIPT --provider telegram --account 1
120
+ memo reminders snooze REMINDER_ID --revision 1 --at 2026-10-10T09:00:00+02:00 --provider telegram --account 1
121
+ memo reminders cancel REMINDER_ID --provider telegram --account 1
122
+ ```
123
+
124
+ Reminders are local deliveries for an explicitly scheduled open task. Poll leases due deliveries;
125
+ acknowledgement confirms consumption. Expired leases retry with a new receipt; integrations deduplicate
126
+ by `deliveryId` (reminder ID and revision). State survives restart. Snooze checks the current revision;
127
+ task closure cancels pending reminders. The import timer continues to import sources and does not
128
+ deliver reminders to messengers or email. A caller can schedule `poll` using its chosen local scheduler.
129
+
130
+ ## Context about a person
131
+
132
+ ```sh
133
+ memo context telegram:"Rin Example" # or max:<name or id>, email:<address>
134
+ ```
135
+
136
+ One answer from the shared store: every identity linked to the person (`tg|max contacts link`), the
137
+ last message each way, recent messages in direct chats and groups, chats in common — mail included once
138
+ an address is linked — then the notes linked to them: the note about them (`memo note`), notes that link
139
+ them, notes that link the note about them, and the notes you wrote here about them. A name in a note's
140
+ plain text is not a link and is not listed. What gave nothing is listed with the reason. `--json` for
141
+ agents, `--limit` for more.
142
+
143
+ ## Notes
144
+
145
+ ```sh
146
+ memo folders add /path/to/vault # once: gives the folder an id
147
+ memo notes import # load the notes into the shared store; run again after edits
148
+ memo search notes "lighthouse budget" # notes by their words and meaning, and what they link
149
+ memo notes about telegram:"Rin Example" # notes about a person, and the notes linking them
150
+ ```
151
+
152
+ `import` stores each file as a note of its folder, named by its path inside the folder. An edited note
153
+ keeps its old text as a revision; a note deleted from the folder loses its text on the next import, and a
154
+ run that finds most notes missing at once deletes nothing and says so. A file moved inside the folder —
155
+ gone from one path, the same content at another — keeps its id, its links and its tags.
156
+
157
+ Import also stores what each note links, through the folder's format. A link to a note the folder has
158
+ once becomes a link to that note. A name no note has, such as `[[Kai Sample]]`, is kept as written and
159
+ becomes a link to the person the moment someone by that name, local alias or username is in the store —
160
+ or stays unresolved while two people share it. A file's `tags:` and `#tags` become the note's tags, and
161
+ a tag removed from the file is removed from the note — unless you added the same tag yourself.
162
+
163
+ Import then embeds the notes for search by meaning with the local e5-small model (shared with tg and
164
+ max: `tg models text download e5-small`), only what changed, at most 600 chunks a run — the next run
165
+ continues. `--no-embed`, or `notes.embed: false` in the config, skips it.
166
+
167
+ `about` takes `<messenger>:<name or id>` or a reference (`person:`, `entity:`, `note:`) and lists the
168
+ notes about it, the notes that link it, the notes that link a note about it, and links written with the
169
+ person's name that two people share. Hidden folders such as `.obsidian` are skipped, and nothing is ever
170
+ written to a notes folder.
171
+
172
+ Imports accept Markdown/TXT, CSV/TSV, text-layer PDF, DOCX, XLSX, ODT/ODS, PPTX and EPUB.
173
+ PDF/DOCX use optional `unpdf` and `mammoth` packages installed alongside the CLI; modern office
174
+ formats use the bounded built-in shared readers. Results report missing engines, unreadable files, unsupported legacy DOC/XLS, scanned
175
+ PDFs needing an agent, oversized inputs and truncation. PDF page spans, CSV row/column ranges and
176
+ XLSX sheet/cell addresses preserve source provenance. Files are capped at 50 MiB and stored text at
177
+ 200,000 characters. Content hashes detect equal-size edits.
178
+
179
+ Folders and what to skip go in `~/.config/cli-memo/config.json`; `--folder` narrows a run to some of the
180
+ configured folders and `--ignore` adds rules for one run. An ignore rule is a path inside the folder — a file, or a folder and everything under it —
181
+ or a glob (`**/Private*`, `*.txt`):
182
+
183
+ ```json
184
+ { "notes": { "folders": [{ "id": "fld_…", "path": "/path/to/vault" }], "ignore": ["Journal/Private.md", "Archive"] } }
185
+ ```
186
+
187
+ ### Folders and their format
188
+
189
+ ```sh
190
+ memo folders add /path/to/vault # gives the folder an id and prints it
191
+ memo folders add /path/to/notes --format markdown # a plain Markdown folder
192
+ memo folders attach fld_… /other/path/to/vault # the same folder on another computer
193
+ memo folders list
194
+ ```
195
+
196
+ A folder's id is the store's and is what notes and links use; its path is only where it is on this
197
+ computer, so the config differs between computers and the id does not. `folders list` also shows the
198
+ folders the store has from another computer, to attach. A path can belong to one id only. A bare path in
199
+ `notes.folders`, or a folder with no id, is refused by import with both commands named — memo never
200
+ invents an id, which would give every note a new identity. A folder imported before store version 25
201
+ moves its path into this computer's config on the first run, with the id it already has.
202
+
203
+ `format` says how the folder's notes are written. `obsidian` (the default) reads `[[Note|label]]` links
204
+ with `#heading` and `#^block` anchors, `aliases`, `tags:` and inline `#tags`. `markdown` reads
205
+ `[label](path.md)` links and `tags:`; a `#word` in its text is not a tag. Both read links to stored
206
+ records — `[Rin](person:…)`, or a bare `msg:…` in the text.
207
+
208
+ A Markdown file whose front matter carries `memo-id` was written by memo and is skipped by import.
209
+
210
+ ## Keeping it current
211
+
212
+ ```sh
213
+ memo import # notes and mail, only what changed since the last run
214
+ memo auto on --every 5m # run memo import on a systemd user timer (default 5m, a minute or more)
215
+ memo auto status # on/off, interval, next and last run
216
+ memo auto off # stop and remove the timer
217
+ ```
218
+
219
+ The config is the one source: `memo auto on/off` write `auto: { enabled, every }` to
220
+ `~/.config/cli-memo/config.json`, and a hand edit there takes effect at the next timer run, which
221
+ rewrites or removes its own timer to match. The timer runs `memo import` from the place it was set up
222
+ from, with the `PATH` of that shell, so Himalaya and the keyring helper are found.
223
+
224
+ `memo import` is incremental. A note whose size and change time are as this computer last saw them is
225
+ not read; one whose content hash the store already has is not saved, so a second computer importing the
226
+ same folder saves nothing new. What this computer last saw is kept per folder in memo's state folder. Mail reads bodies only of messages not stored yet. A lock
227
+ keeps two imports from running at once, and one failing source does not stop the others.
228
+
229
+ ## Mail
230
+
231
+ Gmail remains the default. For another IMAP provider, configure an account with `mode: "imap"`
232
+ and `folders: ["INBOX", "Archive"]` in `mail.accounts`. Message-ID and reference headers preserve
233
+ message/thread identities across folder moves and UID resets. Mail without Message-ID uses an explicit
234
+ UIDVALIDITY/folder/UID fallback, which can change after a move/reset. Configured folders are listed
235
+ completely before deletion checks; a changed folder scope skips deletion for that run.
236
+
237
+ Imports index changed threads with the shared bounded pipeline and report the proven date/folder
238
+ window, resumable indexing and missing models. No thread is called globally complete on the basis
239
+ of one window. CC/BCC headers are retained when available. Readable attachments become separate source
240
+ entries linked to their parent/part; extraction failures are reported. After installing an optional
241
+ engine, use `memo mail import --retry-attachments` to reread a bounded batch of stored messages.
242
+
243
+ ```sh
244
+ memo mail import --since 2026-09-01
245
+ ```
246
+
247
+ Reads a Gmail account's All Mail through [Himalaya](https://github.com/pimalaya/himalaya) into the
248
+ shared message store as provider `email`: one chat per Gmail thread, the mailbox address as the
249
+ account, senders and recipients as people. Messenger search and person context then see mail too.
250
+
251
+ - Read only: the mailbox is opened read-only, nothing is sent, and no mail is marked read.
252
+ - Run it again any time: what is stored is skipped; `--max` (default 200) bounds the new mails read
253
+ per run, and the next run continues.
254
+ - A mail deleted at the source loses its text in the store. The first two days of the window are left
255
+ alone, and a run that finds an unusually large share missing deletes nothing and says so. Mail moved
256
+ to Spam leaves All Mail and counts as deleted.
257
+
258
+ Set the account up in Himalaya first (an IMAP account with a Gmail
259
+ [app password](https://myaccount.google.com/apppasswords); `bin/mail-password <name>` stores it in the
260
+ keyring), then name it in `~/.config/cli-memo/config.json`:
261
+
262
+ ```json
263
+ { "mail": { "accounts": [{ "name": "gmail", "address": "you@example.com" }] } }
264
+ ```
265
+
266
+ ## People
267
+
268
+ Who is who is decided in messaging: `tg contacts link <person> email:<address>` (or `max contacts link`)
269
+ records that a messenger identity and a mail address are one person, in the shared store. A same name
270
+ is never enough. `memo` only names the note that is about the person:
271
+
272
+ ```sh
273
+ memo note telegram:"Rin Example" ~/Notes/people/Rin.md
274
+ memo note telegram:"Rin Example" --clear
275
+ ```
276
+
277
+ An identity is `<messenger>:<name or id>`; a name two people share is refused, with their ids to
278
+ choose from. The note must be imported first; the link is an `about` link in the store. Entries of an
279
+ older `~/.config/cli-memo/people-notes.json` move into the store once their notes are imported; the file
280
+ itself is left as it is.
281
+
282
+ ## Tags on sources
283
+
284
+ ```sh
285
+ memo tags add work follow-up --note note:NOTE_ID
286
+ memo tags add project --folder FOLDER_ID --path Projects
287
+ memo search notes "budget" --tag work
288
+ memo tags add follow-up --message 'msg:email/you%40example.com/12345/67890'
289
+ memo tags add follow-up --chat 12345 --provider email --account you@example.com
290
+ memo tags list --tag follow-up --json
291
+ tg search mail 'tag:follow-up'
292
+ ```
293
+
294
+ A note is labelled by its reference, an email or messenger message by its full `msg:` locator, a mail
295
+ thread or chat by its exact id and account. A person, entity or task is labelled by `--person`,
296
+ `--entity` or `--task`, with no account; a contact names its account. `--folder` with an id from
297
+ `memo folders list`, and `--path` for one subfolder, labels every note under it at any depth. Tags use 1–32 letters a–z, digits or hyphens; case is ignored.
298
+ Adding an existing tag or removing an absent one leaves it unchanged.
299
+
300
+ Labels live in the shared local store. Tagging leaves note files, front matter, Gmail labels and mailbox
301
+ flags untouched. Labels survive edits and moves of the note; a deleted note disappears from search.
302
+ `tags list` shows up to 100 labels by default (`--limit` for more, `hasMore` in JSON); a note's tags
303
+ say whether its file or you stated them. Contact identity
304
+ tags remain available through `tg|max tags`.
305
+
306
+ ## Development
307
+
308
+ ```sh
309
+ pnpm install
310
+ pnpm lint && pnpm typecheck && pnpm test
311
+ ```
312
+
313
+ ## License
314
+
315
+ [Apache License 2.0](LICENSE).
@@ -0,0 +1,35 @@
1
+ import { type Streams } from "@wirecat/cli-core";
2
+ import { type ModelAdapter, type ModelTarget } from "@wirecat/cli-messaging/models";
3
+ import type { Command } from "commander";
4
+ import { type EvidenceItem } from "../search/command.js";
5
+ interface Claim {
6
+ text: string;
7
+ sources: string[];
8
+ kind: "assertion" | "conclusion" | "inference";
9
+ }
10
+ interface SuggestedTask {
11
+ source: string;
12
+ kind: "question" | "request" | "mention" | "promise";
13
+ reason: string;
14
+ }
15
+ export declare const answerEvidence: (question: string, evidence: EvidenceItem[], options: {
16
+ target: ModelTarget;
17
+ consent: boolean;
18
+ key?: string;
19
+ adapters?: Record<string, ModelAdapter>;
20
+ }) => Promise<{
21
+ claims: Claim[];
22
+ suggestions: SuggestedTask[];
23
+ model: {
24
+ provider: string;
25
+ name: string;
26
+ };
27
+ evidence: EvidenceItem[];
28
+ generated: boolean;
29
+ verified: boolean;
30
+ saved: boolean;
31
+ taskAcceptance: string;
32
+ }>;
33
+ export declare const askCommand: (program: Command, streams: Streams, env: NodeJS.ProcessEnv) => void;
34
+ export {};
35
+ //# sourceMappingURL=command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../src/answers/command.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAC1E,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,WAAW,EAAgB,MAAM,+BAA+B,CAAA;AAEjG,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAExC,OAAO,EAAE,KAAK,YAAY,EAAiC,MAAM,sBAAsB,CAAA;AAGvF,UAAU,KAAK;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,IAAI,EAAE,WAAW,GAAG,YAAY,GAAG,WAAW,CAAA;CAC/C;AACD,UAAU,aAAa;IACrB,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,UAAU,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,CAAA;IACpD,MAAM,EAAE,MAAM,CAAA;CACf;AAED,eAAO,MAAM,cAAc,aACf,MAAM,YACN,YAAY,EAAE,WACf;IAAE,MAAM,EAAE,WAAW,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAA;CAAE;;;;QAuD9F,QAAQ;QAAmB,IAAI;;;;;;;EAO3C,CAAA;AAED,eAAO,MAAM,UAAU,YAAa,OAAO,WAAW,OAAO,OAAO,MAAM,CAAC,UAAU,SA0EpF,CAAA"}