docs: lead decision 149 and the channel kind brief, after row 129 (Q156 item 4, Mos mos-0726, #1661)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -3358,3 +3358,21 @@ which stay with him. Each item names who decided it and what happened.
|
||||
- I6 carries Mos's two checks: when the bus host exits, the core
|
||||
container stops too, and the container's Docker logs hold no
|
||||
capability token.
|
||||
|
||||
149. **The channel kind gets its own row, directly after row 129
|
||||
(2026-10-18, Mos mos-0726, replying to sage-0726).** Q156 item 4
|
||||
(decision 143) planned the `cli` channel module for row 128 and the
|
||||
`webui` module for row 129. My refresh of row 128's brief (0f3eb25ea)
|
||||
dropped the step without recording it, and row 128 landed without it
|
||||
(ade628c8b). `packages/plugins/src/kinds.mjs` has no channel kind.
|
||||
- Row 129 stays UI only on the current human transport, with one
|
||||
HTTP-to-bus seam in `packages/webui/src/chat.mjs` (sage-0724).
|
||||
- Row 164 (#1661, `docs/plans/2026-10-18_channel-kind.md`) adds the
|
||||
channel kind with `cli` and `webui` as its first two modules. It
|
||||
runs after row 129, and no other row goes between them, so the seam
|
||||
is swapped while it's still fresh. Design packet first, read by Mos,
|
||||
because the row works next to the human proof.
|
||||
- This changes the row numbers Jason approved in Q156 item 4, not the
|
||||
order of kinds: channels still come after the providers and before
|
||||
the task tracker. Mos ruled that it doesn't need Jason, and told
|
||||
Jason so in mos-0726.
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
# The channel plug-in kind, 2026-10-18
|
||||
|
||||
Lead decision 149 gives Q156 item 4 its own row. Jason approved the
|
||||
conversion order in Q156 (lead decision 143): channels come after the
|
||||
providers and before the task tracker. The plan named rows 128 and 129 for
|
||||
the `cli` and `webui` channel modules. Row 128's refreshed brief
|
||||
(0f3eb25ea) dropped that step by mistake, and row 129 stays UI only
|
||||
(sage-0724, Mos mos-0726). This row does the conversion right after row
|
||||
129, with nothing between them, while row 129's seam is still fresh.
|
||||
|
||||
## The channel kind, with cli and webui as its first modules
|
||||
|
||||
### Problem
|
||||
|
||||
PRD REQ-PLUG-1 lists channels as a plug-in kind, and
|
||||
`packages/plugins/src/kinds.mjs` has no `channel` entry. Today the
|
||||
channels are hard-coded, as the PRD's Technical considerations list says:
|
||||
the human channel is `via: 'cli'` in the broker
|
||||
(`packages/bus/src/runtime.mjs:117`, `broker.mjs:526`, `:1867`,
|
||||
`landing.mjs:107`), and the WebUI reaches the bus by running the human
|
||||
CLI. Row 128 added the CLI's thread verbs (`packages/cli/src/thread.mjs`)
|
||||
and row 129 adds the WebUI chat area, whose one HTTP-to-bus seam is
|
||||
`packages/webui/src/chat.mjs`. Both call the bus's project and thread ops
|
||||
directly. REQ-PLUG-2 says a hard-coded part converts when a row changes
|
||||
it. Gitea #1661.
|
||||
|
||||
### Owner and reviewer
|
||||
|
||||
- Owner: set when the row is briefed.
|
||||
- Reviewer: dewey.
|
||||
|
||||
### Files owned
|
||||
|
||||
Set by the design packet and named in it before any code:
|
||||
|
||||
- `packages/plugins/src/kinds.mjs`: one new `channel` entry;
|
||||
- `packages/plugins/channel/cli/index.mjs` and
|
||||
`packages/plugins/channel/webui/index.mjs` (new);
|
||||
- the call sites in `packages/cli/src/thread.mjs`, `packages/cli/src/cli.mjs`
|
||||
and `packages/webui/src/chat.mjs` that move behind the loader;
|
||||
- `packages/plugins/README.md`, the PRD's Technical considerations line
|
||||
for channels, and the tests the packet names.
|
||||
|
||||
### Design first
|
||||
|
||||
The owner writes a design packet in their `agents/<seat>/work/queue-<row>/`
|
||||
directory before any code. Sage reads it and sends it to Mos, because the
|
||||
row works next to the human proof. It answers:
|
||||
|
||||
1. The kind's exports, interface version and switch. A channel carries
|
||||
messages between a human surface and the bus's project and thread ops.
|
||||
The packet names each export and what the core calls it with.
|
||||
2. What switching a channel off means. The organization file's `plugins`
|
||||
key switches modules by name (REQ-PLUG-1). Say what the CLI and the
|
||||
WebUI do with their channel switched off, and how an operator who
|
||||
switched off `cli` gets it back. The packet must not leave a path where
|
||||
a config edit locks the human out of the write path that would undo it.
|
||||
3. Where the human proof sits. It stays in core (REQ-PLUG-1, REQ-DEC-3,
|
||||
Q156 item 4). The bus accepts only its own `human-cli.mjs` by literal
|
||||
path (#225), and bus, Console and wrapper share a tree. Name every file
|
||||
the proof reads and show that none of them moves or gains a caller.
|
||||
4. The broker's `via` value. Say whether `via: 'cli'` stays as the proof's
|
||||
name for the human transport or becomes a channel name, and what each
|
||||
of the four call sites above reads after the change.
|
||||
5. Discord. It isn't connected to the bus, so it stays out. Say what a
|
||||
future Discord module would export so the kind doesn't need a version
|
||||
bump for it.
|
||||
|
||||
### What ships
|
||||
|
||||
After Sage and Mos accept the design:
|
||||
|
||||
- the `channel` kind in `kinds.mjs`, landing with its first two modules,
|
||||
as REQ-PLUG-1 requires of a new kind;
|
||||
- `cli` and `webui` as channel modules. The CLI's thread verbs and the
|
||||
WebUI chat area reach the bus only through the loader, never by
|
||||
importing a module;
|
||||
- no behavior change. Every existing CLI and WebUI test passes unchanged,
|
||||
except where the packet names a test that imported the moved code;
|
||||
- the PRD's Technical considerations line for channels says `cli` and
|
||||
`webui` are modules and Discord isn't connected yet.
|
||||
|
||||
Tests:
|
||||
|
||||
- the loader loads both modules and refuses each REQ-PLUG-1 case for the
|
||||
channel kind (bad name, missing directory, symlink, missing export,
|
||||
wrong interface version);
|
||||
- `mosaic talk --thread` and `mosaic thread read` behave as before row
|
||||
128's tests expect, now through the module;
|
||||
- the WebUI chat routes behave as row 129's tests expect, now through the
|
||||
module;
|
||||
- the human proof is unchanged: the same `human-cli.mjs` path, the same
|
||||
bytes, and a call that skips the proof still refuses;
|
||||
- the answer to design question 2, tested as the packet states it.
|
||||
|
||||
Mutants: one per behavior above, with the killing test in the packet.
|
||||
|
||||
### Out of scope
|
||||
|
||||
- A Discord module, and any change to the Discord connector.
|
||||
- Any change to `packages/bus/src/human.mjs` or to how the bus checks the
|
||||
human proof.
|
||||
- Plug-ins from outside the repository (Vikunja #286, Jason's call).
|
||||
- Any live switch of the `plugins` setting. A module goes live through a
|
||||
re-pin, with Mos's go.
|
||||
|
||||
### Gate
|
||||
|
||||
Dewey approves on the row's issue, naming the candidate manifest. The
|
||||
plugins, cli, bus and webui node suites and every `scripts/test-*.sh` pass
|
||||
on Sage's gate rerun. The landing changes nothing live.
|
||||
Reference in New Issue
Block a user