Skip to content

Conversation

@agents-git-bot
Copy link
Contributor

@agents-git-bot agents-git-bot bot commented Dec 8, 2025

Summary

Documents the OpenCode integration feature added in sandbox-sdk PR #282.

OpenCode is an AI coding agent that can now run inside Sandbox containers with two access modes:

  • Web UI proxy - Full browser-based OpenCode experience
  • Programmatic SDK - Typed client for automated AI coding workflows

Documentation added

New guides

  • /sandbox-sdk/guides/opencode-integration/ - Complete how-to guide covering:
    • Web UI integration with proxyToOpencode()
    • Programmatic SDK access with createOpencode()
    • Configuration patterns (providers, ports, directories)
    • Process reuse behavior
    • Error handling

New API reference

  • /sandbox-sdk/api/opencode/ - Complete API documentation for:
    • createOpencodeServer() - Server lifecycle only
    • createOpencode() - Server + typed SDK client
    • proxyToOpencode() - Web UI request proxying
    • Types: OpencodeOptions, OpencodeServer, OpencodeResult
    • Error codes: OPENCODE_STARTUP_FAILED

Updated pages

  • /sandbox-sdk/ - Added OpenCode feature card and use case mention
  • /sandbox-sdk/api/ - Added OpenCode API card to index
  • /sandbox-sdk/configuration/dockerfile/ - Documented -opencode image variant

Style compliance

Documentation follows:

  • ✅ Diátaxis framework (separate how-to guide and API reference)
  • ✅ TypeScriptExample component for all code samples
  • ✅ Full relative links with trailing slashes
  • ✅ No contractions or exclamation marks
  • ✅ Meaningful link text (no "here" or "click here")

Related PR


🤖 Auto-synced from sandbox-sdk PR #282

@github-actions
Copy link
Contributor

github-actions bot commented Dec 8, 2025

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
/src/content/docs/sandbox/ @whoiskatrin, @ghostwriternr, @cloudflare/pcx-technical-writing, @cloudflare/ai-agents

@agents-git-bot
Copy link
Contributor Author

agents-git-bot bot commented Dec 8, 2025

Documentation Update

Updated this PR with comprehensive OpenCode integration documentation:

Files Added/Updated

  1. src/content/docs/sandbox/guides/opencode-integration.mdx - Complete how-to guide

    • Prerequisites and installation
    • Web UI integration pattern (simplest approach)
    • Programmatic SDK integration for automation
    • Configuration options and server lifecycle
    • Error handling and production considerations
  2. src/content/docs/sandbox/api/opencode.mdx - API reference

    • createOpencode() function with full parameters and examples
    • proxyToOpencode() function for web UI proxy
    • createSandboxFetch() for advanced use cases
    • All TypeScript interfaces and types
    • Multiple usage examples for each function
  3. src/content/docs/sandbox/api/index.mdx - Updated to include OpenCode card

Documentation Style

All content follows Cloudflare docs conventions:

  • Uses TypeScriptExample component for code blocks
  • Uses PackageManagers component for installation commands
  • Uses WranglerConfig component for Wrangler configuration
  • Full relative links with trailing slashes
  • No contractions, proper grammar
  • Diátaxis framework (reference + how-to separation)

Ready for review! 🚀

@agents-git-bot agents-git-bot bot force-pushed the sync-docs-pr-282 branch 2 times, most recently from 1efa89f to 208516c Compare December 8, 2025 12:31
@agents-git-bot
Copy link
Contributor Author

agents-git-bot bot commented Dec 8, 2025

Added OpenCode API reference documentation and container variants section:

New files:

  • /sandbox/api/opencode.mdx - Complete API reference for createOpencode() and proxyToOpencode() functions
    • Method signatures and parameters
    • Type definitions
    • Configuration options
    • Error handling
    • Code examples

Updated files:

  • /sandbox/configuration/dockerfile.mdx - Added container variants section documenting:
    • Default (no Python) variant
    • Python variant
    • OpenCode variant with usage guidance

This completes the documentation sync for PR #282.

@agents-git-bot
Copy link
Contributor Author

agents-git-bot bot commented Dec 9, 2025

📝 Documentation updated

Force-pushed updated documentation content. Changes include:

  • Complete how-to guide for both OpenCode usage patterns (web UI proxy and programmatic SDK)
  • Comprehensive configuration examples
  • Changelog entry for the feature
  • Follows all Cloudflare docs style guidelines (PackageManagers, TypeScriptExample, WranglerConfig components)

The documentation is ready for review.

@agents-git-bot
Copy link
Contributor Author

agents-git-bot bot commented Dec 9, 2025

Updated with comprehensive OpenCode integration documentation:

New Files

  • src/content/docs/sandbox/api/opencode.mdx - Complete API reference
  • src/content/docs/sandbox/guides/opencode-integration.mdx - Step-by-step how-to guide

Coverage

  • API reference for all three functions (createOpencode(), createOpencodeServer(), proxyToOpencode())
  • Web UI proxy approach (no SDK required)
  • Programmatic SDK access approach (typed client)
  • Docker image configuration
  • Wrangler configuration
  • API key handling
  • Error handling patterns
  • Best practices for production use
  • Troubleshooting guide

Source

Synced from PR cloudflare/sandbox-sdk#282

@agents-git-bot agents-git-bot bot force-pushed the sync-docs-pr-282 branch 2 times, most recently from 9075720 to b3647ad Compare December 10, 2025 19:31
@agents-git-bot agents-git-bot bot changed the title Add OpenCode integration for Sandbox SDK Sync docs for PR 282: Add OpenCode integration for Sandbox SDK Dec 10, 2025
Documents the new OpenCode integration feature added in PR #282,
including web UI proxy and programmatic SDK access patterns.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
@github-actions
Copy link
Contributor

CI run failed: build logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants