superbee 0.4.0-pre.2 → 0.4.0-pre.3
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/dist/superbee.mjs +1740 -1112
- package/package.json +1 -1
- package/references/hosted-checkout.md +40 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "superbee",
|
|
3
|
-
"version": "0.4.0-pre.
|
|
3
|
+
"version": "0.4.0-pre.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Agent-facing Superbee CLI for reading and writing local OKF knowledge bundles: context notes, docs, cross-links, and live bundle Views.",
|
|
6
6
|
"keywords": [
|
|
@@ -141,6 +141,20 @@ doc history <id> --seq <n>` shows version `n` (add `--json` for its whole conten
|
|
|
141
141
|
created in the folder has history once `superbee sync` sends it. To compare-and-swap, use the
|
|
142
142
|
folder's own version from `doc read`, not the host's newest version.
|
|
143
143
|
|
|
144
|
+
## Large documents
|
|
145
|
+
|
|
146
|
+
A host accepts documents up to the size it states (on current hosts 983,040 bytes as sent, about
|
|
147
|
+
950 KiB of Markdown, since each newline, quote or backslash counts twice; 64 KiB on older ones).
|
|
148
|
+
Sync holds a larger one with reason `too_large` and sends nothing: split it, or keep the edit until
|
|
149
|
+
the host accepts it. Never shorten someone else's document just to make it sync.
|
|
150
|
+
|
|
151
|
+
Read a large document a page at a time instead of pulling it whole into context: `superbee doc read
|
|
152
|
+
<id> --offset 0 --json` answers `body` as one page of about 32 KiB with `range` (`complete`,
|
|
153
|
+
`next_offset`); continue with `--offset <next_offset> --expected-version <head_version>` until
|
|
154
|
+
`complete` is true. A page is not the document: never write it back as the body. To edit, use `doc
|
|
155
|
+
read <id> --body-out <path-outside-bundle>`, edit that file, then `doc update <id> --body-file
|
|
156
|
+
<path> --expected-version <version>`.
|
|
157
|
+
|
|
144
158
|
## Host reads with no verb yet: `op list` and `op run`
|
|
145
159
|
|
|
146
160
|
Typed verbs come first: `doc read`, `doc history`, `list`, `query` and `status`. When the host
|
|
@@ -207,6 +221,32 @@ with a `held` row, reason `unsafe_id`, and the rest of the bundle syncs. A host
|
|
|
207
221
|
differs only in letter case from another is held as `case_collision`. Both are renamed in the
|
|
208
222
|
Superbee app, by the person.
|
|
209
223
|
|
|
224
|
+
## The bundle's front page (the root `index.md`)
|
|
225
|
+
|
|
226
|
+
The root `index.md` syncs as one file of its own when the host lets you change the bundle's front
|
|
227
|
+
page (anyone who may write the bundle may). An edit to it is sent with the next `superbee sync`
|
|
228
|
+
against the host's version the folder last had, and a front page changed on the host replaces an
|
|
229
|
+
unedited file. If both changed, the receipt has a `conflict` row for `index.md`, and nothing is
|
|
230
|
+
sent:
|
|
231
|
+
|
|
232
|
+
```sh
|
|
233
|
+
superbee sync --inspect --doc index.md # base, your front page, the host's
|
|
234
|
+
superbee sync --resolve take --doc index.md # use the host's
|
|
235
|
+
superbee sync --resolve keep --doc index.md # the next sync sends yours over the inspected host version
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
- `keep` needs an `--inspect` first, as for a document. It sends the file as it is at that next
|
|
239
|
+
sync, so edit it to the combined result first if you want both. `revise` does the same.
|
|
240
|
+
- A front page over 64 KiB as a request is held (`too_large`), and one that is not plain UTF-8
|
|
241
|
+
text (or starts with a byte-order mark) is held (`not_sendable`). The host refuses one that
|
|
242
|
+
changes the bundle's `okf_version` (`refused`, `validation_failed`).
|
|
243
|
+
- A lost answer is settled by the host's front page itself: the next sync never sends it twice.
|
|
244
|
+
- Where the host does not take front-page changes from you (an older host, or no write access), an
|
|
245
|
+
edited root `index.md` is held (`reserved_file`): change it in the Superbee app.
|
|
246
|
+
- A root `index.md` that is a symbolic link (`symlink`) or a folder (`unsafe_path`) is held: sync
|
|
247
|
+
never reads, sends or replaces through it.
|
|
248
|
+
- A subdirectory `index.md` and every `log.md` are always held (`reserved_file`).
|
|
249
|
+
|
|
210
250
|
## Refusals that belong to the person
|
|
211
251
|
|
|
212
252
|
Some commands are refused in a hosted checkout with "do this in the Superbee app". Examples:
|