openapi.json 303 KB

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