superbee 0.4.0-pre.2 → 0.4.0-pre.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "superbee",
3
- "version": "0.4.0-pre.2",
3
+ "version": "0.4.0-pre.4",
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,21 @@ 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>` while
154
+ `next_offset` is present. The page without `next_offset` is the last one; `complete` is true only
155
+ when the whole body fit in one page, so never loop on it. A page is not the document: never write
156
+ it back as the body. To edit, use `doc read <id> --body-out <path-outside-bundle>`, edit that file,
157
+ then `doc update <id> --body-file <path> --expected-version <version>`.
158
+
144
159
  ## Host reads with no verb yet: `op list` and `op run`
145
160
 
146
161
  Typed verbs come first: `doc read`, `doc history`, `list`, `query` and `status`. When the host
@@ -207,6 +222,32 @@ with a `held` row, reason `unsafe_id`, and the rest of the bundle syncs. A host
207
222
  differs only in letter case from another is held as `case_collision`. Both are renamed in the
208
223
  Superbee app, by the person.
209
224
 
225
+ ## The bundle's front page (the root `index.md`)
226
+
227
+ The root `index.md` syncs as one file of its own when the host lets you change the bundle's front
228
+ page (anyone who may write the bundle may). An edit to it is sent with the next `superbee sync`
229
+ against the host's version the folder last had, and a front page changed on the host replaces an
230
+ unedited file. If both changed, the receipt has a `conflict` row for `index.md`, and nothing is
231
+ sent:
232
+
233
+ ```sh
234
+ superbee sync --inspect --doc index.md # base, your front page, the host's
235
+ superbee sync --resolve take --doc index.md # use the host's
236
+ superbee sync --resolve keep --doc index.md # the next sync sends yours over the inspected host version
237
+ ```
238
+
239
+ - `keep` needs an `--inspect` first, as for a document. It sends the file as it is at that next
240
+ sync, so edit it to the combined result first if you want both. `revise` does the same.
241
+ - A front page over 64 KiB as a request is held (`too_large`), and one that is not plain UTF-8
242
+ text (or starts with a byte-order mark) is held (`not_sendable`). The host refuses one that
243
+ changes the bundle's `okf_version` (`refused`, `validation_failed`).
244
+ - A lost answer is settled by the host's front page itself: the next sync never sends it twice.
245
+ - Where the host does not take front-page changes from you (an older host, or no write access), an
246
+ edited root `index.md` is held (`reserved_file`): change it in the Superbee app.
247
+ - A root `index.md` that is a symbolic link (`symlink`) or a folder (`unsafe_path`) is held: sync
248
+ never reads, sends or replaces through it.
249
+ - A subdirectory `index.md` and every `log.md` are always held (`reserved_file`).
250
+
210
251
  ## Refusals that belong to the person
211
252
 
212
253
  Some commands are refused in a hosted checkout with "do this in the Superbee app". Examples: