openapi.json 28 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154
  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. "/app_initialize": {
  48. "post": {
  49. "responses": {
  50. "200": {
  51. "description": "Initialize the app",
  52. "content": {
  53. "application/json": {
  54. "schema": {
  55. "type": "boolean"
  56. }
  57. }
  58. }
  59. }
  60. },
  61. "operationId": "postApp_initialize",
  62. "parameters": [],
  63. "description": "Initialize the app"
  64. }
  65. },
  66. "/session_initialize": {
  67. "post": {
  68. "responses": {
  69. "200": {
  70. "description": "200",
  71. "content": {
  72. "application/json": {
  73. "schema": {
  74. "type": "boolean"
  75. }
  76. }
  77. }
  78. }
  79. },
  80. "operationId": "postSession_initialize",
  81. "parameters": [],
  82. "description": "Analyze the app and create an AGENTS.md file",
  83. "requestBody": {
  84. "content": {
  85. "application/json": {
  86. "schema": {
  87. "type": "object",
  88. "properties": {
  89. "sessionID": {
  90. "type": "string"
  91. },
  92. "providerID": {
  93. "type": "string"
  94. },
  95. "modelID": {
  96. "type": "string"
  97. }
  98. },
  99. "required": [
  100. "sessionID",
  101. "providerID",
  102. "modelID"
  103. ]
  104. }
  105. }
  106. }
  107. }
  108. }
  109. },
  110. "/path_get": {
  111. "post": {
  112. "responses": {
  113. "200": {
  114. "description": "200",
  115. "content": {
  116. "application/json": {
  117. "schema": {
  118. "type": "object",
  119. "properties": {
  120. "root": {
  121. "type": "string"
  122. },
  123. "data": {
  124. "type": "string"
  125. },
  126. "cwd": {
  127. "type": "string"
  128. },
  129. "config": {
  130. "type": "string"
  131. }
  132. },
  133. "required": [
  134. "root",
  135. "data",
  136. "cwd",
  137. "config"
  138. ]
  139. }
  140. }
  141. }
  142. }
  143. },
  144. "operationId": "postPath_get",
  145. "parameters": [],
  146. "description": "Get paths"
  147. }
  148. },
  149. "/session_create": {
  150. "post": {
  151. "responses": {
  152. "200": {
  153. "description": "Successfully created session",
  154. "content": {
  155. "application/json": {
  156. "schema": {
  157. "$ref": "#/components/schemas/session.info"
  158. }
  159. }
  160. }
  161. }
  162. },
  163. "operationId": "postSession_create",
  164. "parameters": [],
  165. "description": "Create a new session"
  166. }
  167. },
  168. "/session_share": {
  169. "post": {
  170. "responses": {
  171. "200": {
  172. "description": "Successfully shared session",
  173. "content": {
  174. "application/json": {
  175. "schema": {
  176. "$ref": "#/components/schemas/session.info"
  177. }
  178. }
  179. }
  180. }
  181. },
  182. "operationId": "postSession_share",
  183. "parameters": [],
  184. "description": "Share the session",
  185. "requestBody": {
  186. "content": {
  187. "application/json": {
  188. "schema": {
  189. "type": "object",
  190. "properties": {
  191. "sessionID": {
  192. "type": "string"
  193. }
  194. },
  195. "required": [
  196. "sessionID"
  197. ]
  198. }
  199. }
  200. }
  201. }
  202. }
  203. },
  204. "/session_messages": {
  205. "post": {
  206. "responses": {
  207. "200": {
  208. "description": "Successfully created session",
  209. "content": {
  210. "application/json": {
  211. "schema": {
  212. "type": "array",
  213. "items": {
  214. "$ref": "#/components/schemas/Message.Info"
  215. }
  216. }
  217. }
  218. }
  219. }
  220. },
  221. "operationId": "postSession_messages",
  222. "parameters": [],
  223. "description": "Get messages for a session",
  224. "requestBody": {
  225. "content": {
  226. "application/json": {
  227. "schema": {
  228. "type": "object",
  229. "properties": {
  230. "sessionID": {
  231. "type": "string"
  232. }
  233. },
  234. "required": [
  235. "sessionID"
  236. ]
  237. }
  238. }
  239. }
  240. }
  241. }
  242. },
  243. "/session_list": {
  244. "post": {
  245. "responses": {
  246. "200": {
  247. "description": "List of sessions",
  248. "content": {
  249. "application/json": {
  250. "schema": {
  251. "type": "array",
  252. "items": {
  253. "$ref": "#/components/schemas/session.info"
  254. }
  255. }
  256. }
  257. }
  258. }
  259. },
  260. "operationId": "postSession_list",
  261. "parameters": [],
  262. "description": "List all sessions"
  263. }
  264. },
  265. "/session_abort": {
  266. "post": {
  267. "responses": {
  268. "200": {
  269. "description": "Aborted session",
  270. "content": {
  271. "application/json": {
  272. "schema": {
  273. "type": "boolean"
  274. }
  275. }
  276. }
  277. }
  278. },
  279. "operationId": "postSession_abort",
  280. "parameters": [],
  281. "description": "Abort a session",
  282. "requestBody": {
  283. "content": {
  284. "application/json": {
  285. "schema": {
  286. "type": "object",
  287. "properties": {
  288. "sessionID": {
  289. "type": "string"
  290. }
  291. },
  292. "required": [
  293. "sessionID"
  294. ]
  295. }
  296. }
  297. }
  298. }
  299. }
  300. },
  301. "/session_summarize": {
  302. "post": {
  303. "responses": {
  304. "200": {
  305. "description": "Summarize the session",
  306. "content": {
  307. "application/json": {
  308. "schema": {
  309. "type": "boolean"
  310. }
  311. }
  312. }
  313. }
  314. },
  315. "operationId": "postSession_summarize",
  316. "parameters": [],
  317. "description": "Summarize the session",
  318. "requestBody": {
  319. "content": {
  320. "application/json": {
  321. "schema": {
  322. "type": "object",
  323. "properties": {
  324. "sessionID": {
  325. "type": "string"
  326. },
  327. "providerID": {
  328. "type": "string"
  329. },
  330. "modelID": {
  331. "type": "string"
  332. }
  333. },
  334. "required": [
  335. "sessionID",
  336. "providerID",
  337. "modelID"
  338. ]
  339. }
  340. }
  341. }
  342. }
  343. }
  344. },
  345. "/session_chat": {
  346. "post": {
  347. "responses": {
  348. "200": {
  349. "description": "Chat with a model",
  350. "content": {
  351. "application/json": {
  352. "schema": {
  353. "$ref": "#/components/schemas/Message.Info"
  354. }
  355. }
  356. }
  357. }
  358. },
  359. "operationId": "postSession_chat",
  360. "parameters": [],
  361. "description": "Chat with a model",
  362. "requestBody": {
  363. "content": {
  364. "application/json": {
  365. "schema": {
  366. "type": "object",
  367. "properties": {
  368. "sessionID": {
  369. "type": "string"
  370. },
  371. "providerID": {
  372. "type": "string"
  373. },
  374. "modelID": {
  375. "type": "string"
  376. },
  377. "parts": {
  378. "type": "array",
  379. "items": {
  380. "$ref": "#/components/schemas/Message.Part"
  381. }
  382. }
  383. },
  384. "required": [
  385. "sessionID",
  386. "providerID",
  387. "modelID",
  388. "parts"
  389. ]
  390. }
  391. }
  392. }
  393. }
  394. }
  395. },
  396. "/provider_list": {
  397. "post": {
  398. "responses": {
  399. "200": {
  400. "description": "List of providers",
  401. "content": {
  402. "application/json": {
  403. "schema": {
  404. "type": "array",
  405. "items": {
  406. "$ref": "#/components/schemas/Provider.Info"
  407. }
  408. }
  409. }
  410. }
  411. }
  412. },
  413. "operationId": "postProvider_list",
  414. "parameters": [],
  415. "description": "List all providers"
  416. }
  417. }
  418. },
  419. "components": {
  420. "schemas": {
  421. "Event": {
  422. "oneOf": [
  423. {
  424. "$ref": "#/components/schemas/Event.storage.write"
  425. },
  426. {
  427. "$ref": "#/components/schemas/Event.message.updated"
  428. },
  429. {
  430. "$ref": "#/components/schemas/Event.message.part.updated"
  431. },
  432. {
  433. "$ref": "#/components/schemas/Event.lsp.client.diagnostics"
  434. },
  435. {
  436. "$ref": "#/components/schemas/Event.permission.updated"
  437. },
  438. {
  439. "$ref": "#/components/schemas/Event.session.updated"
  440. }
  441. ],
  442. "discriminator": {
  443. "propertyName": "type",
  444. "mapping": {
  445. "storage.write": "#/components/schemas/Event.storage.write",
  446. "message.updated": "#/components/schemas/Event.message.updated",
  447. "message.part.updated": "#/components/schemas/Event.message.part.updated",
  448. "lsp.client.diagnostics": "#/components/schemas/Event.lsp.client.diagnostics",
  449. "permission.updated": "#/components/schemas/Event.permission.updated",
  450. "session.updated": "#/components/schemas/Event.session.updated"
  451. }
  452. }
  453. },
  454. "Event.storage.write": {
  455. "type": "object",
  456. "properties": {
  457. "type": {
  458. "type": "string",
  459. "const": "storage.write"
  460. },
  461. "properties": {
  462. "type": "object",
  463. "properties": {
  464. "key": {
  465. "type": "string"
  466. },
  467. "content": {}
  468. },
  469. "required": [
  470. "key"
  471. ]
  472. }
  473. },
  474. "required": [
  475. "type",
  476. "properties"
  477. ]
  478. },
  479. "Event.message.updated": {
  480. "type": "object",
  481. "properties": {
  482. "type": {
  483. "type": "string",
  484. "const": "message.updated"
  485. },
  486. "properties": {
  487. "type": "object",
  488. "properties": {
  489. "info": {
  490. "$ref": "#/components/schemas/Message.Info"
  491. }
  492. },
  493. "required": [
  494. "info"
  495. ]
  496. }
  497. },
  498. "required": [
  499. "type",
  500. "properties"
  501. ]
  502. },
  503. "Message.Info": {
  504. "type": "object",
  505. "properties": {
  506. "id": {
  507. "type": "string"
  508. },
  509. "role": {
  510. "type": "string",
  511. "enum": [
  512. "system",
  513. "user",
  514. "assistant"
  515. ]
  516. },
  517. "parts": {
  518. "type": "array",
  519. "items": {
  520. "$ref": "#/components/schemas/Message.Part"
  521. }
  522. },
  523. "metadata": {
  524. "type": "object",
  525. "properties": {
  526. "time": {
  527. "type": "object",
  528. "properties": {
  529. "created": {
  530. "type": "number"
  531. },
  532. "completed": {
  533. "type": "number"
  534. }
  535. },
  536. "required": [
  537. "created"
  538. ]
  539. },
  540. "error": {
  541. "type": "string"
  542. },
  543. "sessionID": {
  544. "type": "string"
  545. },
  546. "tool": {
  547. "type": "object",
  548. "additionalProperties": {}
  549. },
  550. "assistant": {
  551. "type": "object",
  552. "properties": {
  553. "modelID": {
  554. "type": "string"
  555. },
  556. "providerID": {
  557. "type": "string"
  558. },
  559. "cost": {
  560. "type": "number"
  561. },
  562. "summary": {
  563. "type": "boolean"
  564. },
  565. "tokens": {
  566. "type": "object",
  567. "properties": {
  568. "input": {
  569. "type": "number"
  570. },
  571. "output": {
  572. "type": "number"
  573. },
  574. "reasoning": {
  575. "type": "number"
  576. }
  577. },
  578. "required": [
  579. "input",
  580. "output",
  581. "reasoning"
  582. ]
  583. }
  584. },
  585. "required": [
  586. "modelID",
  587. "providerID",
  588. "cost",
  589. "tokens"
  590. ]
  591. }
  592. },
  593. "required": [
  594. "time",
  595. "sessionID",
  596. "tool"
  597. ]
  598. }
  599. },
  600. "required": [
  601. "id",
  602. "role",
  603. "parts",
  604. "metadata"
  605. ]
  606. },
  607. "Message.Part": {
  608. "oneOf": [
  609. {
  610. "$ref": "#/components/schemas/Message.Part.Text"
  611. },
  612. {
  613. "$ref": "#/components/schemas/Message.Part.Reasoning"
  614. },
  615. {
  616. "$ref": "#/components/schemas/Message.Part.ToolInvocation"
  617. },
  618. {
  619. "$ref": "#/components/schemas/Message.Part.SourceUrl"
  620. },
  621. {
  622. "$ref": "#/components/schemas/Message.Part.File"
  623. },
  624. {
  625. "$ref": "#/components/schemas/Message.Part.StepStart"
  626. }
  627. ],
  628. "discriminator": {
  629. "propertyName": "type",
  630. "mapping": {
  631. "text": "#/components/schemas/Message.Part.Text",
  632. "reasoning": "#/components/schemas/Message.Part.Reasoning",
  633. "tool-invocation": "#/components/schemas/Message.Part.ToolInvocation",
  634. "source-url": "#/components/schemas/Message.Part.SourceUrl",
  635. "file": "#/components/schemas/Message.Part.File",
  636. "step-start": "#/components/schemas/Message.Part.StepStart"
  637. }
  638. }
  639. },
  640. "Message.Part.Text": {
  641. "type": "object",
  642. "properties": {
  643. "type": {
  644. "type": "string",
  645. "const": "text"
  646. },
  647. "text": {
  648. "type": "string"
  649. }
  650. },
  651. "required": [
  652. "type",
  653. "text"
  654. ]
  655. },
  656. "Message.Part.Reasoning": {
  657. "type": "object",
  658. "properties": {
  659. "type": {
  660. "type": "string",
  661. "const": "reasoning"
  662. },
  663. "text": {
  664. "type": "string"
  665. },
  666. "providerMetadata": {
  667. "type": "object",
  668. "additionalProperties": {}
  669. }
  670. },
  671. "required": [
  672. "type",
  673. "text"
  674. ]
  675. },
  676. "Message.Part.ToolInvocation": {
  677. "type": "object",
  678. "properties": {
  679. "type": {
  680. "type": "string",
  681. "const": "tool-invocation"
  682. },
  683. "toolInvocation": {
  684. "$ref": "#/components/schemas/Message.ToolInvocation"
  685. }
  686. },
  687. "required": [
  688. "type",
  689. "toolInvocation"
  690. ]
  691. },
  692. "Message.ToolInvocation": {
  693. "oneOf": [
  694. {
  695. "$ref": "#/components/schemas/Message.ToolInvocation.ToolCall"
  696. },
  697. {
  698. "$ref": "#/components/schemas/Message.ToolInvocation.ToolPartialCall"
  699. },
  700. {
  701. "$ref": "#/components/schemas/Message.ToolInvocation.ToolResult"
  702. }
  703. ],
  704. "discriminator": {
  705. "propertyName": "state",
  706. "mapping": {
  707. "call": "#/components/schemas/Message.ToolInvocation.ToolCall",
  708. "partial-call": "#/components/schemas/Message.ToolInvocation.ToolPartialCall",
  709. "result": "#/components/schemas/Message.ToolInvocation.ToolResult"
  710. }
  711. }
  712. },
  713. "Message.ToolInvocation.ToolCall": {
  714. "type": "object",
  715. "properties": {
  716. "state": {
  717. "type": "string",
  718. "const": "call"
  719. },
  720. "step": {
  721. "type": "number"
  722. },
  723. "toolCallId": {
  724. "type": "string"
  725. },
  726. "toolName": {
  727. "type": "string"
  728. },
  729. "args": {}
  730. },
  731. "required": [
  732. "state",
  733. "toolCallId",
  734. "toolName"
  735. ]
  736. },
  737. "Message.ToolInvocation.ToolPartialCall": {
  738. "type": "object",
  739. "properties": {
  740. "state": {
  741. "type": "string",
  742. "const": "partial-call"
  743. },
  744. "step": {
  745. "type": "number"
  746. },
  747. "toolCallId": {
  748. "type": "string"
  749. },
  750. "toolName": {
  751. "type": "string"
  752. },
  753. "args": {}
  754. },
  755. "required": [
  756. "state",
  757. "toolCallId",
  758. "toolName"
  759. ]
  760. },
  761. "Message.ToolInvocation.ToolResult": {
  762. "type": "object",
  763. "properties": {
  764. "state": {
  765. "type": "string",
  766. "const": "result"
  767. },
  768. "step": {
  769. "type": "number"
  770. },
  771. "toolCallId": {
  772. "type": "string"
  773. },
  774. "toolName": {
  775. "type": "string"
  776. },
  777. "args": {},
  778. "result": {
  779. "type": "string"
  780. }
  781. },
  782. "required": [
  783. "state",
  784. "toolCallId",
  785. "toolName",
  786. "result"
  787. ]
  788. },
  789. "Message.Part.SourceUrl": {
  790. "type": "object",
  791. "properties": {
  792. "type": {
  793. "type": "string",
  794. "const": "source-url"
  795. },
  796. "sourceId": {
  797. "type": "string"
  798. },
  799. "url": {
  800. "type": "string"
  801. },
  802. "title": {
  803. "type": "string"
  804. },
  805. "providerMetadata": {
  806. "type": "object",
  807. "additionalProperties": {}
  808. }
  809. },
  810. "required": [
  811. "type",
  812. "sourceId",
  813. "url"
  814. ]
  815. },
  816. "Message.Part.File": {
  817. "type": "object",
  818. "properties": {
  819. "type": {
  820. "type": "string",
  821. "const": "file"
  822. },
  823. "mediaType": {
  824. "type": "string"
  825. },
  826. "filename": {
  827. "type": "string"
  828. },
  829. "url": {
  830. "type": "string"
  831. }
  832. },
  833. "required": [
  834. "type",
  835. "mediaType",
  836. "url"
  837. ]
  838. },
  839. "Message.Part.StepStart": {
  840. "type": "object",
  841. "properties": {
  842. "type": {
  843. "type": "string",
  844. "const": "step-start"
  845. }
  846. },
  847. "required": [
  848. "type"
  849. ]
  850. },
  851. "Event.message.part.updated": {
  852. "type": "object",
  853. "properties": {
  854. "type": {
  855. "type": "string",
  856. "const": "message.part.updated"
  857. },
  858. "properties": {
  859. "type": "object",
  860. "properties": {
  861. "part": {
  862. "$ref": "#/components/schemas/Message.Part"
  863. }
  864. },
  865. "required": [
  866. "part"
  867. ]
  868. }
  869. },
  870. "required": [
  871. "type",
  872. "properties"
  873. ]
  874. },
  875. "Event.lsp.client.diagnostics": {
  876. "type": "object",
  877. "properties": {
  878. "type": {
  879. "type": "string",
  880. "const": "lsp.client.diagnostics"
  881. },
  882. "properties": {
  883. "type": "object",
  884. "properties": {
  885. "serverID": {
  886. "type": "string"
  887. },
  888. "path": {
  889. "type": "string"
  890. }
  891. },
  892. "required": [
  893. "serverID",
  894. "path"
  895. ]
  896. }
  897. },
  898. "required": [
  899. "type",
  900. "properties"
  901. ]
  902. },
  903. "Event.permission.updated": {
  904. "type": "object",
  905. "properties": {
  906. "type": {
  907. "type": "string",
  908. "const": "permission.updated"
  909. },
  910. "properties": {
  911. "$ref": "#/components/schemas/permission.info"
  912. }
  913. },
  914. "required": [
  915. "type",
  916. "properties"
  917. ]
  918. },
  919. "permission.info": {
  920. "type": "object",
  921. "properties": {
  922. "id": {
  923. "type": "string"
  924. },
  925. "sessionID": {
  926. "type": "string"
  927. },
  928. "title": {
  929. "type": "string"
  930. },
  931. "metadata": {
  932. "type": "object",
  933. "additionalProperties": {}
  934. },
  935. "time": {
  936. "type": "object",
  937. "properties": {
  938. "created": {
  939. "type": "number"
  940. }
  941. },
  942. "required": [
  943. "created"
  944. ]
  945. }
  946. },
  947. "required": [
  948. "id",
  949. "sessionID",
  950. "title",
  951. "metadata",
  952. "time"
  953. ]
  954. },
  955. "Event.session.updated": {
  956. "type": "object",
  957. "properties": {
  958. "type": {
  959. "type": "string",
  960. "const": "session.updated"
  961. },
  962. "properties": {
  963. "type": "object",
  964. "properties": {
  965. "info": {
  966. "$ref": "#/components/schemas/session.info"
  967. }
  968. },
  969. "required": [
  970. "info"
  971. ]
  972. }
  973. },
  974. "required": [
  975. "type",
  976. "properties"
  977. ]
  978. },
  979. "session.info": {
  980. "type": "object",
  981. "properties": {
  982. "id": {
  983. "type": "string",
  984. "pattern": "^ses"
  985. },
  986. "share": {
  987. "type": "object",
  988. "properties": {
  989. "secret": {
  990. "type": "string"
  991. },
  992. "url": {
  993. "type": "string"
  994. }
  995. },
  996. "required": [
  997. "secret",
  998. "url"
  999. ]
  1000. },
  1001. "title": {
  1002. "type": "string"
  1003. },
  1004. "time": {
  1005. "type": "object",
  1006. "properties": {
  1007. "created": {
  1008. "type": "number"
  1009. },
  1010. "updated": {
  1011. "type": "number"
  1012. }
  1013. },
  1014. "required": [
  1015. "created",
  1016. "updated"
  1017. ]
  1018. }
  1019. },
  1020. "required": [
  1021. "id",
  1022. "title",
  1023. "time"
  1024. ]
  1025. },
  1026. "App.Info": {
  1027. "type": "object",
  1028. "properties": {
  1029. "user": {
  1030. "type": "string"
  1031. },
  1032. "git": {
  1033. "type": "boolean"
  1034. },
  1035. "path": {
  1036. "type": "object",
  1037. "properties": {
  1038. "config": {
  1039. "type": "string"
  1040. },
  1041. "data": {
  1042. "type": "string"
  1043. },
  1044. "root": {
  1045. "type": "string"
  1046. },
  1047. "cwd": {
  1048. "type": "string"
  1049. }
  1050. },
  1051. "required": [
  1052. "config",
  1053. "data",
  1054. "root",
  1055. "cwd"
  1056. ]
  1057. },
  1058. "time": {
  1059. "type": "object",
  1060. "properties": {
  1061. "initialized": {
  1062. "type": "number"
  1063. }
  1064. }
  1065. }
  1066. },
  1067. "required": [
  1068. "user",
  1069. "git",
  1070. "path",
  1071. "time"
  1072. ]
  1073. },
  1074. "Provider.Info": {
  1075. "type": "object",
  1076. "properties": {
  1077. "id": {
  1078. "type": "string"
  1079. },
  1080. "name": {
  1081. "type": "string"
  1082. },
  1083. "options": {
  1084. "type": "object",
  1085. "additionalProperties": {}
  1086. },
  1087. "models": {
  1088. "type": "array",
  1089. "items": {
  1090. "$ref": "#/components/schemas/Provider.Model"
  1091. }
  1092. }
  1093. },
  1094. "required": [
  1095. "id",
  1096. "name",
  1097. "models"
  1098. ]
  1099. },
  1100. "Provider.Model": {
  1101. "type": "object",
  1102. "properties": {
  1103. "id": {
  1104. "type": "string"
  1105. },
  1106. "name": {
  1107. "type": "string"
  1108. },
  1109. "cost": {
  1110. "type": "object",
  1111. "properties": {
  1112. "input": {
  1113. "type": "number"
  1114. },
  1115. "inputCached": {
  1116. "type": "number"
  1117. },
  1118. "output": {
  1119. "type": "number"
  1120. },
  1121. "outputCached": {
  1122. "type": "number"
  1123. }
  1124. },
  1125. "required": [
  1126. "input",
  1127. "inputCached",
  1128. "output",
  1129. "outputCached"
  1130. ]
  1131. },
  1132. "contextWindow": {
  1133. "type": "number"
  1134. },
  1135. "maxOutputTokens": {
  1136. "type": "number"
  1137. },
  1138. "attachment": {
  1139. "type": "boolean"
  1140. },
  1141. "reasoning": {
  1142. "type": "boolean"
  1143. }
  1144. },
  1145. "required": [
  1146. "id",
  1147. "cost",
  1148. "contextWindow",
  1149. "attachment"
  1150. ]
  1151. }
  1152. }
  1153. }
  1154. }