Skip to content

docs(clients): correct and expand Python & TypeScript client SDK references - #1117

Merged
dylan-savage merged 1 commit into
developfrom
refactor/client-docs
Jun 4, 2026
Merged

dylan-savage merged 1 commit into
developfrom
refactor/client-docs

Conversation

@dylan-savage

@dylan-savage dylan-savage commented Jun 4, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Audit-driven fixes and additions to the client SDK reference docs (docs/agents/ROCKETRIDE_{python,typescript}_API.md), every claim verified against packages/client-{python,typescript}/src. Docs-only — no code changes.

Prompted by Ariel's review note that the client docs were likely outdated. They were: several documented examples would break on copy-paste, and large parts of the current API surface were undocumented.

Corrections (would break copy-pasted code)

Python

  • pipe() mimetype= → mime_type= (the real kwarg)
  • Constructor defaults (uri='', auth=''); connect() real signature returning ConnectResult
  • use() threads default None (server decides) + keyword-only note; send() objinfo default None
  • addInstruction(title, instruction)

TypeScript

  • Question.add* return void (not Question — no chaining)
  • TASK_STATUS.state is a numeric TASK_STATE enum + completed: boolean; polling uses status.completed
  • send(): Promise<PIPELINE_RESULT | undefined>; connect() real PKCE signature
  • onConnectError arg is a ConnectionException; setEvents gains pipeId?

Both

  • Removed phantom application/rocketride-tag MIME type (absent from the codebase)
  • Replaced the unsubstantiated "Node 16+" requirement (no engines field; await using needs Node 20+/TS 5.2+)

Additions (verified API surface that was undocumented)

  • Python: auth/connection lifecycle (attach/detach/login/logout/is_*), restart(), get_task_token(), streaming on_sse, exception hierarchy, top-level schema imports
  • TypeScript: auth/connection lifecycle, validate(), restart(), getTaskToken(), getTaskPipeline(), streaming onSSE, add/removeMonitor, exception classes

Verification

  • Every documented signature grep-checked against client source; an independent adversarial review pass caught and fixed 2 inaccuracies (invented ConnectOptions type, TS addInstruction params).
  • docs/agents/ is the canonical source; build/vscode/docs/ regenerates from it on ./builder vscode:build.

Summary by CodeRabbit

  • Documentation
    • Updated Python and TypeScript API reference documentation with revised method signatures and parameters
    • Added streaming callback support for incremental output during requests
    • Introduced new connection lifecycle and pipeline execution methods
    • Added comprehensive exception hierarchy documentation with method-specific error guidance
    • Clarified parameter defaults and keyword-only arguments across core APIs

…rences

Audit-driven fixes to docs/agents/ROCKETRIDE_{python,typescript}_API.md,
verified against packages/client-{python,typescript}/src.

Corrections (would break copy-pasted code):
- Python: pipe() mime_type kwarg, constructor defaults, connect() signature
  + ConnectResult, use() threads default None + keyword-only, send() objinfo
  default None, addInstruction(title, instruction).
- TypeScript: Question.add* return void (no chaining), TASK_STATUS.state
  numeric enum + completed boolean polling, send() Promise<...| undefined>,
  connect() real PKCE signature, onConnectError ConnectionException type,
  setEvents pipeId param, dynamic answers field note.
- Both: removed phantom application/rocketride-tag MIME type (absent from
  the codebase); fixed unsubstantiated Node 16 requirement.

Additions (verified API surface that was undocumented):
- Python: auth/connection lifecycle, restart(), get_task_token(), streaming
  on_sse, exception hierarchy, top-level schema imports.
- TypeScript: auth/connection lifecycle, validate(), restart(),
  getTaskToken(), getTaskPipeline(), streaming onSSE, add/removeMonitor,
  exception classes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 4, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

This PR updates RocketRide Python and TypeScript SDK API documentation to reflect new method signatures, execution APIs, streaming support, and type changes. Both documents are synchronized with client-side implementation changes for connection lifecycle, task management, data streaming, and error handling.

Changes

RocketRide Client API Documentation

Layer / File(s) Summary
Client initialization and connection lifecycle
docs/agents/ROCKETRIDE_python_API.md, docs/agents/ROCKETRIDE_typescript_API.md
RocketRideClient constructor parameters now default to empty strings; connect() accepts optional credentials and timeout; TypeScript docs introduce lower-level attach(), login(), logout(), and detach() lifecycle methods.
Pipeline execution and validation APIs
docs/agents/ROCKETRIDE_python_API.md, docs/agents/ROCKETRIDE_typescript_API.md
New methods documented: restart() and get_task_token() for Python; validate(), restart(), getTaskToken(), and getTaskPipeline() for TypeScript, enabling task resubmission and pipeline validation.
Streaming callback support (on_sse)
docs/agents/ROCKETRIDE_python_API.md, docs/agents/ROCKETRIDE_typescript_API.md
send(), pipe(), and chat() now accept optional on_sse async callback for server-sent events; new section documents callback signature and streaming examples.
Question builder API and return types
docs/agents/ROCKETRIDE_python_API.md, docs/agents/ROCKETRIDE_typescript_API.md
Builder methods now return void instead of Question (no chaining); addInstruction() parameters renamed from subtitle/instructions to title/instruction.
Event monitoring and task status structure
docs/agents/ROCKETRIDE_typescript_API.md
setEvents() extended with optional pipeId; new addMonitor() and removeMonitor() methods; TASK_STATUS.state changed from string to numeric enum with completed as preferred indicator.
Reference documentation, exceptions, and MIME types
docs/agents/ROCKETRIDE_python_API.md, docs/agents/ROCKETRIDE_typescript_API.md
Exception hierarchy documented (DAPException, RocketRideException, ConnectionException, etc.); MIME type mappings updated (removed application/rocketride-tag); parameter examples updated (mime_type replaces mimetype); Node.js 18+ recommended; optional answer fields clarified.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested labels

docs, module:client-python, module:client-typescript

Suggested reviewers

  • jmaionchi
  • stepmikhaylov
  • Rod-Christensen

Poem

🐰 A rabbit hops through docstrings bright,
Streaming flows with on_sse in sight,
New methods bloom, from Python to TypeScript true,
Connection lifecycle tales both old and new! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title directly and clearly summarizes the main change: documentation corrections and expansions to Python and TypeScript client SDK reference materials.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/client-docs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor
🤖 Internal: Discord sync marker

Auto-managed by the Discord notification workflow. Stores the linked Discord message ID. Do not edit or delete.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/agents/ROCKETRIDE_typescript_API.md`:
- Around line 523-528: The documented chat() signature is missing the optional
onSSE parameter which causes a TypeScript mismatch; update the chat() API
signature to include the onSSE optional parameter (aligning it with how send()
and pipe() expose onSSE) by adding onSSE? to the chat({ token, question, ... })
declaration and any related examples so the documented function signature
matches the text that lists send() and pipe() having onSSE as the last
positional/option field.
- Around line 1035-1043: Add a language identifier to the fenced code block that
documents the error hierarchy (the block starting with "DAPException ...
RocketRideException ..."). Edit that fenced block to include a language tag such
as "text" (e.g., ```text) so markdownlint MD040 is satisfied and rendering is
preserved; keep the block content unchanged aside from adding the language
identifier.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 4c82cec9-7156-4593-a82f-958985fde36b

📥 Commits

Reviewing files that changed from the base of the PR and between 64ebf8c and 0ca8346.

📒 Files selected for processing (2)
  • docs/agents/ROCKETRIDE_python_API.md
  • docs/agents/ROCKETRIDE_typescript_API.md

@dylan-savage
dylan-savage merged commit abff227 into develop Jun 4, 2026
27 checks passed
@dylan-savage
dylan-savage deleted the refactor/client-docs branch June 4, 2026 19:45
AviNormie pushed a commit to AviNormie/rocketride-server that referenced this pull request Nov 9, 2026
…rences (rocketride-org#1117)

Audit-driven fixes to docs/agents/ROCKETRIDE_{python,typescript}_API.md,
verified against packages/client-{python,typescript}/src.

Corrections (would break copy-pasted code):
- Python: pipe() mime_type kwarg, constructor defaults, connect() signature
  + ConnectResult, use() threads default None + keyword-only, send() objinfo
  default None, addInstruction(title, instruction).
- TypeScript: Question.add* return void (no chaining), TASK_STATUS.state
  numeric enum + completed boolean polling, send() Promise<...| undefined>,
  connect() real PKCE signature, onConnectError ConnectionException type,
  setEvents pipeId param, dynamic answers field note.
- Both: removed phantom application/rocketride-tag MIME type (absent from
  the codebase); fixed unsubstantiated Node 16 requirement.

Additions (verified API surface that was undocumented):
- Python: auth/connection lifecycle, restart(), get_task_token(), streaming
  on_sse, exception hierarchy, top-level schema imports.
- TypeScript: auth/connection lifecycle, validate(), restart(),
  getTaskToken(), getTaskPipeline(), streaming onSSE, add/removeMonitor,
  exception classes.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants