@@ -200,6 +200,9 @@ export type Part =
200200 | ( {
201201 type : "patch"
202202 } & PatchPart )
203+ | ( {
204+ type : "agent"
205+ } & AgentPart )
203206
204207export type TextPart = {
205208 id : string
@@ -374,6 +377,19 @@ export type PatchPart = {
374377 files : Array < string >
375378}
376379
380+ export type AgentPart = {
381+ id : string
382+ sessionID : string
383+ messageID : string
384+ type : string
385+ name : string
386+ source ?: {
387+ value : string
388+ start : number
389+ end : number
390+ }
391+ }
392+
377393export type EventMessagePartRemoved = {
378394 type : string
379395 properties : {
@@ -567,17 +583,19 @@ export type Config = {
567583 */
568584 username ?: string
569585 /**
570- * Modes configuration, see https://opencode.ai/docs/modes
586+ * @deprecated Use `agent` field instead.
571587 */
572588 mode ?: {
573- build ?: ModeConfig
574- plan ?: ModeConfig
575- [ key : string ] : ModeConfig | undefined
589+ build ?: AgentConfig
590+ plan ?: AgentConfig
591+ [ key : string ] : AgentConfig | undefined
576592 }
577593 /**
578- * Modes configuration, see https://opencode.ai/docs/modes
594+ * Agent configuration, see https://opencode.ai/docs/agent
579595 */
580596 agent ?: {
597+ plan ?: AgentConfig
598+ build ?: AgentConfig
581599 general ?: AgentConfig
582600 [ key : string ] : AgentConfig | undefined
583601 }
@@ -704,13 +722,21 @@ export type KeybindsConfig = {
704722 */
705723 app_help : string
706724 /**
707- * Next mode
725+ * @deprecated use switch_agent. Next mode
708726 */
709727 switch_mode : string
710728 /**
711- * Previous Mode
729+ * @deprecated use switch_agent_reverse. Previous mode
712730 */
713731 switch_mode_reverse : string
732+ /**
733+ * Next agent
734+ */
735+ switch_agent : string
736+ /**
737+ * Previous agent
738+ */
739+ switch_agent_reverse : string
714740 /**
715741 * Open external editor
716742 */
@@ -849,7 +875,7 @@ export type KeybindsConfig = {
849875 app_exit : string
850876}
851877
852- export type ModeConfig = {
878+ export type AgentConfig = {
853879 model ?: string
854880 temperature ?: number
855881 top_p ?: number
@@ -858,10 +884,11 @@ export type ModeConfig = {
858884 [ key : string ] : boolean
859885 }
860886 disable ?: boolean
861- }
862-
863- export type AgentConfig = ModeConfig & {
864- description : string
887+ /**
888+ * Description of when to use the agent
889+ */
890+ description ?: string
891+ mode ?: string
865892}
866893
867894export type Provider = {
@@ -968,6 +995,17 @@ export type FilePartInput = {
968995 source ?: FilePartSource
969996}
970997
998+ export type AgentPartInput = {
999+ id ?: string
1000+ type : string
1001+ name : string
1002+ source ?: {
1003+ value : string
1004+ start : number
1005+ end : number
1006+ }
1007+ }
1008+
9711009export type Symbol = {
9721010 name : string
9731011 kind : number
@@ -984,10 +1022,12 @@ export type File = {
9841022 status : "added" | "deleted" | "modified"
9851023}
9861024
987- export type Mode = {
1025+ export type Agent = {
9881026 name : string
989- temperature ?: number
1027+ description ?: string
1028+ mode : string
9901029 topP ?: number
1030+ temperature ?: number
9911031 model ?: {
9921032 modelID : string
9931033 providerID : string
@@ -1103,25 +1143,25 @@ export type SessionCreateResponses = {
11031143
11041144export type SessionCreateResponse = SessionCreateResponses [ keyof SessionCreateResponses ]
11051145
1106- export type SessionGetData = {
1146+ export type SessionDeleteData = {
11071147 body ?: never
11081148 path : {
1109- sessionID : string
1149+ id : string
11101150 }
11111151 query ?: never
1112- url : "/session/{sessionID }"
1152+ url : "/session/{id }"
11131153}
11141154
1115- export type SessionGetResponses = {
1155+ export type SessionDeleteResponses = {
11161156 /**
1117- * Get session
1157+ * Successfully deleted session
11181158 */
1119- 200 : Session
1159+ 200 : boolean
11201160}
11211161
1122- export type SessionGetResponse = SessionGetResponses [ keyof SessionGetResponses ]
1162+ export type SessionDeleteResponse = SessionDeleteResponses [ keyof SessionDeleteResponses ]
11231163
1124- export type SessionDeleteData = {
1164+ export type SessionGetData = {
11251165 body ?: never
11261166 path : {
11271167 id : string
@@ -1130,14 +1170,14 @@ export type SessionDeleteData = {
11301170 url : "/session/{id}"
11311171}
11321172
1133- export type SessionDeleteResponses = {
1173+ export type SessionGetResponses = {
11341174 /**
1135- * Successfully deleted session
1175+ * Get session
11361176 */
1137- 200 : boolean
1177+ 200 : Session
11381178}
11391179
1140- export type SessionDeleteResponse = SessionDeleteResponses [ keyof SessionDeleteResponses ]
1180+ export type SessionGetResponse = SessionGetResponses [ keyof SessionGetResponses ]
11411181
11421182export type SessionInitData = {
11431183 body ?: {
@@ -1271,7 +1311,7 @@ export type SessionChatData = {
12711311 messageID ?: string
12721312 providerID : string
12731313 modelID : string
1274- mode ?: string
1314+ agent ?: string
12751315 system ?: string
12761316 tools ?: {
12771317 [ key : string ] : boolean
@@ -1283,6 +1323,9 @@ export type SessionChatData = {
12831323 | ( {
12841324 type : "file"
12851325 } & FilePartInput )
1326+ | ( {
1327+ type : "agent"
1328+ } & AgentPartInput )
12861329 >
12871330 }
12881331 path : {
@@ -1556,21 +1599,21 @@ export type AppLogResponses = {
15561599
15571600export type AppLogResponse = AppLogResponses [ keyof AppLogResponses ]
15581601
1559- export type AppModesData = {
1602+ export type AppAgentsData = {
15601603 body ?: never
15611604 path ?: never
15621605 query ?: never
1563- url : "/mode "
1606+ url : "/agent "
15641607}
15651608
1566- export type AppModesResponses = {
1609+ export type AppAgentsResponses = {
15671610 /**
1568- * List of modes
1611+ * List of agents
15691612 */
1570- 200 : Array < Mode >
1613+ 200 : Array < Agent >
15711614}
15721615
1573- export type AppModesResponse = AppModesResponses [ keyof AppModesResponses ]
1616+ export type AppAgentsResponse = AppAgentsResponses [ keyof AppAgentsResponses ]
15741617
15751618export type TuiAppendPromptData = {
15761619 body ?: {
0 commit comments