mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-20 01:04:22 +01:00
fix: blank version issue
This commit is contained in:
@@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
".": "0.16.2"
|
".": "0.18.0"
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
configured_endpoints: 43
|
configured_endpoints: 43
|
||||||
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/opencode%2Fopencode-273fc9fea965af661dfed0902d00f10d6ed844f0681ca861a58821c4902eac2f.yml
|
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/opencode%2Fopencode-92f9d0f8daee2ea7458f8b9f1d7a7f941ff932442ad944bc7576254d5978b6d5.yml
|
||||||
openapi_spec_hash: c6144f23a1bac75f79be86edd405552b
|
openapi_spec_hash: 5b785c4ff6fb69039915f0e746abdaf9
|
||||||
config_hash: 026ef000d34bf2f930e7b41e77d2d3ff
|
config_hash: 026ef000d34bf2f930e7b41e77d2d3ff
|
||||||
|
|||||||
@@ -1,5 +1,21 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 0.18.0 (2025-10-10)
|
||||||
|
|
||||||
|
Full Changelog: [v0.17.0...v0.18.0](https://github.com/sst/opencode-sdk-go/compare/v0.17.0...v0.18.0)
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **api:** api update ([0a7f5e7](https://github.com/sst/opencode-sdk-go/commit/0a7f5e710911506512a132ba39e0593c412beb77))
|
||||||
|
|
||||||
|
## 0.17.0 (2025-10-07)
|
||||||
|
|
||||||
|
Full Changelog: [v0.16.2...v0.17.0](https://github.com/sst/opencode-sdk-go/compare/v0.16.2...v0.17.0)
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **api:** api update ([84a3df5](https://github.com/sst/opencode-sdk-go/commit/84a3df50a7ff3d87e5593e4f29dfb5d561f71cc3))
|
||||||
|
|
||||||
## 0.16.2 (2025-09-26)
|
## 0.16.2 (2025-09-26)
|
||||||
|
|
||||||
Full Changelog: [v0.16.1...v0.16.2](https://github.com/sst/opencode-sdk-go/compare/v0.16.1...v0.16.2)
|
Full Changelog: [v0.16.1...v0.16.2](https://github.com/sst/opencode-sdk-go/compare/v0.16.1...v0.16.2)
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ Or to pin the version:
|
|||||||
<!-- x-release-please-start-version -->
|
<!-- x-release-please-start-version -->
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
go get -u 'github.com/sst/opencode-sdk-go@v0.16.2'
|
go get -u 'github.com/sst/opencode-sdk-go@v0.18.0'
|
||||||
```
|
```
|
||||||
|
|
||||||
<!-- x-release-please-end -->
|
<!-- x-release-please-end -->
|
||||||
|
|||||||
@@ -62,7 +62,9 @@ type Model struct {
|
|||||||
Temperature bool `json:"temperature,required"`
|
Temperature bool `json:"temperature,required"`
|
||||||
ToolCall bool `json:"tool_call,required"`
|
ToolCall bool `json:"tool_call,required"`
|
||||||
Experimental bool `json:"experimental"`
|
Experimental bool `json:"experimental"`
|
||||||
|
Modalities ModelModalities `json:"modalities"`
|
||||||
Provider ModelProvider `json:"provider"`
|
Provider ModelProvider `json:"provider"`
|
||||||
|
Status ModelStatus `json:"status"`
|
||||||
JSON modelJSON `json:"-"`
|
JSON modelJSON `json:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -79,7 +81,9 @@ type modelJSON struct {
|
|||||||
Temperature apijson.Field
|
Temperature apijson.Field
|
||||||
ToolCall apijson.Field
|
ToolCall apijson.Field
|
||||||
Experimental apijson.Field
|
Experimental apijson.Field
|
||||||
|
Modalities apijson.Field
|
||||||
Provider apijson.Field
|
Provider apijson.Field
|
||||||
|
Status apijson.Field
|
||||||
raw string
|
raw string
|
||||||
ExtraFields map[string]apijson.Field
|
ExtraFields map[string]apijson.Field
|
||||||
}
|
}
|
||||||
@@ -140,6 +144,64 @@ func (r modelLimitJSON) RawJSON() string {
|
|||||||
return r.raw
|
return r.raw
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type ModelModalities struct {
|
||||||
|
Input []ModelModalitiesInput `json:"input,required"`
|
||||||
|
Output []ModelModalitiesOutput `json:"output,required"`
|
||||||
|
JSON modelModalitiesJSON `json:"-"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// modelModalitiesJSON contains the JSON metadata for the struct [ModelModalities]
|
||||||
|
type modelModalitiesJSON struct {
|
||||||
|
Input apijson.Field
|
||||||
|
Output apijson.Field
|
||||||
|
raw string
|
||||||
|
ExtraFields map[string]apijson.Field
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *ModelModalities) UnmarshalJSON(data []byte) (err error) {
|
||||||
|
return apijson.UnmarshalRoot(data, r)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r modelModalitiesJSON) RawJSON() string {
|
||||||
|
return r.raw
|
||||||
|
}
|
||||||
|
|
||||||
|
type ModelModalitiesInput string
|
||||||
|
|
||||||
|
const (
|
||||||
|
ModelModalitiesInputText ModelModalitiesInput = "text"
|
||||||
|
ModelModalitiesInputAudio ModelModalitiesInput = "audio"
|
||||||
|
ModelModalitiesInputImage ModelModalitiesInput = "image"
|
||||||
|
ModelModalitiesInputVideo ModelModalitiesInput = "video"
|
||||||
|
ModelModalitiesInputPdf ModelModalitiesInput = "pdf"
|
||||||
|
)
|
||||||
|
|
||||||
|
func (r ModelModalitiesInput) IsKnown() bool {
|
||||||
|
switch r {
|
||||||
|
case ModelModalitiesInputText, ModelModalitiesInputAudio, ModelModalitiesInputImage, ModelModalitiesInputVideo, ModelModalitiesInputPdf:
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
type ModelModalitiesOutput string
|
||||||
|
|
||||||
|
const (
|
||||||
|
ModelModalitiesOutputText ModelModalitiesOutput = "text"
|
||||||
|
ModelModalitiesOutputAudio ModelModalitiesOutput = "audio"
|
||||||
|
ModelModalitiesOutputImage ModelModalitiesOutput = "image"
|
||||||
|
ModelModalitiesOutputVideo ModelModalitiesOutput = "video"
|
||||||
|
ModelModalitiesOutputPdf ModelModalitiesOutput = "pdf"
|
||||||
|
)
|
||||||
|
|
||||||
|
func (r ModelModalitiesOutput) IsKnown() bool {
|
||||||
|
switch r {
|
||||||
|
case ModelModalitiesOutputText, ModelModalitiesOutputAudio, ModelModalitiesOutputImage, ModelModalitiesOutputVideo, ModelModalitiesOutputPdf:
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
type ModelProvider struct {
|
type ModelProvider struct {
|
||||||
Npm string `json:"npm,required"`
|
Npm string `json:"npm,required"`
|
||||||
JSON modelProviderJSON `json:"-"`
|
JSON modelProviderJSON `json:"-"`
|
||||||
@@ -160,6 +222,21 @@ func (r modelProviderJSON) RawJSON() string {
|
|||||||
return r.raw
|
return r.raw
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type ModelStatus string
|
||||||
|
|
||||||
|
const (
|
||||||
|
ModelStatusAlpha ModelStatus = "alpha"
|
||||||
|
ModelStatusBeta ModelStatus = "beta"
|
||||||
|
)
|
||||||
|
|
||||||
|
func (r ModelStatus) IsKnown() bool {
|
||||||
|
switch r {
|
||||||
|
case ModelStatusAlpha, ModelStatusBeta:
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
type Provider struct {
|
type Provider struct {
|
||||||
ID string `json:"id,required"`
|
ID string `json:"id,required"`
|
||||||
Env []string `json:"env,required"`
|
Env []string `json:"env,required"`
|
||||||
|
|||||||
@@ -1572,11 +1572,13 @@ type ConfigProviderModel struct {
|
|||||||
Cost ConfigProviderModelsCost `json:"cost"`
|
Cost ConfigProviderModelsCost `json:"cost"`
|
||||||
Experimental bool `json:"experimental"`
|
Experimental bool `json:"experimental"`
|
||||||
Limit ConfigProviderModelsLimit `json:"limit"`
|
Limit ConfigProviderModelsLimit `json:"limit"`
|
||||||
|
Modalities ConfigProviderModelsModalities `json:"modalities"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Options map[string]interface{} `json:"options"`
|
Options map[string]interface{} `json:"options"`
|
||||||
Provider ConfigProviderModelsProvider `json:"provider"`
|
Provider ConfigProviderModelsProvider `json:"provider"`
|
||||||
Reasoning bool `json:"reasoning"`
|
Reasoning bool `json:"reasoning"`
|
||||||
ReleaseDate string `json:"release_date"`
|
ReleaseDate string `json:"release_date"`
|
||||||
|
Status ConfigProviderModelsStatus `json:"status"`
|
||||||
Temperature bool `json:"temperature"`
|
Temperature bool `json:"temperature"`
|
||||||
ToolCall bool `json:"tool_call"`
|
ToolCall bool `json:"tool_call"`
|
||||||
JSON configProviderModelJSON `json:"-"`
|
JSON configProviderModelJSON `json:"-"`
|
||||||
@@ -1590,11 +1592,13 @@ type configProviderModelJSON struct {
|
|||||||
Cost apijson.Field
|
Cost apijson.Field
|
||||||
Experimental apijson.Field
|
Experimental apijson.Field
|
||||||
Limit apijson.Field
|
Limit apijson.Field
|
||||||
|
Modalities apijson.Field
|
||||||
Name apijson.Field
|
Name apijson.Field
|
||||||
Options apijson.Field
|
Options apijson.Field
|
||||||
Provider apijson.Field
|
Provider apijson.Field
|
||||||
Reasoning apijson.Field
|
Reasoning apijson.Field
|
||||||
ReleaseDate apijson.Field
|
ReleaseDate apijson.Field
|
||||||
|
Status apijson.Field
|
||||||
Temperature apijson.Field
|
Temperature apijson.Field
|
||||||
ToolCall apijson.Field
|
ToolCall apijson.Field
|
||||||
raw string
|
raw string
|
||||||
@@ -1659,6 +1663,65 @@ func (r configProviderModelsLimitJSON) RawJSON() string {
|
|||||||
return r.raw
|
return r.raw
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type ConfigProviderModelsModalities struct {
|
||||||
|
Input []ConfigProviderModelsModalitiesInput `json:"input,required"`
|
||||||
|
Output []ConfigProviderModelsModalitiesOutput `json:"output,required"`
|
||||||
|
JSON configProviderModelsModalitiesJSON `json:"-"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// configProviderModelsModalitiesJSON contains the JSON metadata for the struct
|
||||||
|
// [ConfigProviderModelsModalities]
|
||||||
|
type configProviderModelsModalitiesJSON struct {
|
||||||
|
Input apijson.Field
|
||||||
|
Output apijson.Field
|
||||||
|
raw string
|
||||||
|
ExtraFields map[string]apijson.Field
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *ConfigProviderModelsModalities) UnmarshalJSON(data []byte) (err error) {
|
||||||
|
return apijson.UnmarshalRoot(data, r)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r configProviderModelsModalitiesJSON) RawJSON() string {
|
||||||
|
return r.raw
|
||||||
|
}
|
||||||
|
|
||||||
|
type ConfigProviderModelsModalitiesInput string
|
||||||
|
|
||||||
|
const (
|
||||||
|
ConfigProviderModelsModalitiesInputText ConfigProviderModelsModalitiesInput = "text"
|
||||||
|
ConfigProviderModelsModalitiesInputAudio ConfigProviderModelsModalitiesInput = "audio"
|
||||||
|
ConfigProviderModelsModalitiesInputImage ConfigProviderModelsModalitiesInput = "image"
|
||||||
|
ConfigProviderModelsModalitiesInputVideo ConfigProviderModelsModalitiesInput = "video"
|
||||||
|
ConfigProviderModelsModalitiesInputPdf ConfigProviderModelsModalitiesInput = "pdf"
|
||||||
|
)
|
||||||
|
|
||||||
|
func (r ConfigProviderModelsModalitiesInput) IsKnown() bool {
|
||||||
|
switch r {
|
||||||
|
case ConfigProviderModelsModalitiesInputText, ConfigProviderModelsModalitiesInputAudio, ConfigProviderModelsModalitiesInputImage, ConfigProviderModelsModalitiesInputVideo, ConfigProviderModelsModalitiesInputPdf:
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
type ConfigProviderModelsModalitiesOutput string
|
||||||
|
|
||||||
|
const (
|
||||||
|
ConfigProviderModelsModalitiesOutputText ConfigProviderModelsModalitiesOutput = "text"
|
||||||
|
ConfigProviderModelsModalitiesOutputAudio ConfigProviderModelsModalitiesOutput = "audio"
|
||||||
|
ConfigProviderModelsModalitiesOutputImage ConfigProviderModelsModalitiesOutput = "image"
|
||||||
|
ConfigProviderModelsModalitiesOutputVideo ConfigProviderModelsModalitiesOutput = "video"
|
||||||
|
ConfigProviderModelsModalitiesOutputPdf ConfigProviderModelsModalitiesOutput = "pdf"
|
||||||
|
)
|
||||||
|
|
||||||
|
func (r ConfigProviderModelsModalitiesOutput) IsKnown() bool {
|
||||||
|
switch r {
|
||||||
|
case ConfigProviderModelsModalitiesOutputText, ConfigProviderModelsModalitiesOutputAudio, ConfigProviderModelsModalitiesOutputImage, ConfigProviderModelsModalitiesOutputVideo, ConfigProviderModelsModalitiesOutputPdf:
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
type ConfigProviderModelsProvider struct {
|
type ConfigProviderModelsProvider struct {
|
||||||
Npm string `json:"npm,required"`
|
Npm string `json:"npm,required"`
|
||||||
JSON configProviderModelsProviderJSON `json:"-"`
|
JSON configProviderModelsProviderJSON `json:"-"`
|
||||||
@@ -1680,6 +1743,21 @@ func (r configProviderModelsProviderJSON) RawJSON() string {
|
|||||||
return r.raw
|
return r.raw
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type ConfigProviderModelsStatus string
|
||||||
|
|
||||||
|
const (
|
||||||
|
ConfigProviderModelsStatusAlpha ConfigProviderModelsStatus = "alpha"
|
||||||
|
ConfigProviderModelsStatusBeta ConfigProviderModelsStatus = "beta"
|
||||||
|
)
|
||||||
|
|
||||||
|
func (r ConfigProviderModelsStatus) IsKnown() bool {
|
||||||
|
switch r {
|
||||||
|
case ConfigProviderModelsStatusAlpha, ConfigProviderModelsStatusBeta:
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
type ConfigProviderOptions struct {
|
type ConfigProviderOptions struct {
|
||||||
APIKey string `json:"apiKey"`
|
APIKey string `json:"apiKey"`
|
||||||
BaseURL string `json:"baseURL"`
|
BaseURL string `json:"baseURL"`
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ type EventListResponse struct {
|
|||||||
// [EventListResponseEventFileWatcherUpdatedProperties],
|
// [EventListResponseEventFileWatcherUpdatedProperties],
|
||||||
// [EventListResponseEventTodoUpdatedProperties],
|
// [EventListResponseEventTodoUpdatedProperties],
|
||||||
// [EventListResponseEventSessionIdleProperties],
|
// [EventListResponseEventSessionIdleProperties],
|
||||||
|
// [EventListResponseEventSessionCreatedProperties],
|
||||||
// [EventListResponseEventSessionUpdatedProperties],
|
// [EventListResponseEventSessionUpdatedProperties],
|
||||||
// [EventListResponseEventSessionDeletedProperties],
|
// [EventListResponseEventSessionDeletedProperties],
|
||||||
// [EventListResponseEventSessionErrorProperties], [interface{}],
|
// [EventListResponseEventSessionErrorProperties], [interface{}],
|
||||||
@@ -110,9 +111,10 @@ func (r *EventListResponse) UnmarshalJSON(data []byte) (err error) {
|
|||||||
// [EventListResponseEventPermissionUpdated],
|
// [EventListResponseEventPermissionUpdated],
|
||||||
// [EventListResponseEventPermissionReplied], [EventListResponseEventFileEdited],
|
// [EventListResponseEventPermissionReplied], [EventListResponseEventFileEdited],
|
||||||
// [EventListResponseEventFileWatcherUpdated], [EventListResponseEventTodoUpdated],
|
// [EventListResponseEventFileWatcherUpdated], [EventListResponseEventTodoUpdated],
|
||||||
// [EventListResponseEventSessionIdle], [EventListResponseEventSessionUpdated],
|
// [EventListResponseEventSessionIdle], [EventListResponseEventSessionCreated],
|
||||||
// [EventListResponseEventSessionDeleted], [EventListResponseEventSessionError],
|
// [EventListResponseEventSessionUpdated], [EventListResponseEventSessionDeleted],
|
||||||
// [EventListResponseEventServerConnected], [EventListResponseEventIdeInstalled].
|
// [EventListResponseEventSessionError], [EventListResponseEventServerConnected],
|
||||||
|
// [EventListResponseEventIdeInstalled].
|
||||||
func (r EventListResponse) AsUnion() EventListResponseUnion {
|
func (r EventListResponse) AsUnion() EventListResponseUnion {
|
||||||
return r.union
|
return r.union
|
||||||
}
|
}
|
||||||
@@ -126,9 +128,10 @@ func (r EventListResponse) AsUnion() EventListResponseUnion {
|
|||||||
// [EventListResponseEventPermissionUpdated],
|
// [EventListResponseEventPermissionUpdated],
|
||||||
// [EventListResponseEventPermissionReplied], [EventListResponseEventFileEdited],
|
// [EventListResponseEventPermissionReplied], [EventListResponseEventFileEdited],
|
||||||
// [EventListResponseEventFileWatcherUpdated], [EventListResponseEventTodoUpdated],
|
// [EventListResponseEventFileWatcherUpdated], [EventListResponseEventTodoUpdated],
|
||||||
// [EventListResponseEventSessionIdle], [EventListResponseEventSessionUpdated],
|
// [EventListResponseEventSessionIdle], [EventListResponseEventSessionCreated],
|
||||||
// [EventListResponseEventSessionDeleted], [EventListResponseEventSessionError],
|
// [EventListResponseEventSessionUpdated], [EventListResponseEventSessionDeleted],
|
||||||
// [EventListResponseEventServerConnected] or [EventListResponseEventIdeInstalled].
|
// [EventListResponseEventSessionError], [EventListResponseEventServerConnected] or
|
||||||
|
// [EventListResponseEventIdeInstalled].
|
||||||
type EventListResponseUnion interface {
|
type EventListResponseUnion interface {
|
||||||
implementsEventListResponse()
|
implementsEventListResponse()
|
||||||
}
|
}
|
||||||
@@ -189,6 +192,10 @@ func init() {
|
|||||||
TypeFilter: gjson.JSON,
|
TypeFilter: gjson.JSON,
|
||||||
Type: reflect.TypeOf(EventListResponseEventSessionIdle{}),
|
Type: reflect.TypeOf(EventListResponseEventSessionIdle{}),
|
||||||
},
|
},
|
||||||
|
apijson.UnionVariant{
|
||||||
|
TypeFilter: gjson.JSON,
|
||||||
|
Type: reflect.TypeOf(EventListResponseEventSessionCreated{}),
|
||||||
|
},
|
||||||
apijson.UnionVariant{
|
apijson.UnionVariant{
|
||||||
TypeFilter: gjson.JSON,
|
TypeFilter: gjson.JSON,
|
||||||
Type: reflect.TypeOf(EventListResponseEventSessionUpdated{}),
|
Type: reflect.TypeOf(EventListResponseEventSessionUpdated{}),
|
||||||
@@ -483,6 +490,7 @@ func (r EventListResponseEventMessagePartUpdated) implementsEventListResponse()
|
|||||||
|
|
||||||
type EventListResponseEventMessagePartUpdatedProperties struct {
|
type EventListResponseEventMessagePartUpdatedProperties struct {
|
||||||
Part Part `json:"part,required"`
|
Part Part `json:"part,required"`
|
||||||
|
Delta string `json:"delta"`
|
||||||
JSON eventListResponseEventMessagePartUpdatedPropertiesJSON `json:"-"`
|
JSON eventListResponseEventMessagePartUpdatedPropertiesJSON `json:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -490,6 +498,7 @@ type EventListResponseEventMessagePartUpdatedProperties struct {
|
|||||||
// metadata for the struct [EventListResponseEventMessagePartUpdatedProperties]
|
// metadata for the struct [EventListResponseEventMessagePartUpdatedProperties]
|
||||||
type eventListResponseEventMessagePartUpdatedPropertiesJSON struct {
|
type eventListResponseEventMessagePartUpdatedPropertiesJSON struct {
|
||||||
Part apijson.Field
|
Part apijson.Field
|
||||||
|
Delta apijson.Field
|
||||||
raw string
|
raw string
|
||||||
ExtraFields map[string]apijson.Field
|
ExtraFields map[string]apijson.Field
|
||||||
}
|
}
|
||||||
@@ -1034,6 +1043,66 @@ func (r EventListResponseEventSessionIdleType) IsKnown() bool {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type EventListResponseEventSessionCreated struct {
|
||||||
|
Properties EventListResponseEventSessionCreatedProperties `json:"properties,required"`
|
||||||
|
Type EventListResponseEventSessionCreatedType `json:"type,required"`
|
||||||
|
JSON eventListResponseEventSessionCreatedJSON `json:"-"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// eventListResponseEventSessionCreatedJSON contains the JSON metadata for the
|
||||||
|
// struct [EventListResponseEventSessionCreated]
|
||||||
|
type eventListResponseEventSessionCreatedJSON struct {
|
||||||
|
Properties apijson.Field
|
||||||
|
Type apijson.Field
|
||||||
|
raw string
|
||||||
|
ExtraFields map[string]apijson.Field
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *EventListResponseEventSessionCreated) UnmarshalJSON(data []byte) (err error) {
|
||||||
|
return apijson.UnmarshalRoot(data, r)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r eventListResponseEventSessionCreatedJSON) RawJSON() string {
|
||||||
|
return r.raw
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r EventListResponseEventSessionCreated) implementsEventListResponse() {}
|
||||||
|
|
||||||
|
type EventListResponseEventSessionCreatedProperties struct {
|
||||||
|
Info Session `json:"info,required"`
|
||||||
|
JSON eventListResponseEventSessionCreatedPropertiesJSON `json:"-"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// eventListResponseEventSessionCreatedPropertiesJSON contains the JSON metadata
|
||||||
|
// for the struct [EventListResponseEventSessionCreatedProperties]
|
||||||
|
type eventListResponseEventSessionCreatedPropertiesJSON struct {
|
||||||
|
Info apijson.Field
|
||||||
|
raw string
|
||||||
|
ExtraFields map[string]apijson.Field
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *EventListResponseEventSessionCreatedProperties) UnmarshalJSON(data []byte) (err error) {
|
||||||
|
return apijson.UnmarshalRoot(data, r)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r eventListResponseEventSessionCreatedPropertiesJSON) RawJSON() string {
|
||||||
|
return r.raw
|
||||||
|
}
|
||||||
|
|
||||||
|
type EventListResponseEventSessionCreatedType string
|
||||||
|
|
||||||
|
const (
|
||||||
|
EventListResponseEventSessionCreatedTypeSessionCreated EventListResponseEventSessionCreatedType = "session.created"
|
||||||
|
)
|
||||||
|
|
||||||
|
func (r EventListResponseEventSessionCreatedType) IsKnown() bool {
|
||||||
|
switch r {
|
||||||
|
case EventListResponseEventSessionCreatedTypeSessionCreated:
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
type EventListResponseEventSessionUpdated struct {
|
type EventListResponseEventSessionUpdated struct {
|
||||||
Properties EventListResponseEventSessionUpdatedProperties `json:"properties,required"`
|
Properties EventListResponseEventSessionUpdatedProperties `json:"properties,required"`
|
||||||
Type EventListResponseEventSessionUpdatedType `json:"type,required"`
|
Type EventListResponseEventSessionUpdatedType `json:"type,required"`
|
||||||
@@ -1204,7 +1273,8 @@ func (r eventListResponseEventSessionErrorPropertiesJSON) RawJSON() string {
|
|||||||
|
|
||||||
type EventListResponseEventSessionErrorPropertiesError struct {
|
type EventListResponseEventSessionErrorPropertiesError struct {
|
||||||
// This field can have the runtime type of [shared.ProviderAuthErrorData],
|
// This field can have the runtime type of [shared.ProviderAuthErrorData],
|
||||||
// [shared.UnknownErrorData], [interface{}], [shared.MessageAbortedErrorData].
|
// [shared.UnknownErrorData], [interface{}], [shared.MessageAbortedErrorData],
|
||||||
|
// [EventListResponseEventSessionErrorPropertiesErrorAPIErrorData].
|
||||||
Data interface{} `json:"data,required"`
|
Data interface{} `json:"data,required"`
|
||||||
Name EventListResponseEventSessionErrorPropertiesErrorName `json:"name,required"`
|
Name EventListResponseEventSessionErrorPropertiesErrorName `json:"name,required"`
|
||||||
JSON eventListResponseEventSessionErrorPropertiesErrorJSON `json:"-"`
|
JSON eventListResponseEventSessionErrorPropertiesErrorJSON `json:"-"`
|
||||||
@@ -1239,14 +1309,16 @@ func (r *EventListResponseEventSessionErrorPropertiesError) UnmarshalJSON(data [
|
|||||||
// Possible runtime types of the union are [shared.ProviderAuthError],
|
// Possible runtime types of the union are [shared.ProviderAuthError],
|
||||||
// [shared.UnknownError],
|
// [shared.UnknownError],
|
||||||
// [EventListResponseEventSessionErrorPropertiesErrorMessageOutputLengthError],
|
// [EventListResponseEventSessionErrorPropertiesErrorMessageOutputLengthError],
|
||||||
// [shared.MessageAbortedError].
|
// [shared.MessageAbortedError],
|
||||||
|
// [EventListResponseEventSessionErrorPropertiesErrorAPIError].
|
||||||
func (r EventListResponseEventSessionErrorPropertiesError) AsUnion() EventListResponseEventSessionErrorPropertiesErrorUnion {
|
func (r EventListResponseEventSessionErrorPropertiesError) AsUnion() EventListResponseEventSessionErrorPropertiesErrorUnion {
|
||||||
return r.union
|
return r.union
|
||||||
}
|
}
|
||||||
|
|
||||||
// Union satisfied by [shared.ProviderAuthError], [shared.UnknownError],
|
// Union satisfied by [shared.ProviderAuthError], [shared.UnknownError],
|
||||||
// [EventListResponseEventSessionErrorPropertiesErrorMessageOutputLengthError] or
|
// [EventListResponseEventSessionErrorPropertiesErrorMessageOutputLengthError],
|
||||||
// [shared.MessageAbortedError].
|
// [shared.MessageAbortedError] or
|
||||||
|
// [EventListResponseEventSessionErrorPropertiesErrorAPIError].
|
||||||
type EventListResponseEventSessionErrorPropertiesErrorUnion interface {
|
type EventListResponseEventSessionErrorPropertiesErrorUnion interface {
|
||||||
ImplementsEventListResponseEventSessionErrorPropertiesError()
|
ImplementsEventListResponseEventSessionErrorPropertiesError()
|
||||||
}
|
}
|
||||||
@@ -1271,6 +1343,10 @@ func init() {
|
|||||||
TypeFilter: gjson.JSON,
|
TypeFilter: gjson.JSON,
|
||||||
Type: reflect.TypeOf(shared.MessageAbortedError{}),
|
Type: reflect.TypeOf(shared.MessageAbortedError{}),
|
||||||
},
|
},
|
||||||
|
apijson.UnionVariant{
|
||||||
|
TypeFilter: gjson.JSON,
|
||||||
|
Type: reflect.TypeOf(EventListResponseEventSessionErrorPropertiesErrorAPIError{}),
|
||||||
|
},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1315,6 +1391,77 @@ func (r EventListResponseEventSessionErrorPropertiesErrorMessageOutputLengthErro
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type EventListResponseEventSessionErrorPropertiesErrorAPIError struct {
|
||||||
|
Data EventListResponseEventSessionErrorPropertiesErrorAPIErrorData `json:"data,required"`
|
||||||
|
Name EventListResponseEventSessionErrorPropertiesErrorAPIErrorName `json:"name,required"`
|
||||||
|
JSON eventListResponseEventSessionErrorPropertiesErrorAPIErrorJSON `json:"-"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// eventListResponseEventSessionErrorPropertiesErrorAPIErrorJSON contains the JSON
|
||||||
|
// metadata for the struct
|
||||||
|
// [EventListResponseEventSessionErrorPropertiesErrorAPIError]
|
||||||
|
type eventListResponseEventSessionErrorPropertiesErrorAPIErrorJSON struct {
|
||||||
|
Data apijson.Field
|
||||||
|
Name apijson.Field
|
||||||
|
raw string
|
||||||
|
ExtraFields map[string]apijson.Field
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *EventListResponseEventSessionErrorPropertiesErrorAPIError) UnmarshalJSON(data []byte) (err error) {
|
||||||
|
return apijson.UnmarshalRoot(data, r)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r eventListResponseEventSessionErrorPropertiesErrorAPIErrorJSON) RawJSON() string {
|
||||||
|
return r.raw
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r EventListResponseEventSessionErrorPropertiesErrorAPIError) ImplementsEventListResponseEventSessionErrorPropertiesError() {
|
||||||
|
}
|
||||||
|
|
||||||
|
type EventListResponseEventSessionErrorPropertiesErrorAPIErrorData struct {
|
||||||
|
IsRetryable bool `json:"isRetryable,required"`
|
||||||
|
Message string `json:"message,required"`
|
||||||
|
ResponseBody string `json:"responseBody"`
|
||||||
|
ResponseHeaders map[string]string `json:"responseHeaders"`
|
||||||
|
StatusCode float64 `json:"statusCode"`
|
||||||
|
JSON eventListResponseEventSessionErrorPropertiesErrorAPIErrorDataJSON `json:"-"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// eventListResponseEventSessionErrorPropertiesErrorAPIErrorDataJSON contains the
|
||||||
|
// JSON metadata for the struct
|
||||||
|
// [EventListResponseEventSessionErrorPropertiesErrorAPIErrorData]
|
||||||
|
type eventListResponseEventSessionErrorPropertiesErrorAPIErrorDataJSON struct {
|
||||||
|
IsRetryable apijson.Field
|
||||||
|
Message apijson.Field
|
||||||
|
ResponseBody apijson.Field
|
||||||
|
ResponseHeaders apijson.Field
|
||||||
|
StatusCode apijson.Field
|
||||||
|
raw string
|
||||||
|
ExtraFields map[string]apijson.Field
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *EventListResponseEventSessionErrorPropertiesErrorAPIErrorData) UnmarshalJSON(data []byte) (err error) {
|
||||||
|
return apijson.UnmarshalRoot(data, r)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r eventListResponseEventSessionErrorPropertiesErrorAPIErrorDataJSON) RawJSON() string {
|
||||||
|
return r.raw
|
||||||
|
}
|
||||||
|
|
||||||
|
type EventListResponseEventSessionErrorPropertiesErrorAPIErrorName string
|
||||||
|
|
||||||
|
const (
|
||||||
|
EventListResponseEventSessionErrorPropertiesErrorAPIErrorNameAPIError EventListResponseEventSessionErrorPropertiesErrorAPIErrorName = "APIError"
|
||||||
|
)
|
||||||
|
|
||||||
|
func (r EventListResponseEventSessionErrorPropertiesErrorAPIErrorName) IsKnown() bool {
|
||||||
|
switch r {
|
||||||
|
case EventListResponseEventSessionErrorPropertiesErrorAPIErrorNameAPIError:
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
type EventListResponseEventSessionErrorPropertiesErrorName string
|
type EventListResponseEventSessionErrorPropertiesErrorName string
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@@ -1322,11 +1469,12 @@ const (
|
|||||||
EventListResponseEventSessionErrorPropertiesErrorNameUnknownError EventListResponseEventSessionErrorPropertiesErrorName = "UnknownError"
|
EventListResponseEventSessionErrorPropertiesErrorNameUnknownError EventListResponseEventSessionErrorPropertiesErrorName = "UnknownError"
|
||||||
EventListResponseEventSessionErrorPropertiesErrorNameMessageOutputLengthError EventListResponseEventSessionErrorPropertiesErrorName = "MessageOutputLengthError"
|
EventListResponseEventSessionErrorPropertiesErrorNameMessageOutputLengthError EventListResponseEventSessionErrorPropertiesErrorName = "MessageOutputLengthError"
|
||||||
EventListResponseEventSessionErrorPropertiesErrorNameMessageAbortedError EventListResponseEventSessionErrorPropertiesErrorName = "MessageAbortedError"
|
EventListResponseEventSessionErrorPropertiesErrorNameMessageAbortedError EventListResponseEventSessionErrorPropertiesErrorName = "MessageAbortedError"
|
||||||
|
EventListResponseEventSessionErrorPropertiesErrorNameAPIError EventListResponseEventSessionErrorPropertiesErrorName = "APIError"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (r EventListResponseEventSessionErrorPropertiesErrorName) IsKnown() bool {
|
func (r EventListResponseEventSessionErrorPropertiesErrorName) IsKnown() bool {
|
||||||
switch r {
|
switch r {
|
||||||
case EventListResponseEventSessionErrorPropertiesErrorNameProviderAuthError, EventListResponseEventSessionErrorPropertiesErrorNameUnknownError, EventListResponseEventSessionErrorPropertiesErrorNameMessageOutputLengthError, EventListResponseEventSessionErrorPropertiesErrorNameMessageAbortedError:
|
case EventListResponseEventSessionErrorPropertiesErrorNameProviderAuthError, EventListResponseEventSessionErrorPropertiesErrorNameUnknownError, EventListResponseEventSessionErrorPropertiesErrorNameMessageOutputLengthError, EventListResponseEventSessionErrorPropertiesErrorNameMessageAbortedError, EventListResponseEventSessionErrorPropertiesErrorNameAPIError:
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
@@ -1461,6 +1609,7 @@ const (
|
|||||||
EventListResponseTypeFileWatcherUpdated EventListResponseType = "file.watcher.updated"
|
EventListResponseTypeFileWatcherUpdated EventListResponseType = "file.watcher.updated"
|
||||||
EventListResponseTypeTodoUpdated EventListResponseType = "todo.updated"
|
EventListResponseTypeTodoUpdated EventListResponseType = "todo.updated"
|
||||||
EventListResponseTypeSessionIdle EventListResponseType = "session.idle"
|
EventListResponseTypeSessionIdle EventListResponseType = "session.idle"
|
||||||
|
EventListResponseTypeSessionCreated EventListResponseType = "session.created"
|
||||||
EventListResponseTypeSessionUpdated EventListResponseType = "session.updated"
|
EventListResponseTypeSessionUpdated EventListResponseType = "session.updated"
|
||||||
EventListResponseTypeSessionDeleted EventListResponseType = "session.deleted"
|
EventListResponseTypeSessionDeleted EventListResponseType = "session.deleted"
|
||||||
EventListResponseTypeSessionError EventListResponseType = "session.error"
|
EventListResponseTypeSessionError EventListResponseType = "session.error"
|
||||||
@@ -1470,7 +1619,7 @@ const (
|
|||||||
|
|
||||||
func (r EventListResponseType) IsKnown() bool {
|
func (r EventListResponseType) IsKnown() bool {
|
||||||
switch r {
|
switch r {
|
||||||
case EventListResponseTypeInstallationUpdated, EventListResponseTypeLspClientDiagnostics, EventListResponseTypeMessageUpdated, EventListResponseTypeMessageRemoved, EventListResponseTypeMessagePartUpdated, EventListResponseTypeMessagePartRemoved, EventListResponseTypeSessionCompacted, EventListResponseTypePermissionUpdated, EventListResponseTypePermissionReplied, EventListResponseTypeFileEdited, EventListResponseTypeFileWatcherUpdated, EventListResponseTypeTodoUpdated, EventListResponseTypeSessionIdle, EventListResponseTypeSessionUpdated, EventListResponseTypeSessionDeleted, EventListResponseTypeSessionError, EventListResponseTypeServerConnected, EventListResponseTypeIdeInstalled:
|
case EventListResponseTypeInstallationUpdated, EventListResponseTypeLspClientDiagnostics, EventListResponseTypeMessageUpdated, EventListResponseTypeMessageRemoved, EventListResponseTypeMessagePartUpdated, EventListResponseTypeMessagePartRemoved, EventListResponseTypeSessionCompacted, EventListResponseTypePermissionUpdated, EventListResponseTypePermissionReplied, EventListResponseTypeFileEdited, EventListResponseTypeFileWatcherUpdated, EventListResponseTypeTodoUpdated, EventListResponseTypeSessionIdle, EventListResponseTypeSessionCreated, EventListResponseTypeSessionUpdated, EventListResponseTypeSessionDeleted, EventListResponseTypeSessionError, EventListResponseTypeServerConnected, EventListResponseTypeIdeInstalled:
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
|
|||||||
@@ -145,7 +145,10 @@ func (r FileNodeType) IsKnown() bool {
|
|||||||
|
|
||||||
type FileReadResponse struct {
|
type FileReadResponse struct {
|
||||||
Content string `json:"content,required"`
|
Content string `json:"content,required"`
|
||||||
|
Type FileReadResponseType `json:"type,required"`
|
||||||
Diff string `json:"diff"`
|
Diff string `json:"diff"`
|
||||||
|
Encoding FileReadResponseEncoding `json:"encoding"`
|
||||||
|
MimeType string `json:"mimeType"`
|
||||||
Patch FileReadResponsePatch `json:"patch"`
|
Patch FileReadResponsePatch `json:"patch"`
|
||||||
JSON fileReadResponseJSON `json:"-"`
|
JSON fileReadResponseJSON `json:"-"`
|
||||||
}
|
}
|
||||||
@@ -154,7 +157,10 @@ type FileReadResponse struct {
|
|||||||
// [FileReadResponse]
|
// [FileReadResponse]
|
||||||
type fileReadResponseJSON struct {
|
type fileReadResponseJSON struct {
|
||||||
Content apijson.Field
|
Content apijson.Field
|
||||||
|
Type apijson.Field
|
||||||
Diff apijson.Field
|
Diff apijson.Field
|
||||||
|
Encoding apijson.Field
|
||||||
|
MimeType apijson.Field
|
||||||
Patch apijson.Field
|
Patch apijson.Field
|
||||||
raw string
|
raw string
|
||||||
ExtraFields map[string]apijson.Field
|
ExtraFields map[string]apijson.Field
|
||||||
@@ -168,6 +174,34 @@ func (r fileReadResponseJSON) RawJSON() string {
|
|||||||
return r.raw
|
return r.raw
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type FileReadResponseType string
|
||||||
|
|
||||||
|
const (
|
||||||
|
FileReadResponseTypeText FileReadResponseType = "text"
|
||||||
|
)
|
||||||
|
|
||||||
|
func (r FileReadResponseType) IsKnown() bool {
|
||||||
|
switch r {
|
||||||
|
case FileReadResponseTypeText:
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
type FileReadResponseEncoding string
|
||||||
|
|
||||||
|
const (
|
||||||
|
FileReadResponseEncodingBase64 FileReadResponseEncoding = "base64"
|
||||||
|
)
|
||||||
|
|
||||||
|
func (r FileReadResponseEncoding) IsKnown() bool {
|
||||||
|
switch r {
|
||||||
|
case FileReadResponseEncodingBase64:
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
type FileReadResponsePatch struct {
|
type FileReadResponsePatch struct {
|
||||||
Hunks []FileReadResponsePatchHunk `json:"hunks,required"`
|
Hunks []FileReadResponsePatchHunk `json:"hunks,required"`
|
||||||
NewFileName string `json:"newFileName,required"`
|
NewFileName string `json:"newFileName,required"`
|
||||||
|
|||||||
@@ -2,4 +2,4 @@
|
|||||||
|
|
||||||
package internal
|
package internal
|
||||||
|
|
||||||
const PackageVersion = "0.16.2" // x-release-please-version
|
const PackageVersion = "0.18.0" // x-release-please-version
|
||||||
|
|||||||
@@ -365,6 +365,7 @@ type AssistantMessage struct {
|
|||||||
Cost float64 `json:"cost,required"`
|
Cost float64 `json:"cost,required"`
|
||||||
Mode string `json:"mode,required"`
|
Mode string `json:"mode,required"`
|
||||||
ModelID string `json:"modelID,required"`
|
ModelID string `json:"modelID,required"`
|
||||||
|
ParentID string `json:"parentID,required"`
|
||||||
Path AssistantMessagePath `json:"path,required"`
|
Path AssistantMessagePath `json:"path,required"`
|
||||||
ProviderID string `json:"providerID,required"`
|
ProviderID string `json:"providerID,required"`
|
||||||
Role AssistantMessageRole `json:"role,required"`
|
Role AssistantMessageRole `json:"role,required"`
|
||||||
@@ -384,6 +385,7 @@ type assistantMessageJSON struct {
|
|||||||
Cost apijson.Field
|
Cost apijson.Field
|
||||||
Mode apijson.Field
|
Mode apijson.Field
|
||||||
ModelID apijson.Field
|
ModelID apijson.Field
|
||||||
|
ParentID apijson.Field
|
||||||
Path apijson.Field
|
Path apijson.Field
|
||||||
ProviderID apijson.Field
|
ProviderID apijson.Field
|
||||||
Role apijson.Field
|
Role apijson.Field
|
||||||
@@ -519,7 +521,8 @@ func (r assistantMessageTokensCacheJSON) RawJSON() string {
|
|||||||
|
|
||||||
type AssistantMessageError struct {
|
type AssistantMessageError struct {
|
||||||
// This field can have the runtime type of [shared.ProviderAuthErrorData],
|
// This field can have the runtime type of [shared.ProviderAuthErrorData],
|
||||||
// [shared.UnknownErrorData], [interface{}], [shared.MessageAbortedErrorData].
|
// [shared.UnknownErrorData], [interface{}], [shared.MessageAbortedErrorData],
|
||||||
|
// [AssistantMessageErrorAPIErrorData].
|
||||||
Data interface{} `json:"data,required"`
|
Data interface{} `json:"data,required"`
|
||||||
Name AssistantMessageErrorName `json:"name,required"`
|
Name AssistantMessageErrorName `json:"name,required"`
|
||||||
JSON assistantMessageErrorJSON `json:"-"`
|
JSON assistantMessageErrorJSON `json:"-"`
|
||||||
@@ -553,13 +556,14 @@ func (r *AssistantMessageError) UnmarshalJSON(data []byte) (err error) {
|
|||||||
//
|
//
|
||||||
// Possible runtime types of the union are [shared.ProviderAuthError],
|
// Possible runtime types of the union are [shared.ProviderAuthError],
|
||||||
// [shared.UnknownError], [AssistantMessageErrorMessageOutputLengthError],
|
// [shared.UnknownError], [AssistantMessageErrorMessageOutputLengthError],
|
||||||
// [shared.MessageAbortedError].
|
// [shared.MessageAbortedError], [AssistantMessageErrorAPIError].
|
||||||
func (r AssistantMessageError) AsUnion() AssistantMessageErrorUnion {
|
func (r AssistantMessageError) AsUnion() AssistantMessageErrorUnion {
|
||||||
return r.union
|
return r.union
|
||||||
}
|
}
|
||||||
|
|
||||||
// Union satisfied by [shared.ProviderAuthError], [shared.UnknownError],
|
// Union satisfied by [shared.ProviderAuthError], [shared.UnknownError],
|
||||||
// [AssistantMessageErrorMessageOutputLengthError] or [shared.MessageAbortedError].
|
// [AssistantMessageErrorMessageOutputLengthError], [shared.MessageAbortedError] or
|
||||||
|
// [AssistantMessageErrorAPIError].
|
||||||
type AssistantMessageErrorUnion interface {
|
type AssistantMessageErrorUnion interface {
|
||||||
ImplementsAssistantMessageError()
|
ImplementsAssistantMessageError()
|
||||||
}
|
}
|
||||||
@@ -584,6 +588,10 @@ func init() {
|
|||||||
TypeFilter: gjson.JSON,
|
TypeFilter: gjson.JSON,
|
||||||
Type: reflect.TypeOf(shared.MessageAbortedError{}),
|
Type: reflect.TypeOf(shared.MessageAbortedError{}),
|
||||||
},
|
},
|
||||||
|
apijson.UnionVariant{
|
||||||
|
TypeFilter: gjson.JSON,
|
||||||
|
Type: reflect.TypeOf(AssistantMessageErrorAPIError{}),
|
||||||
|
},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -626,6 +634,74 @@ func (r AssistantMessageErrorMessageOutputLengthErrorName) IsKnown() bool {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type AssistantMessageErrorAPIError struct {
|
||||||
|
Data AssistantMessageErrorAPIErrorData `json:"data,required"`
|
||||||
|
Name AssistantMessageErrorAPIErrorName `json:"name,required"`
|
||||||
|
JSON assistantMessageErrorAPIErrorJSON `json:"-"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// assistantMessageErrorAPIErrorJSON contains the JSON metadata for the struct
|
||||||
|
// [AssistantMessageErrorAPIError]
|
||||||
|
type assistantMessageErrorAPIErrorJSON struct {
|
||||||
|
Data apijson.Field
|
||||||
|
Name apijson.Field
|
||||||
|
raw string
|
||||||
|
ExtraFields map[string]apijson.Field
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *AssistantMessageErrorAPIError) UnmarshalJSON(data []byte) (err error) {
|
||||||
|
return apijson.UnmarshalRoot(data, r)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r assistantMessageErrorAPIErrorJSON) RawJSON() string {
|
||||||
|
return r.raw
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r AssistantMessageErrorAPIError) ImplementsAssistantMessageError() {}
|
||||||
|
|
||||||
|
type AssistantMessageErrorAPIErrorData struct {
|
||||||
|
IsRetryable bool `json:"isRetryable,required"`
|
||||||
|
Message string `json:"message,required"`
|
||||||
|
ResponseBody string `json:"responseBody"`
|
||||||
|
ResponseHeaders map[string]string `json:"responseHeaders"`
|
||||||
|
StatusCode float64 `json:"statusCode"`
|
||||||
|
JSON assistantMessageErrorAPIErrorDataJSON `json:"-"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// assistantMessageErrorAPIErrorDataJSON contains the JSON metadata for the struct
|
||||||
|
// [AssistantMessageErrorAPIErrorData]
|
||||||
|
type assistantMessageErrorAPIErrorDataJSON struct {
|
||||||
|
IsRetryable apijson.Field
|
||||||
|
Message apijson.Field
|
||||||
|
ResponseBody apijson.Field
|
||||||
|
ResponseHeaders apijson.Field
|
||||||
|
StatusCode apijson.Field
|
||||||
|
raw string
|
||||||
|
ExtraFields map[string]apijson.Field
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *AssistantMessageErrorAPIErrorData) UnmarshalJSON(data []byte) (err error) {
|
||||||
|
return apijson.UnmarshalRoot(data, r)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r assistantMessageErrorAPIErrorDataJSON) RawJSON() string {
|
||||||
|
return r.raw
|
||||||
|
}
|
||||||
|
|
||||||
|
type AssistantMessageErrorAPIErrorName string
|
||||||
|
|
||||||
|
const (
|
||||||
|
AssistantMessageErrorAPIErrorNameAPIError AssistantMessageErrorAPIErrorName = "APIError"
|
||||||
|
)
|
||||||
|
|
||||||
|
func (r AssistantMessageErrorAPIErrorName) IsKnown() bool {
|
||||||
|
switch r {
|
||||||
|
case AssistantMessageErrorAPIErrorNameAPIError:
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
type AssistantMessageErrorName string
|
type AssistantMessageErrorName string
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@@ -633,11 +709,12 @@ const (
|
|||||||
AssistantMessageErrorNameUnknownError AssistantMessageErrorName = "UnknownError"
|
AssistantMessageErrorNameUnknownError AssistantMessageErrorName = "UnknownError"
|
||||||
AssistantMessageErrorNameMessageOutputLengthError AssistantMessageErrorName = "MessageOutputLengthError"
|
AssistantMessageErrorNameMessageOutputLengthError AssistantMessageErrorName = "MessageOutputLengthError"
|
||||||
AssistantMessageErrorNameMessageAbortedError AssistantMessageErrorName = "MessageAbortedError"
|
AssistantMessageErrorNameMessageAbortedError AssistantMessageErrorName = "MessageAbortedError"
|
||||||
|
AssistantMessageErrorNameAPIError AssistantMessageErrorName = "APIError"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (r AssistantMessageErrorName) IsKnown() bool {
|
func (r AssistantMessageErrorName) IsKnown() bool {
|
||||||
switch r {
|
switch r {
|
||||||
case AssistantMessageErrorNameProviderAuthError, AssistantMessageErrorNameUnknownError, AssistantMessageErrorNameMessageOutputLengthError, AssistantMessageErrorNameMessageAbortedError:
|
case AssistantMessageErrorNameProviderAuthError, AssistantMessageErrorNameUnknownError, AssistantMessageErrorNameMessageOutputLengthError, AssistantMessageErrorNameMessageAbortedError, AssistantMessageErrorNameAPIError:
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
@@ -921,10 +998,12 @@ type Message struct {
|
|||||||
Error interface{} `json:"error"`
|
Error interface{} `json:"error"`
|
||||||
Mode string `json:"mode"`
|
Mode string `json:"mode"`
|
||||||
ModelID string `json:"modelID"`
|
ModelID string `json:"modelID"`
|
||||||
|
ParentID string `json:"parentID"`
|
||||||
// This field can have the runtime type of [AssistantMessagePath].
|
// This field can have the runtime type of [AssistantMessagePath].
|
||||||
Path interface{} `json:"path"`
|
Path interface{} `json:"path"`
|
||||||
ProviderID string `json:"providerID"`
|
ProviderID string `json:"providerID"`
|
||||||
Summary bool `json:"summary"`
|
// This field can have the runtime type of [UserMessageSummary], [bool].
|
||||||
|
Summary interface{} `json:"summary"`
|
||||||
// This field can have the runtime type of [[]string].
|
// This field can have the runtime type of [[]string].
|
||||||
System interface{} `json:"system"`
|
System interface{} `json:"system"`
|
||||||
// This field can have the runtime type of [AssistantMessageTokens].
|
// This field can have the runtime type of [AssistantMessageTokens].
|
||||||
@@ -943,6 +1022,7 @@ type messageJSON struct {
|
|||||||
Error apijson.Field
|
Error apijson.Field
|
||||||
Mode apijson.Field
|
Mode apijson.Field
|
||||||
ModelID apijson.Field
|
ModelID apijson.Field
|
||||||
|
ParentID apijson.Field
|
||||||
Path apijson.Field
|
Path apijson.Field
|
||||||
ProviderID apijson.Field
|
ProviderID apijson.Field
|
||||||
Summary apijson.Field
|
Summary apijson.Field
|
||||||
@@ -1013,8 +1093,11 @@ type Part struct {
|
|||||||
MessageID string `json:"messageID,required"`
|
MessageID string `json:"messageID,required"`
|
||||||
SessionID string `json:"sessionID,required"`
|
SessionID string `json:"sessionID,required"`
|
||||||
Type PartType `json:"type,required"`
|
Type PartType `json:"type,required"`
|
||||||
|
Attempt float64 `json:"attempt"`
|
||||||
CallID string `json:"callID"`
|
CallID string `json:"callID"`
|
||||||
Cost float64 `json:"cost"`
|
Cost float64 `json:"cost"`
|
||||||
|
// This field can have the runtime type of [PartRetryPartError].
|
||||||
|
Error interface{} `json:"error"`
|
||||||
Filename string `json:"filename"`
|
Filename string `json:"filename"`
|
||||||
// This field can have the runtime type of [[]string].
|
// This field can have the runtime type of [[]string].
|
||||||
Files interface{} `json:"files"`
|
Files interface{} `json:"files"`
|
||||||
@@ -1023,6 +1106,7 @@ type Part struct {
|
|||||||
Metadata interface{} `json:"metadata"`
|
Metadata interface{} `json:"metadata"`
|
||||||
Mime string `json:"mime"`
|
Mime string `json:"mime"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
|
Reason string `json:"reason"`
|
||||||
Snapshot string `json:"snapshot"`
|
Snapshot string `json:"snapshot"`
|
||||||
// This field can have the runtime type of [FilePartSource], [AgentPartSource].
|
// This field can have the runtime type of [FilePartSource], [AgentPartSource].
|
||||||
Source interface{} `json:"source"`
|
Source interface{} `json:"source"`
|
||||||
@@ -1030,7 +1114,8 @@ type Part struct {
|
|||||||
State interface{} `json:"state"`
|
State interface{} `json:"state"`
|
||||||
Synthetic bool `json:"synthetic"`
|
Synthetic bool `json:"synthetic"`
|
||||||
Text string `json:"text"`
|
Text string `json:"text"`
|
||||||
// This field can have the runtime type of [TextPartTime], [ReasoningPartTime].
|
// This field can have the runtime type of [TextPartTime], [ReasoningPartTime],
|
||||||
|
// [PartRetryPartTime].
|
||||||
Time interface{} `json:"time"`
|
Time interface{} `json:"time"`
|
||||||
// This field can have the runtime type of [StepFinishPartTokens].
|
// This field can have the runtime type of [StepFinishPartTokens].
|
||||||
Tokens interface{} `json:"tokens"`
|
Tokens interface{} `json:"tokens"`
|
||||||
@@ -1046,14 +1131,17 @@ type partJSON struct {
|
|||||||
MessageID apijson.Field
|
MessageID apijson.Field
|
||||||
SessionID apijson.Field
|
SessionID apijson.Field
|
||||||
Type apijson.Field
|
Type apijson.Field
|
||||||
|
Attempt apijson.Field
|
||||||
CallID apijson.Field
|
CallID apijson.Field
|
||||||
Cost apijson.Field
|
Cost apijson.Field
|
||||||
|
Error apijson.Field
|
||||||
Filename apijson.Field
|
Filename apijson.Field
|
||||||
Files apijson.Field
|
Files apijson.Field
|
||||||
Hash apijson.Field
|
Hash apijson.Field
|
||||||
Metadata apijson.Field
|
Metadata apijson.Field
|
||||||
Mime apijson.Field
|
Mime apijson.Field
|
||||||
Name apijson.Field
|
Name apijson.Field
|
||||||
|
Reason apijson.Field
|
||||||
Snapshot apijson.Field
|
Snapshot apijson.Field
|
||||||
Source apijson.Field
|
Source apijson.Field
|
||||||
State apijson.Field
|
State apijson.Field
|
||||||
@@ -1085,14 +1173,14 @@ func (r *Part) UnmarshalJSON(data []byte) (err error) {
|
|||||||
//
|
//
|
||||||
// Possible runtime types of the union are [TextPart], [ReasoningPart], [FilePart],
|
// Possible runtime types of the union are [TextPart], [ReasoningPart], [FilePart],
|
||||||
// [ToolPart], [StepStartPart], [StepFinishPart], [SnapshotPart], [PartPatchPart],
|
// [ToolPart], [StepStartPart], [StepFinishPart], [SnapshotPart], [PartPatchPart],
|
||||||
// [AgentPart].
|
// [AgentPart], [PartRetryPart].
|
||||||
func (r Part) AsUnion() PartUnion {
|
func (r Part) AsUnion() PartUnion {
|
||||||
return r.union
|
return r.union
|
||||||
}
|
}
|
||||||
|
|
||||||
// Union satisfied by [TextPart], [ReasoningPart], [FilePart], [ToolPart],
|
// Union satisfied by [TextPart], [ReasoningPart], [FilePart], [ToolPart],
|
||||||
// [StepStartPart], [StepFinishPart], [SnapshotPart], [PartPatchPart] or
|
// [StepStartPart], [StepFinishPart], [SnapshotPart], [PartPatchPart], [AgentPart]
|
||||||
// [AgentPart].
|
// or [PartRetryPart].
|
||||||
type PartUnion interface {
|
type PartUnion interface {
|
||||||
implementsPart()
|
implementsPart()
|
||||||
}
|
}
|
||||||
@@ -1137,6 +1225,10 @@ func init() {
|
|||||||
TypeFilter: gjson.JSON,
|
TypeFilter: gjson.JSON,
|
||||||
Type: reflect.TypeOf(AgentPart{}),
|
Type: reflect.TypeOf(AgentPart{}),
|
||||||
},
|
},
|
||||||
|
apijson.UnionVariant{
|
||||||
|
TypeFilter: gjson.JSON,
|
||||||
|
Type: reflect.TypeOf(PartRetryPart{}),
|
||||||
|
},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1186,6 +1278,141 @@ func (r PartPatchPartType) IsKnown() bool {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type PartRetryPart struct {
|
||||||
|
ID string `json:"id,required"`
|
||||||
|
Attempt float64 `json:"attempt,required"`
|
||||||
|
Error PartRetryPartError `json:"error,required"`
|
||||||
|
MessageID string `json:"messageID,required"`
|
||||||
|
SessionID string `json:"sessionID,required"`
|
||||||
|
Time PartRetryPartTime `json:"time,required"`
|
||||||
|
Type PartRetryPartType `json:"type,required"`
|
||||||
|
JSON partRetryPartJSON `json:"-"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// partRetryPartJSON contains the JSON metadata for the struct [PartRetryPart]
|
||||||
|
type partRetryPartJSON struct {
|
||||||
|
ID apijson.Field
|
||||||
|
Attempt apijson.Field
|
||||||
|
Error apijson.Field
|
||||||
|
MessageID apijson.Field
|
||||||
|
SessionID apijson.Field
|
||||||
|
Time apijson.Field
|
||||||
|
Type apijson.Field
|
||||||
|
raw string
|
||||||
|
ExtraFields map[string]apijson.Field
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *PartRetryPart) UnmarshalJSON(data []byte) (err error) {
|
||||||
|
return apijson.UnmarshalRoot(data, r)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r partRetryPartJSON) RawJSON() string {
|
||||||
|
return r.raw
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r PartRetryPart) implementsPart() {}
|
||||||
|
|
||||||
|
type PartRetryPartError struct {
|
||||||
|
Data PartRetryPartErrorData `json:"data,required"`
|
||||||
|
Name PartRetryPartErrorName `json:"name,required"`
|
||||||
|
JSON partRetryPartErrorJSON `json:"-"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// partRetryPartErrorJSON contains the JSON metadata for the struct
|
||||||
|
// [PartRetryPartError]
|
||||||
|
type partRetryPartErrorJSON struct {
|
||||||
|
Data apijson.Field
|
||||||
|
Name apijson.Field
|
||||||
|
raw string
|
||||||
|
ExtraFields map[string]apijson.Field
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *PartRetryPartError) UnmarshalJSON(data []byte) (err error) {
|
||||||
|
return apijson.UnmarshalRoot(data, r)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r partRetryPartErrorJSON) RawJSON() string {
|
||||||
|
return r.raw
|
||||||
|
}
|
||||||
|
|
||||||
|
type PartRetryPartErrorData struct {
|
||||||
|
IsRetryable bool `json:"isRetryable,required"`
|
||||||
|
Message string `json:"message,required"`
|
||||||
|
ResponseBody string `json:"responseBody"`
|
||||||
|
ResponseHeaders map[string]string `json:"responseHeaders"`
|
||||||
|
StatusCode float64 `json:"statusCode"`
|
||||||
|
JSON partRetryPartErrorDataJSON `json:"-"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// partRetryPartErrorDataJSON contains the JSON metadata for the struct
|
||||||
|
// [PartRetryPartErrorData]
|
||||||
|
type partRetryPartErrorDataJSON struct {
|
||||||
|
IsRetryable apijson.Field
|
||||||
|
Message apijson.Field
|
||||||
|
ResponseBody apijson.Field
|
||||||
|
ResponseHeaders apijson.Field
|
||||||
|
StatusCode apijson.Field
|
||||||
|
raw string
|
||||||
|
ExtraFields map[string]apijson.Field
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *PartRetryPartErrorData) UnmarshalJSON(data []byte) (err error) {
|
||||||
|
return apijson.UnmarshalRoot(data, r)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r partRetryPartErrorDataJSON) RawJSON() string {
|
||||||
|
return r.raw
|
||||||
|
}
|
||||||
|
|
||||||
|
type PartRetryPartErrorName string
|
||||||
|
|
||||||
|
const (
|
||||||
|
PartRetryPartErrorNameAPIError PartRetryPartErrorName = "APIError"
|
||||||
|
)
|
||||||
|
|
||||||
|
func (r PartRetryPartErrorName) IsKnown() bool {
|
||||||
|
switch r {
|
||||||
|
case PartRetryPartErrorNameAPIError:
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
type PartRetryPartTime struct {
|
||||||
|
Created float64 `json:"created,required"`
|
||||||
|
JSON partRetryPartTimeJSON `json:"-"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// partRetryPartTimeJSON contains the JSON metadata for the struct
|
||||||
|
// [PartRetryPartTime]
|
||||||
|
type partRetryPartTimeJSON struct {
|
||||||
|
Created apijson.Field
|
||||||
|
raw string
|
||||||
|
ExtraFields map[string]apijson.Field
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *PartRetryPartTime) UnmarshalJSON(data []byte) (err error) {
|
||||||
|
return apijson.UnmarshalRoot(data, r)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r partRetryPartTimeJSON) RawJSON() string {
|
||||||
|
return r.raw
|
||||||
|
}
|
||||||
|
|
||||||
|
type PartRetryPartType string
|
||||||
|
|
||||||
|
const (
|
||||||
|
PartRetryPartTypeRetry PartRetryPartType = "retry"
|
||||||
|
)
|
||||||
|
|
||||||
|
func (r PartRetryPartType) IsKnown() bool {
|
||||||
|
switch r {
|
||||||
|
case PartRetryPartTypeRetry:
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
type PartType string
|
type PartType string
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@@ -1198,11 +1425,12 @@ const (
|
|||||||
PartTypeSnapshot PartType = "snapshot"
|
PartTypeSnapshot PartType = "snapshot"
|
||||||
PartTypePatch PartType = "patch"
|
PartTypePatch PartType = "patch"
|
||||||
PartTypeAgent PartType = "agent"
|
PartTypeAgent PartType = "agent"
|
||||||
|
PartTypeRetry PartType = "retry"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (r PartType) IsKnown() bool {
|
func (r PartType) IsKnown() bool {
|
||||||
switch r {
|
switch r {
|
||||||
case PartTypeText, PartTypeReasoning, PartTypeFile, PartTypeTool, PartTypeStepStart, PartTypeStepFinish, PartTypeSnapshot, PartTypePatch, PartTypeAgent:
|
case PartTypeText, PartTypeReasoning, PartTypeFile, PartTypeTool, PartTypeStepStart, PartTypeStepFinish, PartTypeSnapshot, PartTypePatch, PartTypeAgent, PartTypeRetry:
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
@@ -1289,6 +1517,7 @@ type Session struct {
|
|||||||
ParentID string `json:"parentID"`
|
ParentID string `json:"parentID"`
|
||||||
Revert SessionRevert `json:"revert"`
|
Revert SessionRevert `json:"revert"`
|
||||||
Share SessionShare `json:"share"`
|
Share SessionShare `json:"share"`
|
||||||
|
Summary SessionSummary `json:"summary"`
|
||||||
JSON sessionJSON `json:"-"`
|
JSON sessionJSON `json:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1303,6 +1532,7 @@ type sessionJSON struct {
|
|||||||
ParentID apijson.Field
|
ParentID apijson.Field
|
||||||
Revert apijson.Field
|
Revert apijson.Field
|
||||||
Share apijson.Field
|
Share apijson.Field
|
||||||
|
Summary apijson.Field
|
||||||
raw string
|
raw string
|
||||||
ExtraFields map[string]apijson.Field
|
ExtraFields map[string]apijson.Field
|
||||||
}
|
}
|
||||||
@@ -1385,6 +1615,55 @@ func (r sessionShareJSON) RawJSON() string {
|
|||||||
return r.raw
|
return r.raw
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type SessionSummary struct {
|
||||||
|
Diffs []SessionSummaryDiff `json:"diffs,required"`
|
||||||
|
JSON sessionSummaryJSON `json:"-"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// sessionSummaryJSON contains the JSON metadata for the struct [SessionSummary]
|
||||||
|
type sessionSummaryJSON struct {
|
||||||
|
Diffs apijson.Field
|
||||||
|
raw string
|
||||||
|
ExtraFields map[string]apijson.Field
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *SessionSummary) UnmarshalJSON(data []byte) (err error) {
|
||||||
|
return apijson.UnmarshalRoot(data, r)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r sessionSummaryJSON) RawJSON() string {
|
||||||
|
return r.raw
|
||||||
|
}
|
||||||
|
|
||||||
|
type SessionSummaryDiff struct {
|
||||||
|
Additions float64 `json:"additions,required"`
|
||||||
|
After string `json:"after,required"`
|
||||||
|
Before string `json:"before,required"`
|
||||||
|
Deletions float64 `json:"deletions,required"`
|
||||||
|
File string `json:"file,required"`
|
||||||
|
JSON sessionSummaryDiffJSON `json:"-"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// sessionSummaryDiffJSON contains the JSON metadata for the struct
|
||||||
|
// [SessionSummaryDiff]
|
||||||
|
type sessionSummaryDiffJSON struct {
|
||||||
|
Additions apijson.Field
|
||||||
|
After apijson.Field
|
||||||
|
Before apijson.Field
|
||||||
|
Deletions apijson.Field
|
||||||
|
File apijson.Field
|
||||||
|
raw string
|
||||||
|
ExtraFields map[string]apijson.Field
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *SessionSummaryDiff) UnmarshalJSON(data []byte) (err error) {
|
||||||
|
return apijson.UnmarshalRoot(data, r)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r sessionSummaryDiffJSON) RawJSON() string {
|
||||||
|
return r.raw
|
||||||
|
}
|
||||||
|
|
||||||
type SnapshotPart struct {
|
type SnapshotPart struct {
|
||||||
ID string `json:"id,required"`
|
ID string `json:"id,required"`
|
||||||
MessageID string `json:"messageID,required"`
|
MessageID string `json:"messageID,required"`
|
||||||
@@ -1433,9 +1712,11 @@ type StepFinishPart struct {
|
|||||||
ID string `json:"id,required"`
|
ID string `json:"id,required"`
|
||||||
Cost float64 `json:"cost,required"`
|
Cost float64 `json:"cost,required"`
|
||||||
MessageID string `json:"messageID,required"`
|
MessageID string `json:"messageID,required"`
|
||||||
|
Reason string `json:"reason,required"`
|
||||||
SessionID string `json:"sessionID,required"`
|
SessionID string `json:"sessionID,required"`
|
||||||
Tokens StepFinishPartTokens `json:"tokens,required"`
|
Tokens StepFinishPartTokens `json:"tokens,required"`
|
||||||
Type StepFinishPartType `json:"type,required"`
|
Type StepFinishPartType `json:"type,required"`
|
||||||
|
Snapshot string `json:"snapshot"`
|
||||||
JSON stepFinishPartJSON `json:"-"`
|
JSON stepFinishPartJSON `json:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1444,9 +1725,11 @@ type stepFinishPartJSON struct {
|
|||||||
ID apijson.Field
|
ID apijson.Field
|
||||||
Cost apijson.Field
|
Cost apijson.Field
|
||||||
MessageID apijson.Field
|
MessageID apijson.Field
|
||||||
|
Reason apijson.Field
|
||||||
SessionID apijson.Field
|
SessionID apijson.Field
|
||||||
Tokens apijson.Field
|
Tokens apijson.Field
|
||||||
Type apijson.Field
|
Type apijson.Field
|
||||||
|
Snapshot apijson.Field
|
||||||
raw string
|
raw string
|
||||||
ExtraFields map[string]apijson.Field
|
ExtraFields map[string]apijson.Field
|
||||||
}
|
}
|
||||||
@@ -1530,6 +1813,7 @@ type StepStartPart struct {
|
|||||||
MessageID string `json:"messageID,required"`
|
MessageID string `json:"messageID,required"`
|
||||||
SessionID string `json:"sessionID,required"`
|
SessionID string `json:"sessionID,required"`
|
||||||
Type StepStartPartType `json:"type,required"`
|
Type StepStartPartType `json:"type,required"`
|
||||||
|
Snapshot string `json:"snapshot"`
|
||||||
JSON stepStartPartJSON `json:"-"`
|
JSON stepStartPartJSON `json:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1539,6 +1823,7 @@ type stepStartPartJSON struct {
|
|||||||
MessageID apijson.Field
|
MessageID apijson.Field
|
||||||
SessionID apijson.Field
|
SessionID apijson.Field
|
||||||
Type apijson.Field
|
Type apijson.Field
|
||||||
|
Snapshot apijson.Field
|
||||||
raw string
|
raw string
|
||||||
ExtraFields map[string]apijson.Field
|
ExtraFields map[string]apijson.Field
|
||||||
}
|
}
|
||||||
@@ -1872,6 +2157,8 @@ func (r ToolPart) implementsPart() {}
|
|||||||
|
|
||||||
type ToolPartState struct {
|
type ToolPartState struct {
|
||||||
Status ToolPartStateStatus `json:"status,required"`
|
Status ToolPartStateStatus `json:"status,required"`
|
||||||
|
// This field can have the runtime type of [[]FilePart].
|
||||||
|
Attachments interface{} `json:"attachments"`
|
||||||
Error string `json:"error"`
|
Error string `json:"error"`
|
||||||
// This field can have the runtime type of [interface{}], [map[string]interface{}].
|
// This field can have the runtime type of [interface{}], [map[string]interface{}].
|
||||||
Input interface{} `json:"input"`
|
Input interface{} `json:"input"`
|
||||||
@@ -1889,6 +2176,7 @@ type ToolPartState struct {
|
|||||||
// toolPartStateJSON contains the JSON metadata for the struct [ToolPartState]
|
// toolPartStateJSON contains the JSON metadata for the struct [ToolPartState]
|
||||||
type toolPartStateJSON struct {
|
type toolPartStateJSON struct {
|
||||||
Status apijson.Field
|
Status apijson.Field
|
||||||
|
Attachments apijson.Field
|
||||||
Error apijson.Field
|
Error apijson.Field
|
||||||
Input apijson.Field
|
Input apijson.Field
|
||||||
Metadata apijson.Field
|
Metadata apijson.Field
|
||||||
@@ -1988,6 +2276,7 @@ type ToolStateCompleted struct {
|
|||||||
Status ToolStateCompletedStatus `json:"status,required"`
|
Status ToolStateCompletedStatus `json:"status,required"`
|
||||||
Time ToolStateCompletedTime `json:"time,required"`
|
Time ToolStateCompletedTime `json:"time,required"`
|
||||||
Title string `json:"title,required"`
|
Title string `json:"title,required"`
|
||||||
|
Attachments []FilePart `json:"attachments"`
|
||||||
JSON toolStateCompletedJSON `json:"-"`
|
JSON toolStateCompletedJSON `json:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2000,6 +2289,7 @@ type toolStateCompletedJSON struct {
|
|||||||
Status apijson.Field
|
Status apijson.Field
|
||||||
Time apijson.Field
|
Time apijson.Field
|
||||||
Title apijson.Field
|
Title apijson.Field
|
||||||
|
Attachments apijson.Field
|
||||||
raw string
|
raw string
|
||||||
ExtraFields map[string]apijson.Field
|
ExtraFields map[string]apijson.Field
|
||||||
}
|
}
|
||||||
@@ -2228,6 +2518,7 @@ type UserMessage struct {
|
|||||||
Role UserMessageRole `json:"role,required"`
|
Role UserMessageRole `json:"role,required"`
|
||||||
SessionID string `json:"sessionID,required"`
|
SessionID string `json:"sessionID,required"`
|
||||||
Time UserMessageTime `json:"time,required"`
|
Time UserMessageTime `json:"time,required"`
|
||||||
|
Summary UserMessageSummary `json:"summary"`
|
||||||
JSON userMessageJSON `json:"-"`
|
JSON userMessageJSON `json:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2237,6 +2528,7 @@ type userMessageJSON struct {
|
|||||||
Role apijson.Field
|
Role apijson.Field
|
||||||
SessionID apijson.Field
|
SessionID apijson.Field
|
||||||
Time apijson.Field
|
Time apijson.Field
|
||||||
|
Summary apijson.Field
|
||||||
raw string
|
raw string
|
||||||
ExtraFields map[string]apijson.Field
|
ExtraFields map[string]apijson.Field
|
||||||
}
|
}
|
||||||
@@ -2285,6 +2577,60 @@ func (r userMessageTimeJSON) RawJSON() string {
|
|||||||
return r.raw
|
return r.raw
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type UserMessageSummary struct {
|
||||||
|
Diffs []UserMessageSummaryDiff `json:"diffs,required"`
|
||||||
|
Body string `json:"body"`
|
||||||
|
Title string `json:"title"`
|
||||||
|
JSON userMessageSummaryJSON `json:"-"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// userMessageSummaryJSON contains the JSON metadata for the struct
|
||||||
|
// [UserMessageSummary]
|
||||||
|
type userMessageSummaryJSON struct {
|
||||||
|
Diffs apijson.Field
|
||||||
|
Body apijson.Field
|
||||||
|
Title apijson.Field
|
||||||
|
raw string
|
||||||
|
ExtraFields map[string]apijson.Field
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *UserMessageSummary) UnmarshalJSON(data []byte) (err error) {
|
||||||
|
return apijson.UnmarshalRoot(data, r)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r userMessageSummaryJSON) RawJSON() string {
|
||||||
|
return r.raw
|
||||||
|
}
|
||||||
|
|
||||||
|
type UserMessageSummaryDiff struct {
|
||||||
|
Additions float64 `json:"additions,required"`
|
||||||
|
After string `json:"after,required"`
|
||||||
|
Before string `json:"before,required"`
|
||||||
|
Deletions float64 `json:"deletions,required"`
|
||||||
|
File string `json:"file,required"`
|
||||||
|
JSON userMessageSummaryDiffJSON `json:"-"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// userMessageSummaryDiffJSON contains the JSON metadata for the struct
|
||||||
|
// [UserMessageSummaryDiff]
|
||||||
|
type userMessageSummaryDiffJSON struct {
|
||||||
|
Additions apijson.Field
|
||||||
|
After apijson.Field
|
||||||
|
Before apijson.Field
|
||||||
|
Deletions apijson.Field
|
||||||
|
File apijson.Field
|
||||||
|
raw string
|
||||||
|
ExtraFields map[string]apijson.Field
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *UserMessageSummaryDiff) UnmarshalJSON(data []byte) (err error) {
|
||||||
|
return apijson.UnmarshalRoot(data, r)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r userMessageSummaryDiffJSON) RawJSON() string {
|
||||||
|
return r.raw
|
||||||
|
}
|
||||||
|
|
||||||
type SessionCommandResponse struct {
|
type SessionCommandResponse struct {
|
||||||
Info AssistantMessage `json:"info,required"`
|
Info AssistantMessage `json:"info,required"`
|
||||||
Parts []Part `json:"parts,required"`
|
Parts []Part `json:"parts,required"`
|
||||||
@@ -2542,6 +2888,7 @@ type SessionPromptParams struct {
|
|||||||
Agent param.Field[string] `json:"agent"`
|
Agent param.Field[string] `json:"agent"`
|
||||||
MessageID param.Field[string] `json:"messageID"`
|
MessageID param.Field[string] `json:"messageID"`
|
||||||
Model param.Field[SessionPromptParamsModel] `json:"model"`
|
Model param.Field[SessionPromptParamsModel] `json:"model"`
|
||||||
|
NoReply param.Field[bool] `json:"noReply"`
|
||||||
System param.Field[string] `json:"system"`
|
System param.Field[string] `json:"system"`
|
||||||
Tools param.Field[map[string]bool] `json:"tools"`
|
Tools param.Field[map[string]bool] `json:"tools"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -361,6 +361,7 @@ func TestSessionPromptWithOptionalParams(t *testing.T) {
|
|||||||
ModelID: opencode.F("modelID"),
|
ModelID: opencode.F("modelID"),
|
||||||
ProviderID: opencode.F("providerID"),
|
ProviderID: opencode.F("providerID"),
|
||||||
}),
|
}),
|
||||||
|
NoReply: opencode.F(true),
|
||||||
System: opencode.F("system"),
|
System: opencode.F("system"),
|
||||||
Tools: opencode.F(map[string]bool{
|
Tools: opencode.F(map[string]bool{
|
||||||
"foo": true,
|
"foo": true,
|
||||||
|
|||||||
Reference in New Issue
Block a user