openapi.json 279 KB

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