Expand description
OpenCode HTTP client and endpoint namespaces.
This module provides:
- low-level request primitives (
request_json,request_sse) - namespace wrappers for OpenCode endpoints
- operation-id dispatch helpers aligned with OpenCode OpenAPI specs
Structs§
- ApiResponse
- Unified JSON response envelope from OpenCode API calls.
- AppApi
- App endpoint namespace.
- AuthApi
- Auth endpoint namespace.
- Command
Api - Command endpoint namespace.
- Config
Api - Config endpoint namespace.
- Event
Api - Event endpoint namespace.
- FileApi
- File endpoint namespace.
- FindApi
- Find endpoint namespace.
- Formatter
Api - Formatter endpoint namespace.
- Global
Api - Global endpoint namespace.
- Instance
Api - Instance endpoint namespace.
- LspApi
- LSP endpoint namespace.
- McpApi
- MCP endpoint namespace.
- McpAuth
Api - MCP auth endpoint namespace.
- Oauth
Api - OAuth endpoint namespace under provider routes.
- Opencode
Client - OpenCode API client aligned with official JS SDK request semantics.
- Opencode
Client Config - Config for creating OpenCode HTTP client.
- PathApi
- Path endpoint namespace.
- Project
Api - Project endpoint namespace.
- Provider
Api - Provider endpoint namespace.
- PtyApi
- PTY endpoint namespace.
- Request
Options - HTTP request options compatible with OpenCode API endpoints.
- Session
Api - Session endpoint namespace.
- SseEvent
- Parsed SSE event from OpenCode streaming endpoints.
- ToolApi
- Tool endpoint namespace.
- TuiApi
- TUI endpoint namespace.
- TuiControl
Api - TUI control endpoint namespace.
- VcsApi
- VCS endpoint namespace.
Functions§
- create_
opencode_ client - Creates an OpenCode HTTP client from config.
Type Aliases§
- Control
Api - Backward-compatible alias for top-level control API access.
- SseStream
- Type alias for async SSE stream.