openapi.json 260 KB

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