[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M723DTS3RZ9NPSKF0T2D4YZ5":3,"skill-same:01M723DTS3RZ9NPSKF0T2D4YZ5":49},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":28,"commitSha":29,"skillDirectory":30,"forksCount":31,"repositoryHtmlUrl":32,"repositoryHomepageUrl":6,"ownerHtmlUrl":33,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":34,"install":35,"resources":48},"01M723DTS3RZ9NPSKF0T2D4YZ5","drive-the-harbor-tui",null,"Attach Harbor's native terminal Runtime test\u002Fcontrol client with authenticated REST\u002FSSE. Use when testing sessions, tasks, tools, artifacts, events, posture, interventions, controls, reconnect, or transcript export without opening the Console.","hurtener\u002FHarbor","hurtener","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F117486687?v=4","01M723BZXGKZDHCZ9JHRV24W4D","Santi Benvenuto","01M723BZY77XR795N9PK1BS4GX",6,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fhurtener\u002FHarbor\u002Fblob\u002Fmain\u002Fdocs\u002Fskills\u002Fdrive-the-harbor-tui\u002FSKILL.md",[],[],"2026-11-10 18:39:20",false,"---\nname: drive-the-harbor-tui\ndescription: \"Attach Harbor's native terminal Runtime test\u002Fcontrol client with authenticated REST\u002FSSE. Use when testing sessions, tasks, tools, artifacts, events, posture, interventions, controls, reconnect, or transcript export without opening the Console.\"\nlicense: Apache-2.0\nmetadata:\n  framework: harbor\n  surface: cli\n  verbs: \"tui, serve\"\n---\n\n# Drive the Harbor TUI\n\n`harbor tui` is an attach-only Harbor Protocol client. It does not start or own\nthe Runtime, import Runtime internals, call a private endpoint, or depend on the\nConsole.\n\n## 0. One command (local dev)\n\nFor the local agent-development loop, co-launch the Runtime and the TUI in a\nsingle process and terminal with the ephemeral dev token — zero config, no\ntoken copy:\n\n```bash\nharbor dev --tui\n```\n\n`harbor dev --tui` boots the dev Runtime, waits for readiness, mints the dev\ntoken in memory, and attaches the native TUI over authenticated loopback\nREST\u002FSSE. The TUI stays a pure Protocol client (no Runtime handle). Quitting the\nTUI drains the owned Runtime and restores the terminal. Hot-reload is disabled\nin this mode; use the two-process flow below (§1–§2) when you want the fsnotify\nwatcher, or to attach a TUI to a Runtime running elsewhere.\n\n## 1. Start a Runtime\n\n```bash\nharbor dev\n```\n\nCopy the `HARBOR_DEV_TOKEN` printed to stderr. The token is bound to its full\ntenant\u002Fuser\u002Fsession identity and expires; the TUI never extends it.\n\n## 2. Attach\n\n```bash\nexport HARBOR_TOKEN='\u003CHARBOR_DEV_TOKEN>'\nharbor tui --attach http:\u002F\u002F127.0.0.1:18080\n```\n\nTo select a session explicitly:\n\n```bash\nharbor tui --attach http:\u002F\u002F127.0.0.1:18080 --session dev\n```\n\nOne terminal has exactly one committed active session. Switching resolves the\ntarget credential, opens a provisional target stream, hydrates under an overlap\nfence, reconciles buffered frames, and then cancels and joins the old reader\nbefore committing the target generation.\n\n### Co-launch from `harbor serve --tui`\n\nThe attach flow above requires a separately-started Runtime. For a production\nserver (JWKS-verified JWT, no dev token), `harbor serve --tui` co-launches the\nTUI from the serve binary itself — one process, one terminal:\n\n```bash\n# The operator supplies the JWT (HARBOR_TOKEN or ~\u002F.harbor\u002Ftoken).\n# serve verifies it against identity.jwks_url \u002F jwks_file.\nexport HARBOR_TOKEN='\u003Cyour-signed-jwt>'\nharbor serve --config serve.yaml --bind 127.0.0.1:0 --tui\n```\n\nThe serve binary boots the Runtime, waits for the listener to bind\n(`WaitReady`), then attaches the TUI through authenticated REST\u002FSSE — the same\nProtocol-only path as `harbor tui --attach`. The TUI receives no Runtime\nhandle. Quitting the TUI drains the owned server (co-launch quit drains;\nattach quit leaves the remote alive). Runtime logs go to a captured sink so\nBubble Tea frames are never overwritten; on server failure the terminal is\nrestored before the captured log is printed.\n\nA scaffolded serving binary (`harbor scaffold --with-server --with-tui`) gains\nthe same `--tui` flag — the generated `cmd\u002F\u003Cname>\u002Fmain.go` calls `sdk\u002Fserver`\nand `sdk\u002Ftui` after `WaitReady`. See\n[`scaffold-a-harbor-agent`](..\u002Fscaffold-a-harbor-agent\u002FSKILL.md) §6.\n\n## 3. Rotate credentials\n\nThe default token file is `~\u002F.harbor\u002Ftoken`. It may contain one JWT or a JSON\nobject keyed by `tenant\u002Fuser\u002Fsession` for authorized session switching:\n\n```json\n{\n  \"dev\u002Fdev\u002Fsession-a\": \"\u003CJWT A>\",\n  \"dev\u002Fdev\u002Fsession-b\": \"\u003CJWT B>\"\n}\n```\n\nThe file is read before every REST request and SSE connection\u002Freconnect, so an\natomic replacement takes effect without restarting the TUI. Expired or\nwrong-session credentials are shown as authentication failures; the draft,\nsession reference, and replay cursor stay local, but no request is presented as\naccepted.\n\nUse `--token-file \u003Cpath>` to select another rotating file. Signed JWTs are never\nwritten into TUI state. `Ctrl+X I` probes a replacement credential against the\ncomplete authenticated attach join before committing it in memory; enter\n`clear` to remove the in-memory override and resume the rotating file.\n\n## 4. Conversation keys\n\n+ `Enter`: submit the current turn.\n+ `Alt+Enter` or `Shift+Enter`: insert a newline.\n+ `Ctrl+A` \u002F `Ctrl+E`: line start\u002Fend; `Ctrl+B` \u002F `Ctrl+F`: move left\u002Fright.\n+ `Ctrl+_` \u002F `Alt+_`: undo\u002Fredo.\n+ Scroll the conversation with the mouse wheel (alternate-scroll — the mouse is\n  never captured, so native text selection keeps working) or with arrows while\n  the composer is empty; `PageUp` \u002F `PageDown` page, `Home` \u002F `End` jump to the\n  top \u002F newest output (End re-engages tail-following). While scrolled away, new\n  output never moves your view. Prompt history stays on `ctrl+↑` \u002F `ctrl+↓`\n  (plain arrows still browse history while a draft is present or the\n  conversation fits on screen).\n+ `Alt+J` \u002F `Alt+K`: next\u002Fprevious semantic transcript block.\n+ `Esc` while a turn runs: press once to arm (`press esc again to interrupt`),\n  twice to cancel the in-flight run. With the autocomplete popup open or a\n  `Ctrl+X` chord pending, `Esc` dismisses those first — it never cancels a run\n  by accident.\n+ `Ctrl+X F`: filter\u002Fsearch transcript blocks (matches conversation content\n  only). Closing search — `Enter` or `Esc` — always clears the filter; `Enter`\n  keeps you parked on the reached match. `Ctrl+X X`: export Markdown (on the\n  events route the export is the visible events as JSON).\n+ `Ctrl+X Y`: timestamps (the preference persists across launches).\n+ `Ctrl+X B` \u002F `Ctrl+X P`: stash\u002Frestore the local draft.\n+ `Ctrl+X A`: upload `path|disposition`; `Ctrl+X E` removes and `Ctrl+X U` retries.\n+ `Ctrl+X R` \u002F `Ctrl+X O`: expand or collapse all reasoning \u002F tool detail\n  (collapsed by default); `Ctrl+X M`: reduced motion.\n+ `Ctrl+P`: command palette; `Ctrl+X S`: context sidebar.\n+ `\u002Fquit`, `Ctrl+C`, or `Ctrl+D`: persist interaction state, restore the terminal, and exit. A plain `q` remains composer text. `Ctrl+C` quits unconditionally from every input mode — search, filters, dialogs, mid-run; `Ctrl+D` quits everywhere except under a dialog that binds it (the Sessions picker uses it for delete).\n\nAutocomplete is capped at ten rows and executes reachable slash commands; its\nstructured references contain actual canonical IDs such as `@session:\u003Cid>`,\n`@task:\u003Cid>`, `@artifact:\u003Cid>`, and `@tool:\u003Cname>`. A `\u002Fcommand` draft is\nalways an instruction to the TUI, never chat: selecting a command with `Enter`\nruns it, `Tab` completes it into the draft and the next `Enter` still runs it,\nan unknown `\u002Fname` toasts `Unknown command` and keeps the draft, and arguments\nafter a command name are rejected explicitly. A slash mid-sentence stays\nordinary prose. Attachments retain their upload lifecycle and optional Runtime\ndisposition hint; a failed or uploading attachment disables submit with a\nreason.\n\nFree-text dialogs (rename, attach path, credential, action input) caption what\nthe value is, validate before committing (failures render inline in the\ndialog), and the credential dialog masks its echo — the token never renders in\ncleartext.\n\nWhile a task is active, another submitted turn is visibly queued as local-only\nintent. `Ctrl+X J` retries a failed follow-up and resumes ordered dispatch;\n`Ctrl+X K` discards the newest queued or failed follow-up. The TUI dispatches in\norder after the active task becomes terminal and never clears a draft or labels\ntext accepted before canonical `start` succeeds.\n\nBackground work wakes the conversation. When a background task you launched\nfinishes, or a parallel task group resolves, a single muted line lands inline\nin the transcript — for example `·  Background task \u003Cid> completed` or\n`·  Background group resolved: 2 of 3 succeeded, 1 failed`. It is one quiet\nlifecycle line, never a per-member flood and never a card; the full detail\nstays on the Tasks route. A background task that *fails* wakes the same way\n(`·  Task \u003Cid> failed …`). A parallel group that gets **cancelled without you\nasking** — a fail-fast gate firing on a member failure, or a cascade from an\nancestor cancel — wakes too (`·  Background group cancelled (fail-fast): 2\ncancelled of 3, 1 failed`), so a batch's cancelled losers no longer vanish\nsilently while its winners announce themselves. A group *you* cancelled\nyourself is not echoed back — you already know, so that muted line only ever\nappears for the unprompted cancels. These wake lines are the only runtime-lifecycle\nnotices that belong on the chat surface — audit, cost, and planner internals\nstay on the events and diagnostics routes.\n\nWhen your *foreground* turn fails, the composer no longer just returns to idle:\na status line pins `×  Turn failed · \u003CErrorCode>` above the composer with the\nbounded error code (never the raw error text — open the Tasks\u002Fdiagnostics route\nfor the message and trajectory). The line clears the moment you submit the next\nturn. A foreground failure never also shows the muted background-failure line —\nthe turn-failure line owns it.\n\n## 5. Session lifecycle\n\nThe last session reference and bounded interaction state are restored from\n`~\u002F.harbor\u002Ftui-state.json`, keyed by the full identity and Runtime instance\u002Fwire\nfingerprint. The file contains drafts and view preferences only, never Runtime\nrows, transcript content, or credentials.\n\n+ A closed durable session reopens on the next ordinary turn through canonical\n  `start`; wait for `session.reopened` before treating it as running.\n+ An erased session is terminal. Choose Start Fresh; ordinary attach\u002Freconnect\n  never retries the erased ID.\n+ Replay gaps, retention truncation, partial counters, disconnects, and partial\n  blocks remain visibly labelled.\n\nThe TUI owns the whole terminal on the alternate screen: a persistent banner\nat the top (product, version, model, session, attach URL), the conversation\nflowing top-down beneath it, and the composer pinned at the bottom. The\nruntime-context sidebar is opt-in (`Ctrl+X S`) so the conversation keeps the\nfull width — and clean native selection — until asked. Quitting restores the\nterminal exactly as it was. The `--compact` flag is deprecated\nand has no effect.\n\nSession commands are keyboard-driven: `Ctrl+X L` searches\u002Fswitches, `Ctrl+X N`\nstarts fresh, `Ctrl+R` renames, and `Ctrl+X D` confirms canonical erasure.\nStart Fresh is instant — it mints a short random session id and attaches, no\ndialog. Under `harbor dev --tui` the dev server signs per-session credentials\nin-process so fresh sessions authenticate immediately; a standalone\n`harbor tui --token-file` attach holds only the credentials in the file, so\nStart Fresh there fails honestly. A failed switch is always non-destructive:\nthe previous session stays live and the toast reads `Switch failed · still on\n\u003Csession>`. Closed\u002Ffailed picker rows say that the next canonical turn resumes\nthem. Missing Runtime capabilities or JWT scope disable the command with the\nexact reason.\n\nTheme (`Ctrl+X T`) offers Dark, Light, and Auto. Picking Dark or Light is an\nexplicit choice: it persists and terminal-background auto-detection never\noverrides it. Auto releases the choice and follows the terminal.\n\n## 6. Runtime inspection and control\n\nThe TUI remains a one-active-session surface. Runtime views never fan out into\nfleet or simultaneous-session panes:\n\n+ `F2`: task lifecycle, parent\u002Fchild tree, progress, groups, activity latency,\n  result\u002Ftrajectory posture, and explicitly non-authoritative task cost.\n+ `F3`: tool transport, schema, OAuth, approval, reliability, bounded metrics,\n  and heavy-content posture. Rich rows require `tool_annotations`; analytics\n  are labelled best-effort because the bounded scan has no completeness field.\n+ `F4`: artifact metadata and references. Heavy bytes are never rendered\n  inline; preview depends on canonical `artifacts.get_ref` support.\n+ `F5`: live\u002Fretained event diagnostics and aggregates, with truncation and\n  reconnect state visible.\n+ `F6`: Runtime health, drivers, capabilities, identity, Protocol compatibility,\n  retention, governance, LLM, metrics, and stream posture.\n+ `F7`: the unified intervention queue, correlated by opaque `PauseToken` even\n  when multiple interventions share one run.\n+ `F8`: capability, retention, partiality, and typed Protocol failures.\n+ `F9`: the one action matrix for task, intervention, tool, artifact, and\n  session controls.\n\nRetention inspection uses `runtime.retention` only when the token has verified\n`admin` authority. Other callers, including the trust-mode dev TUI, show only\nthe events horizon from `runtime.health`; `console:fleet` alone does not grant\nruntime-wide task\u002Fsession retention reads (D-490).\n\nOn list routes, `Up` \u002F `Down` or `Ctrl+P` \u002F `Ctrl+N` selects the exact row,\n`PageUp` \u002F `PageDown` changes the bounded page, and `\u002F` edits the route filter.\nThe selected canonical ID or `PauseToken` is frozen into the confirmation; a\ngeneration, identity, or inspection-epoch change closes stale action dialogs.\n\nEvery action row names its canonical method, required authority, target, and\nconfirmation posture. Cancel, reject, OAuth revoke, artifact deletion, and\nsession erasure require explicit destructive confirmation showing the active\nidentity target. A successful control response means accepted for delivery;\nthe TUI keeps a pending marker until `control.applied`, `control.rejected`, and\nthe resulting task\u002Fpause snapshot reconcile. HTTP 401, 403, 404, 409, and 501\nremain visible with their canonical Protocol codes without changing a live\ntransport to disconnected. JWT authority is server-enforced and shown as\nunknown until the server accepts or rejects the operation; capability\nadvertisement is not presented as proof of authorization. Disabled actions\nstay in the matrix with an exact capability, lifecycle, or target reason.\n\nAvailable task controls are canonical `cancel`, `pause`, `resume`, `redirect`,\n`inject_context`, `user_message`, and `prioritize`. Steering works straight\nfrom the conversation surface: while a turn runs, `F9` targets the active run\nimplicitly — no tasks-route selection needed (an explicit tasks-route\nselection still takes precedence). Interventions use only\n`approve`, `reject`, or `resume` with the selected `PauseToken`; OAuth and input\nrequirements never bypass the unified pause primitive. There is no direct tool\ninvoke command, model picker, fleet control, or speculative method.\n\n## Common failures\n\n+ **Authentication expired:** atomically replace the token file, or press\n  `Ctrl+X I` and paste a replacement JWT held in process memory only.\n+ **Target session credential unavailable:** add the exact\n  `tenant\u002Fuser\u002Fsession` entry to the token-file JSON map.\n+ **Malformed or unreadable local state:** fix or remove the named state file.\n  Harbor fails loudly rather than silently discarding drafts\u002Fpreferences.\n+ **Replay gap:** keep reading the visible partial output while the client\n  performs an authoritative snapshot reconciliation.\n\n## See also\n\n+ [`run-the-dev-loop`](..\u002Frun-the-dev-loop\u002FSKILL.md) for starting the Runtime.\n+ [`use-the-harbor-protocol`](..\u002Fuse-the-harbor-protocol\u002FSKILL.md) for building\n  another REST\u002FSSE client.\n+ [`observe-with-the-console`](..\u002Fobserve-with-the-console\u002FSKILL.md) for the\n  browser control plane.\n","# Drive the Harbor TUI\n\n`harbor tui` is an attach-only Harbor Protocol client. It does not start or own\nthe Runtime, import Runtime internals, call a private endpoint, or depend on the\nConsole.\n\n## 0. One command (local dev)\n\nFor the local agent-development loop, co-launch the Runtime and the TUI in a\nsingle process and terminal with the ephemeral dev token — zero config, no\ntoken copy:\n\n```bash\nharbor dev --tui\n```\n\n`harbor dev --tui` boots the dev Runtime, waits for readiness, mints the dev\ntoken in memory, and attaches the native TUI over authenticated loopback\nREST\u002FSSE. The TUI stays a pure Protocol client (no Runtime handle). Quitting the\nTUI drains the owned Runtime and restores the terminal. Hot-reload is disabled\nin this mode; use the two-process flow below (§1–§2) when you want the fsnotify\nwatcher, or to attach a TUI to a Runtime running elsewhere.\n\n## 1. Start a Runtime\n\n```bash\nharbor dev\n```\n\nCopy the `HARBOR_DEV_TOKEN` printed to stderr. The token is bound to its full\ntenant\u002Fuser\u002Fsession identity and expires; the TUI never extends it.\n\n## 2. Attach\n\n```bash\nexport HARBOR_TOKEN='\u003CHARBOR_DEV_TOKEN>'\nharbor tui --attach http:\u002F\u002F127.0.0.1:18080\n```\n\nTo select a session explicitly:\n\n```bash\nharbor tui --attach http:\u002F\u002F127.0.0.1:18080 --session dev\n```\n\nOne terminal has exactly one committed active session. Switching resolves the\ntarget credential, opens a provisional target stream, hydrates under an overlap\nfence, reconciles buffered frames, and then cancels and joins the old reader\nbefore committing the target generation.\n\n### Co-launch from `harbor serve --tui`\n\nThe attach flow above requires a separately-started Runtime. For a production\nserver (JWKS-verified JWT, no dev token), `harbor serve --tui` co-launches the\nTUI from the serve binary itself — one process, one terminal:\n\n```bash\n# The operator supplies the JWT (HARBOR_TOKEN or ~\u002F.harbor\u002Ftoken).\n# serve verifies it against identity.jwks_url \u002F jwks_file.\nexport HARBOR_TOKEN='\u003Cyour-signed-jwt>'\nharbor serve --config serve.yaml --bind 127.0.0.1:0 --tui\n```\n\nThe serve binary boots the Runtime, waits for the listener to bind\n(`WaitReady`), then attaches the TUI through authenticated REST\u002FSSE — the same\nProtocol-only path as `harbor tui --attach`. The TUI receives no Runtime\nhandle. Quitting the TUI drains the owned server (co-launch quit drains;\nattach quit leaves the remote alive). Runtime logs go to a captured sink so\nBubble Tea frames are never overwritten; on server failure the terminal is\nrestored before the captured log is printed.\n\nA scaffolded serving binary (`harbor scaffold --with-server --with-tui`) gains\nthe same `--tui` flag — the generated `cmd\u002F\u003Cname>\u002Fmain.go` calls `sdk\u002Fserver`\nand `sdk\u002Ftui` after `WaitReady`. See\n[`scaffold-a-harbor-agent`](..\u002Fscaffold-a-harbor-agent\u002FSKILL.md) §6.\n\n## 3. Rotate credentials\n\nThe default token file is `~\u002F.harbor\u002Ftoken`. It may contain one JWT or a JSON\nobject keyed by `tenant\u002Fuser\u002Fsession` for authorized session switching:\n\n```json\n{\n  \"dev\u002Fdev\u002Fsession-a\": \"\u003CJWT A>\",\n  \"dev\u002Fdev\u002Fsession-b\": \"\u003CJWT B>\"\n}\n```\n\nThe file is read before every REST request and SSE connection\u002Freconnect, so an\natomic replacement takes effect without restarting the TUI. Expired or\nwrong-session credentials are shown as authentication failures; the draft,\nsession reference, and replay cursor stay local, but no request is presented as\naccepted.\n\nUse `--token-file \u003Cpath>` to select another rotating file. Signed JWTs are never\nwritten into TUI state. `Ctrl+X I` probes a replacement credential against the\ncomplete authenticated attach join before committing it in memory; enter\n`clear` to remove the in-memory override and resume the rotating file.\n\n## 4. Conversation keys\n\n+ `Enter`: submit the current turn.\n+ `Alt+Enter` or `Shift+Enter`: insert a newline.\n+ `Ctrl+A` \u002F `Ctrl+E`: line start\u002Fend; `Ctrl+B` \u002F `Ctrl+F`: move left\u002Fright.\n+ `Ctrl+_` \u002F `Alt+_`: undo\u002Fredo.\n+ Scroll the conversation with the mouse wheel (alternate-scroll — the mouse is\n  never captured, so native text selection keeps working) or with arrows while\n  the composer is empty; `PageUp` \u002F `PageDown` page, `Home` \u002F `End` jump to the\n  top \u002F newest output (End re-engages tail-following). While scrolled away, new\n  output never moves your view. Prompt history stays on `ctrl+↑` \u002F `ctrl+↓`\n  (plain arrows still browse history while a draft is present or the\n  conversation fits on screen).\n+ `Alt+J` \u002F `Alt+K`: next\u002Fprevious semantic transcript block.\n+ `Esc` while a turn runs: press once to arm (`press esc again to interrupt`),\n  twice to cancel the in-flight run. With the autocomplete popup open or a\n  `Ctrl+X` chord pending, `Esc` dismisses those first — it never cancels a run\n  by accident.\n+ `Ctrl+X F`: filter\u002Fsearch transcript blocks (matches conversation content\n  only). Closing search — `Enter` or `Esc` — always clears the filter; `Enter`\n  keeps you parked on the reached match. `Ctrl+X X`: export Markdown (on the\n  events route the export is the visible events as JSON).\n+ `Ctrl+X Y`: timestamps (the preference persists across launches).\n+ `Ctrl+X B` \u002F `Ctrl+X P`: stash\u002Frestore the local draft.\n+ `Ctrl+X A`: upload `path|disposition`; `Ctrl+X E` removes and `Ctrl+X U` retries.\n+ `Ctrl+X R` \u002F `Ctrl+X O`: expand or collapse all reasoning \u002F tool detail\n  (collapsed by default); `Ctrl+X M`: reduced motion.\n+ `Ctrl+P`: command palette; `Ctrl+X S`: context sidebar.\n+ `\u002Fquit`, `Ctrl+C`, or `Ctrl+D`: persist interaction state, restore the terminal, and exit. A plain `q` remains composer text. `Ctrl+C` quits unconditionally from every input mode — search, filters, dialogs, mid-run; `Ctrl+D` quits everywhere except under a dialog that binds it (the Sessions picker uses it for delete).\n\nAutocomplete is capped at ten rows and executes reachable slash commands; its\nstructured references contain actual canonical IDs such as `@session:\u003Cid>`,\n`@task:\u003Cid>`, `@artifact:\u003Cid>`, and `@tool:\u003Cname>`. A `\u002Fcommand` draft is\nalways an instruction to the TUI, never chat: selecting a command with `Enter`\nruns it, `Tab` completes it into the draft and the next `Enter` still runs it,\nan unknown `\u002Fname` toasts `Unknown command` and keeps the draft, and arguments\nafter a command name are rejected explicitly. A slash mid-sentence stays\nordinary prose. Attachments retain their upload lifecycle and optional Runtime\ndisposition hint; a failed or uploading attachment disables submit with a\nreason.\n\nFree-text dialogs (rename, attach path, credential, action input) caption what\nthe value is, validate before committing (failures render inline in the\ndialog), and the credential dialog masks its echo — the token never renders in\ncleartext.\n\nWhile a task is active, another submitted turn is visibly queued as local-only\nintent. `Ctrl+X J` retries a failed follow-up and resumes ordered dispatch;\n`Ctrl+X K` discards the newest queued or failed follow-up. The TUI dispatches in\norder after the active task becomes terminal and never clears a draft or labels\ntext accepted before canonical `start` succeeds.\n\nBackground work wakes the conversation. When a background task you launched\nfinishes, or a parallel task group resolves, a single muted line lands inline\nin the transcript — for example `·  Background task \u003Cid> completed` or\n`·  Background group resolved: 2 of 3 succeeded, 1 failed`. It is one quiet\nlifecycle line, never a per-member flood and never a card; the full detail\nstays on the Tasks route. A background task that *fails* wakes the same way\n(`·  Task \u003Cid> failed …`). A parallel group that gets **cancelled without you\nasking** — a fail-fast gate firing on a member failure, or a cascade from an\nancestor cancel — wakes too (`·  Background group cancelled (fail-fast): 2\ncancelled of 3, 1 failed`), so a batch's cancelled losers no longer vanish\nsilently while its winners announce themselves. A group *you* cancelled\nyourself is not echoed back — you already know, so that muted line only ever\nappears for the unprompted cancels. These wake lines are the only runtime-lifecycle\nnotices that belong on the chat surface — audit, cost, and planner internals\nstay on the events and diagnostics routes.\n\nWhen your *foreground* turn fails, the composer no longer just returns to idle:\na status line pins `×  Turn failed · \u003CErrorCode>` above the composer with the\nbounded error code (never the raw error text — open the Tasks\u002Fdiagnostics route\nfor the message and trajectory). The line clears the moment you submit the next\nturn. A foreground failure never also shows the muted background-failure line —\nthe turn-failure line owns it.\n\n## 5. Session lifecycle\n\nThe last session reference and bounded interaction state are restored from\n`~\u002F.harbor\u002Ftui-state.json`, keyed by the full identity and Runtime instance\u002Fwire\nfingerprint. The file contains drafts and view preferences only, never Runtime\nrows, transcript content, or credentials.\n\n+ A closed durable session reopens on the next ordinary turn through canonical\n  `start`; wait for `session.reopened` before treating it as running.\n+ An erased session is terminal. Choose Start Fresh; ordinary attach\u002Freconnect\n  never retries the erased ID.\n+ Replay gaps, retention truncation, partial counters, disconnects, and partial\n  blocks remain visibly labelled.\n\nThe TUI owns the whole terminal on the alternate screen: a persistent banner\nat the top (product, version, model, session, attach URL), the conversation\nflowing top-down beneath it, and the composer pinned at the bottom. The\nruntime-context sidebar is opt-in (`Ctrl+X S`) so the conversation keeps the\nfull width — and clean native selection — until asked. Quitting restores the\nterminal exactly as it was. The `--compact` flag is deprecated\nand has no effect.\n\nSession commands are keyboard-driven: `Ctrl+X L` searches\u002Fswitches, `Ctrl+X N`\nstarts fresh, `Ctrl+R` renames, and `Ctrl+X D` confirms canonical erasure.\nStart Fresh is instant — it mints a short random session id and attaches, no\ndialog. Under `harbor dev --tui` the dev server signs per-session credentials\nin-process so fresh sessions authenticate immediately; a standalone\n`harbor tui --token-file` attach holds only the credentials in the file, so\nStart Fresh there fails honestly. A failed switch is always non-destructive:\nthe previous session stays live and the toast reads `Switch failed · still on\n\u003Csession>`. Closed\u002Ffailed picker rows say that the next canonical turn resumes\nthem. Missing Runtime capabilities or JWT scope disable the command with the\nexact reason.\n\nTheme (`Ctrl+X T`) offers Dark, Light, and Auto. Picking Dark or Light is an\nexplicit choice: it persists and terminal-background auto-detection never\noverrides it. Auto releases the choice and follows the terminal.\n\n## 6. Runtime inspection and control\n\nThe TUI remains a one-active-session surface. Runtime views never fan out into\nfleet or simultaneous-session panes:\n\n+ `F2`: task lifecycle, parent\u002Fchild tree, progress, groups, activity latency,\n  result\u002Ftrajectory posture, and explicitly non-authoritative task cost.\n+ `F3`: tool transport, schema, OAuth, approval, reliability, bounded metrics,\n  and heavy-content posture. Rich rows require `tool_annotations`; analytics\n  are labelled best-effort because the bounded scan has no completeness field.\n+ `F4`: artifact metadata and references. Heavy bytes are never rendered\n  inline; preview depends on canonical `artifacts.get_ref` support.\n+ `F5`: live\u002Fretained event diagnostics and aggregates, with truncation and\n  reconnect state visible.\n+ `F6`: Runtime health, drivers, capabilities, identity, Protocol compatibility,\n  retention, governance, LLM, metrics, and stream posture.\n+ `F7`: the unified intervention queue, correlated by opaque `PauseToken` even\n  when multiple interventions share one run.\n+ `F8`: capability, retention, partiality, and typed Protocol failures.\n+ `F9`: the one action matrix for task, intervention, tool, artifact, and\n  session controls.\n\nRetention inspection uses `runtime.retention` only when the token has verified\n`admin` authority. Other callers, including the trust-mode dev TUI, show only\nthe events horizon from `runtime.health`; `console:fleet` alone does not grant\nruntime-wide task\u002Fsession retention reads (D-490).\n\nOn list routes, `Up` \u002F `Down` or `Ctrl+P` \u002F `Ctrl+N` selects the exact row,\n`PageUp` \u002F `PageDown` changes the bounded page, and `\u002F` edits the route filter.\nThe selected canonical ID or `PauseToken` is frozen into the confirmation; a\ngeneration, identity, or inspection-epoch change closes stale action dialogs.\n\nEvery action row names its canonical method, required authority, target, and\nconfirmation posture. Cancel, reject, OAuth revoke, artifact deletion, and\nsession erasure require explicit destructive confirmation showing the active\nidentity target. A successful control response means accepted for delivery;\nthe TUI keeps a pending marker until `control.applied`, `control.rejected`, and\nthe resulting task\u002Fpause snapshot reconcile. HTTP 401, 403, 404, 409, and 501\nremain visible with their canonical Protocol codes without changing a live\ntransport to disconnected. JWT authority is server-enforced and shown as\nunknown until the server accepts or rejects the operation; capability\nadvertisement is not presented as proof of authorization. Disabled actions\nstay in the matrix with an exact capability, lifecycle, or target reason.\n\nAvailable task controls are canonical `cancel`, `pause`, `resume`, `redirect`,\n`inject_context`, `user_message`, and `prioritize`. Steering works straight\nfrom the conversation surface: while a turn runs, `F9` targets the active run\nimplicitly — no tasks-route selection needed (an explicit tasks-route\nselection still takes precedence). Interventions use only\n`approve`, `reject`, or `resume` with the selected `PauseToken`; OAuth and input\nrequirements never bypass the unified pause primitive. There is no direct tool\ninvoke command, model picker, fleet control, or speculative method.\n\n## Common failures\n\n+ **Authentication expired:** atomically replace the token file, or press\n  `Ctrl+X I` and paste a replacement JWT held in process memory only.\n+ **Target session credential unavailable:** add the exact\n  `tenant\u002Fuser\u002Fsession` entry to the token-file JSON map.\n+ **Malformed or unreadable local state:** fix or remove the named state file.\n  Harbor fails loudly rather than silently discarding drafts\u002Fpreferences.\n+ **Replay gap:** keep reading the visible partial output while the client\n  performs an authoritative snapshot reconciliation.\n\n## See also\n\n+ [`run-the-dev-loop`](..\u002Frun-the-dev-loop\u002FSKILL.md) for starting the Runtime.\n+ [`use-the-harbor-protocol`](..\u002Fuse-the-harbor-protocol\u002FSKILL.md) for building\n  another REST\u002FSSE client.\n+ [`observe-with-the-console`](..\u002Fobserve-with-the-console\u002FSKILL.md) for the\n  browser control plane.\n",{"name":5,"license":15,"metadata":24,"description":7},{"verbs":25,"surface":26,"framework":27},"tui, serve","cli","harbor","main","7de2201d2ff639d1227fb0624684b328d943eea9","docs\u002Fskills\u002Fdrive-the-harbor-tui",1,"https:\u002F\u002Fgithub.com\u002Fhurtener\u002FHarbor","https:\u002F\u002Fgithub.com\u002Fhurtener","2026-11-15 04:22:13",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add hurtener\u002FHarbor --skill drive-the-harbor-tui",{"tool":41,"command":42},"bunx","bunx skills add hurtener\u002FHarbor --skill drive-the-harbor-tui",{"tool":44,"command":45},"pnpm","pnpm dlx skills add hurtener\u002FHarbor --skill drive-the-harbor-tui","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fhurtener\u002FHarbor\u002Fblob\u002Fmain\u002Fdocs\u002Fskills\u002Fdrive-the-harbor-tui\u002FSKILL.md",true,[],[50,57,64,71,78,85],{"skillNo":51,"name":52,"nameZh":6,"description":53,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":54,"categories":55,"keywords":56,"publishedAt":19},"01M723EVVMQQH8MFVBKTYMTW22","wire-the-llm-provider","Pick a real LLM provider and wire it through Bifrost — OpenRouter \u002F Anthropic \u002F OpenAI \u002F Azure \u002F NVIDIA NIM \u002F OpenAI-compatible endpoints. Use when configuring the `llm:` block beyond the scaffold default, swapping models, setting model_profiles, or using the dev-only mock escape hatch.","https:\u002F\u002Fgithub.com\u002Fhurtener\u002FHarbor\u002Fblob\u002Fmain\u002Fdocs\u002Fskills\u002Fwire-the-llm-provider\u002FSKILL.md",[],[],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":19},"01M723ESCAV3DX4FSWHB9QRXDT","validate-and-package","Run `harbor validate` + `make preflight` + the per-phase smoke gates before shipping an agent. Use when packaging an agent for a non-dev environment — production deploy, share with a teammate, hand off to CI, or ship a release tag.","https:\u002F\u002Fgithub.com\u002Fhurtener\u002FHarbor\u002Fblob\u002Fmain\u002Fdocs\u002Fskills\u002Fvalidate-and-package\u002FSKILL.md",[],[],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":19},"01M723E99VBZ6D9XCG10RPJMM1","scaffold-a-harbor-agent","Scaffold a new Harbor agent project with `harbor init` + `harbor scaffold`. Use when starting a fresh agent from zero — drops a tiered, commented `harbor.yaml`, the companion AGENTS.md \u002F CLAUDE.md \u002F README.md, and materialises the Go project so `harbor dev` boots a working runtime in under five minutes.","https:\u002F\u002Fgithub.com\u002Fhurtener\u002FHarbor\u002Fblob\u002Fmain\u002Fdocs\u002Fskills\u002Fscaffold-a-harbor-agent\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M723E52YP0JSH9R22APN4T5M","run-the-dev-loop","Use `harbor dev` + `harbor console` to run an agent locally with the Console attached. Use when iterating on a Harbor project — single-process or multi-process attach posture, the `HARBOR_DEV_TOKEN` handshake, hot reload on yaml changes, and which posture to pick when.","https:\u002F\u002Fgithub.com\u002Fhurtener\u002FHarbor\u002Fblob\u002Fmain\u002Fdocs\u002Fskills\u002Frun-the-dev-loop\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M723E1M9CF4V7ZMHAMA3GY2Y","observe-with-the-console","Tour the Console's observability pages — Overview, Live Runtime, Observability, Sessions, Tasks, Agents, Tools, Events, Background Jobs, Playground, Flows, Memory, MCP Connections, Artifacts, Settings. Use when debugging an agent's behavior, hunting a regression, or building intuition for what the runtime is actually doing under the hood.","https:\u002F\u002Fgithub.com\u002Fhurtener\u002FHarbor\u002Fblob\u002Fmain\u002Fdocs\u002Fskills\u002Fobserve-with-the-console\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M723DXYEMV4VWKM7A65BHR5E","drive-the-playground","Use the Console's Playground page to chat against your agent, attach files (images \u002F PDFs \u002F audio), and steer or queue input during a run. Use when validating the agent end-to-end interactively, the foreground\u002Fbackground task posture, image-vs-PDF MIME dispatch, and the playground's steering UI.","https:\u002F\u002Fgithub.com\u002Fhurtener\u002FHarbor\u002Fblob\u002Fmain\u002Fdocs\u002Fskills\u002Fdrive-the-playground\u002FSKILL.md",[],[]]