Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add echoVic/blade-code --skill hono-server-api-and-streaminggit clone --depth 1 https://github.com/echoVic/blade-codeWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/echovic/blade-code/hono-server-api-and-streaming)<a href="https://agentmods.dev/skills/echovic/blade-code/hono-server-api-and-streaming"><img src="https://agentmods.dev/badge/skills/echovic/blade-code/hono-server-api-and-streaming/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/echovic/blade-code/hono-server-api-and-streaming"><img src="https://agentmods.dev/badge/skills/echovic/blade-code/hono-server-api-and-streaming.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00156 | $0.02220 |
| Opus 5.5 | $0.00062 | $0.00888 |
| Sonnet 5.5 | $0.00031 | $0.00444 |
| Haiku 4.5 | $0.00016 | $0.00222 |
Grade A, and why
knowledge-interaction-surfaces-hono-server-api-and-streaming scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 72 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Module Structure
Server 是 Web 与自动化客户端的协议适配层:它拥有活动 run、Runtime residency、SSE 订阅者和 Web Browser Session,但 durable transcript 与任务事实仍由 Session 服务持有。
Directory Layout
packages/cli/src/server/server.ts— Hono 装配、认证/CORS、静态资源和网络生命周期packages/cli/src/server/routes/session.ts— Session、run、消息、交互和 SSE 主控制器packages/cli/src/server/routes/task.ts— 顶层任务提交、重试、diff 与交付 APIpackages/cli/src/server/routes/events.ts— 跨 Session 的看板安全全局事件流packages/cli/src/server/routes/terminal.ts— Bun/Node WebSocket PTY 适配packages/cli/src/server/routes/— 配置、Provider、MCP、插件、Hooks 等管理 APIpackages/cli/src/server/OrderedSseEgress.ts— replay/live 原子切换与有界写入packages/cli/src/server/sessionRef.ts— Session 复合身份规范化packages/cli/src/server/WebBrowserSessionRegistry.ts— Web 专用 Browser Runtime 所有权
Key Entry Points
BladeServer.listenAsync()inpackages/cli/src/server/server.ts— 启动 Bun 或 Node 服务createSessionRouteController()inpackages/cli/src/server/routes/session.ts— 创建路由与 Runtime 管理器dispatchTask()onSessionRouteController— Web、定时任务共用的任务派发入口OrderedSseEgress.finishInitialization()inpackages/cli/src/server/OrderedSseEgress.ts— replay 到 live 的切换点resolveSessionRef()inpackages/cli/src/server/routes/session.ts— 解析精确 Session 所属工作区
Gotchas
sessionId不是 Server 内的完整身份;路由、活动 run、Runtime、锁和 Browser Registry 必须使用规范化的projectPath + sessionId,同名多工作区且未给路径时应返回 409 而不是猜测 (packages/cli/src/server/sessionRef.ts,packages/cli/src/server/routes/session.ts)- Session SSE 初始化必须先订阅 Bus 并缓冲 live,再写 connected、按 JSONL
seq回放、去重排序后切到 live;先回放再订阅会产生不可修复的事件空窗 (packages/cli/src/server/routes/session.ts,packages/cli/src/server/OrderedSseEgress.ts,git:121ea8fc) - 只有 committed event 能携带 SSE
id;ephemeral delta 在 replay 窗口直接丢弃,不能推进Last-Event-ID(packages/cli/src/server/bus.ts,packages/cli/src/server/OrderedSseEgress.ts) EventSource首次连接不能自定义Last-Event-IDheader,因此 Server 同时接受lastEventIdquery;删除 query 支持会破坏页面刷新后的 durable resume (packages/cli/src/server/routes/session.ts)- Session SSE 与
/events全局 SSE 不可互换:全局流只投影白名单化的看板字段,明确排除 prompt 和私有执行细节 (packages/cli/src/server/routes/events.ts) - 慢 SSE subscriber 的 overflow、写超时或 sequence regression 只终止该 subscriber,不能取消 server-owned Agent run 或影响其他订阅者 (
packages/cli/src/server/OrderedSseEgress.ts,docs/reference/surface-egress.md) - 活动 run 收到新 message 时走 durable steering/follow-up,不启动第二个 run;同时切换模型、权限、reasoning、tier、verbosity、style 或 output schema会返回冲突 (
packages/cli/src/server/routes/session.ts) - pending permission 既可能在内存 run 中,也可能只剩磁盘交互记录;响应路由必须先匹配精确 run,再通过
SessionInteractionService.respondAndRecover()冷恢复 (packages/cli/src/server/routes/permission.ts,packages/cli/src/server/routes/session.ts) - API 未设置
BLADE_SERVER_PASSWORD时整体无认证;启用 Basic Auth 后根页面与静态资源仍公开,只有 API 路径受保护 (packages/cli/src/server/server.ts,packages/cli/src/commands/serve.ts) - CORS 默认只放行 localhost、127.0.0.1 和 Tauri origin,额外来源必须通过
--cors;监听0.0.0.0不会自动放宽 CORS (packages/cli/src/server/server.ts,packages/cli/src/cli/network.ts) - Node 与 Bun 的 PTY/WebSocket 适配不同,但最后一个终端 subscriber 断开时都会杀掉 PTY;Terminal 面板重连不会保留无人订阅的进程 (
packages/cli/src/server/routes/terminal.ts) - 删除 Session 时还要释放 Web Browser Runtime、活动 review/run、Runtime residency 和任务 worktree;只删 transcript 会留下进程与浏览器资源 (
packages/cli/src/server/routes/session.ts,packages/cli/src/server/WebBrowserSessionRegistry.ts)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago First seen · 72 lines · 156 tokens per session scan A 8c25dd284318
knowledge-interaction-surfaces-hono-server-api-and-streaming is a skill published in the GitHub repository echoVic/blade-code (181 stars, last pushed 14d ago), licensed MIT. It adds 156 tokens to every session and 2,220 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
knowledge-interaction-surfaces-hono-server-api-and-streaming compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| knowledge-interaction-surfaces-hono-server-api-and-streamingechoVic/blade-code | Skill | 181 | 14d ago | MIT | A | 156 | Claude Code, Codex |
| groq-inferencesynthetic-sciences/openscience | Skill | 4.5k | yesterday | Apache-2.0 | A | 77 | Claude Code, Codex |
| bun-file-iosynthetic-sciences/openscience | Skill | 4.5k | yesterday | Apache-2.0 | A | 49 | Claude Code, Codex |
| protocolsio-integrationsynthetic-sciences/openscience | Skill | 4.5k | yesterday | Apache-2.0 | B | 85 | Claude Code, Codex |
| langbot-devlangbot-app/LangBot | Skill | 19k | today | Apache-2.0 | A | 136 | Claude Code, Codex |
| clinical-decision-supportsynthetic-sciences/openscience | Skill | 4.5k | yesterday | Apache-2.0 | A | 97 | Claude Code |
| immunology-assayssynthetic-sciences/openscience | Skill | 4.5k | yesterday | Apache-2.0 | A | 79 | Claude Code, Codex |