docs: add a protocol reference page for custom clients
维护者通常 1 天内回复
@kachamsiddarth 已经在做这个了。
开始于 2026年10月21日。
评估
这个 Issue 还没有评估数据。
描述
The server speaks protocol v1 now (#285), but the only description of it is a section of server/setup.mdx. Anyone writing their own client (a mobile app, a CLI, a different widget) needs one page that lists every part, every error code and a request they can paste into a terminal. This issue is that page.
What to do
- New page
website/src/content/docs/server/protocol.mdx, titleProtocol, added to the Server sidebar inwebsite/astro.config.mjs(lines 121 to 128), after Setup. Cover:- How to ask for v1:
"protocol": 1in the body, or thex-chatcops-protocol: 1header. The response then hasx-chatcops-protocol: 1. Without either, the server answers in the 0.5 format, which goes away in 1.0. - The request body: the fields in
chatRequestSchema(packages/server/src/config.ts, lines 101 to 123) with their limits, plusprotocol. - Every part in
WirePart(packages/core/src/protocol/v1.ts, lines 50 to 99), one short paragraph or table row each, with an example line. Say which ones the server sends today (start,text-start,text-delta,text-end,tool-call,tool-result,lead-captured,error,finish) and that the others (source,handoff,agent-message,suggestions) are reserved for later features. - Framing: one
data: <json>line per part,data: [DONE]once at the end,: pingcomments after 10 s of silence, clients ignore unknown part types, and a stream withoutfinishwas cut off. - Errors before the stream: every status and code from
packages/core/src/protocol/errors.ts, with the JSON body shape andRetry-After. - Errors during the stream: the
errorpart's codes,retryable, andscopeforbudget_exceeded. - A
curlexample:curl -N -X POST http://localhost:3001/chat -H 'Content-Type: application/json' -d '{"protocol":1,"conversationId":"test-1","message":"Hi"}', followed by what it prints. import type { WirePart } from '@chatcops/core/protocol'for TypeScript clients.
- How to ask for v1:
- In
website/src/content/docs/server/setup.mdx, keep the "Response format" section short: the two formats in one paragraph, and a link to the new page for the details. Move the parts list and the status table there.
Where to look
packages/server/src/http.ts, which does negotiation, statuses, pings and[DONE]packages/server/tests/http.test.tsfor real request and response examplespackages/core/src/protocol/for the types and the status map
Acceptance criteria
- New
server/protocol.mdxin the sidebar, covering the points above - Every part and error code in
v1.tsanderrors.tsis on the page, and nothing that isn't - The curl example's output on the page is real. You don't need an API key: run the Express example (
packages/server/src/examples/express-server.ts) withprovider: scriptedProvider([textStep('Hello!')])from@chatcops/core/testing/provider, and don't commit that change -
pnpm --filter @chatcops/website buildsucceeds - Changeset:
pnpm changeset --empty(docs only)
Please get this merged by Dec 8, since the v0.6 release notes link to it.
Want to work on this? Comment below and I'll assign it to you. Please take one issue at a time, branch off dev, and open your PR against dev with Closes #<this issue number>. Setup notes (pnpm, build before test) are in CONTRIBUTING.md.
- 主要语言
- TypeScript
- 星标
- 13
- 派生
- 7
- 平均合并
- 3 小时 33 分钟
- 30 天内合并 PR
- 176
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
codercops/chatcops 的其他 Issue
-
Add startup checks that catch weak or leaked security settings可能已有人在做 @varun-pahuja 于 3 天前认领。 未关闭enhancement good first issue hacktoberfest server
codercops/chatcops#231 · 3 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Type-check the TypeScript samples in the docs可能已有人在做 @An16og 于 2 天前认领。 未关闭documentation hacktoberfest help wanted testing
难度 4/5 3-5 天 新手友好度 70/100
codercops/chatcops#201 · 7 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
hacktoberfest
难度 1/5 1 小时以内 新手友好度 35/100
维护者通常 1 天内回复
-
Add built-in translations to the widget可能已有人在做 @piyusshhjangid 于 1 天前认领。 未关闭help wanted widget
难度 4/5 3-5 天 新手友好度 52/100
codercops/chatcops#55 · 3 条评论 ·
维护者通常 1 天内回复
查看 codercops/chatcops 的全部 Issue
相似的 Issue
-
level/task type/bug
难度 2/5 1-3 小时 新手友好度 75/100
wazuh/wazuh-dashboard-plugins#9508 ·
维护者通常 1 天内回复
-
Testnet EOL page links Zonescan mainnet可能已有人在做 @napelvs 今天认领。 未关闭
难度 1/5 1 小时以内 新手友好度 76/100
-
难度 2/5 1-3 小时 新手友好度 78/100
Azure-Samples/azure-search-openai-demo#3249 ·
维护者通常 1 天内回复
-
[Docs] docs/architecture.mermaid leaves out 21 of the 51 src/ directories可能已有人在做 @uyg7x 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
enhancement status:needs-triage
难度 2/5 1-3 小时 新手友好度 68/100
dongdongbh/Mindwtr#1438 ·
维护者通常 1 天内回复