opencode_client 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/Gemfile.lock +102 -0
- data/README.md +423 -0
- data/Rakefile +10 -0
- data/docs/APIError.md +20 -0
- data/docs/APIErrorData.md +28 -0
- data/docs/Agent.md +46 -0
- data/docs/AgentConfig.md +38 -0
- data/docs/AgentConfigPermission.md +28 -0
- data/docs/AgentConfigPermissionBash.md +15 -0
- data/docs/AgentPart.md +28 -0
- data/docs/AgentPartInput.md +24 -0
- data/docs/AgentPartSource.md +22 -0
- data/docs/AgentPermission.md +28 -0
- data/docs/ApiAuth.md +20 -0
- data/docs/AppLogRequest.md +24 -0
- data/docs/AssistantMessage.md +46 -0
- data/docs/AssistantMessageError.md +20 -0
- data/docs/AssistantMessagePath.md +20 -0
- data/docs/AssistantMessageTime.md +20 -0
- data/docs/AssistantMessageTokens.md +24 -0
- data/docs/AssistantMessageTokensCache.md +20 -0
- data/docs/Auth.md +30 -0
- data/docs/BadRequestError.md +22 -0
- data/docs/Command.md +28 -0
- data/docs/CompactionPart.md +26 -0
- data/docs/Config.md +82 -0
- data/docs/ConfigAgent.md +30 -0
- data/docs/ConfigAutoupdate.md +15 -0
- data/docs/ConfigCommandValue.md +26 -0
- data/docs/ConfigCompaction.md +20 -0
- data/docs/ConfigEnterprise.md +18 -0
- data/docs/ConfigExperimental.md +30 -0
- data/docs/ConfigExperimentalHook.md +20 -0
- data/docs/ConfigExperimentalHookFileEditedValueInner.md +20 -0
- data/docs/ConfigFormatter.md +15 -0
- data/docs/ConfigFormatterAnyOfValue.md +24 -0
- data/docs/ConfigLsp.md +15 -0
- data/docs/ConfigLspAnyOfValue.md +26 -0
- data/docs/ConfigLspAnyOfValueAnyOf.md +18 -0
- data/docs/ConfigLspAnyOfValueAnyOf1.md +26 -0
- data/docs/ConfigMode.md +20 -0
- data/docs/ConfigProviders200Response.md +20 -0
- data/docs/ConfigTui.md +22 -0
- data/docs/ConfigTuiScrollAcceleration.md +18 -0
- data/docs/ConfigWatcher.md +18 -0
- data/docs/DefaultApi.md +5641 -0
- data/docs/Event.md +20 -0
- data/docs/EventCommandExecuted.md +20 -0
- data/docs/EventCommandExecutedProperties.md +24 -0
- data/docs/EventFileEdited.md +20 -0
- data/docs/EventFileEditedProperties.md +18 -0
- data/docs/EventFileWatcherUpdated.md +20 -0
- data/docs/EventFileWatcherUpdatedProperties.md +20 -0
- data/docs/EventGlobalDisposed.md +20 -0
- data/docs/EventInstallationUpdateAvailable.md +20 -0
- data/docs/EventInstallationUpdated.md +20 -0
- data/docs/EventInstallationUpdatedProperties.md +18 -0
- data/docs/EventLspClientDiagnostics.md +20 -0
- data/docs/EventLspClientDiagnosticsProperties.md +20 -0
- data/docs/EventLspUpdated.md +20 -0
- data/docs/EventMcpToolsChanged.md +20 -0
- data/docs/EventMcpToolsChangedProperties.md +18 -0
- data/docs/EventMessagePartRemoved.md +20 -0
- data/docs/EventMessagePartRemovedProperties.md +22 -0
- data/docs/EventMessagePartUpdated.md +20 -0
- data/docs/EventMessagePartUpdatedProperties.md +20 -0
- data/docs/EventMessageRemoved.md +20 -0
- data/docs/EventMessageRemovedProperties.md +20 -0
- data/docs/EventMessageUpdated.md +20 -0
- data/docs/EventMessageUpdatedProperties.md +18 -0
- data/docs/EventPermissionReplied.md +20 -0
- data/docs/EventPermissionRepliedProperties.md +22 -0
- data/docs/EventPermissionUpdated.md +20 -0
- data/docs/EventProjectUpdated.md +20 -0
- data/docs/EventPtyCreated.md +20 -0
- data/docs/EventPtyCreatedProperties.md +18 -0
- data/docs/EventPtyDeleted.md +20 -0
- data/docs/EventPtyDeletedProperties.md +18 -0
- data/docs/EventPtyExited.md +20 -0
- data/docs/EventPtyExitedProperties.md +20 -0
- data/docs/EventPtyUpdated.md +20 -0
- data/docs/EventServerConnected.md +20 -0
- data/docs/EventServerInstanceDisposed.md +20 -0
- data/docs/EventServerInstanceDisposedProperties.md +18 -0
- data/docs/EventSessionCompacted.md +20 -0
- data/docs/EventSessionCreated.md +20 -0
- data/docs/EventSessionCreatedProperties.md +18 -0
- data/docs/EventSessionDeleted.md +20 -0
- data/docs/EventSessionDiff.md +20 -0
- data/docs/EventSessionDiffProperties.md +20 -0
- data/docs/EventSessionError.md +20 -0
- data/docs/EventSessionErrorProperties.md +20 -0
- data/docs/EventSessionIdle.md +20 -0
- data/docs/EventSessionIdleProperties.md +18 -0
- data/docs/EventSessionStatus.md +20 -0
- data/docs/EventSessionStatusProperties.md +20 -0
- data/docs/EventSessionUpdated.md +20 -0
- data/docs/EventTodoUpdated.md +20 -0
- data/docs/EventTodoUpdatedProperties.md +20 -0
- data/docs/EventTuiCommandExecute.md +20 -0
- data/docs/EventTuiCommandExecuteProperties.md +18 -0
- data/docs/EventTuiCommandExecutePropertiesCommand.md +15 -0
- data/docs/EventTuiPromptAppend.md +20 -0
- data/docs/EventTuiToastShow.md +20 -0
- data/docs/EventVcsBranchUpdated.md +20 -0
- data/docs/EventVcsBranchUpdatedProperties.md +18 -0
- data/docs/File.md +24 -0
- data/docs/FileContent.md +28 -0
- data/docs/FileContentPatch.md +28 -0
- data/docs/FileContentPatchHunksInner.md +26 -0
- data/docs/FileDiff.md +26 -0
- data/docs/FileNode.md +26 -0
- data/docs/FilePart.md +32 -0
- data/docs/FilePartInput.md +28 -0
- data/docs/FilePartSource.md +28 -0
- data/docs/FilePartSourceText.md +22 -0
- data/docs/FileSource.md +22 -0
- data/docs/FindText200ResponseInner.md +26 -0
- data/docs/FindText200ResponseInnerPath.md +18 -0
- data/docs/FindText200ResponseInnerSubmatchesInner.md +22 -0
- data/docs/FormatterStatus.md +22 -0
- data/docs/GlobalEvent.md +20 -0
- data/docs/GlobalHealth200Response.md +20 -0
- data/docs/KeybindsConfig.md +188 -0
- data/docs/LSPStatus.md +24 -0
- data/docs/LayoutConfig.md +15 -0
- data/docs/LogLevel.md +15 -0
- data/docs/MCPStatus.md +20 -0
- data/docs/MCPStatusConnected.md +18 -0
- data/docs/MCPStatusDisabled.md +18 -0
- data/docs/MCPStatusFailed.md +20 -0
- data/docs/MCPStatusNeedsAuth.md +18 -0
- data/docs/MCPStatusNeedsClientRegistration.md +20 -0
- data/docs/McpAddRequest.md +20 -0
- data/docs/McpAddRequestConfig.md +32 -0
- data/docs/McpAuthCallbackRequest.md +18 -0
- data/docs/McpAuthRemove200Response.md +18 -0
- data/docs/McpAuthStart200Response.md +18 -0
- data/docs/McpLocalConfig.md +26 -0
- data/docs/McpOAuthConfig.md +22 -0
- data/docs/McpRemoteConfig.md +28 -0
- data/docs/McpRemoteConfigOauth.md +22 -0
- data/docs/Message.md +52 -0
- data/docs/MessageAbortedError.md +20 -0
- data/docs/MessageOutputLengthError.md +20 -0
- data/docs/Model.md +40 -0
- data/docs/ModelApi.md +22 -0
- data/docs/ModelCapabilities.md +30 -0
- data/docs/ModelCapabilitiesInput.md +26 -0
- data/docs/ModelCapabilitiesInterleaved.md +18 -0
- data/docs/ModelCapabilitiesInterleavedAnyOf.md +18 -0
- data/docs/ModelCost.md +24 -0
- data/docs/ModelCostExperimentalOver200K.md +22 -0
- data/docs/NotFoundError.md +20 -0
- data/docs/OAuth.md +26 -0
- data/docs/Part.md +76 -0
- data/docs/PartAnyOf.md +32 -0
- data/docs/PatchPart.md +28 -0
- data/docs/Path.md +26 -0
- data/docs/Permission.md +34 -0
- data/docs/PermissionPattern.md +15 -0
- data/docs/PermissionRespondRequest.md +18 -0
- data/docs/Project.md +28 -0
- data/docs/ProjectTime.md +22 -0
- data/docs/ProjectUpdateRequest.md +20 -0
- data/docs/ProjectUpdateRequestIcon.md +20 -0
- data/docs/Provider.md +30 -0
- data/docs/ProviderAuthAuthorization.md +22 -0
- data/docs/ProviderAuthError.md +20 -0
- data/docs/ProviderAuthErrorData.md +20 -0
- data/docs/ProviderAuthMethod.md +20 -0
- data/docs/ProviderConfig.md +34 -0
- data/docs/ProviderConfigModelsValue.md +50 -0
- data/docs/ProviderConfigModelsValueInterleaved.md +18 -0
- data/docs/ProviderConfigModelsValueInterleavedAnyOf.md +18 -0
- data/docs/ProviderConfigOptions.md +26 -0
- data/docs/ProviderConfigOptionsTimeout.md +15 -0
- data/docs/ProviderList200Response.md +22 -0
- data/docs/ProviderList200ResponseAllInner.md +28 -0
- data/docs/ProviderList200ResponseAllInnerModelsValue.md +50 -0
- data/docs/ProviderList200ResponseAllInnerModelsValueCost.md +26 -0
- data/docs/ProviderList200ResponseAllInnerModelsValueCostContextOver200k.md +24 -0
- data/docs/ProviderList200ResponseAllInnerModelsValueInterleaved.md +18 -0
- data/docs/ProviderList200ResponseAllInnerModelsValueInterleavedAnyOf.md +18 -0
- data/docs/ProviderList200ResponseAllInnerModelsValueLimit.md +20 -0
- data/docs/ProviderList200ResponseAllInnerModelsValueModalities.md +20 -0
- data/docs/ProviderList200ResponseAllInnerModelsValueProvider.md +18 -0
- data/docs/ProviderOauthAuthorizeRequest.md +18 -0
- data/docs/ProviderOauthCallbackRequest.md +20 -0
- data/docs/Pty.md +30 -0
- data/docs/PtyCreateRequest.md +26 -0
- data/docs/PtyUpdateRequest.md +20 -0
- data/docs/PtyUpdateRequestSize.md +20 -0
- data/docs/Range.md +20 -0
- data/docs/RangeStart.md +20 -0
- data/docs/ReasoningPart.md +30 -0
- data/docs/RetryPart.md +30 -0
- data/docs/ServerConfig.md +22 -0
- data/docs/Session.md +36 -0
- data/docs/SessionApi.md +145 -0
- data/docs/SessionCommandRequest.md +26 -0
- data/docs/SessionCreateRequest.md +20 -0
- data/docs/SessionForkRequest.md +18 -0
- data/docs/SessionInitRequest.md +22 -0
- data/docs/SessionMessages200ResponseInner.md +20 -0
- data/docs/SessionPrompt200Response.md +20 -0
- data/docs/SessionPromptRequest.md +30 -0
- data/docs/SessionPromptRequestModel.md +20 -0
- data/docs/SessionPromptRequestPartsInner.md +48 -0
- data/docs/SessionRevert.md +24 -0
- data/docs/SessionRevertRequest.md +20 -0
- data/docs/SessionShare.md +18 -0
- data/docs/SessionShellRequest.md +22 -0
- data/docs/SessionStatus.md +24 -0
- data/docs/SessionStatusAnyOf.md +18 -0
- data/docs/SessionStatusAnyOf1.md +24 -0
- data/docs/SessionStatusAnyOf2.md +18 -0
- data/docs/SessionSummarizeRequest.md +22 -0
- data/docs/SessionSummary.md +24 -0
- data/docs/SessionTime.md +24 -0
- data/docs/SessionUpdateRequest.md +20 -0
- data/docs/SessionUpdateRequestTime.md +18 -0
- data/docs/SnapshotPart.md +26 -0
- data/docs/StepFinishPart.md +32 -0
- data/docs/StepStartPart.md +26 -0
- data/docs/SubtaskPartInput.md +28 -0
- data/docs/Symbol.md +22 -0
- data/docs/SymbolLocation.md +20 -0
- data/docs/SymbolSource.md +28 -0
- data/docs/TextPart.md +34 -0
- data/docs/TextPartInput.md +30 -0
- data/docs/TextPartTime.md +20 -0
- data/docs/Todo.md +24 -0
- data/docs/ToolListItem.md +22 -0
- data/docs/ToolPart.md +32 -0
- data/docs/ToolState.md +34 -0
- data/docs/ToolStateCompleted.md +30 -0
- data/docs/ToolStateCompletedTime.md +22 -0
- data/docs/ToolStateError.md +26 -0
- data/docs/ToolStateErrorTime.md +20 -0
- data/docs/ToolStatePending.md +22 -0
- data/docs/ToolStateRunning.md +26 -0
- data/docs/ToolStateRunningTime.md +18 -0
- data/docs/TuiControlNext200Response.md +20 -0
- data/docs/TuiExecuteCommandRequest.md +18 -0
- data/docs/TuiPublishRequest.md +20 -0
- data/docs/TuiShowToastRequest.md +24 -0
- data/docs/UnknownError.md +20 -0
- data/docs/UnknownErrorData.md +18 -0
- data/docs/UserMessage.md +34 -0
- data/docs/UserMessageSummary.md +22 -0
- data/docs/UserMessageTime.md +18 -0
- data/docs/VcsInfo.md +18 -0
- data/docs/WellKnownAuth.md +22 -0
- data/git_push.sh +57 -0
- data/lib/opencode_client/api/default_api.rb +5442 -0
- data/lib/opencode_client/api/session_api.rb +164 -0
- data/lib/opencode_client/api_client.rb +374 -0
- data/lib/opencode_client/api_error.rb +58 -0
- data/lib/opencode_client/api_model_base.rb +88 -0
- data/lib/opencode_client/configuration.rb +288 -0
- data/lib/opencode_client/models/agent.rb +405 -0
- data/lib/opencode_client/models/agent_config.rb +316 -0
- data/lib/opencode_client/models/agent_config_permission.rb +262 -0
- data/lib/opencode_client/models/agent_config_permission_bash.rb +103 -0
- data/lib/opencode_client/models/agent_part.rb +301 -0
- data/lib/opencode_client/models/agent_part_input.rb +232 -0
- data/lib/opencode_client/models/agent_part_source.rb +252 -0
- data/lib/opencode_client/models/agent_permission.rb +287 -0
- data/lib/opencode_client/models/api_auth.rb +214 -0
- data/lib/opencode_client/models/api_error.rb +214 -0
- data/lib/opencode_client/models/api_error_data.rb +230 -0
- data/lib/opencode_client/models/app_log_request.rb +255 -0
- data/lib/opencode_client/models/assistant_message.rb +501 -0
- data/lib/opencode_client/models/assistant_message_error.rb +106 -0
- data/lib/opencode_client/models/assistant_message_path.rb +190 -0
- data/lib/opencode_client/models/assistant_message_time.rb +173 -0
- data/lib/opencode_client/models/assistant_message_tokens.rb +242 -0
- data/lib/opencode_client/models/assistant_message_tokens_cache.rb +190 -0
- data/lib/opencode_client/models/auth.rb +104 -0
- data/lib/opencode_client/models/bad_request_error.rb +228 -0
- data/lib/opencode_client/models/command.rb +226 -0
- data/lib/opencode_client/models/compaction_part.rb +292 -0
- data/lib/opencode_client/models/config.rb +500 -0
- data/lib/opencode_client/models/config_agent.rb +202 -0
- data/lib/opencode_client/models/config_autoupdate.rb +104 -0
- data/lib/opencode_client/models/config_command_value.rb +200 -0
- data/lib/opencode_client/models/config_compaction.rb +158 -0
- data/lib/opencode_client/models/config_enterprise.rb +148 -0
- data/lib/opencode_client/models/config_experimental.rb +208 -0
- data/lib/opencode_client/models/config_experimental_hook.rb +160 -0
- data/lib/opencode_client/models/config_experimental_hook_file_edited_value_inner.rb +177 -0
- data/lib/opencode_client/models/config_formatter.rb +103 -0
- data/lib/opencode_client/models/config_formatter_any_of_value.rb +180 -0
- data/lib/opencode_client/models/config_lsp.rb +103 -0
- data/lib/opencode_client/models/config_lsp_any_of_value.rb +103 -0
- data/lib/opencode_client/models/config_lsp_any_of_value_any_of.rb +188 -0
- data/lib/opencode_client/models/config_lsp_any_of_value_any_of1.rb +208 -0
- data/lib/opencode_client/models/config_mode.rb +157 -0
- data/lib/opencode_client/models/config_providers200_response.rb +194 -0
- data/lib/opencode_client/models/config_tui.rb +221 -0
- data/lib/opencode_client/models/config_tui_scroll_acceleration.rb +166 -0
- data/lib/opencode_client/models/config_watcher.rb +149 -0
- data/lib/opencode_client/models/event.rb +136 -0
- data/lib/opencode_client/models/event_command_executed.rb +214 -0
- data/lib/opencode_client/models/event_command_executed_properties.rb +264 -0
- data/lib/opencode_client/models/event_file_edited.rb +214 -0
- data/lib/opencode_client/models/event_file_edited_properties.rb +164 -0
- data/lib/opencode_client/models/event_file_watcher_updated.rb +214 -0
- data/lib/opencode_client/models/event_file_watcher_updated_properties.rb +214 -0
- data/lib/opencode_client/models/event_global_disposed.rb +214 -0
- data/lib/opencode_client/models/event_installation_update_available.rb +214 -0
- data/lib/opencode_client/models/event_installation_updated.rb +214 -0
- data/lib/opencode_client/models/event_installation_updated_properties.rb +164 -0
- data/lib/opencode_client/models/event_lsp_client_diagnostics.rb +214 -0
- data/lib/opencode_client/models/event_lsp_client_diagnostics_properties.rb +190 -0
- data/lib/opencode_client/models/event_lsp_updated.rb +214 -0
- data/lib/opencode_client/models/event_mcp_tools_changed.rb +214 -0
- data/lib/opencode_client/models/event_mcp_tools_changed_properties.rb +164 -0
- data/lib/opencode_client/models/event_message_part_removed.rb +214 -0
- data/lib/opencode_client/models/event_message_part_removed_properties.rb +216 -0
- data/lib/opencode_client/models/event_message_part_updated.rb +214 -0
- data/lib/opencode_client/models/event_message_part_updated_properties.rb +173 -0
- data/lib/opencode_client/models/event_message_removed.rb +214 -0
- data/lib/opencode_client/models/event_message_removed_properties.rb +190 -0
- data/lib/opencode_client/models/event_message_updated.rb +214 -0
- data/lib/opencode_client/models/event_message_updated_properties.rb +164 -0
- data/lib/opencode_client/models/event_permission_replied.rb +214 -0
- data/lib/opencode_client/models/event_permission_replied_properties.rb +216 -0
- data/lib/opencode_client/models/event_permission_updated.rb +214 -0
- data/lib/opencode_client/models/event_project_updated.rb +214 -0
- data/lib/opencode_client/models/event_pty_created.rb +214 -0
- data/lib/opencode_client/models/event_pty_created_properties.rb +164 -0
- data/lib/opencode_client/models/event_pty_deleted.rb +214 -0
- data/lib/opencode_client/models/event_pty_deleted_properties.rb +175 -0
- data/lib/opencode_client/models/event_pty_exited.rb +214 -0
- data/lib/opencode_client/models/event_pty_exited_properties.rb +201 -0
- data/lib/opencode_client/models/event_pty_updated.rb +214 -0
- data/lib/opencode_client/models/event_server_connected.rb +214 -0
- data/lib/opencode_client/models/event_server_instance_disposed.rb +214 -0
- data/lib/opencode_client/models/event_server_instance_disposed_properties.rb +164 -0
- data/lib/opencode_client/models/event_session_compacted.rb +214 -0
- data/lib/opencode_client/models/event_session_created.rb +214 -0
- data/lib/opencode_client/models/event_session_created_properties.rb +164 -0
- data/lib/opencode_client/models/event_session_deleted.rb +214 -0
- data/lib/opencode_client/models/event_session_diff.rb +214 -0
- data/lib/opencode_client/models/event_session_diff_properties.rb +192 -0
- data/lib/opencode_client/models/event_session_error.rb +214 -0
- data/lib/opencode_client/models/event_session_error_properties.rb +156 -0
- data/lib/opencode_client/models/event_session_idle.rb +214 -0
- data/lib/opencode_client/models/event_session_idle_properties.rb +164 -0
- data/lib/opencode_client/models/event_session_status.rb +214 -0
- data/lib/opencode_client/models/event_session_status_properties.rb +190 -0
- data/lib/opencode_client/models/event_session_updated.rb +214 -0
- data/lib/opencode_client/models/event_todo_updated.rb +214 -0
- data/lib/opencode_client/models/event_todo_updated_properties.rb +192 -0
- data/lib/opencode_client/models/event_tui_command_execute.rb +214 -0
- data/lib/opencode_client/models/event_tui_command_execute_properties.rb +164 -0
- data/lib/opencode_client/models/event_tui_command_execute_properties_command.rb +102 -0
- data/lib/opencode_client/models/event_tui_prompt_append.rb +214 -0
- data/lib/opencode_client/models/event_tui_toast_show.rb +214 -0
- data/lib/opencode_client/models/event_vcs_branch_updated.rb +214 -0
- data/lib/opencode_client/models/event_vcs_branch_updated_properties.rb +147 -0
- data/lib/opencode_client/models/file.rb +302 -0
- data/lib/opencode_client/models/file_content.rb +262 -0
- data/lib/opencode_client/models/file_content_patch.rb +245 -0
- data/lib/opencode_client/models/file_content_patch_hunks_inner.rb +270 -0
- data/lib/opencode_client/models/file_diff.rb +268 -0
- data/lib/opencode_client/models/file_node.rb +292 -0
- data/lib/opencode_client/models/file_part.rb +336 -0
- data/lib/opencode_client/models/file_part_input.rb +267 -0
- data/lib/opencode_client/models/file_part_source.rb +103 -0
- data/lib/opencode_client/models/file_part_source_text.rb +252 -0
- data/lib/opencode_client/models/file_source.rb +240 -0
- data/lib/opencode_client/models/find_text200_response_inner.rb +270 -0
- data/lib/opencode_client/models/find_text200_response_inner_path.rb +164 -0
- data/lib/opencode_client/models/find_text200_response_inner_submatches_inner.rb +216 -0
- data/lib/opencode_client/models/formatter_status.rb +218 -0
- data/lib/opencode_client/models/global_event.rb +190 -0
- data/lib/opencode_client/models/global_health200_response.rb +214 -0
- data/lib/opencode_client/models/keybinds_config.rb +1171 -0
- data/lib/opencode_client/models/layout_config.rb +40 -0
- data/lib/opencode_client/models/log_level.rb +42 -0
- data/lib/opencode_client/models/lsp_status.rb +266 -0
- data/lib/opencode_client/models/mcp_add_request.rb +190 -0
- data/lib/opencode_client/models/mcp_add_request_config.rb +103 -0
- data/lib/opencode_client/models/mcp_auth_callback_request.rb +165 -0
- data/lib/opencode_client/models/mcp_auth_remove200_response.rb +188 -0
- data/lib/opencode_client/models/mcp_auth_start200_response.rb +165 -0
- data/lib/opencode_client/models/mcp_local_config.rb +269 -0
- data/lib/opencode_client/models/mcp_o_auth_config.rb +168 -0
- data/lib/opencode_client/models/mcp_remote_config.rb +276 -0
- data/lib/opencode_client/models/mcp_remote_config_oauth.rb +104 -0
- data/lib/opencode_client/models/mcp_status.rb +106 -0
- data/lib/opencode_client/models/mcp_status_connected.rb +188 -0
- data/lib/opencode_client/models/mcp_status_disabled.rb +188 -0
- data/lib/opencode_client/models/mcp_status_failed.rb +214 -0
- data/lib/opencode_client/models/mcp_status_needs_auth.rb +188 -0
- data/lib/opencode_client/models/mcp_status_needs_client_registration.rb +214 -0
- data/lib/opencode_client/models/message.rb +103 -0
- data/lib/opencode_client/models/message_aborted_error.rb +214 -0
- data/lib/opencode_client/models/message_output_length_error.rb +214 -0
- data/lib/opencode_client/models/model.rb +461 -0
- data/lib/opencode_client/models/model_api.rb +216 -0
- data/lib/opencode_client/models/model_capabilities.rb +320 -0
- data/lib/opencode_client/models/model_capabilities_input.rb +268 -0
- data/lib/opencode_client/models/model_capabilities_interleaved.rb +103 -0
- data/lib/opencode_client/models/model_capabilities_interleaved_any_of.rb +188 -0
- data/lib/opencode_client/models/model_cost.rb +225 -0
- data/lib/opencode_client/models/model_cost_experimental_over200_k.rb +216 -0
- data/lib/opencode_client/models/not_found_error.rb +214 -0
- data/lib/opencode_client/models/o_auth.rb +275 -0
- data/lib/opencode_client/models/part.rb +113 -0
- data/lib/opencode_client/models/part_any_of.rb +353 -0
- data/lib/opencode_client/models/patch_part.rb +320 -0
- data/lib/opencode_client/models/path.rb +268 -0
- data/lib/opencode_client/models/permission.rb +340 -0
- data/lib/opencode_client/models/permission_pattern.rb +103 -0
- data/lib/opencode_client/models/permission_respond_request.rb +188 -0
- data/lib/opencode_client/models/project.rb +277 -0
- data/lib/opencode_client/models/project_time.rb +199 -0
- data/lib/opencode_client/models/project_update_request.rb +156 -0
- data/lib/opencode_client/models/project_update_request_icon.rb +156 -0
- data/lib/opencode_client/models/provider.rb +333 -0
- data/lib/opencode_client/models/provider_auth_authorization.rb +240 -0
- data/lib/opencode_client/models/provider_auth_error.rb +214 -0
- data/lib/opencode_client/models/provider_auth_error_data.rb +190 -0
- data/lib/opencode_client/models/provider_auth_method.rb +214 -0
- data/lib/opencode_client/models/provider_config.rb +227 -0
- data/lib/opencode_client/models/provider_config_models_value.rb +329 -0
- data/lib/opencode_client/models/provider_config_models_value_interleaved.rb +103 -0
- data/lib/opencode_client/models/provider_config_models_value_interleaved_any_of.rb +188 -0
- data/lib/opencode_client/models/provider_config_options.rb +185 -0
- data/lib/opencode_client/models/provider_config_options_timeout.rb +104 -0
- data/lib/opencode_client/models/provider_list200_response.rb +222 -0
- data/lib/opencode_client/models/provider_list200_response_all_inner.rb +264 -0
- data/lib/opencode_client/models/provider_list200_response_all_inner_models_value.rb +482 -0
- data/lib/opencode_client/models/provider_list200_response_all_inner_models_value_cost.rb +217 -0
- data/lib/opencode_client/models/provider_list200_response_all_inner_models_value_cost_context_over200k.rb +208 -0
- data/lib/opencode_client/models/provider_list200_response_all_inner_models_value_interleaved.rb +103 -0
- data/lib/opencode_client/models/provider_list200_response_all_inner_models_value_interleaved_any_of.rb +188 -0
- data/lib/opencode_client/models/provider_list200_response_all_inner_models_value_limit.rb +190 -0
- data/lib/opencode_client/models/provider_list200_response_all_inner_models_value_modalities.rb +196 -0
- data/lib/opencode_client/models/provider_list200_response_all_inner_models_value_provider.rb +164 -0
- data/lib/opencode_client/models/provider_oauth_authorize_request.rb +165 -0
- data/lib/opencode_client/models/provider_oauth_callback_request.rb +175 -0
- data/lib/opencode_client/models/pty.rb +357 -0
- data/lib/opencode_client/models/pty_create_request.rb +187 -0
- data/lib/opencode_client/models/pty_update_request.rb +156 -0
- data/lib/opencode_client/models/pty_update_request_size.rb +190 -0
- data/lib/opencode_client/models/range.rb +190 -0
- data/lib/opencode_client/models/range_start.rb +190 -0
- data/lib/opencode_client/models/reasoning_part.rb +329 -0
- data/lib/opencode_client/models/retry_part.rb +344 -0
- data/lib/opencode_client/models/server_config.rb +188 -0
- data/lib/opencode_client/models/session.rb +362 -0
- data/lib/opencode_client/models/session_command_request.rb +238 -0
- data/lib/opencode_client/models/session_create_request.rb +177 -0
- data/lib/opencode_client/models/session_fork_request.rb +168 -0
- data/lib/opencode_client/models/session_init_request.rb +227 -0
- data/lib/opencode_client/models/session_messages200_response_inner.rb +192 -0
- data/lib/opencode_client/models/session_prompt200_response.rb +192 -0
- data/lib/opencode_client/models/session_prompt_request.rb +243 -0
- data/lib/opencode_client/models/session_prompt_request_model.rb +190 -0
- data/lib/opencode_client/models/session_prompt_request_parts_inner.rb +105 -0
- data/lib/opencode_client/models/session_revert.rb +191 -0
- data/lib/opencode_client/models/session_revert_request.rb +205 -0
- data/lib/opencode_client/models/session_share.rb +164 -0
- data/lib/opencode_client/models/session_shell_request.rb +199 -0
- data/lib/opencode_client/models/session_status.rb +104 -0
- data/lib/opencode_client/models/session_status_any_of.rb +188 -0
- data/lib/opencode_client/models/session_status_any_of1.rb +266 -0
- data/lib/opencode_client/models/session_status_any_of2.rb +188 -0
- data/lib/opencode_client/models/session_summarize_request.rb +201 -0
- data/lib/opencode_client/models/session_summary.rb +227 -0
- data/lib/opencode_client/models/session_time.rb +208 -0
- data/lib/opencode_client/models/session_update_request.rb +156 -0
- data/lib/opencode_client/models/session_update_request_time.rb +147 -0
- data/lib/opencode_client/models/snapshot_part.rb +292 -0
- data/lib/opencode_client/models/step_finish_part.rb +353 -0
- data/lib/opencode_client/models/step_start_part.rb +275 -0
- data/lib/opencode_client/models/subtask_part_input.rb +284 -0
- data/lib/opencode_client/models/symbol.rb +216 -0
- data/lib/opencode_client/models/symbol_location.rb +190 -0
- data/lib/opencode_client/models/symbol_source.rb +336 -0
- data/lib/opencode_client/models/text_part.rb +330 -0
- data/lib/opencode_client/models/text_part_input.rb +261 -0
- data/lib/opencode_client/models/text_part_time.rb +173 -0
- data/lib/opencode_client/models/todo.rb +246 -0
- data/lib/opencode_client/models/tool_list_item.rb +202 -0
- data/lib/opencode_client/models/tool_part.rb +355 -0
- data/lib/opencode_client/models/tool_state.rb +105 -0
- data/lib/opencode_client/models/tool_state_completed.rb +333 -0
- data/lib/opencode_client/models/tool_state_completed_time.rb +199 -0
- data/lib/opencode_client/models/tool_state_error.rb +279 -0
- data/lib/opencode_client/models/tool_state_error_time.rb +190 -0
- data/lib/opencode_client/models/tool_state_pending.rb +242 -0
- data/lib/opencode_client/models/tool_state_running.rb +262 -0
- data/lib/opencode_client/models/tool_state_running_time.rb +164 -0
- data/lib/opencode_client/models/tui_control_next200_response.rb +176 -0
- data/lib/opencode_client/models/tui_execute_command_request.rb +164 -0
- data/lib/opencode_client/models/tui_publish_request.rb +104 -0
- data/lib/opencode_client/models/tui_show_toast_request.rb +235 -0
- data/lib/opencode_client/models/unknown_error.rb +214 -0
- data/lib/opencode_client/models/unknown_error_data.rb +164 -0
- data/lib/opencode_client/models/user_message.rb +347 -0
- data/lib/opencode_client/models/user_message_summary.rb +184 -0
- data/lib/opencode_client/models/user_message_time.rb +164 -0
- data/lib/opencode_client/models/vcs_info.rb +164 -0
- data/lib/opencode_client/models/well_known_auth.rb +240 -0
- data/lib/opencode_client/version.rb +15 -0
- data/lib/opencode_client.rb +291 -0
- data/opencode_client.gemspec +39 -0
- data/pkg/opencode_client-1.0.0.gem +0 -0
- data/spec/api/default_api_spec.rb +1090 -0
- data/spec/api/session_api_spec.rb +61 -0
- data/spec/models/agent_config_permission_bash_spec.rb +21 -0
- data/spec/models/agent_config_permission_spec.rb +82 -0
- data/spec/models/agent_config_spec.rb +100 -0
- data/spec/models/agent_part_input_spec.rb +58 -0
- data/spec/models/agent_part_source_spec.rb +48 -0
- data/spec/models/agent_part_spec.rb +70 -0
- data/spec/models/agent_permission_spec.rb +90 -0
- data/spec/models/agent_spec.rb +124 -0
- data/spec/models/api_auth_spec.rb +46 -0
- data/spec/models/api_error_data_spec.rb +66 -0
- data/spec/models/api_error_spec.rb +46 -0
- data/spec/models/app_log_request_spec.rb +58 -0
- data/spec/models/assistant_message_error_spec.rb +21 -0
- data/spec/models/assistant_message_path_spec.rb +42 -0
- data/spec/models/assistant_message_spec.rb +124 -0
- data/spec/models/assistant_message_time_spec.rb +42 -0
- data/spec/models/assistant_message_tokens_cache_spec.rb +42 -0
- data/spec/models/assistant_message_tokens_spec.rb +54 -0
- data/spec/models/auth_spec.rb +21 -0
- data/spec/models/bad_request_error_spec.rb +52 -0
- data/spec/models/command_spec.rb +66 -0
- data/spec/models/compaction_part_spec.rb +64 -0
- data/spec/models/config_agent_spec.rb +72 -0
- data/spec/models/config_autoupdate_spec.rb +21 -0
- data/spec/models/config_command_value_spec.rb +60 -0
- data/spec/models/config_compaction_spec.rb +42 -0
- data/spec/models/config_enterprise_spec.rb +36 -0
- data/spec/models/config_experimental_hook_file_edited_value_inner_spec.rb +42 -0
- data/spec/models/config_experimental_hook_spec.rb +42 -0
- data/spec/models/config_experimental_spec.rb +72 -0
- data/spec/models/config_formatter_any_of_value_spec.rb +54 -0
- data/spec/models/config_formatter_spec.rb +21 -0
- data/spec/models/config_lsp_any_of_value_any_of1_spec.rb +60 -0
- data/spec/models/config_lsp_any_of_value_any_of_spec.rb +40 -0
- data/spec/models/config_lsp_any_of_value_spec.rb +21 -0
- data/spec/models/config_lsp_spec.rb +21 -0
- data/spec/models/config_mode_spec.rb +42 -0
- data/spec/models/config_providers200_response_spec.rb +42 -0
- data/spec/models/config_spec.rb +232 -0
- data/spec/models/config_tui_scroll_acceleration_spec.rb +36 -0
- data/spec/models/config_tui_spec.rb +52 -0
- data/spec/models/config_watcher_spec.rb +36 -0
- data/spec/models/event_command_executed_properties_spec.rb +54 -0
- data/spec/models/event_command_executed_spec.rb +46 -0
- data/spec/models/event_file_edited_properties_spec.rb +36 -0
- data/spec/models/event_file_edited_spec.rb +46 -0
- data/spec/models/event_file_watcher_updated_properties_spec.rb +46 -0
- data/spec/models/event_file_watcher_updated_spec.rb +46 -0
- data/spec/models/event_global_disposed_spec.rb +46 -0
- data/spec/models/event_installation_update_available_spec.rb +46 -0
- data/spec/models/event_installation_updated_properties_spec.rb +36 -0
- data/spec/models/event_installation_updated_spec.rb +46 -0
- data/spec/models/event_lsp_client_diagnostics_properties_spec.rb +42 -0
- data/spec/models/event_lsp_client_diagnostics_spec.rb +46 -0
- data/spec/models/event_lsp_updated_spec.rb +46 -0
- data/spec/models/event_mcp_tools_changed_properties_spec.rb +36 -0
- data/spec/models/event_mcp_tools_changed_spec.rb +46 -0
- data/spec/models/event_message_part_removed_properties_spec.rb +48 -0
- data/spec/models/event_message_part_removed_spec.rb +46 -0
- data/spec/models/event_message_part_updated_properties_spec.rb +42 -0
- data/spec/models/event_message_part_updated_spec.rb +46 -0
- data/spec/models/event_message_removed_properties_spec.rb +42 -0
- data/spec/models/event_message_removed_spec.rb +46 -0
- data/spec/models/event_message_updated_properties_spec.rb +36 -0
- data/spec/models/event_message_updated_spec.rb +46 -0
- data/spec/models/event_permission_replied_properties_spec.rb +48 -0
- data/spec/models/event_permission_replied_spec.rb +46 -0
- data/spec/models/event_permission_updated_spec.rb +46 -0
- data/spec/models/event_project_updated_spec.rb +46 -0
- data/spec/models/event_pty_created_properties_spec.rb +36 -0
- data/spec/models/event_pty_created_spec.rb +46 -0
- data/spec/models/event_pty_deleted_properties_spec.rb +36 -0
- data/spec/models/event_pty_deleted_spec.rb +46 -0
- data/spec/models/event_pty_exited_properties_spec.rb +42 -0
- data/spec/models/event_pty_exited_spec.rb +46 -0
- data/spec/models/event_pty_updated_spec.rb +46 -0
- data/spec/models/event_server_connected_spec.rb +46 -0
- data/spec/models/event_server_instance_disposed_properties_spec.rb +36 -0
- data/spec/models/event_server_instance_disposed_spec.rb +46 -0
- data/spec/models/event_session_compacted_spec.rb +46 -0
- data/spec/models/event_session_created_properties_spec.rb +36 -0
- data/spec/models/event_session_created_spec.rb +46 -0
- data/spec/models/event_session_deleted_spec.rb +46 -0
- data/spec/models/event_session_diff_properties_spec.rb +42 -0
- data/spec/models/event_session_diff_spec.rb +46 -0
- data/spec/models/event_session_error_properties_spec.rb +42 -0
- data/spec/models/event_session_error_spec.rb +46 -0
- data/spec/models/event_session_idle_properties_spec.rb +36 -0
- data/spec/models/event_session_idle_spec.rb +46 -0
- data/spec/models/event_session_status_properties_spec.rb +42 -0
- data/spec/models/event_session_status_spec.rb +46 -0
- data/spec/models/event_session_updated_spec.rb +46 -0
- data/spec/models/event_spec.rb +21 -0
- data/spec/models/event_todo_updated_properties_spec.rb +42 -0
- data/spec/models/event_todo_updated_spec.rb +46 -0
- data/spec/models/event_tui_command_execute_properties_command_spec.rb +21 -0
- data/spec/models/event_tui_command_execute_properties_spec.rb +36 -0
- data/spec/models/event_tui_command_execute_spec.rb +46 -0
- data/spec/models/event_tui_prompt_append_spec.rb +46 -0
- data/spec/models/event_tui_toast_show_spec.rb +46 -0
- data/spec/models/event_vcs_branch_updated_properties_spec.rb +36 -0
- data/spec/models/event_vcs_branch_updated_spec.rb +46 -0
- data/spec/models/file_content_patch_hunks_inner_spec.rb +60 -0
- data/spec/models/file_content_patch_spec.rb +66 -0
- data/spec/models/file_content_spec.rb +74 -0
- data/spec/models/file_diff_spec.rb +60 -0
- data/spec/models/file_node_spec.rb +64 -0
- data/spec/models/file_part_input_spec.rb +70 -0
- data/spec/models/file_part_source_spec.rb +21 -0
- data/spec/models/file_part_source_text_spec.rb +48 -0
- data/spec/models/file_part_spec.rb +82 -0
- data/spec/models/file_source_spec.rb +52 -0
- data/spec/models/file_spec.rb +58 -0
- data/spec/models/find_text200_response_inner_path_spec.rb +36 -0
- data/spec/models/find_text200_response_inner_spec.rb +60 -0
- data/spec/models/find_text200_response_inner_submatches_inner_spec.rb +48 -0
- data/spec/models/formatter_status_spec.rb +48 -0
- data/spec/models/global_event_spec.rb +42 -0
- data/spec/models/global_health200_response_spec.rb +46 -0
- data/spec/models/keybinds_config_spec.rb +546 -0
- data/spec/models/layout_config_spec.rb +30 -0
- data/spec/models/log_level_spec.rb +30 -0
- data/spec/models/lsp_status_spec.rb +58 -0
- data/spec/models/mcp_add_request_config_spec.rb +21 -0
- data/spec/models/mcp_add_request_spec.rb +42 -0
- data/spec/models/mcp_auth_callback_request_spec.rb +36 -0
- data/spec/models/mcp_auth_remove200_response_spec.rb +40 -0
- data/spec/models/mcp_auth_start200_response_spec.rb +36 -0
- data/spec/models/mcp_local_config_spec.rb +64 -0
- data/spec/models/mcp_o_auth_config_spec.rb +48 -0
- data/spec/models/mcp_remote_config_oauth_spec.rb +21 -0
- data/spec/models/mcp_remote_config_spec.rb +70 -0
- data/spec/models/mcp_status_connected_spec.rb +40 -0
- data/spec/models/mcp_status_disabled_spec.rb +40 -0
- data/spec/models/mcp_status_failed_spec.rb +46 -0
- data/spec/models/mcp_status_needs_auth_spec.rb +40 -0
- data/spec/models/mcp_status_needs_client_registration_spec.rb +46 -0
- data/spec/models/mcp_status_spec.rb +21 -0
- data/spec/models/message_aborted_error_spec.rb +46 -0
- data/spec/models/message_output_length_error_spec.rb +46 -0
- data/spec/models/message_spec.rb +21 -0
- data/spec/models/model_api_spec.rb +48 -0
- data/spec/models/model_capabilities_input_spec.rb +60 -0
- data/spec/models/model_capabilities_interleaved_any_of_spec.rb +40 -0
- data/spec/models/model_capabilities_interleaved_spec.rb +21 -0
- data/spec/models/model_capabilities_spec.rb +72 -0
- data/spec/models/model_cost_experimental_over200_k_spec.rb +48 -0
- data/spec/models/model_cost_spec.rb +54 -0
- data/spec/models/model_spec.rb +106 -0
- data/spec/models/not_found_error_spec.rb +46 -0
- data/spec/models/o_auth_spec.rb +64 -0
- data/spec/models/part_any_of_spec.rb +82 -0
- data/spec/models/part_spec.rb +21 -0
- data/spec/models/patch_part_spec.rb +70 -0
- data/spec/models/path_spec.rb +60 -0
- data/spec/models/permission_pattern_spec.rb +21 -0
- data/spec/models/permission_respond_request_spec.rb +40 -0
- data/spec/models/permission_spec.rb +84 -0
- data/spec/models/project_spec.rb +70 -0
- data/spec/models/project_time_spec.rb +48 -0
- data/spec/models/project_update_request_icon_spec.rb +42 -0
- data/spec/models/project_update_request_spec.rb +42 -0
- data/spec/models/provider_auth_authorization_spec.rb +52 -0
- data/spec/models/provider_auth_error_data_spec.rb +42 -0
- data/spec/models/provider_auth_error_spec.rb +46 -0
- data/spec/models/provider_auth_method_spec.rb +46 -0
- data/spec/models/provider_config_models_value_interleaved_any_of_spec.rb +40 -0
- data/spec/models/provider_config_models_value_interleaved_spec.rb +21 -0
- data/spec/models/provider_config_models_value_spec.rb +136 -0
- data/spec/models/provider_config_options_spec.rb +60 -0
- data/spec/models/provider_config_options_timeout_spec.rb +21 -0
- data/spec/models/provider_config_spec.rb +84 -0
- data/spec/models/provider_list200_response_all_inner_models_value_cost_context_over200k_spec.rb +54 -0
- data/spec/models/provider_list200_response_all_inner_models_value_cost_spec.rb +60 -0
- data/spec/models/provider_list200_response_all_inner_models_value_interleaved_any_of_spec.rb +40 -0
- data/spec/models/provider_list200_response_all_inner_models_value_interleaved_spec.rb +21 -0
- data/spec/models/provider_list200_response_all_inner_models_value_limit_spec.rb +42 -0
- data/spec/models/provider_list200_response_all_inner_models_value_modalities_spec.rb +50 -0
- data/spec/models/provider_list200_response_all_inner_models_value_provider_spec.rb +36 -0
- data/spec/models/provider_list200_response_all_inner_models_value_spec.rb +136 -0
- data/spec/models/provider_list200_response_all_inner_spec.rb +66 -0
- data/spec/models/provider_list200_response_spec.rb +48 -0
- data/spec/models/provider_oauth_authorize_request_spec.rb +36 -0
- data/spec/models/provider_oauth_callback_request_spec.rb +42 -0
- data/spec/models/provider_spec.rb +76 -0
- data/spec/models/pty_create_request_spec.rb +60 -0
- data/spec/models/pty_spec.rb +76 -0
- data/spec/models/pty_update_request_size_spec.rb +42 -0
- data/spec/models/pty_update_request_spec.rb +42 -0
- data/spec/models/range_spec.rb +42 -0
- data/spec/models/range_start_spec.rb +42 -0
- data/spec/models/reasoning_part_spec.rb +76 -0
- data/spec/models/retry_part_spec.rb +76 -0
- data/spec/models/server_config_spec.rb +48 -0
- data/spec/models/session_command_request_spec.rb +60 -0
- data/spec/models/session_create_request_spec.rb +42 -0
- data/spec/models/session_fork_request_spec.rb +36 -0
- data/spec/models/session_init_request_spec.rb +48 -0
- data/spec/models/session_messages200_response_inner_spec.rb +42 -0
- data/spec/models/session_prompt200_response_spec.rb +42 -0
- data/spec/models/session_prompt_request_model_spec.rb +42 -0
- data/spec/models/session_prompt_request_parts_inner_spec.rb +21 -0
- data/spec/models/session_prompt_request_spec.rb +72 -0
- data/spec/models/session_revert_request_spec.rb +42 -0
- data/spec/models/session_revert_spec.rb +54 -0
- data/spec/models/session_share_spec.rb +36 -0
- data/spec/models/session_shell_request_spec.rb +48 -0
- data/spec/models/session_spec.rb +90 -0
- data/spec/models/session_status_any_of1_spec.rb +58 -0
- data/spec/models/session_status_any_of2_spec.rb +40 -0
- data/spec/models/session_status_any_of_spec.rb +40 -0
- data/spec/models/session_status_spec.rb +21 -0
- data/spec/models/session_summarize_request_spec.rb +48 -0
- data/spec/models/session_summary_spec.rb +54 -0
- data/spec/models/session_time_spec.rb +54 -0
- data/spec/models/session_update_request_spec.rb +42 -0
- data/spec/models/session_update_request_time_spec.rb +36 -0
- data/spec/models/snapshot_part_spec.rb +64 -0
- data/spec/models/step_finish_part_spec.rb +82 -0
- data/spec/models/step_start_part_spec.rb +64 -0
- data/spec/models/subtask_part_input_spec.rb +70 -0
- data/spec/models/symbol_location_spec.rb +42 -0
- data/spec/models/symbol_source_spec.rb +70 -0
- data/spec/models/symbol_spec.rb +48 -0
- data/spec/models/text_part_input_spec.rb +76 -0
- data/spec/models/text_part_spec.rb +88 -0
- data/spec/models/text_part_time_spec.rb +42 -0
- data/spec/models/todo_spec.rb +54 -0
- data/spec/models/tool_list_item_spec.rb +48 -0
- data/spec/models/tool_part_spec.rb +82 -0
- data/spec/models/tool_state_completed_spec.rb +76 -0
- data/spec/models/tool_state_completed_time_spec.rb +48 -0
- data/spec/models/tool_state_error_spec.rb +64 -0
- data/spec/models/tool_state_error_time_spec.rb +42 -0
- data/spec/models/tool_state_pending_spec.rb +52 -0
- data/spec/models/tool_state_running_spec.rb +64 -0
- data/spec/models/tool_state_running_time_spec.rb +36 -0
- data/spec/models/tool_state_spec.rb +21 -0
- data/spec/models/tui_control_next200_response_spec.rb +42 -0
- data/spec/models/tui_execute_command_request_spec.rb +36 -0
- data/spec/models/tui_publish_request_spec.rb +21 -0
- data/spec/models/tui_show_toast_request_spec.rb +58 -0
- data/spec/models/unknown_error_data_spec.rb +36 -0
- data/spec/models/unknown_error_spec.rb +46 -0
- data/spec/models/user_message_spec.rb +88 -0
- data/spec/models/user_message_summary_spec.rb +48 -0
- data/spec/models/user_message_time_spec.rb +36 -0
- data/spec/models/vcs_info_spec.rb +36 -0
- data/spec/models/well_known_auth_spec.rb +52 -0
- data/spec/spec_helper.rb +111 -0
- metadata +1099 -0
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#opencode
|
|
3
|
+
|
|
4
|
+
#opencode api
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.18.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module OpencodeClient
|
|
17
|
+
class ModelCapabilities < ApiModelBase
|
|
18
|
+
attr_accessor :temperature
|
|
19
|
+
|
|
20
|
+
attr_accessor :reasoning
|
|
21
|
+
|
|
22
|
+
attr_accessor :attachment
|
|
23
|
+
|
|
24
|
+
attr_accessor :toolcall
|
|
25
|
+
|
|
26
|
+
attr_accessor :input
|
|
27
|
+
|
|
28
|
+
attr_accessor :output
|
|
29
|
+
|
|
30
|
+
attr_accessor :interleaved
|
|
31
|
+
|
|
32
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
33
|
+
def self.attribute_map
|
|
34
|
+
{
|
|
35
|
+
:'temperature' => :'temperature',
|
|
36
|
+
:'reasoning' => :'reasoning',
|
|
37
|
+
:'attachment' => :'attachment',
|
|
38
|
+
:'toolcall' => :'toolcall',
|
|
39
|
+
:'input' => :'input',
|
|
40
|
+
:'output' => :'output',
|
|
41
|
+
:'interleaved' => :'interleaved'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Returns attribute mapping this model knows about
|
|
46
|
+
def self.acceptable_attribute_map
|
|
47
|
+
attribute_map
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Returns all the JSON keys this model knows about
|
|
51
|
+
def self.acceptable_attributes
|
|
52
|
+
acceptable_attribute_map.values
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Attribute type mapping.
|
|
56
|
+
def self.openapi_types
|
|
57
|
+
{
|
|
58
|
+
:'temperature' => :'Boolean',
|
|
59
|
+
:'reasoning' => :'Boolean',
|
|
60
|
+
:'attachment' => :'Boolean',
|
|
61
|
+
:'toolcall' => :'Boolean',
|
|
62
|
+
:'input' => :'ModelCapabilitiesInput',
|
|
63
|
+
:'output' => :'ModelCapabilitiesInput',
|
|
64
|
+
:'interleaved' => :'ModelCapabilitiesInterleaved'
|
|
65
|
+
}
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# List of attributes with nullable: true
|
|
69
|
+
def self.openapi_nullable
|
|
70
|
+
Set.new([
|
|
71
|
+
])
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Initializes the object
|
|
75
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
76
|
+
def initialize(attributes = {})
|
|
77
|
+
if (!attributes.is_a?(Hash))
|
|
78
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `OpencodeClient::ModelCapabilities` initialize method"
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
82
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
83
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
84
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
85
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `OpencodeClient::ModelCapabilities`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
86
|
+
end
|
|
87
|
+
h[k.to_sym] = v
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
if attributes.key?(:'temperature')
|
|
91
|
+
self.temperature = attributes[:'temperature']
|
|
92
|
+
else
|
|
93
|
+
self.temperature = nil
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
if attributes.key?(:'reasoning')
|
|
97
|
+
self.reasoning = attributes[:'reasoning']
|
|
98
|
+
else
|
|
99
|
+
self.reasoning = nil
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
if attributes.key?(:'attachment')
|
|
103
|
+
self.attachment = attributes[:'attachment']
|
|
104
|
+
else
|
|
105
|
+
self.attachment = nil
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
if attributes.key?(:'toolcall')
|
|
109
|
+
self.toolcall = attributes[:'toolcall']
|
|
110
|
+
else
|
|
111
|
+
self.toolcall = nil
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
if attributes.key?(:'input')
|
|
115
|
+
self.input = attributes[:'input']
|
|
116
|
+
else
|
|
117
|
+
self.input = nil
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
if attributes.key?(:'output')
|
|
121
|
+
self.output = attributes[:'output']
|
|
122
|
+
else
|
|
123
|
+
self.output = nil
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
if attributes.key?(:'interleaved')
|
|
127
|
+
self.interleaved = attributes[:'interleaved']
|
|
128
|
+
else
|
|
129
|
+
self.interleaved = nil
|
|
130
|
+
end
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
134
|
+
# @return Array for valid properties with the reasons
|
|
135
|
+
def list_invalid_properties
|
|
136
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
137
|
+
invalid_properties = Array.new
|
|
138
|
+
if @temperature.nil?
|
|
139
|
+
invalid_properties.push('invalid value for "temperature", temperature cannot be nil.')
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
if @reasoning.nil?
|
|
143
|
+
invalid_properties.push('invalid value for "reasoning", reasoning cannot be nil.')
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
if @attachment.nil?
|
|
147
|
+
invalid_properties.push('invalid value for "attachment", attachment cannot be nil.')
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
if @toolcall.nil?
|
|
151
|
+
invalid_properties.push('invalid value for "toolcall", toolcall cannot be nil.')
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
if @input.nil?
|
|
155
|
+
invalid_properties.push('invalid value for "input", input cannot be nil.')
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
if @output.nil?
|
|
159
|
+
invalid_properties.push('invalid value for "output", output cannot be nil.')
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
if @interleaved.nil?
|
|
163
|
+
invalid_properties.push('invalid value for "interleaved", interleaved cannot be nil.')
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
invalid_properties
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
# Check to see if the all the properties in the model are valid
|
|
170
|
+
# @return true if the model is valid
|
|
171
|
+
def valid?
|
|
172
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
173
|
+
return false if @temperature.nil?
|
|
174
|
+
return false if @reasoning.nil?
|
|
175
|
+
return false if @attachment.nil?
|
|
176
|
+
return false if @toolcall.nil?
|
|
177
|
+
return false if @input.nil?
|
|
178
|
+
return false if @output.nil?
|
|
179
|
+
return false if @interleaved.nil?
|
|
180
|
+
true
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
# Custom attribute writer method with validation
|
|
184
|
+
# @param [Object] temperature Value to be assigned
|
|
185
|
+
def temperature=(temperature)
|
|
186
|
+
if temperature.nil?
|
|
187
|
+
fail ArgumentError, 'temperature cannot be nil'
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
@temperature = temperature
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# Custom attribute writer method with validation
|
|
194
|
+
# @param [Object] reasoning Value to be assigned
|
|
195
|
+
def reasoning=(reasoning)
|
|
196
|
+
if reasoning.nil?
|
|
197
|
+
fail ArgumentError, 'reasoning cannot be nil'
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
@reasoning = reasoning
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
# Custom attribute writer method with validation
|
|
204
|
+
# @param [Object] attachment Value to be assigned
|
|
205
|
+
def attachment=(attachment)
|
|
206
|
+
if attachment.nil?
|
|
207
|
+
fail ArgumentError, 'attachment cannot be nil'
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
@attachment = attachment
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
# Custom attribute writer method with validation
|
|
214
|
+
# @param [Object] toolcall Value to be assigned
|
|
215
|
+
def toolcall=(toolcall)
|
|
216
|
+
if toolcall.nil?
|
|
217
|
+
fail ArgumentError, 'toolcall cannot be nil'
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
@toolcall = toolcall
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
# Custom attribute writer method with validation
|
|
224
|
+
# @param [Object] input Value to be assigned
|
|
225
|
+
def input=(input)
|
|
226
|
+
if input.nil?
|
|
227
|
+
fail ArgumentError, 'input cannot be nil'
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
@input = input
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
# Custom attribute writer method with validation
|
|
234
|
+
# @param [Object] output Value to be assigned
|
|
235
|
+
def output=(output)
|
|
236
|
+
if output.nil?
|
|
237
|
+
fail ArgumentError, 'output cannot be nil'
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
@output = output
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
# Custom attribute writer method with validation
|
|
244
|
+
# @param [Object] interleaved Value to be assigned
|
|
245
|
+
def interleaved=(interleaved)
|
|
246
|
+
if interleaved.nil?
|
|
247
|
+
fail ArgumentError, 'interleaved cannot be nil'
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
@interleaved = interleaved
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
# Checks equality by comparing each attribute.
|
|
254
|
+
# @param [Object] Object to be compared
|
|
255
|
+
def ==(o)
|
|
256
|
+
return true if self.equal?(o)
|
|
257
|
+
self.class == o.class &&
|
|
258
|
+
temperature == o.temperature &&
|
|
259
|
+
reasoning == o.reasoning &&
|
|
260
|
+
attachment == o.attachment &&
|
|
261
|
+
toolcall == o.toolcall &&
|
|
262
|
+
input == o.input &&
|
|
263
|
+
output == o.output &&
|
|
264
|
+
interleaved == o.interleaved
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
# @see the `==` method
|
|
268
|
+
# @param [Object] Object to be compared
|
|
269
|
+
def eql?(o)
|
|
270
|
+
self == o
|
|
271
|
+
end
|
|
272
|
+
|
|
273
|
+
# Calculates hash code according to all attributes.
|
|
274
|
+
# @return [Integer] Hash code
|
|
275
|
+
def hash
|
|
276
|
+
[temperature, reasoning, attachment, toolcall, input, output, interleaved].hash
|
|
277
|
+
end
|
|
278
|
+
|
|
279
|
+
# Builds the object from hash
|
|
280
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
281
|
+
# @return [Object] Returns the model itself
|
|
282
|
+
def self.build_from_hash(attributes)
|
|
283
|
+
return nil unless attributes.is_a?(Hash)
|
|
284
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
285
|
+
transformed_hash = {}
|
|
286
|
+
openapi_types.each_pair do |key, type|
|
|
287
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
288
|
+
transformed_hash["#{key}"] = nil
|
|
289
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
290
|
+
# check to ensure the input is an array given that the attribute
|
|
291
|
+
# is documented as an array but the input is not
|
|
292
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
293
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
294
|
+
end
|
|
295
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
296
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
297
|
+
end
|
|
298
|
+
end
|
|
299
|
+
new(transformed_hash)
|
|
300
|
+
end
|
|
301
|
+
|
|
302
|
+
# Returns the object in the form of hash
|
|
303
|
+
# @return [Hash] Returns the object in the form of hash
|
|
304
|
+
def to_hash
|
|
305
|
+
hash = {}
|
|
306
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
307
|
+
value = self.send(attr)
|
|
308
|
+
if value.nil?
|
|
309
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
310
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
311
|
+
end
|
|
312
|
+
|
|
313
|
+
hash[param] = _to_hash(value)
|
|
314
|
+
end
|
|
315
|
+
hash
|
|
316
|
+
end
|
|
317
|
+
|
|
318
|
+
end
|
|
319
|
+
|
|
320
|
+
end
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#opencode
|
|
3
|
+
|
|
4
|
+
#opencode api
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.18.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module OpencodeClient
|
|
17
|
+
class ModelCapabilitiesInput < ApiModelBase
|
|
18
|
+
attr_accessor :text
|
|
19
|
+
|
|
20
|
+
attr_accessor :audio
|
|
21
|
+
|
|
22
|
+
attr_accessor :image
|
|
23
|
+
|
|
24
|
+
attr_accessor :video
|
|
25
|
+
|
|
26
|
+
attr_accessor :pdf
|
|
27
|
+
|
|
28
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
29
|
+
def self.attribute_map
|
|
30
|
+
{
|
|
31
|
+
:'text' => :'text',
|
|
32
|
+
:'audio' => :'audio',
|
|
33
|
+
:'image' => :'image',
|
|
34
|
+
:'video' => :'video',
|
|
35
|
+
:'pdf' => :'pdf'
|
|
36
|
+
}
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Returns attribute mapping this model knows about
|
|
40
|
+
def self.acceptable_attribute_map
|
|
41
|
+
attribute_map
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Returns all the JSON keys this model knows about
|
|
45
|
+
def self.acceptable_attributes
|
|
46
|
+
acceptable_attribute_map.values
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Attribute type mapping.
|
|
50
|
+
def self.openapi_types
|
|
51
|
+
{
|
|
52
|
+
:'text' => :'Boolean',
|
|
53
|
+
:'audio' => :'Boolean',
|
|
54
|
+
:'image' => :'Boolean',
|
|
55
|
+
:'video' => :'Boolean',
|
|
56
|
+
:'pdf' => :'Boolean'
|
|
57
|
+
}
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# List of attributes with nullable: true
|
|
61
|
+
def self.openapi_nullable
|
|
62
|
+
Set.new([
|
|
63
|
+
])
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Initializes the object
|
|
67
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
68
|
+
def initialize(attributes = {})
|
|
69
|
+
if (!attributes.is_a?(Hash))
|
|
70
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `OpencodeClient::ModelCapabilitiesInput` initialize method"
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
74
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
75
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
76
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
77
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `OpencodeClient::ModelCapabilitiesInput`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
78
|
+
end
|
|
79
|
+
h[k.to_sym] = v
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if attributes.key?(:'text')
|
|
83
|
+
self.text = attributes[:'text']
|
|
84
|
+
else
|
|
85
|
+
self.text = nil
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
if attributes.key?(:'audio')
|
|
89
|
+
self.audio = attributes[:'audio']
|
|
90
|
+
else
|
|
91
|
+
self.audio = nil
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if attributes.key?(:'image')
|
|
95
|
+
self.image = attributes[:'image']
|
|
96
|
+
else
|
|
97
|
+
self.image = nil
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
if attributes.key?(:'video')
|
|
101
|
+
self.video = attributes[:'video']
|
|
102
|
+
else
|
|
103
|
+
self.video = nil
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
if attributes.key?(:'pdf')
|
|
107
|
+
self.pdf = attributes[:'pdf']
|
|
108
|
+
else
|
|
109
|
+
self.pdf = nil
|
|
110
|
+
end
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
114
|
+
# @return Array for valid properties with the reasons
|
|
115
|
+
def list_invalid_properties
|
|
116
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
117
|
+
invalid_properties = Array.new
|
|
118
|
+
if @text.nil?
|
|
119
|
+
invalid_properties.push('invalid value for "text", text cannot be nil.')
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
if @audio.nil?
|
|
123
|
+
invalid_properties.push('invalid value for "audio", audio cannot be nil.')
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
if @image.nil?
|
|
127
|
+
invalid_properties.push('invalid value for "image", image cannot be nil.')
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
if @video.nil?
|
|
131
|
+
invalid_properties.push('invalid value for "video", video cannot be nil.')
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
if @pdf.nil?
|
|
135
|
+
invalid_properties.push('invalid value for "pdf", pdf cannot be nil.')
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
invalid_properties
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# Check to see if the all the properties in the model are valid
|
|
142
|
+
# @return true if the model is valid
|
|
143
|
+
def valid?
|
|
144
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
145
|
+
return false if @text.nil?
|
|
146
|
+
return false if @audio.nil?
|
|
147
|
+
return false if @image.nil?
|
|
148
|
+
return false if @video.nil?
|
|
149
|
+
return false if @pdf.nil?
|
|
150
|
+
true
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# Custom attribute writer method with validation
|
|
154
|
+
# @param [Object] text Value to be assigned
|
|
155
|
+
def text=(text)
|
|
156
|
+
if text.nil?
|
|
157
|
+
fail ArgumentError, 'text cannot be nil'
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
@text = text
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
# Custom attribute writer method with validation
|
|
164
|
+
# @param [Object] audio Value to be assigned
|
|
165
|
+
def audio=(audio)
|
|
166
|
+
if audio.nil?
|
|
167
|
+
fail ArgumentError, 'audio cannot be nil'
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
@audio = audio
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# Custom attribute writer method with validation
|
|
174
|
+
# @param [Object] image Value to be assigned
|
|
175
|
+
def image=(image)
|
|
176
|
+
if image.nil?
|
|
177
|
+
fail ArgumentError, 'image cannot be nil'
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
@image = image
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
# Custom attribute writer method with validation
|
|
184
|
+
# @param [Object] video Value to be assigned
|
|
185
|
+
def video=(video)
|
|
186
|
+
if video.nil?
|
|
187
|
+
fail ArgumentError, 'video cannot be nil'
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
@video = video
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# Custom attribute writer method with validation
|
|
194
|
+
# @param [Object] pdf Value to be assigned
|
|
195
|
+
def pdf=(pdf)
|
|
196
|
+
if pdf.nil?
|
|
197
|
+
fail ArgumentError, 'pdf cannot be nil'
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
@pdf = pdf
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
# Checks equality by comparing each attribute.
|
|
204
|
+
# @param [Object] Object to be compared
|
|
205
|
+
def ==(o)
|
|
206
|
+
return true if self.equal?(o)
|
|
207
|
+
self.class == o.class &&
|
|
208
|
+
text == o.text &&
|
|
209
|
+
audio == o.audio &&
|
|
210
|
+
image == o.image &&
|
|
211
|
+
video == o.video &&
|
|
212
|
+
pdf == o.pdf
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
# @see the `==` method
|
|
216
|
+
# @param [Object] Object to be compared
|
|
217
|
+
def eql?(o)
|
|
218
|
+
self == o
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
# Calculates hash code according to all attributes.
|
|
222
|
+
# @return [Integer] Hash code
|
|
223
|
+
def hash
|
|
224
|
+
[text, audio, image, video, pdf].hash
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
# Builds the object from hash
|
|
228
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
229
|
+
# @return [Object] Returns the model itself
|
|
230
|
+
def self.build_from_hash(attributes)
|
|
231
|
+
return nil unless attributes.is_a?(Hash)
|
|
232
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
233
|
+
transformed_hash = {}
|
|
234
|
+
openapi_types.each_pair do |key, type|
|
|
235
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
236
|
+
transformed_hash["#{key}"] = nil
|
|
237
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
238
|
+
# check to ensure the input is an array given that the attribute
|
|
239
|
+
# is documented as an array but the input is not
|
|
240
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
241
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
242
|
+
end
|
|
243
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
244
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
245
|
+
end
|
|
246
|
+
end
|
|
247
|
+
new(transformed_hash)
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
# Returns the object in the form of hash
|
|
251
|
+
# @return [Hash] Returns the object in the form of hash
|
|
252
|
+
def to_hash
|
|
253
|
+
hash = {}
|
|
254
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
255
|
+
value = self.send(attr)
|
|
256
|
+
if value.nil?
|
|
257
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
258
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
hash[param] = _to_hash(value)
|
|
262
|
+
end
|
|
263
|
+
hash
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
end
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#opencode
|
|
3
|
+
|
|
4
|
+
#opencode api
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.18.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module OpencodeClient
|
|
17
|
+
module ModelCapabilitiesInterleaved
|
|
18
|
+
class << self
|
|
19
|
+
# List of class defined in anyOf (OpenAPI v3)
|
|
20
|
+
def openapi_any_of
|
|
21
|
+
[
|
|
22
|
+
:'Boolean',
|
|
23
|
+
:'ModelCapabilitiesInterleavedAnyOf'
|
|
24
|
+
]
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# Builds the object
|
|
28
|
+
# @param [Mixed] Data to be matched against the list of anyOf items
|
|
29
|
+
# @return [Object] Returns the model or the data itself
|
|
30
|
+
def build(data)
|
|
31
|
+
# Go through the list of anyOf items and attempt to identify the appropriate one.
|
|
32
|
+
# Note:
|
|
33
|
+
# - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
|
|
34
|
+
# due to the way the deserialization is made in the base_object template (it just casts without verifying).
|
|
35
|
+
# - TODO: scalar values are de facto behaving as if they were nullable.
|
|
36
|
+
# - TODO: logging when debugging is set.
|
|
37
|
+
openapi_any_of.each do |klass|
|
|
38
|
+
begin
|
|
39
|
+
next if klass == :AnyType # "nullable: true"
|
|
40
|
+
return find_and_cast_into_type(klass, data)
|
|
41
|
+
rescue # rescue all errors so we keep iterating even if the current item lookup raises
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
openapi_any_of.include?(:AnyType) ? data : nil
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
private
|
|
49
|
+
|
|
50
|
+
SchemaMismatchError = Class.new(StandardError)
|
|
51
|
+
|
|
52
|
+
# Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse.
|
|
53
|
+
def find_and_cast_into_type(klass, data)
|
|
54
|
+
return if data.nil?
|
|
55
|
+
|
|
56
|
+
case klass.to_s
|
|
57
|
+
when 'Boolean'
|
|
58
|
+
return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass)
|
|
59
|
+
when 'Float'
|
|
60
|
+
return data if data.instance_of?(Float)
|
|
61
|
+
when 'Integer'
|
|
62
|
+
return data if data.instance_of?(Integer)
|
|
63
|
+
when 'Time'
|
|
64
|
+
return Time.parse(data)
|
|
65
|
+
when 'Date'
|
|
66
|
+
return Date.iso8601(data)
|
|
67
|
+
when 'String'
|
|
68
|
+
return data if data.instance_of?(String)
|
|
69
|
+
when 'Object' # "type: object"
|
|
70
|
+
return data if data.instance_of?(Hash)
|
|
71
|
+
when /\AArray<(?<sub_type>.+)>\z/ # "type: array"
|
|
72
|
+
if data.instance_of?(Array)
|
|
73
|
+
sub_type = Regexp.last_match[:sub_type]
|
|
74
|
+
return data.map { |item| find_and_cast_into_type(sub_type, item) }
|
|
75
|
+
end
|
|
76
|
+
when /\AHash<String, (?<sub_type>.+)>\z/ # "type: object" with "additionalProperties: { ... }"
|
|
77
|
+
if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) }
|
|
78
|
+
sub_type = Regexp.last_match[:sub_type]
|
|
79
|
+
return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) }
|
|
80
|
+
end
|
|
81
|
+
else # model
|
|
82
|
+
const = OpencodeClient.const_get(klass)
|
|
83
|
+
if const
|
|
84
|
+
if const.respond_to?(:openapi_any_of) # nested anyOf model
|
|
85
|
+
model = const.build(data)
|
|
86
|
+
return model if model
|
|
87
|
+
else
|
|
88
|
+
# raise if data contains keys that are not known to the model
|
|
89
|
+
raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty?
|
|
90
|
+
model = const.build_from_hash(data)
|
|
91
|
+
return model if model
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
raise # if no match by now, raise
|
|
97
|
+
rescue
|
|
98
|
+
raise SchemaMismatchError, "#{data} doesn't match the #{klass} type"
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
end
|