Browser-viewable agent-channel: HTML view plus browser-friendly auth #2

Open
opened 2026-05-23 20:53:50 +00:00 by coilysiren · 0 comments
Owner

Originally filed by @coilysiren on 2026-05-22T10:22:07Z - https://github.com/coilysiren/backend/issues/83

Problem - A channel like http://api/agent-channel/VHGC is only reachable with Authorization: Bearer <token>, which a plain browser cannot send. Kai wants to open a channel in Chrome and read it with human eyes. Today the only path is curl ... -H "Authorization: Bearer ..." plus jq.

Two parts to solve

  1. An HTML view. GET /agent-channel/{id} currently returns JSON. Add a human-rendered view - either content-negotiated (Accept: text/html) or a sibling path (/agent-channel/{id}/view). It should render the onboarding prose, channel meta, current state (mission, concepts, handoff, agents), and recent events as a readable styled page, not raw JSON.

  2. Browser-friendly auth - the real blocker, needs a Kai decision. Options:

    • Tailnet-gated unauthed reads. A read-only HTML view with no bearer token, reachable only over the tailnet. Precedent: /health is already unauthed, and deploy/main.yml's pg_hba comment states a tailnet connection is already an authenticated one. Simplest, browser-native. Cost: channel contents become readable by anything on the tailnet.
    • Cookie session. Paste the token once into a tiny login form, the backend sets a session cookie, the browser is then authed for subsequent GETs. Keeps reads authed; one extra step.
    • ?token= query param. Works, but tokens leak into logs and history. Not recommended.

Recommendation - HTML view plus a cookie session. Keeps the backend's "reads are authed" stance intact while making Chrome work. The tailnet-gated-unauthed option is cleaner to build but flips a security decision Kai deliberately made (the README says reads are authed because the backend holds personal data) - so that one is Kai's call, not an implementation default.

Context - the agent-channel mode shipped in #82. This is the human-facing surface for it. Sibling of agentic-os-kai #724, #725.

_Originally filed by @coilysiren on 2026-05-22T10:22:07Z - [https://github.com/coilysiren/backend/issues/83](https://github.com/coilysiren/backend/issues/83)_ **Problem** - A channel like `http://api/agent-channel/VHGC` is only reachable with `Authorization: Bearer <token>`, which a plain browser cannot send. Kai wants to open a channel in Chrome and read it with human eyes. Today the only path is `curl ... -H "Authorization: Bearer ..."` plus `jq`. **Two parts to solve** 1. **An HTML view.** `GET /agent-channel/{id}` currently returns JSON. Add a human-rendered view - either content-negotiated (`Accept: text/html`) or a sibling path (`/agent-channel/{id}/view`). It should render the onboarding prose, channel meta, current state (mission, concepts, handoff, agents), and recent events as a readable styled page, not raw JSON. 2. **Browser-friendly auth - the real blocker, needs a Kai decision.** Options: - **Tailnet-gated unauthed reads.** A read-only HTML view with no bearer token, reachable only over the tailnet. Precedent: `/health` is already unauthed, and `deploy/main.yml`'s pg_hba comment states a tailnet connection is already an authenticated one. Simplest, browser-native. Cost: channel contents become readable by anything on the tailnet. - **Cookie session.** Paste the token once into a tiny login form, the backend sets a session cookie, the browser is then authed for subsequent GETs. Keeps reads authed; one extra step. - **`?token=` query param.** Works, but tokens leak into logs and history. Not recommended. **Recommendation** - HTML view plus a cookie session. Keeps the backend's "reads are authed" stance intact while making Chrome work. The tailnet-gated-unauthed option is cleaner to build but flips a security decision Kai deliberately made (the README says reads are authed because the backend holds personal data) - so that one is Kai's call, not an implementation default. **Context** - the `agent-channel` mode shipped in #82. This is the human-facing surface for it. Sibling of agentic-os-kai #724, #725.
coilysiren added
P3
and removed
P2
labels 2026-05-31 07:00:13 +00:00
Sign in to join this conversation.
No labels
P0
P1
P2
P3
P4
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
coilyco-flight-deck/backend#2
No description provided.