openapi.json 304 KB

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