opencode_client 1.0.2 → 1.0.3
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 +4 -4
- data/README.md +4 -4
- data/lib/opencode_client/version.rb +1 -1
- metadata +2 -260
- data/Gemfile +0 -9
- data/Gemfile.lock +0 -102
- data/Rakefile +0 -10
- data/docs/APIError.md +0 -20
- data/docs/APIErrorData.md +0 -28
- data/docs/Agent.md +0 -46
- data/docs/AgentConfig.md +0 -38
- data/docs/AgentConfigPermission.md +0 -28
- data/docs/AgentConfigPermissionBash.md +0 -15
- data/docs/AgentPart.md +0 -28
- data/docs/AgentPartInput.md +0 -24
- data/docs/AgentPartSource.md +0 -22
- data/docs/AgentPermission.md +0 -28
- data/docs/ApiAuth.md +0 -20
- data/docs/AppLogRequest.md +0 -24
- data/docs/AssistantMessage.md +0 -46
- data/docs/AssistantMessageError.md +0 -20
- data/docs/AssistantMessagePath.md +0 -20
- data/docs/AssistantMessageTime.md +0 -20
- data/docs/AssistantMessageTokens.md +0 -24
- data/docs/AssistantMessageTokensCache.md +0 -20
- data/docs/Auth.md +0 -30
- data/docs/BadRequestError.md +0 -22
- data/docs/Command.md +0 -28
- data/docs/CompactionPart.md +0 -26
- data/docs/Config.md +0 -82
- data/docs/ConfigAgent.md +0 -30
- data/docs/ConfigAutoupdate.md +0 -15
- data/docs/ConfigCommandValue.md +0 -26
- data/docs/ConfigCompaction.md +0 -20
- data/docs/ConfigEnterprise.md +0 -18
- data/docs/ConfigExperimental.md +0 -30
- data/docs/ConfigExperimentalHook.md +0 -20
- data/docs/ConfigExperimentalHookFileEditedValueInner.md +0 -20
- data/docs/ConfigFormatter.md +0 -15
- data/docs/ConfigFormatterAnyOfValue.md +0 -24
- data/docs/ConfigLsp.md +0 -15
- data/docs/ConfigLspAnyOfValue.md +0 -26
- data/docs/ConfigLspAnyOfValueAnyOf.md +0 -18
- data/docs/ConfigLspAnyOfValueAnyOf1.md +0 -26
- data/docs/ConfigMode.md +0 -20
- data/docs/ConfigProviders200Response.md +0 -20
- data/docs/ConfigTui.md +0 -22
- data/docs/ConfigTuiScrollAcceleration.md +0 -18
- data/docs/ConfigWatcher.md +0 -18
- data/docs/DefaultApi.md +0 -5641
- data/docs/Event.md +0 -20
- data/docs/EventCommandExecuted.md +0 -20
- data/docs/EventCommandExecutedProperties.md +0 -24
- data/docs/EventFileEdited.md +0 -20
- data/docs/EventFileEditedProperties.md +0 -18
- data/docs/EventFileWatcherUpdated.md +0 -20
- data/docs/EventFileWatcherUpdatedProperties.md +0 -20
- data/docs/EventGlobalDisposed.md +0 -20
- data/docs/EventInstallationUpdateAvailable.md +0 -20
- data/docs/EventInstallationUpdated.md +0 -20
- data/docs/EventInstallationUpdatedProperties.md +0 -18
- data/docs/EventLspClientDiagnostics.md +0 -20
- data/docs/EventLspClientDiagnosticsProperties.md +0 -20
- data/docs/EventLspUpdated.md +0 -20
- data/docs/EventMcpToolsChanged.md +0 -20
- data/docs/EventMcpToolsChangedProperties.md +0 -18
- data/docs/EventMessagePartRemoved.md +0 -20
- data/docs/EventMessagePartRemovedProperties.md +0 -22
- data/docs/EventMessagePartUpdated.md +0 -20
- data/docs/EventMessagePartUpdatedProperties.md +0 -20
- data/docs/EventMessageRemoved.md +0 -20
- data/docs/EventMessageRemovedProperties.md +0 -20
- data/docs/EventMessageUpdated.md +0 -20
- data/docs/EventMessageUpdatedProperties.md +0 -18
- data/docs/EventPermissionReplied.md +0 -20
- data/docs/EventPermissionRepliedProperties.md +0 -22
- data/docs/EventPermissionUpdated.md +0 -20
- data/docs/EventProjectUpdated.md +0 -20
- data/docs/EventPtyCreated.md +0 -20
- data/docs/EventPtyCreatedProperties.md +0 -18
- data/docs/EventPtyDeleted.md +0 -20
- data/docs/EventPtyDeletedProperties.md +0 -18
- data/docs/EventPtyExited.md +0 -20
- data/docs/EventPtyExitedProperties.md +0 -20
- data/docs/EventPtyUpdated.md +0 -20
- data/docs/EventServerConnected.md +0 -20
- data/docs/EventServerInstanceDisposed.md +0 -20
- data/docs/EventServerInstanceDisposedProperties.md +0 -18
- data/docs/EventSessionCompacted.md +0 -20
- data/docs/EventSessionCreated.md +0 -20
- data/docs/EventSessionCreatedProperties.md +0 -18
- data/docs/EventSessionDeleted.md +0 -20
- data/docs/EventSessionDiff.md +0 -20
- data/docs/EventSessionDiffProperties.md +0 -20
- data/docs/EventSessionError.md +0 -20
- data/docs/EventSessionErrorProperties.md +0 -20
- data/docs/EventSessionIdle.md +0 -20
- data/docs/EventSessionIdleProperties.md +0 -18
- data/docs/EventSessionStatus.md +0 -20
- data/docs/EventSessionStatusProperties.md +0 -20
- data/docs/EventSessionUpdated.md +0 -20
- data/docs/EventTodoUpdated.md +0 -20
- data/docs/EventTodoUpdatedProperties.md +0 -20
- data/docs/EventTuiCommandExecute.md +0 -20
- data/docs/EventTuiCommandExecuteProperties.md +0 -18
- data/docs/EventTuiCommandExecutePropertiesCommand.md +0 -15
- data/docs/EventTuiPromptAppend.md +0 -20
- data/docs/EventTuiToastShow.md +0 -20
- data/docs/EventVcsBranchUpdated.md +0 -20
- data/docs/EventVcsBranchUpdatedProperties.md +0 -18
- data/docs/File.md +0 -24
- data/docs/FileContent.md +0 -28
- data/docs/FileContentPatch.md +0 -28
- data/docs/FileContentPatchHunksInner.md +0 -26
- data/docs/FileDiff.md +0 -26
- data/docs/FileNode.md +0 -26
- data/docs/FilePart.md +0 -32
- data/docs/FilePartInput.md +0 -28
- data/docs/FilePartSource.md +0 -28
- data/docs/FilePartSourceText.md +0 -22
- data/docs/FileSource.md +0 -22
- data/docs/FindText200ResponseInner.md +0 -26
- data/docs/FindText200ResponseInnerPath.md +0 -18
- data/docs/FindText200ResponseInnerSubmatchesInner.md +0 -22
- data/docs/FormatterStatus.md +0 -22
- data/docs/GlobalEvent.md +0 -20
- data/docs/GlobalHealth200Response.md +0 -20
- data/docs/KeybindsConfig.md +0 -188
- data/docs/LSPStatus.md +0 -24
- data/docs/LayoutConfig.md +0 -15
- data/docs/LogLevel.md +0 -15
- data/docs/MCPStatus.md +0 -20
- data/docs/MCPStatusConnected.md +0 -18
- data/docs/MCPStatusDisabled.md +0 -18
- data/docs/MCPStatusFailed.md +0 -20
- data/docs/MCPStatusNeedsAuth.md +0 -18
- data/docs/MCPStatusNeedsClientRegistration.md +0 -20
- data/docs/McpAddRequest.md +0 -20
- data/docs/McpAddRequestConfig.md +0 -32
- data/docs/McpAuthCallbackRequest.md +0 -18
- data/docs/McpAuthRemove200Response.md +0 -18
- data/docs/McpAuthStart200Response.md +0 -18
- data/docs/McpLocalConfig.md +0 -26
- data/docs/McpOAuthConfig.md +0 -22
- data/docs/McpRemoteConfig.md +0 -28
- data/docs/McpRemoteConfigOauth.md +0 -22
- data/docs/Message.md +0 -52
- data/docs/MessageAbortedError.md +0 -20
- data/docs/MessageOutputLengthError.md +0 -20
- data/docs/Model.md +0 -40
- data/docs/ModelApi.md +0 -22
- data/docs/ModelCapabilities.md +0 -30
- data/docs/ModelCapabilitiesInput.md +0 -26
- data/docs/ModelCapabilitiesInterleaved.md +0 -18
- data/docs/ModelCapabilitiesInterleavedAnyOf.md +0 -18
- data/docs/ModelCost.md +0 -24
- data/docs/ModelCostExperimentalOver200K.md +0 -22
- data/docs/NotFoundError.md +0 -20
- data/docs/OAuth.md +0 -26
- data/docs/Part.md +0 -76
- data/docs/PartAnyOf.md +0 -32
- data/docs/PatchPart.md +0 -28
- data/docs/Path.md +0 -26
- data/docs/Permission.md +0 -34
- data/docs/PermissionPattern.md +0 -15
- data/docs/PermissionRespondRequest.md +0 -18
- data/docs/Project.md +0 -28
- data/docs/ProjectTime.md +0 -22
- data/docs/ProjectUpdateRequest.md +0 -20
- data/docs/ProjectUpdateRequestIcon.md +0 -20
- data/docs/Provider.md +0 -30
- data/docs/ProviderAuthAuthorization.md +0 -22
- data/docs/ProviderAuthError.md +0 -20
- data/docs/ProviderAuthErrorData.md +0 -20
- data/docs/ProviderAuthMethod.md +0 -20
- data/docs/ProviderConfig.md +0 -34
- data/docs/ProviderConfigModelsValue.md +0 -50
- data/docs/ProviderConfigModelsValueInterleaved.md +0 -18
- data/docs/ProviderConfigModelsValueInterleavedAnyOf.md +0 -18
- data/docs/ProviderConfigOptions.md +0 -26
- data/docs/ProviderConfigOptionsTimeout.md +0 -15
- data/docs/ProviderList200Response.md +0 -22
- data/docs/ProviderList200ResponseAllInner.md +0 -28
- data/docs/ProviderList200ResponseAllInnerModelsValue.md +0 -50
- data/docs/ProviderList200ResponseAllInnerModelsValueCost.md +0 -26
- data/docs/ProviderList200ResponseAllInnerModelsValueCostContextOver200k.md +0 -24
- data/docs/ProviderList200ResponseAllInnerModelsValueInterleaved.md +0 -18
- data/docs/ProviderList200ResponseAllInnerModelsValueInterleavedAnyOf.md +0 -18
- data/docs/ProviderList200ResponseAllInnerModelsValueLimit.md +0 -20
- data/docs/ProviderList200ResponseAllInnerModelsValueModalities.md +0 -20
- data/docs/ProviderList200ResponseAllInnerModelsValueProvider.md +0 -18
- data/docs/ProviderOauthAuthorizeRequest.md +0 -18
- data/docs/ProviderOauthCallbackRequest.md +0 -20
- data/docs/Pty.md +0 -30
- data/docs/PtyCreateRequest.md +0 -26
- data/docs/PtyUpdateRequest.md +0 -20
- data/docs/PtyUpdateRequestSize.md +0 -20
- data/docs/Range.md +0 -20
- data/docs/RangeStart.md +0 -20
- data/docs/ReasoningPart.md +0 -30
- data/docs/RetryPart.md +0 -30
- data/docs/ServerConfig.md +0 -22
- data/docs/Session.md +0 -36
- data/docs/SessionApi.md +0 -145
- data/docs/SessionCommandRequest.md +0 -26
- data/docs/SessionCreateRequest.md +0 -20
- data/docs/SessionForkRequest.md +0 -18
- data/docs/SessionInitRequest.md +0 -22
- data/docs/SessionMessages200ResponseInner.md +0 -20
- data/docs/SessionPrompt200Response.md +0 -20
- data/docs/SessionPromptRequest.md +0 -30
- data/docs/SessionPromptRequestModel.md +0 -20
- data/docs/SessionPromptRequestPartsInner.md +0 -48
- data/docs/SessionRevert.md +0 -24
- data/docs/SessionRevertRequest.md +0 -20
- data/docs/SessionShare.md +0 -18
- data/docs/SessionShellRequest.md +0 -22
- data/docs/SessionStatus.md +0 -24
- data/docs/SessionStatusAnyOf.md +0 -18
- data/docs/SessionStatusAnyOf1.md +0 -24
- data/docs/SessionStatusAnyOf2.md +0 -18
- data/docs/SessionSummarizeRequest.md +0 -22
- data/docs/SessionSummary.md +0 -24
- data/docs/SessionTime.md +0 -24
- data/docs/SessionUpdateRequest.md +0 -20
- data/docs/SessionUpdateRequestTime.md +0 -18
- data/docs/SnapshotPart.md +0 -26
- data/docs/StepFinishPart.md +0 -32
- data/docs/StepStartPart.md +0 -26
- data/docs/SubtaskPartInput.md +0 -28
- data/docs/Symbol.md +0 -22
- data/docs/SymbolLocation.md +0 -20
- data/docs/SymbolSource.md +0 -28
- data/docs/TextPart.md +0 -34
- data/docs/TextPartInput.md +0 -30
- data/docs/TextPartTime.md +0 -20
- data/docs/Todo.md +0 -24
- data/docs/ToolListItem.md +0 -22
- data/docs/ToolPart.md +0 -32
- data/docs/ToolState.md +0 -34
- data/docs/ToolStateCompleted.md +0 -30
- data/docs/ToolStateCompletedTime.md +0 -22
- data/docs/ToolStateError.md +0 -26
- data/docs/ToolStateErrorTime.md +0 -20
- data/docs/ToolStatePending.md +0 -22
- data/docs/ToolStateRunning.md +0 -26
- data/docs/ToolStateRunningTime.md +0 -18
- data/docs/TuiControlNext200Response.md +0 -20
- data/docs/TuiExecuteCommandRequest.md +0 -18
- data/docs/TuiPublishRequest.md +0 -20
- data/docs/TuiShowToastRequest.md +0 -24
- data/docs/UnknownError.md +0 -20
- data/docs/UnknownErrorData.md +0 -18
- data/docs/UserMessage.md +0 -34
- data/docs/UserMessageSummary.md +0 -22
- data/docs/UserMessageTime.md +0 -18
- data/docs/VcsInfo.md +0 -18
- data/docs/WellKnownAuth.md +0 -22
- data/example_usage.rb +0 -37
- data/git_push.sh +0 -57
- data/opencode_client.gemspec +0 -39
- data/pkg/opencode_client-1.0.1.gem +0 -0
data/docs/Todo.md
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# OpencodeClient::Todo
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
| Name | Type | Description | Notes |
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **content** | **String** | Brief description of the task | |
|
|
8
|
-
| **status** | **String** | Current status of the task: pending, in_progress, completed, cancelled | |
|
|
9
|
-
| **priority** | **String** | Priority level of the task: high, medium, low | |
|
|
10
|
-
| **id** | **String** | Unique identifier for the todo item | |
|
|
11
|
-
|
|
12
|
-
## Example
|
|
13
|
-
|
|
14
|
-
```ruby
|
|
15
|
-
require 'opencode_client'
|
|
16
|
-
|
|
17
|
-
instance = OpencodeClient::Todo.new(
|
|
18
|
-
content: null,
|
|
19
|
-
status: null,
|
|
20
|
-
priority: null,
|
|
21
|
-
id: null
|
|
22
|
-
)
|
|
23
|
-
```
|
|
24
|
-
|
data/docs/ToolListItem.md
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
# OpencodeClient::ToolListItem
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
| Name | Type | Description | Notes |
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **id** | **String** | | |
|
|
8
|
-
| **description** | **String** | | |
|
|
9
|
-
| **parameters** | **Object** | | |
|
|
10
|
-
|
|
11
|
-
## Example
|
|
12
|
-
|
|
13
|
-
```ruby
|
|
14
|
-
require 'opencode_client'
|
|
15
|
-
|
|
16
|
-
instance = OpencodeClient::ToolListItem.new(
|
|
17
|
-
id: null,
|
|
18
|
-
description: null,
|
|
19
|
-
parameters: null
|
|
20
|
-
)
|
|
21
|
-
```
|
|
22
|
-
|
data/docs/ToolPart.md
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
# OpencodeClient::ToolPart
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
| Name | Type | Description | Notes |
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **id** | **String** | | |
|
|
8
|
-
| **session_id** | **String** | | |
|
|
9
|
-
| **message_id** | **String** | | |
|
|
10
|
-
| **type** | **String** | | |
|
|
11
|
-
| **call_id** | **String** | | |
|
|
12
|
-
| **tool** | **String** | | |
|
|
13
|
-
| **state** | [**ToolState**](ToolState.md) | | |
|
|
14
|
-
| **metadata** | **Hash<String, Object>** | | [optional] |
|
|
15
|
-
|
|
16
|
-
## Example
|
|
17
|
-
|
|
18
|
-
```ruby
|
|
19
|
-
require 'opencode_client'
|
|
20
|
-
|
|
21
|
-
instance = OpencodeClient::ToolPart.new(
|
|
22
|
-
id: null,
|
|
23
|
-
session_id: null,
|
|
24
|
-
message_id: null,
|
|
25
|
-
type: null,
|
|
26
|
-
call_id: null,
|
|
27
|
-
tool: null,
|
|
28
|
-
state: null,
|
|
29
|
-
metadata: null
|
|
30
|
-
)
|
|
31
|
-
```
|
|
32
|
-
|
data/docs/ToolState.md
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
# OpencodeClient::ToolState
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
| Name | Type | Description | Notes |
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **status** | **String** | | |
|
|
8
|
-
| **input** | **Hash<String, Object>** | | |
|
|
9
|
-
| **raw** | **String** | | |
|
|
10
|
-
| **title** | **String** | | |
|
|
11
|
-
| **metadata** | **Hash<String, Object>** | | |
|
|
12
|
-
| **time** | [**ToolStateErrorTime**](ToolStateErrorTime.md) | | |
|
|
13
|
-
| **output** | **String** | | |
|
|
14
|
-
| **attachments** | [**Array<FilePart>**](FilePart.md) | | [optional] |
|
|
15
|
-
| **error** | **String** | | |
|
|
16
|
-
|
|
17
|
-
## Example
|
|
18
|
-
|
|
19
|
-
```ruby
|
|
20
|
-
require 'opencode_client'
|
|
21
|
-
|
|
22
|
-
instance = OpencodeClient::ToolState.new(
|
|
23
|
-
status: null,
|
|
24
|
-
input: null,
|
|
25
|
-
raw: null,
|
|
26
|
-
title: null,
|
|
27
|
-
metadata: null,
|
|
28
|
-
time: null,
|
|
29
|
-
output: null,
|
|
30
|
-
attachments: null,
|
|
31
|
-
error: null
|
|
32
|
-
)
|
|
33
|
-
```
|
|
34
|
-
|
data/docs/ToolStateCompleted.md
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
# OpencodeClient::ToolStateCompleted
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
| Name | Type | Description | Notes |
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **status** | **String** | | |
|
|
8
|
-
| **input** | **Hash<String, Object>** | | |
|
|
9
|
-
| **output** | **String** | | |
|
|
10
|
-
| **title** | **String** | | |
|
|
11
|
-
| **metadata** | **Hash<String, Object>** | | |
|
|
12
|
-
| **time** | [**ToolStateCompletedTime**](ToolStateCompletedTime.md) | | |
|
|
13
|
-
| **attachments** | [**Array<FilePart>**](FilePart.md) | | [optional] |
|
|
14
|
-
|
|
15
|
-
## Example
|
|
16
|
-
|
|
17
|
-
```ruby
|
|
18
|
-
require 'opencode_client'
|
|
19
|
-
|
|
20
|
-
instance = OpencodeClient::ToolStateCompleted.new(
|
|
21
|
-
status: null,
|
|
22
|
-
input: null,
|
|
23
|
-
output: null,
|
|
24
|
-
title: null,
|
|
25
|
-
metadata: null,
|
|
26
|
-
time: null,
|
|
27
|
-
attachments: null
|
|
28
|
-
)
|
|
29
|
-
```
|
|
30
|
-
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
# OpencodeClient::ToolStateCompletedTime
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
| Name | Type | Description | Notes |
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **start** | **Float** | | |
|
|
8
|
-
| **_end** | **Float** | | |
|
|
9
|
-
| **compacted** | **Float** | | [optional] |
|
|
10
|
-
|
|
11
|
-
## Example
|
|
12
|
-
|
|
13
|
-
```ruby
|
|
14
|
-
require 'opencode_client'
|
|
15
|
-
|
|
16
|
-
instance = OpencodeClient::ToolStateCompletedTime.new(
|
|
17
|
-
start: null,
|
|
18
|
-
_end: null,
|
|
19
|
-
compacted: null
|
|
20
|
-
)
|
|
21
|
-
```
|
|
22
|
-
|
data/docs/ToolStateError.md
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
# OpencodeClient::ToolStateError
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
| Name | Type | Description | Notes |
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **status** | **String** | | |
|
|
8
|
-
| **input** | **Hash<String, Object>** | | |
|
|
9
|
-
| **error** | **String** | | |
|
|
10
|
-
| **metadata** | **Hash<String, Object>** | | [optional] |
|
|
11
|
-
| **time** | [**ToolStateErrorTime**](ToolStateErrorTime.md) | | |
|
|
12
|
-
|
|
13
|
-
## Example
|
|
14
|
-
|
|
15
|
-
```ruby
|
|
16
|
-
require 'opencode_client'
|
|
17
|
-
|
|
18
|
-
instance = OpencodeClient::ToolStateError.new(
|
|
19
|
-
status: null,
|
|
20
|
-
input: null,
|
|
21
|
-
error: null,
|
|
22
|
-
metadata: null,
|
|
23
|
-
time: null
|
|
24
|
-
)
|
|
25
|
-
```
|
|
26
|
-
|
data/docs/ToolStateErrorTime.md
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
# OpencodeClient::ToolStateErrorTime
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
| Name | Type | Description | Notes |
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **start** | **Float** | | |
|
|
8
|
-
| **_end** | **Float** | | |
|
|
9
|
-
|
|
10
|
-
## Example
|
|
11
|
-
|
|
12
|
-
```ruby
|
|
13
|
-
require 'opencode_client'
|
|
14
|
-
|
|
15
|
-
instance = OpencodeClient::ToolStateErrorTime.new(
|
|
16
|
-
start: null,
|
|
17
|
-
_end: null
|
|
18
|
-
)
|
|
19
|
-
```
|
|
20
|
-
|
data/docs/ToolStatePending.md
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
# OpencodeClient::ToolStatePending
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
| Name | Type | Description | Notes |
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **status** | **String** | | |
|
|
8
|
-
| **input** | **Hash<String, Object>** | | |
|
|
9
|
-
| **raw** | **String** | | |
|
|
10
|
-
|
|
11
|
-
## Example
|
|
12
|
-
|
|
13
|
-
```ruby
|
|
14
|
-
require 'opencode_client'
|
|
15
|
-
|
|
16
|
-
instance = OpencodeClient::ToolStatePending.new(
|
|
17
|
-
status: null,
|
|
18
|
-
input: null,
|
|
19
|
-
raw: null
|
|
20
|
-
)
|
|
21
|
-
```
|
|
22
|
-
|
data/docs/ToolStateRunning.md
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
# OpencodeClient::ToolStateRunning
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
| Name | Type | Description | Notes |
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **status** | **String** | | |
|
|
8
|
-
| **input** | **Hash<String, Object>** | | |
|
|
9
|
-
| **title** | **String** | | [optional] |
|
|
10
|
-
| **metadata** | **Hash<String, Object>** | | [optional] |
|
|
11
|
-
| **time** | [**ToolStateRunningTime**](ToolStateRunningTime.md) | | |
|
|
12
|
-
|
|
13
|
-
## Example
|
|
14
|
-
|
|
15
|
-
```ruby
|
|
16
|
-
require 'opencode_client'
|
|
17
|
-
|
|
18
|
-
instance = OpencodeClient::ToolStateRunning.new(
|
|
19
|
-
status: null,
|
|
20
|
-
input: null,
|
|
21
|
-
title: null,
|
|
22
|
-
metadata: null,
|
|
23
|
-
time: null
|
|
24
|
-
)
|
|
25
|
-
```
|
|
26
|
-
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# OpencodeClient::ToolStateRunningTime
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
| Name | Type | Description | Notes |
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **start** | **Float** | | |
|
|
8
|
-
|
|
9
|
-
## Example
|
|
10
|
-
|
|
11
|
-
```ruby
|
|
12
|
-
require 'opencode_client'
|
|
13
|
-
|
|
14
|
-
instance = OpencodeClient::ToolStateRunningTime.new(
|
|
15
|
-
start: null
|
|
16
|
-
)
|
|
17
|
-
```
|
|
18
|
-
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
# OpencodeClient::TuiControlNext200Response
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
| Name | Type | Description | Notes |
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **path** | **String** | | |
|
|
8
|
-
| **body** | **Object** | | |
|
|
9
|
-
|
|
10
|
-
## Example
|
|
11
|
-
|
|
12
|
-
```ruby
|
|
13
|
-
require 'opencode_client'
|
|
14
|
-
|
|
15
|
-
instance = OpencodeClient::TuiControlNext200Response.new(
|
|
16
|
-
path: null,
|
|
17
|
-
body: null
|
|
18
|
-
)
|
|
19
|
-
```
|
|
20
|
-
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# OpencodeClient::TuiExecuteCommandRequest
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
| Name | Type | Description | Notes |
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **command** | **String** | | |
|
|
8
|
-
|
|
9
|
-
## Example
|
|
10
|
-
|
|
11
|
-
```ruby
|
|
12
|
-
require 'opencode_client'
|
|
13
|
-
|
|
14
|
-
instance = OpencodeClient::TuiExecuteCommandRequest.new(
|
|
15
|
-
command: null
|
|
16
|
-
)
|
|
17
|
-
```
|
|
18
|
-
|
data/docs/TuiPublishRequest.md
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
# OpencodeClient::TuiPublishRequest
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
| Name | Type | Description | Notes |
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **type** | **String** | | |
|
|
8
|
-
| **properties** | [**TuiShowToastRequest**](TuiShowToastRequest.md) | | |
|
|
9
|
-
|
|
10
|
-
## Example
|
|
11
|
-
|
|
12
|
-
```ruby
|
|
13
|
-
require 'opencode_client'
|
|
14
|
-
|
|
15
|
-
instance = OpencodeClient::TuiPublishRequest.new(
|
|
16
|
-
type: null,
|
|
17
|
-
properties: null
|
|
18
|
-
)
|
|
19
|
-
```
|
|
20
|
-
|
data/docs/TuiShowToastRequest.md
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# OpencodeClient::TuiShowToastRequest
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
| Name | Type | Description | Notes |
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **title** | **String** | | [optional] |
|
|
8
|
-
| **message** | **String** | | |
|
|
9
|
-
| **variant** | **String** | | |
|
|
10
|
-
| **duration** | **Float** | Duration in milliseconds | [optional][default to 5000] |
|
|
11
|
-
|
|
12
|
-
## Example
|
|
13
|
-
|
|
14
|
-
```ruby
|
|
15
|
-
require 'opencode_client'
|
|
16
|
-
|
|
17
|
-
instance = OpencodeClient::TuiShowToastRequest.new(
|
|
18
|
-
title: null,
|
|
19
|
-
message: null,
|
|
20
|
-
variant: null,
|
|
21
|
-
duration: null
|
|
22
|
-
)
|
|
23
|
-
```
|
|
24
|
-
|
data/docs/UnknownError.md
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
# OpencodeClient::UnknownError
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
| Name | Type | Description | Notes |
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **name** | **String** | | |
|
|
8
|
-
| **data** | [**UnknownErrorData**](UnknownErrorData.md) | | |
|
|
9
|
-
|
|
10
|
-
## Example
|
|
11
|
-
|
|
12
|
-
```ruby
|
|
13
|
-
require 'opencode_client'
|
|
14
|
-
|
|
15
|
-
instance = OpencodeClient::UnknownError.new(
|
|
16
|
-
name: null,
|
|
17
|
-
data: null
|
|
18
|
-
)
|
|
19
|
-
```
|
|
20
|
-
|
data/docs/UnknownErrorData.md
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# OpencodeClient::UnknownErrorData
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
| Name | Type | Description | Notes |
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **message** | **String** | | |
|
|
8
|
-
|
|
9
|
-
## Example
|
|
10
|
-
|
|
11
|
-
```ruby
|
|
12
|
-
require 'opencode_client'
|
|
13
|
-
|
|
14
|
-
instance = OpencodeClient::UnknownErrorData.new(
|
|
15
|
-
message: null
|
|
16
|
-
)
|
|
17
|
-
```
|
|
18
|
-
|
data/docs/UserMessage.md
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
# OpencodeClient::UserMessage
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
| Name | Type | Description | Notes |
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **id** | **String** | | |
|
|
8
|
-
| **session_id** | **String** | | |
|
|
9
|
-
| **role** | **String** | | |
|
|
10
|
-
| **time** | [**UserMessageTime**](UserMessageTime.md) | | |
|
|
11
|
-
| **summary** | [**UserMessageSummary**](UserMessageSummary.md) | | [optional] |
|
|
12
|
-
| **agent** | **String** | | |
|
|
13
|
-
| **model** | [**SessionPromptRequestModel**](SessionPromptRequestModel.md) | | |
|
|
14
|
-
| **system** | **String** | | [optional] |
|
|
15
|
-
| **tools** | **Hash<String, Boolean>** | | [optional] |
|
|
16
|
-
|
|
17
|
-
## Example
|
|
18
|
-
|
|
19
|
-
```ruby
|
|
20
|
-
require 'opencode_client'
|
|
21
|
-
|
|
22
|
-
instance = OpencodeClient::UserMessage.new(
|
|
23
|
-
id: null,
|
|
24
|
-
session_id: null,
|
|
25
|
-
role: null,
|
|
26
|
-
time: null,
|
|
27
|
-
summary: null,
|
|
28
|
-
agent: null,
|
|
29
|
-
model: null,
|
|
30
|
-
system: null,
|
|
31
|
-
tools: null
|
|
32
|
-
)
|
|
33
|
-
```
|
|
34
|
-
|
data/docs/UserMessageSummary.md
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
# OpencodeClient::UserMessageSummary
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
| Name | Type | Description | Notes |
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **title** | **String** | | [optional] |
|
|
8
|
-
| **body** | **String** | | [optional] |
|
|
9
|
-
| **diffs** | [**Array<FileDiff>**](FileDiff.md) | | |
|
|
10
|
-
|
|
11
|
-
## Example
|
|
12
|
-
|
|
13
|
-
```ruby
|
|
14
|
-
require 'opencode_client'
|
|
15
|
-
|
|
16
|
-
instance = OpencodeClient::UserMessageSummary.new(
|
|
17
|
-
title: null,
|
|
18
|
-
body: null,
|
|
19
|
-
diffs: null
|
|
20
|
-
)
|
|
21
|
-
```
|
|
22
|
-
|
data/docs/UserMessageTime.md
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# OpencodeClient::UserMessageTime
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
| Name | Type | Description | Notes |
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **created** | **Float** | | |
|
|
8
|
-
|
|
9
|
-
## Example
|
|
10
|
-
|
|
11
|
-
```ruby
|
|
12
|
-
require 'opencode_client'
|
|
13
|
-
|
|
14
|
-
instance = OpencodeClient::UserMessageTime.new(
|
|
15
|
-
created: null
|
|
16
|
-
)
|
|
17
|
-
```
|
|
18
|
-
|
data/docs/VcsInfo.md
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# OpencodeClient::VcsInfo
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
| Name | Type | Description | Notes |
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **branch** | **String** | | |
|
|
8
|
-
|
|
9
|
-
## Example
|
|
10
|
-
|
|
11
|
-
```ruby
|
|
12
|
-
require 'opencode_client'
|
|
13
|
-
|
|
14
|
-
instance = OpencodeClient::VcsInfo.new(
|
|
15
|
-
branch: null
|
|
16
|
-
)
|
|
17
|
-
```
|
|
18
|
-
|
data/docs/WellKnownAuth.md
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
# OpencodeClient::WellKnownAuth
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
| Name | Type | Description | Notes |
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **type** | **String** | | |
|
|
8
|
-
| **key** | **String** | | |
|
|
9
|
-
| **token** | **String** | | |
|
|
10
|
-
|
|
11
|
-
## Example
|
|
12
|
-
|
|
13
|
-
```ruby
|
|
14
|
-
require 'opencode_client'
|
|
15
|
-
|
|
16
|
-
instance = OpencodeClient::WellKnownAuth.new(
|
|
17
|
-
type: null,
|
|
18
|
-
key: null,
|
|
19
|
-
token: null
|
|
20
|
-
)
|
|
21
|
-
```
|
|
22
|
-
|
data/example_usage.rb
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env ruby
|
|
2
|
-
|
|
3
|
-
# frozen_string_literal: true
|
|
4
|
-
|
|
5
|
-
$LOAD_PATH.unshift(File.expand_path("lib", __dir__))
|
|
6
|
-
require "opencode_client"
|
|
7
|
-
|
|
8
|
-
# Example usage of the opencode_client Ruby SDK
|
|
9
|
-
|
|
10
|
-
# Initialize the API client & Set base URL (default: http://localhost:4096)
|
|
11
|
-
api_client = OpencodeClient::ApiClient.new
|
|
12
|
-
api_client.config.scheme = "http"
|
|
13
|
-
api_client.config.host = "localhost:4096"
|
|
14
|
-
|
|
15
|
-
# Initialize the Default API
|
|
16
|
-
client = OpencodeClient::DefaultApi.new(api_client)
|
|
17
|
-
|
|
18
|
-
# Health check example
|
|
19
|
-
begin
|
|
20
|
-
puts "Checking health..."
|
|
21
|
-
health_response = client.global_health
|
|
22
|
-
puts "Server healthy: #{health_response.healthy}"
|
|
23
|
-
puts "Server version: #{health_response.version}"
|
|
24
|
-
rescue OpencodeClient::ApiError => e
|
|
25
|
-
puts "Error checking health: #{e.message}"
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
# Get global events (SSE stream), need do some action.
|
|
29
|
-
begin
|
|
30
|
-
puts "Getting global events..."
|
|
31
|
-
events_response = client.global_event
|
|
32
|
-
puts "Events response: #{events_response}"
|
|
33
|
-
rescue OpencodeClient::ApiError => e
|
|
34
|
-
puts "Error getting events: #{e.message}"
|
|
35
|
-
end
|
|
36
|
-
|
|
37
|
-
puts "\nExample completed!"
|
data/git_push.sh
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
|
3
|
-
#
|
|
4
|
-
# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
|
|
5
|
-
|
|
6
|
-
git_user_id=$1
|
|
7
|
-
git_repo_id=$2
|
|
8
|
-
release_note=$3
|
|
9
|
-
git_host=$4
|
|
10
|
-
|
|
11
|
-
if [ "$git_host" = "" ]; then
|
|
12
|
-
git_host="github.com"
|
|
13
|
-
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
|
|
14
|
-
fi
|
|
15
|
-
|
|
16
|
-
if [ "$git_user_id" = "" ]; then
|
|
17
|
-
git_user_id="GIT_USER_ID"
|
|
18
|
-
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
|
19
|
-
fi
|
|
20
|
-
|
|
21
|
-
if [ "$git_repo_id" = "" ]; then
|
|
22
|
-
git_repo_id="GIT_REPO_ID"
|
|
23
|
-
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
|
24
|
-
fi
|
|
25
|
-
|
|
26
|
-
if [ "$release_note" = "" ]; then
|
|
27
|
-
release_note="Minor update"
|
|
28
|
-
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
|
29
|
-
fi
|
|
30
|
-
|
|
31
|
-
# Initialize the local directory as a Git repository
|
|
32
|
-
git init
|
|
33
|
-
|
|
34
|
-
# Adds the files in the local repository and stages them for commit.
|
|
35
|
-
git add .
|
|
36
|
-
|
|
37
|
-
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
|
38
|
-
git commit -m "$release_note"
|
|
39
|
-
|
|
40
|
-
# Sets the new remote
|
|
41
|
-
git_remote=$(git remote)
|
|
42
|
-
if [ "$git_remote" = "" ]; then # git remote not defined
|
|
43
|
-
|
|
44
|
-
if [ "$GIT_TOKEN" = "" ]; then
|
|
45
|
-
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
|
46
|
-
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
|
|
47
|
-
else
|
|
48
|
-
git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
|
|
49
|
-
fi
|
|
50
|
-
|
|
51
|
-
fi
|
|
52
|
-
|
|
53
|
-
git pull origin master
|
|
54
|
-
|
|
55
|
-
# Pushes (Forces) the changes in the local repository up to the remote repository
|
|
56
|
-
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
|
|
57
|
-
git push origin master 2>&1 | grep -v 'To https'
|
data/opencode_client.gemspec
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
|
2
|
-
|
|
3
|
-
=begin
|
|
4
|
-
#opencode
|
|
5
|
-
|
|
6
|
-
#opencode api
|
|
7
|
-
|
|
8
|
-
The version of the OpenAPI document: 1.0.2
|
|
9
|
-
|
|
10
|
-
Generated by: https://openapi-generator.tech
|
|
11
|
-
Generator version: 7.18.0
|
|
12
|
-
|
|
13
|
-
=end
|
|
14
|
-
|
|
15
|
-
$:.push File.expand_path("../lib", __FILE__)
|
|
16
|
-
require "opencode_client/version"
|
|
17
|
-
|
|
18
|
-
Gem::Specification.new do |s|
|
|
19
|
-
s.name = "opencode_client"
|
|
20
|
-
s.version = OpencodeClient::VERSION
|
|
21
|
-
s.platform = Gem::Platform::RUBY
|
|
22
|
-
s.authors = ["OpenCode AI"]
|
|
23
|
-
s.email = ["eric.guocz@gmail.com"]
|
|
24
|
-
s.homepage = 'https://github.com/Eric-Guo/opencode_client_ruby'
|
|
25
|
-
s.summary = "OpenCode Ruby Client Gem"
|
|
26
|
-
s.description = "Ruby client for the OpenCode API"
|
|
27
|
-
s.license = "MIT"
|
|
28
|
-
s.required_ruby_version = ">= 2.7"
|
|
29
|
-
s.metadata = {}
|
|
30
|
-
|
|
31
|
-
s.add_runtime_dependency 'httpx', '~> 1.0', '>= 1.0.0'
|
|
32
|
-
|
|
33
|
-
s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
|
|
34
|
-
|
|
35
|
-
s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? }
|
|
36
|
-
s.test_files = `find spec/*`.split("\n")
|
|
37
|
-
s.executables = []
|
|
38
|
-
s.require_paths = ["lib"]
|
|
39
|
-
end
|
|
Binary file
|