@wirecat/cli-memo 0.5.0 → 0.6.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 (51) hide show
  1. package/LICENSE +202 -19
  2. package/README.md +25 -20
  3. package/dist/context/context.js +1 -1
  4. package/dist/context/context.js.map +1 -1
  5. package/dist/knowledge/command.d.ts.map +1 -1
  6. package/dist/knowledge/command.js +50 -19
  7. package/dist/knowledge/command.js.map +1 -1
  8. package/dist/notes/about.d.ts +2 -0
  9. package/dist/notes/about.d.ts.map +1 -1
  10. package/dist/notes/about.js +16 -15
  11. package/dist/notes/about.js.map +1 -1
  12. package/dist/notes/bound.d.ts +1 -6
  13. package/dist/notes/bound.d.ts.map +1 -1
  14. package/dist/notes/bound.js +3 -23
  15. package/dist/notes/bound.js.map +1 -1
  16. package/dist/notes/command.d.ts.map +1 -1
  17. package/dist/notes/command.js +11 -11
  18. package/dist/notes/command.js.map +1 -1
  19. package/dist/notes/dialects/common.d.ts.map +1 -1
  20. package/dist/notes/dialects/common.js +2 -2
  21. package/dist/notes/dialects/common.js.map +1 -1
  22. package/dist/notes/folders-command.d.ts.map +1 -1
  23. package/dist/notes/folders-command.js +0 -2
  24. package/dist/notes/folders-command.js.map +1 -1
  25. package/dist/notes/internal.js +2 -2
  26. package/dist/notes/internal.js.map +1 -1
  27. package/dist/notes/links.js +1 -1
  28. package/dist/notes/links.js.map +1 -1
  29. package/dist/people/command.js +3 -3
  30. package/dist/people/command.js.map +1 -1
  31. package/dist/people/notes-map.d.ts.map +1 -1
  32. package/dist/people/notes-map.js +3 -2
  33. package/dist/people/notes-map.js.map +1 -1
  34. package/dist/people/subject.js +1 -1
  35. package/dist/people/subject.js.map +1 -1
  36. package/dist/search/command.js +1 -1
  37. package/dist/search/command.js.map +1 -1
  38. package/dist/store/scope.d.ts +2 -1
  39. package/dist/store/scope.d.ts.map +1 -1
  40. package/dist/store/scope.js +2 -2
  41. package/dist/store/scope.js.map +1 -1
  42. package/dist/tags/command.d.ts.map +1 -1
  43. package/dist/tags/command.js +20 -14
  44. package/dist/tags/command.js.map +1 -1
  45. package/dist/tasks/command.d.ts.map +1 -1
  46. package/dist/tasks/command.js +3 -2
  47. package/dist/tasks/command.js.map +1 -1
  48. package/dist/tasks/context.d.ts.map +1 -1
  49. package/dist/tasks/context.js +10 -4
  50. package/dist/tasks/context.js.map +1 -1
  51. package/package.json +17 -8
package/LICENSE CHANGED
@@ -1,21 +1,204 @@
1
- MIT License
2
-
3
1
  Copyright (c) 2026 Viacheslav Ptsarev
4
2
 
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
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 CHANGED
@@ -17,7 +17,7 @@ manual relationships, evidence bundles and local reminders work.
17
17
 
18
18
  ```sh
19
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
20
+ memo notes add --file review.md --about 'msg:telegram/1/77/42' --about project:PROJECT_ID --export
21
21
  memo notes list --about telegram:'Rin Example' --json
22
22
  memo notes edit NOTE_ID --revision 1 --text 'Prefers early mornings'
23
23
  memo notes remove NOTE_ID
@@ -26,7 +26,8 @@ memo notes export --to /path/to/vault/memo --format obsidian
26
26
 
27
27
  A note written here is the store's, not a file's, and is about whatever `--about` names: a person by
28
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
29
+ `person:`, `organization:`, `project:`, `task:`, `note:`, `document:`. Several `--about` give it several
30
+ subjects. An edit names the
30
31
  revision it changes, so an edit made meanwhile is never lost. tg and max `contacts notes` are the same
31
32
  notes.
32
33
 
@@ -90,20 +91,22 @@ never happened.
90
91
  assertions, conclusions and inferences. Suggestions create no task until you explicitly run
91
92
  `memo tasks add <source> --type <kind>`. Answers are not saved as independent facts.
92
93
 
93
- ## Organizations, families and projects
94
+ ## Organizations and projects
94
95
 
95
96
  ```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
97
+ memo organizations add 'Synthetic Studio' --kind company
98
+ memo projects add 'Synthetic Harbour' --organization organization:ORGANIZATION_ID
99
+ memo relationships add person:PERSON_UID project:PROJECT_ID --role author
100
+ memo projects context PROJECT_ID --json
101
+ memo tags add client --organization ORGANIZATION_ID
100
102
  memo tags add follow-up --task TASK_ID
101
103
  ```
102
104
 
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
105
+ Organizations (a company, team, family or community) and projects (with a short key, a type and the
106
+ organization they belong to) are yours, not one account's. Relationships use `member-of` or `related-to`;
107
+ `list`, `remove` and `confirm` manage them. They are manual statements and never merge identities because
108
+ names or domains match. `organizations context` and `projects context` list the relationships, the notes
109
+ about or linking it, and its tags. Tags on a task need no account; its
107
110
  reminders name the account it waits on.
108
111
 
109
112
  `memo relationships suggest --provider email --account owner@example.test` stores bounded weak
@@ -164,7 +167,8 @@ Import then embeds the notes for search by meaning with the local e5-small model
164
167
  max: `tg models text download e5-small`), only what changed, at most 600 chunks a run — the next run
165
168
  continues. `--no-embed`, or `notes.embed: false` in the config, skips it.
166
169
 
167
- `about` takes `<messenger>:<name or id>` or a reference (`person:`, `entity:`, `note:`) and lists the
170
+ `about` takes `<messenger>:<name or id>` or a reference (`person:`, `organization:`, `project:`, `note:`,
171
+ `document:`) and lists the
168
172
  notes about it, the notes that link it, the notes that link a note about it, and links written with the
169
173
  person's name that two people share. Hidden folders such as `.obsidian` are skipped, and nothing is ever
170
174
  written to a notes folder.
@@ -181,7 +185,7 @@ configured folders and `--ignore` adds rules for one run. An ignore rule is a pa
181
185
  or a glob (`**/Private*`, `*.txt`):
182
186
 
183
187
  ```json
184
- { "notes": { "folders": [{ "id": "fld_…", "path": "/path/to/vault" }], "ignore": ["Journal/Private.md", "Archive"] } }
188
+ { "notes": { "folders": [{ "id": "3", "path": "/path/to/vault" }], "ignore": ["Journal/Private.md", "Archive"] } }
185
189
  ```
186
190
 
187
191
  ### Folders and their format
@@ -189,7 +193,7 @@ or a glob (`**/Private*`, `*.txt`):
189
193
  ```sh
190
194
  memo folders add /path/to/vault # gives the folder an id and prints it
191
195
  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
196
+ memo folders attach FOLDER_ID /other/path/to/vault # the same folder on another computer
193
197
  memo folders list
194
198
  ```
195
199
 
@@ -197,8 +201,8 @@ A folder's id is the store's and is what notes and links use; its path is only w
197
201
  computer, so the config differs between computers and the id does not. `folders list` also shows the
198
202
  folders the store has from another computer, to attach. A path can belong to one id only. A bare path in
199
203
  `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.
204
+ invents an id, which would give every note a new identity. A folder id from a store older than
205
+ `wirecat.db` is not in the store: `memo folders add <path>` gives the folder a new one.
202
206
 
203
207
  `format` says how the folder's notes are written. `obsidian` (the default) reads `[[Note|label]]` links
204
208
  with `#heading` and `#^block` anchors, `aliases`, `tags:` and inline `#tags`. `markdown` reads
@@ -291,9 +295,10 @@ memo tags list --tag follow-up --json
291
295
  tg search mail 'tag:follow-up'
292
296
  ```
293
297
 
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
298
+ A note is labelled by its reference (`--note note:<id>`, or `document:<id>` for a file in a notes
299
+ folder), an email or messenger message by its full `msg:` locator, a mail thread or chat by its exact id
300
+ and account. A person, organization, project or task is labelled by `--person`, `--organization`,
301
+ `--project` or `--task`, with no account; a contact names its account. `--folder` with an id from
297
302
  `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
303
  Adding an existing tag or removing an absent one leaves it unchanged.
299
304
 
@@ -312,4 +317,4 @@ pnpm lint && pnpm typecheck && pnpm test
312
317
 
313
318
  ## License
314
319
 
315
- MIT
320
+ [Apache License 2.0](LICENSE).
@@ -20,7 +20,7 @@ export const memoContext = async (store, reference, { limit = 20, account } = {}
20
20
  const linked = await notesAbout(store, { ref: person, person: messages.person }, limit);
21
21
  const yourNotes = [];
22
22
  for (const ref of linked.about.filter((note) => note.source === "internal")) {
23
- const note = await store.notes.note(ref.ref.slice("note:".length));
23
+ const note = await store.notes.note(ref.ref);
24
24
  yourNotes.push({ id: note.id, text: note.text, revision: note.revision, updatedAt: note.updatedAt });
25
25
  }
26
26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AAC,CAAA;IAC9D,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,CAAA;IACjD,OAAO;QACL,QAAQ;QACR,KAAK,EAAE,EAAE,GAAG,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,KAAK,MAAM,CAAC,EAAE;QAChF,SAAS;QACT,OAAO;QACP,KAAK;QACL,aAAa;KACd,CAAA;AACH,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../src/knowledge/command.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAO1E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAKxC,eAAO,MAAM,iBAAiB,YAAa,OAAO,WAAW,OAAO,OAAO,MAAM,CAAC,UAAU,SA2L3F,CAAA"}
1
+ {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../src/knowledge/command.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAQ1E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAKxC,eAAO,MAAM,iBAAiB,YAAa,OAAO,WAAW,OAAO,OAAO,MAAM,CAAC,UAAU,SA+P3F,CAAA"}
@@ -31,35 +31,66 @@ export const knowledgeCommands = (program, streams, env) => {
31
31
  await store.close();
32
32
  }
33
33
  };
34
- const entities = program.command("entities").description("Organizations, families, projects and groups of yours");
35
- entities
34
+ /** What the store knows around an organization or a project: its relations, the notes about it, its tags. */
35
+ const contextOf = async (store, thing, type, id) => ({
36
+ [type]: thing ?? null,
37
+ relationships: (await store.notes.links({ to: `${type}:${id}` }))
38
+ .concat(await store.notes.links({ from: `${type}:${id}` }))
39
+ .filter((link) => link.kind !== "about" && link.kind !== "links-to"),
40
+ notes: await notesAbout(store, { ref: `${type}:${id}` }),
41
+ tags: await store.knowledge.tags(null, { type, id }),
42
+ });
43
+ const organizations = program
44
+ .command("organizations")
45
+ .description("Companies, teams, families and communities of yours");
46
+ organizations
36
47
  .command("add")
37
48
  .argument("<name>")
38
- .requiredOption("--kind <kind>", "organization, family, project or group")
49
+ .requiredOption("--kind <kind>", "company, team, family or community")
50
+ .option("--scope <scope>", "personal or work")
39
51
  .option("--json", "print JSON")
40
- .action((name, options) => owned(options, (store) => store.notes.addEntity(options.kind, name)));
41
- entities
52
+ .action((name, options) => owned(options, (store) => store.knowledge.addOrganization({
53
+ kind: options.kind,
54
+ name,
55
+ ...(options.scope === undefined ? {} : { scope: options.scope }),
56
+ })));
57
+ organizations
42
58
  .command("list")
43
59
  .option("--json", "print JSON")
44
- .action((options) => owned(options, (store) => store.notes.entities()));
45
- entities
60
+ .action((options) => owned(options, (store) => store.knowledge.organizations()));
61
+ organizations
46
62
  .command("context")
47
63
  .argument("<id>")
48
64
  .option("--json", "print JSON")
49
- .action((id, options) => owned(options, async (store) => {
50
- const ref = `entity:${id}`;
51
- return {
52
- entity: (await store.notes.entities()).find((entity) => entity.id === id) ?? null,
53
- relationships: (await store.notes.links({ to: ref }))
54
- .concat(await store.notes.links({ from: ref }))
55
- .filter((link) => link.kind !== "about" && link.kind !== "links-to"),
56
- notes: await notesAbout(store, { ref }),
57
- tags: await store.knowledge.tags(null, { type: "entity", id }),
58
- };
59
- }));
65
+ .action((id, options) => owned(options, async (store) => contextOf(store, (await store.knowledge.organizations()).find((organization) => organization.id === id), "organization", id)));
66
+ const projects = program.command("projects").description("Projects of yours, each with a short key");
67
+ projects
68
+ .command("add")
69
+ .argument("<name>")
70
+ .option("--key <key>", "1–10 letters and digits; made from the name when left out")
71
+ .option("--type <type>", "work, client, personal, oss or other")
72
+ .option("--organization <reference>", "organization:<id> it belongs to")
73
+ .option("--scope <scope>", "personal or work")
74
+ .option("--json", "print JSON")
75
+ .action((name, options) => owned(options, (store) => store.knowledge.addProject({
76
+ name,
77
+ ...(options.key === undefined ? {} : { key: options.key }),
78
+ ...(options.type === undefined ? {} : { type: options.type }),
79
+ ...(options.organization === undefined ? {} : { organization: options.organization }),
80
+ ...(options.scope === undefined ? {} : { scope: options.scope }),
81
+ })));
82
+ projects
83
+ .command("list")
84
+ .option("--json", "print JSON")
85
+ .action((options) => owned(options, (store) => store.knowledge.projects()));
86
+ projects
87
+ .command("context")
88
+ .argument("<id>")
89
+ .option("--json", "print JSON")
90
+ .action((id, options) => owned(options, async (store) => contextOf(store, (await store.knowledge.projects()).find((project) => project.id === id), "project", id)));
60
91
  const relations = program
61
92
  .command("relationships")
62
- .description("Explicit relations between person:<uid> and entity:<uid>; this never links identities");
93
+ .description("Explicit relations between people, organizations and projects; this never links identities");
63
94
  relations
64
95
  .command("add")
65
96
  .argument("<from>")
@@ -1 +1 @@
1
- {"version":3,"file":"command.js","sourceRoot":"","sources":["../../src/knowledge/command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAgB,MAAM,mBAAmB,CAAA;AAC1E,OAAO,EAIL,SAAS,GACV,MAAM,8BAA8B,CAAA;AAErC,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxD,OAAO,EAAqB,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEpE,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,OAAgB,EAAE,OAAgB,EAAE,GAAsB,EAAE,EAAE;IAC9F,MAAM,OAAO,GAAG,KAAK,EACnB,OAA0C,EAC1C,IAA+F,EAC/F,EAAE;QACF,MAAM,KAAK,GAAG,MAAM,SAAS,CAAC,EAAE,GAAG,EAAE,CAAC,CAAA;QACtC,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,IAAI,CA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AS,CAAC,mBAAmB,CAAC,GAAG,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC,CAC1F,CAAA;IACD,cAAc,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CACjE,CAAC,EAAU,EAAE,OAA0C,EAAE,EAAE,CACzD,OAAO,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,CAC5E,CAAA;IACD,cAAc,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;SACzD,cAAc,CAAC,kBAAkB,CAAC;SAClC,cAAc,CAAC,gBAAgB,EAAE,kBAAkB,EAAE,QAAQ,CAAC;SAC9D,MAAM,CAAC,CAAC,EAAU,EAAE,OAAwE,EAAE,EAAE,CAC/F,OAAO,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,GAAG,EAAE,EAAE,EAAE,OAAO,CAAC,EAAE,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,CACxG,CAAA;AACL,CAAC,CAAA"}
@@ -1,5 +1,7 @@
1
1
  import type { MessageStore, Note } from "@wirecat/cli-messaging/store";
2
2
  import type { Subject } from "../people/subject.js";
3
+ /** A file in a notes folder is a `document:`, a written note a `note:`. */
4
+ export declare const isNoteReference: (reference: string) => boolean;
3
5
  export interface NoteRef {
4
6
  ref: string;
5
7
  source: Note["source"];
@@ -1 +1 @@
1
- {"version":3,"file":"about.d.ts","sourceRoot":"","sources":["../../src/notes/about.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAQ,YAAY,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAA;AAC5E,OAAO,KAAK,EAAE,OAAO,EA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,IAAI,CAAC,QAAQ,CAAC,CAAA;IACtB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,UAAU,EAAE,MAAM,CAAA;IAClB,+CAA+C;IAC/C,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,iDAAiD;IACjD,KAAK,EAAE,OAAO,EAAE,CAAA;IAChB,4CAA4C;IAC5C,OAAO,EAAE,OAAO,EAAE,CAAA;IAClB,0DAA0D;IAC1D,YAAY,EAAE,OAAO,EAAE,CAAA;IACvB,0GAA0G;IAC1G,OAAO,EAAE,CAAC,OAAO,GAAG;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,EAAE,CAAA;IACvC,OAAO,EAAE,OAAO,CAAA;CACjB;AAgBD,4GAA4G;AAC5G,eAAO,MAAM,UAAU,UAAiB,YAAY,WAAW,OAAO,qBAAe,OAAO,CAAC,UAAU,CAoDtG,CAAA;AAED,eAAO,MAAM,SAAS,WAAY,UAAU,KAAG,MAa9C,CAAA"}
@@ -1,7 +1,9 @@
1
1
  import { formatReference } from "@wirecat/cli-messaging";
2
+ /** A file in a notes folder is a `document:`, a written note a `note:`. */
3
+ export const isNoteReference = (reference) => /^(note|document):/.test(reference);
2
4
  const fold = (value) => value.normalize("NFC").toLocaleLowerCase("en").trim().replace(/^@/, "");
3
5
  const refOf = (note, anchor = null) => ({
4
- ref: `note:${note.id}`,
6
+ ref: note.ref,
5
7
  source: note.source,
6
8
  folderId: note.folderId,
7
9
  path: note.path,
@@ -18,18 +20,19 @@ export const notesAbout = async (store, subject, limit = 20) => {
18
20
  const live = async (links) => {
19
21
  const found = [];
20
22
  for (const link of links) {
21
- if (!link.from.startsWith("note:"))
23
+ if (!isNoteReference(link.from))
22
24
  continue;
23
- const note = await store.notes.note(link.from.slice("note:".length)).catch(() => undefined);
25
+ const note = await store.notes.resolveNote(link.from);
24
26
  if (note && note.deletedAt === null)
25
- found.push({ note, link });
27
+ found.push({ note, anchor: link.anchor, text: link.targetText });
26
28
  }
27
29
  return found;
28
30
  };
29
- const pointing = await live((await Promise.all(refs.map((to) => store.notes.links({ to })))).flat());
30
- const about = pointing.filter(({ link }) => link.kind === "about");
31
- const linking = pointing.filter(({ link }) => link.kind === "links-to");
32
- const through = await live((await Promise.all(about.map(({ note }) => store.notes.links({ to: `note:${note.id}` }))))
31
+ // A written note's first subject is the note's own, not a link, so only `notes({ about })` sees all of them.
32
+ const pages = await Promise.all(refs.map((ref) => store.notes.notes({ about: ref, limit: 500 })));
33
+ const about = pages.flatMap(({ items }) => items.map((note) => ({ note, anchor: null, text: null })));
34
+ const linking = await live((await Promise.all(refs.map((to) => store.notes.links({ to })))).flat().filter((link) => link.kind === "links-to"));
35
+ const through = await live((await Promise.all(about.map(({ note }) => store.notes.links({ to: note.ref }))))
33
36
  .flat()
34
37
  .filter((link) => link.kind === "links-to"));
35
38
  const names = new Set([subject.person?.name, ...(subject.person?.identities.map(({ name }) => name) ?? [])]
@@ -38,18 +41,16 @@ export const notesAbout = async (store, subject, limit = 20) => {
38
41
  const waiting = names.size === 0
39
42
  ? []
40
43
  : await live((await store.notes.links({ unresolved: true })).filter((link) => names.has(fold(link.targetText ?? ""))));
41
- const unique = (items) => [...new Map(items.map((item) => [`${item.note.id}#${item.link.anchor ?? ""}`, item])).values()].sort((a, b) => b.note.updatedAt.localeCompare(a.note.updatedAt));
44
+ const unique = (items) => [...new Map(items.map((item) => [`${item.note.ref}#${item.anchor ?? ""}`, item])).values()].sort((a, b) => b.note.updatedAt.localeCompare(a.note.updatedAt));
42
45
  const lists = [about, linking, through, waiting].map(unique);
43
46
  return {
44
47
  subject: subject.ref,
45
48
  name: subject.person?.name ?? null,
46
49
  about: (lists[0] ?? []).slice(0, limit).map(({ note }) => refOf(note)),
47
- linking: (lists[1] ?? []).slice(0, limit).map(({ note, link }) => refOf(note, link.anchor)),
48
- throughNotes: (lists[2] ?? []).slice(0, limit).map(({ note, link }) => refOf(note, link.anchor)),
49
- waiting: (lists[3] ?? [])
50
- .slice(0, limit)
51
- .map(({ note, link }) => ({ ...refOf(note), text: link.targetText ?? "" })),
52
- hasMore: lists.some((list) => list.length > limit),
50
+ linking: (lists[1] ?? []).slice(0, limit).map(({ note, anchor }) => refOf(note, anchor)),
51
+ throughNotes: (lists[2] ?? []).slice(0, limit).map(({ note, anchor }) => refOf(note, anchor)),
52
+ waiting: (lists[3] ?? []).slice(0, limit).map(({ note, text }) => ({ ...refOf(note), text: text ?? "" })),
53
+ hasMore: pages.some((page) => page.hasMore) || lists.some((list) => list.length > limit),
53
54
  };
54
55
  };
55
56
  export const aboutText = (answer) => {
@@ -1 +1 @@
1
- {"version":3,"file":"about.js","sourceRoot":"","sources":["../../src/notes/about.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AA6BxD,MAAM,IAAI,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAA;AAEvG,MAAM,KAAK,GAAG,CAAC,IAAU,EAAE,MAAM,GAAkB,IAAI,EAAW,EAAE,CAAC,CAAC;IACpE,GAAG,EAAE,QAAQ,IAAI,CAAC,EAAE,EAAE;IACtB,MAAM,EAAE,IAAI,CAAC,MAAM;IACnB,QAAQ,EAAE,IAAI,CAAC,QAAQ;IACvB,IAAI,EAAE,IAAI,CAAC,IAAI;IACf,KAAK,EAAE,IAAI,CAAC,KAAK;IACjB,UAAU,EAAE,IAAI,CAAC,SAAS;IAC1B,GAAG,CAAC,MAAM,KAAK,IAAI,CAAC,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