Skip to content

chat: a board chat, the Rinai agent for your board, with board tools only - #5

Merged
noxire-dev merged 4 commits into
mainfrom
feat/board-chat
Nov 21, 2026
Merged

noxire-dev merged 4 commits into
mainfrom
feat/board-chat

Conversation

@noxire-dev

@noxire-dev noxire-dev commented Nov 20, 2026 •

Copy link
Copy Markdown
Owner

The owner wants Rinai's Agents chat to be a Rinai agent, not a code window: you ask "what do you think of the board", "reorganize it" or "give me the latest updates", and it reads and runs the board.

chat {board: true} starts a board chat. It has no built-in tools at all, so no Read and no Bash. Its only tools come from src/board.ts, an MCP server pinned to the thread's board. Each tool runs gh rinai -R <board> <verb> as an argument list, with no shell and stdin closed:

  • To read: board, search, brief, goals, pulse, cycle.
  • To change: move, priority, claim, cycle_add, cycle_remove, cycle_order, file, comment, update, goal, ungoal.

It runs outside the checkout, with --permission-mode dontAsk and no settings file. Only the user's apiKeyHelper and env are carried in. projects reports each project's board.

Why there's no shell: the first version allowed Bash for gh rinai only. Both reviews showed the deny list could be bypassed. A live probe then showed Claude Code runs commands it considers read-only regardless of the allow list. cat ran, and so did ; whoami chained after an allowed command. A chat with Read or Bash could therefore post .env in a comment.

Tried live through the relay on issues-scratch:

  • Reading .env, running whoami, searching another board and merging were all refused.
  • The tool list is exactly the 17 board tools.
  • Move and priority on BUG-35 changed it on GitHub, then changed it back.

bun run check passes. It covers the pinned arguments, injection in text, refused tools, and claudeArgs for a board run.

Rinai side: noxire-dev/issues feat/agents.

https://claude.ai/code/session_01TKXiuCo2xF7FNBByzeZ9HV

Created with Claude Opus 5.5 in Claude Code.

Rinai's Agents chat is for running the board, not for writing code: "what do you think of the board", "reorganize
it", "the latest updates". `chat {board: true}` starts a thread whose hands are `gh rinai` and nothing else: Read,
Grep and Glob, Bash for `gh rinai` only, with merge, api, kodr, attach and download denied (with or without -R).
It runs with --permission-mode dontAsk and no settings files: a user's defaultMode bypassPermissions otherwise wins
over --allowedTools, and `git push` and a file write both ran in a real board chat before this. `projects` says each
project's board, so a page can open the right one.

Seen against a throwaway daemon on issues-scratch: the board read and summarised with real cards; "move BUG-35 to
blocked" and back changed the label on GitHub; of seven probes only `gh rinai search` ran.

Claude-Session: https://claude.ai/code/session_01TKXiuCo2xF7FNBByzeZ9HV
@noxire-dev

Copy link
Copy Markdown
Owner Author

Note

🤖 Claude Opus 5.5 responding on behalf of noxire-dev

Not ready to merge: the board chat's confinement can be bypassed. From a /code-review pass; the first finding was reproduced with an echo analogue under the same allow/deny flags.

Important

  1. src/chat.ts:37: BOARD_DENY covers gh rinai <verb> * and gh rinai -R * <verb> *, but gh rinai --repo owner/repo merge 12 (also -Rowner/repo, --repo=...) matches the allow rule Bash(gh rinai *) and runs. Allow the specific read and change verbs instead of allow-all-then-deny.
  2. src/chat.ts:36: Bash(gh rinai *) lets a board chat write to any board the gh token reaches (gh rinai -R other/private comment ...). Build the rules from the thread's own board slug, or deny -R/--repo (the cwd already picks the board).
  3. src/chat.ts:34: Read plus comment/file/update can post local file contents (.env) to a public issue after a prompt-injected card. Deny any body-file flag on the change verbs and consider scoping Read to the checkout.
  4. src/agent.ts:62: --setting-sources '' drops the user's settings env and apiKeyHelper, so board chats fail where read/edit chats work for gateway or helper sign-ins. Keep user and override permissions via --settings, or confirm auth() covers it.
  5. src/bridge.ts:39: board: p.tracker is undefined for old projects until the backfill runs, so the key disappears; use p.tracker ?? null.
  6. src/chat.ts:102: a project whose remote was added after registration is refused; refresh the slug (ws.slug) when tracker is null, as crew does.

Nits

  • src/agent.ts:62: --disallowedTools with an empty deny emits a bare flag; spread only when non-empty.
  • docs/yap.md:324: the chats row lacks the new board field.
  • src/crew.check.ts:734: assert ClaudeCli's args for an allow run (dontAsk, setting sources, the deny forms) so this can't regress silently.

…own tools

Review on #5 (kumi and @32b71157), and a live probe that found worse: Claude Code runs commands it judges
read-only past --allowedTools, so `cat` and a `; whoami` after an allowed `gh rinai` both ran, and a chat with Read
or Bash could post .env in a comment. No permission rule closes that.

A board chat now has no built-in tool (--tools ''). Its only tools are src/board.ts, an MCP server pinned to the
thread's board whose tools each run `gh rinai -R <board> <verb>` as an argument list: no shell, stdin closed, a
lone "-" or a leading dash in text kept as text, numbers and columns validated. It runs outside the checkout, with
dontAsk and no settings file, carrying only the user's apiKeyHelper and env. A project whose remote was added
after registration is found (ws.slug), and `projects` says board: null rather than dropping the key. claudeArgs is
pure now, and the check reads it.

Seen live through the relay: .env, whoami, another board and merge all refused; the tool list is the 17 board
tools; move and priority on BUG-35 changed GitHub and changed back.

Claude-Session: https://claude.ai/code/session_01TKXiuCo2xF7FNBByzeZ9HV
@noxire-dev noxire-dev changed the title chat: a board chat, the Rinai agent for your board, confined to gh rinai chat: a board chat, the Rinai agent for your board, with board tools only Nov 20, 2026
…d, board-chat in hello

Re-review on #5 (@32b71157). The board run stands in ~/.yap/chats/<project>/board, not a shared /tmp where another
user could leave a CLAUDE.md or bunfig.toml. It carries every user setting but what could widen it (permissions,
hooks, MCP servers, plugins), so Bedrock, SSO and helper sign-ins and the model still work. hello says board-chat,
so a client can tell an older daemon (which would start a read chat in the checkout) from one with board chats.
Text is passed exactly as given (gh rinai reads it positionally; only a lone "-" is refused), the board slug is
validated where the thread starts, a null line no longer kills the server, and calls are answered as each ends.
README says what a board chat is.

Seen live: hello lists board-chat; a board chat answered from the board, standing in yap's own folder.

Claude-Session: https://claude.ai/code/session_01TKXiuCo2xF7FNBByzeZ9HV
Third pass on #5 (@32b71157). A comment, an update or a body now goes to gh rinai on stdin ("-"), as written, so
Windows' gh can't drop it; a title, label or search text with a double quote and no space is refused rather than
lost. A gh signed in by GH_TOKEN, GH_HOST, GH_CONFIG_DIR (or RINAI_URL) gets those through yap's scrubbed env, on
board runs only. Text is no longer trimmed, gh calls are killed after a minute, settings are read only for board
runs, Codex refuses a board run, and the SDK's board fields are optional for older daemons.

Seen live with the real gh on Windows: a comment and a filed task with quotes, indentation and $(...) arrived exact.

Claude-Session: https://claude.ai/code/session_01TKXiuCo2xF7FNBByzeZ9HV
@noxire-dev
noxire-dev merged commit 3f3e7dd into main Nov 21, 2026
1 check passed
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.

1 participant