ftown-bridge 0.30.71 → 0.30.73

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.
Files changed (100) hide show
  1. package/dist/attention-cli.d.ts +1 -0
  2. package/dist/attention-cli.js +3 -1
  3. package/dist/attention-cli.js.map +1 -1
  4. package/dist/cli-client.d.ts +2 -0
  5. package/dist/cli-client.js +19 -0
  6. package/dist/cli-client.js.map +1 -1
  7. package/dist/coordination/attention-routing.d.ts +1 -0
  8. package/dist/coordination/attention-routing.js +44 -30
  9. package/dist/coordination/attention-routing.js.map +1 -1
  10. package/dist/coordination/board.d.ts +2 -0
  11. package/dist/coordination/board.js +34 -17
  12. package/dist/coordination/board.js.map +1 -1
  13. package/dist/coordination/contract-c.d.ts +1 -0
  14. package/dist/coordination/contract-c.js.map +1 -1
  15. package/dist/coordination/contract.d.ts +6 -1
  16. package/dist/coordination/contract.js +1 -1
  17. package/dist/coordination/contract.js.map +1 -1
  18. package/dist/coordination/peer-team.d.ts +44 -0
  19. package/dist/coordination/peer-team.js +77 -0
  20. package/dist/coordination/peer-team.js.map +1 -0
  21. package/dist/coordination/plan.d.ts +5 -3
  22. package/dist/coordination/plan.js +79 -49
  23. package/dist/coordination/plan.js.map +1 -1
  24. package/dist/coordination/tree-events.js +14 -4
  25. package/dist/coordination/tree-events.js.map +1 -1
  26. package/dist/coordination/wiring.d.ts +6 -1
  27. package/dist/coordination/wiring.js +30 -12
  28. package/dist/coordination/wiring.js.map +1 -1
  29. package/dist/create-ftown-session.d.ts +8 -3
  30. package/dist/create-ftown-session.js +44 -22
  31. package/dist/create-ftown-session.js.map +1 -1
  32. package/dist/harness-commands.js +11 -8
  33. package/dist/harness-commands.js.map +1 -1
  34. package/dist/index.js +75 -30
  35. package/dist/index.js.map +1 -1
  36. package/dist/local-api-server.d.ts +12 -1
  37. package/dist/local-api-server.js +251 -27
  38. package/dist/local-api-server.js.map +1 -1
  39. package/dist/mail-delivery.d.ts +1 -0
  40. package/dist/mail-delivery.js +3 -0
  41. package/dist/mail-delivery.js.map +1 -1
  42. package/dist/peer-control.d.ts +2 -2
  43. package/dist/peer-control.js +3 -1
  44. package/dist/peer-control.js.map +1 -1
  45. package/dist/peer-session-cache.d.ts +144 -1
  46. package/dist/peer-session-cache.js +61 -7
  47. package/dist/peer-session-cache.js.map +1 -1
  48. package/dist/preview-assets.d.ts +10 -0
  49. package/dist/preview-assets.js +241 -0
  50. package/dist/preview-assets.js.map +1 -0
  51. package/dist/preview-protocol.d.ts +10 -1
  52. package/dist/preview-protocol.js +3 -1
  53. package/dist/preview-protocol.js.map +1 -1
  54. package/dist/project-board-commands.d.ts +2 -0
  55. package/dist/project-board-commands.js +18 -1
  56. package/dist/project-board-commands.js.map +1 -1
  57. package/dist/project-board-store.d.ts +4 -0
  58. package/dist/project-board-store.js +53 -16
  59. package/dist/project-board-store.js.map +1 -1
  60. package/dist/project-cli.js +35 -10
  61. package/dist/project-cli.js.map +1 -1
  62. package/dist/project-directory-protocol.d.ts +3 -1
  63. package/dist/project-directory-protocol.js +3 -1
  64. package/dist/project-directory-protocol.js.map +1 -1
  65. package/dist/project-storage-move.d.ts +30 -0
  66. package/dist/project-storage-move.js +421 -0
  67. package/dist/project-storage-move.js.map +1 -0
  68. package/dist/remote-child-plan.d.ts +23 -0
  69. package/dist/remote-child-plan.js +68 -0
  70. package/dist/remote-child-plan.js.map +1 -0
  71. package/dist/security/bridge/permissions.js +9 -1
  72. package/dist/security/bridge/permissions.js.map +1 -1
  73. package/dist/security/bridge/security.js +1 -1
  74. package/dist/security/bridge/security.js.map +1 -1
  75. package/dist/session-block.d.ts +2 -0
  76. package/dist/session-block.js +7 -2
  77. package/dist/session-block.js.map +1 -1
  78. package/dist/session-board-snapshot.d.ts +1 -1
  79. package/dist/session-controller.d.ts +3 -2
  80. package/dist/session-controller.js +56 -33
  81. package/dist/session-controller.js.map +1 -1
  82. package/dist/session-handoff.d.ts +1 -0
  83. package/dist/session-handoff.js +2 -1
  84. package/dist/session-handoff.js.map +1 -1
  85. package/dist/session-parent.d.ts +13 -4
  86. package/dist/session-parent.js +51 -9
  87. package/dist/session-parent.js.map +1 -1
  88. package/dist/session-preview.d.ts +7 -2
  89. package/dist/session-preview.js +241 -141
  90. package/dist/session-preview.js.map +1 -1
  91. package/dist/sessions-commands.js +42 -32
  92. package/dist/sessions-commands.js.map +1 -1
  93. package/dist/ticket-notifications.js +5 -3
  94. package/dist/ticket-notifications.js.map +1 -1
  95. package/dist/wire-types.d.ts +1 -0
  96. package/dist/wire-types.js.map +1 -1
  97. package/package.json +7 -2
  98. package/skills/ftown/SKILL.md +6 -17
  99. package/skills/ftown/references/orchestrator.md +1 -1
  100. package/skills/ftown/references/sessions.md +27 -33
@@ -131,6 +131,7 @@ session in that same directory. The brief carries the original prompt, the
131
131
  block reason, about the last 300 screen lines, `git log` and `git diff
132
132
  --stat` against the worktree base, the linked PR, and the plan item. The
133
133
  plan item and PR link move to the new session. The old session is archived.
134
+ Finish and archive or move a manager’s children before replacing it. A worker with an active binding on a remote manager must finish or release that plan item before handoff.
134
135
  The command prints the new session as JSON, or only the id with `--plain`.
135
136
  The default name is `<old name> handoff`. Omit `--shell` and `--model` and
136
137
  the bridge picks the next routing model that still has quota; if routing
@@ -177,8 +178,7 @@ ids; `after` ids must exist, with no self-reference or cycles.
177
178
  `--plan-item <id>` (on `ftown sessions create`, requires `--parent` or
178
179
  `--parent-id`) fails with an error before any session is created when the
179
180
  item is unknown or not `todo`; after creation the item becomes `started`
180
- with the child linked, and a linking failure only warns (the session
181
- stays). When a linked child's card becomes `done`, the item becomes
181
+ with the child linked. For a remote manager, the destination confirms the binding before launching the worker. A local linking failure warns and leaves the launched session running. When a linked child's card becomes `done`, the item becomes
182
182
  `done`; a `failed` card leaves it `started` for the manager to decide.
183
183
  Setting an item back to `todo` clears its linked session. Exit codes for
184
184
  `ftown plan`: 0 ok, 1 error, 2 usage.
@@ -224,6 +224,8 @@ sessions only.
224
224
  ## Preview session files
225
225
 
226
226
  ```bash
227
+ ftown sessions preview ./dist
228
+ ftown sessions preview ./index.html ./app.js ./site.css ./logo.png
227
229
  ftown sessions preview ./preview.html ./notes.md
228
230
  ftown sessions preview --add ./extra.html
229
231
  ftown sessions preview --remove notes.md
@@ -231,34 +233,13 @@ ftown sessions preview --clear
231
233
  ftown sessions preview --session-id <id> ./preview.html ./notes.md
232
234
  ```
233
235
 
234
- The target defaults to `FTOWN_SESSION_ID`. A session holds up to 12 files, in
235
- registration order. Kind is by extension (case-insensitive): `.html`/`.htm` →
236
- HTML, `.md`/`.markdown` → Markdown; anything else is rejected. Each file must
237
- be UTF-8, at most 8 MiB before compression (1 MiB on older bridges), and inside that session's working directory; relative
238
- paths resolve from the CLI's current directory. Two registered files may not
239
- share a basename (the selector and links are by basename): a duplicate basename
240
- is rejected with a clear error. Registration is all-or-nothing — if any path
241
- fails validation or the set would exceed 12 files, nothing changes.
242
-
243
- The four forms: `preview <path...>` replaces the whole set with these files;
244
- `--add <path...>` appends to the current set; `--remove <name...>` removes by
245
- basename (removing the last file clears the preview); `--clear` removes the
246
- whole registration without deleting files. `--add`, `--remove`, and `--clear`
247
- are mutually exclusive; no paths and no flag is a usage error. Use
248
- `--session-id <id>` for an explicit target session.
249
-
250
- HTML previews use a self-contained document: inline CSS and JavaScript and
251
- data images are supported; sibling files and network access are not. Markdown
252
- is rendered as a readable document with GFM (tables, task lists, strikethrough,
253
- fenced code) inside the same sandbox iframe — no network, only `data:` images
254
- — and raw HTML inside the markdown is isolated the same way as an HTML preview.
255
- With two or more registered files, the dashboard shows a file selector in the
256
- preview toolbar; a relative link between registered files (matching a
257
- basename, ignoring `./`, query and `#fragment`) switches the selector instead
258
- of opening the default behavior. Write a temporary file and rename it over the
259
- registered file to publish a complete update; a reload resets the preview's own
260
- interactive state. Closing the dashboard preview does not clear the
261
- registration; `--clear` removes the registration without deleting the file.
236
+ The target defaults to `FTOWN_SESSION_ID`. Relative arguments resolve from the CLI's current directory and must lie within the session working directory.
237
+
238
+ Pass a dedicated output directory to publish a static site. FTown registers its HTML and Markdown pages, opens a root `index.html` or `index.htm` first, and uses site-relative names such as `guide/index.html` in the selector. HTML pages can load local classic scripts, JS modules with relative imports, stylesheets, CSS imports, fonts, and images. Relative links switch the selected page. Ordinary network requests are blocked in the preview iframe. Markdown supports GFM and embedded data images.
239
+
240
+ A directory can contain up to 64 supported assets totaling 8 MiB. The session allows up to 12 pages and each packaged page must fit in 8 MiB before compression. Use built browser assets and omit source dependencies. Registered page and asset edits are live. Re-run registration when adding or renaming files. For an explicit subset, pass the HTML pages and their assets together.
241
+
242
+ `preview <path...>` replaces the registration. `--add <path...>` adds or replaces entries with matching names. `--remove <name...>` removes the exact selector names, and `--clear` clears the registration. Closing the dashboard pane keeps the files registered. Use `--session-id <id>` to select the target session.
262
243
 
263
244
  Preview conversation input arrives through the session's existing ftown mail.
264
245
  Post a tool-authored reply with:
@@ -456,11 +437,11 @@ Fan-out targets are messaged sequentially, one JSON result line per target.
456
437
  | `--shell` | Explicit harness override: `claude`, `cursor`, `codex`, `grok`, `muse`, `antigravity`, `pi`, `omp`, `kimi-code`, `opencode`, `shell`, or Claude Code provider flavors `zai`, `kimi`, `deepseek`, `fireworks`. When omitted inside a session, inherits that session's harness; outside a session, defaults to `claude`. |
457
438
  | `--prompt` | Initial task — passed as a CLI launch argument to `claude`/Claude provider flavors/`cursor`/`codex`/`grok`/`muse`/`antigravity`/`pi`/`omp` (typed after boot for other shells) |
458
439
  | `--workdir` | Working directory |
459
- | `--project <name>` | Required for a new root. Children inherit their root’s project. |
440
+ | `--project <name>` | Required for a new root. Children inherit their manager’s project. |
460
441
  | `--name` | Dashboard label |
461
442
  | `--effort <level>` | Reasoning effort for claude, codex, grok, muse, antigravity and omp (opencode: `--model provider/model#<level>`) |
462
443
  | `--command` | Full command override, run exactly as written: skips the `--shell` builder and the flags it adds for unattended runs (a codex launched this way asks for approvals). Not for setting a model or effort. |
463
- | `--parent` | Attach to the root of the calling session (`$FTOWN_SESSION_ID`), including when creating on another bridge. |
444
+ | `--parent` | Make the calling session (`$FTOWN_SESSION_ID`) the immediate parent, including when creating on another bridge. |
464
445
  | `--parent-id` | Explicit parent session UUID |
465
446
  | `--plan-item <id>` | Do plan item `p<n>` of the parent (requires `--parent` or `--parent-id`; see Plan list) |
466
447
  | `--worktree` | Create a bridge-owned git worktree for the session (see Worktrees) |
@@ -570,7 +551,20 @@ The CLI wraps the loopback API. Raw access if needed:
570
551
  | GET | `/api/archive` | List removed-session tombstones |
571
552
  | POST | `/api/sessions/:id/revive` | Recreate a removed session (new id) |
572
553
 
573
- To move a session under a different parent, PATCH it with the new parent's id:
554
+ Any session can create a child, including a worker that already has a parent.
555
+ Use `ftown sessions create --parent` from the intended manager. Explicit parent
556
+ and bridge IDs identify the immediate parent across computers. Creation verifies
557
+ up to 32 parent links, starting with the immediate manager. The bridges that own
558
+ those ancestors must be reachable when creating a child. Existing workers keep
559
+ their recorded parents.
560
+
561
+ Removing a manager archives only that session. Its children keep running with
562
+ the old parent ID; reviving the manager creates a new ID. To restore delegation
563
+ for an orphaned leaf, detach it or move it to a live root manager as described
564
+ below. If the orphan still has children, finish and archive those children or
565
+ move its leaves first.
566
+
567
+ Reparenting existing sessions supports moving a leaf to a root manager. To move a session under a different parent, PATCH it with the new parent's id:
574
568
 
575
569
  ```json
576
570
  { "parentSessionId": "new-parent-session-id" }