Skip to content

Commit f6ee467

Browse files
feat(api): manual updates
1 parent 47a1a97 commit f6ee467

File tree

6 files changed

+172
-174
lines changed

6 files changed

+172
-174
lines changed

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 20
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/opencode%2Fopencode-945f9da9e9a4c4008834deef63e4346c0076e020eed3d3c98c249095033c1ac5.yml
3-
openapi_spec_hash: 522a44f6cb0677435fe2ac7693848ad7
4-
config_hash: 6c8822d278ba83456e5eed6d774ca230
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/opencode%2Fopencode-15eeb028f79b9a065b4e54a6ea6a58631e9bd5004f97820f0c79d18e3f8bac84.yml
3+
openapi_spec_hash: 38c8bacb6c8e4c46852a3e81e3fb9fda
4+
config_hash: 348a85e725de595ca05a61f4333794ac

api.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,18 +74,19 @@ Methods:
7474

7575
Types:
7676

77+
- <code><a href="./src/resources/session.ts">AssistantMessage</a></code>
78+
- <code><a href="./src/resources/session.ts">AssistantMessagePart</a></code>
7779
- <code><a href="./src/resources/session.ts">FilePart</a></code>
7880
- <code><a href="./src/resources/session.ts">Message</a></code>
79-
- <code><a href="./src/resources/session.ts">MessagePart</a></code>
80-
- <code><a href="./src/resources/session.ts">ReasoningPart</a></code>
8181
- <code><a href="./src/resources/session.ts">Session</a></code>
82-
- <code><a href="./src/resources/session.ts">SourceURLPart</a></code>
8382
- <code><a href="./src/resources/session.ts">StepStartPart</a></code>
8483
- <code><a href="./src/resources/session.ts">TextPart</a></code>
85-
- <code><a href="./src/resources/session.ts">ToolCall</a></code>
86-
- <code><a href="./src/resources/session.ts">ToolInvocationPart</a></code>
87-
- <code><a href="./src/resources/session.ts">ToolPartialCall</a></code>
88-
- <code><a href="./src/resources/session.ts">ToolResult</a></code>
84+
- <code><a href="./src/resources/session.ts">ToolPart</a></code>
85+
- <code><a href="./src/resources/session.ts">ToolStateCompleted</a></code>
86+
- <code><a href="./src/resources/session.ts">ToolStateError</a></code>
87+
- <code><a href="./src/resources/session.ts">ToolStatePending</a></code>
88+
- <code><a href="./src/resources/session.ts">ToolStateRunning</a></code>
89+
- <code><a href="./src/resources/session.ts">UserMessagePart</a></code>
8990
- <code><a href="./src/resources/session.ts">SessionListResponse</a></code>
9091
- <code><a href="./src/resources/session.ts">SessionDeleteResponse</a></code>
9192
- <code><a href="./src/resources/session.ts">SessionAbortResponse</a></code>
@@ -99,7 +100,7 @@ Methods:
99100
- <code title="get /session">client.session.<a href="./src/resources/session.ts">list</a>() -> SessionListResponse</code>
100101
- <code title="delete /session/{id}">client.session.<a href="./src/resources/session.ts">delete</a>(id) -> SessionDeleteResponse</code>
101102
- <code title="post /session/{id}/abort">client.session.<a href="./src/resources/session.ts">abort</a>(id) -> SessionAbortResponse</code>
102-
- <code title="post /session/{id}/message">client.session.<a href="./src/resources/session.ts">chat</a>(id, { ...params }) -> Message</code>
103+
- <code title="post /session/{id}/message">client.session.<a href="./src/resources/session.ts">chat</a>(id, { ...params }) -> AssistantMessage</code>
103104
- <code title="post /session/{id}/init">client.session.<a href="./src/resources/session.ts">init</a>(id, { ...params }) -> SessionInitResponse</code>
104105
- <code title="get /session/{id}/message">client.session.<a href="./src/resources/session.ts">messages</a>(id) -> SessionMessagesResponse</code>
105106
- <code title="post /session/{id}/share">client.session.<a href="./src/resources/session.ts">share</a>(id) -> Session</code>

src/client.ts

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ import {
3939
FindTextResponse,
4040
} from './resources/find';
4141
import {
42+
AssistantMessage,
43+
AssistantMessagePart,
4244
FilePart,
4345
Message,
44-
MessagePart,
45-
ReasoningPart,
4646
Session,
4747
SessionAbortResponse,
4848
SessionChatParams,
@@ -54,13 +54,14 @@ import {
5454
SessionResource,
5555
SessionSummarizeParams,
5656
SessionSummarizeResponse,
57-
SourceURLPart,
5857
StepStartPart,
5958
TextPart,
60-
ToolCall,
61-
ToolInvocationPart,
62-
ToolPartialCall,
63-
ToolResult,
59+
ToolPart,
60+
ToolStateCompleted,
61+
ToolStateError,
62+
ToolStatePending,
63+
ToolStateRunning,
64+
UserMessagePart,
6465
} from './resources/session';
6566
import { type Fetch } from './internal/builtin-types';
6667
import { HeadersLike, NullableHeaders, buildHeaders } from './internal/headers';
@@ -779,18 +780,19 @@ export declare namespace Opencode {
779780

780781
export {
781782
SessionResource as SessionResource,
783+
type AssistantMessage as AssistantMessage,
784+
type AssistantMessagePart as AssistantMessagePart,
782785
type FilePart as FilePart,
783786
type Message as Message,
784-
type MessagePart as MessagePart,
785-
type ReasoningPart as ReasoningPart,
786787
type Session as Session,
787-
type SourceURLPart as SourceURLPart,
788788
type StepStartPart as StepStartPart,
789789
type TextPart as TextPart,
790-
type ToolCall as ToolCall,
791-
type ToolInvocationPart as ToolInvocationPart,
792-
type ToolPartialCall as ToolPartialCall,
793-
type ToolResult as ToolResult,
790+
type ToolPart as ToolPart,
791+
type ToolStateCompleted as ToolStateCompleted,
792+
type ToolStateError as ToolStateError,
793+
type ToolStatePending as ToolStatePending,
794+
type ToolStateRunning as ToolStateRunning,
795+
type UserMessagePart as UserMessagePart,
794796
type SessionListResponse as SessionListResponse,
795797
type SessionDeleteResponse as SessionDeleteResponse,
796798
type SessionAbortResponse as SessionAbortResponse,

src/resources/event.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ export type EventListResponse =
2020
| EventListResponse.EventLspClientDiagnostics
2121
| EventListResponse.EventPermissionUpdated
2222
| EventListResponse.EventFileEdited
23-
| EventListResponse.EventStorageWrite
2423
| EventListResponse.EventInstallationUpdated
24+
| EventListResponse.EventStorageWrite
2525
| EventListResponse.EventMessageUpdated
2626
| EventListResponse.EventMessageRemoved
2727
| EventListResponse.EventMessagePartUpdated
@@ -84,29 +84,29 @@ export namespace EventListResponse {
8484
}
8585
}
8686

87-
export interface EventStorageWrite {
88-
properties: EventStorageWrite.Properties;
87+
export interface EventInstallationUpdated {
88+
properties: EventInstallationUpdated.Properties;
8989

90-
type: 'storage.write';
90+
type: 'installation.updated';
9191
}
9292

93-
export namespace EventStorageWrite {
93+
export namespace EventInstallationUpdated {
9494
export interface Properties {
95-
key: string;
96-
97-
content?: unknown;
95+
version: string;
9896
}
9997
}
10098

101-
export interface EventInstallationUpdated {
102-
properties: EventInstallationUpdated.Properties;
99+
export interface EventStorageWrite {
100+
properties: EventStorageWrite.Properties;
103101

104-
type: 'installation.updated';
102+
type: 'storage.write';
105103
}
106104

107-
export namespace EventInstallationUpdated {
105+
export namespace EventStorageWrite {
108106
export interface Properties {
109-
version: string;
107+
key: string;
108+
109+
content?: unknown;
110110
}
111111
}
112112

@@ -146,7 +146,7 @@ export namespace EventListResponse {
146146
export interface Properties {
147147
messageID: string;
148148

149-
part: SessionAPI.MessagePart;
149+
part: SessionAPI.AssistantMessagePart;
150150

151151
sessionID: string;
152152
}

src/resources/index.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,19 @@ export {
2525
} from './find';
2626
export {
2727
SessionResource,
28+
type AssistantMessage,
29+
type AssistantMessagePart,
2830
type FilePart,
2931
type Message,
30-
type MessagePart,
31-
type ReasoningPart,
3232
type Session,
33-
type SourceURLPart,
3433
type StepStartPart,
3534
type TextPart,
36-
type ToolCall,
37-
type ToolInvocationPart,
38-
type ToolPartialCall,
39-
type ToolResult,
35+
type ToolPart,
36+
type ToolStateCompleted,
37+
type ToolStateError,
38+
type ToolStatePending,
39+
type ToolStateRunning,
40+
type UserMessagePart,
4041
type SessionListResponse,
4142
type SessionDeleteResponse,
4243
type SessionAbortResponse,

0 commit comments

Comments
 (0)