openapi.json 269 KB

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