superbee 0.4.3-pre.7 → 0.4.3-pre.9

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.3-pre.7",
3
+ "version": "0.4.3-pre.9",
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": [
@@ -130,9 +130,9 @@ lists for that workspace.
130
130
  ## Sync at the end of a batch of edits
131
131
 
132
132
  Edit files as usual, then run `superbee sync` once when a batch of related edits is done, not after
133
- every file. Sync always pulls before it sends. Its receipt has one row per document:
134
- `committed`, `conflict`, `held`, `refused`, `unknown` or `paused`. It exits 0 only when every row is
135
- committed.
133
+ every file. Sync always pulls before it sends. Its receipt has one row per document under `rows`:
134
+ `committed`, `conflict`, `held`, `refused`, `unknown` or `paused`. Tracked ordinary files have their
135
+ own rows under `blobs` (see "Ordinary files" below). It exits 0 only when every row is committed.
136
136
 
137
137
  Reads keep the folder current on their own:
138
138
  - `list`, `doc read`, `status`, `home`, `link show` and `view list` pull first when the last pull
@@ -288,7 +288,53 @@ superbee sync --resolve keep --doc index.md # the next sync sends yours over
288
288
  edited root `index.md` is held (`reserved_file`): change it in the Superbee app.
289
289
  - A root `index.md` that is a symbolic link (`symlink`) or a folder (`unsafe_path`) is held: sync
290
290
  never reads, sends or replaces through it.
291
- - A subdirectory `index.md` and every `log.md` are always held (`reserved_file`).
291
+ - A subdirectory `index.md` and every `log.md` are always held (`reserved_file`). A checkout
292
+ places the host's copies of them as `superbee export` would; sync leaves those be while they are
293
+ unchanged, and holds them once edited. Sync does not refresh them: a later host change to one
294
+ reaches a new checkout or an export, not this folder. When the export could not be read (an older
295
+ host, a bundle too large to export), the checkout receipt's `other_files` says they and the
296
+ ordinary files stayed on the host.
297
+
298
+ ## Ordinary files (SVGs, images, `data/*.json`)
299
+
300
+ Files other than `.md` documents are ordinary files. Sync sends and refreshes only **tracked**
301
+ ones. Treat an edit to a tracked file as a publish: the next `superbee sync` sends it to the hosted
302
+ bundle for everyone.
303
+
304
+ - **Tracked:** a file `checkout` or `checkout --adopt` placed from the host, where the host serves
305
+ ordinary files and the placed bytes match it, or a file added with `promote`. Files under
306
+ `conventions/`, `recipes/`, `references/`, `views/`, `views-registry/`, `pages/` and
307
+ `pages-registry/`, and reserved files, are never tracked.
308
+ - **Untracked:** a new non-`.md` file is held (`not_a_document`) and nothing is sent. To add it,
309
+ put it at its place in the checkout and promote that exact path:
310
+ `superbee promote <folder>/<key> --doc-key <key> [--content-type <mime>]`. The MIME type defaults
311
+ from the extension. promote records the bytes and type before sign-in, then sends only that
312
+ request; re-running it unchanged resumes the same request.
313
+ - **Edits:** where the host allows ordinary-file writes, sync sends a tracked file's exact bytes and
314
+ content type against the version and type the folder last had. A file over 16 MiB, or over a
315
+ smaller host limit, is not sent. Where the host does not allow them, an edited tracked file is
316
+ held (`not_sendable`) and stays local.
317
+ - **Host changes:** sync's pull, and the pulls of read commands, replace a tracked file that is
318
+ unchanged in the folder, place new host files where the folder has none, and remove files the
319
+ host deleted. A file you edited is kept (`pulled.blobs.kept_local_edits`). When the host removed
320
+ an unusually large set, none are removed (`pulled.blobs.refused_deletions`); run
321
+ `superbee sync --take-host-deletions blobs:<count>:<digest>` with its token only once the
322
+ bundle really shrank.
323
+ - **Deleting:** removing a tracked file, or `superbee delete --doc-key <key>` (which needs the file
324
+ unchanged since the last sync), deletes it from the hosted bundle. A deletion the host holds
325
+ appears under `blobs.deletions_held`; only the person may accept it, in their own terminal, with
326
+ the `superbee sync --accept-deletes blobs:<count>:<digest>` command it names.
327
+ - **Receipt:** `blobs.rows` has one row per request, keyed by file and request id: `committed`,
328
+ `conflict`, `refused`, `unknown` or `held`. `blobs.counts` totals them. An `unknown` row is
329
+ looked up by the same request on the next sync; it is never sent twice.
330
+ - **Conflicts:** `--inspect`, `--resolve` and `--restore-deletes` do not apply to ordinary files,
331
+ and there is no ordinary-file conflict resolution yet. After a `conflict` row (the host's version
332
+ changed) or a `refused` row, that file stays held: sync neither sends it nor refreshes it again.
333
+ The only way out today is to copy any unsent document edits out of the folder, run
334
+ `superbee checkout --release <folder>` (it forgets unsent edits), and check the bundle out again
335
+ into a new folder. Tell the person before you do this.
336
+ - **Artifacts:** `artifact` commands are refused in a checkout; Artifact publication is not
337
+ available from one.
292
338
 
293
339
  ## Refusals that belong to the person
294
340
 
@@ -365,7 +411,8 @@ history.
365
411
  complete or not at all. `export_incomplete` (TRANSIENT) means the host stopped the export:
366
412
  retry the same command.
367
413
  - `superbee export --dir <checkout> --in-place` turns the checkout into a local bundle: it adds
368
- the files the checkout lacks, never overwrites one (`kept_local` lists files that differ from
414
+ the files the checkout lacks (documents newer on the host; a checkout from an older CLI may also
415
+ lack reserved files and blobs), never overwrites one (`kept_local` lists files that differ from
369
416
  the host's), and forgets the binding. It refuses `unsent_changes`: run `superbee sync` first. Pass
370
417
  `--keep-unsent` only when the person agrees that those changes stay in this folder and never
371
418
  reach the host. If it stops part way, re-run the same command: it finishes without the network.