|
|
@@ -5,6 +5,12 @@ export type ClientOptions = {
|
|
|
}
|
|
|
|
|
|
export type Event =
|
|
|
+ | EventTuiPromptAppend
|
|
|
+ | EventTuiCommandExecute
|
|
|
+ | EventTuiToastShow1
|
|
|
+ | EventTuiSessionSelect
|
|
|
+ | EventServerConnected
|
|
|
+ | EventGlobalDisposed
|
|
|
| EventServerInstanceDisposed
|
|
|
| EventFileEdited
|
|
|
| EventFileWatcherUpdated
|
|
|
@@ -21,10 +27,6 @@ export type Event =
|
|
|
| EventTodoUpdated
|
|
|
| EventSessionStatus
|
|
|
| EventSessionIdle
|
|
|
- | EventTuiPromptAppend
|
|
|
- | EventTuiCommandExecute
|
|
|
- | EventTuiToastShow1
|
|
|
- | EventTuiSessionSelect
|
|
|
| EventMcpToolsChanged
|
|
|
| EventMcpBrowserOpenFailed
|
|
|
| EventCommandExecuted
|
|
|
@@ -49,9 +51,6 @@ export type Event =
|
|
|
| EventSessionCreated
|
|
|
| EventSessionUpdated
|
|
|
| EventSessionDeleted
|
|
|
- | EventServerConnected
|
|
|
- | EventGlobalDisposed
|
|
|
- | EventCatalogModelUpdated
|
|
|
| EventSessionNextAgentSwitched
|
|
|
| EventSessionNextModelSwitched
|
|
|
| EventSessionNextPrompted
|
|
|
@@ -78,6 +77,7 @@ export type Event =
|
|
|
| EventSessionNextCompactionStarted
|
|
|
| EventSessionNextCompactionDelta
|
|
|
| EventSessionNextCompactionEnded
|
|
|
+ | EventCatalogModelUpdated
|
|
|
|
|
|
export type OAuth = {
|
|
|
type: "oauth"
|
|
|
@@ -104,6 +104,61 @@ export type WellKnownAuth = {
|
|
|
|
|
|
export type Auth = OAuth | ApiAuth | WellKnownAuth
|
|
|
|
|
|
+export type EventTuiPromptAppend = {
|
|
|
+ id: string
|
|
|
+ type: "tui.prompt.append"
|
|
|
+ properties: {
|
|
|
+ text: string
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+export type EventTuiCommandExecute = {
|
|
|
+ id: string
|
|
|
+ type: "tui.command.execute"
|
|
|
+ properties: {
|
|
|
+ command:
|
|
|
+ | "session.list"
|
|
|
+ | "session.new"
|
|
|
+ | "session.share"
|
|
|
+ | "session.interrupt"
|
|
|
+ | "session.compact"
|
|
|
+ | "session.page.up"
|
|
|
+ | "session.page.down"
|
|
|
+ | "session.line.up"
|
|
|
+ | "session.line.down"
|
|
|
+ | "session.half.page.up"
|
|
|
+ | "session.half.page.down"
|
|
|
+ | "session.first"
|
|
|
+ | "session.last"
|
|
|
+ | "prompt.clear"
|
|
|
+ | "prompt.submit"
|
|
|
+ | "agent.cycle"
|
|
|
+ | string
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+export type EventTuiToastShow = {
|
|
|
+ id: string
|
|
|
+ type: "tui.toast.show"
|
|
|
+ properties: {
|
|
|
+ title?: string
|
|
|
+ message: string
|
|
|
+ variant: "info" | "success" | "warning" | "error"
|
|
|
+ duration?: number
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+export type EventTuiSessionSelect = {
|
|
|
+ id: string
|
|
|
+ type: "tui.session.select"
|
|
|
+ properties: {
|
|
|
+ /**
|
|
|
+ * Session ID to navigate to
|
|
|
+ */
|
|
|
+ sessionID: string
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
export type PermissionRequest = {
|
|
|
id: string
|
|
|
sessionID: string
|
|
|
@@ -281,61 +336,6 @@ export type SessionStatus =
|
|
|
type: "busy"
|
|
|
}
|
|
|
|
|
|
-export type EventTuiPromptAppend = {
|
|
|
- id: string
|
|
|
- type: "tui.prompt.append"
|
|
|
- properties: {
|
|
|
- text: string
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-export type EventTuiCommandExecute = {
|
|
|
- id: string
|
|
|
- type: "tui.command.execute"
|
|
|
- properties: {
|
|
|
- command:
|
|
|
- | "session.list"
|
|
|
- | "session.new"
|
|
|
- | "session.share"
|
|
|
- | "session.interrupt"
|
|
|
- | "session.compact"
|
|
|
- | "session.page.up"
|
|
|
- | "session.page.down"
|
|
|
- | "session.line.up"
|
|
|
- | "session.line.down"
|
|
|
- | "session.half.page.up"
|
|
|
- | "session.half.page.down"
|
|
|
- | "session.first"
|
|
|
- | "session.last"
|
|
|
- | "prompt.clear"
|
|
|
- | "prompt.submit"
|
|
|
- | "agent.cycle"
|
|
|
- | string
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-export type EventTuiToastShow = {
|
|
|
- id: string
|
|
|
- type: "tui.toast.show"
|
|
|
- properties: {
|
|
|
- title?: string
|
|
|
- message: string
|
|
|
- variant: "info" | "success" | "warning" | "error"
|
|
|
- duration?: number
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-export type EventTuiSessionSelect = {
|
|
|
- id: string
|
|
|
- type: "tui.session.select"
|
|
|
- properties: {
|
|
|
- /**
|
|
|
- * Session ID to navigate to
|
|
|
- */
|
|
|
- sessionID: string
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
export type Project = {
|
|
|
id: string
|
|
|
worktree: string
|
|
|
@@ -790,6 +790,12 @@ export type GlobalEvent = {
|
|
|
project?: string
|
|
|
workspace?: string
|
|
|
payload:
|
|
|
+ | EventTuiPromptAppend
|
|
|
+ | EventTuiCommandExecute
|
|
|
+ | EventTuiToastShow
|
|
|
+ | EventTuiSessionSelect
|
|
|
+ | EventServerConnected
|
|
|
+ | EventGlobalDisposed
|
|
|
| EventServerInstanceDisposed
|
|
|
| EventFileEdited
|
|
|
| EventFileWatcherUpdated
|
|
|
@@ -806,10 +812,6 @@ export type GlobalEvent = {
|
|
|
| EventTodoUpdated
|
|
|
| EventSessionStatus
|
|
|
| EventSessionIdle
|
|
|
- | EventTuiPromptAppend
|
|
|
- | EventTuiCommandExecute
|
|
|
- | EventTuiToastShow
|
|
|
- | EventTuiSessionSelect
|
|
|
| EventMcpToolsChanged
|
|
|
| EventMcpBrowserOpenFailed
|
|
|
| EventCommandExecuted
|
|
|
@@ -834,9 +836,6 @@ export type GlobalEvent = {
|
|
|
| EventSessionCreated
|
|
|
| EventSessionUpdated
|
|
|
| EventSessionDeleted
|
|
|
- | EventServerConnected
|
|
|
- | EventGlobalDisposed
|
|
|
- | EventCatalogModelUpdated
|
|
|
| EventSessionNextAgentSwitched
|
|
|
| EventSessionNextModelSwitched
|
|
|
| EventSessionNextPrompted
|
|
|
@@ -863,6 +862,7 @@ export type GlobalEvent = {
|
|
|
| EventSessionNextCompactionStarted
|
|
|
| EventSessionNextCompactionDelta
|
|
|
| EventSessionNextCompactionEnded
|
|
|
+ | EventCatalogModelUpdated
|
|
|
| SyncEventMessageUpdated
|
|
|
| SyncEventMessageRemoved
|
|
|
| SyncEventMessagePartUpdated
|
|
|
@@ -2403,6 +2403,22 @@ export type SyncEventSessionNextCompactionEnded = {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+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 EventServerInstanceDisposed = {
|
|
|
id: string
|
|
|
type: "server.instance.disposed"
|
|
|
@@ -2748,128 +2764,6 @@ export type EventSessionDeleted = {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-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 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 EventSessionNextAgentSwitched = {
|
|
|
id: string
|
|
|
type: "session.next.agent.switched"
|
|
|
@@ -3251,6 +3145,112 @@ export type EventSessionNextCompactionEnded = {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+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
|