docs: add a protocol reference page for custom clients
Maintainer antworten meist innerhalb von 1 Tag
@kachamsiddarth arbeitet bereits daran.
Seit 21.10.2026.
Bewertung
Dieses Issue wurde noch nicht bewertet.
Beschreibung
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.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 13
- Forks
- 7
- Ø Merge
- 3 Std. 33 Min.
- Gemergte PRs (30 T.)
- 176
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus codercops/chatcops
-
Add startup checks that catch weak or leaked security settingsEvtl. vergeben @varun-pahuja hat das vor 3 Tagen übernommen. Offenenhancement good first issue hacktoberfest server
codercops/chatcops#231 · 3 Kommentare · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
Type-check the TypeScript samples in the docsEvtl. vergeben @An16og hat das vor 2 Tagen übernommen. Offendocumentation hacktoberfest help wanted testing
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 70/100
codercops/chatcops#201 · 7 Kommentare · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
hacktoberfest
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 35/100
Maintainer antworten meist innerhalb von 1 Tag
-
Add built-in translations to the widgetEvtl. vergeben @piyusshhjangid hat das vor 1 Tag übernommen. Offenhelp wanted widget
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 52/100
codercops/chatcops#55 · 3 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in codercops/chatcops
Ähnliche Issues
-
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 82/100
source-cooperative/docs.source.coop#41 · 1 Kommentar ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
Nimblesite/SharpLsp#468 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
solidjs-community/solid-primitives#1082 ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 64/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag