knowledge-interaction-surfaces-hono-server-api-and-streaming

knowledge-interaction-surfaces-hono-server-api-and-streaming is a skill for Claude Code, Codex from echoVic/blade-code. It costs 156 tokens per session (2,220 once invoked), scanned A, original, MIT.

A codebase guide for the server API that connects web clients and automation tools to sessions, tasks, live event streams, terminals, and browser runtimes.

In plain words
What is it for?
Use it for HTTP APIs, task dispatch, session control, SSE replay and reconnects, WebSocket terminals, authentication, and server resource cleanup.
Why use it?
It helps developers change routes and streaming behavior while preserving session ownership, reconnection, authentication, error handling, and shutdown.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it for HTTP APIs, task dispatch, session control, SSE replay and reconnects, WebSocket terminals, authentication, and server resource cleanup.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/echovic/blade-code/hono-server-api-and-streaming
Install

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.

Any agent
npx skills add echoVic/blade-code --skill hono-server-api-and-streaming
Clone the repo
git clone --depth 1 https://github.com/echoVic/blade-code

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for knowledge-interaction-surfaces-hono-server-api-and-streaming

README.md
[![agentmods](https://agentmods.dev/badge/skills/echovic/blade-code/hono-server-api-and-streaming/github.svg)](https://agentmods.dev/skills/echovic/blade-code/hono-server-api-and-streaming)
Your own site
<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.

agentmods 80×15 button for knowledge-interaction-surfaces-hono-server-api-and-streaming

Your own site · 80×15
<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>
Per session 156 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,220 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 1mo ago against content hash 8c25dd284318, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 1mo 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.

.trae/knowledges/interaction-surfaces/hono-server-api-and-streaming/SKILL.md · 72 lines

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 与交付 API
  • packages/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 等管理 API
  • packages/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() in packages/cli/src/server/server.ts — 启动 Bun 或 Node 服务
  • createSessionRouteController() in packages/cli/src/server/routes/session.ts — 创建路由与 Runtime 管理器
  • dispatchTask() on SessionRouteController — Web、定时任务共用的任务派发入口
  • OrderedSseEgress.finishInitialization() in packages/cli/src/server/OrderedSseEgress.ts — replay 到 live 的切换点
  • resolveSessionRef() in packages/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-ID header,因此 Server 同时接受 lastEventId query;删除 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)

Read the full file on GitHub · 72 lines

Changes

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.

  1. 1mo ago First seen · 72 lines · 156 tokens per session scan A 8c25dd284318

Subscribe to this mod's changes

knowledge-interaction-surfaces-hono-server-api-and-streaming is a skill published in the GitHub repository echoVic/blade-code (181 stars, last pushed 3d 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.

Related

Other skills, from other repositories

groq-inference

Ultra-fast LLM inference on custom LPU hardware. OpenAI-compatible API at api.groq.com. Lowest latency in the industry (500-1000+ tok/s). Supports chat completions, vision, audio (Whisper STT + TTS), tool calling, JSON mode, and streaming. Free tier available. Inference only — no training.

synthetic-sciences/openscience · 77 tokens

bun-file-io

Use this when you are working on file operations like reading, writing, scanning, or deleting files. It summarizes the preferred file APIs and patterns used in this repo. It also notes when to use filesystem helpers for directories.

synthetic-sciences/openscience · 49 tokens

protocolsio-integration

Integration with protocols.io API for managing scientific protocols. This skill should be used when working with protocols.io to search, create, update, or publish protocols; manage protocol steps and materials; handle discussions and comments; organize workspaces; upload and manage files; or integrate protocols.io…

synthetic-sciences/openscience · 85 tokens

langbot-dev

Develop, build, and debug the LangBot core backend and web frontend. Use when working inside the LangBot repository — backend (Python/Quart, src/langbot/pkg), the Vite/React web UI, HTTP API controllers/services, Alembic migrations, or the MCP server. Covers the dev environment (uv, pnpm), repo layout, the API auth…

langbot-app/LangBot · 136 tokens

clinical-reports

Write comprehensive clinical reports including case reports (CARE guidelines), diagnostic reports (radiology/pathology/lab), clinical trial reports (ICH-E3, SAE, CSR), and patient documentation (SOAP, H&P, discharge summaries). Full support with templates, regulatory compliance (HIPAA, FDA, ICH-GCP), and validation…

synthetic-sciences/openscience · 71 tokens

clinical-decision-support

Generate professional clinical decision support (CDS) documents for pharmaceutical and clinical research settings, including patient cohort analyses (biomarker-stratified with outcomes) and treatment recommendation reports (evidence-based guidelines with decision algorithms). Supports GRADE evidence grading…

synthetic-sciences/openscience · 97 tokens