Skip to content

Board phrase starts the local board server and gives its address (T216) - #112

Merged
erickb336 merged 5 commits into
mainfrom
board/t216-board-phrase-server
Oct 11, 2026
Merged

erickb336 merged 5 commits into
mainfrom
board/t216-board-phrase-server

Conversation

@erickb336

Copy link
Copy Markdown
Owner

Closes #108
Sage task T216

What the owner gets

  • The board phrase now has the chief run board --ensure first, as a command of its own, and then the chat board. The ensure command sets the board up when it has no config, starts the server in the background when nothing answers on its port, and prints one line: the address (with "no sign-in needed on this Mac"), or why the server is not running (another program on the port, or a failed start with the log path).
  • board --setup without --sources uses the standard roots: $CLAUDE_CONFIG_DIR/sage or ~/.claude/sage, and $CODEX_HOME/sage or ~/.codex/sage. A missing root stays listed. Without --config, every board command uses ~/.config/sage-board/board.json. Log and pid go to board.log and board.pid next to it.
  • Owner decision: on the Mac (Host 127.0.0.1, localhost or [::1] at the port) the board needs no sign-in; through an allowed host (the Tailscale name) it still does. The Host, Origin and Sec-Fetch-Site checks, the CSP, GET and HEAD only, and the routes are unchanged.
  • Owner request: board --set-password asks twice with the echo off (from the terminal only, never an argument), needs 12 characters or more, and keeps only a salted scrypt hash (N 32768, r 8, p 1, 16-byte salt) in place of the random secret. A config with the old secret keeps working until then.
  • The build copies packages/sage-board/*.mjs into each plugin under board/, so the hook's note can name the command.

Checks

  • npm run build and npm run check: pass.
  • Every test file alone, with fake ps, pgrep, kill and pkill first on PATH: 792 pass, 0 fail.
  • The 9 new or changed T216 tests fail on main.

🤖 Generated with Claude Code

erickb336 and others added 2 commits October 11, 2026 00:19
- board --setup without --sources uses the standard Claude and Codex roots
  (CLAUDE_CONFIG_DIR or ~/.claude, then sage; CODEX_HOME or ~/.codex, then
  sage). Without --config, every board command uses
  ~/.config/sage-board/board.json.
- board --ensure sets the board up when its config is missing, checks what
  answers on 127.0.0.1 at the configured port, starts a detached server when
  nothing does (board.log and board.pid next to the config), and prints one
  line: the address, or why the server is not running.
- On the Mac (a loopback Host) the board needs no sign-in; through an
  allowed host (Tailscale) it still does.
- board --set-password asks twice with the echo off and keeps only a salted
  scrypt hash in place of the random secret; the server checks against it.
- The build copies the board package into each plugin, so the hook's board
  note can name it; the note runs the ensure command first, then the chat
  board.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
erickb336 and others added 3 commits October 11, 2026 02:27
…id, quiet missing roots (T216)

- F-T216-1: the no-sign-in path needs a loopback peer, a loopback Host and no proxy header.
- F-T216-2: one password check at a time (429 for others) and a 1 s delay after a wrong one.
- F-T216-3, 10: the server names its config (X-Sage-Board); ensure tells an older board, another
  config's board and a silent port apart, with the restart command.
- F-T216-4: the board is a cross-provider reader (AGENTS.md); providers.test checks its imports;
  standardSources respects SAGE_HOME.
- F-T216-5: phone steps only with allowedHosts; a runnable set-password command; install works
  from the plugin copy.
- F-T216-6, 7: the server writes and removes board.pid; board --stop; ensure says when a restart
  is needed.
- F-T216-8: a missing root is a quiet "not set up yet" note, not a failed update.
- F-T216-9: the board guide text.
- The first watchers settle 250 ms before the listener opens, and each later new watcher gets one
  more read, so a logbook created during a watcher's start is not missed (the missing-root test
  flaked under load before).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The not set up yet note moves into the T218 banners function.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…board.pid, guide from the plugin (T216)

- F-T216-19: the start has its own timer, so a watcher event in its first 250 ms (a missing root
  appears) no longer cancels it; start resolves and close ends.
- F-T216-11, 16: stop sends no signal to a board that does not name its process (an older one),
  whatever board.pid holds; ensure tells how to stop it where it started (Ctrl+C or launchctl
  bootout), not a stop command.
- F-T216-12: when board.pid cannot be written, --serve closes the server and fails.
- F-T216-13: board.pid is a new file renamed into place, so a link at that name is never followed.
- F-T216-15: the guide supports only the HTTPS form of tailscale serve and warns about a TCP forward.
- F-T216-17, 9: the guide's set-up commands run in the plugin's board folder and name the installed
  path that install prints; a test runs them from an isolated plugin copy.
- F-T216-18: the guide says that the login service's board writes board.pid too.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@erickb336
erickb336 merged commit b0af484 into main Oct 11, 2026
1 check passed
@erickb336
erickb336 deleted the board/t216-board-phrase-server branch October 11, 2026 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

T216: The board phrase starts the local board server on the Mac and gives its address; setup without inline paths

1 participant