openapi.json 267 KB

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