[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7BYMZHRFHZERPQZRPNFYC9B":3,"skill-same:01M7BYMZHRFHZERPQZRPNFYC9B":43},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":13,"repositoryHtmlUrl":26,"repositoryHomepageUrl":6,"ownerHtmlUrl":27,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":28,"install":29,"resources":42},"01M7BYMZHRFHZERPQZRPNFYC9B","driving-the-tui",null,"Use when testing or validating the GAIA TUI (tui\u002F) by actually running it — driving screens, sending queries to an agent, verifying UX. Covers the loopback control API, waiting on state instead of sleeping, and the capture mistakes that produce false bug reports.","secure-workflows\u002Fgaia","secure-workflows","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F311422533?v=4","01M7BYM925H8FAXM1DRD7F5DQD","01M7BYM92V01EZBAV87C93HNKX",0,"MIT","https:\u002F\u002Fgithub.com\u002Fsecure-workflows\u002Fgaia\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fdriving-the-tui\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: driving-the-tui\ndescription: Use when testing or validating the GAIA TUI (tui\u002F) by actually running it — driving screens, sending queries to an agent, verifying UX. Covers the loopback control API, waiting on state instead of sleeping, and the capture mistakes that produce false bug reports.\n---\n\n# Driving the live TUI\n\nThe TUI exposes a loopback control API so an assistant can operate it and read\nwhat a user would see. **Use it. Never sleep.**\n\n## Start it\n\n```bash\n\u002Fpath\u002Fto\u002Fgaia --control-port 8815     # --control also works (auto-assigns)\n```\n\nOff by default: `--control` is `false`, binds `127.0.0.1` only (`control.Host`),\nand is bearer-token authenticated (token in `~\u002F.gaia\u002Ftui\u002Fcontrol.json`, mode\n0600, compared with `subtle.ConstantTimeCompare`). Verified unreachable from the\nhost's LAN address. Launch it in **its own Terminal window** — a long-lived\nprocess started from a background tool call gets SIGKILLed (exit 137).\n\n### Launch it in Windows Terminal, never bare `cmd.exe`\n\n**A `cmd.exe` window spawned by `Start-Process` lands in legacy conhost, which\nreports no colour support — and the TUI then renders with no colour and no\nsyntax highlighting at all.** It is not a rendering bug and it is not the\ncapture stripping ANSI; the process genuinely emits zero escape sequences.\n\nThe chain: `theme.Init()` and `components.PrimeRenderer()` resolve the palette\nonce at startup (`prepareTerminal`, `internal\u002Fui\u002Fapp.go`). `detectStyle()\n(components\u002Fmarkdown.go)` returns `styles.NoTTYStyle` when the terminal reports\nno colour, glamour then drops every chroma token, and `answerPanelStyle` paints\neach code line one flat grey. Everything *looks* right except that code blocks\nare monochrome — which reads as \"syntax highlighting is broken\".\n\nLaunch through `wt.exe` so the console is Windows Terminal (truecolor):\n\n```bash\npowershell.exe -NoProfile -Command \\\n  \"Start-Process wt.exe -ArgumentList @('new-tab','--title','GAIA','cmd.exe','\u002Fk','\u003Cabs path>\\run.bat')\"\n```\n\nTwo traps in that line: a `--title` containing a space breaks `wt`'s own\nargument parsing (`error 0x80070002`), so keep it one word; and put the env vars\n(`GAIA_TUI_HOME`, `PYTHONPATH`, `GAIA_AGENT_LOG`) inside the `.bat`, because a\nnew tab handed to an already-running Windows Terminal inherits *that* process's\nenvironment, not your shell's.\n\nTo check colour rather than guess: `GET \u002Fcontrol\u002Fv1\u002Fscreen?format=ansi` and\ncount `\\x1b`. Zero on a frame that should be styled means the profile\ndegraded — relaunch under `wt.exe`.\n\n## Endpoints\n\n`\u002Fcontrol\u002Fv1\u002F` — `status` · `screen` · `keys` · `text` · **`wait`** · `frames` · `resize`\n\n`view` is one of `splash` · `preflight` · `chat` · `unknown` — there is no hub\nscreen to navigate, since `gaia-tui` boots straight into one agent's chat behind\na readiness gate. On `preflight`, `blocker` names the row refusing the launch\n(`binary`, `lemonade`, `model`, `daemon`, `sidecar`, `mailbox`); wait on\n`{\"state\": {\"view\": \"chat\"}}` rather than a screen substring. `esc` quits on\n`preflight` (no screen behind it) and clears the composer on an idle `chat`.\n\n## The rule: wait, don't sleep\n\n`POST \u002Fcontrol\u002Fv1\u002Fwait` blocks **server-side** until a condition holds:\n`{\"contains\": \"...\"}`, `{\"absent\": \"...\"}`, or `{\"state\": {...}}` (ANDed), with\n`timeout_ms`. A turn takes 12-90s depending on the model and tools; a fixed\n`sleep` is either a wasted minute or a half-rendered capture. Waiting on\n`absent: \"streaming\"` returns the instant the turn ends.\n\n`\u002Ftmp\u002Fdrive.sh` (recreate if missing — \u002Ftmp is cleared) should expose:\n`keys` · `text` · `resize` · `wait \u003Cs>` · `gone \u003Cs>` · `ask \u003Ctext>` · `screen [lo hi]`,\nwhere `ask` types, submits, and blocks on `gone streaming`.\n\n## Capture mistakes that cause false bug reports\n\n- **Always `screen 0 999`.** A cropped capture once produced a fabricated\n  \"uninstall silently does nothing\" — the status line is the second-to-last row.\n- **`resize` FIRST** or cols\u002Frows are 0 and everything wraps wrongly.\n- **`format=plain` strips ANSI** — but `format=ansi` does not, and it is the\n  fastest way to settle a colour question. Count `\\x1b` in the result: a styled\n  frame returns dozens (a healthy header is\n  `\\x1b[1;38;2;181;224;141mGAIA`), and **zero means the colour profile\n  degraded at launch** — see the Windows Terminal note above, not a renderer bug.\n- **Check the screen you are actually on** before sending keys. Keys sent to the\n  wrong screen do nothing and read as \"the binding is broken\".\n- `screencapture` is blocked on this machine. Use the control API text.\n\n## Know which build you are driving\n\nStacked branches are siblings; no single branch contains everything. A leaf\nbuild shows behaviour already fixed elsewhere — this produced a bug report for\nsomething fixed on another branch. Build from a merged integration branch, or\nsay explicitly which slice you tested.\n\nSimilarly, `mode: user` runs the **published frozen sidecar**, which is routinely\nolder than source (2.4 vs 2.6). Confirm with\n`gaia daemon start-agent \u003Cid> --mode dev` when testing source behaviour, and\ncheck `api_version` in `GET \u002Fdaemon\u002Fv1\u002Fagents`.\n\n## The card\u002Fcontext trap\n\nCards are rendered by the TUI from `tool_result.render`, not by the sidecar. The\ntranscript pushed back as `context` must therefore carry a compact record of what\nwas displayed, or a follow-up referring to a visible row (\"when is that one?\")\nresolves against nothing. See `SSEClient.appendTurn` \u002F `displayedCard`.\n\n## Reporting what you saw\n\nWrite results per [CLAUDE.md → How You\nCommunicate](..\u002F..\u002F..\u002FCLAUDE.md#how-you-communicate): open with whether the thing works, in\none plain sentence, then the captures and `file:line` detail beneath it. Say plainly which\nscreens you never reached — an unstated gap reads as a pass.\n","# Driving the live TUI\n\nThe TUI exposes a loopback control API so an assistant can operate it and read\nwhat a user would see. **Use it. Never sleep.**\n\n## Start it\n\n```bash\n\u002Fpath\u002Fto\u002Fgaia --control-port 8815     # --control also works (auto-assigns)\n```\n\nOff by default: `--control` is `false`, binds `127.0.0.1` only (`control.Host`),\nand is bearer-token authenticated (token in `~\u002F.gaia\u002Ftui\u002Fcontrol.json`, mode\n0600, compared with `subtle.ConstantTimeCompare`). Verified unreachable from the\nhost's LAN address. Launch it in **its own Terminal window** — a long-lived\nprocess started from a background tool call gets SIGKILLed (exit 137).\n\n### Launch it in Windows Terminal, never bare `cmd.exe`\n\n**A `cmd.exe` window spawned by `Start-Process` lands in legacy conhost, which\nreports no colour support — and the TUI then renders with no colour and no\nsyntax highlighting at all.** It is not a rendering bug and it is not the\ncapture stripping ANSI; the process genuinely emits zero escape sequences.\n\nThe chain: `theme.Init()` and `components.PrimeRenderer()` resolve the palette\nonce at startup (`prepareTerminal`, `internal\u002Fui\u002Fapp.go`). `detectStyle()\n(components\u002Fmarkdown.go)` returns `styles.NoTTYStyle` when the terminal reports\nno colour, glamour then drops every chroma token, and `answerPanelStyle` paints\neach code line one flat grey. Everything *looks* right except that code blocks\nare monochrome — which reads as \"syntax highlighting is broken\".\n\nLaunch through `wt.exe` so the console is Windows Terminal (truecolor):\n\n```bash\npowershell.exe -NoProfile -Command \\\n  \"Start-Process wt.exe -ArgumentList @('new-tab','--title','GAIA','cmd.exe','\u002Fk','\u003Cabs path>\\run.bat')\"\n```\n\nTwo traps in that line: a `--title` containing a space breaks `wt`'s own\nargument parsing (`error 0x80070002`), so keep it one word; and put the env vars\n(`GAIA_TUI_HOME`, `PYTHONPATH`, `GAIA_AGENT_LOG`) inside the `.bat`, because a\nnew tab handed to an already-running Windows Terminal inherits *that* process's\nenvironment, not your shell's.\n\nTo check colour rather than guess: `GET \u002Fcontrol\u002Fv1\u002Fscreen?format=ansi` and\ncount `\\x1b`. Zero on a frame that should be styled means the profile\ndegraded — relaunch under `wt.exe`.\n\n## Endpoints\n\n`\u002Fcontrol\u002Fv1\u002F` — `status` · `screen` · `keys` · `text` · **`wait`** · `frames` · `resize`\n\n`view` is one of `splash` · `preflight` · `chat` · `unknown` — there is no hub\nscreen to navigate, since `gaia-tui` boots straight into one agent's chat behind\na readiness gate. On `preflight`, `blocker` names the row refusing the launch\n(`binary`, `lemonade`, `model`, `daemon`, `sidecar`, `mailbox`); wait on\n`{\"state\": {\"view\": \"chat\"}}` rather than a screen substring. `esc` quits on\n`preflight` (no screen behind it) and clears the composer on an idle `chat`.\n\n## The rule: wait, don't sleep\n\n`POST \u002Fcontrol\u002Fv1\u002Fwait` blocks **server-side** until a condition holds:\n`{\"contains\": \"...\"}`, `{\"absent\": \"...\"}`, or `{\"state\": {...}}` (ANDed), with\n`timeout_ms`. A turn takes 12-90s depending on the model and tools; a fixed\n`sleep` is either a wasted minute or a half-rendered capture. Waiting on\n`absent: \"streaming\"` returns the instant the turn ends.\n\n`\u002Ftmp\u002Fdrive.sh` (recreate if missing — \u002Ftmp is cleared) should expose:\n`keys` · `text` · `resize` · `wait \u003Cs>` · `gone \u003Cs>` · `ask \u003Ctext>` · `screen [lo hi]`,\nwhere `ask` types, submits, and blocks on `gone streaming`.\n\n## Capture mistakes that cause false bug reports\n\n- **Always `screen 0 999`.** A cropped capture once produced a fabricated\n  \"uninstall silently does nothing\" — the status line is the second-to-last row.\n- **`resize` FIRST** or cols\u002Frows are 0 and everything wraps wrongly.\n- **`format=plain` strips ANSI** — but `format=ansi` does not, and it is the\n  fastest way to settle a colour question. Count `\\x1b` in the result: a styled\n  frame returns dozens (a healthy header is\n  `\\x1b[1;38;2;181;224;141mGAIA`), and **zero means the colour profile\n  degraded at launch** — see the Windows Terminal note above, not a renderer bug.\n- **Check the screen you are actually on** before sending keys. Keys sent to the\n  wrong screen do nothing and read as \"the binding is broken\".\n- `screencapture` is blocked on this machine. Use the control API text.\n\n## Know which build you are driving\n\nStacked branches are siblings; no single branch contains everything. A leaf\nbuild shows behaviour already fixed elsewhere — this produced a bug report for\nsomething fixed on another branch. Build from a merged integration branch, or\nsay explicitly which slice you tested.\n\nSimilarly, `mode: user` runs the **published frozen sidecar**, which is routinely\nolder than source (2.4 vs 2.6). Confirm with\n`gaia daemon start-agent \u003Cid> --mode dev` when testing source behaviour, and\ncheck `api_version` in `GET \u002Fdaemon\u002Fv1\u002Fagents`.\n\n## The card\u002Fcontext trap\n\nCards are rendered by the TUI from `tool_result.render`, not by the sidecar. The\ntranscript pushed back as `context` must therefore carry a compact record of what\nwas displayed, or a follow-up referring to a visible row (\"when is that one?\")\nresolves against nothing. See `SSEClient.appendTurn` \u002F `displayedCard`.\n\n## Reporting what you saw\n\nWrite results per [CLAUDE.md → How You\nCommunicate](..\u002F..\u002F..\u002FCLAUDE.md#how-you-communicate): open with whether the thing works, in\none plain sentence, then the captures and `file:line` detail beneath it. Say plainly which\nscreens you never reached — an unstated gap reads as a pass.\n",{"name":5,"description":7},"main","11039b64e036dca33313350b4cd1d6c2a791eb15",".claude\u002Fskills\u002Fdriving-the-tui","https:\u002F\u002Fgithub.com\u002Fsecure-workflows\u002Fgaia","https:\u002F\u002Fgithub.com\u002Fsecure-workflows","2026-10-26 10:48:34",{"source":8,"skillName":5,"commands":30,"prompt":40,"zipAvailable":41},[31,34,37],{"tool":32,"command":33},"npx","npx skills add secure-workflows\u002Fgaia --skill driving-the-tui",{"tool":35,"command":36},"bunx","bunx skills add secure-workflows\u002Fgaia --skill driving-the-tui",{"tool":38,"command":39},"pnpm","pnpm dlx skills add secure-workflows\u002Fgaia --skill driving-the-tui","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fsecure-workflows\u002Fgaia\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fdriving-the-tui\u002FSKILL.md",true,[],[44,51,58,65,72,79],{"skillNo":45,"name":46,"nameZh":6,"description":47,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":48,"categories":49,"keywords":50,"publishedAt":18},"01M7BYXGPPQJGVVD0DPS2WK3FS","web-search","Search the web via the Brave Search API. Use when the user asks about current events or external facts.","https:\u002F\u002Fgithub.com\u002Fsecure-workflows\u002Fgaia\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskills\u002Fweb-search\u002FSKILL.md",[],[],{"skillNo":52,"name":53,"nameZh":6,"description":54,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":55,"categories":56,"keywords":57,"publishedAt":18},"01M7BYXDF2TM5JPMEQKMMHW0VJ","triage-support-ticket","Triage an inbound support ticket end to end. Use when the user pastes a support ticket or asks to triage one.","https:\u002F\u002Fgithub.com\u002Fsecure-workflows\u002Fgaia\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskills\u002Ftriage-support-ticket\u002FSKILL.md",[],[],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":18},"01M7BYXAHWNBMJ8Y1Q51EZ53K7","tool-mismatch","Declares a tool its tools.py never registers. Used to prove validation fails loudly with no partial load.","https:\u002F\u002Fgithub.com\u002Fsecure-workflows\u002Fgaia\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskills\u002Ftool-mismatch\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":18},"01M7BYX6CZ63AM6HB90PPNXKF7","report-archive","Archive a generated report to the user's reports folder and register it with the team's report index. Use when the user asks to file, archive, or publish a finished report.","https:\u002F\u002Fgithub.com\u002Fsecure-workflows\u002Fgaia\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskills\u002Freport-archive\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":18},"01M7BYX4PM4HGNZ0QBZ54BTG1N","local-capability","Writes files on the local workspace. Used to prove Phase 1 refuses local-capability permissions.","https:\u002F\u002Fgithub.com\u002Fsecure-workflows\u002Fgaia\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskills\u002Flocal-capability\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":18},"01M7BYX1KVPKHHZ5Z3R3BB0QQA","incident-review","Run an incident postmortem. Stands in for a Claude Code skill library imported read-only from .claude\u002Fskills\u002F.","https:\u002F\u002Fgithub.com\u002Fsecure-workflows\u002Fgaia\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskills\u002Fincident-review\u002FSKILL.md",[],[]]