Types¶
opencode.types has 725 generated models, unions and aliases, one for every request, response and event in the OpenCode contract. They are grouped by domain below. Use search (++slash++) to jump to a type by name.
| Group | Types | Examples |
|---|---|---|
| Agent | 5 | AgentColor, AgentGetResponse, AgentID |
| Config | 47 | ConfigAgent, ConfigAgentModel, ConfigAgentRequest |
| Connection | 4 | ConnectionCredentialInfo, ConnectionEnvInfo, ConnectionInfo |
| Credential | 7 | CredentialEntry, CredentialExternal, CredentialID |
| Error bodies | 34 | AgentNotFoundErrorBody, CommandExecutionErrorBody, CommandNotFoundErrorBody |
| Event | 5 | EventID, EventLogSynced, EventSeq |
| Events | 99 | AgentUpdatedEvent, CommandUpdatedEvent, ConfigUpdatedEvent |
| File | 6 | FileDiffInfo, FileFindResponse, FileListResponse |
| Form | 24 | FormAnswer, FormBooleanField, FormCancelledEventData |
| Instruction | 6 | InstructionEntryInfo, InstructionEntryKey, InstructionEntrySnapshot |
| Integration | 38 | IntegrationAttempt, IntegrationAttemptID, IntegrationAttemptStatus |
| Location | 5 | Location, LocationPublicInfo, LocationPublicInfoProject |
| MCP | 21 | McpAddConfig, McpListResponse, McpLocalConfig |
| Migration | 4 | MigrationV1StatusResponseOption1, MigrationV1StatusResponseOption2, MigrationV1StatusResponseOption2Progress |
| Model | 16 | ModelCacheFormat, ModelCapabilities, ModelCompatibility |
| Permission | 14 | PermissionAskedEventData, PermissionCreateResponse, PermissionEffect |
| Persistent PTY | 12 | PersistentPtyAddedEventData, PersistentPtyHandoff, PersistentPtyInfo |
| Plugin | 12 | PluginCheckResponse, PluginFeatures, PluginInfo |
| Project | 7 | Project, ProjectCommands, ProjectID |
| Prompt | 10 | PromptAgentAttachment, PromptBase64, PromptFileAttachment |
| Provider | 12 | ProviderCompaction, ProviderCompactionNative, ProviderCompactionSummary |
| PTY | 13 | Pty, PtyConnectTokenResponse, PtyCreateResponse |
| Reference | 5 | ReferenceGitSource, ReferenceInfo, ReferenceListResponse |
| Session | 160 | SessionActive, SessionAgentSelectedEventData, SessionAgentSelectedEventDurable |
| Session messages | 48 | SessionMessageAgentSelected, SessionMessageAgentSelectedTime, SessionMessageAssistant |
| Shell | 11 | ShellCreateResponse, ShellCreatedEventData, ShellDeletedEventData |
| Skill | 4 | SkillID, SkillInfo, SkillListResponse |
| TUI | 4 | TuiCommandExecuteEventData, TuiPromptAppendEventData, TuiSessionSelectEventData |
| Unknown | 31 | UnknownConfigEntry, UnknownConfigInfoMcpServersValue, UnknownConfigModelReasoning |
| VCS | 12 | VcsBase, VcsBaseResponse, VcsBranch |
| Voice | 8 | VoiceSessionResponse, VoiceSessionResponseData, VoiceTransport |
| Web | 5 | WebSearchID, WebSearchProvider, WebSearchResponse |
| Worktree | 7 | WorktreeDirectory, WorktreeErrorBodyData, WorktreeInfo |
| Miscellaneous | 29 | AbsolutePath, CommandInfo, CommandListResponse |