openapi.json 52 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042
  1. {
  2. "openapi": "3.0.0",
  3. "info": {
  4. "title": "opencode",
  5. "description": "opencode api",
  6. "version": "1.0.0"
  7. },
  8. "paths": {
  9. "/event": {
  10. "get": {
  11. "responses": {
  12. "200": {
  13. "description": "Event stream",
  14. "content": {
  15. "application/json": {
  16. "schema": {
  17. "$ref": "#/components/schemas/Event"
  18. }
  19. }
  20. }
  21. }
  22. },
  23. "operationId": "getEvent",
  24. "parameters": [],
  25. "description": "Get events"
  26. }
  27. },
  28. "/app_info": {
  29. "post": {
  30. "responses": {
  31. "200": {
  32. "description": "200",
  33. "content": {
  34. "application/json": {
  35. "schema": {
  36. "$ref": "#/components/schemas/App.Info"
  37. }
  38. }
  39. }
  40. }
  41. },
  42. "operationId": "postApp_info",
  43. "parameters": [],
  44. "description": "Get app info"
  45. }
  46. },
  47. "/config_get": {
  48. "post": {
  49. "responses": {
  50. "200": {
  51. "description": "Get config info",
  52. "content": {
  53. "application/json": {
  54. "schema": {
  55. "$ref": "#/components/schemas/Config.Info"
  56. }
  57. }
  58. }
  59. }
  60. },
  61. "operationId": "postConfig_get",
  62. "parameters": [],
  63. "description": "Get config info"
  64. }
  65. },
  66. "/app_initialize": {
  67. "post": {
  68. "responses": {
  69. "200": {
  70. "description": "Initialize the app",
  71. "content": {
  72. "application/json": {
  73. "schema": {
  74. "type": "boolean"
  75. }
  76. }
  77. }
  78. }
  79. },
  80. "operationId": "postApp_initialize",
  81. "parameters": [],
  82. "description": "Initialize the app"
  83. }
  84. },
  85. "/session_initialize": {
  86. "post": {
  87. "responses": {
  88. "200": {
  89. "description": "200",
  90. "content": {
  91. "application/json": {
  92. "schema": {
  93. "type": "boolean"
  94. }
  95. }
  96. }
  97. }
  98. },
  99. "operationId": "postSession_initialize",
  100. "parameters": [],
  101. "description": "Analyze the app and create an AGENTS.md file",
  102. "requestBody": {
  103. "content": {
  104. "application/json": {
  105. "schema": {
  106. "type": "object",
  107. "properties": {
  108. "sessionID": {
  109. "type": "string"
  110. },
  111. "providerID": {
  112. "type": "string"
  113. },
  114. "modelID": {
  115. "type": "string"
  116. }
  117. },
  118. "required": [
  119. "sessionID",
  120. "providerID",
  121. "modelID"
  122. ]
  123. }
  124. }
  125. }
  126. }
  127. }
  128. },
  129. "/path_get": {
  130. "post": {
  131. "responses": {
  132. "200": {
  133. "description": "200",
  134. "content": {
  135. "application/json": {
  136. "schema": {
  137. "type": "object",
  138. "properties": {
  139. "root": {
  140. "type": "string"
  141. },
  142. "data": {
  143. "type": "string"
  144. },
  145. "cwd": {
  146. "type": "string"
  147. },
  148. "config": {
  149. "type": "string"
  150. }
  151. },
  152. "required": [
  153. "root",
  154. "data",
  155. "cwd",
  156. "config"
  157. ]
  158. }
  159. }
  160. }
  161. }
  162. },
  163. "operationId": "postPath_get",
  164. "parameters": [],
  165. "description": "Get paths"
  166. }
  167. },
  168. "/session_create": {
  169. "post": {
  170. "responses": {
  171. "200": {
  172. "description": "Successfully created session",
  173. "content": {
  174. "application/json": {
  175. "schema": {
  176. "$ref": "#/components/schemas/session.info"
  177. }
  178. }
  179. }
  180. },
  181. "400": {
  182. "description": "Bad request",
  183. "content": {
  184. "application/json": {
  185. "schema": {
  186. "$ref": "#/components/schemas/Error"
  187. }
  188. }
  189. }
  190. }
  191. },
  192. "operationId": "postSession_create",
  193. "parameters": [],
  194. "description": "Create a new session"
  195. }
  196. },
  197. "/session_share": {
  198. "post": {
  199. "responses": {
  200. "200": {
  201. "description": "Successfully shared session",
  202. "content": {
  203. "application/json": {
  204. "schema": {
  205. "$ref": "#/components/schemas/session.info"
  206. }
  207. }
  208. }
  209. }
  210. },
  211. "operationId": "postSession_share",
  212. "parameters": [],
  213. "description": "Share the session",
  214. "requestBody": {
  215. "content": {
  216. "application/json": {
  217. "schema": {
  218. "type": "object",
  219. "properties": {
  220. "sessionID": {
  221. "type": "string"
  222. }
  223. },
  224. "required": [
  225. "sessionID"
  226. ]
  227. }
  228. }
  229. }
  230. }
  231. }
  232. },
  233. "/session_unshare": {
  234. "post": {
  235. "responses": {
  236. "200": {
  237. "description": "Successfully unshared session",
  238. "content": {
  239. "application/json": {
  240. "schema": {
  241. "$ref": "#/components/schemas/session.info"
  242. }
  243. }
  244. }
  245. }
  246. },
  247. "operationId": "postSession_unshare",
  248. "parameters": [],
  249. "description": "Unshare the session",
  250. "requestBody": {
  251. "content": {
  252. "application/json": {
  253. "schema": {
  254. "type": "object",
  255. "properties": {
  256. "sessionID": {
  257. "type": "string"
  258. }
  259. },
  260. "required": [
  261. "sessionID"
  262. ]
  263. }
  264. }
  265. }
  266. }
  267. }
  268. },
  269. "/session_messages": {
  270. "post": {
  271. "responses": {
  272. "200": {
  273. "description": "Successfully created session",
  274. "content": {
  275. "application/json": {
  276. "schema": {
  277. "type": "array",
  278. "items": {
  279. "$ref": "#/components/schemas/Message.Info"
  280. }
  281. }
  282. }
  283. }
  284. }
  285. },
  286. "operationId": "postSession_messages",
  287. "parameters": [],
  288. "description": "Get messages for a session",
  289. "requestBody": {
  290. "content": {
  291. "application/json": {
  292. "schema": {
  293. "type": "object",
  294. "properties": {
  295. "sessionID": {
  296. "type": "string"
  297. }
  298. },
  299. "required": [
  300. "sessionID"
  301. ]
  302. }
  303. }
  304. }
  305. }
  306. }
  307. },
  308. "/session_list": {
  309. "post": {
  310. "responses": {
  311. "200": {
  312. "description": "List of sessions",
  313. "content": {
  314. "application/json": {
  315. "schema": {
  316. "type": "array",
  317. "items": {
  318. "$ref": "#/components/schemas/session.info"
  319. }
  320. }
  321. }
  322. }
  323. }
  324. },
  325. "operationId": "postSession_list",
  326. "parameters": [],
  327. "description": "List all sessions"
  328. }
  329. },
  330. "/session_abort": {
  331. "post": {
  332. "responses": {
  333. "200": {
  334. "description": "Aborted session",
  335. "content": {
  336. "application/json": {
  337. "schema": {
  338. "type": "boolean"
  339. }
  340. }
  341. }
  342. }
  343. },
  344. "operationId": "postSession_abort",
  345. "parameters": [],
  346. "description": "Abort a session",
  347. "requestBody": {
  348. "content": {
  349. "application/json": {
  350. "schema": {
  351. "type": "object",
  352. "properties": {
  353. "sessionID": {
  354. "type": "string"
  355. }
  356. },
  357. "required": [
  358. "sessionID"
  359. ]
  360. }
  361. }
  362. }
  363. }
  364. }
  365. },
  366. "/session_delete": {
  367. "post": {
  368. "responses": {
  369. "200": {
  370. "description": "Successfully deleted session",
  371. "content": {
  372. "application/json": {
  373. "schema": {
  374. "type": "boolean"
  375. }
  376. }
  377. }
  378. }
  379. },
  380. "operationId": "postSession_delete",
  381. "parameters": [],
  382. "description": "Delete a session and all its data",
  383. "requestBody": {
  384. "content": {
  385. "application/json": {
  386. "schema": {
  387. "type": "object",
  388. "properties": {
  389. "sessionID": {
  390. "type": "string"
  391. }
  392. },
  393. "required": [
  394. "sessionID"
  395. ]
  396. }
  397. }
  398. }
  399. }
  400. }
  401. },
  402. "/session_summarize": {
  403. "post": {
  404. "responses": {
  405. "200": {
  406. "description": "Summarize the session",
  407. "content": {
  408. "application/json": {
  409. "schema": {
  410. "type": "boolean"
  411. }
  412. }
  413. }
  414. }
  415. },
  416. "operationId": "postSession_summarize",
  417. "parameters": [],
  418. "description": "Summarize the session",
  419. "requestBody": {
  420. "content": {
  421. "application/json": {
  422. "schema": {
  423. "type": "object",
  424. "properties": {
  425. "sessionID": {
  426. "type": "string"
  427. },
  428. "providerID": {
  429. "type": "string"
  430. },
  431. "modelID": {
  432. "type": "string"
  433. }
  434. },
  435. "required": [
  436. "sessionID",
  437. "providerID",
  438. "modelID"
  439. ]
  440. }
  441. }
  442. }
  443. }
  444. }
  445. },
  446. "/session_chat": {
  447. "post": {
  448. "responses": {
  449. "200": {
  450. "description": "Chat with a model",
  451. "content": {
  452. "application/json": {
  453. "schema": {
  454. "$ref": "#/components/schemas/Message.Info"
  455. }
  456. }
  457. }
  458. }
  459. },
  460. "operationId": "postSession_chat",
  461. "parameters": [],
  462. "description": "Chat with a model",
  463. "requestBody": {
  464. "content": {
  465. "application/json": {
  466. "schema": {
  467. "type": "object",
  468. "properties": {
  469. "sessionID": {
  470. "type": "string"
  471. },
  472. "providerID": {
  473. "type": "string"
  474. },
  475. "modelID": {
  476. "type": "string"
  477. },
  478. "parts": {
  479. "type": "array",
  480. "items": {
  481. "$ref": "#/components/schemas/Message.Part"
  482. }
  483. }
  484. },
  485. "required": [
  486. "sessionID",
  487. "providerID",
  488. "modelID",
  489. "parts"
  490. ]
  491. }
  492. }
  493. }
  494. }
  495. }
  496. },
  497. "/provider_list": {
  498. "post": {
  499. "responses": {
  500. "200": {
  501. "description": "List of providers",
  502. "content": {
  503. "application/json": {
  504. "schema": {
  505. "type": "object",
  506. "properties": {
  507. "providers": {
  508. "type": "array",
  509. "items": {
  510. "$ref": "#/components/schemas/Provider.Info"
  511. }
  512. },
  513. "default": {
  514. "type": "object",
  515. "additionalProperties": {
  516. "type": "string"
  517. }
  518. }
  519. },
  520. "required": [
  521. "providers",
  522. "default"
  523. ]
  524. }
  525. }
  526. }
  527. }
  528. },
  529. "operationId": "postProvider_list",
  530. "parameters": [],
  531. "description": "List all providers"
  532. }
  533. },
  534. "/file_search": {
  535. "post": {
  536. "responses": {
  537. "200": {
  538. "description": "Search for files",
  539. "content": {
  540. "application/json": {
  541. "schema": {
  542. "type": "array",
  543. "items": {
  544. "type": "string"
  545. }
  546. }
  547. }
  548. }
  549. }
  550. },
  551. "operationId": "postFile_search",
  552. "parameters": [],
  553. "description": "Search for files",
  554. "requestBody": {
  555. "content": {
  556. "application/json": {
  557. "schema": {
  558. "type": "object",
  559. "properties": {
  560. "query": {
  561. "type": "string"
  562. }
  563. },
  564. "required": [
  565. "query"
  566. ]
  567. }
  568. }
  569. }
  570. }
  571. }
  572. },
  573. "/installation_info": {
  574. "post": {
  575. "responses": {
  576. "200": {
  577. "description": "Get installation info",
  578. "content": {
  579. "application/json": {
  580. "schema": {
  581. "$ref": "#/components/schemas/InstallationInfo"
  582. }
  583. }
  584. }
  585. }
  586. },
  587. "operationId": "postInstallation_info",
  588. "parameters": [],
  589. "description": "Get installation info"
  590. }
  591. }
  592. },
  593. "components": {
  594. "schemas": {
  595. "Event": {
  596. "oneOf": [
  597. {
  598. "$ref": "#/components/schemas/Event.storage.write"
  599. },
  600. {
  601. "$ref": "#/components/schemas/Event.installation.updated"
  602. },
  603. {
  604. "$ref": "#/components/schemas/Event.lsp.client.diagnostics"
  605. },
  606. {
  607. "$ref": "#/components/schemas/Event.permission.updated"
  608. },
  609. {
  610. "$ref": "#/components/schemas/Event.message.updated"
  611. },
  612. {
  613. "$ref": "#/components/schemas/Event.message.part.updated"
  614. },
  615. {
  616. "$ref": "#/components/schemas/Event.session.updated"
  617. },
  618. {
  619. "$ref": "#/components/schemas/Event.session.deleted"
  620. },
  621. {
  622. "$ref": "#/components/schemas/Event.session.error"
  623. }
  624. ],
  625. "discriminator": {
  626. "propertyName": "type",
  627. "mapping": {
  628. "storage.write": "#/components/schemas/Event.storage.write",
  629. "installation.updated": "#/components/schemas/Event.installation.updated",
  630. "lsp.client.diagnostics": "#/components/schemas/Event.lsp.client.diagnostics",
  631. "permission.updated": "#/components/schemas/Event.permission.updated",
  632. "message.updated": "#/components/schemas/Event.message.updated",
  633. "message.part.updated": "#/components/schemas/Event.message.part.updated",
  634. "session.updated": "#/components/schemas/Event.session.updated",
  635. "session.deleted": "#/components/schemas/Event.session.deleted",
  636. "session.error": "#/components/schemas/Event.session.error"
  637. }
  638. }
  639. },
  640. "Event.storage.write": {
  641. "type": "object",
  642. "properties": {
  643. "type": {
  644. "type": "string",
  645. "const": "storage.write"
  646. },
  647. "properties": {
  648. "type": "object",
  649. "properties": {
  650. "key": {
  651. "type": "string"
  652. },
  653. "content": {}
  654. },
  655. "required": [
  656. "key"
  657. ]
  658. }
  659. },
  660. "required": [
  661. "type",
  662. "properties"
  663. ]
  664. },
  665. "Event.installation.updated": {
  666. "type": "object",
  667. "properties": {
  668. "type": {
  669. "type": "string",
  670. "const": "installation.updated"
  671. },
  672. "properties": {
  673. "type": "object",
  674. "properties": {
  675. "version": {
  676. "type": "string"
  677. }
  678. },
  679. "required": [
  680. "version"
  681. ]
  682. }
  683. },
  684. "required": [
  685. "type",
  686. "properties"
  687. ]
  688. },
  689. "Event.lsp.client.diagnostics": {
  690. "type": "object",
  691. "properties": {
  692. "type": {
  693. "type": "string",
  694. "const": "lsp.client.diagnostics"
  695. },
  696. "properties": {
  697. "type": "object",
  698. "properties": {
  699. "serverID": {
  700. "type": "string"
  701. },
  702. "path": {
  703. "type": "string"
  704. }
  705. },
  706. "required": [
  707. "serverID",
  708. "path"
  709. ]
  710. }
  711. },
  712. "required": [
  713. "type",
  714. "properties"
  715. ]
  716. },
  717. "Event.permission.updated": {
  718. "type": "object",
  719. "properties": {
  720. "type": {
  721. "type": "string",
  722. "const": "permission.updated"
  723. },
  724. "properties": {
  725. "$ref": "#/components/schemas/permission.info"
  726. }
  727. },
  728. "required": [
  729. "type",
  730. "properties"
  731. ]
  732. },
  733. "permission.info": {
  734. "type": "object",
  735. "properties": {
  736. "id": {
  737. "type": "string"
  738. },
  739. "sessionID": {
  740. "type": "string"
  741. },
  742. "title": {
  743. "type": "string"
  744. },
  745. "metadata": {
  746. "type": "object",
  747. "additionalProperties": {}
  748. },
  749. "time": {
  750. "type": "object",
  751. "properties": {
  752. "created": {
  753. "type": "number"
  754. }
  755. },
  756. "required": [
  757. "created"
  758. ]
  759. }
  760. },
  761. "required": [
  762. "id",
  763. "sessionID",
  764. "title",
  765. "metadata",
  766. "time"
  767. ]
  768. },
  769. "Event.message.updated": {
  770. "type": "object",
  771. "properties": {
  772. "type": {
  773. "type": "string",
  774. "const": "message.updated"
  775. },
  776. "properties": {
  777. "type": "object",
  778. "properties": {
  779. "info": {
  780. "$ref": "#/components/schemas/Message.Info"
  781. }
  782. },
  783. "required": [
  784. "info"
  785. ]
  786. }
  787. },
  788. "required": [
  789. "type",
  790. "properties"
  791. ]
  792. },
  793. "Message.Info": {
  794. "type": "object",
  795. "properties": {
  796. "id": {
  797. "type": "string"
  798. },
  799. "role": {
  800. "type": "string",
  801. "enum": [
  802. "user",
  803. "assistant"
  804. ]
  805. },
  806. "parts": {
  807. "type": "array",
  808. "items": {
  809. "$ref": "#/components/schemas/Message.Part"
  810. }
  811. },
  812. "metadata": {
  813. "$ref": "#/components/schemas/Message.Metadata"
  814. }
  815. },
  816. "required": [
  817. "id",
  818. "role",
  819. "parts",
  820. "metadata"
  821. ]
  822. },
  823. "Message.Part": {
  824. "oneOf": [
  825. {
  826. "$ref": "#/components/schemas/Message.Part.Text"
  827. },
  828. {
  829. "$ref": "#/components/schemas/Message.Part.Reasoning"
  830. },
  831. {
  832. "$ref": "#/components/schemas/Message.Part.ToolInvocation"
  833. },
  834. {
  835. "$ref": "#/components/schemas/Message.Part.SourceUrl"
  836. },
  837. {
  838. "$ref": "#/components/schemas/Message.Part.File"
  839. },
  840. {
  841. "$ref": "#/components/schemas/Message.Part.StepStart"
  842. }
  843. ],
  844. "discriminator": {
  845. "propertyName": "type",
  846. "mapping": {
  847. "text": "#/components/schemas/Message.Part.Text",
  848. "reasoning": "#/components/schemas/Message.Part.Reasoning",
  849. "tool-invocation": "#/components/schemas/Message.Part.ToolInvocation",
  850. "source-url": "#/components/schemas/Message.Part.SourceUrl",
  851. "file": "#/components/schemas/Message.Part.File",
  852. "step-start": "#/components/schemas/Message.Part.StepStart"
  853. }
  854. }
  855. },
  856. "Message.Part.Text": {
  857. "type": "object",
  858. "properties": {
  859. "type": {
  860. "type": "string",
  861. "const": "text"
  862. },
  863. "text": {
  864. "type": "string"
  865. }
  866. },
  867. "required": [
  868. "type",
  869. "text"
  870. ]
  871. },
  872. "Message.Part.Reasoning": {
  873. "type": "object",
  874. "properties": {
  875. "type": {
  876. "type": "string",
  877. "const": "reasoning"
  878. },
  879. "text": {
  880. "type": "string"
  881. },
  882. "providerMetadata": {
  883. "type": "object",
  884. "additionalProperties": {}
  885. }
  886. },
  887. "required": [
  888. "type",
  889. "text"
  890. ]
  891. },
  892. "Message.Part.ToolInvocation": {
  893. "type": "object",
  894. "properties": {
  895. "type": {
  896. "type": "string",
  897. "const": "tool-invocation"
  898. },
  899. "toolInvocation": {
  900. "$ref": "#/components/schemas/Message.ToolInvocation"
  901. }
  902. },
  903. "required": [
  904. "type",
  905. "toolInvocation"
  906. ]
  907. },
  908. "Message.ToolInvocation": {
  909. "oneOf": [
  910. {
  911. "$ref": "#/components/schemas/Message.ToolInvocation.ToolCall"
  912. },
  913. {
  914. "$ref": "#/components/schemas/Message.ToolInvocation.ToolPartialCall"
  915. },
  916. {
  917. "$ref": "#/components/schemas/Message.ToolInvocation.ToolResult"
  918. }
  919. ],
  920. "discriminator": {
  921. "propertyName": "state",
  922. "mapping": {
  923. "call": "#/components/schemas/Message.ToolInvocation.ToolCall",
  924. "partial-call": "#/components/schemas/Message.ToolInvocation.ToolPartialCall",
  925. "result": "#/components/schemas/Message.ToolInvocation.ToolResult"
  926. }
  927. }
  928. },
  929. "Message.ToolInvocation.ToolCall": {
  930. "type": "object",
  931. "properties": {
  932. "state": {
  933. "type": "string",
  934. "const": "call"
  935. },
  936. "step": {
  937. "type": "number"
  938. },
  939. "toolCallId": {
  940. "type": "string"
  941. },
  942. "toolName": {
  943. "type": "string"
  944. },
  945. "args": {}
  946. },
  947. "required": [
  948. "state",
  949. "toolCallId",
  950. "toolName"
  951. ]
  952. },
  953. "Message.ToolInvocation.ToolPartialCall": {
  954. "type": "object",
  955. "properties": {
  956. "state": {
  957. "type": "string",
  958. "const": "partial-call"
  959. },
  960. "step": {
  961. "type": "number"
  962. },
  963. "toolCallId": {
  964. "type": "string"
  965. },
  966. "toolName": {
  967. "type": "string"
  968. },
  969. "args": {}
  970. },
  971. "required": [
  972. "state",
  973. "toolCallId",
  974. "toolName"
  975. ]
  976. },
  977. "Message.ToolInvocation.ToolResult": {
  978. "type": "object",
  979. "properties": {
  980. "state": {
  981. "type": "string",
  982. "const": "result"
  983. },
  984. "step": {
  985. "type": "number"
  986. },
  987. "toolCallId": {
  988. "type": "string"
  989. },
  990. "toolName": {
  991. "type": "string"
  992. },
  993. "args": {},
  994. "result": {
  995. "type": "string"
  996. }
  997. },
  998. "required": [
  999. "state",
  1000. "toolCallId",
  1001. "toolName",
  1002. "result"
  1003. ]
  1004. },
  1005. "Message.Part.SourceUrl": {
  1006. "type": "object",
  1007. "properties": {
  1008. "type": {
  1009. "type": "string",
  1010. "const": "source-url"
  1011. },
  1012. "sourceId": {
  1013. "type": "string"
  1014. },
  1015. "url": {
  1016. "type": "string"
  1017. },
  1018. "title": {
  1019. "type": "string"
  1020. },
  1021. "providerMetadata": {
  1022. "type": "object",
  1023. "additionalProperties": {}
  1024. }
  1025. },
  1026. "required": [
  1027. "type",
  1028. "sourceId",
  1029. "url"
  1030. ]
  1031. },
  1032. "Message.Part.File": {
  1033. "type": "object",
  1034. "properties": {
  1035. "type": {
  1036. "type": "string",
  1037. "const": "file"
  1038. },
  1039. "mediaType": {
  1040. "type": "string"
  1041. },
  1042. "filename": {
  1043. "type": "string"
  1044. },
  1045. "url": {
  1046. "type": "string"
  1047. }
  1048. },
  1049. "required": [
  1050. "type",
  1051. "mediaType",
  1052. "url"
  1053. ]
  1054. },
  1055. "Message.Part.StepStart": {
  1056. "type": "object",
  1057. "properties": {
  1058. "type": {
  1059. "type": "string",
  1060. "const": "step-start"
  1061. }
  1062. },
  1063. "required": [
  1064. "type"
  1065. ]
  1066. },
  1067. "Message.Metadata": {
  1068. "type": "object",
  1069. "properties": {
  1070. "time": {
  1071. "type": "object",
  1072. "properties": {
  1073. "created": {
  1074. "type": "number"
  1075. },
  1076. "completed": {
  1077. "type": "number"
  1078. }
  1079. },
  1080. "required": [
  1081. "created"
  1082. ]
  1083. },
  1084. "error": {
  1085. "oneOf": [
  1086. {
  1087. "$ref": "#/components/schemas/ProviderAuthError"
  1088. },
  1089. {
  1090. "$ref": "#/components/schemas/UnknownError"
  1091. },
  1092. {
  1093. "$ref": "#/components/schemas/MessageOutputLengthError"
  1094. }
  1095. ],
  1096. "discriminator": {
  1097. "propertyName": "name",
  1098. "mapping": {
  1099. "ProviderAuthError": "#/components/schemas/ProviderAuthError",
  1100. "UnknownError": "#/components/schemas/UnknownError",
  1101. "MessageOutputLengthError": "#/components/schemas/MessageOutputLengthError"
  1102. }
  1103. }
  1104. },
  1105. "sessionID": {
  1106. "type": "string"
  1107. },
  1108. "tool": {
  1109. "type": "object",
  1110. "additionalProperties": {
  1111. "type": "object",
  1112. "properties": {
  1113. "title": {
  1114. "type": "string"
  1115. },
  1116. "time": {
  1117. "type": "object",
  1118. "properties": {
  1119. "start": {
  1120. "type": "number"
  1121. },
  1122. "end": {
  1123. "type": "number"
  1124. }
  1125. },
  1126. "required": [
  1127. "start",
  1128. "end"
  1129. ]
  1130. }
  1131. },
  1132. "required": [
  1133. "title",
  1134. "time"
  1135. ],
  1136. "additionalProperties": {}
  1137. }
  1138. },
  1139. "assistant": {
  1140. "type": "object",
  1141. "properties": {
  1142. "system": {
  1143. "type": "array",
  1144. "items": {
  1145. "type": "string"
  1146. }
  1147. },
  1148. "modelID": {
  1149. "type": "string"
  1150. },
  1151. "providerID": {
  1152. "type": "string"
  1153. },
  1154. "path": {
  1155. "type": "object",
  1156. "properties": {
  1157. "cwd": {
  1158. "type": "string"
  1159. },
  1160. "root": {
  1161. "type": "string"
  1162. }
  1163. },
  1164. "required": [
  1165. "cwd",
  1166. "root"
  1167. ]
  1168. },
  1169. "cost": {
  1170. "type": "number"
  1171. },
  1172. "summary": {
  1173. "type": "boolean"
  1174. },
  1175. "tokens": {
  1176. "type": "object",
  1177. "properties": {
  1178. "input": {
  1179. "type": "number"
  1180. },
  1181. "output": {
  1182. "type": "number"
  1183. },
  1184. "reasoning": {
  1185. "type": "number"
  1186. },
  1187. "cache": {
  1188. "type": "object",
  1189. "properties": {
  1190. "read": {
  1191. "type": "number"
  1192. },
  1193. "write": {
  1194. "type": "number"
  1195. }
  1196. },
  1197. "required": [
  1198. "read",
  1199. "write"
  1200. ]
  1201. }
  1202. },
  1203. "required": [
  1204. "input",
  1205. "output",
  1206. "reasoning",
  1207. "cache"
  1208. ]
  1209. }
  1210. },
  1211. "required": [
  1212. "system",
  1213. "modelID",
  1214. "providerID",
  1215. "path",
  1216. "cost",
  1217. "tokens"
  1218. ]
  1219. }
  1220. },
  1221. "required": [
  1222. "time",
  1223. "sessionID",
  1224. "tool"
  1225. ]
  1226. },
  1227. "ProviderAuthError": {
  1228. "type": "object",
  1229. "properties": {
  1230. "name": {
  1231. "type": "string",
  1232. "const": "ProviderAuthError"
  1233. },
  1234. "data": {
  1235. "type": "object",
  1236. "properties": {
  1237. "providerID": {
  1238. "type": "string"
  1239. },
  1240. "message": {
  1241. "type": "string"
  1242. }
  1243. },
  1244. "required": [
  1245. "providerID",
  1246. "message"
  1247. ]
  1248. }
  1249. },
  1250. "required": [
  1251. "name",
  1252. "data"
  1253. ]
  1254. },
  1255. "UnknownError": {
  1256. "type": "object",
  1257. "properties": {
  1258. "name": {
  1259. "type": "string",
  1260. "const": "UnknownError"
  1261. },
  1262. "data": {
  1263. "type": "object",
  1264. "properties": {
  1265. "message": {
  1266. "type": "string"
  1267. }
  1268. },
  1269. "required": [
  1270. "message"
  1271. ]
  1272. }
  1273. },
  1274. "required": [
  1275. "name",
  1276. "data"
  1277. ]
  1278. },
  1279. "MessageOutputLengthError": {
  1280. "type": "object",
  1281. "properties": {
  1282. "name": {
  1283. "type": "string",
  1284. "const": "MessageOutputLengthError"
  1285. },
  1286. "data": {
  1287. "type": "object"
  1288. }
  1289. },
  1290. "required": [
  1291. "name",
  1292. "data"
  1293. ]
  1294. },
  1295. "Event.message.part.updated": {
  1296. "type": "object",
  1297. "properties": {
  1298. "type": {
  1299. "type": "string",
  1300. "const": "message.part.updated"
  1301. },
  1302. "properties": {
  1303. "type": "object",
  1304. "properties": {
  1305. "part": {
  1306. "$ref": "#/components/schemas/Message.Part"
  1307. },
  1308. "sessionID": {
  1309. "type": "string"
  1310. },
  1311. "messageID": {
  1312. "type": "string"
  1313. }
  1314. },
  1315. "required": [
  1316. "part",
  1317. "sessionID",
  1318. "messageID"
  1319. ]
  1320. }
  1321. },
  1322. "required": [
  1323. "type",
  1324. "properties"
  1325. ]
  1326. },
  1327. "Event.session.updated": {
  1328. "type": "object",
  1329. "properties": {
  1330. "type": {
  1331. "type": "string",
  1332. "const": "session.updated"
  1333. },
  1334. "properties": {
  1335. "type": "object",
  1336. "properties": {
  1337. "info": {
  1338. "$ref": "#/components/schemas/session.info"
  1339. }
  1340. },
  1341. "required": [
  1342. "info"
  1343. ]
  1344. }
  1345. },
  1346. "required": [
  1347. "type",
  1348. "properties"
  1349. ]
  1350. },
  1351. "session.info": {
  1352. "type": "object",
  1353. "properties": {
  1354. "id": {
  1355. "type": "string",
  1356. "pattern": "^ses"
  1357. },
  1358. "parentID": {
  1359. "type": "string",
  1360. "pattern": "^ses"
  1361. },
  1362. "share": {
  1363. "type": "object",
  1364. "properties": {
  1365. "url": {
  1366. "type": "string"
  1367. }
  1368. },
  1369. "required": [
  1370. "url"
  1371. ]
  1372. },
  1373. "title": {
  1374. "type": "string"
  1375. },
  1376. "version": {
  1377. "type": "string"
  1378. },
  1379. "time": {
  1380. "type": "object",
  1381. "properties": {
  1382. "created": {
  1383. "type": "number"
  1384. },
  1385. "updated": {
  1386. "type": "number"
  1387. }
  1388. },
  1389. "required": [
  1390. "created",
  1391. "updated"
  1392. ]
  1393. }
  1394. },
  1395. "required": [
  1396. "id",
  1397. "title",
  1398. "version",
  1399. "time"
  1400. ]
  1401. },
  1402. "Event.session.deleted": {
  1403. "type": "object",
  1404. "properties": {
  1405. "type": {
  1406. "type": "string",
  1407. "const": "session.deleted"
  1408. },
  1409. "properties": {
  1410. "type": "object",
  1411. "properties": {
  1412. "info": {
  1413. "$ref": "#/components/schemas/session.info"
  1414. }
  1415. },
  1416. "required": [
  1417. "info"
  1418. ]
  1419. }
  1420. },
  1421. "required": [
  1422. "type",
  1423. "properties"
  1424. ]
  1425. },
  1426. "Event.session.error": {
  1427. "type": "object",
  1428. "properties": {
  1429. "type": {
  1430. "type": "string",
  1431. "const": "session.error"
  1432. },
  1433. "properties": {
  1434. "type": "object",
  1435. "properties": {
  1436. "error": {
  1437. "oneOf": [
  1438. {
  1439. "$ref": "#/components/schemas/ProviderAuthError"
  1440. },
  1441. {
  1442. "$ref": "#/components/schemas/UnknownError"
  1443. },
  1444. {
  1445. "$ref": "#/components/schemas/MessageOutputLengthError"
  1446. }
  1447. ],
  1448. "discriminator": {
  1449. "propertyName": "name",
  1450. "mapping": {
  1451. "ProviderAuthError": "#/components/schemas/ProviderAuthError",
  1452. "UnknownError": "#/components/schemas/UnknownError",
  1453. "MessageOutputLengthError": "#/components/schemas/MessageOutputLengthError"
  1454. }
  1455. }
  1456. }
  1457. }
  1458. }
  1459. },
  1460. "required": [
  1461. "type",
  1462. "properties"
  1463. ]
  1464. },
  1465. "App.Info": {
  1466. "type": "object",
  1467. "properties": {
  1468. "project": {
  1469. "type": "string"
  1470. },
  1471. "user": {
  1472. "type": "string"
  1473. },
  1474. "hostname": {
  1475. "type": "string"
  1476. },
  1477. "git": {
  1478. "type": "boolean"
  1479. },
  1480. "path": {
  1481. "type": "object",
  1482. "properties": {
  1483. "config": {
  1484. "type": "string"
  1485. },
  1486. "data": {
  1487. "type": "string"
  1488. },
  1489. "root": {
  1490. "type": "string"
  1491. },
  1492. "cwd": {
  1493. "type": "string"
  1494. },
  1495. "state": {
  1496. "type": "string"
  1497. }
  1498. },
  1499. "required": [
  1500. "config",
  1501. "data",
  1502. "root",
  1503. "cwd",
  1504. "state"
  1505. ]
  1506. },
  1507. "time": {
  1508. "type": "object",
  1509. "properties": {
  1510. "initialized": {
  1511. "type": "number"
  1512. }
  1513. }
  1514. }
  1515. },
  1516. "required": [
  1517. "project",
  1518. "user",
  1519. "hostname",
  1520. "git",
  1521. "path",
  1522. "time"
  1523. ]
  1524. },
  1525. "Config.Info": {
  1526. "type": "object",
  1527. "properties": {
  1528. "$schema": {
  1529. "type": "string",
  1530. "description": "JSON schema reference for configuration validation"
  1531. },
  1532. "theme": {
  1533. "type": "string",
  1534. "description": "Theme name to use for the interface"
  1535. },
  1536. "keybinds": {
  1537. "$ref": "#/components/schemas/Config.Keybinds",
  1538. "description": "Custom keybind configurations"
  1539. },
  1540. "autoshare": {
  1541. "type": "boolean",
  1542. "description": "Share newly created sessions automatically"
  1543. },
  1544. "autoupdate": {
  1545. "type": "boolean",
  1546. "description": "Automatically update to the latest version"
  1547. },
  1548. "disabled_providers": {
  1549. "type": "array",
  1550. "items": {
  1551. "type": "string"
  1552. },
  1553. "description": "Disable providers that are loaded automatically"
  1554. },
  1555. "model": {
  1556. "type": "string",
  1557. "description": "Model to use in the format of provider/model, eg anthropic/claude-2"
  1558. },
  1559. "provider": {
  1560. "type": "object",
  1561. "additionalProperties": {
  1562. "type": "object",
  1563. "properties": {
  1564. "api": {
  1565. "type": "string"
  1566. },
  1567. "name": {
  1568. "type": "string"
  1569. },
  1570. "env": {
  1571. "type": "array",
  1572. "items": {
  1573. "type": "string"
  1574. }
  1575. },
  1576. "id": {
  1577. "type": "string"
  1578. },
  1579. "npm": {
  1580. "type": "string"
  1581. },
  1582. "models": {
  1583. "type": "object",
  1584. "additionalProperties": {
  1585. "type": "object",
  1586. "properties": {
  1587. "name": {
  1588. "type": "string"
  1589. },
  1590. "attachment": {
  1591. "type": "boolean"
  1592. },
  1593. "reasoning": {
  1594. "type": "boolean"
  1595. },
  1596. "temperature": {
  1597. "type": "boolean"
  1598. },
  1599. "tool_call": {
  1600. "type": "boolean"
  1601. },
  1602. "cost": {
  1603. "type": "object",
  1604. "properties": {
  1605. "input": {
  1606. "type": "number"
  1607. },
  1608. "output": {
  1609. "type": "number"
  1610. },
  1611. "cache_read": {
  1612. "type": "number"
  1613. },
  1614. "cache_write": {
  1615. "type": "number"
  1616. }
  1617. },
  1618. "required": [
  1619. "input",
  1620. "output"
  1621. ]
  1622. },
  1623. "limit": {
  1624. "type": "object",
  1625. "properties": {
  1626. "context": {
  1627. "type": "number"
  1628. },
  1629. "output": {
  1630. "type": "number"
  1631. }
  1632. },
  1633. "required": [
  1634. "context",
  1635. "output"
  1636. ]
  1637. },
  1638. "id": {
  1639. "type": "string"
  1640. },
  1641. "options": {
  1642. "type": "object",
  1643. "additionalProperties": {}
  1644. }
  1645. }
  1646. }
  1647. },
  1648. "options": {
  1649. "type": "object",
  1650. "additionalProperties": {}
  1651. }
  1652. },
  1653. "required": [
  1654. "models"
  1655. ]
  1656. },
  1657. "description": "Custom provider configurations and model overrides"
  1658. },
  1659. "mcp": {
  1660. "type": "object",
  1661. "additionalProperties": {
  1662. "oneOf": [
  1663. {
  1664. "$ref": "#/components/schemas/Config.McpLocal"
  1665. },
  1666. {
  1667. "$ref": "#/components/schemas/Config.McpRemote"
  1668. }
  1669. ],
  1670. "discriminator": {
  1671. "propertyName": "type",
  1672. "mapping": {
  1673. "local": "#/components/schemas/Config.McpLocal",
  1674. "remote": "#/components/schemas/Config.McpRemote"
  1675. }
  1676. }
  1677. },
  1678. "description": "MCP (Model Context Protocol) server configurations"
  1679. },
  1680. "experimental": {
  1681. "type": "object",
  1682. "properties": {
  1683. "hook": {
  1684. "type": "object",
  1685. "properties": {
  1686. "file_edited": {
  1687. "type": "object",
  1688. "additionalProperties": {
  1689. "type": "array",
  1690. "items": {
  1691. "type": "object",
  1692. "properties": {
  1693. "command": {
  1694. "type": "array",
  1695. "items": {
  1696. "type": "string"
  1697. }
  1698. },
  1699. "environment": {
  1700. "type": "object",
  1701. "additionalProperties": {
  1702. "type": "string"
  1703. }
  1704. }
  1705. },
  1706. "required": [
  1707. "command"
  1708. ]
  1709. }
  1710. }
  1711. },
  1712. "session_completed": {
  1713. "type": "array",
  1714. "items": {
  1715. "type": "object",
  1716. "properties": {
  1717. "command": {
  1718. "type": "array",
  1719. "items": {
  1720. "type": "string"
  1721. }
  1722. },
  1723. "environment": {
  1724. "type": "object",
  1725. "additionalProperties": {
  1726. "type": "string"
  1727. }
  1728. }
  1729. },
  1730. "required": [
  1731. "command"
  1732. ]
  1733. }
  1734. }
  1735. }
  1736. }
  1737. }
  1738. }
  1739. },
  1740. "additionalProperties": false
  1741. },
  1742. "Config.Keybinds": {
  1743. "type": "object",
  1744. "properties": {
  1745. "leader": {
  1746. "type": "string",
  1747. "description": "Leader key for keybind combinations"
  1748. },
  1749. "help": {
  1750. "type": "string",
  1751. "description": "Show help dialog"
  1752. },
  1753. "editor_open": {
  1754. "type": "string",
  1755. "description": "Open external editor"
  1756. },
  1757. "session_new": {
  1758. "type": "string",
  1759. "description": "Create a new session"
  1760. },
  1761. "session_list": {
  1762. "type": "string",
  1763. "description": "List all sessions"
  1764. },
  1765. "session_share": {
  1766. "type": "string",
  1767. "description": "Share current session"
  1768. },
  1769. "session_interrupt": {
  1770. "type": "string",
  1771. "description": "Interrupt current session"
  1772. },
  1773. "session_compact": {
  1774. "type": "string",
  1775. "description": "Toggle compact mode for session"
  1776. },
  1777. "tool_details": {
  1778. "type": "string",
  1779. "description": "Show tool details"
  1780. },
  1781. "model_list": {
  1782. "type": "string",
  1783. "description": "List available models"
  1784. },
  1785. "theme_list": {
  1786. "type": "string",
  1787. "description": "List available themes"
  1788. },
  1789. "project_init": {
  1790. "type": "string",
  1791. "description": "Initialize project configuration"
  1792. },
  1793. "input_clear": {
  1794. "type": "string",
  1795. "description": "Clear input field"
  1796. },
  1797. "input_paste": {
  1798. "type": "string",
  1799. "description": "Paste from clipboard"
  1800. },
  1801. "input_submit": {
  1802. "type": "string",
  1803. "description": "Submit input"
  1804. },
  1805. "input_newline": {
  1806. "type": "string",
  1807. "description": "Insert newline in input"
  1808. },
  1809. "history_previous": {
  1810. "type": "string",
  1811. "description": "Navigate to previous history item"
  1812. },
  1813. "history_next": {
  1814. "type": "string",
  1815. "description": "Navigate to next history item"
  1816. },
  1817. "messages_page_up": {
  1818. "type": "string",
  1819. "description": "Scroll messages up by one page"
  1820. },
  1821. "messages_page_down": {
  1822. "type": "string",
  1823. "description": "Scroll messages down by one page"
  1824. },
  1825. "messages_half_page_up": {
  1826. "type": "string",
  1827. "description": "Scroll messages up by half page"
  1828. },
  1829. "messages_half_page_down": {
  1830. "type": "string",
  1831. "description": "Scroll messages down by half page"
  1832. },
  1833. "messages_previous": {
  1834. "type": "string",
  1835. "description": "Navigate to previous message"
  1836. },
  1837. "messages_next": {
  1838. "type": "string",
  1839. "description": "Navigate to next message"
  1840. },
  1841. "messages_first": {
  1842. "type": "string",
  1843. "description": "Navigate to first message"
  1844. },
  1845. "messages_last": {
  1846. "type": "string",
  1847. "description": "Navigate to last message"
  1848. },
  1849. "app_exit": {
  1850. "type": "string",
  1851. "description": "Exit the application"
  1852. }
  1853. },
  1854. "additionalProperties": false
  1855. },
  1856. "Provider.Info": {
  1857. "type": "object",
  1858. "properties": {
  1859. "api": {
  1860. "type": "string"
  1861. },
  1862. "name": {
  1863. "type": "string"
  1864. },
  1865. "env": {
  1866. "type": "array",
  1867. "items": {
  1868. "type": "string"
  1869. }
  1870. },
  1871. "id": {
  1872. "type": "string"
  1873. },
  1874. "npm": {
  1875. "type": "string"
  1876. },
  1877. "models": {
  1878. "type": "object",
  1879. "additionalProperties": {
  1880. "$ref": "#/components/schemas/Model.Info"
  1881. }
  1882. }
  1883. },
  1884. "required": [
  1885. "name",
  1886. "env",
  1887. "id",
  1888. "models"
  1889. ]
  1890. },
  1891. "Model.Info": {
  1892. "type": "object",
  1893. "properties": {
  1894. "name": {
  1895. "type": "string"
  1896. },
  1897. "attachment": {
  1898. "type": "boolean"
  1899. },
  1900. "reasoning": {
  1901. "type": "boolean"
  1902. },
  1903. "temperature": {
  1904. "type": "boolean"
  1905. },
  1906. "tool_call": {
  1907. "type": "boolean"
  1908. },
  1909. "cost": {
  1910. "type": "object",
  1911. "properties": {
  1912. "input": {
  1913. "type": "number"
  1914. },
  1915. "output": {
  1916. "type": "number"
  1917. },
  1918. "cache_read": {
  1919. "type": "number"
  1920. },
  1921. "cache_write": {
  1922. "type": "number"
  1923. }
  1924. },
  1925. "required": [
  1926. "input",
  1927. "output"
  1928. ]
  1929. },
  1930. "limit": {
  1931. "type": "object",
  1932. "properties": {
  1933. "context": {
  1934. "type": "number"
  1935. },
  1936. "output": {
  1937. "type": "number"
  1938. }
  1939. },
  1940. "required": [
  1941. "context",
  1942. "output"
  1943. ]
  1944. },
  1945. "id": {
  1946. "type": "string"
  1947. },
  1948. "options": {
  1949. "type": "object",
  1950. "additionalProperties": {}
  1951. }
  1952. },
  1953. "required": [
  1954. "name",
  1955. "attachment",
  1956. "reasoning",
  1957. "temperature",
  1958. "tool_call",
  1959. "cost",
  1960. "limit",
  1961. "id",
  1962. "options"
  1963. ]
  1964. },
  1965. "Config.McpLocal": {
  1966. "type": "object",
  1967. "properties": {
  1968. "type": {
  1969. "type": "string",
  1970. "const": "local",
  1971. "description": "Type of MCP server connection"
  1972. },
  1973. "command": {
  1974. "type": "array",
  1975. "items": {
  1976. "type": "string"
  1977. },
  1978. "description": "Command and arguments to run the MCP server"
  1979. },
  1980. "environment": {
  1981. "type": "object",
  1982. "additionalProperties": {
  1983. "type": "string"
  1984. },
  1985. "description": "Environment variables to set when running the MCP server"
  1986. }
  1987. },
  1988. "required": [
  1989. "type",
  1990. "command"
  1991. ],
  1992. "additionalProperties": false
  1993. },
  1994. "Config.McpRemote": {
  1995. "type": "object",
  1996. "properties": {
  1997. "type": {
  1998. "type": "string",
  1999. "const": "remote",
  2000. "description": "Type of MCP server connection"
  2001. },
  2002. "url": {
  2003. "type": "string",
  2004. "description": "URL of the remote MCP server"
  2005. }
  2006. },
  2007. "required": [
  2008. "type",
  2009. "url"
  2010. ],
  2011. "additionalProperties": false
  2012. },
  2013. "Error": {
  2014. "type": "object",
  2015. "properties": {
  2016. "data": {
  2017. "type": "object",
  2018. "additionalProperties": {}
  2019. }
  2020. },
  2021. "required": [
  2022. "data"
  2023. ]
  2024. },
  2025. "InstallationInfo": {
  2026. "type": "object",
  2027. "properties": {
  2028. "version": {
  2029. "type": "string"
  2030. },
  2031. "latest": {
  2032. "type": "string"
  2033. }
  2034. },
  2035. "required": [
  2036. "version",
  2037. "latest"
  2038. ]
  2039. }
  2040. }
  2041. }
  2042. }