mirror of
https://github.com/anomalyco/opencode.git
synced 2026-04-24 06:45:22 +00:00
sync
This commit is contained in:
@@ -23,8 +23,7 @@ require (
|
||||
)
|
||||
|
||||
replace (
|
||||
github.com/charmbracelet/x/input => ./input
|
||||
github.com/sst/opencode-sdk-go => ./sdk
|
||||
github.com/charmbracelet/x/input => ./packages/tui/input
|
||||
)
|
||||
|
||||
require golang.org/x/exp v0.0.0-20250305212735-054e65f0b394 // indirect
|
||||
4
packages/plugin/package.json
Normal file
4
packages/plugin/package.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/package.json",
|
||||
"name": "@opencode-ai/plugin"
|
||||
}
|
||||
0
packages/plugin/src/index.ts
Normal file
0
packages/plugin/src/index.ts
Normal file
1
packages/plugin/src/plugin.ts
Normal file
1
packages/plugin/src/plugin.ts
Normal file
@@ -0,0 +1 @@
|
||||
export interface Plugin {}
|
||||
@@ -1,4 +0,0 @@
|
||||
configured_endpoints: 26
|
||||
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/opencode%2Fopencode-1efc45c35b58e88b0550fbb0c7a204ef66522742f87c9e29c76a18b120c0d945.yml
|
||||
openapi_spec_hash: 5e15d85e4704624f9b13bae1c71aa416
|
||||
config_hash: 1ae82c93499b9f0b9ba828b8919f9cb3
|
||||
4
packages/sdk/go/.stats.yml
Normal file
4
packages/sdk/go/.stats.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
configured_endpoints: 26
|
||||
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/opencode%2Fopencode-335697785b44f3928145853339226bd5e8accd5199bb9d79e2a3fd2d8ce62a57.yml
|
||||
openapi_spec_hash: 74fbaad0fa44496d0d8b11d9b98eab03
|
||||
config_hash: 1ae82c93499b9f0b9ba828b8919f9cb3
|
||||
@@ -333,7 +333,7 @@ type ConfigProvider struct {
|
||||
Env []string `json:"env"`
|
||||
Name string `json:"name"`
|
||||
Npm string `json:"npm"`
|
||||
Options map[string]interface{} `json:"options"`
|
||||
Options ConfigProviderOptions `json:"options"`
|
||||
JSON configProviderJSON `json:"-"`
|
||||
}
|
||||
|
||||
@@ -447,6 +447,30 @@ func (r configProviderModelsLimitJSON) RawJSON() string {
|
||||
return r.raw
|
||||
}
|
||||
|
||||
type ConfigProviderOptions struct {
|
||||
APIKey string `json:"apiKey"`
|
||||
BaseURL string `json:"baseURL"`
|
||||
ExtraFields map[string]interface{} `json:"-,extras"`
|
||||
JSON configProviderOptionsJSON `json:"-"`
|
||||
}
|
||||
|
||||
// configProviderOptionsJSON contains the JSON metadata for the struct
|
||||
// [ConfigProviderOptions]
|
||||
type configProviderOptionsJSON struct {
|
||||
APIKey apijson.Field
|
||||
BaseURL apijson.Field
|
||||
raw string
|
||||
ExtraFields map[string]apijson.Field
|
||||
}
|
||||
|
||||
func (r *ConfigProviderOptions) UnmarshalJSON(data []byte) (err error) {
|
||||
return apijson.UnmarshalRoot(data, r)
|
||||
}
|
||||
|
||||
func (r configProviderOptionsJSON) RawJSON() string {
|
||||
return r.raw
|
||||
}
|
||||
|
||||
// Control sharing behavior:'manual' allows manual sharing via commands, 'auto'
|
||||
// enables automatic sharing, 'disabled' disables all sharing
|
||||
type ConfigShare string
|
||||
@@ -55,6 +55,7 @@ type EventListResponse struct {
|
||||
// [EventListResponseEventMessageUpdatedProperties],
|
||||
// [EventListResponseEventMessageRemovedProperties],
|
||||
// [EventListResponseEventMessagePartUpdatedProperties],
|
||||
// [EventListResponseEventMessagePartRemovedProperties],
|
||||
// [EventListResponseEventStorageWriteProperties],
|
||||
// [EventListResponseEventSessionUpdatedProperties],
|
||||
// [EventListResponseEventSessionDeletedProperties],
|
||||
@@ -99,6 +100,7 @@ func (r *EventListResponse) UnmarshalJSON(data []byte) (err error) {
|
||||
// [EventListResponseEventInstallationUpdated],
|
||||
// [EventListResponseEventMessageUpdated], [EventListResponseEventMessageRemoved],
|
||||
// [EventListResponseEventMessagePartUpdated],
|
||||
// [EventListResponseEventMessagePartRemoved],
|
||||
// [EventListResponseEventStorageWrite], [EventListResponseEventSessionUpdated],
|
||||
// [EventListResponseEventSessionDeleted], [EventListResponseEventSessionIdle],
|
||||
// [EventListResponseEventSessionError],
|
||||
@@ -113,6 +115,7 @@ func (r EventListResponse) AsUnion() EventListResponseUnion {
|
||||
// [EventListResponseEventInstallationUpdated],
|
||||
// [EventListResponseEventMessageUpdated], [EventListResponseEventMessageRemoved],
|
||||
// [EventListResponseEventMessagePartUpdated],
|
||||
// [EventListResponseEventMessagePartRemoved],
|
||||
// [EventListResponseEventStorageWrite], [EventListResponseEventSessionUpdated],
|
||||
// [EventListResponseEventSessionDeleted], [EventListResponseEventSessionIdle],
|
||||
// [EventListResponseEventSessionError], [EventListResponseEventFileWatcherUpdated]
|
||||
@@ -160,6 +163,11 @@ func init() {
|
||||
Type: reflect.TypeOf(EventListResponseEventMessagePartUpdated{}),
|
||||
DiscriminatorValue: "message.part.updated",
|
||||
},
|
||||
apijson.UnionVariant{
|
||||
TypeFilter: gjson.JSON,
|
||||
Type: reflect.TypeOf(EventListResponseEventMessagePartRemoved{}),
|
||||
DiscriminatorValue: "message.part.removed",
|
||||
},
|
||||
apijson.UnionVariant{
|
||||
TypeFilter: gjson.JSON,
|
||||
Type: reflect.TypeOf(EventListResponseEventStorageWrite{}),
|
||||
@@ -651,6 +659,68 @@ func (r EventListResponseEventMessagePartUpdatedType) IsKnown() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
type EventListResponseEventMessagePartRemoved struct {
|
||||
Properties EventListResponseEventMessagePartRemovedProperties `json:"properties,required"`
|
||||
Type EventListResponseEventMessagePartRemovedType `json:"type,required"`
|
||||
JSON eventListResponseEventMessagePartRemovedJSON `json:"-"`
|
||||
}
|
||||
|
||||
// eventListResponseEventMessagePartRemovedJSON contains the JSON metadata for the
|
||||
// struct [EventListResponseEventMessagePartRemoved]
|
||||
type eventListResponseEventMessagePartRemovedJSON struct {
|
||||
Properties apijson.Field
|
||||
Type apijson.Field
|
||||
raw string
|
||||
ExtraFields map[string]apijson.Field
|
||||
}
|
||||
|
||||
func (r *EventListResponseEventMessagePartRemoved) UnmarshalJSON(data []byte) (err error) {
|
||||
return apijson.UnmarshalRoot(data, r)
|
||||
}
|
||||
|
||||
func (r eventListResponseEventMessagePartRemovedJSON) RawJSON() string {
|
||||
return r.raw
|
||||
}
|
||||
|
||||
func (r EventListResponseEventMessagePartRemoved) implementsEventListResponse() {}
|
||||
|
||||
type EventListResponseEventMessagePartRemovedProperties struct {
|
||||
MessageID string `json:"messageID,required"`
|
||||
PartID string `json:"partID,required"`
|
||||
JSON eventListResponseEventMessagePartRemovedPropertiesJSON `json:"-"`
|
||||
}
|
||||
|
||||
// eventListResponseEventMessagePartRemovedPropertiesJSON contains the JSON
|
||||
// metadata for the struct [EventListResponseEventMessagePartRemovedProperties]
|
||||
type eventListResponseEventMessagePartRemovedPropertiesJSON struct {
|
||||
MessageID apijson.Field
|
||||
PartID apijson.Field
|
||||
raw string
|
||||
ExtraFields map[string]apijson.Field
|
||||
}
|
||||
|
||||
func (r *EventListResponseEventMessagePartRemovedProperties) UnmarshalJSON(data []byte) (err error) {
|
||||
return apijson.UnmarshalRoot(data, r)
|
||||
}
|
||||
|
||||
func (r eventListResponseEventMessagePartRemovedPropertiesJSON) RawJSON() string {
|
||||
return r.raw
|
||||
}
|
||||
|
||||
type EventListResponseEventMessagePartRemovedType string
|
||||
|
||||
const (
|
||||
EventListResponseEventMessagePartRemovedTypeMessagePartRemoved EventListResponseEventMessagePartRemovedType = "message.part.removed"
|
||||
)
|
||||
|
||||
func (r EventListResponseEventMessagePartRemovedType) IsKnown() bool {
|
||||
switch r {
|
||||
case EventListResponseEventMessagePartRemovedTypeMessagePartRemoved:
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type EventListResponseEventStorageWrite struct {
|
||||
Properties EventListResponseEventStorageWriteProperties `json:"properties,required"`
|
||||
Type EventListResponseEventStorageWriteType `json:"type,required"`
|
||||
@@ -1236,6 +1306,7 @@ const (
|
||||
EventListResponseTypeMessageUpdated EventListResponseType = "message.updated"
|
||||
EventListResponseTypeMessageRemoved EventListResponseType = "message.removed"
|
||||
EventListResponseTypeMessagePartUpdated EventListResponseType = "message.part.updated"
|
||||
EventListResponseTypeMessagePartRemoved EventListResponseType = "message.part.removed"
|
||||
EventListResponseTypeStorageWrite EventListResponseType = "storage.write"
|
||||
EventListResponseTypeSessionUpdated EventListResponseType = "session.updated"
|
||||
EventListResponseTypeSessionDeleted EventListResponseType = "session.deleted"
|
||||
@@ -1247,7 +1318,7 @@ const (
|
||||
|
||||
func (r EventListResponseType) IsKnown() bool {
|
||||
switch r {
|
||||
case EventListResponseTypeLspClientDiagnostics, EventListResponseTypePermissionUpdated, EventListResponseTypeFileEdited, EventListResponseTypeInstallationUpdated, EventListResponseTypeMessageUpdated, EventListResponseTypeMessageRemoved, EventListResponseTypeMessagePartUpdated, EventListResponseTypeStorageWrite, EventListResponseTypeSessionUpdated, EventListResponseTypeSessionDeleted, EventListResponseTypeSessionIdle, EventListResponseTypeSessionError, EventListResponseTypeFileWatcherUpdated, EventListResponseTypeIdeInstalled:
|
||||
case EventListResponseTypeLspClientDiagnostics, EventListResponseTypePermissionUpdated, EventListResponseTypeFileEdited, EventListResponseTypeInstallationUpdated, EventListResponseTypeMessageUpdated, EventListResponseTypeMessageRemoved, EventListResponseTypeMessagePartUpdated, EventListResponseTypeMessagePartRemoved, EventListResponseTypeStorageWrite, EventListResponseTypeSessionUpdated, EventListResponseTypeSessionDeleted, EventListResponseTypeSessionIdle, EventListResponseTypeSessionError, EventListResponseTypeFileWatcherUpdated, EventListResponseTypeIdeInstalled:
|
||||
return true
|
||||
}
|
||||
return false
|
||||
@@ -175,6 +175,7 @@ func (r *SessionService) Unshare(ctx context.Context, id string, opts ...option.
|
||||
type AssistantMessage struct {
|
||||
ID string `json:"id,required"`
|
||||
Cost float64 `json:"cost,required"`
|
||||
Mode string `json:"mode,required"`
|
||||
ModelID string `json:"modelID,required"`
|
||||
Path AssistantMessagePath `json:"path,required"`
|
||||
ProviderID string `json:"providerID,required"`
|
||||
@@ -193,6 +194,7 @@ type AssistantMessage struct {
|
||||
type assistantMessageJSON struct {
|
||||
ID apijson.Field
|
||||
Cost apijson.Field
|
||||
Mode apijson.Field
|
||||
ModelID apijson.Field
|
||||
Path apijson.Field
|
||||
ProviderID apijson.Field
|
||||
@@ -735,6 +737,7 @@ type Message struct {
|
||||
Cost float64 `json:"cost"`
|
||||
// This field can have the runtime type of [AssistantMessageError].
|
||||
Error interface{} `json:"error"`
|
||||
Mode string `json:"mode"`
|
||||
ModelID string `json:"modelID"`
|
||||
// This field can have the runtime type of [AssistantMessagePath].
|
||||
Path interface{} `json:"path"`
|
||||
@@ -756,6 +759,7 @@ type messageJSON struct {
|
||||
Time apijson.Field
|
||||
Cost apijson.Field
|
||||
Error apijson.Field
|
||||
Mode apijson.Field
|
||||
ModelID apijson.Field
|
||||
Path apijson.Field
|
||||
ProviderID apijson.Field
|
||||
4
packages/sdk/js/.stats.yml
Normal file
4
packages/sdk/js/.stats.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
configured_endpoints: 26
|
||||
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/opencode%2Fopencode-335697785b44f3928145853339226bd5e8accd5199bb9d79e2a3fd2d8ce62a57.yml
|
||||
openapi_spec_hash: 74fbaad0fa44496d0d8b11d9b98eab03
|
||||
config_hash: 1ae82c93499b9f0b9ba828b8919f9cb3
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user