competition-websocket-runtime
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCompetition WebSocket Runtime
竞赛用WebSocket运行时
Use this skill only as a downstream specialization after is already active and has established sandbox assumptions, node ownership, and evidence priorities. If that has not happened yet, return to first.
$ctf-sandbox-orchestrator$ctf-sandbox-orchestratorUse this skill when the decisive behavior is carried by realtime handshake and frame flow rather than one-shot HTTP alone.
Reply in Simplified Chinese unless the user explicitly requests English.
仅可在已激活,且已完成沙箱假设配置、节点归属确认、证据优先级确定后,作为下游专用技能使用。如果尚未满足上述前置条件,请先返回调用。
$ctf-sandbox-orchestrator$ctf-sandbox-orchestrator当核心行为由实时握手和帧流决定,而非仅由单次HTTP请求决定时,使用本技能。
除非用户明确要求使用英文,否则请用简体中文回复。
Quick Start
快速入门
- Map the handshake first: origin, path, headers, cookies, query, auth token, and upgrade response.
- Separate connection setup, subscription messages, keepalives, server pushes, and reconnect logic.
- Record message schema, topic or channel identity, and state side effects in one chain.
- Tie frames to rendered, stored, or backend-visible effects.
- Reproduce the smallest handshake-plus-frame sequence that reaches the decisive state change.
- 首先梳理握手流程:来源、路径、headers、cookies、查询参数、auth token、升级响应。
- 拆分连接建立、订阅消息、保活消息、服务端推送、重连逻辑等不同环节。
- 统一记录消息schema、主题或频道标识、状态副作用的完整链路。
- 将帧与渲染端、存储端或后端可见的效果关联起来。
- 复现能触发关键状态变更的最小握手+帧序列。
Workflow
工作流
1. Map The Realtime Handshake
1. 梳理实时握手流程
- Record the initial HTTP or SSE request, upgrade headers, cookies, tokens, query params, origin checks, and negotiated protocol.
- Note whether auth material is carried by headers, cookies, query strings, or initial application frames.
- Keep route, subscription endpoint, and session identity tied together.
- 记录初始HTTP或SSE请求、升级headers、cookies、tokens、查询参数、来源校验、协商协议。
- 记录认证材料是通过headers、cookies、查询字符串还是初始应用帧传输。
- 将路由、订阅端点、会话标识绑定关联。
2. Decode Message Flow
2. 解码消息流
- Separate subscribe, unsubscribe, ack, heartbeat, server push, reconnect, and terminal frames.
- Recover message types, channel IDs, schema fields, and sequencing that matter to behavior.
- Distinguish transport keepalive from application-level business messages.
- 拆分订阅、取消订阅、确认、心跳、服务端推送、重连、终止等不同类型的帧。
- 还原对行为有影响的消息类型、频道ID、schema字段、序列顺序。
- 区分传输层保活消息和应用层业务消息。
3. Reduce To The Decisive Realtime Path
3. 提炼关键实时路径
- Compress the result to the smallest sequence: handshake -> auth or subscribe frame -> pushed or accepted frame -> resulting state change.
- Keep canonical frame order and any replayed minimal order side by side.
- If the hard part is generic protocol reassembly without runtime UI or app-state linkage, switch back to the tighter protocol skill.
- 将结果压缩为最小序列:握手 -> 认证或订阅帧 -> 推送或接收帧 -> 最终状态变更。
- 同时保留标准帧顺序和可复现的最小顺序。
- 如果核心需求是通用协议重组,无需关联运行时UI或应用状态,请切换到更专注的协议类技能。
Read This Reference
参考文档说明
- Load for the handshake checklist, frame checklist, and evidence packaging.
references/websocket-runtime.md
- 加载查看握手检查清单、帧检查清单和证据打包规范。
references/websocket-runtime.md
What To Preserve
需要保留的内容
- Handshake headers, cookies, query params, auth material, negotiated subprotocol, and channel IDs
- Frame schemas, subscription messages, server pushes, reconnect flow, and resulting state changes
- The smallest replayable realtime sequence that proves the decisive branch
- 握手headers、cookies、查询参数、认证材料、协商子协议、频道ID
- 帧schema、订阅消息、服务端推送、重连流程、最终状态变更
- 可证明关键分支逻辑的最小可重放实时序列