openapi.json 238 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707
  1. {
  2. "openapi": "3.1.1",
  3. "info": {
  4. "title": "opencode",
  5. "description": "opencode api",
  6. "version": "1.0.0"
  7. },
  8. "paths": {
  9. "/global/event": {
  10. "get": {
  11. "operationId": "global.event",
  12. "summary": "Get global events",
  13. "description": "Subscribe to global events from the OpenCode system using server-sent events.",
  14. "responses": {
  15. "200": {
  16. "description": "Event stream",
  17. "content": {
  18. "text/event-stream": {
  19. "schema": {
  20. "$ref": "#/components/schemas/GlobalEvent"
  21. }
  22. }
  23. }
  24. }
  25. },
  26. "x-codeSamples": [
  27. {
  28. "lang": "js",
  29. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.event({\n ...\n})"
  30. }
  31. ]
  32. }
  33. },
  34. "/project": {
  35. "get": {
  36. "operationId": "project.list",
  37. "parameters": [
  38. {
  39. "in": "query",
  40. "name": "directory",
  41. "schema": {
  42. "type": "string"
  43. }
  44. }
  45. ],
  46. "summary": "List all projects",
  47. "description": "Get a list of projects that have been opened with OpenCode.",
  48. "responses": {
  49. "200": {
  50. "description": "List of projects",
  51. "content": {
  52. "application/json": {
  53. "schema": {
  54. "type": "array",
  55. "items": {
  56. "$ref": "#/components/schemas/Project"
  57. }
  58. }
  59. }
  60. }
  61. }
  62. },
  63. "x-codeSamples": [
  64. {
  65. "lang": "js",
  66. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.list({\n ...\n})"
  67. }
  68. ]
  69. }
  70. },
  71. "/project/current": {
  72. "get": {
  73. "operationId": "project.current",
  74. "parameters": [
  75. {
  76. "in": "query",
  77. "name": "directory",
  78. "schema": {
  79. "type": "string"
  80. }
  81. }
  82. ],
  83. "summary": "Get current project",
  84. "description": "Retrieve the currently active project that OpenCode is working with.",
  85. "responses": {
  86. "200": {
  87. "description": "Current project information",
  88. "content": {
  89. "application/json": {
  90. "schema": {
  91. "$ref": "#/components/schemas/Project"
  92. }
  93. }
  94. }
  95. }
  96. },
  97. "x-codeSamples": [
  98. {
  99. "lang": "js",
  100. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.current({\n ...\n})"
  101. }
  102. ]
  103. }
  104. },
  105. "/pty": {
  106. "get": {
  107. "operationId": "pty.list",
  108. "parameters": [
  109. {
  110. "in": "query",
  111. "name": "directory",
  112. "schema": {
  113. "type": "string"
  114. }
  115. }
  116. ],
  117. "summary": "List PTY sessions",
  118. "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
  119. "responses": {
  120. "200": {
  121. "description": "List of sessions",
  122. "content": {
  123. "application/json": {
  124. "schema": {
  125. "type": "array",
  126. "items": {
  127. "$ref": "#/components/schemas/Pty"
  128. }
  129. }
  130. }
  131. }
  132. }
  133. },
  134. "x-codeSamples": [
  135. {
  136. "lang": "js",
  137. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
  138. }
  139. ]
  140. },
  141. "post": {
  142. "operationId": "pty.create",
  143. "parameters": [
  144. {
  145. "in": "query",
  146. "name": "directory",
  147. "schema": {
  148. "type": "string"
  149. }
  150. }
  151. ],
  152. "summary": "Create PTY session",
  153. "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
  154. "responses": {
  155. "200": {
  156. "description": "Created session",
  157. "content": {
  158. "application/json": {
  159. "schema": {
  160. "$ref": "#/components/schemas/Pty"
  161. }
  162. }
  163. }
  164. },
  165. "400": {
  166. "description": "Bad request",
  167. "content": {
  168. "application/json": {
  169. "schema": {
  170. "$ref": "#/components/schemas/BadRequestError"
  171. }
  172. }
  173. }
  174. }
  175. },
  176. "requestBody": {
  177. "content": {
  178. "application/json": {
  179. "schema": {
  180. "type": "object",
  181. "properties": {
  182. "command": {
  183. "type": "string"
  184. },
  185. "args": {
  186. "type": "array",
  187. "items": {
  188. "type": "string"
  189. }
  190. },
  191. "cwd": {
  192. "type": "string"
  193. },
  194. "title": {
  195. "type": "string"
  196. },
  197. "env": {
  198. "type": "object",
  199. "propertyNames": {
  200. "type": "string"
  201. },
  202. "additionalProperties": {
  203. "type": "string"
  204. }
  205. }
  206. }
  207. }
  208. }
  209. }
  210. },
  211. "x-codeSamples": [
  212. {
  213. "lang": "js",
  214. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
  215. }
  216. ]
  217. }
  218. },
  219. "/pty/{ptyID}": {
  220. "get": {
  221. "operationId": "pty.get",
  222. "parameters": [
  223. {
  224. "in": "query",
  225. "name": "directory",
  226. "schema": {
  227. "type": "string"
  228. }
  229. },
  230. {
  231. "in": "path",
  232. "name": "ptyID",
  233. "schema": {
  234. "type": "string"
  235. },
  236. "required": true
  237. }
  238. ],
  239. "summary": "Get PTY session",
  240. "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
  241. "responses": {
  242. "200": {
  243. "description": "Session info",
  244. "content": {
  245. "application/json": {
  246. "schema": {
  247. "$ref": "#/components/schemas/Pty"
  248. }
  249. }
  250. }
  251. },
  252. "404": {
  253. "description": "Not found",
  254. "content": {
  255. "application/json": {
  256. "schema": {
  257. "$ref": "#/components/schemas/NotFoundError"
  258. }
  259. }
  260. }
  261. }
  262. },
  263. "x-codeSamples": [
  264. {
  265. "lang": "js",
  266. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
  267. }
  268. ]
  269. },
  270. "put": {
  271. "operationId": "pty.update",
  272. "parameters": [
  273. {
  274. "in": "query",
  275. "name": "directory",
  276. "schema": {
  277. "type": "string"
  278. }
  279. },
  280. {
  281. "in": "path",
  282. "name": "ptyID",
  283. "schema": {
  284. "type": "string"
  285. },
  286. "required": true
  287. }
  288. ],
  289. "summary": "Update PTY session",
  290. "description": "Update properties of an existing pseudo-terminal (PTY) session.",
  291. "responses": {
  292. "200": {
  293. "description": "Updated session",
  294. "content": {
  295. "application/json": {
  296. "schema": {
  297. "$ref": "#/components/schemas/Pty"
  298. }
  299. }
  300. }
  301. },
  302. "400": {
  303. "description": "Bad request",
  304. "content": {
  305. "application/json": {
  306. "schema": {
  307. "$ref": "#/components/schemas/BadRequestError"
  308. }
  309. }
  310. }
  311. }
  312. },
  313. "requestBody": {
  314. "content": {
  315. "application/json": {
  316. "schema": {
  317. "type": "object",
  318. "properties": {
  319. "title": {
  320. "type": "string"
  321. },
  322. "size": {
  323. "type": "object",
  324. "properties": {
  325. "rows": {
  326. "type": "number"
  327. },
  328. "cols": {
  329. "type": "number"
  330. }
  331. },
  332. "required": ["rows", "cols"]
  333. }
  334. }
  335. }
  336. }
  337. }
  338. },
  339. "x-codeSamples": [
  340. {
  341. "lang": "js",
  342. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
  343. }
  344. ]
  345. },
  346. "delete": {
  347. "operationId": "pty.remove",
  348. "parameters": [
  349. {
  350. "in": "query",
  351. "name": "directory",
  352. "schema": {
  353. "type": "string"
  354. }
  355. },
  356. {
  357. "in": "path",
  358. "name": "ptyID",
  359. "schema": {
  360. "type": "string"
  361. },
  362. "required": true
  363. }
  364. ],
  365. "summary": "Remove PTY session",
  366. "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
  367. "responses": {
  368. "200": {
  369. "description": "Session removed",
  370. "content": {
  371. "application/json": {
  372. "schema": {
  373. "type": "boolean"
  374. }
  375. }
  376. }
  377. },
  378. "404": {
  379. "description": "Not found",
  380. "content": {
  381. "application/json": {
  382. "schema": {
  383. "$ref": "#/components/schemas/NotFoundError"
  384. }
  385. }
  386. }
  387. }
  388. },
  389. "x-codeSamples": [
  390. {
  391. "lang": "js",
  392. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
  393. }
  394. ]
  395. }
  396. },
  397. "/pty/{ptyID}/connect": {
  398. "get": {
  399. "operationId": "pty.connect",
  400. "parameters": [
  401. {
  402. "in": "query",
  403. "name": "directory",
  404. "schema": {
  405. "type": "string"
  406. }
  407. },
  408. {
  409. "in": "path",
  410. "name": "ptyID",
  411. "schema": {
  412. "type": "string"
  413. },
  414. "required": true
  415. }
  416. ],
  417. "summary": "Connect to PTY session",
  418. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  419. "responses": {
  420. "200": {
  421. "description": "Connected session",
  422. "content": {
  423. "application/json": {
  424. "schema": {
  425. "type": "boolean"
  426. }
  427. }
  428. }
  429. },
  430. "404": {
  431. "description": "Not found",
  432. "content": {
  433. "application/json": {
  434. "schema": {
  435. "$ref": "#/components/schemas/NotFoundError"
  436. }
  437. }
  438. }
  439. }
  440. },
  441. "x-codeSamples": [
  442. {
  443. "lang": "js",
  444. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  445. }
  446. ]
  447. }
  448. },
  449. "/config": {
  450. "get": {
  451. "operationId": "config.get",
  452. "parameters": [
  453. {
  454. "in": "query",
  455. "name": "directory",
  456. "schema": {
  457. "type": "string"
  458. }
  459. }
  460. ],
  461. "summary": "Get configuration",
  462. "description": "Retrieve the current OpenCode configuration settings and preferences.",
  463. "responses": {
  464. "200": {
  465. "description": "Get config info",
  466. "content": {
  467. "application/json": {
  468. "schema": {
  469. "$ref": "#/components/schemas/Config"
  470. }
  471. }
  472. }
  473. }
  474. },
  475. "x-codeSamples": [
  476. {
  477. "lang": "js",
  478. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.get({\n ...\n})"
  479. }
  480. ]
  481. },
  482. "patch": {
  483. "operationId": "config.update",
  484. "parameters": [
  485. {
  486. "in": "query",
  487. "name": "directory",
  488. "schema": {
  489. "type": "string"
  490. }
  491. }
  492. ],
  493. "summary": "Update configuration",
  494. "description": "Update OpenCode configuration settings and preferences.",
  495. "responses": {
  496. "200": {
  497. "description": "Successfully updated config",
  498. "content": {
  499. "application/json": {
  500. "schema": {
  501. "$ref": "#/components/schemas/Config"
  502. }
  503. }
  504. }
  505. },
  506. "400": {
  507. "description": "Bad request",
  508. "content": {
  509. "application/json": {
  510. "schema": {
  511. "$ref": "#/components/schemas/BadRequestError"
  512. }
  513. }
  514. }
  515. }
  516. },
  517. "requestBody": {
  518. "content": {
  519. "application/json": {
  520. "schema": {
  521. "$ref": "#/components/schemas/Config"
  522. }
  523. }
  524. }
  525. },
  526. "x-codeSamples": [
  527. {
  528. "lang": "js",
  529. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.update({\n ...\n})"
  530. }
  531. ]
  532. }
  533. },
  534. "/experimental/tool/ids": {
  535. "get": {
  536. "operationId": "tool.ids",
  537. "parameters": [
  538. {
  539. "in": "query",
  540. "name": "directory",
  541. "schema": {
  542. "type": "string"
  543. }
  544. }
  545. ],
  546. "summary": "List tool IDs",
  547. "description": "Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.",
  548. "responses": {
  549. "200": {
  550. "description": "Tool IDs",
  551. "content": {
  552. "application/json": {
  553. "schema": {
  554. "$ref": "#/components/schemas/ToolIDs"
  555. }
  556. }
  557. }
  558. },
  559. "400": {
  560. "description": "Bad request",
  561. "content": {
  562. "application/json": {
  563. "schema": {
  564. "$ref": "#/components/schemas/BadRequestError"
  565. }
  566. }
  567. }
  568. }
  569. },
  570. "x-codeSamples": [
  571. {
  572. "lang": "js",
  573. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.ids({\n ...\n})"
  574. }
  575. ]
  576. }
  577. },
  578. "/experimental/tool": {
  579. "get": {
  580. "operationId": "tool.list",
  581. "parameters": [
  582. {
  583. "in": "query",
  584. "name": "directory",
  585. "schema": {
  586. "type": "string"
  587. }
  588. },
  589. {
  590. "in": "query",
  591. "name": "provider",
  592. "schema": {
  593. "type": "string"
  594. },
  595. "required": true
  596. },
  597. {
  598. "in": "query",
  599. "name": "model",
  600. "schema": {
  601. "type": "string"
  602. },
  603. "required": true
  604. }
  605. ],
  606. "summary": "List tools",
  607. "description": "Get a list of available tools with their JSON schema parameters for a specific provider and model combination.",
  608. "responses": {
  609. "200": {
  610. "description": "Tools",
  611. "content": {
  612. "application/json": {
  613. "schema": {
  614. "$ref": "#/components/schemas/ToolList"
  615. }
  616. }
  617. }
  618. },
  619. "400": {
  620. "description": "Bad request",
  621. "content": {
  622. "application/json": {
  623. "schema": {
  624. "$ref": "#/components/schemas/BadRequestError"
  625. }
  626. }
  627. }
  628. }
  629. },
  630. "x-codeSamples": [
  631. {
  632. "lang": "js",
  633. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.list({\n ...\n})"
  634. }
  635. ]
  636. }
  637. },
  638. "/instance/dispose": {
  639. "post": {
  640. "operationId": "instance.dispose",
  641. "parameters": [
  642. {
  643. "in": "query",
  644. "name": "directory",
  645. "schema": {
  646. "type": "string"
  647. }
  648. }
  649. ],
  650. "summary": "Dispose instance",
  651. "description": "Clean up and dispose the current OpenCode instance, releasing all resources.",
  652. "responses": {
  653. "200": {
  654. "description": "Instance disposed",
  655. "content": {
  656. "application/json": {
  657. "schema": {
  658. "type": "boolean"
  659. }
  660. }
  661. }
  662. }
  663. },
  664. "x-codeSamples": [
  665. {
  666. "lang": "js",
  667. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.instance.dispose({\n ...\n})"
  668. }
  669. ]
  670. }
  671. },
  672. "/path": {
  673. "get": {
  674. "operationId": "path.get",
  675. "parameters": [
  676. {
  677. "in": "query",
  678. "name": "directory",
  679. "schema": {
  680. "type": "string"
  681. }
  682. }
  683. ],
  684. "summary": "Get paths",
  685. "description": "Retrieve the current working directory and related path information for the OpenCode instance.",
  686. "responses": {
  687. "200": {
  688. "description": "Path",
  689. "content": {
  690. "application/json": {
  691. "schema": {
  692. "$ref": "#/components/schemas/Path"
  693. }
  694. }
  695. }
  696. }
  697. },
  698. "x-codeSamples": [
  699. {
  700. "lang": "js",
  701. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.path.get({\n ...\n})"
  702. }
  703. ]
  704. }
  705. },
  706. "/vcs": {
  707. "get": {
  708. "operationId": "vcs.get",
  709. "parameters": [
  710. {
  711. "in": "query",
  712. "name": "directory",
  713. "schema": {
  714. "type": "string"
  715. }
  716. }
  717. ],
  718. "summary": "Get VCS info",
  719. "description": "Retrieve version control system (VCS) information for the current project, such as git branch.",
  720. "responses": {
  721. "200": {
  722. "description": "VCS info",
  723. "content": {
  724. "application/json": {
  725. "schema": {
  726. "$ref": "#/components/schemas/VcsInfo"
  727. }
  728. }
  729. }
  730. }
  731. },
  732. "x-codeSamples": [
  733. {
  734. "lang": "js",
  735. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.get({\n ...\n})"
  736. }
  737. ]
  738. }
  739. },
  740. "/session": {
  741. "get": {
  742. "operationId": "session.list",
  743. "parameters": [
  744. {
  745. "in": "query",
  746. "name": "directory",
  747. "schema": {
  748. "type": "string"
  749. }
  750. }
  751. ],
  752. "summary": "List sessions",
  753. "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
  754. "responses": {
  755. "200": {
  756. "description": "List of sessions",
  757. "content": {
  758. "application/json": {
  759. "schema": {
  760. "type": "array",
  761. "items": {
  762. "$ref": "#/components/schemas/Session"
  763. }
  764. }
  765. }
  766. }
  767. }
  768. },
  769. "x-codeSamples": [
  770. {
  771. "lang": "js",
  772. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
  773. }
  774. ]
  775. },
  776. "post": {
  777. "operationId": "session.create",
  778. "parameters": [
  779. {
  780. "in": "query",
  781. "name": "directory",
  782. "schema": {
  783. "type": "string"
  784. }
  785. }
  786. ],
  787. "summary": "Create session",
  788. "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
  789. "responses": {
  790. "200": {
  791. "description": "Successfully created session",
  792. "content": {
  793. "application/json": {
  794. "schema": {
  795. "$ref": "#/components/schemas/Session"
  796. }
  797. }
  798. }
  799. },
  800. "400": {
  801. "description": "Bad request",
  802. "content": {
  803. "application/json": {
  804. "schema": {
  805. "$ref": "#/components/schemas/BadRequestError"
  806. }
  807. }
  808. }
  809. }
  810. },
  811. "requestBody": {
  812. "content": {
  813. "application/json": {
  814. "schema": {
  815. "type": "object",
  816. "properties": {
  817. "parentID": {
  818. "type": "string",
  819. "pattern": "^ses.*"
  820. },
  821. "title": {
  822. "type": "string"
  823. }
  824. }
  825. }
  826. }
  827. }
  828. },
  829. "x-codeSamples": [
  830. {
  831. "lang": "js",
  832. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
  833. }
  834. ]
  835. }
  836. },
  837. "/session/status": {
  838. "get": {
  839. "operationId": "session.status",
  840. "parameters": [
  841. {
  842. "in": "query",
  843. "name": "directory",
  844. "schema": {
  845. "type": "string"
  846. }
  847. }
  848. ],
  849. "summary": "Get session status",
  850. "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
  851. "responses": {
  852. "200": {
  853. "description": "Get session status",
  854. "content": {
  855. "application/json": {
  856. "schema": {
  857. "type": "object",
  858. "propertyNames": {
  859. "type": "string"
  860. },
  861. "additionalProperties": {
  862. "$ref": "#/components/schemas/SessionStatus"
  863. }
  864. }
  865. }
  866. }
  867. },
  868. "400": {
  869. "description": "Bad request",
  870. "content": {
  871. "application/json": {
  872. "schema": {
  873. "$ref": "#/components/schemas/BadRequestError"
  874. }
  875. }
  876. }
  877. }
  878. },
  879. "x-codeSamples": [
  880. {
  881. "lang": "js",
  882. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
  883. }
  884. ]
  885. }
  886. },
  887. "/session/{sessionID}": {
  888. "get": {
  889. "operationId": "session.get",
  890. "parameters": [
  891. {
  892. "in": "query",
  893. "name": "directory",
  894. "schema": {
  895. "type": "string"
  896. }
  897. },
  898. {
  899. "in": "path",
  900. "name": "sessionID",
  901. "schema": {
  902. "type": "string",
  903. "pattern": "^ses.*"
  904. },
  905. "required": true
  906. }
  907. ],
  908. "summary": "Get session",
  909. "description": "Retrieve detailed information about a specific OpenCode session.",
  910. "responses": {
  911. "200": {
  912. "description": "Get session",
  913. "content": {
  914. "application/json": {
  915. "schema": {
  916. "$ref": "#/components/schemas/Session"
  917. }
  918. }
  919. }
  920. },
  921. "400": {
  922. "description": "Bad request",
  923. "content": {
  924. "application/json": {
  925. "schema": {
  926. "$ref": "#/components/schemas/BadRequestError"
  927. }
  928. }
  929. }
  930. },
  931. "404": {
  932. "description": "Not found",
  933. "content": {
  934. "application/json": {
  935. "schema": {
  936. "$ref": "#/components/schemas/NotFoundError"
  937. }
  938. }
  939. }
  940. }
  941. },
  942. "x-codeSamples": [
  943. {
  944. "lang": "js",
  945. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
  946. }
  947. ]
  948. },
  949. "delete": {
  950. "operationId": "session.delete",
  951. "parameters": [
  952. {
  953. "in": "query",
  954. "name": "directory",
  955. "schema": {
  956. "type": "string"
  957. }
  958. },
  959. {
  960. "in": "path",
  961. "name": "sessionID",
  962. "schema": {
  963. "type": "string",
  964. "pattern": "^ses.*"
  965. },
  966. "required": true
  967. }
  968. ],
  969. "summary": "Delete session",
  970. "description": "Delete a session and permanently remove all associated data, including messages and history.",
  971. "responses": {
  972. "200": {
  973. "description": "Successfully deleted session",
  974. "content": {
  975. "application/json": {
  976. "schema": {
  977. "type": "boolean"
  978. }
  979. }
  980. }
  981. },
  982. "400": {
  983. "description": "Bad request",
  984. "content": {
  985. "application/json": {
  986. "schema": {
  987. "$ref": "#/components/schemas/BadRequestError"
  988. }
  989. }
  990. }
  991. },
  992. "404": {
  993. "description": "Not found",
  994. "content": {
  995. "application/json": {
  996. "schema": {
  997. "$ref": "#/components/schemas/NotFoundError"
  998. }
  999. }
  1000. }
  1001. }
  1002. },
  1003. "x-codeSamples": [
  1004. {
  1005. "lang": "js",
  1006. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
  1007. }
  1008. ]
  1009. },
  1010. "patch": {
  1011. "operationId": "session.update",
  1012. "parameters": [
  1013. {
  1014. "in": "query",
  1015. "name": "directory",
  1016. "schema": {
  1017. "type": "string"
  1018. }
  1019. },
  1020. {
  1021. "in": "path",
  1022. "name": "sessionID",
  1023. "schema": {
  1024. "type": "string"
  1025. },
  1026. "required": true
  1027. }
  1028. ],
  1029. "summary": "Update session",
  1030. "description": "Update properties of an existing session, such as title or other metadata.",
  1031. "responses": {
  1032. "200": {
  1033. "description": "Successfully updated session",
  1034. "content": {
  1035. "application/json": {
  1036. "schema": {
  1037. "$ref": "#/components/schemas/Session"
  1038. }
  1039. }
  1040. }
  1041. },
  1042. "400": {
  1043. "description": "Bad request",
  1044. "content": {
  1045. "application/json": {
  1046. "schema": {
  1047. "$ref": "#/components/schemas/BadRequestError"
  1048. }
  1049. }
  1050. }
  1051. },
  1052. "404": {
  1053. "description": "Not found",
  1054. "content": {
  1055. "application/json": {
  1056. "schema": {
  1057. "$ref": "#/components/schemas/NotFoundError"
  1058. }
  1059. }
  1060. }
  1061. }
  1062. },
  1063. "requestBody": {
  1064. "content": {
  1065. "application/json": {
  1066. "schema": {
  1067. "type": "object",
  1068. "properties": {
  1069. "title": {
  1070. "type": "string"
  1071. }
  1072. }
  1073. }
  1074. }
  1075. }
  1076. },
  1077. "x-codeSamples": [
  1078. {
  1079. "lang": "js",
  1080. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
  1081. }
  1082. ]
  1083. }
  1084. },
  1085. "/session/{sessionID}/children": {
  1086. "get": {
  1087. "operationId": "session.children",
  1088. "parameters": [
  1089. {
  1090. "in": "query",
  1091. "name": "directory",
  1092. "schema": {
  1093. "type": "string"
  1094. }
  1095. },
  1096. {
  1097. "in": "path",
  1098. "name": "sessionID",
  1099. "schema": {
  1100. "type": "string",
  1101. "pattern": "^ses.*"
  1102. },
  1103. "required": true
  1104. }
  1105. ],
  1106. "summary": "Get session children",
  1107. "description": "Retrieve all child sessions that were forked from the specified parent session.",
  1108. "responses": {
  1109. "200": {
  1110. "description": "List of children",
  1111. "content": {
  1112. "application/json": {
  1113. "schema": {
  1114. "type": "array",
  1115. "items": {
  1116. "$ref": "#/components/schemas/Session"
  1117. }
  1118. }
  1119. }
  1120. }
  1121. },
  1122. "400": {
  1123. "description": "Bad request",
  1124. "content": {
  1125. "application/json": {
  1126. "schema": {
  1127. "$ref": "#/components/schemas/BadRequestError"
  1128. }
  1129. }
  1130. }
  1131. },
  1132. "404": {
  1133. "description": "Not found",
  1134. "content": {
  1135. "application/json": {
  1136. "schema": {
  1137. "$ref": "#/components/schemas/NotFoundError"
  1138. }
  1139. }
  1140. }
  1141. }
  1142. },
  1143. "x-codeSamples": [
  1144. {
  1145. "lang": "js",
  1146. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
  1147. }
  1148. ]
  1149. }
  1150. },
  1151. "/session/{sessionID}/todo": {
  1152. "get": {
  1153. "operationId": "session.todo",
  1154. "parameters": [
  1155. {
  1156. "in": "query",
  1157. "name": "directory",
  1158. "schema": {
  1159. "type": "string"
  1160. }
  1161. },
  1162. {
  1163. "in": "path",
  1164. "name": "sessionID",
  1165. "schema": {
  1166. "type": "string"
  1167. },
  1168. "required": true,
  1169. "description": "Session ID"
  1170. }
  1171. ],
  1172. "summary": "Get session todos",
  1173. "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
  1174. "responses": {
  1175. "200": {
  1176. "description": "Todo list",
  1177. "content": {
  1178. "application/json": {
  1179. "schema": {
  1180. "type": "array",
  1181. "items": {
  1182. "$ref": "#/components/schemas/Todo"
  1183. }
  1184. }
  1185. }
  1186. }
  1187. },
  1188. "400": {
  1189. "description": "Bad request",
  1190. "content": {
  1191. "application/json": {
  1192. "schema": {
  1193. "$ref": "#/components/schemas/BadRequestError"
  1194. }
  1195. }
  1196. }
  1197. },
  1198. "404": {
  1199. "description": "Not found",
  1200. "content": {
  1201. "application/json": {
  1202. "schema": {
  1203. "$ref": "#/components/schemas/NotFoundError"
  1204. }
  1205. }
  1206. }
  1207. }
  1208. },
  1209. "x-codeSamples": [
  1210. {
  1211. "lang": "js",
  1212. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
  1213. }
  1214. ]
  1215. }
  1216. },
  1217. "/session/{sessionID}/init": {
  1218. "post": {
  1219. "operationId": "session.init",
  1220. "parameters": [
  1221. {
  1222. "in": "query",
  1223. "name": "directory",
  1224. "schema": {
  1225. "type": "string"
  1226. }
  1227. },
  1228. {
  1229. "in": "path",
  1230. "name": "sessionID",
  1231. "schema": {
  1232. "type": "string"
  1233. },
  1234. "required": true,
  1235. "description": "Session ID"
  1236. }
  1237. ],
  1238. "summary": "Initialize session",
  1239. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  1240. "responses": {
  1241. "200": {
  1242. "description": "200",
  1243. "content": {
  1244. "application/json": {
  1245. "schema": {
  1246. "type": "boolean"
  1247. }
  1248. }
  1249. }
  1250. },
  1251. "400": {
  1252. "description": "Bad request",
  1253. "content": {
  1254. "application/json": {
  1255. "schema": {
  1256. "$ref": "#/components/schemas/BadRequestError"
  1257. }
  1258. }
  1259. }
  1260. },
  1261. "404": {
  1262. "description": "Not found",
  1263. "content": {
  1264. "application/json": {
  1265. "schema": {
  1266. "$ref": "#/components/schemas/NotFoundError"
  1267. }
  1268. }
  1269. }
  1270. }
  1271. },
  1272. "requestBody": {
  1273. "content": {
  1274. "application/json": {
  1275. "schema": {
  1276. "type": "object",
  1277. "properties": {
  1278. "modelID": {
  1279. "type": "string"
  1280. },
  1281. "providerID": {
  1282. "type": "string"
  1283. },
  1284. "messageID": {
  1285. "type": "string",
  1286. "pattern": "^msg.*"
  1287. }
  1288. },
  1289. "required": ["modelID", "providerID", "messageID"]
  1290. }
  1291. }
  1292. }
  1293. },
  1294. "x-codeSamples": [
  1295. {
  1296. "lang": "js",
  1297. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  1298. }
  1299. ]
  1300. }
  1301. },
  1302. "/session/{sessionID}/fork": {
  1303. "post": {
  1304. "operationId": "session.fork",
  1305. "parameters": [
  1306. {
  1307. "in": "query",
  1308. "name": "directory",
  1309. "schema": {
  1310. "type": "string"
  1311. }
  1312. },
  1313. {
  1314. "in": "path",
  1315. "name": "sessionID",
  1316. "schema": {
  1317. "type": "string",
  1318. "pattern": "^ses.*"
  1319. },
  1320. "required": true
  1321. }
  1322. ],
  1323. "summary": "Fork session",
  1324. "description": "Create a new session by forking an existing session at a specific message point.",
  1325. "responses": {
  1326. "200": {
  1327. "description": "200",
  1328. "content": {
  1329. "application/json": {
  1330. "schema": {
  1331. "$ref": "#/components/schemas/Session"
  1332. }
  1333. }
  1334. }
  1335. }
  1336. },
  1337. "requestBody": {
  1338. "content": {
  1339. "application/json": {
  1340. "schema": {
  1341. "type": "object",
  1342. "properties": {
  1343. "messageID": {
  1344. "type": "string",
  1345. "pattern": "^msg.*"
  1346. }
  1347. }
  1348. }
  1349. }
  1350. }
  1351. },
  1352. "x-codeSamples": [
  1353. {
  1354. "lang": "js",
  1355. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  1356. }
  1357. ]
  1358. }
  1359. },
  1360. "/session/{sessionID}/abort": {
  1361. "post": {
  1362. "operationId": "session.abort",
  1363. "parameters": [
  1364. {
  1365. "in": "query",
  1366. "name": "directory",
  1367. "schema": {
  1368. "type": "string"
  1369. }
  1370. },
  1371. {
  1372. "in": "path",
  1373. "name": "sessionID",
  1374. "schema": {
  1375. "type": "string"
  1376. },
  1377. "required": true
  1378. }
  1379. ],
  1380. "summary": "Abort session",
  1381. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  1382. "responses": {
  1383. "200": {
  1384. "description": "Aborted session",
  1385. "content": {
  1386. "application/json": {
  1387. "schema": {
  1388. "type": "boolean"
  1389. }
  1390. }
  1391. }
  1392. },
  1393. "400": {
  1394. "description": "Bad request",
  1395. "content": {
  1396. "application/json": {
  1397. "schema": {
  1398. "$ref": "#/components/schemas/BadRequestError"
  1399. }
  1400. }
  1401. }
  1402. },
  1403. "404": {
  1404. "description": "Not found",
  1405. "content": {
  1406. "application/json": {
  1407. "schema": {
  1408. "$ref": "#/components/schemas/NotFoundError"
  1409. }
  1410. }
  1411. }
  1412. }
  1413. },
  1414. "x-codeSamples": [
  1415. {
  1416. "lang": "js",
  1417. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  1418. }
  1419. ]
  1420. }
  1421. },
  1422. "/session/{sessionID}/share": {
  1423. "post": {
  1424. "operationId": "session.share",
  1425. "parameters": [
  1426. {
  1427. "in": "query",
  1428. "name": "directory",
  1429. "schema": {
  1430. "type": "string"
  1431. }
  1432. },
  1433. {
  1434. "in": "path",
  1435. "name": "sessionID",
  1436. "schema": {
  1437. "type": "string"
  1438. },
  1439. "required": true
  1440. }
  1441. ],
  1442. "summary": "Share session",
  1443. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  1444. "responses": {
  1445. "200": {
  1446. "description": "Successfully shared session",
  1447. "content": {
  1448. "application/json": {
  1449. "schema": {
  1450. "$ref": "#/components/schemas/Session"
  1451. }
  1452. }
  1453. }
  1454. },
  1455. "400": {
  1456. "description": "Bad request",
  1457. "content": {
  1458. "application/json": {
  1459. "schema": {
  1460. "$ref": "#/components/schemas/BadRequestError"
  1461. }
  1462. }
  1463. }
  1464. },
  1465. "404": {
  1466. "description": "Not found",
  1467. "content": {
  1468. "application/json": {
  1469. "schema": {
  1470. "$ref": "#/components/schemas/NotFoundError"
  1471. }
  1472. }
  1473. }
  1474. }
  1475. },
  1476. "x-codeSamples": [
  1477. {
  1478. "lang": "js",
  1479. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  1480. }
  1481. ]
  1482. },
  1483. "delete": {
  1484. "operationId": "session.unshare",
  1485. "parameters": [
  1486. {
  1487. "in": "query",
  1488. "name": "directory",
  1489. "schema": {
  1490. "type": "string"
  1491. }
  1492. },
  1493. {
  1494. "in": "path",
  1495. "name": "sessionID",
  1496. "schema": {
  1497. "type": "string",
  1498. "pattern": "^ses.*"
  1499. },
  1500. "required": true
  1501. }
  1502. ],
  1503. "summary": "Unshare session",
  1504. "description": "Remove the shareable link for a session, making it private again.",
  1505. "responses": {
  1506. "200": {
  1507. "description": "Successfully unshared session",
  1508. "content": {
  1509. "application/json": {
  1510. "schema": {
  1511. "$ref": "#/components/schemas/Session"
  1512. }
  1513. }
  1514. }
  1515. },
  1516. "400": {
  1517. "description": "Bad request",
  1518. "content": {
  1519. "application/json": {
  1520. "schema": {
  1521. "$ref": "#/components/schemas/BadRequestError"
  1522. }
  1523. }
  1524. }
  1525. },
  1526. "404": {
  1527. "description": "Not found",
  1528. "content": {
  1529. "application/json": {
  1530. "schema": {
  1531. "$ref": "#/components/schemas/NotFoundError"
  1532. }
  1533. }
  1534. }
  1535. }
  1536. },
  1537. "x-codeSamples": [
  1538. {
  1539. "lang": "js",
  1540. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  1541. }
  1542. ]
  1543. }
  1544. },
  1545. "/session/{sessionID}/diff": {
  1546. "get": {
  1547. "operationId": "session.diff",
  1548. "parameters": [
  1549. {
  1550. "in": "query",
  1551. "name": "directory",
  1552. "schema": {
  1553. "type": "string"
  1554. }
  1555. },
  1556. {
  1557. "in": "path",
  1558. "name": "sessionID",
  1559. "schema": {
  1560. "type": "string"
  1561. },
  1562. "required": true,
  1563. "description": "Session ID"
  1564. },
  1565. {
  1566. "in": "query",
  1567. "name": "messageID",
  1568. "schema": {
  1569. "type": "string",
  1570. "pattern": "^msg.*"
  1571. }
  1572. }
  1573. ],
  1574. "summary": "Get session diff",
  1575. "description": "Get all file changes (diffs) made during this session.",
  1576. "responses": {
  1577. "200": {
  1578. "description": "List of diffs",
  1579. "content": {
  1580. "application/json": {
  1581. "schema": {
  1582. "type": "array",
  1583. "items": {
  1584. "$ref": "#/components/schemas/FileDiff"
  1585. }
  1586. }
  1587. }
  1588. }
  1589. },
  1590. "400": {
  1591. "description": "Bad request",
  1592. "content": {
  1593. "application/json": {
  1594. "schema": {
  1595. "$ref": "#/components/schemas/BadRequestError"
  1596. }
  1597. }
  1598. }
  1599. },
  1600. "404": {
  1601. "description": "Not found",
  1602. "content": {
  1603. "application/json": {
  1604. "schema": {
  1605. "$ref": "#/components/schemas/NotFoundError"
  1606. }
  1607. }
  1608. }
  1609. }
  1610. },
  1611. "x-codeSamples": [
  1612. {
  1613. "lang": "js",
  1614. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
  1615. }
  1616. ]
  1617. }
  1618. },
  1619. "/session/{sessionID}/summarize": {
  1620. "post": {
  1621. "operationId": "session.summarize",
  1622. "parameters": [
  1623. {
  1624. "in": "query",
  1625. "name": "directory",
  1626. "schema": {
  1627. "type": "string"
  1628. }
  1629. },
  1630. {
  1631. "in": "path",
  1632. "name": "sessionID",
  1633. "schema": {
  1634. "type": "string"
  1635. },
  1636. "required": true,
  1637. "description": "Session ID"
  1638. }
  1639. ],
  1640. "summary": "Summarize session",
  1641. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  1642. "responses": {
  1643. "200": {
  1644. "description": "Summarized session",
  1645. "content": {
  1646. "application/json": {
  1647. "schema": {
  1648. "type": "boolean"
  1649. }
  1650. }
  1651. }
  1652. },
  1653. "400": {
  1654. "description": "Bad request",
  1655. "content": {
  1656. "application/json": {
  1657. "schema": {
  1658. "$ref": "#/components/schemas/BadRequestError"
  1659. }
  1660. }
  1661. }
  1662. },
  1663. "404": {
  1664. "description": "Not found",
  1665. "content": {
  1666. "application/json": {
  1667. "schema": {
  1668. "$ref": "#/components/schemas/NotFoundError"
  1669. }
  1670. }
  1671. }
  1672. }
  1673. },
  1674. "requestBody": {
  1675. "content": {
  1676. "application/json": {
  1677. "schema": {
  1678. "type": "object",
  1679. "properties": {
  1680. "providerID": {
  1681. "type": "string"
  1682. },
  1683. "modelID": {
  1684. "type": "string"
  1685. }
  1686. },
  1687. "required": ["providerID", "modelID"]
  1688. }
  1689. }
  1690. }
  1691. },
  1692. "x-codeSamples": [
  1693. {
  1694. "lang": "js",
  1695. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  1696. }
  1697. ]
  1698. }
  1699. },
  1700. "/session/{sessionID}/message": {
  1701. "get": {
  1702. "operationId": "session.messages",
  1703. "parameters": [
  1704. {
  1705. "in": "query",
  1706. "name": "directory",
  1707. "schema": {
  1708. "type": "string"
  1709. }
  1710. },
  1711. {
  1712. "in": "path",
  1713. "name": "sessionID",
  1714. "schema": {
  1715. "type": "string"
  1716. },
  1717. "required": true,
  1718. "description": "Session ID"
  1719. },
  1720. {
  1721. "in": "query",
  1722. "name": "limit",
  1723. "schema": {
  1724. "type": "number"
  1725. }
  1726. }
  1727. ],
  1728. "summary": "Get session messages",
  1729. "description": "Retrieve all messages in a session, including user prompts and AI responses.",
  1730. "responses": {
  1731. "200": {
  1732. "description": "List of messages",
  1733. "content": {
  1734. "application/json": {
  1735. "schema": {
  1736. "type": "array",
  1737. "items": {
  1738. "type": "object",
  1739. "properties": {
  1740. "info": {
  1741. "$ref": "#/components/schemas/Message"
  1742. },
  1743. "parts": {
  1744. "type": "array",
  1745. "items": {
  1746. "$ref": "#/components/schemas/Part"
  1747. }
  1748. }
  1749. },
  1750. "required": ["info", "parts"]
  1751. }
  1752. }
  1753. }
  1754. }
  1755. },
  1756. "400": {
  1757. "description": "Bad request",
  1758. "content": {
  1759. "application/json": {
  1760. "schema": {
  1761. "$ref": "#/components/schemas/BadRequestError"
  1762. }
  1763. }
  1764. }
  1765. },
  1766. "404": {
  1767. "description": "Not found",
  1768. "content": {
  1769. "application/json": {
  1770. "schema": {
  1771. "$ref": "#/components/schemas/NotFoundError"
  1772. }
  1773. }
  1774. }
  1775. }
  1776. },
  1777. "x-codeSamples": [
  1778. {
  1779. "lang": "js",
  1780. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
  1781. }
  1782. ]
  1783. },
  1784. "post": {
  1785. "operationId": "session.prompt",
  1786. "parameters": [
  1787. {
  1788. "in": "query",
  1789. "name": "directory",
  1790. "schema": {
  1791. "type": "string"
  1792. }
  1793. },
  1794. {
  1795. "in": "path",
  1796. "name": "sessionID",
  1797. "schema": {
  1798. "type": "string"
  1799. },
  1800. "required": true,
  1801. "description": "Session ID"
  1802. }
  1803. ],
  1804. "summary": "Send message",
  1805. "description": "Create and send a new message to a session, streaming the AI response.",
  1806. "responses": {
  1807. "200": {
  1808. "description": "Created message",
  1809. "content": {
  1810. "application/json": {
  1811. "schema": {
  1812. "type": "object",
  1813. "properties": {
  1814. "info": {
  1815. "$ref": "#/components/schemas/AssistantMessage"
  1816. },
  1817. "parts": {
  1818. "type": "array",
  1819. "items": {
  1820. "$ref": "#/components/schemas/Part"
  1821. }
  1822. }
  1823. },
  1824. "required": ["info", "parts"]
  1825. }
  1826. }
  1827. }
  1828. },
  1829. "400": {
  1830. "description": "Bad request",
  1831. "content": {
  1832. "application/json": {
  1833. "schema": {
  1834. "$ref": "#/components/schemas/BadRequestError"
  1835. }
  1836. }
  1837. }
  1838. },
  1839. "404": {
  1840. "description": "Not found",
  1841. "content": {
  1842. "application/json": {
  1843. "schema": {
  1844. "$ref": "#/components/schemas/NotFoundError"
  1845. }
  1846. }
  1847. }
  1848. }
  1849. },
  1850. "requestBody": {
  1851. "content": {
  1852. "application/json": {
  1853. "schema": {
  1854. "type": "object",
  1855. "properties": {
  1856. "messageID": {
  1857. "type": "string",
  1858. "pattern": "^msg.*"
  1859. },
  1860. "model": {
  1861. "type": "object",
  1862. "properties": {
  1863. "providerID": {
  1864. "type": "string"
  1865. },
  1866. "modelID": {
  1867. "type": "string"
  1868. }
  1869. },
  1870. "required": ["providerID", "modelID"]
  1871. },
  1872. "agent": {
  1873. "type": "string"
  1874. },
  1875. "noReply": {
  1876. "type": "boolean"
  1877. },
  1878. "system": {
  1879. "type": "string"
  1880. },
  1881. "tools": {
  1882. "type": "object",
  1883. "propertyNames": {
  1884. "type": "string"
  1885. },
  1886. "additionalProperties": {
  1887. "type": "boolean"
  1888. }
  1889. },
  1890. "parts": {
  1891. "type": "array",
  1892. "items": {
  1893. "anyOf": [
  1894. {
  1895. "$ref": "#/components/schemas/TextPartInput"
  1896. },
  1897. {
  1898. "$ref": "#/components/schemas/FilePartInput"
  1899. },
  1900. {
  1901. "$ref": "#/components/schemas/AgentPartInput"
  1902. },
  1903. {
  1904. "$ref": "#/components/schemas/SubtaskPartInput"
  1905. }
  1906. ]
  1907. }
  1908. }
  1909. },
  1910. "required": ["parts"]
  1911. }
  1912. }
  1913. }
  1914. },
  1915. "x-codeSamples": [
  1916. {
  1917. "lang": "js",
  1918. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
  1919. }
  1920. ]
  1921. }
  1922. },
  1923. "/session/{sessionID}/message/{messageID}": {
  1924. "get": {
  1925. "operationId": "session.message",
  1926. "parameters": [
  1927. {
  1928. "in": "query",
  1929. "name": "directory",
  1930. "schema": {
  1931. "type": "string"
  1932. }
  1933. },
  1934. {
  1935. "in": "path",
  1936. "name": "sessionID",
  1937. "schema": {
  1938. "type": "string"
  1939. },
  1940. "required": true,
  1941. "description": "Session ID"
  1942. },
  1943. {
  1944. "in": "path",
  1945. "name": "messageID",
  1946. "schema": {
  1947. "type": "string"
  1948. },
  1949. "required": true,
  1950. "description": "Message ID"
  1951. }
  1952. ],
  1953. "summary": "Get message",
  1954. "description": "Retrieve a specific message from a session by its message ID.",
  1955. "responses": {
  1956. "200": {
  1957. "description": "Message",
  1958. "content": {
  1959. "application/json": {
  1960. "schema": {
  1961. "type": "object",
  1962. "properties": {
  1963. "info": {
  1964. "$ref": "#/components/schemas/Message"
  1965. },
  1966. "parts": {
  1967. "type": "array",
  1968. "items": {
  1969. "$ref": "#/components/schemas/Part"
  1970. }
  1971. }
  1972. },
  1973. "required": ["info", "parts"]
  1974. }
  1975. }
  1976. }
  1977. },
  1978. "400": {
  1979. "description": "Bad request",
  1980. "content": {
  1981. "application/json": {
  1982. "schema": {
  1983. "$ref": "#/components/schemas/BadRequestError"
  1984. }
  1985. }
  1986. }
  1987. },
  1988. "404": {
  1989. "description": "Not found",
  1990. "content": {
  1991. "application/json": {
  1992. "schema": {
  1993. "$ref": "#/components/schemas/NotFoundError"
  1994. }
  1995. }
  1996. }
  1997. }
  1998. },
  1999. "x-codeSamples": [
  2000. {
  2001. "lang": "js",
  2002. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
  2003. }
  2004. ]
  2005. }
  2006. },
  2007. "/session/{sessionID}/prompt_async": {
  2008. "post": {
  2009. "operationId": "session.prompt_async",
  2010. "parameters": [
  2011. {
  2012. "in": "query",
  2013. "name": "directory",
  2014. "schema": {
  2015. "type": "string"
  2016. }
  2017. },
  2018. {
  2019. "in": "path",
  2020. "name": "sessionID",
  2021. "schema": {
  2022. "type": "string"
  2023. },
  2024. "required": true,
  2025. "description": "Session ID"
  2026. }
  2027. ],
  2028. "summary": "Send async message",
  2029. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  2030. "responses": {
  2031. "204": {
  2032. "description": "Prompt accepted"
  2033. },
  2034. "400": {
  2035. "description": "Bad request",
  2036. "content": {
  2037. "application/json": {
  2038. "schema": {
  2039. "$ref": "#/components/schemas/BadRequestError"
  2040. }
  2041. }
  2042. }
  2043. },
  2044. "404": {
  2045. "description": "Not found",
  2046. "content": {
  2047. "application/json": {
  2048. "schema": {
  2049. "$ref": "#/components/schemas/NotFoundError"
  2050. }
  2051. }
  2052. }
  2053. }
  2054. },
  2055. "requestBody": {
  2056. "content": {
  2057. "application/json": {
  2058. "schema": {
  2059. "type": "object",
  2060. "properties": {
  2061. "messageID": {
  2062. "type": "string",
  2063. "pattern": "^msg.*"
  2064. },
  2065. "model": {
  2066. "type": "object",
  2067. "properties": {
  2068. "providerID": {
  2069. "type": "string"
  2070. },
  2071. "modelID": {
  2072. "type": "string"
  2073. }
  2074. },
  2075. "required": ["providerID", "modelID"]
  2076. },
  2077. "agent": {
  2078. "type": "string"
  2079. },
  2080. "noReply": {
  2081. "type": "boolean"
  2082. },
  2083. "system": {
  2084. "type": "string"
  2085. },
  2086. "tools": {
  2087. "type": "object",
  2088. "propertyNames": {
  2089. "type": "string"
  2090. },
  2091. "additionalProperties": {
  2092. "type": "boolean"
  2093. }
  2094. },
  2095. "parts": {
  2096. "type": "array",
  2097. "items": {
  2098. "anyOf": [
  2099. {
  2100. "$ref": "#/components/schemas/TextPartInput"
  2101. },
  2102. {
  2103. "$ref": "#/components/schemas/FilePartInput"
  2104. },
  2105. {
  2106. "$ref": "#/components/schemas/AgentPartInput"
  2107. },
  2108. {
  2109. "$ref": "#/components/schemas/SubtaskPartInput"
  2110. }
  2111. ]
  2112. }
  2113. }
  2114. },
  2115. "required": ["parts"]
  2116. }
  2117. }
  2118. }
  2119. },
  2120. "x-codeSamples": [
  2121. {
  2122. "lang": "js",
  2123. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  2124. }
  2125. ]
  2126. }
  2127. },
  2128. "/session/{sessionID}/command": {
  2129. "post": {
  2130. "operationId": "session.command",
  2131. "parameters": [
  2132. {
  2133. "in": "query",
  2134. "name": "directory",
  2135. "schema": {
  2136. "type": "string"
  2137. }
  2138. },
  2139. {
  2140. "in": "path",
  2141. "name": "sessionID",
  2142. "schema": {
  2143. "type": "string"
  2144. },
  2145. "required": true,
  2146. "description": "Session ID"
  2147. }
  2148. ],
  2149. "summary": "Send command",
  2150. "description": "Send a new command to a session for execution by the AI assistant.",
  2151. "responses": {
  2152. "200": {
  2153. "description": "Created message",
  2154. "content": {
  2155. "application/json": {
  2156. "schema": {
  2157. "type": "object",
  2158. "properties": {
  2159. "info": {
  2160. "$ref": "#/components/schemas/AssistantMessage"
  2161. },
  2162. "parts": {
  2163. "type": "array",
  2164. "items": {
  2165. "$ref": "#/components/schemas/Part"
  2166. }
  2167. }
  2168. },
  2169. "required": ["info", "parts"]
  2170. }
  2171. }
  2172. }
  2173. },
  2174. "400": {
  2175. "description": "Bad request",
  2176. "content": {
  2177. "application/json": {
  2178. "schema": {
  2179. "$ref": "#/components/schemas/BadRequestError"
  2180. }
  2181. }
  2182. }
  2183. },
  2184. "404": {
  2185. "description": "Not found",
  2186. "content": {
  2187. "application/json": {
  2188. "schema": {
  2189. "$ref": "#/components/schemas/NotFoundError"
  2190. }
  2191. }
  2192. }
  2193. }
  2194. },
  2195. "requestBody": {
  2196. "content": {
  2197. "application/json": {
  2198. "schema": {
  2199. "type": "object",
  2200. "properties": {
  2201. "messageID": {
  2202. "type": "string",
  2203. "pattern": "^msg.*"
  2204. },
  2205. "agent": {
  2206. "type": "string"
  2207. },
  2208. "model": {
  2209. "type": "string"
  2210. },
  2211. "arguments": {
  2212. "type": "string"
  2213. },
  2214. "command": {
  2215. "type": "string"
  2216. }
  2217. },
  2218. "required": ["arguments", "command"]
  2219. }
  2220. }
  2221. }
  2222. },
  2223. "x-codeSamples": [
  2224. {
  2225. "lang": "js",
  2226. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  2227. }
  2228. ]
  2229. }
  2230. },
  2231. "/session/{sessionID}/shell": {
  2232. "post": {
  2233. "operationId": "session.shell",
  2234. "parameters": [
  2235. {
  2236. "in": "query",
  2237. "name": "directory",
  2238. "schema": {
  2239. "type": "string"
  2240. }
  2241. },
  2242. {
  2243. "in": "path",
  2244. "name": "sessionID",
  2245. "schema": {
  2246. "type": "string"
  2247. },
  2248. "required": true,
  2249. "description": "Session ID"
  2250. }
  2251. ],
  2252. "summary": "Run shell command",
  2253. "description": "Execute a shell command within the session context and return the AI's response.",
  2254. "responses": {
  2255. "200": {
  2256. "description": "Created message",
  2257. "content": {
  2258. "application/json": {
  2259. "schema": {
  2260. "$ref": "#/components/schemas/AssistantMessage"
  2261. }
  2262. }
  2263. }
  2264. },
  2265. "400": {
  2266. "description": "Bad request",
  2267. "content": {
  2268. "application/json": {
  2269. "schema": {
  2270. "$ref": "#/components/schemas/BadRequestError"
  2271. }
  2272. }
  2273. }
  2274. },
  2275. "404": {
  2276. "description": "Not found",
  2277. "content": {
  2278. "application/json": {
  2279. "schema": {
  2280. "$ref": "#/components/schemas/NotFoundError"
  2281. }
  2282. }
  2283. }
  2284. }
  2285. },
  2286. "requestBody": {
  2287. "content": {
  2288. "application/json": {
  2289. "schema": {
  2290. "type": "object",
  2291. "properties": {
  2292. "agent": {
  2293. "type": "string"
  2294. },
  2295. "model": {
  2296. "type": "object",
  2297. "properties": {
  2298. "providerID": {
  2299. "type": "string"
  2300. },
  2301. "modelID": {
  2302. "type": "string"
  2303. }
  2304. },
  2305. "required": ["providerID", "modelID"]
  2306. },
  2307. "command": {
  2308. "type": "string"
  2309. }
  2310. },
  2311. "required": ["agent", "command"]
  2312. }
  2313. }
  2314. }
  2315. },
  2316. "x-codeSamples": [
  2317. {
  2318. "lang": "js",
  2319. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  2320. }
  2321. ]
  2322. }
  2323. },
  2324. "/session/{sessionID}/revert": {
  2325. "post": {
  2326. "operationId": "session.revert",
  2327. "parameters": [
  2328. {
  2329. "in": "query",
  2330. "name": "directory",
  2331. "schema": {
  2332. "type": "string"
  2333. }
  2334. },
  2335. {
  2336. "in": "path",
  2337. "name": "sessionID",
  2338. "schema": {
  2339. "type": "string"
  2340. },
  2341. "required": true
  2342. }
  2343. ],
  2344. "summary": "Revert message",
  2345. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  2346. "responses": {
  2347. "200": {
  2348. "description": "Updated session",
  2349. "content": {
  2350. "application/json": {
  2351. "schema": {
  2352. "$ref": "#/components/schemas/Session"
  2353. }
  2354. }
  2355. }
  2356. },
  2357. "400": {
  2358. "description": "Bad request",
  2359. "content": {
  2360. "application/json": {
  2361. "schema": {
  2362. "$ref": "#/components/schemas/BadRequestError"
  2363. }
  2364. }
  2365. }
  2366. },
  2367. "404": {
  2368. "description": "Not found",
  2369. "content": {
  2370. "application/json": {
  2371. "schema": {
  2372. "$ref": "#/components/schemas/NotFoundError"
  2373. }
  2374. }
  2375. }
  2376. }
  2377. },
  2378. "requestBody": {
  2379. "content": {
  2380. "application/json": {
  2381. "schema": {
  2382. "type": "object",
  2383. "properties": {
  2384. "messageID": {
  2385. "type": "string",
  2386. "pattern": "^msg.*"
  2387. },
  2388. "partID": {
  2389. "type": "string",
  2390. "pattern": "^prt.*"
  2391. }
  2392. },
  2393. "required": ["messageID"]
  2394. }
  2395. }
  2396. }
  2397. },
  2398. "x-codeSamples": [
  2399. {
  2400. "lang": "js",
  2401. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  2402. }
  2403. ]
  2404. }
  2405. },
  2406. "/session/{sessionID}/unrevert": {
  2407. "post": {
  2408. "operationId": "session.unrevert",
  2409. "parameters": [
  2410. {
  2411. "in": "query",
  2412. "name": "directory",
  2413. "schema": {
  2414. "type": "string"
  2415. }
  2416. },
  2417. {
  2418. "in": "path",
  2419. "name": "sessionID",
  2420. "schema": {
  2421. "type": "string"
  2422. },
  2423. "required": true
  2424. }
  2425. ],
  2426. "summary": "Restore reverted messages",
  2427. "description": "Restore all previously reverted messages in a session.",
  2428. "responses": {
  2429. "200": {
  2430. "description": "Updated session",
  2431. "content": {
  2432. "application/json": {
  2433. "schema": {
  2434. "$ref": "#/components/schemas/Session"
  2435. }
  2436. }
  2437. }
  2438. },
  2439. "400": {
  2440. "description": "Bad request",
  2441. "content": {
  2442. "application/json": {
  2443. "schema": {
  2444. "$ref": "#/components/schemas/BadRequestError"
  2445. }
  2446. }
  2447. }
  2448. },
  2449. "404": {
  2450. "description": "Not found",
  2451. "content": {
  2452. "application/json": {
  2453. "schema": {
  2454. "$ref": "#/components/schemas/NotFoundError"
  2455. }
  2456. }
  2457. }
  2458. }
  2459. },
  2460. "x-codeSamples": [
  2461. {
  2462. "lang": "js",
  2463. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  2464. }
  2465. ]
  2466. }
  2467. },
  2468. "/session/{sessionID}/permissions/{permissionID}": {
  2469. "post": {
  2470. "operationId": "permission.respond",
  2471. "parameters": [
  2472. {
  2473. "in": "query",
  2474. "name": "directory",
  2475. "schema": {
  2476. "type": "string"
  2477. }
  2478. },
  2479. {
  2480. "in": "path",
  2481. "name": "sessionID",
  2482. "schema": {
  2483. "type": "string"
  2484. },
  2485. "required": true
  2486. },
  2487. {
  2488. "in": "path",
  2489. "name": "permissionID",
  2490. "schema": {
  2491. "type": "string"
  2492. },
  2493. "required": true
  2494. }
  2495. ],
  2496. "summary": "Respond to permission",
  2497. "description": "Approve or deny a permission request from the AI assistant.",
  2498. "responses": {
  2499. "200": {
  2500. "description": "Permission processed successfully",
  2501. "content": {
  2502. "application/json": {
  2503. "schema": {
  2504. "type": "boolean"
  2505. }
  2506. }
  2507. }
  2508. },
  2509. "400": {
  2510. "description": "Bad request",
  2511. "content": {
  2512. "application/json": {
  2513. "schema": {
  2514. "$ref": "#/components/schemas/BadRequestError"
  2515. }
  2516. }
  2517. }
  2518. },
  2519. "404": {
  2520. "description": "Not found",
  2521. "content": {
  2522. "application/json": {
  2523. "schema": {
  2524. "$ref": "#/components/schemas/NotFoundError"
  2525. }
  2526. }
  2527. }
  2528. }
  2529. },
  2530. "requestBody": {
  2531. "content": {
  2532. "application/json": {
  2533. "schema": {
  2534. "type": "object",
  2535. "properties": {
  2536. "response": {
  2537. "type": "string",
  2538. "enum": ["once", "always", "reject"]
  2539. }
  2540. },
  2541. "required": ["response"]
  2542. }
  2543. }
  2544. }
  2545. },
  2546. "x-codeSamples": [
  2547. {
  2548. "lang": "js",
  2549. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  2550. }
  2551. ]
  2552. }
  2553. },
  2554. "/command": {
  2555. "get": {
  2556. "operationId": "command.list",
  2557. "parameters": [
  2558. {
  2559. "in": "query",
  2560. "name": "directory",
  2561. "schema": {
  2562. "type": "string"
  2563. }
  2564. }
  2565. ],
  2566. "summary": "List commands",
  2567. "description": "Get a list of all available commands in the OpenCode system.",
  2568. "responses": {
  2569. "200": {
  2570. "description": "List of commands",
  2571. "content": {
  2572. "application/json": {
  2573. "schema": {
  2574. "type": "array",
  2575. "items": {
  2576. "$ref": "#/components/schemas/Command"
  2577. }
  2578. }
  2579. }
  2580. }
  2581. }
  2582. },
  2583. "x-codeSamples": [
  2584. {
  2585. "lang": "js",
  2586. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.command.list({\n ...\n})"
  2587. }
  2588. ]
  2589. }
  2590. },
  2591. "/config/providers": {
  2592. "get": {
  2593. "operationId": "config.providers",
  2594. "parameters": [
  2595. {
  2596. "in": "query",
  2597. "name": "directory",
  2598. "schema": {
  2599. "type": "string"
  2600. }
  2601. }
  2602. ],
  2603. "summary": "List config providers",
  2604. "description": "Get a list of all configured AI providers and their default models.",
  2605. "responses": {
  2606. "200": {
  2607. "description": "List of providers",
  2608. "content": {
  2609. "application/json": {
  2610. "schema": {
  2611. "type": "object",
  2612. "properties": {
  2613. "providers": {
  2614. "type": "array",
  2615. "items": {
  2616. "$ref": "#/components/schemas/Provider"
  2617. }
  2618. },
  2619. "default": {
  2620. "type": "object",
  2621. "propertyNames": {
  2622. "type": "string"
  2623. },
  2624. "additionalProperties": {
  2625. "type": "string"
  2626. }
  2627. }
  2628. },
  2629. "required": ["providers", "default"]
  2630. }
  2631. }
  2632. }
  2633. }
  2634. },
  2635. "x-codeSamples": [
  2636. {
  2637. "lang": "js",
  2638. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.providers({\n ...\n})"
  2639. }
  2640. ]
  2641. }
  2642. },
  2643. "/provider": {
  2644. "get": {
  2645. "operationId": "provider.list",
  2646. "parameters": [
  2647. {
  2648. "in": "query",
  2649. "name": "directory",
  2650. "schema": {
  2651. "type": "string"
  2652. }
  2653. }
  2654. ],
  2655. "summary": "List providers",
  2656. "description": "Get a list of all available AI providers, including both available and connected ones.",
  2657. "responses": {
  2658. "200": {
  2659. "description": "List of providers",
  2660. "content": {
  2661. "application/json": {
  2662. "schema": {
  2663. "type": "object",
  2664. "properties": {
  2665. "all": {
  2666. "type": "array",
  2667. "items": {
  2668. "type": "object",
  2669. "properties": {
  2670. "api": {
  2671. "type": "string"
  2672. },
  2673. "name": {
  2674. "type": "string"
  2675. },
  2676. "env": {
  2677. "type": "array",
  2678. "items": {
  2679. "type": "string"
  2680. }
  2681. },
  2682. "id": {
  2683. "type": "string"
  2684. },
  2685. "npm": {
  2686. "type": "string"
  2687. },
  2688. "models": {
  2689. "type": "object",
  2690. "propertyNames": {
  2691. "type": "string"
  2692. },
  2693. "additionalProperties": {
  2694. "type": "object",
  2695. "properties": {
  2696. "id": {
  2697. "type": "string"
  2698. },
  2699. "name": {
  2700. "type": "string"
  2701. },
  2702. "release_date": {
  2703. "type": "string"
  2704. },
  2705. "attachment": {
  2706. "type": "boolean"
  2707. },
  2708. "reasoning": {
  2709. "type": "boolean"
  2710. },
  2711. "temperature": {
  2712. "type": "boolean"
  2713. },
  2714. "tool_call": {
  2715. "type": "boolean"
  2716. },
  2717. "cost": {
  2718. "type": "object",
  2719. "properties": {
  2720. "input": {
  2721. "type": "number"
  2722. },
  2723. "output": {
  2724. "type": "number"
  2725. },
  2726. "cache_read": {
  2727. "type": "number"
  2728. },
  2729. "cache_write": {
  2730. "type": "number"
  2731. },
  2732. "context_over_200k": {
  2733. "type": "object",
  2734. "properties": {
  2735. "input": {
  2736. "type": "number"
  2737. },
  2738. "output": {
  2739. "type": "number"
  2740. },
  2741. "cache_read": {
  2742. "type": "number"
  2743. },
  2744. "cache_write": {
  2745. "type": "number"
  2746. }
  2747. },
  2748. "required": ["input", "output"]
  2749. }
  2750. },
  2751. "required": ["input", "output"]
  2752. },
  2753. "limit": {
  2754. "type": "object",
  2755. "properties": {
  2756. "context": {
  2757. "type": "number"
  2758. },
  2759. "output": {
  2760. "type": "number"
  2761. }
  2762. },
  2763. "required": ["context", "output"]
  2764. },
  2765. "modalities": {
  2766. "type": "object",
  2767. "properties": {
  2768. "input": {
  2769. "type": "array",
  2770. "items": {
  2771. "type": "string",
  2772. "enum": ["text", "audio", "image", "video", "pdf"]
  2773. }
  2774. },
  2775. "output": {
  2776. "type": "array",
  2777. "items": {
  2778. "type": "string",
  2779. "enum": ["text", "audio", "image", "video", "pdf"]
  2780. }
  2781. }
  2782. },
  2783. "required": ["input", "output"]
  2784. },
  2785. "experimental": {
  2786. "type": "boolean"
  2787. },
  2788. "status": {
  2789. "type": "string",
  2790. "enum": ["alpha", "beta", "deprecated"]
  2791. },
  2792. "options": {
  2793. "type": "object",
  2794. "propertyNames": {
  2795. "type": "string"
  2796. },
  2797. "additionalProperties": {}
  2798. },
  2799. "headers": {
  2800. "type": "object",
  2801. "propertyNames": {
  2802. "type": "string"
  2803. },
  2804. "additionalProperties": {
  2805. "type": "string"
  2806. }
  2807. },
  2808. "provider": {
  2809. "type": "object",
  2810. "properties": {
  2811. "npm": {
  2812. "type": "string"
  2813. }
  2814. },
  2815. "required": ["npm"]
  2816. }
  2817. },
  2818. "required": [
  2819. "id",
  2820. "name",
  2821. "release_date",
  2822. "attachment",
  2823. "reasoning",
  2824. "temperature",
  2825. "tool_call",
  2826. "limit",
  2827. "options"
  2828. ]
  2829. }
  2830. }
  2831. },
  2832. "required": ["name", "env", "id", "models"]
  2833. }
  2834. },
  2835. "default": {
  2836. "type": "object",
  2837. "propertyNames": {
  2838. "type": "string"
  2839. },
  2840. "additionalProperties": {
  2841. "type": "string"
  2842. }
  2843. },
  2844. "connected": {
  2845. "type": "array",
  2846. "items": {
  2847. "type": "string"
  2848. }
  2849. }
  2850. },
  2851. "required": ["all", "default", "connected"]
  2852. }
  2853. }
  2854. }
  2855. }
  2856. },
  2857. "x-codeSamples": [
  2858. {
  2859. "lang": "js",
  2860. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  2861. }
  2862. ]
  2863. }
  2864. },
  2865. "/provider/auth": {
  2866. "get": {
  2867. "operationId": "provider.auth",
  2868. "parameters": [
  2869. {
  2870. "in": "query",
  2871. "name": "directory",
  2872. "schema": {
  2873. "type": "string"
  2874. }
  2875. }
  2876. ],
  2877. "summary": "Get provider auth methods",
  2878. "description": "Retrieve available authentication methods for all AI providers.",
  2879. "responses": {
  2880. "200": {
  2881. "description": "Provider auth methods",
  2882. "content": {
  2883. "application/json": {
  2884. "schema": {
  2885. "type": "object",
  2886. "propertyNames": {
  2887. "type": "string"
  2888. },
  2889. "additionalProperties": {
  2890. "type": "array",
  2891. "items": {
  2892. "$ref": "#/components/schemas/ProviderAuthMethod"
  2893. }
  2894. }
  2895. }
  2896. }
  2897. }
  2898. }
  2899. },
  2900. "x-codeSamples": [
  2901. {
  2902. "lang": "js",
  2903. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  2904. }
  2905. ]
  2906. }
  2907. },
  2908. "/provider/{providerID}/oauth/authorize": {
  2909. "post": {
  2910. "operationId": "provider.oauth.authorize",
  2911. "parameters": [
  2912. {
  2913. "in": "query",
  2914. "name": "directory",
  2915. "schema": {
  2916. "type": "string"
  2917. }
  2918. },
  2919. {
  2920. "in": "path",
  2921. "name": "providerID",
  2922. "schema": {
  2923. "type": "string"
  2924. },
  2925. "required": true,
  2926. "description": "Provider ID"
  2927. }
  2928. ],
  2929. "summary": "OAuth authorize",
  2930. "description": "Initiate OAuth authorization for a specific AI provider to get an authorization URL.",
  2931. "responses": {
  2932. "200": {
  2933. "description": "Authorization URL and method",
  2934. "content": {
  2935. "application/json": {
  2936. "schema": {
  2937. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  2938. }
  2939. }
  2940. }
  2941. },
  2942. "400": {
  2943. "description": "Bad request",
  2944. "content": {
  2945. "application/json": {
  2946. "schema": {
  2947. "$ref": "#/components/schemas/BadRequestError"
  2948. }
  2949. }
  2950. }
  2951. }
  2952. },
  2953. "requestBody": {
  2954. "content": {
  2955. "application/json": {
  2956. "schema": {
  2957. "type": "object",
  2958. "properties": {
  2959. "method": {
  2960. "description": "Auth method index",
  2961. "type": "number"
  2962. }
  2963. },
  2964. "required": ["method"]
  2965. }
  2966. }
  2967. }
  2968. },
  2969. "x-codeSamples": [
  2970. {
  2971. "lang": "js",
  2972. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  2973. }
  2974. ]
  2975. }
  2976. },
  2977. "/provider/{providerID}/oauth/callback": {
  2978. "post": {
  2979. "operationId": "provider.oauth.callback",
  2980. "parameters": [
  2981. {
  2982. "in": "query",
  2983. "name": "directory",
  2984. "schema": {
  2985. "type": "string"
  2986. }
  2987. },
  2988. {
  2989. "in": "path",
  2990. "name": "providerID",
  2991. "schema": {
  2992. "type": "string"
  2993. },
  2994. "required": true,
  2995. "description": "Provider ID"
  2996. }
  2997. ],
  2998. "summary": "OAuth callback",
  2999. "description": "Handle the OAuth callback from a provider after user authorization.",
  3000. "responses": {
  3001. "200": {
  3002. "description": "OAuth callback processed successfully",
  3003. "content": {
  3004. "application/json": {
  3005. "schema": {
  3006. "type": "boolean"
  3007. }
  3008. }
  3009. }
  3010. },
  3011. "400": {
  3012. "description": "Bad request",
  3013. "content": {
  3014. "application/json": {
  3015. "schema": {
  3016. "$ref": "#/components/schemas/BadRequestError"
  3017. }
  3018. }
  3019. }
  3020. }
  3021. },
  3022. "requestBody": {
  3023. "content": {
  3024. "application/json": {
  3025. "schema": {
  3026. "type": "object",
  3027. "properties": {
  3028. "method": {
  3029. "description": "Auth method index",
  3030. "type": "number"
  3031. },
  3032. "code": {
  3033. "description": "OAuth authorization code",
  3034. "type": "string"
  3035. }
  3036. },
  3037. "required": ["method"]
  3038. }
  3039. }
  3040. }
  3041. },
  3042. "x-codeSamples": [
  3043. {
  3044. "lang": "js",
  3045. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  3046. }
  3047. ]
  3048. }
  3049. },
  3050. "/find": {
  3051. "get": {
  3052. "operationId": "find.text",
  3053. "parameters": [
  3054. {
  3055. "in": "query",
  3056. "name": "directory",
  3057. "schema": {
  3058. "type": "string"
  3059. }
  3060. },
  3061. {
  3062. "in": "query",
  3063. "name": "pattern",
  3064. "schema": {
  3065. "type": "string"
  3066. },
  3067. "required": true
  3068. }
  3069. ],
  3070. "summary": "Find text",
  3071. "description": "Search for text patterns across files in the project using ripgrep.",
  3072. "responses": {
  3073. "200": {
  3074. "description": "Matches",
  3075. "content": {
  3076. "application/json": {
  3077. "schema": {
  3078. "type": "array",
  3079. "items": {
  3080. "type": "object",
  3081. "properties": {
  3082. "path": {
  3083. "type": "object",
  3084. "properties": {
  3085. "text": {
  3086. "type": "string"
  3087. }
  3088. },
  3089. "required": ["text"]
  3090. },
  3091. "lines": {
  3092. "type": "object",
  3093. "properties": {
  3094. "text": {
  3095. "type": "string"
  3096. }
  3097. },
  3098. "required": ["text"]
  3099. },
  3100. "line_number": {
  3101. "type": "number"
  3102. },
  3103. "absolute_offset": {
  3104. "type": "number"
  3105. },
  3106. "submatches": {
  3107. "type": "array",
  3108. "items": {
  3109. "type": "object",
  3110. "properties": {
  3111. "match": {
  3112. "type": "object",
  3113. "properties": {
  3114. "text": {
  3115. "type": "string"
  3116. }
  3117. },
  3118. "required": ["text"]
  3119. },
  3120. "start": {
  3121. "type": "number"
  3122. },
  3123. "end": {
  3124. "type": "number"
  3125. }
  3126. },
  3127. "required": ["match", "start", "end"]
  3128. }
  3129. }
  3130. },
  3131. "required": ["path", "lines", "line_number", "absolute_offset", "submatches"]
  3132. }
  3133. }
  3134. }
  3135. }
  3136. }
  3137. },
  3138. "x-codeSamples": [
  3139. {
  3140. "lang": "js",
  3141. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.text({\n ...\n})"
  3142. }
  3143. ]
  3144. }
  3145. },
  3146. "/find/file": {
  3147. "get": {
  3148. "operationId": "find.files",
  3149. "parameters": [
  3150. {
  3151. "in": "query",
  3152. "name": "directory",
  3153. "schema": {
  3154. "type": "string"
  3155. }
  3156. },
  3157. {
  3158. "in": "query",
  3159. "name": "query",
  3160. "schema": {
  3161. "type": "string"
  3162. },
  3163. "required": true
  3164. },
  3165. {
  3166. "in": "query",
  3167. "name": "dirs",
  3168. "schema": {
  3169. "type": "string",
  3170. "enum": ["true", "false"]
  3171. }
  3172. }
  3173. ],
  3174. "summary": "Find files",
  3175. "description": "Search for files by name or pattern in the project directory.",
  3176. "responses": {
  3177. "200": {
  3178. "description": "File paths",
  3179. "content": {
  3180. "application/json": {
  3181. "schema": {
  3182. "type": "array",
  3183. "items": {
  3184. "type": "string"
  3185. }
  3186. }
  3187. }
  3188. }
  3189. }
  3190. },
  3191. "x-codeSamples": [
  3192. {
  3193. "lang": "js",
  3194. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.files({\n ...\n})"
  3195. }
  3196. ]
  3197. }
  3198. },
  3199. "/find/symbol": {
  3200. "get": {
  3201. "operationId": "find.symbols",
  3202. "parameters": [
  3203. {
  3204. "in": "query",
  3205. "name": "directory",
  3206. "schema": {
  3207. "type": "string"
  3208. }
  3209. },
  3210. {
  3211. "in": "query",
  3212. "name": "query",
  3213. "schema": {
  3214. "type": "string"
  3215. },
  3216. "required": true
  3217. }
  3218. ],
  3219. "summary": "Find symbols",
  3220. "description": "Search for workspace symbols like functions, classes, and variables using LSP.",
  3221. "responses": {
  3222. "200": {
  3223. "description": "Symbols",
  3224. "content": {
  3225. "application/json": {
  3226. "schema": {
  3227. "type": "array",
  3228. "items": {
  3229. "$ref": "#/components/schemas/Symbol"
  3230. }
  3231. }
  3232. }
  3233. }
  3234. }
  3235. },
  3236. "x-codeSamples": [
  3237. {
  3238. "lang": "js",
  3239. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.symbols({\n ...\n})"
  3240. }
  3241. ]
  3242. }
  3243. },
  3244. "/file": {
  3245. "get": {
  3246. "operationId": "file.list",
  3247. "parameters": [
  3248. {
  3249. "in": "query",
  3250. "name": "directory",
  3251. "schema": {
  3252. "type": "string"
  3253. }
  3254. },
  3255. {
  3256. "in": "query",
  3257. "name": "path",
  3258. "schema": {
  3259. "type": "string"
  3260. },
  3261. "required": true
  3262. }
  3263. ],
  3264. "summary": "List files",
  3265. "description": "List files and directories in a specified path.",
  3266. "responses": {
  3267. "200": {
  3268. "description": "Files and directories",
  3269. "content": {
  3270. "application/json": {
  3271. "schema": {
  3272. "type": "array",
  3273. "items": {
  3274. "$ref": "#/components/schemas/FileNode"
  3275. }
  3276. }
  3277. }
  3278. }
  3279. }
  3280. },
  3281. "x-codeSamples": [
  3282. {
  3283. "lang": "js",
  3284. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.list({\n ...\n})"
  3285. }
  3286. ]
  3287. }
  3288. },
  3289. "/file/content": {
  3290. "get": {
  3291. "operationId": "file.read",
  3292. "parameters": [
  3293. {
  3294. "in": "query",
  3295. "name": "directory",
  3296. "schema": {
  3297. "type": "string"
  3298. }
  3299. },
  3300. {
  3301. "in": "query",
  3302. "name": "path",
  3303. "schema": {
  3304. "type": "string"
  3305. },
  3306. "required": true
  3307. }
  3308. ],
  3309. "summary": "Read file",
  3310. "description": "Read the content of a specified file.",
  3311. "responses": {
  3312. "200": {
  3313. "description": "File content",
  3314. "content": {
  3315. "application/json": {
  3316. "schema": {
  3317. "$ref": "#/components/schemas/FileContent"
  3318. }
  3319. }
  3320. }
  3321. }
  3322. },
  3323. "x-codeSamples": [
  3324. {
  3325. "lang": "js",
  3326. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.read({\n ...\n})"
  3327. }
  3328. ]
  3329. }
  3330. },
  3331. "/file/status": {
  3332. "get": {
  3333. "operationId": "file.status",
  3334. "parameters": [
  3335. {
  3336. "in": "query",
  3337. "name": "directory",
  3338. "schema": {
  3339. "type": "string"
  3340. }
  3341. }
  3342. ],
  3343. "summary": "Get file status",
  3344. "description": "Get the git status of all files in the project.",
  3345. "responses": {
  3346. "200": {
  3347. "description": "File status",
  3348. "content": {
  3349. "application/json": {
  3350. "schema": {
  3351. "type": "array",
  3352. "items": {
  3353. "$ref": "#/components/schemas/File"
  3354. }
  3355. }
  3356. }
  3357. }
  3358. }
  3359. },
  3360. "x-codeSamples": [
  3361. {
  3362. "lang": "js",
  3363. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.status({\n ...\n})"
  3364. }
  3365. ]
  3366. }
  3367. },
  3368. "/log": {
  3369. "post": {
  3370. "operationId": "app.log",
  3371. "parameters": [
  3372. {
  3373. "in": "query",
  3374. "name": "directory",
  3375. "schema": {
  3376. "type": "string"
  3377. }
  3378. }
  3379. ],
  3380. "summary": "Write log",
  3381. "description": "Write a log entry to the server logs with specified level and metadata.",
  3382. "responses": {
  3383. "200": {
  3384. "description": "Log entry written successfully",
  3385. "content": {
  3386. "application/json": {
  3387. "schema": {
  3388. "type": "boolean"
  3389. }
  3390. }
  3391. }
  3392. },
  3393. "400": {
  3394. "description": "Bad request",
  3395. "content": {
  3396. "application/json": {
  3397. "schema": {
  3398. "$ref": "#/components/schemas/BadRequestError"
  3399. }
  3400. }
  3401. }
  3402. }
  3403. },
  3404. "requestBody": {
  3405. "content": {
  3406. "application/json": {
  3407. "schema": {
  3408. "type": "object",
  3409. "properties": {
  3410. "service": {
  3411. "description": "Service name for the log entry",
  3412. "type": "string"
  3413. },
  3414. "level": {
  3415. "description": "Log level",
  3416. "type": "string",
  3417. "enum": ["debug", "info", "error", "warn"]
  3418. },
  3419. "message": {
  3420. "description": "Log message",
  3421. "type": "string"
  3422. },
  3423. "extra": {
  3424. "description": "Additional metadata for the log entry",
  3425. "type": "object",
  3426. "propertyNames": {
  3427. "type": "string"
  3428. },
  3429. "additionalProperties": {}
  3430. }
  3431. },
  3432. "required": ["service", "level", "message"]
  3433. }
  3434. }
  3435. }
  3436. },
  3437. "x-codeSamples": [
  3438. {
  3439. "lang": "js",
  3440. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.log({\n ...\n})"
  3441. }
  3442. ]
  3443. }
  3444. },
  3445. "/agent": {
  3446. "get": {
  3447. "operationId": "app.agents",
  3448. "parameters": [
  3449. {
  3450. "in": "query",
  3451. "name": "directory",
  3452. "schema": {
  3453. "type": "string"
  3454. }
  3455. }
  3456. ],
  3457. "summary": "List agents",
  3458. "description": "Get a list of all available AI agents in the OpenCode system.",
  3459. "responses": {
  3460. "200": {
  3461. "description": "List of agents",
  3462. "content": {
  3463. "application/json": {
  3464. "schema": {
  3465. "type": "array",
  3466. "items": {
  3467. "$ref": "#/components/schemas/Agent"
  3468. }
  3469. }
  3470. }
  3471. }
  3472. }
  3473. },
  3474. "x-codeSamples": [
  3475. {
  3476. "lang": "js",
  3477. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.agents({\n ...\n})"
  3478. }
  3479. ]
  3480. }
  3481. },
  3482. "/mcp": {
  3483. "get": {
  3484. "operationId": "mcp.status",
  3485. "parameters": [
  3486. {
  3487. "in": "query",
  3488. "name": "directory",
  3489. "schema": {
  3490. "type": "string"
  3491. }
  3492. }
  3493. ],
  3494. "summary": "Get MCP status",
  3495. "description": "Get the status of all Model Context Protocol (MCP) servers.",
  3496. "responses": {
  3497. "200": {
  3498. "description": "MCP server status",
  3499. "content": {
  3500. "application/json": {
  3501. "schema": {
  3502. "type": "object",
  3503. "propertyNames": {
  3504. "type": "string"
  3505. },
  3506. "additionalProperties": {
  3507. "$ref": "#/components/schemas/MCPStatus"
  3508. }
  3509. }
  3510. }
  3511. }
  3512. }
  3513. },
  3514. "x-codeSamples": [
  3515. {
  3516. "lang": "js",
  3517. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
  3518. }
  3519. ]
  3520. },
  3521. "post": {
  3522. "operationId": "mcp.add",
  3523. "parameters": [
  3524. {
  3525. "in": "query",
  3526. "name": "directory",
  3527. "schema": {
  3528. "type": "string"
  3529. }
  3530. }
  3531. ],
  3532. "summary": "Add MCP server",
  3533. "description": "Dynamically add a new Model Context Protocol (MCP) server to the system.",
  3534. "responses": {
  3535. "200": {
  3536. "description": "MCP server added successfully",
  3537. "content": {
  3538. "application/json": {
  3539. "schema": {
  3540. "type": "object",
  3541. "propertyNames": {
  3542. "type": "string"
  3543. },
  3544. "additionalProperties": {
  3545. "$ref": "#/components/schemas/MCPStatus"
  3546. }
  3547. }
  3548. }
  3549. }
  3550. },
  3551. "400": {
  3552. "description": "Bad request",
  3553. "content": {
  3554. "application/json": {
  3555. "schema": {
  3556. "$ref": "#/components/schemas/BadRequestError"
  3557. }
  3558. }
  3559. }
  3560. }
  3561. },
  3562. "requestBody": {
  3563. "content": {
  3564. "application/json": {
  3565. "schema": {
  3566. "type": "object",
  3567. "properties": {
  3568. "name": {
  3569. "type": "string"
  3570. },
  3571. "config": {
  3572. "anyOf": [
  3573. {
  3574. "$ref": "#/components/schemas/McpLocalConfig"
  3575. },
  3576. {
  3577. "$ref": "#/components/schemas/McpRemoteConfig"
  3578. }
  3579. ]
  3580. }
  3581. },
  3582. "required": ["name", "config"]
  3583. }
  3584. }
  3585. }
  3586. },
  3587. "x-codeSamples": [
  3588. {
  3589. "lang": "js",
  3590. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
  3591. }
  3592. ]
  3593. }
  3594. },
  3595. "/mcp/{name}/auth": {
  3596. "post": {
  3597. "operationId": "mcp.auth.start",
  3598. "parameters": [
  3599. {
  3600. "in": "query",
  3601. "name": "directory",
  3602. "schema": {
  3603. "type": "string"
  3604. }
  3605. },
  3606. {
  3607. "schema": {
  3608. "type": "string"
  3609. },
  3610. "in": "path",
  3611. "name": "name",
  3612. "required": true
  3613. }
  3614. ],
  3615. "summary": "Start MCP OAuth",
  3616. "description": "Start OAuth authentication flow for a Model Context Protocol (MCP) server.",
  3617. "responses": {
  3618. "200": {
  3619. "description": "OAuth flow started",
  3620. "content": {
  3621. "application/json": {
  3622. "schema": {
  3623. "type": "object",
  3624. "properties": {
  3625. "authorizationUrl": {
  3626. "description": "URL to open in browser for authorization",
  3627. "type": "string"
  3628. }
  3629. },
  3630. "required": ["authorizationUrl"]
  3631. }
  3632. }
  3633. }
  3634. },
  3635. "400": {
  3636. "description": "Bad request",
  3637. "content": {
  3638. "application/json": {
  3639. "schema": {
  3640. "$ref": "#/components/schemas/BadRequestError"
  3641. }
  3642. }
  3643. }
  3644. },
  3645. "404": {
  3646. "description": "Not found",
  3647. "content": {
  3648. "application/json": {
  3649. "schema": {
  3650. "$ref": "#/components/schemas/NotFoundError"
  3651. }
  3652. }
  3653. }
  3654. }
  3655. },
  3656. "x-codeSamples": [
  3657. {
  3658. "lang": "js",
  3659. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
  3660. }
  3661. ]
  3662. },
  3663. "delete": {
  3664. "operationId": "mcp.auth.remove",
  3665. "parameters": [
  3666. {
  3667. "in": "query",
  3668. "name": "directory",
  3669. "schema": {
  3670. "type": "string"
  3671. }
  3672. },
  3673. {
  3674. "schema": {
  3675. "type": "string"
  3676. },
  3677. "in": "path",
  3678. "name": "name",
  3679. "required": true
  3680. }
  3681. ],
  3682. "summary": "Remove MCP OAuth",
  3683. "description": "Remove OAuth credentials for an MCP server",
  3684. "responses": {
  3685. "200": {
  3686. "description": "OAuth credentials removed",
  3687. "content": {
  3688. "application/json": {
  3689. "schema": {
  3690. "type": "object",
  3691. "properties": {
  3692. "success": {
  3693. "type": "boolean",
  3694. "const": true
  3695. }
  3696. },
  3697. "required": ["success"]
  3698. }
  3699. }
  3700. }
  3701. },
  3702. "404": {
  3703. "description": "Not found",
  3704. "content": {
  3705. "application/json": {
  3706. "schema": {
  3707. "$ref": "#/components/schemas/NotFoundError"
  3708. }
  3709. }
  3710. }
  3711. }
  3712. },
  3713. "x-codeSamples": [
  3714. {
  3715. "lang": "js",
  3716. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
  3717. }
  3718. ]
  3719. }
  3720. },
  3721. "/mcp/{name}/auth/callback": {
  3722. "post": {
  3723. "operationId": "mcp.auth.callback",
  3724. "parameters": [
  3725. {
  3726. "in": "query",
  3727. "name": "directory",
  3728. "schema": {
  3729. "type": "string"
  3730. }
  3731. },
  3732. {
  3733. "schema": {
  3734. "type": "string"
  3735. },
  3736. "in": "path",
  3737. "name": "name",
  3738. "required": true
  3739. }
  3740. ],
  3741. "summary": "Complete MCP OAuth",
  3742. "description": "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.",
  3743. "responses": {
  3744. "200": {
  3745. "description": "OAuth authentication completed",
  3746. "content": {
  3747. "application/json": {
  3748. "schema": {
  3749. "$ref": "#/components/schemas/MCPStatus"
  3750. }
  3751. }
  3752. }
  3753. },
  3754. "400": {
  3755. "description": "Bad request",
  3756. "content": {
  3757. "application/json": {
  3758. "schema": {
  3759. "$ref": "#/components/schemas/BadRequestError"
  3760. }
  3761. }
  3762. }
  3763. },
  3764. "404": {
  3765. "description": "Not found",
  3766. "content": {
  3767. "application/json": {
  3768. "schema": {
  3769. "$ref": "#/components/schemas/NotFoundError"
  3770. }
  3771. }
  3772. }
  3773. }
  3774. },
  3775. "requestBody": {
  3776. "content": {
  3777. "application/json": {
  3778. "schema": {
  3779. "type": "object",
  3780. "properties": {
  3781. "code": {
  3782. "description": "Authorization code from OAuth callback",
  3783. "type": "string"
  3784. }
  3785. },
  3786. "required": ["code"]
  3787. }
  3788. }
  3789. }
  3790. },
  3791. "x-codeSamples": [
  3792. {
  3793. "lang": "js",
  3794. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
  3795. }
  3796. ]
  3797. }
  3798. },
  3799. "/mcp/{name}/auth/authenticate": {
  3800. "post": {
  3801. "operationId": "mcp.auth.authenticate",
  3802. "parameters": [
  3803. {
  3804. "in": "query",
  3805. "name": "directory",
  3806. "schema": {
  3807. "type": "string"
  3808. }
  3809. },
  3810. {
  3811. "schema": {
  3812. "type": "string"
  3813. },
  3814. "in": "path",
  3815. "name": "name",
  3816. "required": true
  3817. }
  3818. ],
  3819. "summary": "Authenticate MCP OAuth",
  3820. "description": "Start OAuth flow and wait for callback (opens browser)",
  3821. "responses": {
  3822. "200": {
  3823. "description": "OAuth authentication completed",
  3824. "content": {
  3825. "application/json": {
  3826. "schema": {
  3827. "$ref": "#/components/schemas/MCPStatus"
  3828. }
  3829. }
  3830. }
  3831. },
  3832. "400": {
  3833. "description": "Bad request",
  3834. "content": {
  3835. "application/json": {
  3836. "schema": {
  3837. "$ref": "#/components/schemas/BadRequestError"
  3838. }
  3839. }
  3840. }
  3841. },
  3842. "404": {
  3843. "description": "Not found",
  3844. "content": {
  3845. "application/json": {
  3846. "schema": {
  3847. "$ref": "#/components/schemas/NotFoundError"
  3848. }
  3849. }
  3850. }
  3851. }
  3852. },
  3853. "x-codeSamples": [
  3854. {
  3855. "lang": "js",
  3856. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
  3857. }
  3858. ]
  3859. }
  3860. },
  3861. "/lsp": {
  3862. "get": {
  3863. "operationId": "lsp.status",
  3864. "parameters": [
  3865. {
  3866. "in": "query",
  3867. "name": "directory",
  3868. "schema": {
  3869. "type": "string"
  3870. }
  3871. }
  3872. ],
  3873. "summary": "Get LSP status",
  3874. "description": "Get LSP server status",
  3875. "responses": {
  3876. "200": {
  3877. "description": "LSP server status",
  3878. "content": {
  3879. "application/json": {
  3880. "schema": {
  3881. "type": "array",
  3882. "items": {
  3883. "$ref": "#/components/schemas/LSPStatus"
  3884. }
  3885. }
  3886. }
  3887. }
  3888. }
  3889. },
  3890. "x-codeSamples": [
  3891. {
  3892. "lang": "js",
  3893. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
  3894. }
  3895. ]
  3896. }
  3897. },
  3898. "/formatter": {
  3899. "get": {
  3900. "operationId": "formatter.status",
  3901. "parameters": [
  3902. {
  3903. "in": "query",
  3904. "name": "directory",
  3905. "schema": {
  3906. "type": "string"
  3907. }
  3908. }
  3909. ],
  3910. "summary": "Get formatter status",
  3911. "description": "Get formatter status",
  3912. "responses": {
  3913. "200": {
  3914. "description": "Formatter status",
  3915. "content": {
  3916. "application/json": {
  3917. "schema": {
  3918. "type": "array",
  3919. "items": {
  3920. "$ref": "#/components/schemas/FormatterStatus"
  3921. }
  3922. }
  3923. }
  3924. }
  3925. }
  3926. },
  3927. "x-codeSamples": [
  3928. {
  3929. "lang": "js",
  3930. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
  3931. }
  3932. ]
  3933. }
  3934. },
  3935. "/tui/append-prompt": {
  3936. "post": {
  3937. "operationId": "tui.appendPrompt",
  3938. "parameters": [
  3939. {
  3940. "in": "query",
  3941. "name": "directory",
  3942. "schema": {
  3943. "type": "string"
  3944. }
  3945. }
  3946. ],
  3947. "summary": "Append TUI prompt",
  3948. "description": "Append prompt to the TUI",
  3949. "responses": {
  3950. "200": {
  3951. "description": "Prompt processed successfully",
  3952. "content": {
  3953. "application/json": {
  3954. "schema": {
  3955. "type": "boolean"
  3956. }
  3957. }
  3958. }
  3959. },
  3960. "400": {
  3961. "description": "Bad request",
  3962. "content": {
  3963. "application/json": {
  3964. "schema": {
  3965. "$ref": "#/components/schemas/BadRequestError"
  3966. }
  3967. }
  3968. }
  3969. }
  3970. },
  3971. "requestBody": {
  3972. "content": {
  3973. "application/json": {
  3974. "schema": {
  3975. "type": "object",
  3976. "properties": {
  3977. "text": {
  3978. "type": "string"
  3979. }
  3980. },
  3981. "required": ["text"]
  3982. }
  3983. }
  3984. }
  3985. },
  3986. "x-codeSamples": [
  3987. {
  3988. "lang": "js",
  3989. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  3990. }
  3991. ]
  3992. }
  3993. },
  3994. "/tui/open-help": {
  3995. "post": {
  3996. "operationId": "tui.openHelp",
  3997. "parameters": [
  3998. {
  3999. "in": "query",
  4000. "name": "directory",
  4001. "schema": {
  4002. "type": "string"
  4003. }
  4004. }
  4005. ],
  4006. "summary": "Open help dialog",
  4007. "description": "Open the help dialog in the TUI to display user assistance information.",
  4008. "responses": {
  4009. "200": {
  4010. "description": "Help dialog opened successfully",
  4011. "content": {
  4012. "application/json": {
  4013. "schema": {
  4014. "type": "boolean"
  4015. }
  4016. }
  4017. }
  4018. }
  4019. },
  4020. "x-codeSamples": [
  4021. {
  4022. "lang": "js",
  4023. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  4024. }
  4025. ]
  4026. }
  4027. },
  4028. "/tui/open-sessions": {
  4029. "post": {
  4030. "operationId": "tui.openSessions",
  4031. "parameters": [
  4032. {
  4033. "in": "query",
  4034. "name": "directory",
  4035. "schema": {
  4036. "type": "string"
  4037. }
  4038. }
  4039. ],
  4040. "summary": "Open sessions dialog",
  4041. "description": "Open the session dialog",
  4042. "responses": {
  4043. "200": {
  4044. "description": "Session dialog opened successfully",
  4045. "content": {
  4046. "application/json": {
  4047. "schema": {
  4048. "type": "boolean"
  4049. }
  4050. }
  4051. }
  4052. }
  4053. },
  4054. "x-codeSamples": [
  4055. {
  4056. "lang": "js",
  4057. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  4058. }
  4059. ]
  4060. }
  4061. },
  4062. "/tui/open-themes": {
  4063. "post": {
  4064. "operationId": "tui.openThemes",
  4065. "parameters": [
  4066. {
  4067. "in": "query",
  4068. "name": "directory",
  4069. "schema": {
  4070. "type": "string"
  4071. }
  4072. }
  4073. ],
  4074. "summary": "Open themes dialog",
  4075. "description": "Open the theme dialog",
  4076. "responses": {
  4077. "200": {
  4078. "description": "Theme dialog opened successfully",
  4079. "content": {
  4080. "application/json": {
  4081. "schema": {
  4082. "type": "boolean"
  4083. }
  4084. }
  4085. }
  4086. }
  4087. },
  4088. "x-codeSamples": [
  4089. {
  4090. "lang": "js",
  4091. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  4092. }
  4093. ]
  4094. }
  4095. },
  4096. "/tui/open-models": {
  4097. "post": {
  4098. "operationId": "tui.openModels",
  4099. "parameters": [
  4100. {
  4101. "in": "query",
  4102. "name": "directory",
  4103. "schema": {
  4104. "type": "string"
  4105. }
  4106. }
  4107. ],
  4108. "summary": "Open models dialog",
  4109. "description": "Open the model dialog",
  4110. "responses": {
  4111. "200": {
  4112. "description": "Model dialog opened successfully",
  4113. "content": {
  4114. "application/json": {
  4115. "schema": {
  4116. "type": "boolean"
  4117. }
  4118. }
  4119. }
  4120. }
  4121. },
  4122. "x-codeSamples": [
  4123. {
  4124. "lang": "js",
  4125. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  4126. }
  4127. ]
  4128. }
  4129. },
  4130. "/tui/submit-prompt": {
  4131. "post": {
  4132. "operationId": "tui.submitPrompt",
  4133. "parameters": [
  4134. {
  4135. "in": "query",
  4136. "name": "directory",
  4137. "schema": {
  4138. "type": "string"
  4139. }
  4140. }
  4141. ],
  4142. "summary": "Submit TUI prompt",
  4143. "description": "Submit the prompt",
  4144. "responses": {
  4145. "200": {
  4146. "description": "Prompt submitted successfully",
  4147. "content": {
  4148. "application/json": {
  4149. "schema": {
  4150. "type": "boolean"
  4151. }
  4152. }
  4153. }
  4154. }
  4155. },
  4156. "x-codeSamples": [
  4157. {
  4158. "lang": "js",
  4159. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  4160. }
  4161. ]
  4162. }
  4163. },
  4164. "/tui/clear-prompt": {
  4165. "post": {
  4166. "operationId": "tui.clearPrompt",
  4167. "parameters": [
  4168. {
  4169. "in": "query",
  4170. "name": "directory",
  4171. "schema": {
  4172. "type": "string"
  4173. }
  4174. }
  4175. ],
  4176. "summary": "Clear TUI prompt",
  4177. "description": "Clear the prompt",
  4178. "responses": {
  4179. "200": {
  4180. "description": "Prompt cleared successfully",
  4181. "content": {
  4182. "application/json": {
  4183. "schema": {
  4184. "type": "boolean"
  4185. }
  4186. }
  4187. }
  4188. }
  4189. },
  4190. "x-codeSamples": [
  4191. {
  4192. "lang": "js",
  4193. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  4194. }
  4195. ]
  4196. }
  4197. },
  4198. "/tui/execute-command": {
  4199. "post": {
  4200. "operationId": "tui.executeCommand",
  4201. "parameters": [
  4202. {
  4203. "in": "query",
  4204. "name": "directory",
  4205. "schema": {
  4206. "type": "string"
  4207. }
  4208. }
  4209. ],
  4210. "summary": "Execute TUI command",
  4211. "description": "Execute a TUI command (e.g. agent_cycle)",
  4212. "responses": {
  4213. "200": {
  4214. "description": "Command executed successfully",
  4215. "content": {
  4216. "application/json": {
  4217. "schema": {
  4218. "type": "boolean"
  4219. }
  4220. }
  4221. }
  4222. },
  4223. "400": {
  4224. "description": "Bad request",
  4225. "content": {
  4226. "application/json": {
  4227. "schema": {
  4228. "$ref": "#/components/schemas/BadRequestError"
  4229. }
  4230. }
  4231. }
  4232. }
  4233. },
  4234. "requestBody": {
  4235. "content": {
  4236. "application/json": {
  4237. "schema": {
  4238. "type": "object",
  4239. "properties": {
  4240. "command": {
  4241. "type": "string"
  4242. }
  4243. },
  4244. "required": ["command"]
  4245. }
  4246. }
  4247. }
  4248. },
  4249. "x-codeSamples": [
  4250. {
  4251. "lang": "js",
  4252. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  4253. }
  4254. ]
  4255. }
  4256. },
  4257. "/tui/show-toast": {
  4258. "post": {
  4259. "operationId": "tui.showToast",
  4260. "parameters": [
  4261. {
  4262. "in": "query",
  4263. "name": "directory",
  4264. "schema": {
  4265. "type": "string"
  4266. }
  4267. }
  4268. ],
  4269. "summary": "Show TUI toast",
  4270. "description": "Show a toast notification in the TUI",
  4271. "responses": {
  4272. "200": {
  4273. "description": "Toast notification shown successfully",
  4274. "content": {
  4275. "application/json": {
  4276. "schema": {
  4277. "type": "boolean"
  4278. }
  4279. }
  4280. }
  4281. }
  4282. },
  4283. "requestBody": {
  4284. "content": {
  4285. "application/json": {
  4286. "schema": {
  4287. "type": "object",
  4288. "properties": {
  4289. "title": {
  4290. "type": "string"
  4291. },
  4292. "message": {
  4293. "type": "string"
  4294. },
  4295. "variant": {
  4296. "type": "string",
  4297. "enum": ["info", "success", "warning", "error"]
  4298. },
  4299. "duration": {
  4300. "description": "Duration in milliseconds",
  4301. "default": 5000,
  4302. "type": "number"
  4303. }
  4304. },
  4305. "required": ["message", "variant"]
  4306. }
  4307. }
  4308. }
  4309. },
  4310. "x-codeSamples": [
  4311. {
  4312. "lang": "js",
  4313. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  4314. }
  4315. ]
  4316. }
  4317. },
  4318. "/tui/publish": {
  4319. "post": {
  4320. "operationId": "tui.publish",
  4321. "parameters": [
  4322. {
  4323. "in": "query",
  4324. "name": "directory",
  4325. "schema": {
  4326. "type": "string"
  4327. }
  4328. }
  4329. ],
  4330. "summary": "Publish TUI event",
  4331. "description": "Publish a TUI event",
  4332. "responses": {
  4333. "200": {
  4334. "description": "Event published successfully",
  4335. "content": {
  4336. "application/json": {
  4337. "schema": {
  4338. "type": "boolean"
  4339. }
  4340. }
  4341. }
  4342. },
  4343. "400": {
  4344. "description": "Bad request",
  4345. "content": {
  4346. "application/json": {
  4347. "schema": {
  4348. "$ref": "#/components/schemas/BadRequestError"
  4349. }
  4350. }
  4351. }
  4352. }
  4353. },
  4354. "requestBody": {
  4355. "content": {
  4356. "application/json": {
  4357. "schema": {
  4358. "anyOf": [
  4359. {
  4360. "$ref": "#/components/schemas/Event.tui.prompt.append"
  4361. },
  4362. {
  4363. "$ref": "#/components/schemas/Event.tui.command.execute"
  4364. },
  4365. {
  4366. "$ref": "#/components/schemas/Event.tui.toast.show"
  4367. }
  4368. ]
  4369. }
  4370. }
  4371. }
  4372. },
  4373. "x-codeSamples": [
  4374. {
  4375. "lang": "js",
  4376. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  4377. }
  4378. ]
  4379. }
  4380. },
  4381. "/tui/control/next": {
  4382. "get": {
  4383. "operationId": "tui.control.next",
  4384. "parameters": [
  4385. {
  4386. "in": "query",
  4387. "name": "directory",
  4388. "schema": {
  4389. "type": "string"
  4390. }
  4391. }
  4392. ],
  4393. "summary": "Get next TUI request",
  4394. "description": "Retrieve the next TUI (Terminal User Interface) request from the queue for processing.",
  4395. "responses": {
  4396. "200": {
  4397. "description": "Next TUI request",
  4398. "content": {
  4399. "application/json": {
  4400. "schema": {
  4401. "type": "object",
  4402. "properties": {
  4403. "path": {
  4404. "type": "string"
  4405. },
  4406. "body": {}
  4407. },
  4408. "required": ["path", "body"]
  4409. }
  4410. }
  4411. }
  4412. }
  4413. },
  4414. "x-codeSamples": [
  4415. {
  4416. "lang": "js",
  4417. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  4418. }
  4419. ]
  4420. }
  4421. },
  4422. "/tui/control/response": {
  4423. "post": {
  4424. "operationId": "tui.control.response",
  4425. "parameters": [
  4426. {
  4427. "in": "query",
  4428. "name": "directory",
  4429. "schema": {
  4430. "type": "string"
  4431. }
  4432. }
  4433. ],
  4434. "summary": "Submit TUI response",
  4435. "description": "Submit a response to the TUI request queue to complete a pending request.",
  4436. "responses": {
  4437. "200": {
  4438. "description": "Response submitted successfully",
  4439. "content": {
  4440. "application/json": {
  4441. "schema": {
  4442. "type": "boolean"
  4443. }
  4444. }
  4445. }
  4446. }
  4447. },
  4448. "requestBody": {
  4449. "content": {
  4450. "application/json": {
  4451. "schema": {}
  4452. }
  4453. }
  4454. },
  4455. "x-codeSamples": [
  4456. {
  4457. "lang": "js",
  4458. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  4459. }
  4460. ]
  4461. }
  4462. },
  4463. "/auth/{providerID}": {
  4464. "put": {
  4465. "operationId": "auth.set",
  4466. "parameters": [
  4467. {
  4468. "in": "query",
  4469. "name": "directory",
  4470. "schema": {
  4471. "type": "string"
  4472. }
  4473. },
  4474. {
  4475. "in": "path",
  4476. "name": "providerID",
  4477. "schema": {
  4478. "type": "string"
  4479. },
  4480. "required": true
  4481. }
  4482. ],
  4483. "summary": "Set auth credentials",
  4484. "description": "Set authentication credentials",
  4485. "responses": {
  4486. "200": {
  4487. "description": "Successfully set authentication credentials",
  4488. "content": {
  4489. "application/json": {
  4490. "schema": {
  4491. "type": "boolean"
  4492. }
  4493. }
  4494. }
  4495. },
  4496. "400": {
  4497. "description": "Bad request",
  4498. "content": {
  4499. "application/json": {
  4500. "schema": {
  4501. "$ref": "#/components/schemas/BadRequestError"
  4502. }
  4503. }
  4504. }
  4505. }
  4506. },
  4507. "requestBody": {
  4508. "content": {
  4509. "application/json": {
  4510. "schema": {
  4511. "$ref": "#/components/schemas/Auth"
  4512. }
  4513. }
  4514. }
  4515. },
  4516. "x-codeSamples": [
  4517. {
  4518. "lang": "js",
  4519. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.set({\n ...\n})"
  4520. }
  4521. ]
  4522. }
  4523. },
  4524. "/event": {
  4525. "get": {
  4526. "operationId": "event.subscribe",
  4527. "parameters": [
  4528. {
  4529. "in": "query",
  4530. "name": "directory",
  4531. "schema": {
  4532. "type": "string"
  4533. }
  4534. }
  4535. ],
  4536. "summary": "Subscribe to events",
  4537. "description": "Get events",
  4538. "responses": {
  4539. "200": {
  4540. "description": "Event stream",
  4541. "content": {
  4542. "text/event-stream": {
  4543. "schema": {
  4544. "$ref": "#/components/schemas/Event"
  4545. }
  4546. }
  4547. }
  4548. }
  4549. },
  4550. "x-codeSamples": [
  4551. {
  4552. "lang": "js",
  4553. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.event.subscribe({\n ...\n})"
  4554. }
  4555. ]
  4556. }
  4557. }
  4558. },
  4559. "components": {
  4560. "schemas": {
  4561. "Event.server.instance.disposed": {
  4562. "type": "object",
  4563. "properties": {
  4564. "type": {
  4565. "type": "string",
  4566. "const": "server.instance.disposed"
  4567. },
  4568. "properties": {
  4569. "type": "object",
  4570. "properties": {
  4571. "directory": {
  4572. "type": "string"
  4573. }
  4574. },
  4575. "required": ["directory"]
  4576. }
  4577. },
  4578. "required": ["type", "properties"]
  4579. },
  4580. "Event.installation.updated": {
  4581. "type": "object",
  4582. "properties": {
  4583. "type": {
  4584. "type": "string",
  4585. "const": "installation.updated"
  4586. },
  4587. "properties": {
  4588. "type": "object",
  4589. "properties": {
  4590. "version": {
  4591. "type": "string"
  4592. }
  4593. },
  4594. "required": ["version"]
  4595. }
  4596. },
  4597. "required": ["type", "properties"]
  4598. },
  4599. "Event.installation.update-available": {
  4600. "type": "object",
  4601. "properties": {
  4602. "type": {
  4603. "type": "string",
  4604. "const": "installation.update-available"
  4605. },
  4606. "properties": {
  4607. "type": "object",
  4608. "properties": {
  4609. "version": {
  4610. "type": "string"
  4611. }
  4612. },
  4613. "required": ["version"]
  4614. }
  4615. },
  4616. "required": ["type", "properties"]
  4617. },
  4618. "Event.lsp.client.diagnostics": {
  4619. "type": "object",
  4620. "properties": {
  4621. "type": {
  4622. "type": "string",
  4623. "const": "lsp.client.diagnostics"
  4624. },
  4625. "properties": {
  4626. "type": "object",
  4627. "properties": {
  4628. "serverID": {
  4629. "type": "string"
  4630. },
  4631. "path": {
  4632. "type": "string"
  4633. }
  4634. },
  4635. "required": ["serverID", "path"]
  4636. }
  4637. },
  4638. "required": ["type", "properties"]
  4639. },
  4640. "Event.lsp.updated": {
  4641. "type": "object",
  4642. "properties": {
  4643. "type": {
  4644. "type": "string",
  4645. "const": "lsp.updated"
  4646. },
  4647. "properties": {
  4648. "type": "object",
  4649. "properties": {}
  4650. }
  4651. },
  4652. "required": ["type", "properties"]
  4653. },
  4654. "FileDiff": {
  4655. "type": "object",
  4656. "properties": {
  4657. "file": {
  4658. "type": "string"
  4659. },
  4660. "before": {
  4661. "type": "string"
  4662. },
  4663. "after": {
  4664. "type": "string"
  4665. },
  4666. "additions": {
  4667. "type": "number"
  4668. },
  4669. "deletions": {
  4670. "type": "number"
  4671. }
  4672. },
  4673. "required": ["file", "before", "after", "additions", "deletions"]
  4674. },
  4675. "UserMessage": {
  4676. "type": "object",
  4677. "properties": {
  4678. "id": {
  4679. "type": "string"
  4680. },
  4681. "sessionID": {
  4682. "type": "string"
  4683. },
  4684. "role": {
  4685. "type": "string",
  4686. "const": "user"
  4687. },
  4688. "time": {
  4689. "type": "object",
  4690. "properties": {
  4691. "created": {
  4692. "type": "number"
  4693. }
  4694. },
  4695. "required": ["created"]
  4696. },
  4697. "summary": {
  4698. "type": "object",
  4699. "properties": {
  4700. "title": {
  4701. "type": "string"
  4702. },
  4703. "body": {
  4704. "type": "string"
  4705. },
  4706. "diffs": {
  4707. "type": "array",
  4708. "items": {
  4709. "$ref": "#/components/schemas/FileDiff"
  4710. }
  4711. }
  4712. },
  4713. "required": ["diffs"]
  4714. },
  4715. "agent": {
  4716. "type": "string"
  4717. },
  4718. "model": {
  4719. "type": "object",
  4720. "properties": {
  4721. "providerID": {
  4722. "type": "string"
  4723. },
  4724. "modelID": {
  4725. "type": "string"
  4726. }
  4727. },
  4728. "required": ["providerID", "modelID"]
  4729. },
  4730. "system": {
  4731. "type": "string"
  4732. },
  4733. "tools": {
  4734. "type": "object",
  4735. "propertyNames": {
  4736. "type": "string"
  4737. },
  4738. "additionalProperties": {
  4739. "type": "boolean"
  4740. }
  4741. }
  4742. },
  4743. "required": ["id", "sessionID", "role", "time", "agent", "model"]
  4744. },
  4745. "ProviderAuthError": {
  4746. "type": "object",
  4747. "properties": {
  4748. "name": {
  4749. "type": "string",
  4750. "const": "ProviderAuthError"
  4751. },
  4752. "data": {
  4753. "type": "object",
  4754. "properties": {
  4755. "providerID": {
  4756. "type": "string"
  4757. },
  4758. "message": {
  4759. "type": "string"
  4760. }
  4761. },
  4762. "required": ["providerID", "message"]
  4763. }
  4764. },
  4765. "required": ["name", "data"]
  4766. },
  4767. "UnknownError": {
  4768. "type": "object",
  4769. "properties": {
  4770. "name": {
  4771. "type": "string",
  4772. "const": "UnknownError"
  4773. },
  4774. "data": {
  4775. "type": "object",
  4776. "properties": {
  4777. "message": {
  4778. "type": "string"
  4779. }
  4780. },
  4781. "required": ["message"]
  4782. }
  4783. },
  4784. "required": ["name", "data"]
  4785. },
  4786. "MessageOutputLengthError": {
  4787. "type": "object",
  4788. "properties": {
  4789. "name": {
  4790. "type": "string",
  4791. "const": "MessageOutputLengthError"
  4792. },
  4793. "data": {
  4794. "type": "object",
  4795. "properties": {}
  4796. }
  4797. },
  4798. "required": ["name", "data"]
  4799. },
  4800. "MessageAbortedError": {
  4801. "type": "object",
  4802. "properties": {
  4803. "name": {
  4804. "type": "string",
  4805. "const": "MessageAbortedError"
  4806. },
  4807. "data": {
  4808. "type": "object",
  4809. "properties": {
  4810. "message": {
  4811. "type": "string"
  4812. }
  4813. },
  4814. "required": ["message"]
  4815. }
  4816. },
  4817. "required": ["name", "data"]
  4818. },
  4819. "APIError": {
  4820. "type": "object",
  4821. "properties": {
  4822. "name": {
  4823. "type": "string",
  4824. "const": "APIError"
  4825. },
  4826. "data": {
  4827. "type": "object",
  4828. "properties": {
  4829. "message": {
  4830. "type": "string"
  4831. },
  4832. "statusCode": {
  4833. "type": "number"
  4834. },
  4835. "isRetryable": {
  4836. "type": "boolean"
  4837. },
  4838. "responseHeaders": {
  4839. "type": "object",
  4840. "propertyNames": {
  4841. "type": "string"
  4842. },
  4843. "additionalProperties": {
  4844. "type": "string"
  4845. }
  4846. },
  4847. "responseBody": {
  4848. "type": "string"
  4849. }
  4850. },
  4851. "required": ["message", "isRetryable"]
  4852. }
  4853. },
  4854. "required": ["name", "data"]
  4855. },
  4856. "AssistantMessage": {
  4857. "type": "object",
  4858. "properties": {
  4859. "id": {
  4860. "type": "string"
  4861. },
  4862. "sessionID": {
  4863. "type": "string"
  4864. },
  4865. "role": {
  4866. "type": "string",
  4867. "const": "assistant"
  4868. },
  4869. "time": {
  4870. "type": "object",
  4871. "properties": {
  4872. "created": {
  4873. "type": "number"
  4874. },
  4875. "completed": {
  4876. "type": "number"
  4877. }
  4878. },
  4879. "required": ["created"]
  4880. },
  4881. "error": {
  4882. "anyOf": [
  4883. {
  4884. "$ref": "#/components/schemas/ProviderAuthError"
  4885. },
  4886. {
  4887. "$ref": "#/components/schemas/UnknownError"
  4888. },
  4889. {
  4890. "$ref": "#/components/schemas/MessageOutputLengthError"
  4891. },
  4892. {
  4893. "$ref": "#/components/schemas/MessageAbortedError"
  4894. },
  4895. {
  4896. "$ref": "#/components/schemas/APIError"
  4897. }
  4898. ]
  4899. },
  4900. "parentID": {
  4901. "type": "string"
  4902. },
  4903. "modelID": {
  4904. "type": "string"
  4905. },
  4906. "providerID": {
  4907. "type": "string"
  4908. },
  4909. "mode": {
  4910. "type": "string"
  4911. },
  4912. "path": {
  4913. "type": "object",
  4914. "properties": {
  4915. "cwd": {
  4916. "type": "string"
  4917. },
  4918. "root": {
  4919. "type": "string"
  4920. }
  4921. },
  4922. "required": ["cwd", "root"]
  4923. },
  4924. "summary": {
  4925. "type": "boolean"
  4926. },
  4927. "cost": {
  4928. "type": "number"
  4929. },
  4930. "tokens": {
  4931. "type": "object",
  4932. "properties": {
  4933. "input": {
  4934. "type": "number"
  4935. },
  4936. "output": {
  4937. "type": "number"
  4938. },
  4939. "reasoning": {
  4940. "type": "number"
  4941. },
  4942. "cache": {
  4943. "type": "object",
  4944. "properties": {
  4945. "read": {
  4946. "type": "number"
  4947. },
  4948. "write": {
  4949. "type": "number"
  4950. }
  4951. },
  4952. "required": ["read", "write"]
  4953. }
  4954. },
  4955. "required": ["input", "output", "reasoning", "cache"]
  4956. },
  4957. "finish": {
  4958. "type": "string"
  4959. }
  4960. },
  4961. "required": [
  4962. "id",
  4963. "sessionID",
  4964. "role",
  4965. "time",
  4966. "parentID",
  4967. "modelID",
  4968. "providerID",
  4969. "mode",
  4970. "path",
  4971. "cost",
  4972. "tokens"
  4973. ]
  4974. },
  4975. "Message": {
  4976. "anyOf": [
  4977. {
  4978. "$ref": "#/components/schemas/UserMessage"
  4979. },
  4980. {
  4981. "$ref": "#/components/schemas/AssistantMessage"
  4982. }
  4983. ]
  4984. },
  4985. "Event.message.updated": {
  4986. "type": "object",
  4987. "properties": {
  4988. "type": {
  4989. "type": "string",
  4990. "const": "message.updated"
  4991. },
  4992. "properties": {
  4993. "type": "object",
  4994. "properties": {
  4995. "info": {
  4996. "$ref": "#/components/schemas/Message"
  4997. }
  4998. },
  4999. "required": ["info"]
  5000. }
  5001. },
  5002. "required": ["type", "properties"]
  5003. },
  5004. "Event.message.removed": {
  5005. "type": "object",
  5006. "properties": {
  5007. "type": {
  5008. "type": "string",
  5009. "const": "message.removed"
  5010. },
  5011. "properties": {
  5012. "type": "object",
  5013. "properties": {
  5014. "sessionID": {
  5015. "type": "string"
  5016. },
  5017. "messageID": {
  5018. "type": "string"
  5019. }
  5020. },
  5021. "required": ["sessionID", "messageID"]
  5022. }
  5023. },
  5024. "required": ["type", "properties"]
  5025. },
  5026. "TextPart": {
  5027. "type": "object",
  5028. "properties": {
  5029. "id": {
  5030. "type": "string"
  5031. },
  5032. "sessionID": {
  5033. "type": "string"
  5034. },
  5035. "messageID": {
  5036. "type": "string"
  5037. },
  5038. "type": {
  5039. "type": "string",
  5040. "const": "text"
  5041. },
  5042. "text": {
  5043. "type": "string"
  5044. },
  5045. "synthetic": {
  5046. "type": "boolean"
  5047. },
  5048. "ignored": {
  5049. "type": "boolean"
  5050. },
  5051. "time": {
  5052. "type": "object",
  5053. "properties": {
  5054. "start": {
  5055. "type": "number"
  5056. },
  5057. "end": {
  5058. "type": "number"
  5059. }
  5060. },
  5061. "required": ["start"]
  5062. },
  5063. "metadata": {
  5064. "type": "object",
  5065. "propertyNames": {
  5066. "type": "string"
  5067. },
  5068. "additionalProperties": {}
  5069. }
  5070. },
  5071. "required": ["id", "sessionID", "messageID", "type", "text"]
  5072. },
  5073. "ReasoningPart": {
  5074. "type": "object",
  5075. "properties": {
  5076. "id": {
  5077. "type": "string"
  5078. },
  5079. "sessionID": {
  5080. "type": "string"
  5081. },
  5082. "messageID": {
  5083. "type": "string"
  5084. },
  5085. "type": {
  5086. "type": "string",
  5087. "const": "reasoning"
  5088. },
  5089. "text": {
  5090. "type": "string"
  5091. },
  5092. "metadata": {
  5093. "type": "object",
  5094. "propertyNames": {
  5095. "type": "string"
  5096. },
  5097. "additionalProperties": {}
  5098. },
  5099. "time": {
  5100. "type": "object",
  5101. "properties": {
  5102. "start": {
  5103. "type": "number"
  5104. },
  5105. "end": {
  5106. "type": "number"
  5107. }
  5108. },
  5109. "required": ["start"]
  5110. }
  5111. },
  5112. "required": ["id", "sessionID", "messageID", "type", "text", "time"]
  5113. },
  5114. "FilePartSourceText": {
  5115. "type": "object",
  5116. "properties": {
  5117. "value": {
  5118. "type": "string"
  5119. },
  5120. "start": {
  5121. "type": "integer",
  5122. "minimum": -9007199254740991,
  5123. "maximum": 9007199254740991
  5124. },
  5125. "end": {
  5126. "type": "integer",
  5127. "minimum": -9007199254740991,
  5128. "maximum": 9007199254740991
  5129. }
  5130. },
  5131. "required": ["value", "start", "end"]
  5132. },
  5133. "FileSource": {
  5134. "type": "object",
  5135. "properties": {
  5136. "text": {
  5137. "$ref": "#/components/schemas/FilePartSourceText"
  5138. },
  5139. "type": {
  5140. "type": "string",
  5141. "const": "file"
  5142. },
  5143. "path": {
  5144. "type": "string"
  5145. }
  5146. },
  5147. "required": ["text", "type", "path"]
  5148. },
  5149. "Range": {
  5150. "type": "object",
  5151. "properties": {
  5152. "start": {
  5153. "type": "object",
  5154. "properties": {
  5155. "line": {
  5156. "type": "number"
  5157. },
  5158. "character": {
  5159. "type": "number"
  5160. }
  5161. },
  5162. "required": ["line", "character"]
  5163. },
  5164. "end": {
  5165. "type": "object",
  5166. "properties": {
  5167. "line": {
  5168. "type": "number"
  5169. },
  5170. "character": {
  5171. "type": "number"
  5172. }
  5173. },
  5174. "required": ["line", "character"]
  5175. }
  5176. },
  5177. "required": ["start", "end"]
  5178. },
  5179. "SymbolSource": {
  5180. "type": "object",
  5181. "properties": {
  5182. "text": {
  5183. "$ref": "#/components/schemas/FilePartSourceText"
  5184. },
  5185. "type": {
  5186. "type": "string",
  5187. "const": "symbol"
  5188. },
  5189. "path": {
  5190. "type": "string"
  5191. },
  5192. "range": {
  5193. "$ref": "#/components/schemas/Range"
  5194. },
  5195. "name": {
  5196. "type": "string"
  5197. },
  5198. "kind": {
  5199. "type": "integer",
  5200. "minimum": -9007199254740991,
  5201. "maximum": 9007199254740991
  5202. }
  5203. },
  5204. "required": ["text", "type", "path", "range", "name", "kind"]
  5205. },
  5206. "FilePartSource": {
  5207. "anyOf": [
  5208. {
  5209. "$ref": "#/components/schemas/FileSource"
  5210. },
  5211. {
  5212. "$ref": "#/components/schemas/SymbolSource"
  5213. }
  5214. ]
  5215. },
  5216. "FilePart": {
  5217. "type": "object",
  5218. "properties": {
  5219. "id": {
  5220. "type": "string"
  5221. },
  5222. "sessionID": {
  5223. "type": "string"
  5224. },
  5225. "messageID": {
  5226. "type": "string"
  5227. },
  5228. "type": {
  5229. "type": "string",
  5230. "const": "file"
  5231. },
  5232. "mime": {
  5233. "type": "string"
  5234. },
  5235. "filename": {
  5236. "type": "string"
  5237. },
  5238. "url": {
  5239. "type": "string"
  5240. },
  5241. "source": {
  5242. "$ref": "#/components/schemas/FilePartSource"
  5243. }
  5244. },
  5245. "required": ["id", "sessionID", "messageID", "type", "mime", "url"]
  5246. },
  5247. "ToolStatePending": {
  5248. "type": "object",
  5249. "properties": {
  5250. "status": {
  5251. "type": "string",
  5252. "const": "pending"
  5253. },
  5254. "input": {
  5255. "type": "object",
  5256. "propertyNames": {
  5257. "type": "string"
  5258. },
  5259. "additionalProperties": {}
  5260. },
  5261. "raw": {
  5262. "type": "string"
  5263. }
  5264. },
  5265. "required": ["status", "input", "raw"]
  5266. },
  5267. "ToolStateRunning": {
  5268. "type": "object",
  5269. "properties": {
  5270. "status": {
  5271. "type": "string",
  5272. "const": "running"
  5273. },
  5274. "input": {
  5275. "type": "object",
  5276. "propertyNames": {
  5277. "type": "string"
  5278. },
  5279. "additionalProperties": {}
  5280. },
  5281. "title": {
  5282. "type": "string"
  5283. },
  5284. "metadata": {
  5285. "type": "object",
  5286. "propertyNames": {
  5287. "type": "string"
  5288. },
  5289. "additionalProperties": {}
  5290. },
  5291. "time": {
  5292. "type": "object",
  5293. "properties": {
  5294. "start": {
  5295. "type": "number"
  5296. }
  5297. },
  5298. "required": ["start"]
  5299. }
  5300. },
  5301. "required": ["status", "input", "time"]
  5302. },
  5303. "ToolStateCompleted": {
  5304. "type": "object",
  5305. "properties": {
  5306. "status": {
  5307. "type": "string",
  5308. "const": "completed"
  5309. },
  5310. "input": {
  5311. "type": "object",
  5312. "propertyNames": {
  5313. "type": "string"
  5314. },
  5315. "additionalProperties": {}
  5316. },
  5317. "output": {
  5318. "type": "string"
  5319. },
  5320. "title": {
  5321. "type": "string"
  5322. },
  5323. "metadata": {
  5324. "type": "object",
  5325. "propertyNames": {
  5326. "type": "string"
  5327. },
  5328. "additionalProperties": {}
  5329. },
  5330. "time": {
  5331. "type": "object",
  5332. "properties": {
  5333. "start": {
  5334. "type": "number"
  5335. },
  5336. "end": {
  5337. "type": "number"
  5338. },
  5339. "compacted": {
  5340. "type": "number"
  5341. }
  5342. },
  5343. "required": ["start", "end"]
  5344. },
  5345. "attachments": {
  5346. "type": "array",
  5347. "items": {
  5348. "$ref": "#/components/schemas/FilePart"
  5349. }
  5350. }
  5351. },
  5352. "required": ["status", "input", "output", "title", "metadata", "time"]
  5353. },
  5354. "ToolStateError": {
  5355. "type": "object",
  5356. "properties": {
  5357. "status": {
  5358. "type": "string",
  5359. "const": "error"
  5360. },
  5361. "input": {
  5362. "type": "object",
  5363. "propertyNames": {
  5364. "type": "string"
  5365. },
  5366. "additionalProperties": {}
  5367. },
  5368. "error": {
  5369. "type": "string"
  5370. },
  5371. "metadata": {
  5372. "type": "object",
  5373. "propertyNames": {
  5374. "type": "string"
  5375. },
  5376. "additionalProperties": {}
  5377. },
  5378. "time": {
  5379. "type": "object",
  5380. "properties": {
  5381. "start": {
  5382. "type": "number"
  5383. },
  5384. "end": {
  5385. "type": "number"
  5386. }
  5387. },
  5388. "required": ["start", "end"]
  5389. }
  5390. },
  5391. "required": ["status", "input", "error", "time"]
  5392. },
  5393. "ToolState": {
  5394. "anyOf": [
  5395. {
  5396. "$ref": "#/components/schemas/ToolStatePending"
  5397. },
  5398. {
  5399. "$ref": "#/components/schemas/ToolStateRunning"
  5400. },
  5401. {
  5402. "$ref": "#/components/schemas/ToolStateCompleted"
  5403. },
  5404. {
  5405. "$ref": "#/components/schemas/ToolStateError"
  5406. }
  5407. ]
  5408. },
  5409. "ToolPart": {
  5410. "type": "object",
  5411. "properties": {
  5412. "id": {
  5413. "type": "string"
  5414. },
  5415. "sessionID": {
  5416. "type": "string"
  5417. },
  5418. "messageID": {
  5419. "type": "string"
  5420. },
  5421. "type": {
  5422. "type": "string",
  5423. "const": "tool"
  5424. },
  5425. "callID": {
  5426. "type": "string"
  5427. },
  5428. "tool": {
  5429. "type": "string"
  5430. },
  5431. "state": {
  5432. "$ref": "#/components/schemas/ToolState"
  5433. },
  5434. "metadata": {
  5435. "type": "object",
  5436. "propertyNames": {
  5437. "type": "string"
  5438. },
  5439. "additionalProperties": {}
  5440. }
  5441. },
  5442. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"]
  5443. },
  5444. "StepStartPart": {
  5445. "type": "object",
  5446. "properties": {
  5447. "id": {
  5448. "type": "string"
  5449. },
  5450. "sessionID": {
  5451. "type": "string"
  5452. },
  5453. "messageID": {
  5454. "type": "string"
  5455. },
  5456. "type": {
  5457. "type": "string",
  5458. "const": "step-start"
  5459. },
  5460. "snapshot": {
  5461. "type": "string"
  5462. }
  5463. },
  5464. "required": ["id", "sessionID", "messageID", "type"]
  5465. },
  5466. "StepFinishPart": {
  5467. "type": "object",
  5468. "properties": {
  5469. "id": {
  5470. "type": "string"
  5471. },
  5472. "sessionID": {
  5473. "type": "string"
  5474. },
  5475. "messageID": {
  5476. "type": "string"
  5477. },
  5478. "type": {
  5479. "type": "string",
  5480. "const": "step-finish"
  5481. },
  5482. "reason": {
  5483. "type": "string"
  5484. },
  5485. "snapshot": {
  5486. "type": "string"
  5487. },
  5488. "cost": {
  5489. "type": "number"
  5490. },
  5491. "tokens": {
  5492. "type": "object",
  5493. "properties": {
  5494. "input": {
  5495. "type": "number"
  5496. },
  5497. "output": {
  5498. "type": "number"
  5499. },
  5500. "reasoning": {
  5501. "type": "number"
  5502. },
  5503. "cache": {
  5504. "type": "object",
  5505. "properties": {
  5506. "read": {
  5507. "type": "number"
  5508. },
  5509. "write": {
  5510. "type": "number"
  5511. }
  5512. },
  5513. "required": ["read", "write"]
  5514. }
  5515. },
  5516. "required": ["input", "output", "reasoning", "cache"]
  5517. }
  5518. },
  5519. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"]
  5520. },
  5521. "SnapshotPart": {
  5522. "type": "object",
  5523. "properties": {
  5524. "id": {
  5525. "type": "string"
  5526. },
  5527. "sessionID": {
  5528. "type": "string"
  5529. },
  5530. "messageID": {
  5531. "type": "string"
  5532. },
  5533. "type": {
  5534. "type": "string",
  5535. "const": "snapshot"
  5536. },
  5537. "snapshot": {
  5538. "type": "string"
  5539. }
  5540. },
  5541. "required": ["id", "sessionID", "messageID", "type", "snapshot"]
  5542. },
  5543. "PatchPart": {
  5544. "type": "object",
  5545. "properties": {
  5546. "id": {
  5547. "type": "string"
  5548. },
  5549. "sessionID": {
  5550. "type": "string"
  5551. },
  5552. "messageID": {
  5553. "type": "string"
  5554. },
  5555. "type": {
  5556. "type": "string",
  5557. "const": "patch"
  5558. },
  5559. "hash": {
  5560. "type": "string"
  5561. },
  5562. "files": {
  5563. "type": "array",
  5564. "items": {
  5565. "type": "string"
  5566. }
  5567. }
  5568. },
  5569. "required": ["id", "sessionID", "messageID", "type", "hash", "files"]
  5570. },
  5571. "AgentPart": {
  5572. "type": "object",
  5573. "properties": {
  5574. "id": {
  5575. "type": "string"
  5576. },
  5577. "sessionID": {
  5578. "type": "string"
  5579. },
  5580. "messageID": {
  5581. "type": "string"
  5582. },
  5583. "type": {
  5584. "type": "string",
  5585. "const": "agent"
  5586. },
  5587. "name": {
  5588. "type": "string"
  5589. },
  5590. "source": {
  5591. "type": "object",
  5592. "properties": {
  5593. "value": {
  5594. "type": "string"
  5595. },
  5596. "start": {
  5597. "type": "integer",
  5598. "minimum": -9007199254740991,
  5599. "maximum": 9007199254740991
  5600. },
  5601. "end": {
  5602. "type": "integer",
  5603. "minimum": -9007199254740991,
  5604. "maximum": 9007199254740991
  5605. }
  5606. },
  5607. "required": ["value", "start", "end"]
  5608. }
  5609. },
  5610. "required": ["id", "sessionID", "messageID", "type", "name"]
  5611. },
  5612. "RetryPart": {
  5613. "type": "object",
  5614. "properties": {
  5615. "id": {
  5616. "type": "string"
  5617. },
  5618. "sessionID": {
  5619. "type": "string"
  5620. },
  5621. "messageID": {
  5622. "type": "string"
  5623. },
  5624. "type": {
  5625. "type": "string",
  5626. "const": "retry"
  5627. },
  5628. "attempt": {
  5629. "type": "number"
  5630. },
  5631. "error": {
  5632. "$ref": "#/components/schemas/APIError"
  5633. },
  5634. "time": {
  5635. "type": "object",
  5636. "properties": {
  5637. "created": {
  5638. "type": "number"
  5639. }
  5640. },
  5641. "required": ["created"]
  5642. }
  5643. },
  5644. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"]
  5645. },
  5646. "CompactionPart": {
  5647. "type": "object",
  5648. "properties": {
  5649. "id": {
  5650. "type": "string"
  5651. },
  5652. "sessionID": {
  5653. "type": "string"
  5654. },
  5655. "messageID": {
  5656. "type": "string"
  5657. },
  5658. "type": {
  5659. "type": "string",
  5660. "const": "compaction"
  5661. },
  5662. "auto": {
  5663. "type": "boolean"
  5664. }
  5665. },
  5666. "required": ["id", "sessionID", "messageID", "type", "auto"]
  5667. },
  5668. "Part": {
  5669. "anyOf": [
  5670. {
  5671. "$ref": "#/components/schemas/TextPart"
  5672. },
  5673. {
  5674. "type": "object",
  5675. "properties": {
  5676. "id": {
  5677. "type": "string"
  5678. },
  5679. "sessionID": {
  5680. "type": "string"
  5681. },
  5682. "messageID": {
  5683. "type": "string"
  5684. },
  5685. "type": {
  5686. "type": "string",
  5687. "const": "subtask"
  5688. },
  5689. "prompt": {
  5690. "type": "string"
  5691. },
  5692. "description": {
  5693. "type": "string"
  5694. },
  5695. "agent": {
  5696. "type": "string"
  5697. }
  5698. },
  5699. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"]
  5700. },
  5701. {
  5702. "$ref": "#/components/schemas/ReasoningPart"
  5703. },
  5704. {
  5705. "$ref": "#/components/schemas/FilePart"
  5706. },
  5707. {
  5708. "$ref": "#/components/schemas/ToolPart"
  5709. },
  5710. {
  5711. "$ref": "#/components/schemas/StepStartPart"
  5712. },
  5713. {
  5714. "$ref": "#/components/schemas/StepFinishPart"
  5715. },
  5716. {
  5717. "$ref": "#/components/schemas/SnapshotPart"
  5718. },
  5719. {
  5720. "$ref": "#/components/schemas/PatchPart"
  5721. },
  5722. {
  5723. "$ref": "#/components/schemas/AgentPart"
  5724. },
  5725. {
  5726. "$ref": "#/components/schemas/RetryPart"
  5727. },
  5728. {
  5729. "$ref": "#/components/schemas/CompactionPart"
  5730. }
  5731. ]
  5732. },
  5733. "Event.message.part.updated": {
  5734. "type": "object",
  5735. "properties": {
  5736. "type": {
  5737. "type": "string",
  5738. "const": "message.part.updated"
  5739. },
  5740. "properties": {
  5741. "type": "object",
  5742. "properties": {
  5743. "part": {
  5744. "$ref": "#/components/schemas/Part"
  5745. },
  5746. "delta": {
  5747. "type": "string"
  5748. }
  5749. },
  5750. "required": ["part"]
  5751. }
  5752. },
  5753. "required": ["type", "properties"]
  5754. },
  5755. "Event.message.part.removed": {
  5756. "type": "object",
  5757. "properties": {
  5758. "type": {
  5759. "type": "string",
  5760. "const": "message.part.removed"
  5761. },
  5762. "properties": {
  5763. "type": "object",
  5764. "properties": {
  5765. "sessionID": {
  5766. "type": "string"
  5767. },
  5768. "messageID": {
  5769. "type": "string"
  5770. },
  5771. "partID": {
  5772. "type": "string"
  5773. }
  5774. },
  5775. "required": ["sessionID", "messageID", "partID"]
  5776. }
  5777. },
  5778. "required": ["type", "properties"]
  5779. },
  5780. "Permission": {
  5781. "type": "object",
  5782. "properties": {
  5783. "id": {
  5784. "type": "string"
  5785. },
  5786. "type": {
  5787. "type": "string"
  5788. },
  5789. "pattern": {
  5790. "anyOf": [
  5791. {
  5792. "type": "string"
  5793. },
  5794. {
  5795. "type": "array",
  5796. "items": {
  5797. "type": "string"
  5798. }
  5799. }
  5800. ]
  5801. },
  5802. "sessionID": {
  5803. "type": "string"
  5804. },
  5805. "messageID": {
  5806. "type": "string"
  5807. },
  5808. "callID": {
  5809. "type": "string"
  5810. },
  5811. "title": {
  5812. "type": "string"
  5813. },
  5814. "metadata": {
  5815. "type": "object",
  5816. "propertyNames": {
  5817. "type": "string"
  5818. },
  5819. "additionalProperties": {}
  5820. },
  5821. "time": {
  5822. "type": "object",
  5823. "properties": {
  5824. "created": {
  5825. "type": "number"
  5826. }
  5827. },
  5828. "required": ["created"]
  5829. }
  5830. },
  5831. "required": ["id", "type", "sessionID", "messageID", "title", "metadata", "time"]
  5832. },
  5833. "Event.permission.updated": {
  5834. "type": "object",
  5835. "properties": {
  5836. "type": {
  5837. "type": "string",
  5838. "const": "permission.updated"
  5839. },
  5840. "properties": {
  5841. "$ref": "#/components/schemas/Permission"
  5842. }
  5843. },
  5844. "required": ["type", "properties"]
  5845. },
  5846. "Event.permission.replied": {
  5847. "type": "object",
  5848. "properties": {
  5849. "type": {
  5850. "type": "string",
  5851. "const": "permission.replied"
  5852. },
  5853. "properties": {
  5854. "type": "object",
  5855. "properties": {
  5856. "sessionID": {
  5857. "type": "string"
  5858. },
  5859. "permissionID": {
  5860. "type": "string"
  5861. },
  5862. "response": {
  5863. "type": "string"
  5864. }
  5865. },
  5866. "required": ["sessionID", "permissionID", "response"]
  5867. }
  5868. },
  5869. "required": ["type", "properties"]
  5870. },
  5871. "SessionStatus": {
  5872. "anyOf": [
  5873. {
  5874. "type": "object",
  5875. "properties": {
  5876. "type": {
  5877. "type": "string",
  5878. "const": "idle"
  5879. }
  5880. },
  5881. "required": ["type"]
  5882. },
  5883. {
  5884. "type": "object",
  5885. "properties": {
  5886. "type": {
  5887. "type": "string",
  5888. "const": "retry"
  5889. },
  5890. "attempt": {
  5891. "type": "number"
  5892. },
  5893. "message": {
  5894. "type": "string"
  5895. },
  5896. "next": {
  5897. "type": "number"
  5898. }
  5899. },
  5900. "required": ["type", "attempt", "message", "next"]
  5901. },
  5902. {
  5903. "type": "object",
  5904. "properties": {
  5905. "type": {
  5906. "type": "string",
  5907. "const": "busy"
  5908. }
  5909. },
  5910. "required": ["type"]
  5911. }
  5912. ]
  5913. },
  5914. "Event.session.status": {
  5915. "type": "object",
  5916. "properties": {
  5917. "type": {
  5918. "type": "string",
  5919. "const": "session.status"
  5920. },
  5921. "properties": {
  5922. "type": "object",
  5923. "properties": {
  5924. "sessionID": {
  5925. "type": "string"
  5926. },
  5927. "status": {
  5928. "$ref": "#/components/schemas/SessionStatus"
  5929. }
  5930. },
  5931. "required": ["sessionID", "status"]
  5932. }
  5933. },
  5934. "required": ["type", "properties"]
  5935. },
  5936. "Event.session.idle": {
  5937. "type": "object",
  5938. "properties": {
  5939. "type": {
  5940. "type": "string",
  5941. "const": "session.idle"
  5942. },
  5943. "properties": {
  5944. "type": "object",
  5945. "properties": {
  5946. "sessionID": {
  5947. "type": "string"
  5948. }
  5949. },
  5950. "required": ["sessionID"]
  5951. }
  5952. },
  5953. "required": ["type", "properties"]
  5954. },
  5955. "Event.session.compacted": {
  5956. "type": "object",
  5957. "properties": {
  5958. "type": {
  5959. "type": "string",
  5960. "const": "session.compacted"
  5961. },
  5962. "properties": {
  5963. "type": "object",
  5964. "properties": {
  5965. "sessionID": {
  5966. "type": "string"
  5967. }
  5968. },
  5969. "required": ["sessionID"]
  5970. }
  5971. },
  5972. "required": ["type", "properties"]
  5973. },
  5974. "Event.file.edited": {
  5975. "type": "object",
  5976. "properties": {
  5977. "type": {
  5978. "type": "string",
  5979. "const": "file.edited"
  5980. },
  5981. "properties": {
  5982. "type": "object",
  5983. "properties": {
  5984. "file": {
  5985. "type": "string"
  5986. }
  5987. },
  5988. "required": ["file"]
  5989. }
  5990. },
  5991. "required": ["type", "properties"]
  5992. },
  5993. "Todo": {
  5994. "type": "object",
  5995. "properties": {
  5996. "content": {
  5997. "description": "Brief description of the task",
  5998. "type": "string"
  5999. },
  6000. "status": {
  6001. "description": "Current status of the task: pending, in_progress, completed, cancelled",
  6002. "type": "string"
  6003. },
  6004. "priority": {
  6005. "description": "Priority level of the task: high, medium, low",
  6006. "type": "string"
  6007. },
  6008. "id": {
  6009. "description": "Unique identifier for the todo item",
  6010. "type": "string"
  6011. }
  6012. },
  6013. "required": ["content", "status", "priority", "id"]
  6014. },
  6015. "Event.todo.updated": {
  6016. "type": "object",
  6017. "properties": {
  6018. "type": {
  6019. "type": "string",
  6020. "const": "todo.updated"
  6021. },
  6022. "properties": {
  6023. "type": "object",
  6024. "properties": {
  6025. "sessionID": {
  6026. "type": "string"
  6027. },
  6028. "todos": {
  6029. "type": "array",
  6030. "items": {
  6031. "$ref": "#/components/schemas/Todo"
  6032. }
  6033. }
  6034. },
  6035. "required": ["sessionID", "todos"]
  6036. }
  6037. },
  6038. "required": ["type", "properties"]
  6039. },
  6040. "Event.command.executed": {
  6041. "type": "object",
  6042. "properties": {
  6043. "type": {
  6044. "type": "string",
  6045. "const": "command.executed"
  6046. },
  6047. "properties": {
  6048. "type": "object",
  6049. "properties": {
  6050. "name": {
  6051. "type": "string"
  6052. },
  6053. "sessionID": {
  6054. "type": "string",
  6055. "pattern": "^ses.*"
  6056. },
  6057. "arguments": {
  6058. "type": "string"
  6059. },
  6060. "messageID": {
  6061. "type": "string",
  6062. "pattern": "^msg.*"
  6063. }
  6064. },
  6065. "required": ["name", "sessionID", "arguments", "messageID"]
  6066. }
  6067. },
  6068. "required": ["type", "properties"]
  6069. },
  6070. "Session": {
  6071. "type": "object",
  6072. "properties": {
  6073. "id": {
  6074. "type": "string",
  6075. "pattern": "^ses.*"
  6076. },
  6077. "projectID": {
  6078. "type": "string"
  6079. },
  6080. "directory": {
  6081. "type": "string"
  6082. },
  6083. "parentID": {
  6084. "type": "string",
  6085. "pattern": "^ses.*"
  6086. },
  6087. "summary": {
  6088. "type": "object",
  6089. "properties": {
  6090. "additions": {
  6091. "type": "number"
  6092. },
  6093. "deletions": {
  6094. "type": "number"
  6095. },
  6096. "files": {
  6097. "type": "number"
  6098. },
  6099. "diffs": {
  6100. "type": "array",
  6101. "items": {
  6102. "$ref": "#/components/schemas/FileDiff"
  6103. }
  6104. }
  6105. },
  6106. "required": ["additions", "deletions", "files"]
  6107. },
  6108. "share": {
  6109. "type": "object",
  6110. "properties": {
  6111. "url": {
  6112. "type": "string"
  6113. }
  6114. },
  6115. "required": ["url"]
  6116. },
  6117. "title": {
  6118. "type": "string"
  6119. },
  6120. "version": {
  6121. "type": "string"
  6122. },
  6123. "time": {
  6124. "type": "object",
  6125. "properties": {
  6126. "created": {
  6127. "type": "number"
  6128. },
  6129. "updated": {
  6130. "type": "number"
  6131. },
  6132. "compacting": {
  6133. "type": "number"
  6134. }
  6135. },
  6136. "required": ["created", "updated"]
  6137. },
  6138. "revert": {
  6139. "type": "object",
  6140. "properties": {
  6141. "messageID": {
  6142. "type": "string"
  6143. },
  6144. "partID": {
  6145. "type": "string"
  6146. },
  6147. "snapshot": {
  6148. "type": "string"
  6149. },
  6150. "diff": {
  6151. "type": "string"
  6152. }
  6153. },
  6154. "required": ["messageID"]
  6155. }
  6156. },
  6157. "required": ["id", "projectID", "directory", "title", "version", "time"]
  6158. },
  6159. "Event.session.created": {
  6160. "type": "object",
  6161. "properties": {
  6162. "type": {
  6163. "type": "string",
  6164. "const": "session.created"
  6165. },
  6166. "properties": {
  6167. "type": "object",
  6168. "properties": {
  6169. "info": {
  6170. "$ref": "#/components/schemas/Session"
  6171. }
  6172. },
  6173. "required": ["info"]
  6174. }
  6175. },
  6176. "required": ["type", "properties"]
  6177. },
  6178. "Event.session.updated": {
  6179. "type": "object",
  6180. "properties": {
  6181. "type": {
  6182. "type": "string",
  6183. "const": "session.updated"
  6184. },
  6185. "properties": {
  6186. "type": "object",
  6187. "properties": {
  6188. "info": {
  6189. "$ref": "#/components/schemas/Session"
  6190. }
  6191. },
  6192. "required": ["info"]
  6193. }
  6194. },
  6195. "required": ["type", "properties"]
  6196. },
  6197. "Event.session.deleted": {
  6198. "type": "object",
  6199. "properties": {
  6200. "type": {
  6201. "type": "string",
  6202. "const": "session.deleted"
  6203. },
  6204. "properties": {
  6205. "type": "object",
  6206. "properties": {
  6207. "info": {
  6208. "$ref": "#/components/schemas/Session"
  6209. }
  6210. },
  6211. "required": ["info"]
  6212. }
  6213. },
  6214. "required": ["type", "properties"]
  6215. },
  6216. "Event.session.diff": {
  6217. "type": "object",
  6218. "properties": {
  6219. "type": {
  6220. "type": "string",
  6221. "const": "session.diff"
  6222. },
  6223. "properties": {
  6224. "type": "object",
  6225. "properties": {
  6226. "sessionID": {
  6227. "type": "string"
  6228. },
  6229. "diff": {
  6230. "type": "array",
  6231. "items": {
  6232. "$ref": "#/components/schemas/FileDiff"
  6233. }
  6234. }
  6235. },
  6236. "required": ["sessionID", "diff"]
  6237. }
  6238. },
  6239. "required": ["type", "properties"]
  6240. },
  6241. "Event.session.error": {
  6242. "type": "object",
  6243. "properties": {
  6244. "type": {
  6245. "type": "string",
  6246. "const": "session.error"
  6247. },
  6248. "properties": {
  6249. "type": "object",
  6250. "properties": {
  6251. "sessionID": {
  6252. "type": "string"
  6253. },
  6254. "error": {
  6255. "anyOf": [
  6256. {
  6257. "$ref": "#/components/schemas/ProviderAuthError"
  6258. },
  6259. {
  6260. "$ref": "#/components/schemas/UnknownError"
  6261. },
  6262. {
  6263. "$ref": "#/components/schemas/MessageOutputLengthError"
  6264. },
  6265. {
  6266. "$ref": "#/components/schemas/MessageAbortedError"
  6267. },
  6268. {
  6269. "$ref": "#/components/schemas/APIError"
  6270. }
  6271. ]
  6272. }
  6273. }
  6274. }
  6275. },
  6276. "required": ["type", "properties"]
  6277. },
  6278. "Event.file.watcher.updated": {
  6279. "type": "object",
  6280. "properties": {
  6281. "type": {
  6282. "type": "string",
  6283. "const": "file.watcher.updated"
  6284. },
  6285. "properties": {
  6286. "type": "object",
  6287. "properties": {
  6288. "file": {
  6289. "type": "string"
  6290. },
  6291. "event": {
  6292. "anyOf": [
  6293. {
  6294. "type": "string",
  6295. "const": "add"
  6296. },
  6297. {
  6298. "type": "string",
  6299. "const": "change"
  6300. },
  6301. {
  6302. "type": "string",
  6303. "const": "unlink"
  6304. }
  6305. ]
  6306. }
  6307. },
  6308. "required": ["file", "event"]
  6309. }
  6310. },
  6311. "required": ["type", "properties"]
  6312. },
  6313. "Event.vcs.branch.updated": {
  6314. "type": "object",
  6315. "properties": {
  6316. "type": {
  6317. "type": "string",
  6318. "const": "vcs.branch.updated"
  6319. },
  6320. "properties": {
  6321. "type": "object",
  6322. "properties": {
  6323. "branch": {
  6324. "type": "string"
  6325. }
  6326. }
  6327. }
  6328. },
  6329. "required": ["type", "properties"]
  6330. },
  6331. "Event.tui.prompt.append": {
  6332. "type": "object",
  6333. "properties": {
  6334. "type": {
  6335. "type": "string",
  6336. "const": "tui.prompt.append"
  6337. },
  6338. "properties": {
  6339. "type": "object",
  6340. "properties": {
  6341. "text": {
  6342. "type": "string"
  6343. }
  6344. },
  6345. "required": ["text"]
  6346. }
  6347. },
  6348. "required": ["type", "properties"]
  6349. },
  6350. "Event.tui.command.execute": {
  6351. "type": "object",
  6352. "properties": {
  6353. "type": {
  6354. "type": "string",
  6355. "const": "tui.command.execute"
  6356. },
  6357. "properties": {
  6358. "type": "object",
  6359. "properties": {
  6360. "command": {
  6361. "anyOf": [
  6362. {
  6363. "type": "string",
  6364. "enum": [
  6365. "session.list",
  6366. "session.new",
  6367. "session.share",
  6368. "session.interrupt",
  6369. "session.compact",
  6370. "session.page.up",
  6371. "session.page.down",
  6372. "session.half.page.up",
  6373. "session.half.page.down",
  6374. "session.first",
  6375. "session.last",
  6376. "prompt.clear",
  6377. "prompt.submit",
  6378. "agent.cycle"
  6379. ]
  6380. },
  6381. {
  6382. "type": "string"
  6383. }
  6384. ]
  6385. }
  6386. },
  6387. "required": ["command"]
  6388. }
  6389. },
  6390. "required": ["type", "properties"]
  6391. },
  6392. "Event.tui.toast.show": {
  6393. "type": "object",
  6394. "properties": {
  6395. "type": {
  6396. "type": "string",
  6397. "const": "tui.toast.show"
  6398. },
  6399. "properties": {
  6400. "type": "object",
  6401. "properties": {
  6402. "title": {
  6403. "type": "string"
  6404. },
  6405. "message": {
  6406. "type": "string"
  6407. },
  6408. "variant": {
  6409. "type": "string",
  6410. "enum": ["info", "success", "warning", "error"]
  6411. },
  6412. "duration": {
  6413. "description": "Duration in milliseconds",
  6414. "default": 5000,
  6415. "type": "number"
  6416. }
  6417. },
  6418. "required": ["message", "variant"]
  6419. }
  6420. },
  6421. "required": ["type", "properties"]
  6422. },
  6423. "Pty": {
  6424. "type": "object",
  6425. "properties": {
  6426. "id": {
  6427. "type": "string",
  6428. "pattern": "^pty.*"
  6429. },
  6430. "title": {
  6431. "type": "string"
  6432. },
  6433. "command": {
  6434. "type": "string"
  6435. },
  6436. "args": {
  6437. "type": "array",
  6438. "items": {
  6439. "type": "string"
  6440. }
  6441. },
  6442. "cwd": {
  6443. "type": "string"
  6444. },
  6445. "status": {
  6446. "type": "string",
  6447. "enum": ["running", "exited"]
  6448. },
  6449. "pid": {
  6450. "type": "number"
  6451. }
  6452. },
  6453. "required": ["id", "title", "command", "args", "cwd", "status", "pid"]
  6454. },
  6455. "Event.pty.created": {
  6456. "type": "object",
  6457. "properties": {
  6458. "type": {
  6459. "type": "string",
  6460. "const": "pty.created"
  6461. },
  6462. "properties": {
  6463. "type": "object",
  6464. "properties": {
  6465. "info": {
  6466. "$ref": "#/components/schemas/Pty"
  6467. }
  6468. },
  6469. "required": ["info"]
  6470. }
  6471. },
  6472. "required": ["type", "properties"]
  6473. },
  6474. "Event.pty.updated": {
  6475. "type": "object",
  6476. "properties": {
  6477. "type": {
  6478. "type": "string",
  6479. "const": "pty.updated"
  6480. },
  6481. "properties": {
  6482. "type": "object",
  6483. "properties": {
  6484. "info": {
  6485. "$ref": "#/components/schemas/Pty"
  6486. }
  6487. },
  6488. "required": ["info"]
  6489. }
  6490. },
  6491. "required": ["type", "properties"]
  6492. },
  6493. "Event.pty.exited": {
  6494. "type": "object",
  6495. "properties": {
  6496. "type": {
  6497. "type": "string",
  6498. "const": "pty.exited"
  6499. },
  6500. "properties": {
  6501. "type": "object",
  6502. "properties": {
  6503. "id": {
  6504. "type": "string",
  6505. "pattern": "^pty.*"
  6506. },
  6507. "exitCode": {
  6508. "type": "number"
  6509. }
  6510. },
  6511. "required": ["id", "exitCode"]
  6512. }
  6513. },
  6514. "required": ["type", "properties"]
  6515. },
  6516. "Event.pty.deleted": {
  6517. "type": "object",
  6518. "properties": {
  6519. "type": {
  6520. "type": "string",
  6521. "const": "pty.deleted"
  6522. },
  6523. "properties": {
  6524. "type": "object",
  6525. "properties": {
  6526. "id": {
  6527. "type": "string",
  6528. "pattern": "^pty.*"
  6529. }
  6530. },
  6531. "required": ["id"]
  6532. }
  6533. },
  6534. "required": ["type", "properties"]
  6535. },
  6536. "Event.server.connected": {
  6537. "type": "object",
  6538. "properties": {
  6539. "type": {
  6540. "type": "string",
  6541. "const": "server.connected"
  6542. },
  6543. "properties": {
  6544. "type": "object",
  6545. "properties": {}
  6546. }
  6547. },
  6548. "required": ["type", "properties"]
  6549. },
  6550. "Event": {
  6551. "anyOf": [
  6552. {
  6553. "$ref": "#/components/schemas/Event.server.instance.disposed"
  6554. },
  6555. {
  6556. "$ref": "#/components/schemas/Event.installation.updated"
  6557. },
  6558. {
  6559. "$ref": "#/components/schemas/Event.installation.update-available"
  6560. },
  6561. {
  6562. "$ref": "#/components/schemas/Event.lsp.client.diagnostics"
  6563. },
  6564. {
  6565. "$ref": "#/components/schemas/Event.lsp.updated"
  6566. },
  6567. {
  6568. "$ref": "#/components/schemas/Event.message.updated"
  6569. },
  6570. {
  6571. "$ref": "#/components/schemas/Event.message.removed"
  6572. },
  6573. {
  6574. "$ref": "#/components/schemas/Event.message.part.updated"
  6575. },
  6576. {
  6577. "$ref": "#/components/schemas/Event.message.part.removed"
  6578. },
  6579. {
  6580. "$ref": "#/components/schemas/Event.permission.updated"
  6581. },
  6582. {
  6583. "$ref": "#/components/schemas/Event.permission.replied"
  6584. },
  6585. {
  6586. "$ref": "#/components/schemas/Event.session.status"
  6587. },
  6588. {
  6589. "$ref": "#/components/schemas/Event.session.idle"
  6590. },
  6591. {
  6592. "$ref": "#/components/schemas/Event.session.compacted"
  6593. },
  6594. {
  6595. "$ref": "#/components/schemas/Event.file.edited"
  6596. },
  6597. {
  6598. "$ref": "#/components/schemas/Event.todo.updated"
  6599. },
  6600. {
  6601. "$ref": "#/components/schemas/Event.command.executed"
  6602. },
  6603. {
  6604. "$ref": "#/components/schemas/Event.session.created"
  6605. },
  6606. {
  6607. "$ref": "#/components/schemas/Event.session.updated"
  6608. },
  6609. {
  6610. "$ref": "#/components/schemas/Event.session.deleted"
  6611. },
  6612. {
  6613. "$ref": "#/components/schemas/Event.session.diff"
  6614. },
  6615. {
  6616. "$ref": "#/components/schemas/Event.session.error"
  6617. },
  6618. {
  6619. "$ref": "#/components/schemas/Event.file.watcher.updated"
  6620. },
  6621. {
  6622. "$ref": "#/components/schemas/Event.vcs.branch.updated"
  6623. },
  6624. {
  6625. "$ref": "#/components/schemas/Event.tui.prompt.append"
  6626. },
  6627. {
  6628. "$ref": "#/components/schemas/Event.tui.command.execute"
  6629. },
  6630. {
  6631. "$ref": "#/components/schemas/Event.tui.toast.show"
  6632. },
  6633. {
  6634. "$ref": "#/components/schemas/Event.pty.created"
  6635. },
  6636. {
  6637. "$ref": "#/components/schemas/Event.pty.updated"
  6638. },
  6639. {
  6640. "$ref": "#/components/schemas/Event.pty.exited"
  6641. },
  6642. {
  6643. "$ref": "#/components/schemas/Event.pty.deleted"
  6644. },
  6645. {
  6646. "$ref": "#/components/schemas/Event.server.connected"
  6647. }
  6648. ]
  6649. },
  6650. "GlobalEvent": {
  6651. "type": "object",
  6652. "properties": {
  6653. "directory": {
  6654. "type": "string"
  6655. },
  6656. "payload": {
  6657. "$ref": "#/components/schemas/Event"
  6658. }
  6659. },
  6660. "required": ["directory", "payload"]
  6661. },
  6662. "Project": {
  6663. "type": "object",
  6664. "properties": {
  6665. "id": {
  6666. "type": "string"
  6667. },
  6668. "worktree": {
  6669. "type": "string"
  6670. },
  6671. "vcsDir": {
  6672. "type": "string"
  6673. },
  6674. "vcs": {
  6675. "type": "string",
  6676. "const": "git"
  6677. },
  6678. "time": {
  6679. "type": "object",
  6680. "properties": {
  6681. "created": {
  6682. "type": "number"
  6683. },
  6684. "initialized": {
  6685. "type": "number"
  6686. }
  6687. },
  6688. "required": ["created"]
  6689. }
  6690. },
  6691. "required": ["id", "worktree", "time"]
  6692. },
  6693. "BadRequestError": {
  6694. "type": "object",
  6695. "properties": {
  6696. "data": {},
  6697. "errors": {
  6698. "type": "array",
  6699. "items": {
  6700. "type": "object",
  6701. "propertyNames": {
  6702. "type": "string"
  6703. },
  6704. "additionalProperties": {}
  6705. }
  6706. },
  6707. "success": {
  6708. "type": "boolean",
  6709. "const": false
  6710. }
  6711. },
  6712. "required": ["data", "errors", "success"]
  6713. },
  6714. "NotFoundError": {
  6715. "type": "object",
  6716. "properties": {
  6717. "name": {
  6718. "type": "string",
  6719. "const": "NotFoundError"
  6720. },
  6721. "data": {
  6722. "type": "object",
  6723. "properties": {
  6724. "message": {
  6725. "type": "string"
  6726. }
  6727. },
  6728. "required": ["message"]
  6729. }
  6730. },
  6731. "required": ["name", "data"]
  6732. },
  6733. "KeybindsConfig": {
  6734. "description": "Custom keybind configurations",
  6735. "type": "object",
  6736. "properties": {
  6737. "leader": {
  6738. "description": "Leader key for keybind combinations",
  6739. "default": "ctrl+x",
  6740. "type": "string"
  6741. },
  6742. "app_exit": {
  6743. "description": "Exit the application",
  6744. "default": "ctrl+c,ctrl+d,<leader>q",
  6745. "type": "string"
  6746. },
  6747. "editor_open": {
  6748. "description": "Open external editor",
  6749. "default": "<leader>e",
  6750. "type": "string"
  6751. },
  6752. "theme_list": {
  6753. "description": "List available themes",
  6754. "default": "<leader>t",
  6755. "type": "string"
  6756. },
  6757. "sidebar_toggle": {
  6758. "description": "Toggle sidebar",
  6759. "default": "<leader>b",
  6760. "type": "string"
  6761. },
  6762. "scrollbar_toggle": {
  6763. "description": "Toggle session scrollbar",
  6764. "default": "none",
  6765. "type": "string"
  6766. },
  6767. "username_toggle": {
  6768. "description": "Toggle username visibility",
  6769. "default": "none",
  6770. "type": "string"
  6771. },
  6772. "status_view": {
  6773. "description": "View status",
  6774. "default": "<leader>s",
  6775. "type": "string"
  6776. },
  6777. "session_export": {
  6778. "description": "Export session to editor",
  6779. "default": "<leader>x",
  6780. "type": "string"
  6781. },
  6782. "session_new": {
  6783. "description": "Create a new session",
  6784. "default": "<leader>n",
  6785. "type": "string"
  6786. },
  6787. "session_list": {
  6788. "description": "List all sessions",
  6789. "default": "<leader>l",
  6790. "type": "string"
  6791. },
  6792. "session_timeline": {
  6793. "description": "Show session timeline",
  6794. "default": "<leader>g",
  6795. "type": "string"
  6796. },
  6797. "session_share": {
  6798. "description": "Share current session",
  6799. "default": "none",
  6800. "type": "string"
  6801. },
  6802. "session_unshare": {
  6803. "description": "Unshare current session",
  6804. "default": "none",
  6805. "type": "string"
  6806. },
  6807. "session_interrupt": {
  6808. "description": "Interrupt current session",
  6809. "default": "escape",
  6810. "type": "string"
  6811. },
  6812. "session_compact": {
  6813. "description": "Compact the session",
  6814. "default": "<leader>c",
  6815. "type": "string"
  6816. },
  6817. "messages_page_up": {
  6818. "description": "Scroll messages up by one page",
  6819. "default": "pageup",
  6820. "type": "string"
  6821. },
  6822. "messages_page_down": {
  6823. "description": "Scroll messages down by one page",
  6824. "default": "pagedown",
  6825. "type": "string"
  6826. },
  6827. "messages_half_page_up": {
  6828. "description": "Scroll messages up by half page",
  6829. "default": "ctrl+alt+u",
  6830. "type": "string"
  6831. },
  6832. "messages_half_page_down": {
  6833. "description": "Scroll messages down by half page",
  6834. "default": "ctrl+alt+d",
  6835. "type": "string"
  6836. },
  6837. "messages_first": {
  6838. "description": "Navigate to first message",
  6839. "default": "ctrl+g,home",
  6840. "type": "string"
  6841. },
  6842. "messages_last": {
  6843. "description": "Navigate to last message",
  6844. "default": "ctrl+alt+g,end",
  6845. "type": "string"
  6846. },
  6847. "messages_last_user": {
  6848. "description": "Navigate to last user message",
  6849. "default": "none",
  6850. "type": "string"
  6851. },
  6852. "messages_copy": {
  6853. "description": "Copy message",
  6854. "default": "<leader>y",
  6855. "type": "string"
  6856. },
  6857. "messages_undo": {
  6858. "description": "Undo message",
  6859. "default": "<leader>u",
  6860. "type": "string"
  6861. },
  6862. "messages_redo": {
  6863. "description": "Redo message",
  6864. "default": "<leader>r",
  6865. "type": "string"
  6866. },
  6867. "messages_toggle_conceal": {
  6868. "description": "Toggle code block concealment in messages",
  6869. "default": "<leader>h",
  6870. "type": "string"
  6871. },
  6872. "tool_details": {
  6873. "description": "Toggle tool details visibility",
  6874. "default": "none",
  6875. "type": "string"
  6876. },
  6877. "model_list": {
  6878. "description": "List available models",
  6879. "default": "<leader>m",
  6880. "type": "string"
  6881. },
  6882. "model_cycle_recent": {
  6883. "description": "Next recently used model",
  6884. "default": "f2",
  6885. "type": "string"
  6886. },
  6887. "model_cycle_recent_reverse": {
  6888. "description": "Previous recently used model",
  6889. "default": "shift+f2",
  6890. "type": "string"
  6891. },
  6892. "command_list": {
  6893. "description": "List available commands",
  6894. "default": "ctrl+p",
  6895. "type": "string"
  6896. },
  6897. "agent_list": {
  6898. "description": "List agents",
  6899. "default": "<leader>a",
  6900. "type": "string"
  6901. },
  6902. "agent_cycle": {
  6903. "description": "Next agent",
  6904. "default": "tab",
  6905. "type": "string"
  6906. },
  6907. "agent_cycle_reverse": {
  6908. "description": "Previous agent",
  6909. "default": "shift+tab",
  6910. "type": "string"
  6911. },
  6912. "input_clear": {
  6913. "description": "Clear input field",
  6914. "default": "ctrl+c",
  6915. "type": "string"
  6916. },
  6917. "input_forward_delete": {
  6918. "description": "Forward delete",
  6919. "default": "ctrl+d",
  6920. "type": "string"
  6921. },
  6922. "input_paste": {
  6923. "description": "Paste from clipboard",
  6924. "default": "ctrl+v",
  6925. "type": "string"
  6926. },
  6927. "input_submit": {
  6928. "description": "Submit input",
  6929. "default": "return",
  6930. "type": "string"
  6931. },
  6932. "input_newline": {
  6933. "description": "Insert newline in input",
  6934. "default": "shift+return,ctrl+j",
  6935. "type": "string"
  6936. },
  6937. "history_previous": {
  6938. "description": "Previous history item",
  6939. "default": "up",
  6940. "type": "string"
  6941. },
  6942. "history_next": {
  6943. "description": "Next history item",
  6944. "default": "down",
  6945. "type": "string"
  6946. },
  6947. "session_child_cycle": {
  6948. "description": "Next child session",
  6949. "default": "<leader>right",
  6950. "type": "string"
  6951. },
  6952. "session_child_cycle_reverse": {
  6953. "description": "Previous child session",
  6954. "default": "<leader>left",
  6955. "type": "string"
  6956. },
  6957. "terminal_suspend": {
  6958. "description": "Suspend terminal",
  6959. "default": "ctrl+z",
  6960. "type": "string"
  6961. }
  6962. },
  6963. "additionalProperties": false
  6964. },
  6965. "AgentConfig": {
  6966. "type": "object",
  6967. "properties": {
  6968. "model": {
  6969. "type": "string"
  6970. },
  6971. "temperature": {
  6972. "type": "number"
  6973. },
  6974. "top_p": {
  6975. "type": "number"
  6976. },
  6977. "prompt": {
  6978. "type": "string"
  6979. },
  6980. "tools": {
  6981. "type": "object",
  6982. "propertyNames": {
  6983. "type": "string"
  6984. },
  6985. "additionalProperties": {
  6986. "type": "boolean"
  6987. }
  6988. },
  6989. "disable": {
  6990. "type": "boolean"
  6991. },
  6992. "description": {
  6993. "description": "Description of when to use the agent",
  6994. "type": "string"
  6995. },
  6996. "mode": {
  6997. "type": "string",
  6998. "enum": ["subagent", "primary", "all"]
  6999. },
  7000. "color": {
  7001. "description": "Hex color code for the agent (e.g., #FF5733)",
  7002. "type": "string",
  7003. "pattern": "^#[0-9a-fA-F]{6}$"
  7004. },
  7005. "maxSteps": {
  7006. "description": "Maximum number of agentic iterations before forcing text-only response",
  7007. "type": "integer",
  7008. "exclusiveMinimum": 0,
  7009. "maximum": 9007199254740991
  7010. },
  7011. "permission": {
  7012. "type": "object",
  7013. "properties": {
  7014. "edit": {
  7015. "type": "string",
  7016. "enum": ["ask", "allow", "deny"]
  7017. },
  7018. "bash": {
  7019. "anyOf": [
  7020. {
  7021. "type": "string",
  7022. "enum": ["ask", "allow", "deny"]
  7023. },
  7024. {
  7025. "type": "object",
  7026. "propertyNames": {
  7027. "type": "string"
  7028. },
  7029. "additionalProperties": {
  7030. "type": "string",
  7031. "enum": ["ask", "allow", "deny"]
  7032. }
  7033. }
  7034. ]
  7035. },
  7036. "webfetch": {
  7037. "type": "string",
  7038. "enum": ["ask", "allow", "deny"]
  7039. },
  7040. "doom_loop": {
  7041. "type": "string",
  7042. "enum": ["ask", "allow", "deny"]
  7043. },
  7044. "external_directory": {
  7045. "type": "string",
  7046. "enum": ["ask", "allow", "deny"]
  7047. }
  7048. }
  7049. }
  7050. },
  7051. "additionalProperties": {}
  7052. },
  7053. "ProviderConfig": {
  7054. "type": "object",
  7055. "properties": {
  7056. "api": {
  7057. "type": "string"
  7058. },
  7059. "name": {
  7060. "type": "string"
  7061. },
  7062. "env": {
  7063. "type": "array",
  7064. "items": {
  7065. "type": "string"
  7066. }
  7067. },
  7068. "id": {
  7069. "type": "string"
  7070. },
  7071. "npm": {
  7072. "type": "string"
  7073. },
  7074. "models": {
  7075. "type": "object",
  7076. "propertyNames": {
  7077. "type": "string"
  7078. },
  7079. "additionalProperties": {
  7080. "type": "object",
  7081. "properties": {
  7082. "id": {
  7083. "type": "string"
  7084. },
  7085. "name": {
  7086. "type": "string"
  7087. },
  7088. "release_date": {
  7089. "type": "string"
  7090. },
  7091. "attachment": {
  7092. "type": "boolean"
  7093. },
  7094. "reasoning": {
  7095. "type": "boolean"
  7096. },
  7097. "temperature": {
  7098. "type": "boolean"
  7099. },
  7100. "tool_call": {
  7101. "type": "boolean"
  7102. },
  7103. "cost": {
  7104. "type": "object",
  7105. "properties": {
  7106. "input": {
  7107. "type": "number"
  7108. },
  7109. "output": {
  7110. "type": "number"
  7111. },
  7112. "cache_read": {
  7113. "type": "number"
  7114. },
  7115. "cache_write": {
  7116. "type": "number"
  7117. },
  7118. "context_over_200k": {
  7119. "type": "object",
  7120. "properties": {
  7121. "input": {
  7122. "type": "number"
  7123. },
  7124. "output": {
  7125. "type": "number"
  7126. },
  7127. "cache_read": {
  7128. "type": "number"
  7129. },
  7130. "cache_write": {
  7131. "type": "number"
  7132. }
  7133. },
  7134. "required": ["input", "output"]
  7135. }
  7136. },
  7137. "required": ["input", "output"]
  7138. },
  7139. "limit": {
  7140. "type": "object",
  7141. "properties": {
  7142. "context": {
  7143. "type": "number"
  7144. },
  7145. "output": {
  7146. "type": "number"
  7147. }
  7148. },
  7149. "required": ["context", "output"]
  7150. },
  7151. "modalities": {
  7152. "type": "object",
  7153. "properties": {
  7154. "input": {
  7155. "type": "array",
  7156. "items": {
  7157. "type": "string",
  7158. "enum": ["text", "audio", "image", "video", "pdf"]
  7159. }
  7160. },
  7161. "output": {
  7162. "type": "array",
  7163. "items": {
  7164. "type": "string",
  7165. "enum": ["text", "audio", "image", "video", "pdf"]
  7166. }
  7167. }
  7168. },
  7169. "required": ["input", "output"]
  7170. },
  7171. "experimental": {
  7172. "type": "boolean"
  7173. },
  7174. "status": {
  7175. "type": "string",
  7176. "enum": ["alpha", "beta", "deprecated"]
  7177. },
  7178. "options": {
  7179. "type": "object",
  7180. "propertyNames": {
  7181. "type": "string"
  7182. },
  7183. "additionalProperties": {}
  7184. },
  7185. "headers": {
  7186. "type": "object",
  7187. "propertyNames": {
  7188. "type": "string"
  7189. },
  7190. "additionalProperties": {
  7191. "type": "string"
  7192. }
  7193. },
  7194. "provider": {
  7195. "type": "object",
  7196. "properties": {
  7197. "npm": {
  7198. "type": "string"
  7199. }
  7200. },
  7201. "required": ["npm"]
  7202. }
  7203. }
  7204. }
  7205. },
  7206. "whitelist": {
  7207. "type": "array",
  7208. "items": {
  7209. "type": "string"
  7210. }
  7211. },
  7212. "blacklist": {
  7213. "type": "array",
  7214. "items": {
  7215. "type": "string"
  7216. }
  7217. },
  7218. "options": {
  7219. "type": "object",
  7220. "properties": {
  7221. "apiKey": {
  7222. "type": "string"
  7223. },
  7224. "baseURL": {
  7225. "type": "string"
  7226. },
  7227. "enterpriseUrl": {
  7228. "description": "GitHub Enterprise URL for copilot authentication",
  7229. "type": "string"
  7230. },
  7231. "setCacheKey": {
  7232. "description": "Enable promptCacheKey for this provider (default false)",
  7233. "type": "boolean"
  7234. },
  7235. "timeout": {
  7236. "description": "Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout.",
  7237. "anyOf": [
  7238. {
  7239. "description": "Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout.",
  7240. "type": "integer",
  7241. "exclusiveMinimum": 0,
  7242. "maximum": 9007199254740991
  7243. },
  7244. {
  7245. "description": "Disable timeout for this provider entirely.",
  7246. "type": "boolean",
  7247. "const": false
  7248. }
  7249. ]
  7250. }
  7251. },
  7252. "additionalProperties": {}
  7253. }
  7254. },
  7255. "additionalProperties": false
  7256. },
  7257. "McpLocalConfig": {
  7258. "type": "object",
  7259. "properties": {
  7260. "type": {
  7261. "description": "Type of MCP server connection",
  7262. "type": "string",
  7263. "const": "local"
  7264. },
  7265. "command": {
  7266. "description": "Command and arguments to run the MCP server",
  7267. "type": "array",
  7268. "items": {
  7269. "type": "string"
  7270. }
  7271. },
  7272. "environment": {
  7273. "description": "Environment variables to set when running the MCP server",
  7274. "type": "object",
  7275. "propertyNames": {
  7276. "type": "string"
  7277. },
  7278. "additionalProperties": {
  7279. "type": "string"
  7280. }
  7281. },
  7282. "enabled": {
  7283. "description": "Enable or disable the MCP server on startup",
  7284. "type": "boolean"
  7285. },
  7286. "timeout": {
  7287. "description": "Timeout in ms for fetching tools from the MCP server. Defaults to 5000 (5 seconds) if not specified.",
  7288. "type": "integer",
  7289. "exclusiveMinimum": 0,
  7290. "maximum": 9007199254740991
  7291. }
  7292. },
  7293. "required": ["type", "command"],
  7294. "additionalProperties": false
  7295. },
  7296. "McpOAuthConfig": {
  7297. "type": "object",
  7298. "properties": {
  7299. "clientId": {
  7300. "description": "OAuth client ID. If not provided, dynamic client registration (RFC 7591) will be attempted.",
  7301. "type": "string"
  7302. },
  7303. "clientSecret": {
  7304. "description": "OAuth client secret (if required by the authorization server)",
  7305. "type": "string"
  7306. },
  7307. "scope": {
  7308. "description": "OAuth scopes to request during authorization",
  7309. "type": "string"
  7310. }
  7311. },
  7312. "additionalProperties": false
  7313. },
  7314. "McpRemoteConfig": {
  7315. "type": "object",
  7316. "properties": {
  7317. "type": {
  7318. "description": "Type of MCP server connection",
  7319. "type": "string",
  7320. "const": "remote"
  7321. },
  7322. "url": {
  7323. "description": "URL of the remote MCP server",
  7324. "type": "string"
  7325. },
  7326. "enabled": {
  7327. "description": "Enable or disable the MCP server on startup",
  7328. "type": "boolean"
  7329. },
  7330. "headers": {
  7331. "description": "Headers to send with the request",
  7332. "type": "object",
  7333. "propertyNames": {
  7334. "type": "string"
  7335. },
  7336. "additionalProperties": {
  7337. "type": "string"
  7338. }
  7339. },
  7340. "oauth": {
  7341. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection.",
  7342. "anyOf": [
  7343. {
  7344. "$ref": "#/components/schemas/McpOAuthConfig"
  7345. },
  7346. {
  7347. "type": "boolean",
  7348. "const": false
  7349. }
  7350. ]
  7351. },
  7352. "timeout": {
  7353. "description": "Timeout in ms for fetching tools from the MCP server. Defaults to 5000 (5 seconds) if not specified.",
  7354. "type": "integer",
  7355. "exclusiveMinimum": 0,
  7356. "maximum": 9007199254740991
  7357. }
  7358. },
  7359. "required": ["type", "url"],
  7360. "additionalProperties": false
  7361. },
  7362. "LayoutConfig": {
  7363. "description": "@deprecated Always uses stretch layout.",
  7364. "type": "string",
  7365. "enum": ["auto", "stretch"]
  7366. },
  7367. "Config": {
  7368. "type": "object",
  7369. "properties": {
  7370. "$schema": {
  7371. "description": "JSON schema reference for configuration validation",
  7372. "type": "string"
  7373. },
  7374. "theme": {
  7375. "description": "Theme name to use for the interface",
  7376. "type": "string"
  7377. },
  7378. "keybinds": {
  7379. "$ref": "#/components/schemas/KeybindsConfig"
  7380. },
  7381. "tui": {
  7382. "description": "TUI specific settings",
  7383. "type": "object",
  7384. "properties": {
  7385. "scroll_speed": {
  7386. "description": "TUI scroll speed",
  7387. "type": "number",
  7388. "minimum": 0.001
  7389. },
  7390. "scroll_acceleration": {
  7391. "description": "Scroll acceleration settings",
  7392. "type": "object",
  7393. "properties": {
  7394. "enabled": {
  7395. "description": "Enable scroll acceleration",
  7396. "type": "boolean"
  7397. }
  7398. },
  7399. "required": ["enabled"]
  7400. },
  7401. "diff_style": {
  7402. "description": "Control diff rendering style: 'auto' adapts to terminal width, 'stacked' always shows single column",
  7403. "type": "string",
  7404. "enum": ["auto", "stacked"]
  7405. }
  7406. }
  7407. },
  7408. "command": {
  7409. "description": "Command configuration, see https://opencode.ai/docs/commands",
  7410. "type": "object",
  7411. "propertyNames": {
  7412. "type": "string"
  7413. },
  7414. "additionalProperties": {
  7415. "type": "object",
  7416. "properties": {
  7417. "template": {
  7418. "type": "string"
  7419. },
  7420. "description": {
  7421. "type": "string"
  7422. },
  7423. "agent": {
  7424. "type": "string"
  7425. },
  7426. "model": {
  7427. "type": "string"
  7428. },
  7429. "subtask": {
  7430. "type": "boolean"
  7431. }
  7432. },
  7433. "required": ["template"]
  7434. }
  7435. },
  7436. "watcher": {
  7437. "type": "object",
  7438. "properties": {
  7439. "ignore": {
  7440. "type": "array",
  7441. "items": {
  7442. "type": "string"
  7443. }
  7444. }
  7445. }
  7446. },
  7447. "plugin": {
  7448. "type": "array",
  7449. "items": {
  7450. "type": "string"
  7451. }
  7452. },
  7453. "snapshot": {
  7454. "type": "boolean"
  7455. },
  7456. "share": {
  7457. "description": "Control sharing behavior:'manual' allows manual sharing via commands, 'auto' enables automatic sharing, 'disabled' disables all sharing",
  7458. "type": "string",
  7459. "enum": ["manual", "auto", "disabled"]
  7460. },
  7461. "autoshare": {
  7462. "description": "@deprecated Use 'share' field instead. Share newly created sessions automatically",
  7463. "type": "boolean"
  7464. },
  7465. "autoupdate": {
  7466. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications",
  7467. "anyOf": [
  7468. {
  7469. "type": "boolean"
  7470. },
  7471. {
  7472. "type": "string",
  7473. "const": "notify"
  7474. }
  7475. ]
  7476. },
  7477. "disabled_providers": {
  7478. "description": "Disable providers that are loaded automatically",
  7479. "type": "array",
  7480. "items": {
  7481. "type": "string"
  7482. }
  7483. },
  7484. "enabled_providers": {
  7485. "description": "When set, ONLY these providers will be enabled. All other providers will be ignored",
  7486. "type": "array",
  7487. "items": {
  7488. "type": "string"
  7489. }
  7490. },
  7491. "model": {
  7492. "description": "Model to use in the format of provider/model, eg anthropic/claude-2",
  7493. "type": "string"
  7494. },
  7495. "small_model": {
  7496. "description": "Small model to use for tasks like title generation in the format of provider/model",
  7497. "type": "string"
  7498. },
  7499. "username": {
  7500. "description": "Custom username to display in conversations instead of system username",
  7501. "type": "string"
  7502. },
  7503. "mode": {
  7504. "description": "@deprecated Use `agent` field instead.",
  7505. "type": "object",
  7506. "properties": {
  7507. "build": {
  7508. "$ref": "#/components/schemas/AgentConfig"
  7509. },
  7510. "plan": {
  7511. "$ref": "#/components/schemas/AgentConfig"
  7512. }
  7513. },
  7514. "additionalProperties": {
  7515. "$ref": "#/components/schemas/AgentConfig"
  7516. }
  7517. },
  7518. "agent": {
  7519. "description": "Agent configuration, see https://opencode.ai/docs/agent",
  7520. "type": "object",
  7521. "properties": {
  7522. "plan": {
  7523. "$ref": "#/components/schemas/AgentConfig"
  7524. },
  7525. "build": {
  7526. "$ref": "#/components/schemas/AgentConfig"
  7527. },
  7528. "general": {
  7529. "$ref": "#/components/schemas/AgentConfig"
  7530. },
  7531. "explore": {
  7532. "$ref": "#/components/schemas/AgentConfig"
  7533. }
  7534. },
  7535. "additionalProperties": {
  7536. "$ref": "#/components/schemas/AgentConfig"
  7537. }
  7538. },
  7539. "provider": {
  7540. "description": "Custom provider configurations and model overrides",
  7541. "type": "object",
  7542. "propertyNames": {
  7543. "type": "string"
  7544. },
  7545. "additionalProperties": {
  7546. "$ref": "#/components/schemas/ProviderConfig"
  7547. }
  7548. },
  7549. "mcp": {
  7550. "description": "MCP (Model Context Protocol) server configurations",
  7551. "type": "object",
  7552. "propertyNames": {
  7553. "type": "string"
  7554. },
  7555. "additionalProperties": {
  7556. "anyOf": [
  7557. {
  7558. "$ref": "#/components/schemas/McpLocalConfig"
  7559. },
  7560. {
  7561. "$ref": "#/components/schemas/McpRemoteConfig"
  7562. }
  7563. ]
  7564. }
  7565. },
  7566. "formatter": {
  7567. "anyOf": [
  7568. {
  7569. "type": "boolean",
  7570. "const": false
  7571. },
  7572. {
  7573. "type": "object",
  7574. "propertyNames": {
  7575. "type": "string"
  7576. },
  7577. "additionalProperties": {
  7578. "type": "object",
  7579. "properties": {
  7580. "disabled": {
  7581. "type": "boolean"
  7582. },
  7583. "command": {
  7584. "type": "array",
  7585. "items": {
  7586. "type": "string"
  7587. }
  7588. },
  7589. "environment": {
  7590. "type": "object",
  7591. "propertyNames": {
  7592. "type": "string"
  7593. },
  7594. "additionalProperties": {
  7595. "type": "string"
  7596. }
  7597. },
  7598. "extensions": {
  7599. "type": "array",
  7600. "items": {
  7601. "type": "string"
  7602. }
  7603. }
  7604. }
  7605. }
  7606. }
  7607. ]
  7608. },
  7609. "lsp": {
  7610. "anyOf": [
  7611. {
  7612. "type": "boolean",
  7613. "const": false
  7614. },
  7615. {
  7616. "type": "object",
  7617. "propertyNames": {
  7618. "type": "string"
  7619. },
  7620. "additionalProperties": {
  7621. "anyOf": [
  7622. {
  7623. "type": "object",
  7624. "properties": {
  7625. "disabled": {
  7626. "type": "boolean",
  7627. "const": true
  7628. }
  7629. },
  7630. "required": ["disabled"]
  7631. },
  7632. {
  7633. "type": "object",
  7634. "properties": {
  7635. "command": {
  7636. "type": "array",
  7637. "items": {
  7638. "type": "string"
  7639. }
  7640. },
  7641. "extensions": {
  7642. "type": "array",
  7643. "items": {
  7644. "type": "string"
  7645. }
  7646. },
  7647. "disabled": {
  7648. "type": "boolean"
  7649. },
  7650. "env": {
  7651. "type": "object",
  7652. "propertyNames": {
  7653. "type": "string"
  7654. },
  7655. "additionalProperties": {
  7656. "type": "string"
  7657. }
  7658. },
  7659. "initialization": {
  7660. "type": "object",
  7661. "propertyNames": {
  7662. "type": "string"
  7663. },
  7664. "additionalProperties": {}
  7665. }
  7666. },
  7667. "required": ["command"]
  7668. }
  7669. ]
  7670. }
  7671. }
  7672. ]
  7673. },
  7674. "instructions": {
  7675. "description": "Additional instruction files or patterns to include",
  7676. "type": "array",
  7677. "items": {
  7678. "type": "string"
  7679. }
  7680. },
  7681. "layout": {
  7682. "$ref": "#/components/schemas/LayoutConfig"
  7683. },
  7684. "permission": {
  7685. "type": "object",
  7686. "properties": {
  7687. "edit": {
  7688. "type": "string",
  7689. "enum": ["ask", "allow", "deny"]
  7690. },
  7691. "bash": {
  7692. "anyOf": [
  7693. {
  7694. "type": "string",
  7695. "enum": ["ask", "allow", "deny"]
  7696. },
  7697. {
  7698. "type": "object",
  7699. "propertyNames": {
  7700. "type": "string"
  7701. },
  7702. "additionalProperties": {
  7703. "type": "string",
  7704. "enum": ["ask", "allow", "deny"]
  7705. }
  7706. }
  7707. ]
  7708. },
  7709. "webfetch": {
  7710. "type": "string",
  7711. "enum": ["ask", "allow", "deny"]
  7712. },
  7713. "doom_loop": {
  7714. "type": "string",
  7715. "enum": ["ask", "allow", "deny"]
  7716. },
  7717. "external_directory": {
  7718. "type": "string",
  7719. "enum": ["ask", "allow", "deny"]
  7720. }
  7721. }
  7722. },
  7723. "tools": {
  7724. "type": "object",
  7725. "propertyNames": {
  7726. "type": "string"
  7727. },
  7728. "additionalProperties": {
  7729. "type": "boolean"
  7730. }
  7731. },
  7732. "enterprise": {
  7733. "type": "object",
  7734. "properties": {
  7735. "url": {
  7736. "description": "Enterprise URL",
  7737. "type": "string"
  7738. }
  7739. }
  7740. },
  7741. "experimental": {
  7742. "type": "object",
  7743. "properties": {
  7744. "hook": {
  7745. "type": "object",
  7746. "properties": {
  7747. "file_edited": {
  7748. "type": "object",
  7749. "propertyNames": {
  7750. "type": "string"
  7751. },
  7752. "additionalProperties": {
  7753. "type": "array",
  7754. "items": {
  7755. "type": "object",
  7756. "properties": {
  7757. "command": {
  7758. "type": "array",
  7759. "items": {
  7760. "type": "string"
  7761. }
  7762. },
  7763. "environment": {
  7764. "type": "object",
  7765. "propertyNames": {
  7766. "type": "string"
  7767. },
  7768. "additionalProperties": {
  7769. "type": "string"
  7770. }
  7771. }
  7772. },
  7773. "required": ["command"]
  7774. }
  7775. }
  7776. },
  7777. "session_completed": {
  7778. "type": "array",
  7779. "items": {
  7780. "type": "object",
  7781. "properties": {
  7782. "command": {
  7783. "type": "array",
  7784. "items": {
  7785. "type": "string"
  7786. }
  7787. },
  7788. "environment": {
  7789. "type": "object",
  7790. "propertyNames": {
  7791. "type": "string"
  7792. },
  7793. "additionalProperties": {
  7794. "type": "string"
  7795. }
  7796. }
  7797. },
  7798. "required": ["command"]
  7799. }
  7800. }
  7801. }
  7802. },
  7803. "chatMaxRetries": {
  7804. "description": "Number of retries for chat completions on failure",
  7805. "type": "number"
  7806. },
  7807. "disable_paste_summary": {
  7808. "type": "boolean"
  7809. },
  7810. "batch_tool": {
  7811. "description": "Enable the batch tool",
  7812. "type": "boolean"
  7813. },
  7814. "openTelemetry": {
  7815. "description": "Enable OpenTelemetry spans for AI SDK calls (using the 'experimental_telemetry' flag)",
  7816. "type": "boolean"
  7817. },
  7818. "primary_tools": {
  7819. "description": "Tools that should only be available to primary agents.",
  7820. "type": "array",
  7821. "items": {
  7822. "type": "string"
  7823. }
  7824. }
  7825. }
  7826. }
  7827. },
  7828. "additionalProperties": false
  7829. },
  7830. "ToolIDs": {
  7831. "type": "array",
  7832. "items": {
  7833. "type": "string"
  7834. }
  7835. },
  7836. "ToolListItem": {
  7837. "type": "object",
  7838. "properties": {
  7839. "id": {
  7840. "type": "string"
  7841. },
  7842. "description": {
  7843. "type": "string"
  7844. },
  7845. "parameters": {}
  7846. },
  7847. "required": ["id", "description", "parameters"]
  7848. },
  7849. "ToolList": {
  7850. "type": "array",
  7851. "items": {
  7852. "$ref": "#/components/schemas/ToolListItem"
  7853. }
  7854. },
  7855. "Path": {
  7856. "type": "object",
  7857. "properties": {
  7858. "state": {
  7859. "type": "string"
  7860. },
  7861. "config": {
  7862. "type": "string"
  7863. },
  7864. "worktree": {
  7865. "type": "string"
  7866. },
  7867. "directory": {
  7868. "type": "string"
  7869. }
  7870. },
  7871. "required": ["state", "config", "worktree", "directory"]
  7872. },
  7873. "VcsInfo": {
  7874. "type": "object",
  7875. "properties": {
  7876. "branch": {
  7877. "type": "string"
  7878. }
  7879. },
  7880. "required": ["branch"]
  7881. },
  7882. "TextPartInput": {
  7883. "type": "object",
  7884. "properties": {
  7885. "id": {
  7886. "type": "string"
  7887. },
  7888. "type": {
  7889. "type": "string",
  7890. "const": "text"
  7891. },
  7892. "text": {
  7893. "type": "string"
  7894. },
  7895. "synthetic": {
  7896. "type": "boolean"
  7897. },
  7898. "ignored": {
  7899. "type": "boolean"
  7900. },
  7901. "time": {
  7902. "type": "object",
  7903. "properties": {
  7904. "start": {
  7905. "type": "number"
  7906. },
  7907. "end": {
  7908. "type": "number"
  7909. }
  7910. },
  7911. "required": ["start"]
  7912. },
  7913. "metadata": {
  7914. "type": "object",
  7915. "propertyNames": {
  7916. "type": "string"
  7917. },
  7918. "additionalProperties": {}
  7919. }
  7920. },
  7921. "required": ["type", "text"]
  7922. },
  7923. "FilePartInput": {
  7924. "type": "object",
  7925. "properties": {
  7926. "id": {
  7927. "type": "string"
  7928. },
  7929. "type": {
  7930. "type": "string",
  7931. "const": "file"
  7932. },
  7933. "mime": {
  7934. "type": "string"
  7935. },
  7936. "filename": {
  7937. "type": "string"
  7938. },
  7939. "url": {
  7940. "type": "string"
  7941. },
  7942. "source": {
  7943. "$ref": "#/components/schemas/FilePartSource"
  7944. }
  7945. },
  7946. "required": ["type", "mime", "url"]
  7947. },
  7948. "AgentPartInput": {
  7949. "type": "object",
  7950. "properties": {
  7951. "id": {
  7952. "type": "string"
  7953. },
  7954. "type": {
  7955. "type": "string",
  7956. "const": "agent"
  7957. },
  7958. "name": {
  7959. "type": "string"
  7960. },
  7961. "source": {
  7962. "type": "object",
  7963. "properties": {
  7964. "value": {
  7965. "type": "string"
  7966. },
  7967. "start": {
  7968. "type": "integer",
  7969. "minimum": -9007199254740991,
  7970. "maximum": 9007199254740991
  7971. },
  7972. "end": {
  7973. "type": "integer",
  7974. "minimum": -9007199254740991,
  7975. "maximum": 9007199254740991
  7976. }
  7977. },
  7978. "required": ["value", "start", "end"]
  7979. }
  7980. },
  7981. "required": ["type", "name"]
  7982. },
  7983. "SubtaskPartInput": {
  7984. "type": "object",
  7985. "properties": {
  7986. "id": {
  7987. "type": "string"
  7988. },
  7989. "type": {
  7990. "type": "string",
  7991. "const": "subtask"
  7992. },
  7993. "prompt": {
  7994. "type": "string"
  7995. },
  7996. "description": {
  7997. "type": "string"
  7998. },
  7999. "agent": {
  8000. "type": "string"
  8001. }
  8002. },
  8003. "required": ["type", "prompt", "description", "agent"]
  8004. },
  8005. "Command": {
  8006. "type": "object",
  8007. "properties": {
  8008. "name": {
  8009. "type": "string"
  8010. },
  8011. "description": {
  8012. "type": "string"
  8013. },
  8014. "agent": {
  8015. "type": "string"
  8016. },
  8017. "model": {
  8018. "type": "string"
  8019. },
  8020. "template": {
  8021. "type": "string"
  8022. },
  8023. "subtask": {
  8024. "type": "boolean"
  8025. }
  8026. },
  8027. "required": ["name", "template"]
  8028. },
  8029. "Model": {
  8030. "type": "object",
  8031. "properties": {
  8032. "id": {
  8033. "type": "string"
  8034. },
  8035. "providerID": {
  8036. "type": "string"
  8037. },
  8038. "api": {
  8039. "type": "object",
  8040. "properties": {
  8041. "id": {
  8042. "type": "string"
  8043. },
  8044. "url": {
  8045. "type": "string"
  8046. },
  8047. "npm": {
  8048. "type": "string"
  8049. }
  8050. },
  8051. "required": ["id", "url", "npm"]
  8052. },
  8053. "name": {
  8054. "type": "string"
  8055. },
  8056. "capabilities": {
  8057. "type": "object",
  8058. "properties": {
  8059. "temperature": {
  8060. "type": "boolean"
  8061. },
  8062. "reasoning": {
  8063. "type": "boolean"
  8064. },
  8065. "attachment": {
  8066. "type": "boolean"
  8067. },
  8068. "toolcall": {
  8069. "type": "boolean"
  8070. },
  8071. "input": {
  8072. "type": "object",
  8073. "properties": {
  8074. "text": {
  8075. "type": "boolean"
  8076. },
  8077. "audio": {
  8078. "type": "boolean"
  8079. },
  8080. "image": {
  8081. "type": "boolean"
  8082. },
  8083. "video": {
  8084. "type": "boolean"
  8085. },
  8086. "pdf": {
  8087. "type": "boolean"
  8088. }
  8089. },
  8090. "required": ["text", "audio", "image", "video", "pdf"]
  8091. },
  8092. "output": {
  8093. "type": "object",
  8094. "properties": {
  8095. "text": {
  8096. "type": "boolean"
  8097. },
  8098. "audio": {
  8099. "type": "boolean"
  8100. },
  8101. "image": {
  8102. "type": "boolean"
  8103. },
  8104. "video": {
  8105. "type": "boolean"
  8106. },
  8107. "pdf": {
  8108. "type": "boolean"
  8109. }
  8110. },
  8111. "required": ["text", "audio", "image", "video", "pdf"]
  8112. }
  8113. },
  8114. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output"]
  8115. },
  8116. "cost": {
  8117. "type": "object",
  8118. "properties": {
  8119. "input": {
  8120. "type": "number"
  8121. },
  8122. "output": {
  8123. "type": "number"
  8124. },
  8125. "cache": {
  8126. "type": "object",
  8127. "properties": {
  8128. "read": {
  8129. "type": "number"
  8130. },
  8131. "write": {
  8132. "type": "number"
  8133. }
  8134. },
  8135. "required": ["read", "write"]
  8136. },
  8137. "experimentalOver200K": {
  8138. "type": "object",
  8139. "properties": {
  8140. "input": {
  8141. "type": "number"
  8142. },
  8143. "output": {
  8144. "type": "number"
  8145. },
  8146. "cache": {
  8147. "type": "object",
  8148. "properties": {
  8149. "read": {
  8150. "type": "number"
  8151. },
  8152. "write": {
  8153. "type": "number"
  8154. }
  8155. },
  8156. "required": ["read", "write"]
  8157. }
  8158. },
  8159. "required": ["input", "output", "cache"]
  8160. }
  8161. },
  8162. "required": ["input", "output", "cache"]
  8163. },
  8164. "limit": {
  8165. "type": "object",
  8166. "properties": {
  8167. "context": {
  8168. "type": "number"
  8169. },
  8170. "output": {
  8171. "type": "number"
  8172. }
  8173. },
  8174. "required": ["context", "output"]
  8175. },
  8176. "status": {
  8177. "type": "string",
  8178. "enum": ["alpha", "beta", "deprecated", "active"]
  8179. },
  8180. "options": {
  8181. "type": "object",
  8182. "propertyNames": {
  8183. "type": "string"
  8184. },
  8185. "additionalProperties": {}
  8186. },
  8187. "headers": {
  8188. "type": "object",
  8189. "propertyNames": {
  8190. "type": "string"
  8191. },
  8192. "additionalProperties": {
  8193. "type": "string"
  8194. }
  8195. }
  8196. },
  8197. "required": ["id", "providerID", "api", "name", "capabilities", "cost", "limit", "status", "options", "headers"]
  8198. },
  8199. "Provider": {
  8200. "type": "object",
  8201. "properties": {
  8202. "id": {
  8203. "type": "string"
  8204. },
  8205. "name": {
  8206. "type": "string"
  8207. },
  8208. "source": {
  8209. "type": "string",
  8210. "enum": ["env", "config", "custom", "api"]
  8211. },
  8212. "env": {
  8213. "type": "array",
  8214. "items": {
  8215. "type": "string"
  8216. }
  8217. },
  8218. "key": {
  8219. "type": "string"
  8220. },
  8221. "options": {
  8222. "type": "object",
  8223. "propertyNames": {
  8224. "type": "string"
  8225. },
  8226. "additionalProperties": {}
  8227. },
  8228. "models": {
  8229. "type": "object",
  8230. "propertyNames": {
  8231. "type": "string"
  8232. },
  8233. "additionalProperties": {
  8234. "$ref": "#/components/schemas/Model"
  8235. }
  8236. }
  8237. },
  8238. "required": ["id", "name", "source", "env", "options", "models"]
  8239. },
  8240. "ProviderAuthMethod": {
  8241. "type": "object",
  8242. "properties": {
  8243. "type": {
  8244. "anyOf": [
  8245. {
  8246. "type": "string",
  8247. "const": "oauth"
  8248. },
  8249. {
  8250. "type": "string",
  8251. "const": "api"
  8252. }
  8253. ]
  8254. },
  8255. "label": {
  8256. "type": "string"
  8257. }
  8258. },
  8259. "required": ["type", "label"]
  8260. },
  8261. "ProviderAuthAuthorization": {
  8262. "type": "object",
  8263. "properties": {
  8264. "url": {
  8265. "type": "string"
  8266. },
  8267. "method": {
  8268. "anyOf": [
  8269. {
  8270. "type": "string",
  8271. "const": "auto"
  8272. },
  8273. {
  8274. "type": "string",
  8275. "const": "code"
  8276. }
  8277. ]
  8278. },
  8279. "instructions": {
  8280. "type": "string"
  8281. }
  8282. },
  8283. "required": ["url", "method", "instructions"]
  8284. },
  8285. "Symbol": {
  8286. "type": "object",
  8287. "properties": {
  8288. "name": {
  8289. "type": "string"
  8290. },
  8291. "kind": {
  8292. "type": "number"
  8293. },
  8294. "location": {
  8295. "type": "object",
  8296. "properties": {
  8297. "uri": {
  8298. "type": "string"
  8299. },
  8300. "range": {
  8301. "$ref": "#/components/schemas/Range"
  8302. }
  8303. },
  8304. "required": ["uri", "range"]
  8305. }
  8306. },
  8307. "required": ["name", "kind", "location"]
  8308. },
  8309. "FileNode": {
  8310. "type": "object",
  8311. "properties": {
  8312. "name": {
  8313. "type": "string"
  8314. },
  8315. "path": {
  8316. "type": "string"
  8317. },
  8318. "absolute": {
  8319. "type": "string"
  8320. },
  8321. "type": {
  8322. "type": "string",
  8323. "enum": ["file", "directory"]
  8324. },
  8325. "ignored": {
  8326. "type": "boolean"
  8327. }
  8328. },
  8329. "required": ["name", "path", "absolute", "type", "ignored"]
  8330. },
  8331. "FileContent": {
  8332. "type": "object",
  8333. "properties": {
  8334. "type": {
  8335. "type": "string",
  8336. "const": "text"
  8337. },
  8338. "content": {
  8339. "type": "string"
  8340. },
  8341. "diff": {
  8342. "type": "string"
  8343. },
  8344. "patch": {
  8345. "type": "object",
  8346. "properties": {
  8347. "oldFileName": {
  8348. "type": "string"
  8349. },
  8350. "newFileName": {
  8351. "type": "string"
  8352. },
  8353. "oldHeader": {
  8354. "type": "string"
  8355. },
  8356. "newHeader": {
  8357. "type": "string"
  8358. },
  8359. "hunks": {
  8360. "type": "array",
  8361. "items": {
  8362. "type": "object",
  8363. "properties": {
  8364. "oldStart": {
  8365. "type": "number"
  8366. },
  8367. "oldLines": {
  8368. "type": "number"
  8369. },
  8370. "newStart": {
  8371. "type": "number"
  8372. },
  8373. "newLines": {
  8374. "type": "number"
  8375. },
  8376. "lines": {
  8377. "type": "array",
  8378. "items": {
  8379. "type": "string"
  8380. }
  8381. }
  8382. },
  8383. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"]
  8384. }
  8385. },
  8386. "index": {
  8387. "type": "string"
  8388. }
  8389. },
  8390. "required": ["oldFileName", "newFileName", "hunks"]
  8391. },
  8392. "encoding": {
  8393. "type": "string",
  8394. "const": "base64"
  8395. },
  8396. "mimeType": {
  8397. "type": "string"
  8398. }
  8399. },
  8400. "required": ["type", "content"]
  8401. },
  8402. "File": {
  8403. "type": "object",
  8404. "properties": {
  8405. "path": {
  8406. "type": "string"
  8407. },
  8408. "added": {
  8409. "type": "integer",
  8410. "minimum": -9007199254740991,
  8411. "maximum": 9007199254740991
  8412. },
  8413. "removed": {
  8414. "type": "integer",
  8415. "minimum": -9007199254740991,
  8416. "maximum": 9007199254740991
  8417. },
  8418. "status": {
  8419. "type": "string",
  8420. "enum": ["added", "deleted", "modified"]
  8421. }
  8422. },
  8423. "required": ["path", "added", "removed", "status"]
  8424. },
  8425. "Agent": {
  8426. "type": "object",
  8427. "properties": {
  8428. "name": {
  8429. "type": "string"
  8430. },
  8431. "description": {
  8432. "type": "string"
  8433. },
  8434. "mode": {
  8435. "type": "string",
  8436. "enum": ["subagent", "primary", "all"]
  8437. },
  8438. "builtIn": {
  8439. "type": "boolean"
  8440. },
  8441. "topP": {
  8442. "type": "number"
  8443. },
  8444. "temperature": {
  8445. "type": "number"
  8446. },
  8447. "color": {
  8448. "type": "string"
  8449. },
  8450. "permission": {
  8451. "type": "object",
  8452. "properties": {
  8453. "edit": {
  8454. "type": "string",
  8455. "enum": ["ask", "allow", "deny"]
  8456. },
  8457. "bash": {
  8458. "type": "object",
  8459. "propertyNames": {
  8460. "type": "string"
  8461. },
  8462. "additionalProperties": {
  8463. "type": "string",
  8464. "enum": ["ask", "allow", "deny"]
  8465. }
  8466. },
  8467. "webfetch": {
  8468. "type": "string",
  8469. "enum": ["ask", "allow", "deny"]
  8470. },
  8471. "doom_loop": {
  8472. "type": "string",
  8473. "enum": ["ask", "allow", "deny"]
  8474. },
  8475. "external_directory": {
  8476. "type": "string",
  8477. "enum": ["ask", "allow", "deny"]
  8478. }
  8479. },
  8480. "required": ["edit", "bash"]
  8481. },
  8482. "model": {
  8483. "type": "object",
  8484. "properties": {
  8485. "modelID": {
  8486. "type": "string"
  8487. },
  8488. "providerID": {
  8489. "type": "string"
  8490. }
  8491. },
  8492. "required": ["modelID", "providerID"]
  8493. },
  8494. "prompt": {
  8495. "type": "string"
  8496. },
  8497. "tools": {
  8498. "type": "object",
  8499. "propertyNames": {
  8500. "type": "string"
  8501. },
  8502. "additionalProperties": {
  8503. "type": "boolean"
  8504. }
  8505. },
  8506. "options": {
  8507. "type": "object",
  8508. "propertyNames": {
  8509. "type": "string"
  8510. },
  8511. "additionalProperties": {}
  8512. },
  8513. "maxSteps": {
  8514. "type": "integer",
  8515. "exclusiveMinimum": 0,
  8516. "maximum": 9007199254740991
  8517. }
  8518. },
  8519. "required": ["name", "mode", "builtIn", "permission", "tools", "options"]
  8520. },
  8521. "MCPStatusConnected": {
  8522. "type": "object",
  8523. "properties": {
  8524. "status": {
  8525. "type": "string",
  8526. "const": "connected"
  8527. }
  8528. },
  8529. "required": ["status"]
  8530. },
  8531. "MCPStatusDisabled": {
  8532. "type": "object",
  8533. "properties": {
  8534. "status": {
  8535. "type": "string",
  8536. "const": "disabled"
  8537. }
  8538. },
  8539. "required": ["status"]
  8540. },
  8541. "MCPStatusFailed": {
  8542. "type": "object",
  8543. "properties": {
  8544. "status": {
  8545. "type": "string",
  8546. "const": "failed"
  8547. },
  8548. "error": {
  8549. "type": "string"
  8550. }
  8551. },
  8552. "required": ["status", "error"]
  8553. },
  8554. "MCPStatusNeedsAuth": {
  8555. "type": "object",
  8556. "properties": {
  8557. "status": {
  8558. "type": "string",
  8559. "const": "needs_auth"
  8560. }
  8561. },
  8562. "required": ["status"]
  8563. },
  8564. "MCPStatusNeedsClientRegistration": {
  8565. "type": "object",
  8566. "properties": {
  8567. "status": {
  8568. "type": "string",
  8569. "const": "needs_client_registration"
  8570. },
  8571. "error": {
  8572. "type": "string"
  8573. }
  8574. },
  8575. "required": ["status", "error"]
  8576. },
  8577. "MCPStatus": {
  8578. "anyOf": [
  8579. {
  8580. "$ref": "#/components/schemas/MCPStatusConnected"
  8581. },
  8582. {
  8583. "$ref": "#/components/schemas/MCPStatusDisabled"
  8584. },
  8585. {
  8586. "$ref": "#/components/schemas/MCPStatusFailed"
  8587. },
  8588. {
  8589. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  8590. },
  8591. {
  8592. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  8593. }
  8594. ]
  8595. },
  8596. "LSPStatus": {
  8597. "type": "object",
  8598. "properties": {
  8599. "id": {
  8600. "type": "string"
  8601. },
  8602. "name": {
  8603. "type": "string"
  8604. },
  8605. "root": {
  8606. "type": "string"
  8607. },
  8608. "status": {
  8609. "anyOf": [
  8610. {
  8611. "type": "string",
  8612. "const": "connected"
  8613. },
  8614. {
  8615. "type": "string",
  8616. "const": "error"
  8617. }
  8618. ]
  8619. }
  8620. },
  8621. "required": ["id", "name", "root", "status"]
  8622. },
  8623. "FormatterStatus": {
  8624. "type": "object",
  8625. "properties": {
  8626. "name": {
  8627. "type": "string"
  8628. },
  8629. "extensions": {
  8630. "type": "array",
  8631. "items": {
  8632. "type": "string"
  8633. }
  8634. },
  8635. "enabled": {
  8636. "type": "boolean"
  8637. }
  8638. },
  8639. "required": ["name", "extensions", "enabled"]
  8640. },
  8641. "OAuth": {
  8642. "type": "object",
  8643. "properties": {
  8644. "type": {
  8645. "type": "string",
  8646. "const": "oauth"
  8647. },
  8648. "refresh": {
  8649. "type": "string"
  8650. },
  8651. "access": {
  8652. "type": "string"
  8653. },
  8654. "expires": {
  8655. "type": "number"
  8656. },
  8657. "enterpriseUrl": {
  8658. "type": "string"
  8659. }
  8660. },
  8661. "required": ["type", "refresh", "access", "expires"]
  8662. },
  8663. "ApiAuth": {
  8664. "type": "object",
  8665. "properties": {
  8666. "type": {
  8667. "type": "string",
  8668. "const": "api"
  8669. },
  8670. "key": {
  8671. "type": "string"
  8672. }
  8673. },
  8674. "required": ["type", "key"]
  8675. },
  8676. "WellKnownAuth": {
  8677. "type": "object",
  8678. "properties": {
  8679. "type": {
  8680. "type": "string",
  8681. "const": "wellknown"
  8682. },
  8683. "key": {
  8684. "type": "string"
  8685. },
  8686. "token": {
  8687. "type": "string"
  8688. }
  8689. },
  8690. "required": ["type", "key", "token"]
  8691. },
  8692. "Auth": {
  8693. "anyOf": [
  8694. {
  8695. "$ref": "#/components/schemas/OAuth"
  8696. },
  8697. {
  8698. "$ref": "#/components/schemas/ApiAuth"
  8699. },
  8700. {
  8701. "$ref": "#/components/schemas/WellKnownAuth"
  8702. }
  8703. ]
  8704. }
  8705. }
  8706. }
  8707. }