ignore: fix event type gen

This commit is contained in:
Dax Raad
2025-09-17 01:16:49 -04:00
parent ad5fc76b11
commit abd99aeb7d
19 changed files with 2156 additions and 1859 deletions

View File

@@ -1,3 +1,3 @@
{
".": "0.14.0"
".": "0.15.0"
}

View File

@@ -1,4 +1,4 @@
configured_endpoints: 43
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/opencode%2Fopencode-0a4165f1eabf826d3092ea6b789aa527048278dcd4bd891f9e5ac890b9bcbb35.yml
openapi_spec_hash: da60e4fc813eb0f9ac3ab5f112e26bf6
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/opencode%2Fopencode-ad911ed0bdbeca62807509f364f25fcafd7a83e0b43e027ec0a85f72b7a4d963.yml
openapi_spec_hash: 15152513b4246bf4b5f8546fa6f1603f
config_hash: 026ef000d34bf2f930e7b41e77d2d3ff

View File

@@ -1,5 +1,13 @@
# Changelog
## 0.15.0 (2025-09-16)
Full Changelog: [v0.14.0...v0.15.0](https://github.com/sst/opencode-sdk-go/compare/v0.14.0...v0.15.0)
### Features
- **api:** api update ([397048f](https://github.com/sst/opencode-sdk-go/commit/397048faca7a1de7a028edd2254a0ad7797b151f))
## 0.14.0 (2025-09-14)
Full Changelog: [v0.13.0...v0.14.0](https://github.com/sst/opencode-sdk-go/compare/v0.13.0...v0.14.0)

View File

@@ -24,7 +24,7 @@ Or to pin the version:
<!-- x-release-please-start-version -->
```sh
go get -u 'github.com/sst/opencode-sdk-go@v0.14.0'
go get -u 'github.com/sst/opencode-sdk-go@v0.15.0'
```
<!-- x-release-please-end -->

View File

@@ -90,8 +90,9 @@ type Config struct {
// TUI specific settings
Tui ConfigTui `json:"tui"`
// Custom username to display in conversations instead of system username
Username string `json:"username"`
JSON configJSON `json:"-"`
Username string `json:"username"`
Watcher ConfigWatcher `json:"watcher"`
JSON configJSON `json:"-"`
}
// configJSON contains the JSON metadata for the struct [Config]
@@ -121,6 +122,7 @@ type configJSON struct {
Tools apijson.Field
Tui apijson.Field
Username apijson.Field
Watcher apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
@@ -1772,6 +1774,26 @@ func (r configTuiJSON) RawJSON() string {
return r.raw
}
type ConfigWatcher struct {
Ignore []string `json:"ignore"`
JSON configWatcherJSON `json:"-"`
}
// configWatcherJSON contains the JSON metadata for the struct [ConfigWatcher]
type configWatcherJSON struct {
Ignore apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *ConfigWatcher) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r configWatcherJSON) RawJSON() string {
return r.raw
}
// Custom keybind configurations
type KeybindsConfig struct {
// Next agent

View File

@@ -64,7 +64,9 @@ type EventListResponse struct {
// [EventListResponseEventSessionIdleProperties],
// [EventListResponseEventSessionUpdatedProperties],
// [EventListResponseEventSessionDeletedProperties],
// [EventListResponseEventSessionErrorProperties], [interface{}].
// [EventListResponseEventSessionErrorProperties], [interface{}],
// [EventListResponseEventFileWatcherUpdatedProperties],
// [EventListResponseEventIdeInstalledProperties].
Properties interface{} `json:"properties,required"`
Type EventListResponseType `json:"type,required"`
JSON eventListResponseJSON `json:"-"`
@@ -107,7 +109,9 @@ func (r *EventListResponse) UnmarshalJSON(data []byte) (err error) {
// [EventListResponseEventPermissionReplied], [EventListResponseEventFileEdited],
// [EventListResponseEventSessionIdle], [EventListResponseEventSessionUpdated],
// [EventListResponseEventSessionDeleted], [EventListResponseEventSessionError],
// [EventListResponseEventServerConnected].
// [EventListResponseEventServerConnected],
// [EventListResponseEventFileWatcherUpdated],
// [EventListResponseEventIdeInstalled].
func (r EventListResponse) AsUnion() EventListResponseUnion {
return r.union
}
@@ -121,8 +125,10 @@ func (r EventListResponse) AsUnion() EventListResponseUnion {
// [EventListResponseEventPermissionUpdated],
// [EventListResponseEventPermissionReplied], [EventListResponseEventFileEdited],
// [EventListResponseEventSessionIdle], [EventListResponseEventSessionUpdated],
// [EventListResponseEventSessionDeleted], [EventListResponseEventSessionError] or
// [EventListResponseEventServerConnected].
// [EventListResponseEventSessionDeleted], [EventListResponseEventSessionError],
// [EventListResponseEventServerConnected],
// [EventListResponseEventFileWatcherUpdated] or
// [EventListResponseEventIdeInstalled].
type EventListResponseUnion interface {
implementsEventListResponse()
}
@@ -191,6 +197,14 @@ func init() {
TypeFilter: gjson.JSON,
Type: reflect.TypeOf(EventListResponseEventServerConnected{}),
},
apijson.UnionVariant{
TypeFilter: gjson.JSON,
Type: reflect.TypeOf(EventListResponseEventFileWatcherUpdated{}),
},
apijson.UnionVariant{
TypeFilter: gjson.JSON,
Type: reflect.TypeOf(EventListResponseEventIdeInstalled{}),
},
)
}
@@ -1196,6 +1210,144 @@ func (r EventListResponseEventServerConnectedType) IsKnown() bool {
return false
}
type EventListResponseEventFileWatcherUpdated struct {
Properties EventListResponseEventFileWatcherUpdatedProperties `json:"properties,required"`
Type EventListResponseEventFileWatcherUpdatedType `json:"type,required"`
JSON eventListResponseEventFileWatcherUpdatedJSON `json:"-"`
}
// eventListResponseEventFileWatcherUpdatedJSON contains the JSON metadata for the
// struct [EventListResponseEventFileWatcherUpdated]
type eventListResponseEventFileWatcherUpdatedJSON struct {
Properties apijson.Field
Type apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *EventListResponseEventFileWatcherUpdated) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r eventListResponseEventFileWatcherUpdatedJSON) RawJSON() string {
return r.raw
}
func (r EventListResponseEventFileWatcherUpdated) implementsEventListResponse() {}
type EventListResponseEventFileWatcherUpdatedProperties struct {
Event EventListResponseEventFileWatcherUpdatedPropertiesEvent `json:"event,required"`
File string `json:"file,required"`
JSON eventListResponseEventFileWatcherUpdatedPropertiesJSON `json:"-"`
}
// eventListResponseEventFileWatcherUpdatedPropertiesJSON contains the JSON
// metadata for the struct [EventListResponseEventFileWatcherUpdatedProperties]
type eventListResponseEventFileWatcherUpdatedPropertiesJSON struct {
Event apijson.Field
File apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *EventListResponseEventFileWatcherUpdatedProperties) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r eventListResponseEventFileWatcherUpdatedPropertiesJSON) RawJSON() string {
return r.raw
}
type EventListResponseEventFileWatcherUpdatedPropertiesEvent string
const (
EventListResponseEventFileWatcherUpdatedPropertiesEventAdd EventListResponseEventFileWatcherUpdatedPropertiesEvent = "add"
EventListResponseEventFileWatcherUpdatedPropertiesEventChange EventListResponseEventFileWatcherUpdatedPropertiesEvent = "change"
EventListResponseEventFileWatcherUpdatedPropertiesEventUnlink EventListResponseEventFileWatcherUpdatedPropertiesEvent = "unlink"
)
func (r EventListResponseEventFileWatcherUpdatedPropertiesEvent) IsKnown() bool {
switch r {
case EventListResponseEventFileWatcherUpdatedPropertiesEventAdd, EventListResponseEventFileWatcherUpdatedPropertiesEventChange, EventListResponseEventFileWatcherUpdatedPropertiesEventUnlink:
return true
}
return false
}
type EventListResponseEventFileWatcherUpdatedType string
const (
EventListResponseEventFileWatcherUpdatedTypeFileWatcherUpdated EventListResponseEventFileWatcherUpdatedType = "file.watcher.updated"
)
func (r EventListResponseEventFileWatcherUpdatedType) IsKnown() bool {
switch r {
case EventListResponseEventFileWatcherUpdatedTypeFileWatcherUpdated:
return true
}
return false
}
type EventListResponseEventIdeInstalled struct {
Properties EventListResponseEventIdeInstalledProperties `json:"properties,required"`
Type EventListResponseEventIdeInstalledType `json:"type,required"`
JSON eventListResponseEventIdeInstalledJSON `json:"-"`
}
// eventListResponseEventIdeInstalledJSON contains the JSON metadata for the struct
// [EventListResponseEventIdeInstalled]
type eventListResponseEventIdeInstalledJSON struct {
Properties apijson.Field
Type apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *EventListResponseEventIdeInstalled) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r eventListResponseEventIdeInstalledJSON) RawJSON() string {
return r.raw
}
func (r EventListResponseEventIdeInstalled) implementsEventListResponse() {}
type EventListResponseEventIdeInstalledProperties struct {
Ide string `json:"ide,required"`
JSON eventListResponseEventIdeInstalledPropertiesJSON `json:"-"`
}
// eventListResponseEventIdeInstalledPropertiesJSON contains the JSON metadata for
// the struct [EventListResponseEventIdeInstalledProperties]
type eventListResponseEventIdeInstalledPropertiesJSON struct {
Ide apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *EventListResponseEventIdeInstalledProperties) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r eventListResponseEventIdeInstalledPropertiesJSON) RawJSON() string {
return r.raw
}
type EventListResponseEventIdeInstalledType string
const (
EventListResponseEventIdeInstalledTypeIdeInstalled EventListResponseEventIdeInstalledType = "ide.installed"
)
func (r EventListResponseEventIdeInstalledType) IsKnown() bool {
switch r {
case EventListResponseEventIdeInstalledTypeIdeInstalled:
return true
}
return false
}
type EventListResponseType string
const (
@@ -1214,11 +1366,13 @@ const (
EventListResponseTypeSessionDeleted EventListResponseType = "session.deleted"
EventListResponseTypeSessionError EventListResponseType = "session.error"
EventListResponseTypeServerConnected EventListResponseType = "server.connected"
EventListResponseTypeFileWatcherUpdated EventListResponseType = "file.watcher.updated"
EventListResponseTypeIdeInstalled EventListResponseType = "ide.installed"
)
func (r EventListResponseType) IsKnown() bool {
switch r {
case EventListResponseTypeInstallationUpdated, EventListResponseTypeLspClientDiagnostics, EventListResponseTypeMessageUpdated, EventListResponseTypeMessageRemoved, EventListResponseTypeMessagePartUpdated, EventListResponseTypeMessagePartRemoved, EventListResponseTypeSessionCompacted, EventListResponseTypePermissionUpdated, EventListResponseTypePermissionReplied, EventListResponseTypeFileEdited, EventListResponseTypeSessionIdle, EventListResponseTypeSessionUpdated, EventListResponseTypeSessionDeleted, EventListResponseTypeSessionError, EventListResponseTypeServerConnected:
case EventListResponseTypeInstallationUpdated, EventListResponseTypeLspClientDiagnostics, EventListResponseTypeMessageUpdated, EventListResponseTypeMessageRemoved, EventListResponseTypeMessagePartUpdated, EventListResponseTypeMessagePartRemoved, EventListResponseTypeSessionCompacted, EventListResponseTypePermissionUpdated, EventListResponseTypePermissionReplied, EventListResponseTypeFileEdited, EventListResponseTypeSessionIdle, EventListResponseTypeSessionUpdated, EventListResponseTypeSessionDeleted, EventListResponseTypeSessionError, EventListResponseTypeServerConnected, EventListResponseTypeFileWatcherUpdated, EventListResponseTypeIdeInstalled:
return true
}
return false

View File

@@ -2,4 +2,4 @@
package internal
const PackageVersion = "0.14.0" // x-release-please-version
const PackageVersion = "0.15.0" // x-release-please-version