openapi.json 28 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174
  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": "object",
  405. "properties": {
  406. "providers": {
  407. "type": "array",
  408. "items": {
  409. "$ref": "#/components/schemas/Provider.Info"
  410. }
  411. },
  412. "default": {
  413. "type": "object",
  414. "additionalProperties": {
  415. "type": "string"
  416. }
  417. }
  418. },
  419. "required": [
  420. "providers",
  421. "default"
  422. ]
  423. }
  424. }
  425. }
  426. }
  427. },
  428. "operationId": "postProvider_list",
  429. "parameters": [],
  430. "description": "List all providers"
  431. }
  432. }
  433. },
  434. "components": {
  435. "schemas": {
  436. "Event": {
  437. "oneOf": [
  438. {
  439. "$ref": "#/components/schemas/Event.storage.write"
  440. },
  441. {
  442. "$ref": "#/components/schemas/Event.message.updated"
  443. },
  444. {
  445. "$ref": "#/components/schemas/Event.message.part.updated"
  446. },
  447. {
  448. "$ref": "#/components/schemas/Event.lsp.client.diagnostics"
  449. },
  450. {
  451. "$ref": "#/components/schemas/Event.permission.updated"
  452. },
  453. {
  454. "$ref": "#/components/schemas/Event.session.updated"
  455. }
  456. ],
  457. "discriminator": {
  458. "propertyName": "type",
  459. "mapping": {
  460. "storage.write": "#/components/schemas/Event.storage.write",
  461. "message.updated": "#/components/schemas/Event.message.updated",
  462. "message.part.updated": "#/components/schemas/Event.message.part.updated",
  463. "lsp.client.diagnostics": "#/components/schemas/Event.lsp.client.diagnostics",
  464. "permission.updated": "#/components/schemas/Event.permission.updated",
  465. "session.updated": "#/components/schemas/Event.session.updated"
  466. }
  467. }
  468. },
  469. "Event.storage.write": {
  470. "type": "object",
  471. "properties": {
  472. "type": {
  473. "type": "string",
  474. "const": "storage.write"
  475. },
  476. "properties": {
  477. "type": "object",
  478. "properties": {
  479. "key": {
  480. "type": "string"
  481. },
  482. "content": {}
  483. },
  484. "required": [
  485. "key"
  486. ]
  487. }
  488. },
  489. "required": [
  490. "type",
  491. "properties"
  492. ]
  493. },
  494. "Event.message.updated": {
  495. "type": "object",
  496. "properties": {
  497. "type": {
  498. "type": "string",
  499. "const": "message.updated"
  500. },
  501. "properties": {
  502. "type": "object",
  503. "properties": {
  504. "info": {
  505. "$ref": "#/components/schemas/Message.Info"
  506. }
  507. },
  508. "required": [
  509. "info"
  510. ]
  511. }
  512. },
  513. "required": [
  514. "type",
  515. "properties"
  516. ]
  517. },
  518. "Message.Info": {
  519. "type": "object",
  520. "properties": {
  521. "id": {
  522. "type": "string"
  523. },
  524. "role": {
  525. "type": "string",
  526. "enum": [
  527. "system",
  528. "user",
  529. "assistant"
  530. ]
  531. },
  532. "parts": {
  533. "type": "array",
  534. "items": {
  535. "$ref": "#/components/schemas/Message.Part"
  536. }
  537. },
  538. "metadata": {
  539. "type": "object",
  540. "properties": {
  541. "time": {
  542. "type": "object",
  543. "properties": {
  544. "created": {
  545. "type": "number"
  546. },
  547. "completed": {
  548. "type": "number"
  549. }
  550. },
  551. "required": [
  552. "created"
  553. ]
  554. },
  555. "error": {
  556. "type": "string"
  557. },
  558. "sessionID": {
  559. "type": "string"
  560. },
  561. "tool": {
  562. "type": "object",
  563. "additionalProperties": {}
  564. },
  565. "assistant": {
  566. "type": "object",
  567. "properties": {
  568. "modelID": {
  569. "type": "string"
  570. },
  571. "providerID": {
  572. "type": "string"
  573. },
  574. "cost": {
  575. "type": "number"
  576. },
  577. "summary": {
  578. "type": "boolean"
  579. },
  580. "tokens": {
  581. "type": "object",
  582. "properties": {
  583. "input": {
  584. "type": "number"
  585. },
  586. "output": {
  587. "type": "number"
  588. },
  589. "reasoning": {
  590. "type": "number"
  591. }
  592. },
  593. "required": [
  594. "input",
  595. "output",
  596. "reasoning"
  597. ]
  598. }
  599. },
  600. "required": [
  601. "modelID",
  602. "providerID",
  603. "cost",
  604. "tokens"
  605. ]
  606. }
  607. },
  608. "required": [
  609. "time",
  610. "sessionID",
  611. "tool"
  612. ]
  613. }
  614. },
  615. "required": [
  616. "id",
  617. "role",
  618. "parts",
  619. "metadata"
  620. ]
  621. },
  622. "Message.Part": {
  623. "oneOf": [
  624. {
  625. "$ref": "#/components/schemas/Message.Part.Text"
  626. },
  627. {
  628. "$ref": "#/components/schemas/Message.Part.Reasoning"
  629. },
  630. {
  631. "$ref": "#/components/schemas/Message.Part.ToolInvocation"
  632. },
  633. {
  634. "$ref": "#/components/schemas/Message.Part.SourceUrl"
  635. },
  636. {
  637. "$ref": "#/components/schemas/Message.Part.File"
  638. },
  639. {
  640. "$ref": "#/components/schemas/Message.Part.StepStart"
  641. }
  642. ],
  643. "discriminator": {
  644. "propertyName": "type",
  645. "mapping": {
  646. "text": "#/components/schemas/Message.Part.Text",
  647. "reasoning": "#/components/schemas/Message.Part.Reasoning",
  648. "tool-invocation": "#/components/schemas/Message.Part.ToolInvocation",
  649. "source-url": "#/components/schemas/Message.Part.SourceUrl",
  650. "file": "#/components/schemas/Message.Part.File",
  651. "step-start": "#/components/schemas/Message.Part.StepStart"
  652. }
  653. }
  654. },
  655. "Message.Part.Text": {
  656. "type": "object",
  657. "properties": {
  658. "type": {
  659. "type": "string",
  660. "const": "text"
  661. },
  662. "text": {
  663. "type": "string"
  664. }
  665. },
  666. "required": [
  667. "type",
  668. "text"
  669. ]
  670. },
  671. "Message.Part.Reasoning": {
  672. "type": "object",
  673. "properties": {
  674. "type": {
  675. "type": "string",
  676. "const": "reasoning"
  677. },
  678. "text": {
  679. "type": "string"
  680. },
  681. "providerMetadata": {
  682. "type": "object",
  683. "additionalProperties": {}
  684. }
  685. },
  686. "required": [
  687. "type",
  688. "text"
  689. ]
  690. },
  691. "Message.Part.ToolInvocation": {
  692. "type": "object",
  693. "properties": {
  694. "type": {
  695. "type": "string",
  696. "const": "tool-invocation"
  697. },
  698. "toolInvocation": {
  699. "$ref": "#/components/schemas/Message.ToolInvocation"
  700. }
  701. },
  702. "required": [
  703. "type",
  704. "toolInvocation"
  705. ]
  706. },
  707. "Message.ToolInvocation": {
  708. "oneOf": [
  709. {
  710. "$ref": "#/components/schemas/Message.ToolInvocation.ToolCall"
  711. },
  712. {
  713. "$ref": "#/components/schemas/Message.ToolInvocation.ToolPartialCall"
  714. },
  715. {
  716. "$ref": "#/components/schemas/Message.ToolInvocation.ToolResult"
  717. }
  718. ],
  719. "discriminator": {
  720. "propertyName": "state",
  721. "mapping": {
  722. "call": "#/components/schemas/Message.ToolInvocation.ToolCall",
  723. "partial-call": "#/components/schemas/Message.ToolInvocation.ToolPartialCall",
  724. "result": "#/components/schemas/Message.ToolInvocation.ToolResult"
  725. }
  726. }
  727. },
  728. "Message.ToolInvocation.ToolCall": {
  729. "type": "object",
  730. "properties": {
  731. "state": {
  732. "type": "string",
  733. "const": "call"
  734. },
  735. "step": {
  736. "type": "number"
  737. },
  738. "toolCallId": {
  739. "type": "string"
  740. },
  741. "toolName": {
  742. "type": "string"
  743. },
  744. "args": {}
  745. },
  746. "required": [
  747. "state",
  748. "toolCallId",
  749. "toolName"
  750. ]
  751. },
  752. "Message.ToolInvocation.ToolPartialCall": {
  753. "type": "object",
  754. "properties": {
  755. "state": {
  756. "type": "string",
  757. "const": "partial-call"
  758. },
  759. "step": {
  760. "type": "number"
  761. },
  762. "toolCallId": {
  763. "type": "string"
  764. },
  765. "toolName": {
  766. "type": "string"
  767. },
  768. "args": {}
  769. },
  770. "required": [
  771. "state",
  772. "toolCallId",
  773. "toolName"
  774. ]
  775. },
  776. "Message.ToolInvocation.ToolResult": {
  777. "type": "object",
  778. "properties": {
  779. "state": {
  780. "type": "string",
  781. "const": "result"
  782. },
  783. "step": {
  784. "type": "number"
  785. },
  786. "toolCallId": {
  787. "type": "string"
  788. },
  789. "toolName": {
  790. "type": "string"
  791. },
  792. "args": {},
  793. "result": {
  794. "type": "string"
  795. }
  796. },
  797. "required": [
  798. "state",
  799. "toolCallId",
  800. "toolName",
  801. "result"
  802. ]
  803. },
  804. "Message.Part.SourceUrl": {
  805. "type": "object",
  806. "properties": {
  807. "type": {
  808. "type": "string",
  809. "const": "source-url"
  810. },
  811. "sourceId": {
  812. "type": "string"
  813. },
  814. "url": {
  815. "type": "string"
  816. },
  817. "title": {
  818. "type": "string"
  819. },
  820. "providerMetadata": {
  821. "type": "object",
  822. "additionalProperties": {}
  823. }
  824. },
  825. "required": [
  826. "type",
  827. "sourceId",
  828. "url"
  829. ]
  830. },
  831. "Message.Part.File": {
  832. "type": "object",
  833. "properties": {
  834. "type": {
  835. "type": "string",
  836. "const": "file"
  837. },
  838. "mediaType": {
  839. "type": "string"
  840. },
  841. "filename": {
  842. "type": "string"
  843. },
  844. "url": {
  845. "type": "string"
  846. }
  847. },
  848. "required": [
  849. "type",
  850. "mediaType",
  851. "url"
  852. ]
  853. },
  854. "Message.Part.StepStart": {
  855. "type": "object",
  856. "properties": {
  857. "type": {
  858. "type": "string",
  859. "const": "step-start"
  860. }
  861. },
  862. "required": [
  863. "type"
  864. ]
  865. },
  866. "Event.message.part.updated": {
  867. "type": "object",
  868. "properties": {
  869. "type": {
  870. "type": "string",
  871. "const": "message.part.updated"
  872. },
  873. "properties": {
  874. "type": "object",
  875. "properties": {
  876. "part": {
  877. "$ref": "#/components/schemas/Message.Part"
  878. }
  879. },
  880. "required": [
  881. "part"
  882. ]
  883. }
  884. },
  885. "required": [
  886. "type",
  887. "properties"
  888. ]
  889. },
  890. "Event.lsp.client.diagnostics": {
  891. "type": "object",
  892. "properties": {
  893. "type": {
  894. "type": "string",
  895. "const": "lsp.client.diagnostics"
  896. },
  897. "properties": {
  898. "type": "object",
  899. "properties": {
  900. "serverID": {
  901. "type": "string"
  902. },
  903. "path": {
  904. "type": "string"
  905. }
  906. },
  907. "required": [
  908. "serverID",
  909. "path"
  910. ]
  911. }
  912. },
  913. "required": [
  914. "type",
  915. "properties"
  916. ]
  917. },
  918. "Event.permission.updated": {
  919. "type": "object",
  920. "properties": {
  921. "type": {
  922. "type": "string",
  923. "const": "permission.updated"
  924. },
  925. "properties": {
  926. "$ref": "#/components/schemas/permission.info"
  927. }
  928. },
  929. "required": [
  930. "type",
  931. "properties"
  932. ]
  933. },
  934. "permission.info": {
  935. "type": "object",
  936. "properties": {
  937. "id": {
  938. "type": "string"
  939. },
  940. "sessionID": {
  941. "type": "string"
  942. },
  943. "title": {
  944. "type": "string"
  945. },
  946. "metadata": {
  947. "type": "object",
  948. "additionalProperties": {}
  949. },
  950. "time": {
  951. "type": "object",
  952. "properties": {
  953. "created": {
  954. "type": "number"
  955. }
  956. },
  957. "required": [
  958. "created"
  959. ]
  960. }
  961. },
  962. "required": [
  963. "id",
  964. "sessionID",
  965. "title",
  966. "metadata",
  967. "time"
  968. ]
  969. },
  970. "Event.session.updated": {
  971. "type": "object",
  972. "properties": {
  973. "type": {
  974. "type": "string",
  975. "const": "session.updated"
  976. },
  977. "properties": {
  978. "type": "object",
  979. "properties": {
  980. "info": {
  981. "$ref": "#/components/schemas/session.info"
  982. }
  983. },
  984. "required": [
  985. "info"
  986. ]
  987. }
  988. },
  989. "required": [
  990. "type",
  991. "properties"
  992. ]
  993. },
  994. "session.info": {
  995. "type": "object",
  996. "properties": {
  997. "id": {
  998. "type": "string",
  999. "pattern": "^ses"
  1000. },
  1001. "share": {
  1002. "type": "object",
  1003. "properties": {
  1004. "secret": {
  1005. "type": "string"
  1006. },
  1007. "url": {
  1008. "type": "string"
  1009. }
  1010. },
  1011. "required": [
  1012. "secret",
  1013. "url"
  1014. ]
  1015. },
  1016. "title": {
  1017. "type": "string"
  1018. },
  1019. "time": {
  1020. "type": "object",
  1021. "properties": {
  1022. "created": {
  1023. "type": "number"
  1024. },
  1025. "updated": {
  1026. "type": "number"
  1027. }
  1028. },
  1029. "required": [
  1030. "created",
  1031. "updated"
  1032. ]
  1033. }
  1034. },
  1035. "required": [
  1036. "id",
  1037. "title",
  1038. "time"
  1039. ]
  1040. },
  1041. "App.Info": {
  1042. "type": "object",
  1043. "properties": {
  1044. "user": {
  1045. "type": "string"
  1046. },
  1047. "git": {
  1048. "type": "boolean"
  1049. },
  1050. "path": {
  1051. "type": "object",
  1052. "properties": {
  1053. "config": {
  1054. "type": "string"
  1055. },
  1056. "data": {
  1057. "type": "string"
  1058. },
  1059. "root": {
  1060. "type": "string"
  1061. },
  1062. "cwd": {
  1063. "type": "string"
  1064. }
  1065. },
  1066. "required": [
  1067. "config",
  1068. "data",
  1069. "root",
  1070. "cwd"
  1071. ]
  1072. },
  1073. "time": {
  1074. "type": "object",
  1075. "properties": {
  1076. "initialized": {
  1077. "type": "number"
  1078. }
  1079. }
  1080. }
  1081. },
  1082. "required": [
  1083. "user",
  1084. "git",
  1085. "path",
  1086. "time"
  1087. ]
  1088. },
  1089. "Provider.Info": {
  1090. "type": "object",
  1091. "properties": {
  1092. "id": {
  1093. "type": "string"
  1094. },
  1095. "name": {
  1096. "type": "string"
  1097. },
  1098. "models": {
  1099. "type": "object",
  1100. "additionalProperties": {
  1101. "$ref": "#/components/schemas/Provider.Model"
  1102. }
  1103. }
  1104. },
  1105. "required": [
  1106. "id",
  1107. "name",
  1108. "models"
  1109. ]
  1110. },
  1111. "Provider.Model": {
  1112. "type": "object",
  1113. "properties": {
  1114. "id": {
  1115. "type": "string"
  1116. },
  1117. "name": {
  1118. "type": "string"
  1119. },
  1120. "attachment": {
  1121. "type": "boolean"
  1122. },
  1123. "reasoning": {
  1124. "type": "boolean"
  1125. },
  1126. "cost": {
  1127. "type": "object",
  1128. "properties": {
  1129. "input": {
  1130. "type": "number"
  1131. },
  1132. "inputCached": {
  1133. "type": "number"
  1134. },
  1135. "output": {
  1136. "type": "number"
  1137. },
  1138. "outputCached": {
  1139. "type": "number"
  1140. }
  1141. },
  1142. "required": [
  1143. "input",
  1144. "inputCached",
  1145. "output",
  1146. "outputCached"
  1147. ]
  1148. },
  1149. "limit": {
  1150. "type": "object",
  1151. "properties": {
  1152. "context": {
  1153. "type": "number"
  1154. },
  1155. "output": {
  1156. "type": "number"
  1157. }
  1158. },
  1159. "required": [
  1160. "context",
  1161. "output"
  1162. ]
  1163. }
  1164. },
  1165. "required": [
  1166. "id",
  1167. "attachment",
  1168. "cost",
  1169. "limit"
  1170. ]
  1171. }
  1172. }
  1173. }
  1174. }