| Class | Description |
|---|---|
| Agent |
Represents an OpenCode agent, returned by
GET /agent. |
| ChatMessage |
OpenAI Chat Completions API message object (aligned with OpenClaw/Hermes).
|
| ChatRequest |
OpenAI Chat Completions API request body (aligned with OpenClaw/Hermes).
|
| ChatResponse |
OpenAI Chat Completions API response (aligned with OpenClaw/Hermes).
|
| ChatResponse.Choice |
响应中的一个选择。
|
| ChatResponse.Usage |
Token 使用统计。
|
| Command |
Represents a registered slash command in OpenCode, corresponding to a
GET /command response element. |
| FileContent |
Represents file content returned by
GET /file/content. |
| FileDiff |
Represents a file diff entry returned by
GET /session/:id/diff. |
| FileNode |
Represents a file or directory node returned by
GET /file or GET /file/status. |
| FileSearchResult |
Represents a ripgrep text search result returned by
GET /find. |
| FormatterStatus |
Represents the status of a code formatter, returned by
GET /formatter. |
| HealthStatus |
Represents the health check response from the OpenCode Server (
GET /global/health). |
| LspStatus |
Represents the status of an LSP server, returned by
GET /lsp. |
| McpStatus |
Represents the status of an MCP server, returned by
GET /mcp. |
| Message |
Represents an OpenCode message within a session.
|
| MessageInfo |
Detailed information for a single message, returned by
GET /session/:id/message/:messageID. |
| OpenCodeConfig |
Represents the OpenCode global or instance configuration, returned by
GET /config and GET /global/config. |
| OpenCodePath |
Represents OpenCode working directory paths, returned by
GET /path. |
| Part |
Represents a part of an OpenCode message (text, tool_use, tool_result, etc.).
|
| PermissionRequest |
Represents a pending permission request, returned by
GET /permission. |
| Project |
Represents an OpenCode project, returned by
GET /project and GET /project/current. |
| PromptRequest |
Request body for sending a message to the OpenCode Server (
POST /session/:id/message). |
| PromptRequest.ModelRef |
模型提供方与模型 ID 的协议引用。
|
| PromptResult |
Response body from the OpenCode Server prompt endpoint (
POST /session/:id/message). |
| Provider |
Represents an OpenCode provider, returned by
GET /provider. |
| ProviderAuthAuthorization |
Represents a provider OAuth authorization response, returned by
POST /provider/:id/oauth/authorize. |
| ProviderAuthMethod |
Represents a provider authentication method, returned in
GET /provider/auth. |
| ProviderList |
Container for the OpenCode provider list, returned by
GET /provider. |
| QuestionRequest |
Represents a pending question request, returned by
GET /question. |
| QuestionRequest.QuestionOption |
选项。
|
| Session |
Represents an OpenCode session.
|
| SessionStatus |
Represents the status of a single session, returned in
GET /session/status. |
| SessionTodo |
Represents a session todo item, returned by
GET /session/:id/todo. |
| Skill |
Represents a registered skill in OpenCode, returned by
GET /skill. |
| Symbol |
Represents an LSP workspace symbol, returned by
GET /find/symbol. |
| VcsInfo |
Represents VCS (Version Control System) information for the OpenCode working directory,
returned by
GET /vcs. |
Copyright © 2026. All rights reserved.