Skip to content

Add TypeScript client quickstart and configuration reference#25

Merged
amavashev merged 2 commits intomainfrom
claude/update-docs-review-719Zq
Mar 14, 2026
Merged

Add TypeScript client quickstart and configuration reference#25
amavashev merged 2 commits intomainfrom
claude/update-docs-review-719Zq

Conversation

@amavashev
Copy link
Contributor

Summary

This PR adds comprehensive documentation for the TypeScript/Node.js client library (runcycles), including a complete quickstart guide and configuration reference. It also updates navigation to surface the Python client quickstart as the primary entry point and adds a reference to the runaway agent demo in the incidents documentation.

Key Changes

  • New quickstart guide (getting-started-with-the-typescript-client.md): Complete walkthrough covering:

    • Installation and configuration (programmatic and environment variables)
    • withCycles higher-order function with fixed and dynamic estimates
    • Actual cost calculation and custom metrics
    • Runtime context access via getCyclesContext()
    • Decision handling and exception hierarchy
    • Streaming support with reserveForStream
    • Programmatic CyclesClient usage with wire format mappers
    • Progressive walkthrough examples (5 steps from basic to advanced)
    • Full lifecycle summary
  • New configuration reference (typescript-client-configuration-reference.md): Detailed reference for:

    • CyclesConfig constructor options (required fields, subject defaults, HTTP timeouts)
    • Retry configuration with exponential backoff explanation
    • Environment variable mapping with custom prefix support
    • Default client/config setup patterns
    • Subject field resolution order
  • Updated navigation (.vitepress/config.ts and index.md):

    • Changed primary quickstart link from "Deploy the Full Stack" to "Getting Started with the Python Client"
    • Maintains consistency across homepage and sidebar navigation
  • Enhanced incidents documentation (runaway-agents-tool-loops-and-budget-overruns-the-incidents-cycles-is-designed-to-prevent.md):

    • Added "See it in action: the runaway agent demo" section
    • References the cycles-runaway-demo repository
    • Includes setup instructions and explanation of the failure mode demonstration

Notable Implementation Details

  • Documentation covers all three usage patterns: withCycles HOF (simplest), reserveForStream (streaming), and CyclesClient (full control)
  • Includes complete exception hierarchy with use cases for each error type
  • Demonstrates both typed mappers and raw snake_case JSON for programmatic client usage
  • Retry configuration section explains exponential backoff with concrete examples
  • Progressive walkthrough guides users from basic fixed estimates to advanced metrics and error handling

https://claude.ai/code/session_01G5yRZBXrczLDVtrHzCZWdu

claude added 2 commits March 14, 2026 21:46
- Add TypeScript client quickstart (withCycles, reserveForStream, CyclesClient)
- Add TypeScript client configuration reference
- Reorder sidebar: integration guides first (Python, TypeScript, Spring Boot),
  ops guides after (architecture, deploy, self-hosting)
- Update homepage CTA to point to Python quickstart instead of deployment
- Add runaway demo reference and run instructions to incidents page
- Add TypeScript to homepage features description and incidents next steps

https://claude.ai/code/session_01G5yRZBXrczLDVtrHzCZWdu
- Update architecture diagram to show Spring, Python, Node.js, and HTTP agents
- Add TypeScript section to Deploy the Full Stack "Connect your application"
- Replace external GitHub Python client links with internal doc links across
  all 29 pages (concepts, protocol, how-to, quickstart)
- Add TypeScript client link to Next steps on every page

https://claude.ai/code/session_01G5yRZBXrczLDVtrHzCZWdu
@amavashev amavashev merged commit 8ac0f2f into main Mar 14, 2026
@amavashev amavashev deleted the claude/update-docs-review-719Zq branch March 17, 2026 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants