feat: add lk docs commands for searching and browsing LiveKit documentation#774
feat: add lk docs commands for searching and browsing LiveKit documentation#774
lk docs commands for searching and browsing LiveKit documentation#774Conversation
|
i found some more opportunity for improvement - will remark for review soon |
|
Replaced the hand-rolled MCP streamable HTTP client (~230 lines of JSON-RPC/SSE transport code) with the official Also audited all tool parameters against the MCP server's schema and added the missing |
Topherhindman
left a comment
There was a problem hiding this comment.
Overall looks good. Couple minor nonblocking comment/question I have are:
Although the command handlers are just thin wrappers and there isn't much logic to unit test, I think there's some amount of unit tests that could be useful to add for these changes.
Should we consider adding an overall timeout in the event the server hangs for some reason?
|
Addressed the feedback in 6fbc135:
|
Replace hand-rolled MCP streamable HTTP client (~230 lines) with the official modelcontextprotocol/go-sdk. Also add missing --agent and --model flags to submit-feedback to match the server's full schema. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Check the server's reported version after connecting. If the major or minor version is newer than what this CLI was built against (currently 1.2.x), print a warning to stderr suggesting the user update lk. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add hidden flags to `lk docs` for development against staging or preview deployments of the docs MCP server. Also add a README section documenting the docs feature and its development options. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Injects lightweight telemetry params into every MCP tool call so the docs server can track CLI version and optionally the Cloud project ID. The project ID is resolved silently from the --project flag or default project config and omitted when no project is configured. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add 30s timeout to all docs MCP requests to prevent hanging if the server is unresponsive. - Remove hardcoded hits-per-page default of 10; let the server default to 20 instead. - Add unit tests for parseMajorMinor, isNotFoundErr, and headerTransport. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds a --json / -j flag on the docs parent command so all tool-based subcommands can request JSON output from the MCP server. When set, sends format: "json" in the tool call arguments. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace the livekit://sdks resource read with the new get_sdks tool call, which supports all standard params (format, telemetry). Remove the now-unused callDocsResourceAndPrint helper and encoding/json import. Bump expectedServerVersion to 1.3. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Match the server-side naming convention. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
rektdeckard
left a comment
There was a problem hiding this comment.
Overall looks great to me, and seems to work as expected in manual testing.
c636786 to
98a0746
Compare
Summary
Adds
lk docscommands for searching and browsing LiveKit documentation directly from the terminal, powered by the LiveKit docs MCP server.Commands
lk docs overview— full site table of contentslk docs search <query>— search docs with paginationlk docs get-page <path>— fetch one or more pages as markdownlk docs code-search <query>— search code across LiveKit GitHub reposlk docs changelog <identifier>— get recent releases for an SDK/packagelk docs list-sdks— list all LiveKit SDK repos and package nameslk docs submit-feedback <text>— submit docs feedbackFeatures
v1.4.0)--json/-jflag ondocsparent command to request JSON output from all toolslkCliVersionandprojectId(when configured) as telemetry params on all tool calls1.3.x)--server-urland--vercel-headerflags for development/stagingDependencies
get_sdkstool,formatparam, and camelCase telemetry param supportTest plan
--jsonflag verified against staging (docs-git-bcherry-mcp-json-option.staging.livekit.io)--server-url,--vercel-header) work and don't appear in--helpparseMajorMinor,isNotFoundErr,headerTransportgo buildandgo testpass🤖 Generated with Claude Code