@safekb/mcp 0.8.0 → 0.9.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.
- package/README.md +37 -3
- package/THIRD-PARTY-NOTICES.md +170 -0
- package/dist/safekb-mcp.js +12791 -5277
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -139,18 +139,52 @@ Its secret is a generated key or a passphrase.
|
|
|
139
139
|
- Then `search_sealed`, `list_sealed`, `read_sealed_document`, `get_sealed_section`,
|
|
140
140
|
`update_sealed_document`, `replace_in_sealed_document`, and the move, archive, delete,
|
|
141
141
|
attachment and deposit tools.
|
|
142
|
-
- `unseal_document`
|
|
143
|
-
|
|
142
|
+
- `seal_document` and `unseal_document` move a document between hosted and sealed form; see
|
|
143
|
+
[Moving documents in and out of a seal root](#moving-documents-in-and-out-of-a-seal-root).
|
|
144
|
+
`unseal_document` is not a backup: see [Export and import](#export-and-import).
|
|
144
145
|
- `lock_sealed`, the idle timeout, or the end of the process forget the keys.
|
|
145
146
|
- `change_seal_password` replaces the root's secret. Once the server has taken the new one, the
|
|
146
147
|
superseded key is removed from the store that kept it (the system keyring, or any key file in the
|
|
147
148
|
key file directory). A superseded passphrase, or a key file you had written elsewhere with
|
|
148
149
|
`key_out_path`, is yours to remove.
|
|
149
150
|
- Deleting a seal root (`delete_sealed_document`, or `unseal_document` of a standalone sealed
|
|
150
|
-
document) also removes its keys and its name from this machine.
|
|
151
|
+
document with `delete_original`) also removes its keys and its name from this machine.
|
|
151
152
|
- A tool parameter that names a seal root (`root_id`, `new_root_id`) takes its id or its
|
|
152
153
|
[name](#names-of-seal-roots). Documents and folders inside a root are named by id.
|
|
153
154
|
|
|
155
|
+
### Moving documents in and out of a seal root
|
|
156
|
+
|
|
157
|
+
`seal_document` copies a hosted (unsealed) document into a sealed folder; `unseal_document` copies a
|
|
158
|
+
sealed document out as a normal one. The content is read, converted and written by the client: you pass
|
|
159
|
+
ids and get ids and counts back, so nothing is retyped by the model and nothing of the text enters the
|
|
160
|
+
conversation.
|
|
161
|
+
|
|
162
|
+
| | `seal_document` | `unseal_document` |
|
|
163
|
+
|---|---|---|
|
|
164
|
+
| Takes | `document_id` of a hosted document; `parent_id` (a sealed folder of the same space, or a seal root's id), or `store` / `key_out_path` to make the copy a seal root of its own | `document_id` of a sealed document; optional plain `parent_id`; `format` |
|
|
165
|
+
| Result | a sealed document with a new id | a normal document with a new id: a canvas (default), or a markdown document with `format: "markdown"` |
|
|
166
|
+
| Not available | with `--sealed-only` (it reads hosted content) | |
|
|
167
|
+
|
|
168
|
+
- **Canvas structure is kept.** A canvas becomes the markdown body of the sealed document in the
|
|
169
|
+
dialect of `@safekb/canvas-markdown` (headings, lists, tables, callouts, code, attachments, …) and is
|
|
170
|
+
rebuilt from it on `unseal_document`. A part the dialect cannot hold exactly is reported and stops the
|
|
171
|
+
copy. A sealed body that is not in the dialect (typed as plain markdown elsewhere) is reported too:
|
|
172
|
+
`format: "markdown"` keeps it as markdown text.
|
|
173
|
+
- **Attachments move with the document**, sealed or unsealed, as streams: no file is written to disk.
|
|
174
|
+
An attachment that is a derived crop, or larger than the server accepts, stops the copy.
|
|
175
|
+
- **Nothing is reported done before it was checked.** The copy is read back, decrypted where it is
|
|
176
|
+
sealed, and compared with the original: markdown byte for byte, blocks structurally, attachments by size
|
|
177
|
+
and hash. If anything differs the copy is deleted again and the original is untouched.
|
|
178
|
+
- **`dry_run` is true by default**: it creates nothing and reports the format, counts, attachments,
|
|
179
|
+
target, what stands in the way (`problems`) and what is not carried. Pass `dry_run: false` to do it.
|
|
180
|
+
- **`delete_original` is false by default.** With it, the original is deleted after the check, and only
|
|
181
|
+
if it was not edited meanwhile. A sealed document does not carry external refs, workflow status, due
|
|
182
|
+
date, links or version history: `delete_original` refuses while a hosted document has any, and says
|
|
183
|
+
which. Keep the original, or remove them first.
|
|
184
|
+
- The sealed copy stays in the space of its seal root, so `parent_id` must be in the document's space.
|
|
185
|
+
- Not atomic: a failure after the copy was made says what exists (the copy, the original, or both).
|
|
186
|
+
- Since 0.9.0 `unseal_document` no longer deletes the sealed original by default and makes a canvas, not a markdown document: pass `delete_original: true` and `format: "markdown"` for the old behavior. It also moves attachments instead of refusing documents that have them.
|
|
187
|
+
|
|
154
188
|
## Where secrets are kept
|
|
155
189
|
|
|
156
190
|
Every seal root has its own secret, and each can be kept in a different place. All three work side by
|
package/THIRD-PARTY-NOTICES.md
CHANGED
|
@@ -119,3 +119,173 @@ Special thank you to the authors of original C algorithms:
|
|
|
119
119
|
- Mark Adler
|
|
120
120
|
- Yann Collet
|
|
121
121
|
```
|
|
122
|
+
|
|
123
|
+
## entities
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
Copyright (c) Felix Böhm
|
|
127
|
+
All rights reserved.
|
|
128
|
+
|
|
129
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
130
|
+
|
|
131
|
+
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
132
|
+
|
|
133
|
+
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
134
|
+
|
|
135
|
+
THIS IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS,
|
|
136
|
+
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## linkify-it
|
|
140
|
+
|
|
141
|
+
```
|
|
142
|
+
Copyright (c) 2015 Vitaly Puzrin.
|
|
143
|
+
|
|
144
|
+
Permission is hereby granted, free of charge, to any person
|
|
145
|
+
obtaining a copy of this software and associated documentation
|
|
146
|
+
files (the "Software"), to deal in the Software without
|
|
147
|
+
restriction, including without limitation the rights to use,
|
|
148
|
+
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
149
|
+
copies of the Software, and to permit persons to whom the
|
|
150
|
+
Software is furnished to do so, subject to the following
|
|
151
|
+
conditions:
|
|
152
|
+
|
|
153
|
+
The above copyright notice and this permission notice shall be
|
|
154
|
+
included in all copies or substantial portions of the Software.
|
|
155
|
+
|
|
156
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
157
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
158
|
+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
159
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
160
|
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
161
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
162
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
163
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
## markdown-it
|
|
167
|
+
|
|
168
|
+
```
|
|
169
|
+
Copyright (c) 2014 Vitaly Puzrin, Alex Kocharin.
|
|
170
|
+
|
|
171
|
+
Permission is hereby granted, free of charge, to any person
|
|
172
|
+
obtaining a copy of this software and associated documentation
|
|
173
|
+
files (the "Software"), to deal in the Software without
|
|
174
|
+
restriction, including without limitation the rights to use,
|
|
175
|
+
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
176
|
+
copies of the Software, and to permit persons to whom the
|
|
177
|
+
Software is furnished to do so, subject to the following
|
|
178
|
+
conditions:
|
|
179
|
+
|
|
180
|
+
The above copyright notice and this permission notice shall be
|
|
181
|
+
included in all copies or substantial portions of the Software.
|
|
182
|
+
|
|
183
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
184
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
185
|
+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
186
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
187
|
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
188
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
189
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
190
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
## mdurl
|
|
194
|
+
|
|
195
|
+
```
|
|
196
|
+
Copyright (c) 2015 Vitaly Puzrin, Alex Kocharin.
|
|
197
|
+
|
|
198
|
+
Permission is hereby granted, free of charge, to any person
|
|
199
|
+
obtaining a copy of this software and associated documentation
|
|
200
|
+
files (the "Software"), to deal in the Software without
|
|
201
|
+
restriction, including without limitation the rights to use,
|
|
202
|
+
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
203
|
+
copies of the Software, and to permit persons to whom the
|
|
204
|
+
Software is furnished to do so, subject to the following
|
|
205
|
+
conditions:
|
|
206
|
+
|
|
207
|
+
The above copyright notice and this permission notice shall be
|
|
208
|
+
included in all copies or substantial portions of the Software.
|
|
209
|
+
|
|
210
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
211
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
212
|
+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
213
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
214
|
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
215
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
216
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
217
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
|
218
|
+
|
|
219
|
+
--------------------------------------------------------------------------------
|
|
220
|
+
|
|
221
|
+
.parse() is based on Joyent's node.js `url` code:
|
|
222
|
+
|
|
223
|
+
Copyright Joyent, Inc. and other Node contributors. All rights reserved.
|
|
224
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
225
|
+
of this software and associated documentation files (the "Software"), to
|
|
226
|
+
deal in the Software without restriction, including without limitation the
|
|
227
|
+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
228
|
+
sell copies of the Software, and to permit persons to whom the Software is
|
|
229
|
+
furnished to do so, subject to the following conditions:
|
|
230
|
+
|
|
231
|
+
The above copyright notice and this permission notice shall be included in
|
|
232
|
+
all copies or substantial portions of the Software.
|
|
233
|
+
|
|
234
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
235
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
236
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
237
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
238
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
239
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
240
|
+
IN THE SOFTWARE.
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
## punycode.js
|
|
244
|
+
|
|
245
|
+
```
|
|
246
|
+
Copyright Mathias Bynens <https://mathiasbynens.be/>
|
|
247
|
+
|
|
248
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
249
|
+
a copy of this software and associated documentation files (the
|
|
250
|
+
"Software"), to deal in the Software without restriction, including
|
|
251
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
252
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
253
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
254
|
+
the following conditions:
|
|
255
|
+
|
|
256
|
+
The above copyright notice and this permission notice shall be
|
|
257
|
+
included in all copies or substantial portions of the Software.
|
|
258
|
+
|
|
259
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
260
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
261
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
262
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
263
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
264
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
265
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
## uc.micro
|
|
269
|
+
|
|
270
|
+
```
|
|
271
|
+
Copyright Mathias Bynens <https://mathiasbynens.be/>
|
|
272
|
+
|
|
273
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
274
|
+
a copy of this software and associated documentation files (the
|
|
275
|
+
"Software"), to deal in the Software without restriction, including
|
|
276
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
277
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
278
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
279
|
+
the following conditions:
|
|
280
|
+
|
|
281
|
+
The above copyright notice and this permission notice shall be
|
|
282
|
+
included in all copies or substantial portions of the Software.
|
|
283
|
+
|
|
284
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
285
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
286
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
287
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
288
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
289
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
290
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
291
|
+
```
|