[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-2924":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":8,"language":10,"languages":8,"totalLinesOfCode":8,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":12,"stars30d":17,"stars90d":15,"forks30d":15,"starsTrendScore":18,"compositeScore":19,"rankGlobal":8,"rankLanguage":8,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":23,"hasPages":21,"topics":24,"createdAt":8,"pushedAt":8,"updatedAt":25,"readmeContent":26,"aiSummary":27,"trendingCount":15,"starSnapshotCount":15,"syncStatus":14,"lastSyncTime":28,"discoverSource":29},2924,"sub-agent-statusline","Joaquinvesapa\u002Fsub-agent-statusline","Joaquinvesapa",null,"https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fopencode-subagent-statusline","TypeScript",155,19,3,2,0,11,39,33,3.9,"MIT License",false,"main",true,[],"2026-06-12 02:00:44","# opencode-subagent-statusline\n\n![Subagents Monitor banner](https:\u002F\u002Fraw.githubusercontent.com\u002FJoaquinvesapa\u002Fsub-agent-statusline\u002Fmain\u002Fassets\u002Fsubagents_monitor_banner.webp)\n\n**Subagent Monitor for OpenCode.**\n\nSee what your subagents are doing without losing track of them: running, done, failed, elapsed time, and token\u002Fcontext usage when OpenCode exposes it.\n\nThis package works as a **TUI sidebar plugin** for OpenCode.\n\n---\n\n## Why?\n\nWhen you delegate work to subagents, they can disappear into the background. That is powerful, but it also makes it easy to lose visibility:\n\n- Is the review agent still running?\n- Did the test agent finish?\n- Which child session failed?\n- How much context did a subagent use?\n\n`opencode-subagent-statusline` adds a compact **Subagent Monitor** inside OpenCode so you can keep that information visible while you work.\n\n---\n\n## Screenshot\n\n![Subagent Monitor inside OpenCode](https:\u002F\u002Fraw.githubusercontent.com\u002FJoaquinvesapa\u002Fsub-agent-statusline\u002Fmain\u002Fassets\u002Fopencode_full.webp)\n\nFocused sidebar view:\n\n![Subagent Monitor sidebar](https:\u002F\u002Fraw.githubusercontent.com\u002FJoaquinvesapa\u002Fsub-agent-statusline\u002Fmain\u002Fassets\u002Fopencode_sidebar.webp)\n\n---\n\n## Install\n\nAdd the plugin to your OpenCode TUI config:\n\n```json\n{\n  \"$schema\": \"https:\u002F\u002Fopencode.ai\u002Ftui.json\",\n  \"plugin\": [\"opencode-subagent-statusline\"]\n}\n```\n\nYour TUI config usually lives at:\n\n```txt\n~\u002F.config\u002Fopencode\u002Ftui.json\n```\n\nRestart OpenCode after editing the file.\n\n---\n\n## What you get\n\nThe TUI plugin adds a sidebar section that shows:\n\n- running subagents\n- completed subagents\n- failed subagents\n- elapsed time\n- token\u002Fcontext usage when available\n\nIt also adds a small home\u002Ffooter summary when there is active subagent activity.\n\n## Keyboard navigation\n\nRun `Subagents: Focus sidebar list` from the OpenCode command palette, or press\n`Alt+B`, to focus the subagent sidebar list without using the mouse. List\nnavigation shortcuts are handled only while the sidebar list is focused.\n\n| Shortcut           | Action                                                         |\n| ------------------ | -------------------------------------------------------------- |\n| `Alt+B`            | Toggle focus between the subagent sidebar list and the prompt. |\n| `j` \u002F `ArrowDown`  | Move selection to the next visible subagent.                   |\n| `k` \u002F `ArrowUp`    | Move selection to the previous visible subagent.               |\n| `Enter`            | Open the selected subagent session.                            |\n| `h` \u002F `ArrowLeft`  | Collapse the subagent section.                                 |\n| `l` \u002F `ArrowRight` | Expand the subagent section.                                   |\n| `Esc`              | Leave list focus mode and return to the prompt.                |\n\nOpening a selected session is a no-op when there is no visible or navigable\nsubagent.\n\nWhen a child session is opened from the sidebar, returning with OpenCode `Up`\n(`session_parent`) moves keyboard focus to the parent prompt so you can type\nimmediately.\n\n---\n\n## Documentation\n\nFor a deeper explanation of how the plugin works, see the structured docs:\n\n- [English documentation](docs\u002Fen\u002F00-index.md)\n- [Documentación en español](docs\u002Fes\u002F00-indice.md)\n\nThey cover installation, architecture, event flow, state\u002Fcounters, rendering,\nTUI behavior, advanced configuration, development\u002Ftesting, and troubleshooting.\n\n---\n\n## Local development\n\nInstall dependencies with lifecycle scripts disabled by default:\n\n```sh\npnpm install --ignore-scripts\n```\n\nBuild the plugin:\n\n```sh\npnpm build\n```\n\nTest the local TUI build by pointing OpenCode directly at `dist\u002Ftui.js`:\n\n```json\n{\n  \"$schema\": \"https:\u002F\u002Fopencode.ai\u002Ftui.json\",\n  \"plugin\": [\"\u002Fabsolute\u002Fpath\u002Fto\u002Fsub-agent-statusline\u002Fdist\u002Ftui.js\"]\n}\n```\n\n## Development notes\n\nThis project ships the OpenCode TUI sidebar plugin from `src\u002Ftui.tsx`.\n\nThe TUI bundle is built with `tsup` and `esbuild-plugin-solid` in Solid `universal` mode for OpenTUI compatibility.\n\nPackage entrypoints:\n\n```txt\nopencode-subagent-statusline          -> TUI plugin\nopencode-subagent-statusline\u002Ftui      -> TUI plugin\n```\n\nUseful commands:\n\n```sh\npnpm build\npnpm typecheck\npnpm test\npnpm test:watch\npnpm test:coverage\npnpm pack --dry-run\n```\n\n## Security hardening for maintainers\n\nRecommended local npm\u002Fpnpm hygiene, following guidance from Gentle AI and Liran Tal:\n\n- install project dependencies with lifecycle scripts disabled when possible, for example `pnpm install --ignore-scripts`;\n- consider setting user-level `ignore-scripts=true` for npm\u002Fpnpm and temporarily opt in only when a trusted package needs scripts;\n- enable dependency age\u002Fcooldown policies where supported, for example `npm config set min-release-age 3` or equivalent Renovate\u002FDependabot cooldowns;\n- block or review git, tarball, URL, and other exotic dependency specs, for example `npm config set allow-git none` where supported;\n- optionally screen new packages with tools such as `npq` or Socket Firewall before adding them.\n\nThese are maintainer\u002Fdeveloper controls, not runtime enforcement by this plugin.\n\nRelease maintainers should also keep npm trusted publishing\u002FOIDC enabled for this package, require npm 2FA on maintainer accounts, restrict and revoke legacy npm tokens once OIDC publishing is active, and protect the release branch in GitHub.\n\n## Testing\n\nAutomated tests use Vitest with `@vitest\u002Fcoverage-v8`:\n\n```sh\npnpm test\npnpm test:watch\npnpm test:coverage\npnpm typecheck\n```\n\nFor the testing strategy, file map, examples, and current TUI\u002Fe2e boundaries, see\n[`docs\u002Ftesting.md`](docs\u002Ftesting.md).\n\n---\n\n## Troubleshooting\n\n### The plugin does not show up\n\nCheck OpenCode logs:\n\n```sh\ngrep -n \"subagent-statusline\\|failed to load tui plugin\" ~\u002F.local\u002Fshare\u002Fopencode\u002Flog\u002F*.log\n```\n\nThen restart OpenCode after changing `tui.json`.\n\n### I installed a new version but OpenCode still behaves like the old one\n\nOpenCode may be using a cached package. Try clearing the cached package directory under:\n\n```txt\n~\u002F.cache\u002Fopencode\u002Fpackages\u002F\n```\n\nThen restart OpenCode.\n\n### Token\u002Fcontext usage is missing\n\nOpenCode event payloads can vary by version and by event type. The plugin shows token\u002Fcontext usage when it is available and safely omits it when it is not.\n\n## Local privacy and persistence\n\nThe plugin persists a local JSON state file and `status.txt` snapshot under `XDG_RUNTIME_DIR` or the system temp directory by default. Those files can include OpenCode-derived subagent titles and summaries, which may contain short fragments derived from prompts or task descriptions. Files are written best-effort with owner-only permissions and atomic temp-file replacement where Node and the host filesystem support them.\n\n`OPENCODE_SUBAGENT_STATUSLINE_STATE` overrides the state file path. Treat that environment variable as trusted local configuration because the plugin will write status data to the configured path.\n\nFor token\u002Fcontext backfill, the TUI reads recent local OpenCode SQLite\u002Flog data only from the user's OpenCode data directory. Very large log files are skipped to avoid blocking the TUI.\n\n---\n\n## License\n\nMIT\n","opencode-subagent-statusline 是一个用于 OpenCode 的 TUI 侧边栏插件，旨在帮助用户监控子代理的状态。其核心功能包括显示正在运行、已完成或失败的子代理状态，以及它们的运行时间、令牌\u002F上下文使用情况等信息。该插件采用 TypeScript 编写，并以紧凑的形式集成到 OpenCode 界面中，支持键盘快捷键操作，便于在不离开当前工作环境的情况下快速查看和管理子代理活动。适用于需要频繁使用子代理执行任务并希望实时掌握其运行状况的开发场景。","2026-06-11 02:51:44","CREATED_QUERY"]