Every ck_ token could claim the next command, ack it, and post a PTY's
screen, transcript, runtime state and a run's progress. A token handed to an
agent so it could start, send to and read sessions could therefore take
another builder's work, or show the owner a screen or a "working" beat that
no PTY printed — and the owner reads those as the truth.
- agent_tokens.kind: "runner" | "agent", default "runner". Every existing
token becomes a runner, so no builder loses its token on deploy
(migration 0138, constant default, no table rewrite).
- POST /api/agent-tokens takes an optional kind; without one it mints a
runner token, as before, so a builder's pairing is unchanged.
- getRunnerApiUserId (lib/session): a session or any token but an agent's.
It guards the builder's own calls: claiming commands, acking them,
peek-frame, transcript-frame, runtime-state, run progress. Reading a
dispatch's status stays open to every token.
- LOOP-WALK: a QA bot mints its token with kind "agent".
scripts/test/agent-token-kind.ts pins the rule, each guarded handler, the
status read left open, and the runner default in route and migration.