openapi.json 257 KB

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