Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

docs: add a protocol reference page for custom clients

オープン
#286 コメント 2 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@kachamsiddarth がすでに取り組んでいます。

2026年10月21日 から。

評価

この issue はまだ評価されていません。

説明

documentation good first issue hacktoberfest website

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, title Protocol, added to the Server sidebar in website/astro.config.mjs (lines 121 to 128), after Setup. Cover:
    • How to ask for v1: "protocol": 1 in the body, or the x-chatcops-protocol: 1 header. The response then has x-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, plus protocol.
    • 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, : ping comments after 10 s of silence, clients ignore unknown part types, and a stream without finish was cut off.
    • Errors before the stream: every status and code from packages/core/src/protocol/errors.ts, with the JSON body shape and Retry-After.
    • Errors during the stream: the error part's codes, retryable, and scope for budget_exceeded.
    • A curl example: 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.
  • 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.ts for real request and response examples
  • packages/core/src/protocol/ for the types and the status map

Acceptance criteria

  • New server/protocol.mdx in the sidebar, covering the points above
  • Every part and error code in v1.ts and errors.ts is 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) with provider: scriptedProvider([textStep('Hello!')]) from @chatcops/core/testing/provider, and don't commit that change
  • pnpm --filter @chatcops/website build succeeds
  • 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時間 41分
マージ済み PR(30日)
155

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

codercops/chatcops のほかの issue

codercops/chatcops の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。