openapi.json 318 KB

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