openapi.json 262 KB

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