mirror of
https://github.com/anomalyco/opencode-sdk-python.git
synced 2026-04-28 12:39:54 +00:00
feat(api): api update
This commit is contained in:
parent
730f1be142
commit
d63c6f6f73
43 changed files with 974 additions and 241 deletions
21
api.md
21
api.md
|
|
@ -1,7 +1,7 @@
|
|||
# Shared Types
|
||||
|
||||
```python
|
||||
from opencode_ai.types import ProviderAuthError, UnknownError
|
||||
from opencode_ai.types import MessageAbortedError, ProviderAuthError, UnknownError
|
||||
```
|
||||
|
||||
# Event
|
||||
|
|
@ -21,20 +21,28 @@ Methods:
|
|||
Types:
|
||||
|
||||
```python
|
||||
from opencode_ai.types import App, AppInitResponse
|
||||
from opencode_ai.types import App, LogLevel, Mode, AppInitResponse, AppLogResponse, AppModesResponse
|
||||
```
|
||||
|
||||
Methods:
|
||||
|
||||
- <code title="get /app">client.app.<a href="./src/opencode_ai/resources/app.py">get</a>() -> <a href="./src/opencode_ai/types/app.py">App</a></code>
|
||||
- <code title="post /app/init">client.app.<a href="./src/opencode_ai/resources/app.py">init</a>() -> <a href="./src/opencode_ai/types/app_init_response.py">AppInitResponse</a></code>
|
||||
- <code title="post /log">client.app.<a href="./src/opencode_ai/resources/app.py">log</a>(\*\*<a href="src/opencode_ai/types/app_log_params.py">params</a>) -> <a href="./src/opencode_ai/types/app_log_response.py">AppLogResponse</a></code>
|
||||
- <code title="get /mode">client.app.<a href="./src/opencode_ai/resources/app.py">modes</a>() -> <a href="./src/opencode_ai/types/app_modes_response.py">AppModesResponse</a></code>
|
||||
|
||||
# Find
|
||||
|
||||
Types:
|
||||
|
||||
```python
|
||||
from opencode_ai.types import FindFilesResponse, FindSymbolsResponse, FindTextResponse
|
||||
from opencode_ai.types import (
|
||||
Match,
|
||||
Symbol,
|
||||
FindFilesResponse,
|
||||
FindSymbolsResponse,
|
||||
FindTextResponse,
|
||||
)
|
||||
```
|
||||
|
||||
Methods:
|
||||
|
|
@ -48,7 +56,7 @@ Methods:
|
|||
Types:
|
||||
|
||||
```python
|
||||
from opencode_ai.types import FileReadResponse, FileStatusResponse
|
||||
from opencode_ai.types import File, FileReadResponse, FileStatusResponse
|
||||
```
|
||||
|
||||
Methods:
|
||||
|
|
@ -84,10 +92,11 @@ Types:
|
|||
```python
|
||||
from opencode_ai.types import (
|
||||
AssistantMessage,
|
||||
AssistantMessagePart,
|
||||
FilePart,
|
||||
Message,
|
||||
Part,
|
||||
Session,
|
||||
StepFinishPart,
|
||||
StepStartPart,
|
||||
TextPart,
|
||||
ToolPart,
|
||||
|
|
@ -95,7 +104,7 @@ from opencode_ai.types import (
|
|||
ToolStateError,
|
||||
ToolStatePending,
|
||||
ToolStateRunning,
|
||||
UserMessagePart,
|
||||
UserMessage,
|
||||
SessionListResponse,
|
||||
SessionDeleteResponse,
|
||||
SessionAbortResponse,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue