Agent skill

Knowledge Interaction Surfaces Hono Server API And Streaming

by echoVic in echoVic/blade-code

覆盖 Blade Hono 服务的路由装配、Session/Task 控制器、SSE replay/live 切换、 WebSocket 终端、静态资源、认证、错误映射与资源关闭。进入时机:新增 HTTP API、 修改 Web 事件协议、处理同名 Session、调试断线重连、服务容量或 shutdown。

MITAuto-check passedBackend & APIs

Install Knowledge Interaction Surfaces Hono Server API And Streaming

skills CLI
$ npx skills add echoVic/blade-code --skill knowledge-interaction-surfaces-hono-server-api-and-streaming -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install echoVic/blade-code knowledge-interaction-surfaces-hono-server-api-and-streaming --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/echoVic/blade-code.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.trae/knowledges/interaction-surfaces/hono-server-api-and-streaming .claude/skills/knowledge-interaction-surfaces-hono-server-api-and-streaming && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
knowledge-interaction-surfaces-hono-server-api-and-streaming
GitHub stars
180
Token cost
~1.7k tokens
SKILL.md length
441 words
Files
1
Skills in repo
38
Repo updated
First seen
Licence
MIT

At a glance

覆盖 Blade Hono 服务的路由装配、Session/Task 控制器、SSE replay/live 切换、 WebSocket 终端、静态资源、认证、错误映射与资源关闭。进入时机:新增 HTTP API、 修改 Web 事件协议、处理同名 Session、调试断线重连、服务容量或 shutdown。

  • Tasks that involve Realtime and WebSockets
  • SKILL.md covers Module Structure, Gotchas, Architecture and Decisions, plus 2 more sections
  • Needs BLADE_SERVER_PASSWORD
  • Tasks that involve State management

What it does

Knowledge Interaction Surfaces Hono Server API And Streaming is an agent skill from echoVic/blade-code. 覆盖 Blade Hono 服务的路由装配、Session/Task 控制器、SSE replay/live 切换、 WebSocket 终端、静态资源、认证、错误映射与资源关闭。进入时机:新增 HTTP API、 修改 Web 事件协议、处理同名 Session、调试断线重连、服务容量或 shutdown。 不包含: 浏览器端 Zustand 投影(见 ../web-client/)、SessionEventLog 内部存储(见 ../../session-state-and-context/)。关键词:BladeServer, createSessionRouteController, OrderedSseEgress, Bus, Last-Event-ID, SessionRef, Hono, SSE, terminal WebSocket。

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Backend & APIs, covering Realtime and WebSockets, State management and REST APIs. It works with Hono and Zustand. The repository describes itself as: AI-powered CLI coding agent with 20+ built-in tools, MCP support, and multi-model providers. The licence is MIT.

When your agent uses it

  • Tasks that involve Realtime and WebSockets
  • Tasks that involve State management
  • Tasks that involve REST APIs

Example prompts

  • “/knowledge-interaction-surfaces-hono-server-api-and-streaming”

What it can do on your machine

Read from SKILL.md and the folder at commit 30f8684. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • BLADE_SERVER_PASSWORD

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Knowledge Interaction Surfaces Hono Server API And Streaming loads about 1.7k tokens when it runs. Until then it costs about 110 tokens; SKILL.md has 441 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~110
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from echoVic/blade-code at commit 30f8684, republished under its MIT licence (© echoVic). 441 words, ~1,663 tokens.

Download SKILL.mdSave it as .claude/skills/knowledge-interaction-surfaces-hono-server-api-and-streaming/SKILL.md (or your agent's skills folder).
name
knowledge-interaction-surfaces-hono-server-api-and-streaming
description
覆盖 Blade Hono 服务的路由装配、Session/Task 控制器、SSE replay/live 切换、 WebSocket 终端、静态资源、认证、错误映射与资源关闭。进入时机:新增 HTTP API、 修改 Web 事件协议、处理同名 Session、调试断线重连、服务容量或 shutdown。 不包含: 浏览器端 Zustand 投影(见 ../web-client/)、SessionEventLog 内部存储(见 ../../session-state-and-context/)。关键词:BladeServer, createSessionRouteController, OrderedSseEgress, Bus, Last-Event-ID, SessionRef, Hono, SSE, terminal WebSocket。

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)
Show full SKILL.md (202 more words)Show less

Architecture

  • server.ts 创建一个 SessionRouteController,并把同一 controller 注入 TaskRoutes 和 TaskScheduler,使 HTTP 手工任务、Web 操作和 schedule 复用相同准入与恢复逻辑 (packages/cli/src/server/server.ts)
  • SessionController 分开管理 hydrated Session、active/recent run、Runtime initialization/disposal 与 residency lease;并发请求通过按 SessionRef 分片的 mutex 串行化消息和交付 (packages/cli/src/server/routes/session.ts)
  • Runtime residency 只缓存可驱逐的 idle Runtime;active turn、pending interaction 或其他 pin 会阻止驱逐,容量满时映射为带资源详情的 429 (packages/cli/src/server/routes/session.ts, packages/cli/src/server/error.ts)
  • Bus 是进程内扇出,不是持久消息队列;durable replay 始终从 SessionEventLog 读取,Bus 只承载当前进程 live 事件 (packages/cli/src/server/bus.ts, packages/cli/src/server/routes/session.ts)
  • BrowserRoutes 在 SessionController 下共享精确 SessionRef 和全局 Browser admission,但 Web 测试浏览器由独立 registry 持有,不复用 Agent 的 browser runtime (packages/cli/src/server/routes/browser.ts, packages/cli/src/server/WebBrowserSessionRegistry.ts)
  • Hono 顶层 onError 将容量和已分类 BladeServerError 保留为稳定状态码,其余错误收敛为 500 JSON envelope (packages/cli/src/server/server.ts, packages/cli/src/server/error.ts)

Decisions

  • Server 将 run 生命周期与 HTTP 请求解耦,请求返回 202 后由 Runtime 持续执行;SSE viewer 断开不等于取消任务,显式 abort 路由才改变 run (packages/cli/src/server/routes/session.ts)
  • 静态资源使用内存原文/压缩缓存,Brotli 与 gzip 按 q 值选择,hash asset 长缓存而 index.html no-cache,以支持单进程直接托管 Web build (packages/cli/src/server/server.ts)
  • 全局事件流采用字段级投影而不是透传 BusEvent,避免多项目任务看板获得 Session prompt、工具参数或私有结果 (packages/cli/src/server/routes/events.ts)
  • Bun listen() 是同步专用入口,跨运行时命令使用 listenAsync();Node fallback 只在异步入口组装 HTTP 与 ws upgrade (packages/cli/src/server/server.ts)

Patterns

  • 每个写 API 先解析 TypeBox schema,再解析精确 SessionRef,再进入 keyed lock/Runtime lease;新增写端点应保持该顺序以避免校验失败后占用运行资源 (packages/cli/src/server/routes/session.ts, packages/cli/src/server/routes/task.ts)
  • Session run 的终态顺序是刷新 durable metadata、发送 session.completed/session.error、发送 idle/error status,最后释放 admission、Agent 和 Runtime lease (packages/cli/src/server/routes/session.ts)
  • Server 输出的工具 metadata 经过 allowlist 投影,展示正文再按表面字符预算裁剪;Browser 诊断与 shell background 元数据另有严格字段校验 (packages/cli/src/server/routes/session.ts, packages/cli/src/tools/display/ToolResultProjector.ts)
  • 服务关闭是幂等 single-flight:停止网络接入、关闭 SessionController、停止 scheduler/GC、重置 workspace 资源,并保留首个清理错误 (packages/cli/src/server/server.ts)
  • Session Browser Registry 在从 Map 删除引用后再 dispose,批量关闭使用 allSettled 回收全部 Runtime 后才抛首个错误 (packages/cli/src/server/WebBrowserSessionRegistry.ts)

Dependencies

  • HTTP/SSE 使用 Hono,终端 WebSocket 使用 Bun WebSocket 或 ws + Node upgrade,PTY 使用 bun-pty 或 node-pty;跨运行时修改必须验证两条启动路径 (packages/cli/src/server/server.ts, packages/cli/src/server/routes/terminal.ts)

© echoVic, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .trae/knowledges/interaction-surfaces/hono-server-api-and-streaming of echoVic/blade-code.

Open the folder on GitHubat commit 30f8684

Compare with similar skills

Knowledge Interaction Surfaces Hono Server API And Streaming next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Knowledge Interaction Surfaces Hono Server API And Streaming compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Knowledge Interaction Surfaces Hono Server API And Streaming this skillechoVic/blade-code180—~1.7kAutomated safety check: PassMIT
Domain Webfjrevoredo/mini-diarium3081 repos~1kAutomated safety check: PassMIT
Reactflow Expertcuriositech/some_claude_skills243—~2.1kAutomated safety check: NotesMIT
Use Yaakmountain-loop/yaak19k—~1.9kAutomated safety check: PassMIT
Data Client Managerreactive/data-client2k—~2.6kAutomated safety check: PassApache-2.0
Binance Datatoollostleaf/binance-datatool148—~2.5kAutomated safety check: NotesBSD-3-Clause

Similar skills

  • Domain Web

    fjrevoredo/mini-diarium

    A skill your agent uses when building web services. An agent skill from fjrevoredo/mini-diarium.

    308 GitHub starsUsed in 1 repo~1k tokens
    Backend & APIsAuto-check passed
  • Reactflow Expert

    curiositech/some_claude_skills

    Builds DAG visualizations using ReactFlow v12 with custom nodes, ELKjs auto-layout, Zustand state management, and live state updates via WebSocket.

    243 GitHub stars~2.1k tokensUpdated 1 mo ago
    Frontend & DesignAuto-check: notes
  • Use Yaak

    mountain-loop/yaak

    A skill your agent uses when the user mentions Yaak, a Yaak workspace, or the yaak command, or asks to call, hit, or smoke test HTTP/REST endpoints, save or organize API requests for reuse or manual…

    19k GitHub stars~1.9k tokensUpdated today
    Backend & APIsAuto-check passed
  • Data Client Manager

    reactive/data-client

    Implement @data-client Managers for global/background side effects - websocket, SSE, polling, real-time updates, subscriptions, logging, analytics, metrics/timing, error reporting (Sentry), toast…

    2k GitHub stars~2.6k tokensUpdated today
    Backend & APIsAuto-check passed
  • Binance Datatool

    lostleaf/binance-datatool

    Manage Binance historical market data from data.binance.vision using the binance-datatool CLI.

    148 GitHub stars~2.5k tokensUpdated 5 mo ago
    Backend & APIsAuto-check: notes
  • Starlette

    simonw/research

    Build async web applications and APIs with Starlette 1.0, the lightweight ASGI framework for Python.

    781 GitHub stars~8.6k tokensUpdated 2 days ago
    Backend & APIsAuto-check: notes

More from echoVic/blade-code

All 38 skills in this repo
  • Base64 Parser

    echoVic/blade-code

    Base64 编解码工具,支持编码/解码文本、JSON、二进制文件,自动检测格式,支持批量处理. An agent skill from echoVic/blade-code.

    180 GitHub stars~545 tokensUpdated 10 days ago
    Auto-check: notes
  • Code Review

    echoVic/blade-code

    Review frontend code for best practices, bugs, and improvements.

    180 GitHub stars~377 tokensUpdated 10 days ago
    Auto-check: notes
  • GitHub Explorer

    echoVic/blade-code

    Explore and summarize popular GitHub projects. An agent skill from echoVic/blade-code.

    180 GitHub stars~434 tokensUpdated 10 days ago
    Auto-check passed
  • 覆盖 Session 级 LSP 配置快照、stdio 进程、文档同步、语义查询、诊断回注、崩溃恢复 和子 Session 继承。进入条件:新增语言服务器、修改 LSP 工具、排查诊断缺失/重复、 处理 worktree 或 ACP 差异、修复进程泄漏或 transport 代际问题。不包含:VS Code 扩展桥接(见…

    180 GitHub stars~1.9k tokensUpdated 10 days ago
    Auto-check passed
  • 覆盖 SkillRegistry、SKILL.md 延迟加载、自定义命令 Markdown 解析、来源覆盖、插件 命名空间、Session 快照和模型/用户调用入口。进入条件:新增 Skill 或命令字段、调整 发现优先级、调试 /command 或 Skill 工具、修改 Prompt 元数据或消费者集成。不包含: 插件安装生命周期(见…

    180 GitHub stars~2.1k tokensUpdated 10 days ago
    Auto-check passed
  • Covers 领域能力如何包装成内置工具、getBuiltinTools 的 Session 依赖注入、ToolSearch 延迟激活,以及 Goal/Task/Team/Plan/Skill/LSP/MCP/Web/Config/Worktree 适配边界。

    180 GitHub stars~2.1k tokensUpdated 10 days ago
    Auto-check passed

Works with

Categories

Questions about Knowledge Interaction Surfaces Hono Server API And Streaming

What does Knowledge Interaction Surfaces Hono Server API And Streaming do?

覆盖 Blade Hono 服务的路由装配、Session/Task 控制器、SSE replay/live 切换、 WebSocket 终端、静态资源、认证、错误映射与资源关闭。进入时机:新增 HTTP API、 修改 Web 事件协议、处理同名 Session、调试断线重连、服务容量或 shutdown。. Knowledge Interaction Surfaces Hono Server API And Streaming is an agent skill from echoVic/blade-code.

When should I use Knowledge Interaction Surfaces Hono Server API And Streaming?

Knowledge Interaction Surfaces Hono Server API And Streaming fits situations like: tasks that involve Realtime and WebSockets; tasks that involve State management; tasks that involve REST APIs.

How do I install Knowledge Interaction Surfaces Hono Server API And Streaming in Claude Code?

Run `npx skills add echoVic/blade-code --skill knowledge-interaction-surfaces-hono-server-api-and-streaming -a claude-code`. Or copy the skill folder (.trae/knowledges/interaction-surfaces/hono-server-api-and-streaming in echoVic/blade-code) into .claude/skills/knowledge-interaction-surfaces-hono-server-api-and-streaming in your project. Claude Code loads it when a task matches its description.

How do I install Knowledge Interaction Surfaces Hono Server API And Streaming in Codex?

Run `npx skills add echoVic/blade-code --skill knowledge-interaction-surfaces-hono-server-api-and-streaming -a codex`. Or copy the skill folder (.trae/knowledges/interaction-surfaces/hono-server-api-and-streaming in echoVic/blade-code) into .agents/skills/knowledge-interaction-surfaces-hono-server-api-and-streaming in your project. Codex loads it when a task matches its description.

Can I use Knowledge Interaction Surfaces Hono Server API And Streaming in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add echoVic/blade-code --skill knowledge-interaction-surfaces-hono-server-api-and-streaming -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/knowledge-interaction-surfaces-hono-server-api-and-streaming, .gemini/skills/knowledge-interaction-surfaces-hono-server-api-and-streaming, .github/skills/knowledge-interaction-surfaces-hono-server-api-and-streaming and .opencode/skills/knowledge-interaction-surfaces-hono-server-api-and-streaming in your project.

What does Knowledge Interaction Surfaces Hono Server API And Streaming need to run?

Going by SKILL.md and its folder, Knowledge Interaction Surfaces Hono Server API And Streaming needs credentials named BLADE_SERVER_PASSWORD.

Does Knowledge Interaction Surfaces Hono Server API And Streaming access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Knowledge Interaction Surfaces Hono Server API And Streaming safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Knowledge Interaction Surfaces Hono Server API And Streaming use?

Knowledge Interaction Surfaces Hono Server API And Streaming is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Knowledge Interaction Surfaces Hono Server API And Streaming use?

About 1.7k tokens (SKILL.md is roughly 6.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Knowledge Interaction Surfaces Hono Server API And Streaming?

Skills that share tags, products or a category with Knowledge Interaction Surfaces Hono Server API And Streaming: Domain Web (fjrevoredo/mini-diarium, 308 stars), Reactflow Expert (curiositech/some_claude_skills, 243 stars), Use Yaak (mountain-loop/yaak, 19k stars) and Data Client Manager (reactive/data-client, 2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Knowledge Interaction Surfaces Hono Server API And Streaming?

echoVic (a GitHub user) maintains it in echoVic/blade-code, which has 180 GitHub stars. The repository holds 38 skills in this directory. The repository was last updated on September 27, 2026.

Source: echoVic/blade-code on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.