docs_for_coding_agent/examples/workflows/18_fastapi_sse_gateway_minimal/skills/fastapi_sse_gateway_runner/SKILL.md
最小 FastAPI/SSE 网关骨架:create run → SSE stream → approvals decide → terminal event。
npx skillsauth add okwinds/skills-runtime-sdk fastapi_sse_gateway_runnerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
演示一个“服务化/网关化”的最小落地形态:
approval_requested 时,通过 decide API 写回审批决策run_completed)$[examples:workflow].fastapi_sse_gateway_runner(用于示例一致性)。events.jsonl(用于审计)。SSE 消息格式(单条):
event: <type>data: <one-line json>关键事件(示例最小集):
approval_requested:payload 包含 approval_keyapproval_decided:payload 包含 approval_key + decisionrun_completed:terminalPOST /runs:创建 run,返回 run_idGET /runs/{run_id}/events/stream:订阅 SSEPOST /runs/{run_id}/approvals/{approval_key}:decide approvals说明:以上为自定义网关示例端点(非 Studio 的 /api/v1/...)。
documentation
用结构化流程生成一篇小说:大纲→概要→分章分段→组合→一致性自检。
documentation
用结构化流程写一篇文章:明确目标→大纲→分段写作→润色→一致性与事实自检。
business
规则报告(人类应用示例):汇总输入、规则与产物清单到 report.md。
tools
规则解析(人类应用示例):把自然语言规则转成结构化 plan.json。