/ana:anafrom ana
Attaches a chat+watch dashboard to any web app by injecting user messages into a tmux-based coding agent via paste-buffer and mirroring the session back via SSE. Drop in one dependency-free file.
Ships in ana. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
ANA turns any web app into one you operate by watching + talking: a coding agent runs inside a tmux pane; the browser sends chat that ANA injects into that pane, and mirrors the session (agent replies, tool activity, busy state) back to the page — no MCP, no bridge, no hooks. The entire runtime is one dependency-free file: channel-core.js.
[your web page] ──POST /api/chat──► server ──paste-buffer + Enter──► [tmux pane: claude / any agent]
▲ │ │
└── SSE /api/stream ◄───────────┘ 300ms capture-pane → parse → ledger (auto-mirror)
channel-core.js and serves your HTML.claude, or any).1. Copy channel-core.js into your project (it is dependency-free, Node ≥ 20 + tmux).
2. Mount it — add ~12 lines to (or beside) your server:
const path = require('node:path');
const core = require('./channel-core.js');
const app = core.createChannelServer({
PORT: 8809, BIND: '127.0.0.1',
SESSION: core.defaultSession(__dirname, process.env), // TMUX_SESSION || <ANA name>-claude
SOCKET: process.env.TMUX_SOCKET || '', // default tmux socket
TARGET: core.resolveTarget(__dirname, process.env),
FEED_FILE: path.join(__dirname, '.ana', 'transcript.jsonl'),
SERVABLE: new Set(['index.html']), // your dashboard file(s)
defaultDoc: 'index.html',
autoConfigPane: true, // sets alternate-screen off on connect
});
app.listen(() => console.log('ANA → http://localhost:8809'));
3. Add the chat widget to your page — send with POST /api/chat {text} and stream with GET /api/stream (SSE). Minimal client:
<script>
const es = new EventSource('/api/stream');
es.onmessage = (e) => { const d = JSON.parse(e.data); /* d.kind: snapshot|commit|pending|status|screen|draft */ };
function send(text) { fetch('/api/chat', { method:'POST', headers:{'content-type':'application/json'}, body: JSON.stringify({ text, force: true }) }); }
</script>
tmux new -s base-ana-claude # inside it, start your agent: claude
node server.js # → http://localhost:8809 , open in a browser
Session name = <ANA name>-claude. The ANA name is your project folder when it is <xxx>-ana (e.g. ~/ana/shop-ana → shop-ana-claude), otherwise base-ana. The chat's session list shows only <ANA name>-<yyy> sessions (-codex, -review, …); ANA_NAME, TMUX_SESSION and ANA_TMUX_ALL=1 override.
That's it — type in the page, the agent answers in the page.
| Endpoint | Purpose |
|---|---|
POST /api/chat {text, force?} | inject a message into the tmux agent (use force:true from the web — it clears the input line first, avoiding false "draft" blocks) |
POST /api/keys {key} | send a control key (enter/esc/up/down/1..9/ctrl-c …) — used to answer TUI dialogs |
GET /api/stream (SSE) | snapshot + incremental commit/pending/status/screen/draft/dialog/target events for the caller's session |
GET /api/feed?since=<seq> | that session's conversation ledger (cursor pagination) — survives restarts |
GET /api/health | {session, target, you, command, ready, dialog, dialogInfo, busy} — connection + terminal-dialog state |
GET /api/config / POST /api/config {target} | list tmux sessions (message count, who picked it, who is watching) / switch your session live — remembered per person |
GET /api/dialog / POST /api/dialog {action, n?, text?} | structured terminal dialog (AskUserQuestion, permission menus) / answer it: pick n (+text for "Type something"), submit (multi-select), next/prev (question tabs), esc |
GET /api/screen | raw pane snapshot (for a terminal view / dialog card) |
Sessions. Every tmux session (target) gets its own ledger (.ana/transcripts/<target>.jsonl; the default session keeps .ana/transcript.jsonl), poll loop, SSE subscribers and injection queue. A request's session is: x-ana-target header or ?target= (explicit, e.g. for the agent's own curl) → the person's most recent pick (.ana/targets.json, keyed by the userKey(req) hook — the identity header in the ANA base) → the default TARGET. Switching sessions swaps the whole chat history, and each signed-in person lands on the session they used last.
Plain replies mirror automatically. For preview + approve cards, the agent posts POST /api/agent {text, diff, why?, ask?, effect?, ifNot?} (the plain fields show on the approval card — what's going on, what's asked, what it changes, what if not; without them the card says how many items it adds, changes and removes); your server applies the diff on approval and bumps a version so every device re-syncs. diff = {add:[{list:'<array in work-graph.json>', …fields}], update:[{id, …fields}], remove:[id]} — list names the array of that kind, declared in work-ontology.js (the base declares none; the agent adds kinds as it builds Work). See dashboard-api.js in the ANA base (validateDiff, applyDiff).
127.0.0.1 by default — a coding agent has tool-execution power, so never expose it unauthenticated (BIND=0.0.0.0 is opt-in for trusted networks only)./api/chat//api/keys require content-type: application/json + same-origin (CSRF guard). Only SERVABLE files are served.health.dialog in your UI so the user can respond with /api/keys.Full reference app (dashboard with ANA mode, context chips, docked chat, evolution tab): the repository root. Run it, then copy the parts you want.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
10 skills in this plugin
/agent-requestsPort ANA's Requests, Evolve, PRD and Knowledge tabs — Requests (what the agent needs from the user — pending data-change diffs, approval / decision / access requests, work only the user can do, missing information), Evolve (the agent looks at the work and the usage log and proposes what to do now and how the app should change, then builds the approved ones) and PRD (what this ANA is and does — the agent writes it, people edit it, every version is kept). Knowledge (an ontology and a graph that start empty and the agent fills from the work). Every card speaks plainly (why / ask / effect / ifNot). Also triggers on "PRD", "요구사항 문서", "지식", "온톨로지". Use when the user says "Requests 탭", "에이전트가 요청", "사용자에게 요청", "Evolve", "진화 제안", "개선 제안 탭", or when ana-update reports agent-requests / agent-evolve missing./ana-updateBring an existing, customized ANA up to date with the latest upstream ANA (github.com/tykimos/agent-native-agent) feature by feature — compare first, report what is new/missing/outdated, then port only what the user picks, using the per-feature skills (chat-window, context-chips, work-and-knowledge, app-shell, agent-requests, trust-checks). Never overwrite the ANA's own domain code. Use when the user says "최신 내용으로 업데이트해", "ANA 업데이트", "update this ANA", "upstream이랑 뭐가 달라", "새 기능 가져와", "base-ana 개선사항 적용", or gives the ANA GitHub URL and asks to sync./app-shellPort ANA's app shell — one workspace, six tabs in a menu under the ANA logo (PRD with Current / History, Work with a sub-tab per kind of work, Knowledge with Ontology / Graph, Requests · Evolve · Update with Waiting / In progress / Done), sub-tabs (in the top bar), badges, right-aligned profile, "New version available" reload pill, and the remembered tab. Use when the user says "탭 구조", "모바일 네비게이션", "워크 탭", "서브탭", or when ana-update reports app-tabs missing./audio-cd-rip오디오 CD를 mp3로 리핑해 contents/music 앨범 폴더로 만든다. CD 케이스·표지 사진에서 곡명을 읽거나 MusicBrainz로 조회해 album.json 메타를 작성하고, 커버 이미지를 저장해 음악 탭(/music)에 바로 뜨게 한다. "CD 복사해줘", "CD를 mp3로", "앨범 넣어줘", "음악 CD 리핑" 요청 시 사용./chat-windowPort or rebuild the ANA chat window so it looks and behaves like the Claude app — full-width session combo, user bubbles + markdown replies + collapsible tool groups rendered from the agent's own JSONL log (Claude Code and Codex), floating composer with model pill, model/effort sheet, 5-hour/weekly usage rings, voice dictation, file attachments, reliable send state, iOS keyboard fit, one ledger per session. Use when the user says "채팅창 개선", "채팅창 스킬", "클로드 앱처럼", "모델 선택", "한도 표시", "음성 입력", "코덱스 지원", "세션별로 따로", "port the chat window", or when ana-update reports chat-* features missing./cloud-settingProvision and wire up a cloud VM as an ANA (Agent-Native Agent) host end-to-end — create an Azure VM (az CLI), record its connection info, SSH in, install Node ≥ 20 + tmux + Claude Code, clone a project into ~/Projects/<name>, run the coding agent inside a named tmux session, expose the ANA server through a Cloudflare Tunnel (cloudflared systemd service + public hostname), and register everything as systemd units that survive reboots and crashes. Use whenever the user says "VM 만들어", "클라우드 셋팅", "cloudflare 터널 연결", "tmux에서 claude 띄워", "서비스로 등록해", "재부팅해도 살아있게", "azure vm setup", "cloud-setting", "deploy ANA to a server", or wants to move an ANA project from laptop to a server.npx claudepluginhub tykimos/agent-native-agent --plugin anaOther plugins' skills for the same job