@sinoia/hubdoc-tools 1.13.0 → 1.13.1

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/cli.js CHANGED
@@ -735193,7 +735193,7 @@ async function handleTasksReorder(opts) {
735193
735193
  // apps/cli/cli.ts
735194
735194
  var getVersion = () => {
735195
735195
  try {
735196
- if (true) return "1.13.0";
735196
+ if (true) return "1.13.1";
735197
735197
  } catch {
735198
735198
  }
735199
735199
  for (const candidate of [
package/docs/llm-usage.md CHANGED
@@ -428,29 +428,32 @@ actions, one HTTP round-trip each:
428
428
  content is auto-saved by every write; `save` is just for the explicit
429
429
  version snapshot.
430
430
 
431
- **Concurrency & merge — handled server-side, no client state** :
431
+ **Concurrency & merge — server-side, current limitations** :
432
432
 
433
433
  Each write action executes on the server as a single load-blob → mutate
434
- → save-blob → `publish Documents::FileContentUpdated` cycle. Two agents
435
- running `hubdoc md insert` in parallel serialise at the Rails +
436
- ActiveStorage level; the second one loads the first one's result before
437
- applying its own. No client-side coordination or CRDT to maintain.
438
-
439
- Cross-modal coordination (agent + human on the web UI): every write
440
- broadcasts `content_refresh` over `DocumentEditingChannel`, which the
441
- frontend's Y.js session reloads from server content. Cf. the corex
442
- design `.claude/context/designs/y-rb-implementation.md`.
443
-
444
- **Inter-agent coordination via events** :
445
-
446
- ```bash
447
- # Agent B watches for edits on the file, reacts.
448
- hubdoc events watch \
449
- --type Documents::FileContentUpdated \
450
- --timeout 900 --json \
451
- | jq -r '.items[-1].data.file_id'
452
- # returns as soon as another agent (or the human) touches the file.
453
- ```
434
+ → save-blob → `publish Documents::FileContentUpdated` cycle. Cross-modal
435
+ broadcasts still work: every server-side write broadcasts
436
+ `content_refresh` over `DocumentEditingChannel`, and the web UI's Y.js
437
+ session reloads from server content. Cf. the corex design
438
+ `.claude/context/designs/y-rb-implementation.md`.
439
+
440
+ > ⚠️ **Known limitation lost-update race on concurrent writes**
441
+ > (tracked in [corex#595](https://code.plugandwork.net/sinoia/corex/-/issues/595)):
442
+ > two `hubdoc md insert`/`replace`/`write-section` calls firing in
443
+ > parallel on the **same file** may silently drop one of the writes —
444
+ > the load→save cycle is not yet atomic. Until corex ships a PG advisory
445
+ > lock on `MarkdownEditor#execute`, treat writes on any given file as
446
+ > **sequential**: chain your CLI calls with `await`, or coordinate via
447
+ > an out-of-band lock. Writes on *different* files stay safe.
448
+
449
+ > ⚠️ **Known limitation — `Documents::*` events not yet on `/api/v1/events`**
450
+ > (tracked in [corex#596](https://code.plugandwork.net/sinoia/corex/-/issues/596)):
451
+ > the events API was initially scoped to `Projects::*` types (corex#593).
452
+ > `hubdoc events watch --type Documents::FileContentUpdated` returns
453
+ > nothing today — agent-to-agent coordination on markdown edits is on
454
+ > hold until that scope is opened. In the meantime, coordinate via the
455
+ > ticket the file belongs to (`ticket.updated`, `ticket.comment`) or via
456
+ > an external channel.
454
457
 
455
458
  **Typical agent workflow — build a section incrementally without racing** :
456
459
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sinoia/hubdoc-tools",
3
- "version": "1.13.0",
3
+ "version": "1.13.1",
4
4
  "description": "Professional command-line tool for HubDoc document management and bulk import/export",
5
5
  "main": "cli.js",
6
6
  "bin": {