mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-15 17:13:12 +00:00
chore: generate
This commit is contained in:
@@ -129,5 +129,4 @@ describe("EventV2", () => {
|
||||
expect(received).toEqual([Message.type, "stream"])
|
||||
}),
|
||||
)
|
||||
|
||||
})
|
||||
|
||||
@@ -21,7 +21,6 @@ export type Event =
|
||||
| EventTodoUpdated
|
||||
| EventSessionStatus
|
||||
| EventSessionIdle
|
||||
| EventSessionCompacted
|
||||
| EventTuiPromptAppend
|
||||
| EventTuiCommandExecute
|
||||
| EventTuiToastShow1
|
||||
@@ -30,6 +29,7 @@ export type Event =
|
||||
| EventMcpBrowserOpenFailed
|
||||
| EventCommandExecuted
|
||||
| EventProjectUpdated
|
||||
| EventSessionCompacted
|
||||
| EventVcsBranchUpdated
|
||||
| EventWorkspaceReady
|
||||
| EventWorkspaceFailed
|
||||
@@ -42,13 +42,9 @@ export type Event =
|
||||
| EventPtyDeleted
|
||||
| EventInstallationUpdated
|
||||
| EventInstallationUpdateAvailable
|
||||
| EventMessageUpdated
|
||||
| EventMessageRemoved
|
||||
| EventMessagePartUpdated
|
||||
| EventMessagePartRemoved
|
||||
| EventSessionCreated
|
||||
| EventSessionUpdated
|
||||
| EventSessionDeleted
|
||||
| EventServerConnected
|
||||
| EventGlobalDisposed
|
||||
| EventCatalogModelUpdated
|
||||
| EventSessionNextAgentSwitched
|
||||
| EventSessionNextModelSwitched
|
||||
| EventSessionNextPrompted
|
||||
@@ -61,23 +57,20 @@ export type Event =
|
||||
| EventSessionNextTextStarted
|
||||
| EventSessionNextTextDelta
|
||||
| EventSessionNextTextEnded
|
||||
| EventSessionNextReasoningStarted
|
||||
| EventSessionNextReasoningDelta
|
||||
| EventSessionNextReasoningEnded
|
||||
| EventSessionNextToolInputStarted
|
||||
| EventSessionNextToolInputDelta
|
||||
| EventSessionNextToolInputEnded
|
||||
| EventSessionNextToolCalled
|
||||
| EventSessionNextToolProgress
|
||||
| EventSessionNextToolSuccess
|
||||
| EventSessionNextToolFailed
|
||||
| EventSessionNextReasoningStarted
|
||||
| EventSessionNextReasoningDelta
|
||||
| EventSessionNextReasoningEnded
|
||||
| EventSessionNextRetried
|
||||
| EventSessionNextCompactionStarted
|
||||
| EventSessionNextCompactionDelta
|
||||
| EventSessionNextCompactionEnded
|
||||
| EventServerConnected
|
||||
| EventGlobalDisposed
|
||||
| EventSessionNextToolProgress
|
||||
| EventCatalogModelUpdated
|
||||
|
||||
export type OAuth = {
|
||||
type: "oauth"
|
||||
@@ -370,6 +363,13 @@ export type Pty = {
|
||||
pid: number
|
||||
}
|
||||
|
||||
export type Prompt = {
|
||||
text: string
|
||||
files?: Array<PromptFileAttachment>
|
||||
agents?: Array<PromptAgentAttachment>
|
||||
references?: Array<PromptReferenceAttachment>
|
||||
}
|
||||
|
||||
export type OutputFormatText = {
|
||||
type: "text"
|
||||
}
|
||||
@@ -778,13 +778,6 @@ export type Session = {
|
||||
}
|
||||
}
|
||||
|
||||
export type Prompt = {
|
||||
text: string
|
||||
files?: Array<PromptFileAttachment>
|
||||
agents?: Array<PromptAgentAttachment>
|
||||
references?: Array<PromptReferenceAttachment>
|
||||
}
|
||||
|
||||
export type GlobalEvent = {
|
||||
directory: string
|
||||
project?: string
|
||||
@@ -806,7 +799,6 @@ export type GlobalEvent = {
|
||||
| EventTodoUpdated
|
||||
| EventSessionStatus
|
||||
| EventSessionIdle
|
||||
| EventSessionCompacted
|
||||
| EventTuiPromptAppend
|
||||
| EventTuiCommandExecute
|
||||
| EventTuiToastShow
|
||||
@@ -815,6 +807,7 @@ export type GlobalEvent = {
|
||||
| EventMcpBrowserOpenFailed
|
||||
| EventCommandExecuted
|
||||
| EventProjectUpdated
|
||||
| EventSessionCompacted
|
||||
| EventVcsBranchUpdated
|
||||
| EventWorkspaceReady
|
||||
| EventWorkspaceFailed
|
||||
@@ -827,13 +820,9 @@ export type GlobalEvent = {
|
||||
| EventPtyDeleted
|
||||
| EventInstallationUpdated
|
||||
| EventInstallationUpdateAvailable
|
||||
| EventMessageUpdated
|
||||
| EventMessageRemoved
|
||||
| EventMessagePartUpdated
|
||||
| EventMessagePartRemoved
|
||||
| EventSessionCreated
|
||||
| EventSessionUpdated
|
||||
| EventSessionDeleted
|
||||
| EventServerConnected
|
||||
| EventGlobalDisposed
|
||||
| EventCatalogModelUpdated
|
||||
| EventSessionNextAgentSwitched
|
||||
| EventSessionNextModelSwitched
|
||||
| EventSessionNextPrompted
|
||||
@@ -846,23 +835,20 @@ export type GlobalEvent = {
|
||||
| EventSessionNextTextStarted
|
||||
| EventSessionNextTextDelta
|
||||
| EventSessionNextTextEnded
|
||||
| EventSessionNextReasoningStarted
|
||||
| EventSessionNextReasoningDelta
|
||||
| EventSessionNextReasoningEnded
|
||||
| EventSessionNextToolInputStarted
|
||||
| EventSessionNextToolInputDelta
|
||||
| EventSessionNextToolInputEnded
|
||||
| EventSessionNextToolCalled
|
||||
| EventSessionNextToolProgress
|
||||
| EventSessionNextToolSuccess
|
||||
| EventSessionNextToolFailed
|
||||
| EventSessionNextReasoningStarted
|
||||
| EventSessionNextReasoningDelta
|
||||
| EventSessionNextReasoningEnded
|
||||
| EventSessionNextRetried
|
||||
| EventSessionNextCompactionStarted
|
||||
| EventSessionNextCompactionDelta
|
||||
| EventSessionNextCompactionEnded
|
||||
| EventServerConnected
|
||||
| EventGlobalDisposed
|
||||
| EventSessionNextToolProgress
|
||||
| EventCatalogModelUpdated
|
||||
| SyncEventMessageUpdated
|
||||
| SyncEventMessageRemoved
|
||||
| SyncEventMessagePartUpdated
|
||||
@@ -2542,14 +2528,6 @@ export type EventSessionIdle = {
|
||||
}
|
||||
}
|
||||
|
||||
export type EventSessionCompacted = {
|
||||
id: string
|
||||
type: "session.compacted"
|
||||
properties: {
|
||||
sessionID: string
|
||||
}
|
||||
}
|
||||
|
||||
export type EventMcpToolsChanged = {
|
||||
id: string
|
||||
type: "mcp.tools.changed"
|
||||
@@ -2584,6 +2562,14 @@ export type EventProjectUpdated = {
|
||||
properties: Project
|
||||
}
|
||||
|
||||
export type EventSessionCompacted = {
|
||||
id: string
|
||||
type: "session.compacted"
|
||||
properties: {
|
||||
sessionID: string
|
||||
}
|
||||
}
|
||||
|
||||
export type EventVcsBranchUpdated = {
|
||||
id: string
|
||||
type: "vcs.branch.updated"
|
||||
@@ -2683,68 +2669,125 @@ export type EventInstallationUpdateAvailable = {
|
||||
}
|
||||
}
|
||||
|
||||
export type EventMessageUpdated = {
|
||||
export type EventServerConnected = {
|
||||
id: string
|
||||
type: "message.updated"
|
||||
type: "server.connected"
|
||||
properties: {
|
||||
sessionID: string
|
||||
info: Message
|
||||
[key: string]: unknown
|
||||
}
|
||||
}
|
||||
|
||||
export type EventMessageRemoved = {
|
||||
export type EventGlobalDisposed = {
|
||||
id: string
|
||||
type: "message.removed"
|
||||
type: "global.disposed"
|
||||
properties: {
|
||||
sessionID: string
|
||||
messageID: string
|
||||
[key: string]: unknown
|
||||
}
|
||||
}
|
||||
|
||||
export type EventMessagePartUpdated = {
|
||||
export type ModelV2Info = {
|
||||
id: string
|
||||
type: "message.part.updated"
|
||||
properties: {
|
||||
sessionID: string
|
||||
part: Part
|
||||
time: number
|
||||
apiID: string
|
||||
providerID: string
|
||||
family?: string
|
||||
name: string
|
||||
endpoint:
|
||||
| {
|
||||
type: "unknown"
|
||||
}
|
||||
| {
|
||||
type: "openai/responses"
|
||||
url: string
|
||||
websocket?: boolean
|
||||
}
|
||||
| {
|
||||
type: "openai/completions"
|
||||
url: string
|
||||
reasoning?:
|
||||
| {
|
||||
type: "reasoning_content"
|
||||
}
|
||||
| {
|
||||
type: "reasoning_details"
|
||||
}
|
||||
}
|
||||
| {
|
||||
type: "anthropic/messages"
|
||||
url: string
|
||||
}
|
||||
| {
|
||||
type: "aisdk"
|
||||
package: string
|
||||
url?: string
|
||||
}
|
||||
capabilities: {
|
||||
tools: boolean
|
||||
input: Array<string>
|
||||
output: Array<string>
|
||||
}
|
||||
options: {
|
||||
headers: {
|
||||
[key: string]: string
|
||||
}
|
||||
body: {
|
||||
[key: string]: unknown
|
||||
}
|
||||
aisdk: {
|
||||
provider: {
|
||||
[key: string]: unknown
|
||||
}
|
||||
request: {
|
||||
[key: string]: unknown
|
||||
}
|
||||
}
|
||||
variant?: string
|
||||
}
|
||||
variants: Array<{
|
||||
id: string
|
||||
headers: {
|
||||
[key: string]: string
|
||||
}
|
||||
body: {
|
||||
[key: string]: unknown
|
||||
}
|
||||
aisdk: {
|
||||
provider: {
|
||||
[key: string]: unknown
|
||||
}
|
||||
request: {
|
||||
[key: string]: unknown
|
||||
}
|
||||
}
|
||||
}>
|
||||
time: {
|
||||
released: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN"
|
||||
}
|
||||
cost: Array<{
|
||||
tier?: {
|
||||
type: "context"
|
||||
size: number
|
||||
}
|
||||
input: number
|
||||
output: number
|
||||
cache: {
|
||||
read: number
|
||||
write: number
|
||||
}
|
||||
}>
|
||||
status: "alpha" | "beta" | "deprecated" | "active"
|
||||
enabled: boolean
|
||||
limit: {
|
||||
context: number
|
||||
input?: number
|
||||
output: number
|
||||
}
|
||||
}
|
||||
|
||||
export type EventMessagePartRemoved = {
|
||||
export type EventCatalogModelUpdated = {
|
||||
id: string
|
||||
type: "message.part.removed"
|
||||
type: "catalog.model.updated"
|
||||
properties: {
|
||||
sessionID: string
|
||||
messageID: string
|
||||
partID: string
|
||||
}
|
||||
}
|
||||
|
||||
export type EventSessionCreated = {
|
||||
id: string
|
||||
type: "session.created"
|
||||
properties: {
|
||||
sessionID: string
|
||||
info: Session
|
||||
}
|
||||
}
|
||||
|
||||
export type EventSessionUpdated = {
|
||||
id: string
|
||||
type: "session.updated"
|
||||
properties: {
|
||||
sessionID: string
|
||||
info: Session
|
||||
}
|
||||
}
|
||||
|
||||
export type EventSessionDeleted = {
|
||||
id: string
|
||||
type: "session.deleted"
|
||||
properties: {
|
||||
sessionID: string
|
||||
info: Session
|
||||
model: ModelV2Info
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2926,6 +2969,38 @@ export type EventSessionNextTextEnded = {
|
||||
}
|
||||
}
|
||||
|
||||
export type EventSessionNextReasoningStarted = {
|
||||
id: string
|
||||
type: "session.next.reasoning.started"
|
||||
properties: {
|
||||
timestamp: number
|
||||
sessionID: string
|
||||
reasoningID: string
|
||||
}
|
||||
}
|
||||
|
||||
export type EventSessionNextReasoningDelta = {
|
||||
id: string
|
||||
type: "session.next.reasoning.delta"
|
||||
properties: {
|
||||
timestamp: number
|
||||
sessionID: string
|
||||
reasoningID: string
|
||||
delta: string
|
||||
}
|
||||
}
|
||||
|
||||
export type EventSessionNextReasoningEnded = {
|
||||
id: string
|
||||
type: "session.next.reasoning.ended"
|
||||
properties: {
|
||||
timestamp: number
|
||||
sessionID: string
|
||||
reasoningID: string
|
||||
text: string
|
||||
}
|
||||
}
|
||||
|
||||
export type EventSessionNextToolInputStarted = {
|
||||
id: string
|
||||
type: "session.next.tool.input.started"
|
||||
@@ -2991,6 +3066,20 @@ export type ToolFileContent = {
|
||||
name?: string
|
||||
}
|
||||
|
||||
export type EventSessionNextToolProgress = {
|
||||
id: string
|
||||
type: "session.next.tool.progress"
|
||||
properties: {
|
||||
timestamp: number
|
||||
sessionID: string
|
||||
callID: string
|
||||
structured: {
|
||||
[key: string]: unknown
|
||||
}
|
||||
content: Array<ToolTextContent | ToolFileContent>
|
||||
}
|
||||
}
|
||||
|
||||
export type EventSessionNextToolSuccess = {
|
||||
id: string
|
||||
type: "session.next.tool.success"
|
||||
@@ -3028,38 +3117,6 @@ export type EventSessionNextToolFailed = {
|
||||
}
|
||||
}
|
||||
|
||||
export type EventSessionNextReasoningStarted = {
|
||||
id: string
|
||||
type: "session.next.reasoning.started"
|
||||
properties: {
|
||||
timestamp: number
|
||||
sessionID: string
|
||||
reasoningID: string
|
||||
}
|
||||
}
|
||||
|
||||
export type EventSessionNextReasoningDelta = {
|
||||
id: string
|
||||
type: "session.next.reasoning.delta"
|
||||
properties: {
|
||||
timestamp: number
|
||||
sessionID: string
|
||||
reasoningID: string
|
||||
delta: string
|
||||
}
|
||||
}
|
||||
|
||||
export type EventSessionNextReasoningEnded = {
|
||||
id: string
|
||||
type: "session.next.reasoning.ended"
|
||||
properties: {
|
||||
timestamp: number
|
||||
sessionID: string
|
||||
reasoningID: string
|
||||
text: string
|
||||
}
|
||||
}
|
||||
|
||||
export type SessionNextRetryError = {
|
||||
message: string
|
||||
statusCode?: number
|
||||
@@ -3115,142 +3172,6 @@ export type EventSessionNextCompactionEnded = {
|
||||
}
|
||||
}
|
||||
|
||||
export type EventServerConnected = {
|
||||
id: string
|
||||
type: "server.connected"
|
||||
properties: {
|
||||
[key: string]: unknown
|
||||
}
|
||||
}
|
||||
|
||||
export type EventGlobalDisposed = {
|
||||
id: string
|
||||
type: "global.disposed"
|
||||
properties: {
|
||||
[key: string]: unknown
|
||||
}
|
||||
}
|
||||
|
||||
export type EventSessionNextToolProgress = {
|
||||
id: string
|
||||
type: "session.next.tool.progress"
|
||||
properties: {
|
||||
timestamp: number
|
||||
sessionID: string
|
||||
callID: string
|
||||
structured: {
|
||||
[key: string]: unknown
|
||||
}
|
||||
content: Array<ToolTextContent | ToolFileContent>
|
||||
}
|
||||
}
|
||||
|
||||
export type ModelV2Info = {
|
||||
id: string
|
||||
apiID: string
|
||||
providerID: string
|
||||
family?: string
|
||||
name: string
|
||||
endpoint:
|
||||
| {
|
||||
type: "unknown"
|
||||
}
|
||||
| {
|
||||
type: "openai/responses"
|
||||
url: string
|
||||
websocket?: boolean
|
||||
}
|
||||
| {
|
||||
type: "openai/completions"
|
||||
url: string
|
||||
reasoning?:
|
||||
| {
|
||||
type: "reasoning_content"
|
||||
}
|
||||
| {
|
||||
type: "reasoning_details"
|
||||
}
|
||||
}
|
||||
| {
|
||||
type: "anthropic/messages"
|
||||
url: string
|
||||
}
|
||||
| {
|
||||
type: "aisdk"
|
||||
package: string
|
||||
url?: string
|
||||
}
|
||||
capabilities: {
|
||||
tools: boolean
|
||||
input: Array<string>
|
||||
output: Array<string>
|
||||
}
|
||||
options: {
|
||||
headers: {
|
||||
[key: string]: string
|
||||
}
|
||||
body: {
|
||||
[key: string]: unknown
|
||||
}
|
||||
aisdk: {
|
||||
provider: {
|
||||
[key: string]: unknown
|
||||
}
|
||||
request: {
|
||||
[key: string]: unknown
|
||||
}
|
||||
}
|
||||
variant?: string
|
||||
}
|
||||
variants: Array<{
|
||||
id: string
|
||||
headers: {
|
||||
[key: string]: string
|
||||
}
|
||||
body: {
|
||||
[key: string]: unknown
|
||||
}
|
||||
aisdk: {
|
||||
provider: {
|
||||
[key: string]: unknown
|
||||
}
|
||||
request: {
|
||||
[key: string]: unknown
|
||||
}
|
||||
}
|
||||
}>
|
||||
time: {
|
||||
released: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN"
|
||||
}
|
||||
cost: Array<{
|
||||
tier?: {
|
||||
type: "context"
|
||||
size: number
|
||||
}
|
||||
input: number
|
||||
output: number
|
||||
cache: {
|
||||
read: number
|
||||
write: number
|
||||
}
|
||||
}>
|
||||
status: "alpha" | "beta" | "deprecated" | "active"
|
||||
enabled: boolean
|
||||
limit: {
|
||||
context: number
|
||||
input?: number
|
||||
output: number
|
||||
}
|
||||
}
|
||||
|
||||
export type EventCatalogModelUpdated = {
|
||||
id: string
|
||||
type: "catalog.model.updated"
|
||||
properties: {
|
||||
model: ModelV2Info
|
||||
}
|
||||
}
|
||||
|
||||
export type SessionInfo = {
|
||||
id: string
|
||||
parentID?: string
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user