openapi.json 303 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950
  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. "ReasoningPart": {
  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": "reasoning"
  6520. },
  6521. "text": {
  6522. "type": "string"
  6523. },
  6524. "metadata": {
  6525. "type": "object",
  6526. "propertyNames": {
  6527. "type": "string"
  6528. },
  6529. "additionalProperties": {}
  6530. },
  6531. "time": {
  6532. "type": "object",
  6533. "properties": {
  6534. "start": {
  6535. "type": "number"
  6536. },
  6537. "end": {
  6538. "type": "number"
  6539. }
  6540. },
  6541. "required": ["start"]
  6542. }
  6543. },
  6544. "required": ["id", "sessionID", "messageID", "type", "text", "time"]
  6545. },
  6546. "FilePartSourceText": {
  6547. "type": "object",
  6548. "properties": {
  6549. "value": {
  6550. "type": "string"
  6551. },
  6552. "start": {
  6553. "type": "integer",
  6554. "minimum": -9007199254740991,
  6555. "maximum": 9007199254740991
  6556. },
  6557. "end": {
  6558. "type": "integer",
  6559. "minimum": -9007199254740991,
  6560. "maximum": 9007199254740991
  6561. }
  6562. },
  6563. "required": ["value", "start", "end"]
  6564. },
  6565. "FileSource": {
  6566. "type": "object",
  6567. "properties": {
  6568. "text": {
  6569. "$ref": "#/components/schemas/FilePartSourceText"
  6570. },
  6571. "type": {
  6572. "type": "string",
  6573. "const": "file"
  6574. },
  6575. "path": {
  6576. "type": "string"
  6577. }
  6578. },
  6579. "required": ["text", "type", "path"]
  6580. },
  6581. "Range": {
  6582. "type": "object",
  6583. "properties": {
  6584. "start": {
  6585. "type": "object",
  6586. "properties": {
  6587. "line": {
  6588. "type": "number"
  6589. },
  6590. "character": {
  6591. "type": "number"
  6592. }
  6593. },
  6594. "required": ["line", "character"]
  6595. },
  6596. "end": {
  6597. "type": "object",
  6598. "properties": {
  6599. "line": {
  6600. "type": "number"
  6601. },
  6602. "character": {
  6603. "type": "number"
  6604. }
  6605. },
  6606. "required": ["line", "character"]
  6607. }
  6608. },
  6609. "required": ["start", "end"]
  6610. },
  6611. "SymbolSource": {
  6612. "type": "object",
  6613. "properties": {
  6614. "text": {
  6615. "$ref": "#/components/schemas/FilePartSourceText"
  6616. },
  6617. "type": {
  6618. "type": "string",
  6619. "const": "symbol"
  6620. },
  6621. "path": {
  6622. "type": "string"
  6623. },
  6624. "range": {
  6625. "$ref": "#/components/schemas/Range"
  6626. },
  6627. "name": {
  6628. "type": "string"
  6629. },
  6630. "kind": {
  6631. "type": "integer",
  6632. "minimum": -9007199254740991,
  6633. "maximum": 9007199254740991
  6634. }
  6635. },
  6636. "required": ["text", "type", "path", "range", "name", "kind"]
  6637. },
  6638. "ResourceSource": {
  6639. "type": "object",
  6640. "properties": {
  6641. "text": {
  6642. "$ref": "#/components/schemas/FilePartSourceText"
  6643. },
  6644. "type": {
  6645. "type": "string",
  6646. "const": "resource"
  6647. },
  6648. "clientName": {
  6649. "type": "string"
  6650. },
  6651. "uri": {
  6652. "type": "string"
  6653. }
  6654. },
  6655. "required": ["text", "type", "clientName", "uri"]
  6656. },
  6657. "FilePartSource": {
  6658. "anyOf": [
  6659. {
  6660. "$ref": "#/components/schemas/FileSource"
  6661. },
  6662. {
  6663. "$ref": "#/components/schemas/SymbolSource"
  6664. },
  6665. {
  6666. "$ref": "#/components/schemas/ResourceSource"
  6667. }
  6668. ]
  6669. },
  6670. "FilePart": {
  6671. "type": "object",
  6672. "properties": {
  6673. "id": {
  6674. "type": "string"
  6675. },
  6676. "sessionID": {
  6677. "type": "string"
  6678. },
  6679. "messageID": {
  6680. "type": "string"
  6681. },
  6682. "type": {
  6683. "type": "string",
  6684. "const": "file"
  6685. },
  6686. "mime": {
  6687. "type": "string"
  6688. },
  6689. "filename": {
  6690. "type": "string"
  6691. },
  6692. "url": {
  6693. "type": "string"
  6694. },
  6695. "source": {
  6696. "$ref": "#/components/schemas/FilePartSource"
  6697. }
  6698. },
  6699. "required": ["id", "sessionID", "messageID", "type", "mime", "url"]
  6700. },
  6701. "ToolStatePending": {
  6702. "type": "object",
  6703. "properties": {
  6704. "status": {
  6705. "type": "string",
  6706. "const": "pending"
  6707. },
  6708. "input": {
  6709. "type": "object",
  6710. "propertyNames": {
  6711. "type": "string"
  6712. },
  6713. "additionalProperties": {}
  6714. },
  6715. "raw": {
  6716. "type": "string"
  6717. }
  6718. },
  6719. "required": ["status", "input", "raw"]
  6720. },
  6721. "ToolStateRunning": {
  6722. "type": "object",
  6723. "properties": {
  6724. "status": {
  6725. "type": "string",
  6726. "const": "running"
  6727. },
  6728. "input": {
  6729. "type": "object",
  6730. "propertyNames": {
  6731. "type": "string"
  6732. },
  6733. "additionalProperties": {}
  6734. },
  6735. "title": {
  6736. "type": "string"
  6737. },
  6738. "metadata": {
  6739. "type": "object",
  6740. "propertyNames": {
  6741. "type": "string"
  6742. },
  6743. "additionalProperties": {}
  6744. },
  6745. "time": {
  6746. "type": "object",
  6747. "properties": {
  6748. "start": {
  6749. "type": "number"
  6750. }
  6751. },
  6752. "required": ["start"]
  6753. }
  6754. },
  6755. "required": ["status", "input", "time"]
  6756. },
  6757. "ToolStateCompleted": {
  6758. "type": "object",
  6759. "properties": {
  6760. "status": {
  6761. "type": "string",
  6762. "const": "completed"
  6763. },
  6764. "input": {
  6765. "type": "object",
  6766. "propertyNames": {
  6767. "type": "string"
  6768. },
  6769. "additionalProperties": {}
  6770. },
  6771. "output": {
  6772. "type": "string"
  6773. },
  6774. "title": {
  6775. "type": "string"
  6776. },
  6777. "metadata": {
  6778. "type": "object",
  6779. "propertyNames": {
  6780. "type": "string"
  6781. },
  6782. "additionalProperties": {}
  6783. },
  6784. "time": {
  6785. "type": "object",
  6786. "properties": {
  6787. "start": {
  6788. "type": "number"
  6789. },
  6790. "end": {
  6791. "type": "number"
  6792. },
  6793. "compacted": {
  6794. "type": "number"
  6795. }
  6796. },
  6797. "required": ["start", "end"]
  6798. },
  6799. "attachments": {
  6800. "type": "array",
  6801. "items": {
  6802. "$ref": "#/components/schemas/FilePart"
  6803. }
  6804. }
  6805. },
  6806. "required": ["status", "input", "output", "title", "metadata", "time"]
  6807. },
  6808. "ToolStateError": {
  6809. "type": "object",
  6810. "properties": {
  6811. "status": {
  6812. "type": "string",
  6813. "const": "error"
  6814. },
  6815. "input": {
  6816. "type": "object",
  6817. "propertyNames": {
  6818. "type": "string"
  6819. },
  6820. "additionalProperties": {}
  6821. },
  6822. "error": {
  6823. "type": "string"
  6824. },
  6825. "metadata": {
  6826. "type": "object",
  6827. "propertyNames": {
  6828. "type": "string"
  6829. },
  6830. "additionalProperties": {}
  6831. },
  6832. "time": {
  6833. "type": "object",
  6834. "properties": {
  6835. "start": {
  6836. "type": "number"
  6837. },
  6838. "end": {
  6839. "type": "number"
  6840. }
  6841. },
  6842. "required": ["start", "end"]
  6843. }
  6844. },
  6845. "required": ["status", "input", "error", "time"]
  6846. },
  6847. "ToolState": {
  6848. "anyOf": [
  6849. {
  6850. "$ref": "#/components/schemas/ToolStatePending"
  6851. },
  6852. {
  6853. "$ref": "#/components/schemas/ToolStateRunning"
  6854. },
  6855. {
  6856. "$ref": "#/components/schemas/ToolStateCompleted"
  6857. },
  6858. {
  6859. "$ref": "#/components/schemas/ToolStateError"
  6860. }
  6861. ]
  6862. },
  6863. "ToolPart": {
  6864. "type": "object",
  6865. "properties": {
  6866. "id": {
  6867. "type": "string"
  6868. },
  6869. "sessionID": {
  6870. "type": "string"
  6871. },
  6872. "messageID": {
  6873. "type": "string"
  6874. },
  6875. "type": {
  6876. "type": "string",
  6877. "const": "tool"
  6878. },
  6879. "callID": {
  6880. "type": "string"
  6881. },
  6882. "tool": {
  6883. "type": "string"
  6884. },
  6885. "state": {
  6886. "$ref": "#/components/schemas/ToolState"
  6887. },
  6888. "metadata": {
  6889. "type": "object",
  6890. "propertyNames": {
  6891. "type": "string"
  6892. },
  6893. "additionalProperties": {}
  6894. }
  6895. },
  6896. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"]
  6897. },
  6898. "StepStartPart": {
  6899. "type": "object",
  6900. "properties": {
  6901. "id": {
  6902. "type": "string"
  6903. },
  6904. "sessionID": {
  6905. "type": "string"
  6906. },
  6907. "messageID": {
  6908. "type": "string"
  6909. },
  6910. "type": {
  6911. "type": "string",
  6912. "const": "step-start"
  6913. },
  6914. "snapshot": {
  6915. "type": "string"
  6916. }
  6917. },
  6918. "required": ["id", "sessionID", "messageID", "type"]
  6919. },
  6920. "StepFinishPart": {
  6921. "type": "object",
  6922. "properties": {
  6923. "id": {
  6924. "type": "string"
  6925. },
  6926. "sessionID": {
  6927. "type": "string"
  6928. },
  6929. "messageID": {
  6930. "type": "string"
  6931. },
  6932. "type": {
  6933. "type": "string",
  6934. "const": "step-finish"
  6935. },
  6936. "reason": {
  6937. "type": "string"
  6938. },
  6939. "snapshot": {
  6940. "type": "string"
  6941. },
  6942. "cost": {
  6943. "type": "number"
  6944. },
  6945. "tokens": {
  6946. "type": "object",
  6947. "properties": {
  6948. "input": {
  6949. "type": "number"
  6950. },
  6951. "output": {
  6952. "type": "number"
  6953. },
  6954. "reasoning": {
  6955. "type": "number"
  6956. },
  6957. "cache": {
  6958. "type": "object",
  6959. "properties": {
  6960. "read": {
  6961. "type": "number"
  6962. },
  6963. "write": {
  6964. "type": "number"
  6965. }
  6966. },
  6967. "required": ["read", "write"]
  6968. }
  6969. },
  6970. "required": ["input", "output", "reasoning", "cache"]
  6971. }
  6972. },
  6973. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"]
  6974. },
  6975. "SnapshotPart": {
  6976. "type": "object",
  6977. "properties": {
  6978. "id": {
  6979. "type": "string"
  6980. },
  6981. "sessionID": {
  6982. "type": "string"
  6983. },
  6984. "messageID": {
  6985. "type": "string"
  6986. },
  6987. "type": {
  6988. "type": "string",
  6989. "const": "snapshot"
  6990. },
  6991. "snapshot": {
  6992. "type": "string"
  6993. }
  6994. },
  6995. "required": ["id", "sessionID", "messageID", "type", "snapshot"]
  6996. },
  6997. "PatchPart": {
  6998. "type": "object",
  6999. "properties": {
  7000. "id": {
  7001. "type": "string"
  7002. },
  7003. "sessionID": {
  7004. "type": "string"
  7005. },
  7006. "messageID": {
  7007. "type": "string"
  7008. },
  7009. "type": {
  7010. "type": "string",
  7011. "const": "patch"
  7012. },
  7013. "hash": {
  7014. "type": "string"
  7015. },
  7016. "files": {
  7017. "type": "array",
  7018. "items": {
  7019. "type": "string"
  7020. }
  7021. }
  7022. },
  7023. "required": ["id", "sessionID", "messageID", "type", "hash", "files"]
  7024. },
  7025. "AgentPart": {
  7026. "type": "object",
  7027. "properties": {
  7028. "id": {
  7029. "type": "string"
  7030. },
  7031. "sessionID": {
  7032. "type": "string"
  7033. },
  7034. "messageID": {
  7035. "type": "string"
  7036. },
  7037. "type": {
  7038. "type": "string",
  7039. "const": "agent"
  7040. },
  7041. "name": {
  7042. "type": "string"
  7043. },
  7044. "source": {
  7045. "type": "object",
  7046. "properties": {
  7047. "value": {
  7048. "type": "string"
  7049. },
  7050. "start": {
  7051. "type": "integer",
  7052. "minimum": -9007199254740991,
  7053. "maximum": 9007199254740991
  7054. },
  7055. "end": {
  7056. "type": "integer",
  7057. "minimum": -9007199254740991,
  7058. "maximum": 9007199254740991
  7059. }
  7060. },
  7061. "required": ["value", "start", "end"]
  7062. }
  7063. },
  7064. "required": ["id", "sessionID", "messageID", "type", "name"]
  7065. },
  7066. "RetryPart": {
  7067. "type": "object",
  7068. "properties": {
  7069. "id": {
  7070. "type": "string"
  7071. },
  7072. "sessionID": {
  7073. "type": "string"
  7074. },
  7075. "messageID": {
  7076. "type": "string"
  7077. },
  7078. "type": {
  7079. "type": "string",
  7080. "const": "retry"
  7081. },
  7082. "attempt": {
  7083. "type": "number"
  7084. },
  7085. "error": {
  7086. "$ref": "#/components/schemas/APIError"
  7087. },
  7088. "time": {
  7089. "type": "object",
  7090. "properties": {
  7091. "created": {
  7092. "type": "number"
  7093. }
  7094. },
  7095. "required": ["created"]
  7096. }
  7097. },
  7098. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"]
  7099. },
  7100. "CompactionPart": {
  7101. "type": "object",
  7102. "properties": {
  7103. "id": {
  7104. "type": "string"
  7105. },
  7106. "sessionID": {
  7107. "type": "string"
  7108. },
  7109. "messageID": {
  7110. "type": "string"
  7111. },
  7112. "type": {
  7113. "type": "string",
  7114. "const": "compaction"
  7115. },
  7116. "auto": {
  7117. "type": "boolean"
  7118. }
  7119. },
  7120. "required": ["id", "sessionID", "messageID", "type", "auto"]
  7121. },
  7122. "Part": {
  7123. "anyOf": [
  7124. {
  7125. "$ref": "#/components/schemas/TextPart"
  7126. },
  7127. {
  7128. "type": "object",
  7129. "properties": {
  7130. "id": {
  7131. "type": "string"
  7132. },
  7133. "sessionID": {
  7134. "type": "string"
  7135. },
  7136. "messageID": {
  7137. "type": "string"
  7138. },
  7139. "type": {
  7140. "type": "string",
  7141. "const": "subtask"
  7142. },
  7143. "prompt": {
  7144. "type": "string"
  7145. },
  7146. "description": {
  7147. "type": "string"
  7148. },
  7149. "agent": {
  7150. "type": "string"
  7151. },
  7152. "model": {
  7153. "type": "object",
  7154. "properties": {
  7155. "providerID": {
  7156. "type": "string"
  7157. },
  7158. "modelID": {
  7159. "type": "string"
  7160. }
  7161. },
  7162. "required": ["providerID", "modelID"]
  7163. },
  7164. "command": {
  7165. "type": "string"
  7166. }
  7167. },
  7168. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"]
  7169. },
  7170. {
  7171. "$ref": "#/components/schemas/ReasoningPart"
  7172. },
  7173. {
  7174. "$ref": "#/components/schemas/FilePart"
  7175. },
  7176. {
  7177. "$ref": "#/components/schemas/ToolPart"
  7178. },
  7179. {
  7180. "$ref": "#/components/schemas/StepStartPart"
  7181. },
  7182. {
  7183. "$ref": "#/components/schemas/StepFinishPart"
  7184. },
  7185. {
  7186. "$ref": "#/components/schemas/SnapshotPart"
  7187. },
  7188. {
  7189. "$ref": "#/components/schemas/PatchPart"
  7190. },
  7191. {
  7192. "$ref": "#/components/schemas/AgentPart"
  7193. },
  7194. {
  7195. "$ref": "#/components/schemas/RetryPart"
  7196. },
  7197. {
  7198. "$ref": "#/components/schemas/CompactionPart"
  7199. }
  7200. ]
  7201. },
  7202. "Event.message.part.updated": {
  7203. "type": "object",
  7204. "properties": {
  7205. "type": {
  7206. "type": "string",
  7207. "const": "message.part.updated"
  7208. },
  7209. "properties": {
  7210. "type": "object",
  7211. "properties": {
  7212. "part": {
  7213. "$ref": "#/components/schemas/Part"
  7214. },
  7215. "delta": {
  7216. "type": "string"
  7217. }
  7218. },
  7219. "required": ["part"]
  7220. }
  7221. },
  7222. "required": ["type", "properties"]
  7223. },
  7224. "Event.message.part.removed": {
  7225. "type": "object",
  7226. "properties": {
  7227. "type": {
  7228. "type": "string",
  7229. "const": "message.part.removed"
  7230. },
  7231. "properties": {
  7232. "type": "object",
  7233. "properties": {
  7234. "sessionID": {
  7235. "type": "string"
  7236. },
  7237. "messageID": {
  7238. "type": "string"
  7239. },
  7240. "partID": {
  7241. "type": "string"
  7242. }
  7243. },
  7244. "required": ["sessionID", "messageID", "partID"]
  7245. }
  7246. },
  7247. "required": ["type", "properties"]
  7248. },
  7249. "PermissionRequest": {
  7250. "type": "object",
  7251. "properties": {
  7252. "id": {
  7253. "type": "string",
  7254. "pattern": "^per.*"
  7255. },
  7256. "sessionID": {
  7257. "type": "string",
  7258. "pattern": "^ses.*"
  7259. },
  7260. "permission": {
  7261. "type": "string"
  7262. },
  7263. "patterns": {
  7264. "type": "array",
  7265. "items": {
  7266. "type": "string"
  7267. }
  7268. },
  7269. "metadata": {
  7270. "type": "object",
  7271. "propertyNames": {
  7272. "type": "string"
  7273. },
  7274. "additionalProperties": {}
  7275. },
  7276. "always": {
  7277. "type": "array",
  7278. "items": {
  7279. "type": "string"
  7280. }
  7281. },
  7282. "tool": {
  7283. "type": "object",
  7284. "properties": {
  7285. "messageID": {
  7286. "type": "string"
  7287. },
  7288. "callID": {
  7289. "type": "string"
  7290. }
  7291. },
  7292. "required": ["messageID", "callID"]
  7293. }
  7294. },
  7295. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"]
  7296. },
  7297. "Event.permission.asked": {
  7298. "type": "object",
  7299. "properties": {
  7300. "type": {
  7301. "type": "string",
  7302. "const": "permission.asked"
  7303. },
  7304. "properties": {
  7305. "$ref": "#/components/schemas/PermissionRequest"
  7306. }
  7307. },
  7308. "required": ["type", "properties"]
  7309. },
  7310. "Event.permission.replied": {
  7311. "type": "object",
  7312. "properties": {
  7313. "type": {
  7314. "type": "string",
  7315. "const": "permission.replied"
  7316. },
  7317. "properties": {
  7318. "type": "object",
  7319. "properties": {
  7320. "sessionID": {
  7321. "type": "string"
  7322. },
  7323. "requestID": {
  7324. "type": "string"
  7325. },
  7326. "reply": {
  7327. "type": "string",
  7328. "enum": ["once", "always", "reject"]
  7329. }
  7330. },
  7331. "required": ["sessionID", "requestID", "reply"]
  7332. }
  7333. },
  7334. "required": ["type", "properties"]
  7335. },
  7336. "SessionStatus": {
  7337. "anyOf": [
  7338. {
  7339. "type": "object",
  7340. "properties": {
  7341. "type": {
  7342. "type": "string",
  7343. "const": "idle"
  7344. }
  7345. },
  7346. "required": ["type"]
  7347. },
  7348. {
  7349. "type": "object",
  7350. "properties": {
  7351. "type": {
  7352. "type": "string",
  7353. "const": "retry"
  7354. },
  7355. "attempt": {
  7356. "type": "number"
  7357. },
  7358. "message": {
  7359. "type": "string"
  7360. },
  7361. "next": {
  7362. "type": "number"
  7363. }
  7364. },
  7365. "required": ["type", "attempt", "message", "next"]
  7366. },
  7367. {
  7368. "type": "object",
  7369. "properties": {
  7370. "type": {
  7371. "type": "string",
  7372. "const": "busy"
  7373. }
  7374. },
  7375. "required": ["type"]
  7376. }
  7377. ]
  7378. },
  7379. "Event.session.status": {
  7380. "type": "object",
  7381. "properties": {
  7382. "type": {
  7383. "type": "string",
  7384. "const": "session.status"
  7385. },
  7386. "properties": {
  7387. "type": "object",
  7388. "properties": {
  7389. "sessionID": {
  7390. "type": "string"
  7391. },
  7392. "status": {
  7393. "$ref": "#/components/schemas/SessionStatus"
  7394. }
  7395. },
  7396. "required": ["sessionID", "status"]
  7397. }
  7398. },
  7399. "required": ["type", "properties"]
  7400. },
  7401. "Event.session.idle": {
  7402. "type": "object",
  7403. "properties": {
  7404. "type": {
  7405. "type": "string",
  7406. "const": "session.idle"
  7407. },
  7408. "properties": {
  7409. "type": "object",
  7410. "properties": {
  7411. "sessionID": {
  7412. "type": "string"
  7413. }
  7414. },
  7415. "required": ["sessionID"]
  7416. }
  7417. },
  7418. "required": ["type", "properties"]
  7419. },
  7420. "QuestionOption": {
  7421. "type": "object",
  7422. "properties": {
  7423. "label": {
  7424. "description": "Display text (1-5 words, concise)",
  7425. "type": "string"
  7426. },
  7427. "description": {
  7428. "description": "Explanation of choice",
  7429. "type": "string"
  7430. }
  7431. },
  7432. "required": ["label", "description"]
  7433. },
  7434. "QuestionInfo": {
  7435. "type": "object",
  7436. "properties": {
  7437. "question": {
  7438. "description": "Complete question",
  7439. "type": "string"
  7440. },
  7441. "header": {
  7442. "description": "Very short label (max 30 chars)",
  7443. "type": "string"
  7444. },
  7445. "options": {
  7446. "description": "Available choices",
  7447. "type": "array",
  7448. "items": {
  7449. "$ref": "#/components/schemas/QuestionOption"
  7450. }
  7451. },
  7452. "multiple": {
  7453. "description": "Allow selecting multiple choices",
  7454. "type": "boolean"
  7455. },
  7456. "custom": {
  7457. "description": "Allow typing a custom answer (default: true)",
  7458. "type": "boolean"
  7459. }
  7460. },
  7461. "required": ["question", "header", "options"]
  7462. },
  7463. "QuestionRequest": {
  7464. "type": "object",
  7465. "properties": {
  7466. "id": {
  7467. "type": "string",
  7468. "pattern": "^que.*"
  7469. },
  7470. "sessionID": {
  7471. "type": "string",
  7472. "pattern": "^ses.*"
  7473. },
  7474. "questions": {
  7475. "description": "Questions to ask",
  7476. "type": "array",
  7477. "items": {
  7478. "$ref": "#/components/schemas/QuestionInfo"
  7479. }
  7480. },
  7481. "tool": {
  7482. "type": "object",
  7483. "properties": {
  7484. "messageID": {
  7485. "type": "string"
  7486. },
  7487. "callID": {
  7488. "type": "string"
  7489. }
  7490. },
  7491. "required": ["messageID", "callID"]
  7492. }
  7493. },
  7494. "required": ["id", "sessionID", "questions"]
  7495. },
  7496. "Event.question.asked": {
  7497. "type": "object",
  7498. "properties": {
  7499. "type": {
  7500. "type": "string",
  7501. "const": "question.asked"
  7502. },
  7503. "properties": {
  7504. "$ref": "#/components/schemas/QuestionRequest"
  7505. }
  7506. },
  7507. "required": ["type", "properties"]
  7508. },
  7509. "QuestionAnswer": {
  7510. "type": "array",
  7511. "items": {
  7512. "type": "string"
  7513. }
  7514. },
  7515. "Event.question.replied": {
  7516. "type": "object",
  7517. "properties": {
  7518. "type": {
  7519. "type": "string",
  7520. "const": "question.replied"
  7521. },
  7522. "properties": {
  7523. "type": "object",
  7524. "properties": {
  7525. "sessionID": {
  7526. "type": "string"
  7527. },
  7528. "requestID": {
  7529. "type": "string"
  7530. },
  7531. "answers": {
  7532. "type": "array",
  7533. "items": {
  7534. "$ref": "#/components/schemas/QuestionAnswer"
  7535. }
  7536. }
  7537. },
  7538. "required": ["sessionID", "requestID", "answers"]
  7539. }
  7540. },
  7541. "required": ["type", "properties"]
  7542. },
  7543. "Event.question.rejected": {
  7544. "type": "object",
  7545. "properties": {
  7546. "type": {
  7547. "type": "string",
  7548. "const": "question.rejected"
  7549. },
  7550. "properties": {
  7551. "type": "object",
  7552. "properties": {
  7553. "sessionID": {
  7554. "type": "string"
  7555. },
  7556. "requestID": {
  7557. "type": "string"
  7558. }
  7559. },
  7560. "required": ["sessionID", "requestID"]
  7561. }
  7562. },
  7563. "required": ["type", "properties"]
  7564. },
  7565. "Event.session.compacted": {
  7566. "type": "object",
  7567. "properties": {
  7568. "type": {
  7569. "type": "string",
  7570. "const": "session.compacted"
  7571. },
  7572. "properties": {
  7573. "type": "object",
  7574. "properties": {
  7575. "sessionID": {
  7576. "type": "string"
  7577. }
  7578. },
  7579. "required": ["sessionID"]
  7580. }
  7581. },
  7582. "required": ["type", "properties"]
  7583. },
  7584. "Event.file.watcher.updated": {
  7585. "type": "object",
  7586. "properties": {
  7587. "type": {
  7588. "type": "string",
  7589. "const": "file.watcher.updated"
  7590. },
  7591. "properties": {
  7592. "type": "object",
  7593. "properties": {
  7594. "file": {
  7595. "type": "string"
  7596. },
  7597. "event": {
  7598. "anyOf": [
  7599. {
  7600. "type": "string",
  7601. "const": "add"
  7602. },
  7603. {
  7604. "type": "string",
  7605. "const": "change"
  7606. },
  7607. {
  7608. "type": "string",
  7609. "const": "unlink"
  7610. }
  7611. ]
  7612. }
  7613. },
  7614. "required": ["file", "event"]
  7615. }
  7616. },
  7617. "required": ["type", "properties"]
  7618. },
  7619. "Todo": {
  7620. "type": "object",
  7621. "properties": {
  7622. "content": {
  7623. "description": "Brief description of the task",
  7624. "type": "string"
  7625. },
  7626. "status": {
  7627. "description": "Current status of the task: pending, in_progress, completed, cancelled",
  7628. "type": "string"
  7629. },
  7630. "priority": {
  7631. "description": "Priority level of the task: high, medium, low",
  7632. "type": "string"
  7633. },
  7634. "id": {
  7635. "description": "Unique identifier for the todo item",
  7636. "type": "string"
  7637. }
  7638. },
  7639. "required": ["content", "status", "priority", "id"]
  7640. },
  7641. "Event.todo.updated": {
  7642. "type": "object",
  7643. "properties": {
  7644. "type": {
  7645. "type": "string",
  7646. "const": "todo.updated"
  7647. },
  7648. "properties": {
  7649. "type": "object",
  7650. "properties": {
  7651. "sessionID": {
  7652. "type": "string"
  7653. },
  7654. "todos": {
  7655. "type": "array",
  7656. "items": {
  7657. "$ref": "#/components/schemas/Todo"
  7658. }
  7659. }
  7660. },
  7661. "required": ["sessionID", "todos"]
  7662. }
  7663. },
  7664. "required": ["type", "properties"]
  7665. },
  7666. "Event.tui.prompt.append": {
  7667. "type": "object",
  7668. "properties": {
  7669. "type": {
  7670. "type": "string",
  7671. "const": "tui.prompt.append"
  7672. },
  7673. "properties": {
  7674. "type": "object",
  7675. "properties": {
  7676. "text": {
  7677. "type": "string"
  7678. }
  7679. },
  7680. "required": ["text"]
  7681. }
  7682. },
  7683. "required": ["type", "properties"]
  7684. },
  7685. "Event.tui.command.execute": {
  7686. "type": "object",
  7687. "properties": {
  7688. "type": {
  7689. "type": "string",
  7690. "const": "tui.command.execute"
  7691. },
  7692. "properties": {
  7693. "type": "object",
  7694. "properties": {
  7695. "command": {
  7696. "anyOf": [
  7697. {
  7698. "type": "string",
  7699. "enum": [
  7700. "session.list",
  7701. "session.new",
  7702. "session.share",
  7703. "session.interrupt",
  7704. "session.compact",
  7705. "session.page.up",
  7706. "session.page.down",
  7707. "session.line.up",
  7708. "session.line.down",
  7709. "session.half.page.up",
  7710. "session.half.page.down",
  7711. "session.first",
  7712. "session.last",
  7713. "prompt.clear",
  7714. "prompt.submit",
  7715. "agent.cycle"
  7716. ]
  7717. },
  7718. {
  7719. "type": "string"
  7720. }
  7721. ]
  7722. }
  7723. },
  7724. "required": ["command"]
  7725. }
  7726. },
  7727. "required": ["type", "properties"]
  7728. },
  7729. "Event.tui.toast.show": {
  7730. "type": "object",
  7731. "properties": {
  7732. "type": {
  7733. "type": "string",
  7734. "const": "tui.toast.show"
  7735. },
  7736. "properties": {
  7737. "type": "object",
  7738. "properties": {
  7739. "title": {
  7740. "type": "string"
  7741. },
  7742. "message": {
  7743. "type": "string"
  7744. },
  7745. "variant": {
  7746. "type": "string",
  7747. "enum": ["info", "success", "warning", "error"]
  7748. },
  7749. "duration": {
  7750. "description": "Duration in milliseconds",
  7751. "default": 5000,
  7752. "type": "number"
  7753. }
  7754. },
  7755. "required": ["message", "variant"]
  7756. }
  7757. },
  7758. "required": ["type", "properties"]
  7759. },
  7760. "Event.tui.session.select": {
  7761. "type": "object",
  7762. "properties": {
  7763. "type": {
  7764. "type": "string",
  7765. "const": "tui.session.select"
  7766. },
  7767. "properties": {
  7768. "type": "object",
  7769. "properties": {
  7770. "sessionID": {
  7771. "description": "Session ID to navigate to",
  7772. "type": "string",
  7773. "pattern": "^ses"
  7774. }
  7775. },
  7776. "required": ["sessionID"]
  7777. }
  7778. },
  7779. "required": ["type", "properties"]
  7780. },
  7781. "Event.mcp.tools.changed": {
  7782. "type": "object",
  7783. "properties": {
  7784. "type": {
  7785. "type": "string",
  7786. "const": "mcp.tools.changed"
  7787. },
  7788. "properties": {
  7789. "type": "object",
  7790. "properties": {
  7791. "server": {
  7792. "type": "string"
  7793. }
  7794. },
  7795. "required": ["server"]
  7796. }
  7797. },
  7798. "required": ["type", "properties"]
  7799. },
  7800. "Event.mcp.browser.open.failed": {
  7801. "type": "object",
  7802. "properties": {
  7803. "type": {
  7804. "type": "string",
  7805. "const": "mcp.browser.open.failed"
  7806. },
  7807. "properties": {
  7808. "type": "object",
  7809. "properties": {
  7810. "mcpName": {
  7811. "type": "string"
  7812. },
  7813. "url": {
  7814. "type": "string"
  7815. }
  7816. },
  7817. "required": ["mcpName", "url"]
  7818. }
  7819. },
  7820. "required": ["type", "properties"]
  7821. },
  7822. "Event.command.executed": {
  7823. "type": "object",
  7824. "properties": {
  7825. "type": {
  7826. "type": "string",
  7827. "const": "command.executed"
  7828. },
  7829. "properties": {
  7830. "type": "object",
  7831. "properties": {
  7832. "name": {
  7833. "type": "string"
  7834. },
  7835. "sessionID": {
  7836. "type": "string",
  7837. "pattern": "^ses.*"
  7838. },
  7839. "arguments": {
  7840. "type": "string"
  7841. },
  7842. "messageID": {
  7843. "type": "string",
  7844. "pattern": "^msg.*"
  7845. }
  7846. },
  7847. "required": ["name", "sessionID", "arguments", "messageID"]
  7848. }
  7849. },
  7850. "required": ["type", "properties"]
  7851. },
  7852. "PermissionAction": {
  7853. "type": "string",
  7854. "enum": ["allow", "deny", "ask"]
  7855. },
  7856. "PermissionRule": {
  7857. "type": "object",
  7858. "properties": {
  7859. "permission": {
  7860. "type": "string"
  7861. },
  7862. "pattern": {
  7863. "type": "string"
  7864. },
  7865. "action": {
  7866. "$ref": "#/components/schemas/PermissionAction"
  7867. }
  7868. },
  7869. "required": ["permission", "pattern", "action"]
  7870. },
  7871. "PermissionRuleset": {
  7872. "type": "array",
  7873. "items": {
  7874. "$ref": "#/components/schemas/PermissionRule"
  7875. }
  7876. },
  7877. "Session": {
  7878. "type": "object",
  7879. "properties": {
  7880. "id": {
  7881. "type": "string",
  7882. "pattern": "^ses.*"
  7883. },
  7884. "slug": {
  7885. "type": "string"
  7886. },
  7887. "projectID": {
  7888. "type": "string"
  7889. },
  7890. "directory": {
  7891. "type": "string"
  7892. },
  7893. "parentID": {
  7894. "type": "string",
  7895. "pattern": "^ses.*"
  7896. },
  7897. "summary": {
  7898. "type": "object",
  7899. "properties": {
  7900. "additions": {
  7901. "type": "number"
  7902. },
  7903. "deletions": {
  7904. "type": "number"
  7905. },
  7906. "files": {
  7907. "type": "number"
  7908. },
  7909. "diffs": {
  7910. "type": "array",
  7911. "items": {
  7912. "$ref": "#/components/schemas/FileDiff"
  7913. }
  7914. }
  7915. },
  7916. "required": ["additions", "deletions", "files"]
  7917. },
  7918. "share": {
  7919. "type": "object",
  7920. "properties": {
  7921. "url": {
  7922. "type": "string"
  7923. }
  7924. },
  7925. "required": ["url"]
  7926. },
  7927. "title": {
  7928. "type": "string"
  7929. },
  7930. "version": {
  7931. "type": "string"
  7932. },
  7933. "time": {
  7934. "type": "object",
  7935. "properties": {
  7936. "created": {
  7937. "type": "number"
  7938. },
  7939. "updated": {
  7940. "type": "number"
  7941. },
  7942. "compacting": {
  7943. "type": "number"
  7944. },
  7945. "archived": {
  7946. "type": "number"
  7947. }
  7948. },
  7949. "required": ["created", "updated"]
  7950. },
  7951. "permission": {
  7952. "$ref": "#/components/schemas/PermissionRuleset"
  7953. },
  7954. "revert": {
  7955. "type": "object",
  7956. "properties": {
  7957. "messageID": {
  7958. "type": "string"
  7959. },
  7960. "partID": {
  7961. "type": "string"
  7962. },
  7963. "snapshot": {
  7964. "type": "string"
  7965. },
  7966. "diff": {
  7967. "type": "string"
  7968. }
  7969. },
  7970. "required": ["messageID"]
  7971. }
  7972. },
  7973. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"]
  7974. },
  7975. "Event.session.created": {
  7976. "type": "object",
  7977. "properties": {
  7978. "type": {
  7979. "type": "string",
  7980. "const": "session.created"
  7981. },
  7982. "properties": {
  7983. "type": "object",
  7984. "properties": {
  7985. "info": {
  7986. "$ref": "#/components/schemas/Session"
  7987. }
  7988. },
  7989. "required": ["info"]
  7990. }
  7991. },
  7992. "required": ["type", "properties"]
  7993. },
  7994. "Event.session.updated": {
  7995. "type": "object",
  7996. "properties": {
  7997. "type": {
  7998. "type": "string",
  7999. "const": "session.updated"
  8000. },
  8001. "properties": {
  8002. "type": "object",
  8003. "properties": {
  8004. "info": {
  8005. "$ref": "#/components/schemas/Session"
  8006. }
  8007. },
  8008. "required": ["info"]
  8009. }
  8010. },
  8011. "required": ["type", "properties"]
  8012. },
  8013. "Event.session.deleted": {
  8014. "type": "object",
  8015. "properties": {
  8016. "type": {
  8017. "type": "string",
  8018. "const": "session.deleted"
  8019. },
  8020. "properties": {
  8021. "type": "object",
  8022. "properties": {
  8023. "info": {
  8024. "$ref": "#/components/schemas/Session"
  8025. }
  8026. },
  8027. "required": ["info"]
  8028. }
  8029. },
  8030. "required": ["type", "properties"]
  8031. },
  8032. "Event.session.diff": {
  8033. "type": "object",
  8034. "properties": {
  8035. "type": {
  8036. "type": "string",
  8037. "const": "session.diff"
  8038. },
  8039. "properties": {
  8040. "type": "object",
  8041. "properties": {
  8042. "sessionID": {
  8043. "type": "string"
  8044. },
  8045. "diff": {
  8046. "type": "array",
  8047. "items": {
  8048. "$ref": "#/components/schemas/FileDiff"
  8049. }
  8050. }
  8051. },
  8052. "required": ["sessionID", "diff"]
  8053. }
  8054. },
  8055. "required": ["type", "properties"]
  8056. },
  8057. "Event.session.error": {
  8058. "type": "object",
  8059. "properties": {
  8060. "type": {
  8061. "type": "string",
  8062. "const": "session.error"
  8063. },
  8064. "properties": {
  8065. "type": "object",
  8066. "properties": {
  8067. "sessionID": {
  8068. "type": "string"
  8069. },
  8070. "error": {
  8071. "anyOf": [
  8072. {
  8073. "$ref": "#/components/schemas/ProviderAuthError"
  8074. },
  8075. {
  8076. "$ref": "#/components/schemas/UnknownError"
  8077. },
  8078. {
  8079. "$ref": "#/components/schemas/MessageOutputLengthError"
  8080. },
  8081. {
  8082. "$ref": "#/components/schemas/MessageAbortedError"
  8083. },
  8084. {
  8085. "$ref": "#/components/schemas/APIError"
  8086. }
  8087. ]
  8088. }
  8089. }
  8090. }
  8091. },
  8092. "required": ["type", "properties"]
  8093. },
  8094. "Event.vcs.branch.updated": {
  8095. "type": "object",
  8096. "properties": {
  8097. "type": {
  8098. "type": "string",
  8099. "const": "vcs.branch.updated"
  8100. },
  8101. "properties": {
  8102. "type": "object",
  8103. "properties": {
  8104. "branch": {
  8105. "type": "string"
  8106. }
  8107. }
  8108. }
  8109. },
  8110. "required": ["type", "properties"]
  8111. },
  8112. "Pty": {
  8113. "type": "object",
  8114. "properties": {
  8115. "id": {
  8116. "type": "string",
  8117. "pattern": "^pty.*"
  8118. },
  8119. "title": {
  8120. "type": "string"
  8121. },
  8122. "command": {
  8123. "type": "string"
  8124. },
  8125. "args": {
  8126. "type": "array",
  8127. "items": {
  8128. "type": "string"
  8129. }
  8130. },
  8131. "cwd": {
  8132. "type": "string"
  8133. },
  8134. "status": {
  8135. "type": "string",
  8136. "enum": ["running", "exited"]
  8137. },
  8138. "pid": {
  8139. "type": "number"
  8140. }
  8141. },
  8142. "required": ["id", "title", "command", "args", "cwd", "status", "pid"]
  8143. },
  8144. "Event.pty.created": {
  8145. "type": "object",
  8146. "properties": {
  8147. "type": {
  8148. "type": "string",
  8149. "const": "pty.created"
  8150. },
  8151. "properties": {
  8152. "type": "object",
  8153. "properties": {
  8154. "info": {
  8155. "$ref": "#/components/schemas/Pty"
  8156. }
  8157. },
  8158. "required": ["info"]
  8159. }
  8160. },
  8161. "required": ["type", "properties"]
  8162. },
  8163. "Event.pty.updated": {
  8164. "type": "object",
  8165. "properties": {
  8166. "type": {
  8167. "type": "string",
  8168. "const": "pty.updated"
  8169. },
  8170. "properties": {
  8171. "type": "object",
  8172. "properties": {
  8173. "info": {
  8174. "$ref": "#/components/schemas/Pty"
  8175. }
  8176. },
  8177. "required": ["info"]
  8178. }
  8179. },
  8180. "required": ["type", "properties"]
  8181. },
  8182. "Event.pty.exited": {
  8183. "type": "object",
  8184. "properties": {
  8185. "type": {
  8186. "type": "string",
  8187. "const": "pty.exited"
  8188. },
  8189. "properties": {
  8190. "type": "object",
  8191. "properties": {
  8192. "id": {
  8193. "type": "string",
  8194. "pattern": "^pty.*"
  8195. },
  8196. "exitCode": {
  8197. "type": "number"
  8198. }
  8199. },
  8200. "required": ["id", "exitCode"]
  8201. }
  8202. },
  8203. "required": ["type", "properties"]
  8204. },
  8205. "Event.pty.deleted": {
  8206. "type": "object",
  8207. "properties": {
  8208. "type": {
  8209. "type": "string",
  8210. "const": "pty.deleted"
  8211. },
  8212. "properties": {
  8213. "type": "object",
  8214. "properties": {
  8215. "id": {
  8216. "type": "string",
  8217. "pattern": "^pty.*"
  8218. }
  8219. },
  8220. "required": ["id"]
  8221. }
  8222. },
  8223. "required": ["type", "properties"]
  8224. },
  8225. "Event.worktree.ready": {
  8226. "type": "object",
  8227. "properties": {
  8228. "type": {
  8229. "type": "string",
  8230. "const": "worktree.ready"
  8231. },
  8232. "properties": {
  8233. "type": "object",
  8234. "properties": {
  8235. "name": {
  8236. "type": "string"
  8237. },
  8238. "branch": {
  8239. "type": "string"
  8240. }
  8241. },
  8242. "required": ["name", "branch"]
  8243. }
  8244. },
  8245. "required": ["type", "properties"]
  8246. },
  8247. "Event.worktree.failed": {
  8248. "type": "object",
  8249. "properties": {
  8250. "type": {
  8251. "type": "string",
  8252. "const": "worktree.failed"
  8253. },
  8254. "properties": {
  8255. "type": "object",
  8256. "properties": {
  8257. "message": {
  8258. "type": "string"
  8259. }
  8260. },
  8261. "required": ["message"]
  8262. }
  8263. },
  8264. "required": ["type", "properties"]
  8265. },
  8266. "Event": {
  8267. "anyOf": [
  8268. {
  8269. "$ref": "#/components/schemas/Event.installation.updated"
  8270. },
  8271. {
  8272. "$ref": "#/components/schemas/Event.installation.update-available"
  8273. },
  8274. {
  8275. "$ref": "#/components/schemas/Event.project.updated"
  8276. },
  8277. {
  8278. "$ref": "#/components/schemas/Event.server.instance.disposed"
  8279. },
  8280. {
  8281. "$ref": "#/components/schemas/Event.server.connected"
  8282. },
  8283. {
  8284. "$ref": "#/components/schemas/Event.global.disposed"
  8285. },
  8286. {
  8287. "$ref": "#/components/schemas/Event.lsp.client.diagnostics"
  8288. },
  8289. {
  8290. "$ref": "#/components/schemas/Event.lsp.updated"
  8291. },
  8292. {
  8293. "$ref": "#/components/schemas/Event.file.edited"
  8294. },
  8295. {
  8296. "$ref": "#/components/schemas/Event.message.updated"
  8297. },
  8298. {
  8299. "$ref": "#/components/schemas/Event.message.removed"
  8300. },
  8301. {
  8302. "$ref": "#/components/schemas/Event.message.part.updated"
  8303. },
  8304. {
  8305. "$ref": "#/components/schemas/Event.message.part.removed"
  8306. },
  8307. {
  8308. "$ref": "#/components/schemas/Event.permission.asked"
  8309. },
  8310. {
  8311. "$ref": "#/components/schemas/Event.permission.replied"
  8312. },
  8313. {
  8314. "$ref": "#/components/schemas/Event.session.status"
  8315. },
  8316. {
  8317. "$ref": "#/components/schemas/Event.session.idle"
  8318. },
  8319. {
  8320. "$ref": "#/components/schemas/Event.question.asked"
  8321. },
  8322. {
  8323. "$ref": "#/components/schemas/Event.question.replied"
  8324. },
  8325. {
  8326. "$ref": "#/components/schemas/Event.question.rejected"
  8327. },
  8328. {
  8329. "$ref": "#/components/schemas/Event.session.compacted"
  8330. },
  8331. {
  8332. "$ref": "#/components/schemas/Event.file.watcher.updated"
  8333. },
  8334. {
  8335. "$ref": "#/components/schemas/Event.todo.updated"
  8336. },
  8337. {
  8338. "$ref": "#/components/schemas/Event.tui.prompt.append"
  8339. },
  8340. {
  8341. "$ref": "#/components/schemas/Event.tui.command.execute"
  8342. },
  8343. {
  8344. "$ref": "#/components/schemas/Event.tui.toast.show"
  8345. },
  8346. {
  8347. "$ref": "#/components/schemas/Event.tui.session.select"
  8348. },
  8349. {
  8350. "$ref": "#/components/schemas/Event.mcp.tools.changed"
  8351. },
  8352. {
  8353. "$ref": "#/components/schemas/Event.mcp.browser.open.failed"
  8354. },
  8355. {
  8356. "$ref": "#/components/schemas/Event.command.executed"
  8357. },
  8358. {
  8359. "$ref": "#/components/schemas/Event.session.created"
  8360. },
  8361. {
  8362. "$ref": "#/components/schemas/Event.session.updated"
  8363. },
  8364. {
  8365. "$ref": "#/components/schemas/Event.session.deleted"
  8366. },
  8367. {
  8368. "$ref": "#/components/schemas/Event.session.diff"
  8369. },
  8370. {
  8371. "$ref": "#/components/schemas/Event.session.error"
  8372. },
  8373. {
  8374. "$ref": "#/components/schemas/Event.vcs.branch.updated"
  8375. },
  8376. {
  8377. "$ref": "#/components/schemas/Event.pty.created"
  8378. },
  8379. {
  8380. "$ref": "#/components/schemas/Event.pty.updated"
  8381. },
  8382. {
  8383. "$ref": "#/components/schemas/Event.pty.exited"
  8384. },
  8385. {
  8386. "$ref": "#/components/schemas/Event.pty.deleted"
  8387. },
  8388. {
  8389. "$ref": "#/components/schemas/Event.worktree.ready"
  8390. },
  8391. {
  8392. "$ref": "#/components/schemas/Event.worktree.failed"
  8393. }
  8394. ]
  8395. },
  8396. "GlobalEvent": {
  8397. "type": "object",
  8398. "properties": {
  8399. "directory": {
  8400. "type": "string"
  8401. },
  8402. "payload": {
  8403. "$ref": "#/components/schemas/Event"
  8404. }
  8405. },
  8406. "required": ["directory", "payload"]
  8407. },
  8408. "KeybindsConfig": {
  8409. "description": "Custom keybind configurations",
  8410. "type": "object",
  8411. "properties": {
  8412. "leader": {
  8413. "description": "Leader key for keybind combinations",
  8414. "default": "ctrl+x",
  8415. "type": "string"
  8416. },
  8417. "app_exit": {
  8418. "description": "Exit the application",
  8419. "default": "ctrl+c,ctrl+d,<leader>q",
  8420. "type": "string"
  8421. },
  8422. "editor_open": {
  8423. "description": "Open external editor",
  8424. "default": "<leader>e",
  8425. "type": "string"
  8426. },
  8427. "theme_list": {
  8428. "description": "List available themes",
  8429. "default": "<leader>t",
  8430. "type": "string"
  8431. },
  8432. "sidebar_toggle": {
  8433. "description": "Toggle sidebar",
  8434. "default": "<leader>b",
  8435. "type": "string"
  8436. },
  8437. "scrollbar_toggle": {
  8438. "description": "Toggle session scrollbar",
  8439. "default": "none",
  8440. "type": "string"
  8441. },
  8442. "username_toggle": {
  8443. "description": "Toggle username visibility",
  8444. "default": "none",
  8445. "type": "string"
  8446. },
  8447. "status_view": {
  8448. "description": "View status",
  8449. "default": "<leader>s",
  8450. "type": "string"
  8451. },
  8452. "session_export": {
  8453. "description": "Export session to editor",
  8454. "default": "<leader>x",
  8455. "type": "string"
  8456. },
  8457. "session_new": {
  8458. "description": "Create a new session",
  8459. "default": "<leader>n",
  8460. "type": "string"
  8461. },
  8462. "session_list": {
  8463. "description": "List all sessions",
  8464. "default": "<leader>l",
  8465. "type": "string"
  8466. },
  8467. "session_timeline": {
  8468. "description": "Show session timeline",
  8469. "default": "<leader>g",
  8470. "type": "string"
  8471. },
  8472. "session_fork": {
  8473. "description": "Fork session from message",
  8474. "default": "none",
  8475. "type": "string"
  8476. },
  8477. "session_rename": {
  8478. "description": "Rename session",
  8479. "default": "ctrl+r",
  8480. "type": "string"
  8481. },
  8482. "session_delete": {
  8483. "description": "Delete session",
  8484. "default": "ctrl+d",
  8485. "type": "string"
  8486. },
  8487. "stash_delete": {
  8488. "description": "Delete stash entry",
  8489. "default": "ctrl+d",
  8490. "type": "string"
  8491. },
  8492. "model_provider_list": {
  8493. "description": "Open provider list from model dialog",
  8494. "default": "ctrl+a",
  8495. "type": "string"
  8496. },
  8497. "model_favorite_toggle": {
  8498. "description": "Toggle model favorite status",
  8499. "default": "ctrl+f",
  8500. "type": "string"
  8501. },
  8502. "session_share": {
  8503. "description": "Share current session",
  8504. "default": "none",
  8505. "type": "string"
  8506. },
  8507. "session_unshare": {
  8508. "description": "Unshare current session",
  8509. "default": "none",
  8510. "type": "string"
  8511. },
  8512. "session_interrupt": {
  8513. "description": "Interrupt current session",
  8514. "default": "escape",
  8515. "type": "string"
  8516. },
  8517. "session_compact": {
  8518. "description": "Compact the session",
  8519. "default": "<leader>c",
  8520. "type": "string"
  8521. },
  8522. "messages_page_up": {
  8523. "description": "Scroll messages up by one page",
  8524. "default": "pageup,ctrl+alt+b",
  8525. "type": "string"
  8526. },
  8527. "messages_page_down": {
  8528. "description": "Scroll messages down by one page",
  8529. "default": "pagedown,ctrl+alt+f",
  8530. "type": "string"
  8531. },
  8532. "messages_line_up": {
  8533. "description": "Scroll messages up by one line",
  8534. "default": "ctrl+alt+y",
  8535. "type": "string"
  8536. },
  8537. "messages_line_down": {
  8538. "description": "Scroll messages down by one line",
  8539. "default": "ctrl+alt+e",
  8540. "type": "string"
  8541. },
  8542. "messages_half_page_up": {
  8543. "description": "Scroll messages up by half page",
  8544. "default": "ctrl+alt+u",
  8545. "type": "string"
  8546. },
  8547. "messages_half_page_down": {
  8548. "description": "Scroll messages down by half page",
  8549. "default": "ctrl+alt+d",
  8550. "type": "string"
  8551. },
  8552. "messages_first": {
  8553. "description": "Navigate to first message",
  8554. "default": "ctrl+g,home",
  8555. "type": "string"
  8556. },
  8557. "messages_last": {
  8558. "description": "Navigate to last message",
  8559. "default": "ctrl+alt+g,end",
  8560. "type": "string"
  8561. },
  8562. "messages_next": {
  8563. "description": "Navigate to next message",
  8564. "default": "none",
  8565. "type": "string"
  8566. },
  8567. "messages_previous": {
  8568. "description": "Navigate to previous message",
  8569. "default": "none",
  8570. "type": "string"
  8571. },
  8572. "messages_last_user": {
  8573. "description": "Navigate to last user message",
  8574. "default": "none",
  8575. "type": "string"
  8576. },
  8577. "messages_copy": {
  8578. "description": "Copy message",
  8579. "default": "<leader>y",
  8580. "type": "string"
  8581. },
  8582. "messages_undo": {
  8583. "description": "Undo message",
  8584. "default": "<leader>u",
  8585. "type": "string"
  8586. },
  8587. "messages_redo": {
  8588. "description": "Redo message",
  8589. "default": "<leader>r",
  8590. "type": "string"
  8591. },
  8592. "messages_toggle_conceal": {
  8593. "description": "Toggle code block concealment in messages",
  8594. "default": "<leader>h",
  8595. "type": "string"
  8596. },
  8597. "tool_details": {
  8598. "description": "Toggle tool details visibility",
  8599. "default": "none",
  8600. "type": "string"
  8601. },
  8602. "model_list": {
  8603. "description": "List available models",
  8604. "default": "<leader>m",
  8605. "type": "string"
  8606. },
  8607. "model_cycle_recent": {
  8608. "description": "Next recently used model",
  8609. "default": "f2",
  8610. "type": "string"
  8611. },
  8612. "model_cycle_recent_reverse": {
  8613. "description": "Previous recently used model",
  8614. "default": "shift+f2",
  8615. "type": "string"
  8616. },
  8617. "model_cycle_favorite": {
  8618. "description": "Next favorite model",
  8619. "default": "none",
  8620. "type": "string"
  8621. },
  8622. "model_cycle_favorite_reverse": {
  8623. "description": "Previous favorite model",
  8624. "default": "none",
  8625. "type": "string"
  8626. },
  8627. "command_list": {
  8628. "description": "List available commands",
  8629. "default": "ctrl+p",
  8630. "type": "string"
  8631. },
  8632. "agent_list": {
  8633. "description": "List agents",
  8634. "default": "<leader>a",
  8635. "type": "string"
  8636. },
  8637. "agent_cycle": {
  8638. "description": "Next agent",
  8639. "default": "tab",
  8640. "type": "string"
  8641. },
  8642. "agent_cycle_reverse": {
  8643. "description": "Previous agent",
  8644. "default": "shift+tab",
  8645. "type": "string"
  8646. },
  8647. "variant_cycle": {
  8648. "description": "Cycle model variants",
  8649. "default": "ctrl+t",
  8650. "type": "string"
  8651. },
  8652. "input_clear": {
  8653. "description": "Clear input field",
  8654. "default": "ctrl+c",
  8655. "type": "string"
  8656. },
  8657. "input_paste": {
  8658. "description": "Paste from clipboard",
  8659. "default": "ctrl+v",
  8660. "type": "string"
  8661. },
  8662. "input_submit": {
  8663. "description": "Submit input",
  8664. "default": "return",
  8665. "type": "string"
  8666. },
  8667. "input_newline": {
  8668. "description": "Insert newline in input",
  8669. "default": "shift+return,ctrl+return,alt+return,ctrl+j",
  8670. "type": "string"
  8671. },
  8672. "input_move_left": {
  8673. "description": "Move cursor left in input",
  8674. "default": "left,ctrl+b",
  8675. "type": "string"
  8676. },
  8677. "input_move_right": {
  8678. "description": "Move cursor right in input",
  8679. "default": "right,ctrl+f",
  8680. "type": "string"
  8681. },
  8682. "input_move_up": {
  8683. "description": "Move cursor up in input",
  8684. "default": "up",
  8685. "type": "string"
  8686. },
  8687. "input_move_down": {
  8688. "description": "Move cursor down in input",
  8689. "default": "down",
  8690. "type": "string"
  8691. },
  8692. "input_select_left": {
  8693. "description": "Select left in input",
  8694. "default": "shift+left",
  8695. "type": "string"
  8696. },
  8697. "input_select_right": {
  8698. "description": "Select right in input",
  8699. "default": "shift+right",
  8700. "type": "string"
  8701. },
  8702. "input_select_up": {
  8703. "description": "Select up in input",
  8704. "default": "shift+up",
  8705. "type": "string"
  8706. },
  8707. "input_select_down": {
  8708. "description": "Select down in input",
  8709. "default": "shift+down",
  8710. "type": "string"
  8711. },
  8712. "input_line_home": {
  8713. "description": "Move to start of line in input",
  8714. "default": "ctrl+a",
  8715. "type": "string"
  8716. },
  8717. "input_line_end": {
  8718. "description": "Move to end of line in input",
  8719. "default": "ctrl+e",
  8720. "type": "string"
  8721. },
  8722. "input_select_line_home": {
  8723. "description": "Select to start of line in input",
  8724. "default": "ctrl+shift+a",
  8725. "type": "string"
  8726. },
  8727. "input_select_line_end": {
  8728. "description": "Select to end of line in input",
  8729. "default": "ctrl+shift+e",
  8730. "type": "string"
  8731. },
  8732. "input_visual_line_home": {
  8733. "description": "Move to start of visual line in input",
  8734. "default": "alt+a",
  8735. "type": "string"
  8736. },
  8737. "input_visual_line_end": {
  8738. "description": "Move to end of visual line in input",
  8739. "default": "alt+e",
  8740. "type": "string"
  8741. },
  8742. "input_select_visual_line_home": {
  8743. "description": "Select to start of visual line in input",
  8744. "default": "alt+shift+a",
  8745. "type": "string"
  8746. },
  8747. "input_select_visual_line_end": {
  8748. "description": "Select to end of visual line in input",
  8749. "default": "alt+shift+e",
  8750. "type": "string"
  8751. },
  8752. "input_buffer_home": {
  8753. "description": "Move to start of buffer in input",
  8754. "default": "home",
  8755. "type": "string"
  8756. },
  8757. "input_buffer_end": {
  8758. "description": "Move to end of buffer in input",
  8759. "default": "end",
  8760. "type": "string"
  8761. },
  8762. "input_select_buffer_home": {
  8763. "description": "Select to start of buffer in input",
  8764. "default": "shift+home",
  8765. "type": "string"
  8766. },
  8767. "input_select_buffer_end": {
  8768. "description": "Select to end of buffer in input",
  8769. "default": "shift+end",
  8770. "type": "string"
  8771. },
  8772. "input_delete_line": {
  8773. "description": "Delete line in input",
  8774. "default": "ctrl+shift+d",
  8775. "type": "string"
  8776. },
  8777. "input_delete_to_line_end": {
  8778. "description": "Delete to end of line in input",
  8779. "default": "ctrl+k",
  8780. "type": "string"
  8781. },
  8782. "input_delete_to_line_start": {
  8783. "description": "Delete to start of line in input",
  8784. "default": "ctrl+u",
  8785. "type": "string"
  8786. },
  8787. "input_backspace": {
  8788. "description": "Backspace in input",
  8789. "default": "backspace,shift+backspace",
  8790. "type": "string"
  8791. },
  8792. "input_delete": {
  8793. "description": "Delete character in input",
  8794. "default": "ctrl+d,delete,shift+delete",
  8795. "type": "string"
  8796. },
  8797. "input_undo": {
  8798. "description": "Undo in input",
  8799. "default": "ctrl+-,super+z",
  8800. "type": "string"
  8801. },
  8802. "input_redo": {
  8803. "description": "Redo in input",
  8804. "default": "ctrl+.,super+shift+z",
  8805. "type": "string"
  8806. },
  8807. "input_word_forward": {
  8808. "description": "Move word forward in input",
  8809. "default": "alt+f,alt+right,ctrl+right",
  8810. "type": "string"
  8811. },
  8812. "input_word_backward": {
  8813. "description": "Move word backward in input",
  8814. "default": "alt+b,alt+left,ctrl+left",
  8815. "type": "string"
  8816. },
  8817. "input_select_word_forward": {
  8818. "description": "Select word forward in input",
  8819. "default": "alt+shift+f,alt+shift+right",
  8820. "type": "string"
  8821. },
  8822. "input_select_word_backward": {
  8823. "description": "Select word backward in input",
  8824. "default": "alt+shift+b,alt+shift+left",
  8825. "type": "string"
  8826. },
  8827. "input_delete_word_forward": {
  8828. "description": "Delete word forward in input",
  8829. "default": "alt+d,alt+delete,ctrl+delete",
  8830. "type": "string"
  8831. },
  8832. "input_delete_word_backward": {
  8833. "description": "Delete word backward in input",
  8834. "default": "ctrl+w,ctrl+backspace,alt+backspace",
  8835. "type": "string"
  8836. },
  8837. "history_previous": {
  8838. "description": "Previous history item",
  8839. "default": "up",
  8840. "type": "string"
  8841. },
  8842. "history_next": {
  8843. "description": "Next history item",
  8844. "default": "down",
  8845. "type": "string"
  8846. },
  8847. "session_child_cycle": {
  8848. "description": "Next child session",
  8849. "default": "<leader>right",
  8850. "type": "string"
  8851. },
  8852. "session_child_cycle_reverse": {
  8853. "description": "Previous child session",
  8854. "default": "<leader>left",
  8855. "type": "string"
  8856. },
  8857. "session_parent": {
  8858. "description": "Go to parent session",
  8859. "default": "<leader>up",
  8860. "type": "string"
  8861. },
  8862. "terminal_suspend": {
  8863. "description": "Suspend terminal",
  8864. "default": "ctrl+z",
  8865. "type": "string"
  8866. },
  8867. "terminal_title_toggle": {
  8868. "description": "Toggle terminal title",
  8869. "default": "none",
  8870. "type": "string"
  8871. },
  8872. "tips_toggle": {
  8873. "description": "Toggle tips on home screen",
  8874. "default": "<leader>h",
  8875. "type": "string"
  8876. }
  8877. },
  8878. "additionalProperties": false
  8879. },
  8880. "LogLevel": {
  8881. "description": "Log level",
  8882. "type": "string",
  8883. "enum": ["DEBUG", "INFO", "WARN", "ERROR"]
  8884. },
  8885. "ServerConfig": {
  8886. "description": "Server configuration for opencode serve and web commands",
  8887. "type": "object",
  8888. "properties": {
  8889. "port": {
  8890. "description": "Port to listen on",
  8891. "type": "integer",
  8892. "exclusiveMinimum": 0,
  8893. "maximum": 9007199254740991
  8894. },
  8895. "hostname": {
  8896. "description": "Hostname to listen on",
  8897. "type": "string"
  8898. },
  8899. "mdns": {
  8900. "description": "Enable mDNS service discovery",
  8901. "type": "boolean"
  8902. },
  8903. "cors": {
  8904. "description": "Additional domains to allow for CORS",
  8905. "type": "array",
  8906. "items": {
  8907. "type": "string"
  8908. }
  8909. }
  8910. },
  8911. "additionalProperties": false
  8912. },
  8913. "PermissionActionConfig": {
  8914. "type": "string",
  8915. "enum": ["ask", "allow", "deny"]
  8916. },
  8917. "PermissionObjectConfig": {
  8918. "type": "object",
  8919. "propertyNames": {
  8920. "type": "string"
  8921. },
  8922. "additionalProperties": {
  8923. "$ref": "#/components/schemas/PermissionActionConfig"
  8924. }
  8925. },
  8926. "PermissionRuleConfig": {
  8927. "anyOf": [
  8928. {
  8929. "$ref": "#/components/schemas/PermissionActionConfig"
  8930. },
  8931. {
  8932. "$ref": "#/components/schemas/PermissionObjectConfig"
  8933. }
  8934. ]
  8935. },
  8936. "PermissionConfig": {
  8937. "anyOf": [
  8938. {
  8939. "type": "object",
  8940. "properties": {
  8941. "__originalKeys": {
  8942. "type": "array",
  8943. "items": {
  8944. "type": "string"
  8945. }
  8946. },
  8947. "read": {
  8948. "$ref": "#/components/schemas/PermissionRuleConfig"
  8949. },
  8950. "edit": {
  8951. "$ref": "#/components/schemas/PermissionRuleConfig"
  8952. },
  8953. "glob": {
  8954. "$ref": "#/components/schemas/PermissionRuleConfig"
  8955. },
  8956. "grep": {
  8957. "$ref": "#/components/schemas/PermissionRuleConfig"
  8958. },
  8959. "list": {
  8960. "$ref": "#/components/schemas/PermissionRuleConfig"
  8961. },
  8962. "bash": {
  8963. "$ref": "#/components/schemas/PermissionRuleConfig"
  8964. },
  8965. "task": {
  8966. "$ref": "#/components/schemas/PermissionRuleConfig"
  8967. },
  8968. "external_directory": {
  8969. "$ref": "#/components/schemas/PermissionRuleConfig"
  8970. },
  8971. "todowrite": {
  8972. "$ref": "#/components/schemas/PermissionActionConfig"
  8973. },
  8974. "todoread": {
  8975. "$ref": "#/components/schemas/PermissionActionConfig"
  8976. },
  8977. "question": {
  8978. "$ref": "#/components/schemas/PermissionActionConfig"
  8979. },
  8980. "webfetch": {
  8981. "$ref": "#/components/schemas/PermissionActionConfig"
  8982. },
  8983. "websearch": {
  8984. "$ref": "#/components/schemas/PermissionActionConfig"
  8985. },
  8986. "codesearch": {
  8987. "$ref": "#/components/schemas/PermissionActionConfig"
  8988. },
  8989. "lsp": {
  8990. "$ref": "#/components/schemas/PermissionRuleConfig"
  8991. },
  8992. "doom_loop": {
  8993. "$ref": "#/components/schemas/PermissionActionConfig"
  8994. }
  8995. },
  8996. "additionalProperties": {
  8997. "$ref": "#/components/schemas/PermissionRuleConfig"
  8998. }
  8999. },
  9000. {
  9001. "$ref": "#/components/schemas/PermissionActionConfig"
  9002. }
  9003. ]
  9004. },
  9005. "AgentConfig": {
  9006. "type": "object",
  9007. "properties": {
  9008. "model": {
  9009. "type": "string"
  9010. },
  9011. "temperature": {
  9012. "type": "number"
  9013. },
  9014. "top_p": {
  9015. "type": "number"
  9016. },
  9017. "prompt": {
  9018. "type": "string"
  9019. },
  9020. "tools": {
  9021. "description": "@deprecated Use 'permission' field instead",
  9022. "type": "object",
  9023. "propertyNames": {
  9024. "type": "string"
  9025. },
  9026. "additionalProperties": {
  9027. "type": "boolean"
  9028. }
  9029. },
  9030. "disable": {
  9031. "type": "boolean"
  9032. },
  9033. "description": {
  9034. "description": "Description of when to use the agent",
  9035. "type": "string"
  9036. },
  9037. "mode": {
  9038. "type": "string",
  9039. "enum": ["subagent", "primary", "all"]
  9040. },
  9041. "hidden": {
  9042. "description": "Hide this subagent from the @ autocomplete menu (default: false, only applies to mode: subagent)",
  9043. "type": "boolean"
  9044. },
  9045. "options": {
  9046. "type": "object",
  9047. "propertyNames": {
  9048. "type": "string"
  9049. },
  9050. "additionalProperties": {}
  9051. },
  9052. "color": {
  9053. "description": "Hex color code for the agent (e.g., #FF5733)",
  9054. "type": "string",
  9055. "pattern": "^#[0-9a-fA-F]{6}$"
  9056. },
  9057. "steps": {
  9058. "description": "Maximum number of agentic iterations before forcing text-only response",
  9059. "type": "integer",
  9060. "exclusiveMinimum": 0,
  9061. "maximum": 9007199254740991
  9062. },
  9063. "maxSteps": {
  9064. "description": "@deprecated Use 'steps' field instead.",
  9065. "type": "integer",
  9066. "exclusiveMinimum": 0,
  9067. "maximum": 9007199254740991
  9068. },
  9069. "permission": {
  9070. "$ref": "#/components/schemas/PermissionConfig"
  9071. }
  9072. },
  9073. "additionalProperties": {}
  9074. },
  9075. "ProviderConfig": {
  9076. "type": "object",
  9077. "properties": {
  9078. "api": {
  9079. "type": "string"
  9080. },
  9081. "name": {
  9082. "type": "string"
  9083. },
  9084. "env": {
  9085. "type": "array",
  9086. "items": {
  9087. "type": "string"
  9088. }
  9089. },
  9090. "id": {
  9091. "type": "string"
  9092. },
  9093. "npm": {
  9094. "type": "string"
  9095. },
  9096. "models": {
  9097. "type": "object",
  9098. "propertyNames": {
  9099. "type": "string"
  9100. },
  9101. "additionalProperties": {
  9102. "type": "object",
  9103. "properties": {
  9104. "id": {
  9105. "type": "string"
  9106. },
  9107. "name": {
  9108. "type": "string"
  9109. },
  9110. "family": {
  9111. "type": "string"
  9112. },
  9113. "release_date": {
  9114. "type": "string"
  9115. },
  9116. "attachment": {
  9117. "type": "boolean"
  9118. },
  9119. "reasoning": {
  9120. "type": "boolean"
  9121. },
  9122. "temperature": {
  9123. "type": "boolean"
  9124. },
  9125. "tool_call": {
  9126. "type": "boolean"
  9127. },
  9128. "interleaved": {
  9129. "anyOf": [
  9130. {
  9131. "type": "boolean",
  9132. "const": true
  9133. },
  9134. {
  9135. "type": "object",
  9136. "properties": {
  9137. "field": {
  9138. "type": "string",
  9139. "enum": ["reasoning_content", "reasoning_details"]
  9140. }
  9141. },
  9142. "required": ["field"],
  9143. "additionalProperties": false
  9144. }
  9145. ]
  9146. },
  9147. "cost": {
  9148. "type": "object",
  9149. "properties": {
  9150. "input": {
  9151. "type": "number"
  9152. },
  9153. "output": {
  9154. "type": "number"
  9155. },
  9156. "cache_read": {
  9157. "type": "number"
  9158. },
  9159. "cache_write": {
  9160. "type": "number"
  9161. },
  9162. "context_over_200k": {
  9163. "type": "object",
  9164. "properties": {
  9165. "input": {
  9166. "type": "number"
  9167. },
  9168. "output": {
  9169. "type": "number"
  9170. },
  9171. "cache_read": {
  9172. "type": "number"
  9173. },
  9174. "cache_write": {
  9175. "type": "number"
  9176. }
  9177. },
  9178. "required": ["input", "output"]
  9179. }
  9180. },
  9181. "required": ["input", "output"]
  9182. },
  9183. "limit": {
  9184. "type": "object",
  9185. "properties": {
  9186. "context": {
  9187. "type": "number"
  9188. },
  9189. "input": {
  9190. "type": "number"
  9191. },
  9192. "output": {
  9193. "type": "number"
  9194. }
  9195. },
  9196. "required": ["context", "output"]
  9197. },
  9198. "modalities": {
  9199. "type": "object",
  9200. "properties": {
  9201. "input": {
  9202. "type": "array",
  9203. "items": {
  9204. "type": "string",
  9205. "enum": ["text", "audio", "image", "video", "pdf"]
  9206. }
  9207. },
  9208. "output": {
  9209. "type": "array",
  9210. "items": {
  9211. "type": "string",
  9212. "enum": ["text", "audio", "image", "video", "pdf"]
  9213. }
  9214. }
  9215. },
  9216. "required": ["input", "output"]
  9217. },
  9218. "experimental": {
  9219. "type": "boolean"
  9220. },
  9221. "status": {
  9222. "type": "string",
  9223. "enum": ["alpha", "beta", "deprecated"]
  9224. },
  9225. "options": {
  9226. "type": "object",
  9227. "propertyNames": {
  9228. "type": "string"
  9229. },
  9230. "additionalProperties": {}
  9231. },
  9232. "headers": {
  9233. "type": "object",
  9234. "propertyNames": {
  9235. "type": "string"
  9236. },
  9237. "additionalProperties": {
  9238. "type": "string"
  9239. }
  9240. },
  9241. "provider": {
  9242. "type": "object",
  9243. "properties": {
  9244. "npm": {
  9245. "type": "string"
  9246. }
  9247. },
  9248. "required": ["npm"]
  9249. },
  9250. "variants": {
  9251. "description": "Variant-specific configuration",
  9252. "type": "object",
  9253. "propertyNames": {
  9254. "type": "string"
  9255. },
  9256. "additionalProperties": {
  9257. "type": "object",
  9258. "properties": {
  9259. "disabled": {
  9260. "description": "Disable this variant for the model",
  9261. "type": "boolean"
  9262. }
  9263. },
  9264. "additionalProperties": {}
  9265. }
  9266. }
  9267. }
  9268. }
  9269. },
  9270. "whitelist": {
  9271. "type": "array",
  9272. "items": {
  9273. "type": "string"
  9274. }
  9275. },
  9276. "blacklist": {
  9277. "type": "array",
  9278. "items": {
  9279. "type": "string"
  9280. }
  9281. },
  9282. "options": {
  9283. "type": "object",
  9284. "properties": {
  9285. "apiKey": {
  9286. "type": "string"
  9287. },
  9288. "baseURL": {
  9289. "type": "string"
  9290. },
  9291. "enterpriseUrl": {
  9292. "description": "GitHub Enterprise URL for copilot authentication",
  9293. "type": "string"
  9294. },
  9295. "setCacheKey": {
  9296. "description": "Enable promptCacheKey for this provider (default false)",
  9297. "type": "boolean"
  9298. },
  9299. "timeout": {
  9300. "description": "Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout.",
  9301. "anyOf": [
  9302. {
  9303. "description": "Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout.",
  9304. "type": "integer",
  9305. "exclusiveMinimum": 0,
  9306. "maximum": 9007199254740991
  9307. },
  9308. {
  9309. "description": "Disable timeout for this provider entirely.",
  9310. "type": "boolean",
  9311. "const": false
  9312. }
  9313. ]
  9314. }
  9315. },
  9316. "additionalProperties": {}
  9317. }
  9318. },
  9319. "additionalProperties": false
  9320. },
  9321. "McpLocalConfig": {
  9322. "type": "object",
  9323. "properties": {
  9324. "type": {
  9325. "description": "Type of MCP server connection",
  9326. "type": "string",
  9327. "const": "local"
  9328. },
  9329. "command": {
  9330. "description": "Command and arguments to run the MCP server",
  9331. "type": "array",
  9332. "items": {
  9333. "type": "string"
  9334. }
  9335. },
  9336. "environment": {
  9337. "description": "Environment variables to set when running the MCP server",
  9338. "type": "object",
  9339. "propertyNames": {
  9340. "type": "string"
  9341. },
  9342. "additionalProperties": {
  9343. "type": "string"
  9344. }
  9345. },
  9346. "enabled": {
  9347. "description": "Enable or disable the MCP server on startup",
  9348. "type": "boolean"
  9349. },
  9350. "timeout": {
  9351. "description": "Timeout in ms for MCP server requests. Defaults to 5000 (5 seconds) if not specified.",
  9352. "type": "integer",
  9353. "exclusiveMinimum": 0,
  9354. "maximum": 9007199254740991
  9355. }
  9356. },
  9357. "required": ["type", "command"],
  9358. "additionalProperties": false
  9359. },
  9360. "McpOAuthConfig": {
  9361. "type": "object",
  9362. "properties": {
  9363. "clientId": {
  9364. "description": "OAuth client ID. If not provided, dynamic client registration (RFC 7591) will be attempted.",
  9365. "type": "string"
  9366. },
  9367. "clientSecret": {
  9368. "description": "OAuth client secret (if required by the authorization server)",
  9369. "type": "string"
  9370. },
  9371. "scope": {
  9372. "description": "OAuth scopes to request during authorization",
  9373. "type": "string"
  9374. }
  9375. },
  9376. "additionalProperties": false
  9377. },
  9378. "McpRemoteConfig": {
  9379. "type": "object",
  9380. "properties": {
  9381. "type": {
  9382. "description": "Type of MCP server connection",
  9383. "type": "string",
  9384. "const": "remote"
  9385. },
  9386. "url": {
  9387. "description": "URL of the remote MCP server",
  9388. "type": "string"
  9389. },
  9390. "enabled": {
  9391. "description": "Enable or disable the MCP server on startup",
  9392. "type": "boolean"
  9393. },
  9394. "headers": {
  9395. "description": "Headers to send with the request",
  9396. "type": "object",
  9397. "propertyNames": {
  9398. "type": "string"
  9399. },
  9400. "additionalProperties": {
  9401. "type": "string"
  9402. }
  9403. },
  9404. "oauth": {
  9405. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection.",
  9406. "anyOf": [
  9407. {
  9408. "$ref": "#/components/schemas/McpOAuthConfig"
  9409. },
  9410. {
  9411. "type": "boolean",
  9412. "const": false
  9413. }
  9414. ]
  9415. },
  9416. "timeout": {
  9417. "description": "Timeout in ms for MCP server requests. Defaults to 5000 (5 seconds) if not specified.",
  9418. "type": "integer",
  9419. "exclusiveMinimum": 0,
  9420. "maximum": 9007199254740991
  9421. }
  9422. },
  9423. "required": ["type", "url"],
  9424. "additionalProperties": false
  9425. },
  9426. "LayoutConfig": {
  9427. "description": "@deprecated Always uses stretch layout.",
  9428. "type": "string",
  9429. "enum": ["auto", "stretch"]
  9430. },
  9431. "Config": {
  9432. "type": "object",
  9433. "properties": {
  9434. "$schema": {
  9435. "description": "JSON schema reference for configuration validation",
  9436. "type": "string"
  9437. },
  9438. "theme": {
  9439. "description": "Theme name to use for the interface",
  9440. "type": "string"
  9441. },
  9442. "keybinds": {
  9443. "$ref": "#/components/schemas/KeybindsConfig"
  9444. },
  9445. "logLevel": {
  9446. "$ref": "#/components/schemas/LogLevel"
  9447. },
  9448. "tui": {
  9449. "description": "TUI specific settings",
  9450. "type": "object",
  9451. "properties": {
  9452. "scroll_speed": {
  9453. "description": "TUI scroll speed",
  9454. "type": "number",
  9455. "minimum": 0.001
  9456. },
  9457. "scroll_acceleration": {
  9458. "description": "Scroll acceleration settings",
  9459. "type": "object",
  9460. "properties": {
  9461. "enabled": {
  9462. "description": "Enable scroll acceleration",
  9463. "type": "boolean"
  9464. }
  9465. },
  9466. "required": ["enabled"]
  9467. },
  9468. "diff_style": {
  9469. "description": "Control diff rendering style: 'auto' adapts to terminal width, 'stacked' always shows single column",
  9470. "type": "string",
  9471. "enum": ["auto", "stacked"]
  9472. }
  9473. }
  9474. },
  9475. "server": {
  9476. "$ref": "#/components/schemas/ServerConfig"
  9477. },
  9478. "command": {
  9479. "description": "Command configuration, see https://opencode.ai/docs/commands",
  9480. "type": "object",
  9481. "propertyNames": {
  9482. "type": "string"
  9483. },
  9484. "additionalProperties": {
  9485. "type": "object",
  9486. "properties": {
  9487. "template": {
  9488. "type": "string"
  9489. },
  9490. "description": {
  9491. "type": "string"
  9492. },
  9493. "agent": {
  9494. "type": "string"
  9495. },
  9496. "model": {
  9497. "type": "string"
  9498. },
  9499. "subtask": {
  9500. "type": "boolean"
  9501. }
  9502. },
  9503. "required": ["template"]
  9504. }
  9505. },
  9506. "watcher": {
  9507. "type": "object",
  9508. "properties": {
  9509. "ignore": {
  9510. "type": "array",
  9511. "items": {
  9512. "type": "string"
  9513. }
  9514. }
  9515. }
  9516. },
  9517. "plugin": {
  9518. "type": "array",
  9519. "items": {
  9520. "type": "string"
  9521. }
  9522. },
  9523. "snapshot": {
  9524. "type": "boolean"
  9525. },
  9526. "share": {
  9527. "description": "Control sharing behavior:'manual' allows manual sharing via commands, 'auto' enables automatic sharing, 'disabled' disables all sharing",
  9528. "type": "string",
  9529. "enum": ["manual", "auto", "disabled"]
  9530. },
  9531. "autoshare": {
  9532. "description": "@deprecated Use 'share' field instead. Share newly created sessions automatically",
  9533. "type": "boolean"
  9534. },
  9535. "autoupdate": {
  9536. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications",
  9537. "anyOf": [
  9538. {
  9539. "type": "boolean"
  9540. },
  9541. {
  9542. "type": "string",
  9543. "const": "notify"
  9544. }
  9545. ]
  9546. },
  9547. "disabled_providers": {
  9548. "description": "Disable providers that are loaded automatically",
  9549. "type": "array",
  9550. "items": {
  9551. "type": "string"
  9552. }
  9553. },
  9554. "enabled_providers": {
  9555. "description": "When set, ONLY these providers will be enabled. All other providers will be ignored",
  9556. "type": "array",
  9557. "items": {
  9558. "type": "string"
  9559. }
  9560. },
  9561. "model": {
  9562. "description": "Model to use in the format of provider/model, eg anthropic/claude-2",
  9563. "type": "string"
  9564. },
  9565. "small_model": {
  9566. "description": "Small model to use for tasks like title generation in the format of provider/model",
  9567. "type": "string"
  9568. },
  9569. "default_agent": {
  9570. "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.",
  9571. "type": "string"
  9572. },
  9573. "username": {
  9574. "description": "Custom username to display in conversations instead of system username",
  9575. "type": "string"
  9576. },
  9577. "mode": {
  9578. "description": "@deprecated Use `agent` field instead.",
  9579. "type": "object",
  9580. "properties": {
  9581. "build": {
  9582. "$ref": "#/components/schemas/AgentConfig"
  9583. },
  9584. "plan": {
  9585. "$ref": "#/components/schemas/AgentConfig"
  9586. }
  9587. },
  9588. "additionalProperties": {
  9589. "$ref": "#/components/schemas/AgentConfig"
  9590. }
  9591. },
  9592. "agent": {
  9593. "description": "Agent configuration, see https://opencode.ai/docs/agents",
  9594. "type": "object",
  9595. "properties": {
  9596. "plan": {
  9597. "$ref": "#/components/schemas/AgentConfig"
  9598. },
  9599. "build": {
  9600. "$ref": "#/components/schemas/AgentConfig"
  9601. },
  9602. "general": {
  9603. "$ref": "#/components/schemas/AgentConfig"
  9604. },
  9605. "explore": {
  9606. "$ref": "#/components/schemas/AgentConfig"
  9607. },
  9608. "title": {
  9609. "$ref": "#/components/schemas/AgentConfig"
  9610. },
  9611. "summary": {
  9612. "$ref": "#/components/schemas/AgentConfig"
  9613. },
  9614. "compaction": {
  9615. "$ref": "#/components/schemas/AgentConfig"
  9616. }
  9617. },
  9618. "additionalProperties": {
  9619. "$ref": "#/components/schemas/AgentConfig"
  9620. }
  9621. },
  9622. "provider": {
  9623. "description": "Custom provider configurations and model overrides",
  9624. "type": "object",
  9625. "propertyNames": {
  9626. "type": "string"
  9627. },
  9628. "additionalProperties": {
  9629. "$ref": "#/components/schemas/ProviderConfig"
  9630. }
  9631. },
  9632. "mcp": {
  9633. "description": "MCP (Model Context Protocol) server configurations",
  9634. "type": "object",
  9635. "propertyNames": {
  9636. "type": "string"
  9637. },
  9638. "additionalProperties": {
  9639. "anyOf": [
  9640. {
  9641. "anyOf": [
  9642. {
  9643. "$ref": "#/components/schemas/McpLocalConfig"
  9644. },
  9645. {
  9646. "$ref": "#/components/schemas/McpRemoteConfig"
  9647. }
  9648. ]
  9649. },
  9650. {
  9651. "type": "object",
  9652. "properties": {
  9653. "enabled": {
  9654. "type": "boolean"
  9655. }
  9656. },
  9657. "required": ["enabled"],
  9658. "additionalProperties": false
  9659. }
  9660. ]
  9661. }
  9662. },
  9663. "formatter": {
  9664. "anyOf": [
  9665. {
  9666. "type": "boolean",
  9667. "const": false
  9668. },
  9669. {
  9670. "type": "object",
  9671. "propertyNames": {
  9672. "type": "string"
  9673. },
  9674. "additionalProperties": {
  9675. "type": "object",
  9676. "properties": {
  9677. "disabled": {
  9678. "type": "boolean"
  9679. },
  9680. "command": {
  9681. "type": "array",
  9682. "items": {
  9683. "type": "string"
  9684. }
  9685. },
  9686. "environment": {
  9687. "type": "object",
  9688. "propertyNames": {
  9689. "type": "string"
  9690. },
  9691. "additionalProperties": {
  9692. "type": "string"
  9693. }
  9694. },
  9695. "extensions": {
  9696. "type": "array",
  9697. "items": {
  9698. "type": "string"
  9699. }
  9700. }
  9701. }
  9702. }
  9703. }
  9704. ]
  9705. },
  9706. "lsp": {
  9707. "anyOf": [
  9708. {
  9709. "type": "boolean",
  9710. "const": false
  9711. },
  9712. {
  9713. "type": "object",
  9714. "propertyNames": {
  9715. "type": "string"
  9716. },
  9717. "additionalProperties": {
  9718. "anyOf": [
  9719. {
  9720. "type": "object",
  9721. "properties": {
  9722. "disabled": {
  9723. "type": "boolean",
  9724. "const": true
  9725. }
  9726. },
  9727. "required": ["disabled"]
  9728. },
  9729. {
  9730. "type": "object",
  9731. "properties": {
  9732. "command": {
  9733. "type": "array",
  9734. "items": {
  9735. "type": "string"
  9736. }
  9737. },
  9738. "extensions": {
  9739. "type": "array",
  9740. "items": {
  9741. "type": "string"
  9742. }
  9743. },
  9744. "disabled": {
  9745. "type": "boolean"
  9746. },
  9747. "env": {
  9748. "type": "object",
  9749. "propertyNames": {
  9750. "type": "string"
  9751. },
  9752. "additionalProperties": {
  9753. "type": "string"
  9754. }
  9755. },
  9756. "initialization": {
  9757. "type": "object",
  9758. "propertyNames": {
  9759. "type": "string"
  9760. },
  9761. "additionalProperties": {}
  9762. }
  9763. },
  9764. "required": ["command"]
  9765. }
  9766. ]
  9767. }
  9768. }
  9769. ]
  9770. },
  9771. "instructions": {
  9772. "description": "Additional instruction files or patterns to include",
  9773. "type": "array",
  9774. "items": {
  9775. "type": "string"
  9776. }
  9777. },
  9778. "layout": {
  9779. "$ref": "#/components/schemas/LayoutConfig"
  9780. },
  9781. "permission": {
  9782. "$ref": "#/components/schemas/PermissionConfig"
  9783. },
  9784. "tools": {
  9785. "type": "object",
  9786. "propertyNames": {
  9787. "type": "string"
  9788. },
  9789. "additionalProperties": {
  9790. "type": "boolean"
  9791. }
  9792. },
  9793. "enterprise": {
  9794. "type": "object",
  9795. "properties": {
  9796. "url": {
  9797. "description": "Enterprise URL",
  9798. "type": "string"
  9799. }
  9800. }
  9801. },
  9802. "compaction": {
  9803. "type": "object",
  9804. "properties": {
  9805. "auto": {
  9806. "description": "Enable automatic compaction when context is full (default: true)",
  9807. "type": "boolean"
  9808. },
  9809. "prune": {
  9810. "description": "Enable pruning of old tool outputs (default: true)",
  9811. "type": "boolean"
  9812. }
  9813. }
  9814. },
  9815. "experimental": {
  9816. "type": "object",
  9817. "properties": {
  9818. "hook": {
  9819. "type": "object",
  9820. "properties": {
  9821. "file_edited": {
  9822. "type": "object",
  9823. "propertyNames": {
  9824. "type": "string"
  9825. },
  9826. "additionalProperties": {
  9827. "type": "array",
  9828. "items": {
  9829. "type": "object",
  9830. "properties": {
  9831. "command": {
  9832. "type": "array",
  9833. "items": {
  9834. "type": "string"
  9835. }
  9836. },
  9837. "environment": {
  9838. "type": "object",
  9839. "propertyNames": {
  9840. "type": "string"
  9841. },
  9842. "additionalProperties": {
  9843. "type": "string"
  9844. }
  9845. }
  9846. },
  9847. "required": ["command"]
  9848. }
  9849. }
  9850. },
  9851. "session_completed": {
  9852. "type": "array",
  9853. "items": {
  9854. "type": "object",
  9855. "properties": {
  9856. "command": {
  9857. "type": "array",
  9858. "items": {
  9859. "type": "string"
  9860. }
  9861. },
  9862. "environment": {
  9863. "type": "object",
  9864. "propertyNames": {
  9865. "type": "string"
  9866. },
  9867. "additionalProperties": {
  9868. "type": "string"
  9869. }
  9870. }
  9871. },
  9872. "required": ["command"]
  9873. }
  9874. }
  9875. }
  9876. },
  9877. "chatMaxRetries": {
  9878. "description": "Number of retries for chat completions on failure",
  9879. "type": "number"
  9880. },
  9881. "disable_paste_summary": {
  9882. "type": "boolean"
  9883. },
  9884. "batch_tool": {
  9885. "description": "Enable the batch tool",
  9886. "type": "boolean"
  9887. },
  9888. "openTelemetry": {
  9889. "description": "Enable OpenTelemetry spans for AI SDK calls (using the 'experimental_telemetry' flag)",
  9890. "type": "boolean"
  9891. },
  9892. "primary_tools": {
  9893. "description": "Tools that should only be available to primary agents.",
  9894. "type": "array",
  9895. "items": {
  9896. "type": "string"
  9897. }
  9898. },
  9899. "continue_loop_on_deny": {
  9900. "description": "Continue the agent loop when a tool call is denied",
  9901. "type": "boolean"
  9902. },
  9903. "mcp_timeout": {
  9904. "description": "Timeout in milliseconds for model context protocol (MCP) requests",
  9905. "type": "integer",
  9906. "exclusiveMinimum": 0,
  9907. "maximum": 9007199254740991
  9908. }
  9909. }
  9910. }
  9911. },
  9912. "additionalProperties": false
  9913. },
  9914. "BadRequestError": {
  9915. "type": "object",
  9916. "properties": {
  9917. "data": {},
  9918. "errors": {
  9919. "type": "array",
  9920. "items": {
  9921. "type": "object",
  9922. "propertyNames": {
  9923. "type": "string"
  9924. },
  9925. "additionalProperties": {}
  9926. }
  9927. },
  9928. "success": {
  9929. "type": "boolean",
  9930. "const": false
  9931. }
  9932. },
  9933. "required": ["data", "errors", "success"]
  9934. },
  9935. "OAuth": {
  9936. "type": "object",
  9937. "properties": {
  9938. "type": {
  9939. "type": "string",
  9940. "const": "oauth"
  9941. },
  9942. "refresh": {
  9943. "type": "string"
  9944. },
  9945. "access": {
  9946. "type": "string"
  9947. },
  9948. "expires": {
  9949. "type": "number"
  9950. },
  9951. "accountId": {
  9952. "type": "string"
  9953. },
  9954. "enterpriseUrl": {
  9955. "type": "string"
  9956. }
  9957. },
  9958. "required": ["type", "refresh", "access", "expires"]
  9959. },
  9960. "ApiAuth": {
  9961. "type": "object",
  9962. "properties": {
  9963. "type": {
  9964. "type": "string",
  9965. "const": "api"
  9966. },
  9967. "key": {
  9968. "type": "string"
  9969. }
  9970. },
  9971. "required": ["type", "key"]
  9972. },
  9973. "WellKnownAuth": {
  9974. "type": "object",
  9975. "properties": {
  9976. "type": {
  9977. "type": "string",
  9978. "const": "wellknown"
  9979. },
  9980. "key": {
  9981. "type": "string"
  9982. },
  9983. "token": {
  9984. "type": "string"
  9985. }
  9986. },
  9987. "required": ["type", "key", "token"]
  9988. },
  9989. "Auth": {
  9990. "anyOf": [
  9991. {
  9992. "$ref": "#/components/schemas/OAuth"
  9993. },
  9994. {
  9995. "$ref": "#/components/schemas/ApiAuth"
  9996. },
  9997. {
  9998. "$ref": "#/components/schemas/WellKnownAuth"
  9999. }
  10000. ]
  10001. },
  10002. "NotFoundError": {
  10003. "type": "object",
  10004. "properties": {
  10005. "name": {
  10006. "type": "string",
  10007. "const": "NotFoundError"
  10008. },
  10009. "data": {
  10010. "type": "object",
  10011. "properties": {
  10012. "message": {
  10013. "type": "string"
  10014. }
  10015. },
  10016. "required": ["message"]
  10017. }
  10018. },
  10019. "required": ["name", "data"]
  10020. },
  10021. "Model": {
  10022. "type": "object",
  10023. "properties": {
  10024. "id": {
  10025. "type": "string"
  10026. },
  10027. "providerID": {
  10028. "type": "string"
  10029. },
  10030. "api": {
  10031. "type": "object",
  10032. "properties": {
  10033. "id": {
  10034. "type": "string"
  10035. },
  10036. "url": {
  10037. "type": "string"
  10038. },
  10039. "npm": {
  10040. "type": "string"
  10041. }
  10042. },
  10043. "required": ["id", "url", "npm"]
  10044. },
  10045. "name": {
  10046. "type": "string"
  10047. },
  10048. "family": {
  10049. "type": "string"
  10050. },
  10051. "capabilities": {
  10052. "type": "object",
  10053. "properties": {
  10054. "temperature": {
  10055. "type": "boolean"
  10056. },
  10057. "reasoning": {
  10058. "type": "boolean"
  10059. },
  10060. "attachment": {
  10061. "type": "boolean"
  10062. },
  10063. "toolcall": {
  10064. "type": "boolean"
  10065. },
  10066. "input": {
  10067. "type": "object",
  10068. "properties": {
  10069. "text": {
  10070. "type": "boolean"
  10071. },
  10072. "audio": {
  10073. "type": "boolean"
  10074. },
  10075. "image": {
  10076. "type": "boolean"
  10077. },
  10078. "video": {
  10079. "type": "boolean"
  10080. },
  10081. "pdf": {
  10082. "type": "boolean"
  10083. }
  10084. },
  10085. "required": ["text", "audio", "image", "video", "pdf"]
  10086. },
  10087. "output": {
  10088. "type": "object",
  10089. "properties": {
  10090. "text": {
  10091. "type": "boolean"
  10092. },
  10093. "audio": {
  10094. "type": "boolean"
  10095. },
  10096. "image": {
  10097. "type": "boolean"
  10098. },
  10099. "video": {
  10100. "type": "boolean"
  10101. },
  10102. "pdf": {
  10103. "type": "boolean"
  10104. }
  10105. },
  10106. "required": ["text", "audio", "image", "video", "pdf"]
  10107. },
  10108. "interleaved": {
  10109. "anyOf": [
  10110. {
  10111. "type": "boolean"
  10112. },
  10113. {
  10114. "type": "object",
  10115. "properties": {
  10116. "field": {
  10117. "type": "string",
  10118. "enum": ["reasoning_content", "reasoning_details"]
  10119. }
  10120. },
  10121. "required": ["field"]
  10122. }
  10123. ]
  10124. }
  10125. },
  10126. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"]
  10127. },
  10128. "cost": {
  10129. "type": "object",
  10130. "properties": {
  10131. "input": {
  10132. "type": "number"
  10133. },
  10134. "output": {
  10135. "type": "number"
  10136. },
  10137. "cache": {
  10138. "type": "object",
  10139. "properties": {
  10140. "read": {
  10141. "type": "number"
  10142. },
  10143. "write": {
  10144. "type": "number"
  10145. }
  10146. },
  10147. "required": ["read", "write"]
  10148. },
  10149. "experimentalOver200K": {
  10150. "type": "object",
  10151. "properties": {
  10152. "input": {
  10153. "type": "number"
  10154. },
  10155. "output": {
  10156. "type": "number"
  10157. },
  10158. "cache": {
  10159. "type": "object",
  10160. "properties": {
  10161. "read": {
  10162. "type": "number"
  10163. },
  10164. "write": {
  10165. "type": "number"
  10166. }
  10167. },
  10168. "required": ["read", "write"]
  10169. }
  10170. },
  10171. "required": ["input", "output", "cache"]
  10172. }
  10173. },
  10174. "required": ["input", "output", "cache"]
  10175. },
  10176. "limit": {
  10177. "type": "object",
  10178. "properties": {
  10179. "context": {
  10180. "type": "number"
  10181. },
  10182. "input": {
  10183. "type": "number"
  10184. },
  10185. "output": {
  10186. "type": "number"
  10187. }
  10188. },
  10189. "required": ["context", "output"]
  10190. },
  10191. "status": {
  10192. "type": "string",
  10193. "enum": ["alpha", "beta", "deprecated", "active"]
  10194. },
  10195. "options": {
  10196. "type": "object",
  10197. "propertyNames": {
  10198. "type": "string"
  10199. },
  10200. "additionalProperties": {}
  10201. },
  10202. "headers": {
  10203. "type": "object",
  10204. "propertyNames": {
  10205. "type": "string"
  10206. },
  10207. "additionalProperties": {
  10208. "type": "string"
  10209. }
  10210. },
  10211. "release_date": {
  10212. "type": "string"
  10213. },
  10214. "variants": {
  10215. "type": "object",
  10216. "propertyNames": {
  10217. "type": "string"
  10218. },
  10219. "additionalProperties": {
  10220. "type": "object",
  10221. "propertyNames": {
  10222. "type": "string"
  10223. },
  10224. "additionalProperties": {}
  10225. }
  10226. }
  10227. },
  10228. "required": [
  10229. "id",
  10230. "providerID",
  10231. "api",
  10232. "name",
  10233. "capabilities",
  10234. "cost",
  10235. "limit",
  10236. "status",
  10237. "options",
  10238. "headers",
  10239. "release_date"
  10240. ]
  10241. },
  10242. "Provider": {
  10243. "type": "object",
  10244. "properties": {
  10245. "id": {
  10246. "type": "string"
  10247. },
  10248. "name": {
  10249. "type": "string"
  10250. },
  10251. "source": {
  10252. "type": "string",
  10253. "enum": ["env", "config", "custom", "api"]
  10254. },
  10255. "env": {
  10256. "type": "array",
  10257. "items": {
  10258. "type": "string"
  10259. }
  10260. },
  10261. "key": {
  10262. "type": "string"
  10263. },
  10264. "options": {
  10265. "type": "object",
  10266. "propertyNames": {
  10267. "type": "string"
  10268. },
  10269. "additionalProperties": {}
  10270. },
  10271. "models": {
  10272. "type": "object",
  10273. "propertyNames": {
  10274. "type": "string"
  10275. },
  10276. "additionalProperties": {
  10277. "$ref": "#/components/schemas/Model"
  10278. }
  10279. }
  10280. },
  10281. "required": ["id", "name", "source", "env", "options", "models"]
  10282. },
  10283. "ToolIDs": {
  10284. "type": "array",
  10285. "items": {
  10286. "type": "string"
  10287. }
  10288. },
  10289. "ToolListItem": {
  10290. "type": "object",
  10291. "properties": {
  10292. "id": {
  10293. "type": "string"
  10294. },
  10295. "description": {
  10296. "type": "string"
  10297. },
  10298. "parameters": {}
  10299. },
  10300. "required": ["id", "description", "parameters"]
  10301. },
  10302. "ToolList": {
  10303. "type": "array",
  10304. "items": {
  10305. "$ref": "#/components/schemas/ToolListItem"
  10306. }
  10307. },
  10308. "Worktree": {
  10309. "type": "object",
  10310. "properties": {
  10311. "name": {
  10312. "type": "string"
  10313. },
  10314. "branch": {
  10315. "type": "string"
  10316. },
  10317. "directory": {
  10318. "type": "string"
  10319. }
  10320. },
  10321. "required": ["name", "branch", "directory"]
  10322. },
  10323. "WorktreeCreateInput": {
  10324. "type": "object",
  10325. "properties": {
  10326. "name": {
  10327. "type": "string"
  10328. },
  10329. "startCommand": {
  10330. "description": "Additional startup script to run after the project's start command",
  10331. "type": "string"
  10332. }
  10333. }
  10334. },
  10335. "WorktreeRemoveInput": {
  10336. "type": "object",
  10337. "properties": {
  10338. "directory": {
  10339. "type": "string"
  10340. }
  10341. },
  10342. "required": ["directory"]
  10343. },
  10344. "WorktreeResetInput": {
  10345. "type": "object",
  10346. "properties": {
  10347. "directory": {
  10348. "type": "string"
  10349. }
  10350. },
  10351. "required": ["directory"]
  10352. },
  10353. "McpResource": {
  10354. "type": "object",
  10355. "properties": {
  10356. "name": {
  10357. "type": "string"
  10358. },
  10359. "uri": {
  10360. "type": "string"
  10361. },
  10362. "description": {
  10363. "type": "string"
  10364. },
  10365. "mimeType": {
  10366. "type": "string"
  10367. },
  10368. "client": {
  10369. "type": "string"
  10370. }
  10371. },
  10372. "required": ["name", "uri", "client"]
  10373. },
  10374. "TextPartInput": {
  10375. "type": "object",
  10376. "properties": {
  10377. "id": {
  10378. "type": "string"
  10379. },
  10380. "type": {
  10381. "type": "string",
  10382. "const": "text"
  10383. },
  10384. "text": {
  10385. "type": "string"
  10386. },
  10387. "synthetic": {
  10388. "type": "boolean"
  10389. },
  10390. "ignored": {
  10391. "type": "boolean"
  10392. },
  10393. "time": {
  10394. "type": "object",
  10395. "properties": {
  10396. "start": {
  10397. "type": "number"
  10398. },
  10399. "end": {
  10400. "type": "number"
  10401. }
  10402. },
  10403. "required": ["start"]
  10404. },
  10405. "metadata": {
  10406. "type": "object",
  10407. "propertyNames": {
  10408. "type": "string"
  10409. },
  10410. "additionalProperties": {}
  10411. }
  10412. },
  10413. "required": ["type", "text"]
  10414. },
  10415. "FilePartInput": {
  10416. "type": "object",
  10417. "properties": {
  10418. "id": {
  10419. "type": "string"
  10420. },
  10421. "type": {
  10422. "type": "string",
  10423. "const": "file"
  10424. },
  10425. "mime": {
  10426. "type": "string"
  10427. },
  10428. "filename": {
  10429. "type": "string"
  10430. },
  10431. "url": {
  10432. "type": "string"
  10433. },
  10434. "source": {
  10435. "$ref": "#/components/schemas/FilePartSource"
  10436. }
  10437. },
  10438. "required": ["type", "mime", "url"]
  10439. },
  10440. "AgentPartInput": {
  10441. "type": "object",
  10442. "properties": {
  10443. "id": {
  10444. "type": "string"
  10445. },
  10446. "type": {
  10447. "type": "string",
  10448. "const": "agent"
  10449. },
  10450. "name": {
  10451. "type": "string"
  10452. },
  10453. "source": {
  10454. "type": "object",
  10455. "properties": {
  10456. "value": {
  10457. "type": "string"
  10458. },
  10459. "start": {
  10460. "type": "integer",
  10461. "minimum": -9007199254740991,
  10462. "maximum": 9007199254740991
  10463. },
  10464. "end": {
  10465. "type": "integer",
  10466. "minimum": -9007199254740991,
  10467. "maximum": 9007199254740991
  10468. }
  10469. },
  10470. "required": ["value", "start", "end"]
  10471. }
  10472. },
  10473. "required": ["type", "name"]
  10474. },
  10475. "SubtaskPartInput": {
  10476. "type": "object",
  10477. "properties": {
  10478. "id": {
  10479. "type": "string"
  10480. },
  10481. "type": {
  10482. "type": "string",
  10483. "const": "subtask"
  10484. },
  10485. "prompt": {
  10486. "type": "string"
  10487. },
  10488. "description": {
  10489. "type": "string"
  10490. },
  10491. "agent": {
  10492. "type": "string"
  10493. },
  10494. "model": {
  10495. "type": "object",
  10496. "properties": {
  10497. "providerID": {
  10498. "type": "string"
  10499. },
  10500. "modelID": {
  10501. "type": "string"
  10502. }
  10503. },
  10504. "required": ["providerID", "modelID"]
  10505. },
  10506. "command": {
  10507. "type": "string"
  10508. }
  10509. },
  10510. "required": ["type", "prompt", "description", "agent"]
  10511. },
  10512. "ProviderAuthMethod": {
  10513. "type": "object",
  10514. "properties": {
  10515. "type": {
  10516. "anyOf": [
  10517. {
  10518. "type": "string",
  10519. "const": "oauth"
  10520. },
  10521. {
  10522. "type": "string",
  10523. "const": "api"
  10524. }
  10525. ]
  10526. },
  10527. "label": {
  10528. "type": "string"
  10529. }
  10530. },
  10531. "required": ["type", "label"]
  10532. },
  10533. "ProviderAuthAuthorization": {
  10534. "type": "object",
  10535. "properties": {
  10536. "url": {
  10537. "type": "string"
  10538. },
  10539. "method": {
  10540. "anyOf": [
  10541. {
  10542. "type": "string",
  10543. "const": "auto"
  10544. },
  10545. {
  10546. "type": "string",
  10547. "const": "code"
  10548. }
  10549. ]
  10550. },
  10551. "instructions": {
  10552. "type": "string"
  10553. }
  10554. },
  10555. "required": ["url", "method", "instructions"]
  10556. },
  10557. "Symbol": {
  10558. "type": "object",
  10559. "properties": {
  10560. "name": {
  10561. "type": "string"
  10562. },
  10563. "kind": {
  10564. "type": "number"
  10565. },
  10566. "location": {
  10567. "type": "object",
  10568. "properties": {
  10569. "uri": {
  10570. "type": "string"
  10571. },
  10572. "range": {
  10573. "$ref": "#/components/schemas/Range"
  10574. }
  10575. },
  10576. "required": ["uri", "range"]
  10577. }
  10578. },
  10579. "required": ["name", "kind", "location"]
  10580. },
  10581. "FileNode": {
  10582. "type": "object",
  10583. "properties": {
  10584. "name": {
  10585. "type": "string"
  10586. },
  10587. "path": {
  10588. "type": "string"
  10589. },
  10590. "absolute": {
  10591. "type": "string"
  10592. },
  10593. "type": {
  10594. "type": "string",
  10595. "enum": ["file", "directory"]
  10596. },
  10597. "ignored": {
  10598. "type": "boolean"
  10599. }
  10600. },
  10601. "required": ["name", "path", "absolute", "type", "ignored"]
  10602. },
  10603. "FileContent": {
  10604. "type": "object",
  10605. "properties": {
  10606. "type": {
  10607. "type": "string",
  10608. "const": "text"
  10609. },
  10610. "content": {
  10611. "type": "string"
  10612. },
  10613. "diff": {
  10614. "type": "string"
  10615. },
  10616. "patch": {
  10617. "type": "object",
  10618. "properties": {
  10619. "oldFileName": {
  10620. "type": "string"
  10621. },
  10622. "newFileName": {
  10623. "type": "string"
  10624. },
  10625. "oldHeader": {
  10626. "type": "string"
  10627. },
  10628. "newHeader": {
  10629. "type": "string"
  10630. },
  10631. "hunks": {
  10632. "type": "array",
  10633. "items": {
  10634. "type": "object",
  10635. "properties": {
  10636. "oldStart": {
  10637. "type": "number"
  10638. },
  10639. "oldLines": {
  10640. "type": "number"
  10641. },
  10642. "newStart": {
  10643. "type": "number"
  10644. },
  10645. "newLines": {
  10646. "type": "number"
  10647. },
  10648. "lines": {
  10649. "type": "array",
  10650. "items": {
  10651. "type": "string"
  10652. }
  10653. }
  10654. },
  10655. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"]
  10656. }
  10657. },
  10658. "index": {
  10659. "type": "string"
  10660. }
  10661. },
  10662. "required": ["oldFileName", "newFileName", "hunks"]
  10663. },
  10664. "encoding": {
  10665. "type": "string",
  10666. "const": "base64"
  10667. },
  10668. "mimeType": {
  10669. "type": "string"
  10670. }
  10671. },
  10672. "required": ["type", "content"]
  10673. },
  10674. "File": {
  10675. "type": "object",
  10676. "properties": {
  10677. "path": {
  10678. "type": "string"
  10679. },
  10680. "added": {
  10681. "type": "integer",
  10682. "minimum": -9007199254740991,
  10683. "maximum": 9007199254740991
  10684. },
  10685. "removed": {
  10686. "type": "integer",
  10687. "minimum": -9007199254740991,
  10688. "maximum": 9007199254740991
  10689. },
  10690. "status": {
  10691. "type": "string",
  10692. "enum": ["added", "deleted", "modified"]
  10693. }
  10694. },
  10695. "required": ["path", "added", "removed", "status"]
  10696. },
  10697. "MCPStatusConnected": {
  10698. "type": "object",
  10699. "properties": {
  10700. "status": {
  10701. "type": "string",
  10702. "const": "connected"
  10703. }
  10704. },
  10705. "required": ["status"]
  10706. },
  10707. "MCPStatusDisabled": {
  10708. "type": "object",
  10709. "properties": {
  10710. "status": {
  10711. "type": "string",
  10712. "const": "disabled"
  10713. }
  10714. },
  10715. "required": ["status"]
  10716. },
  10717. "MCPStatusFailed": {
  10718. "type": "object",
  10719. "properties": {
  10720. "status": {
  10721. "type": "string",
  10722. "const": "failed"
  10723. },
  10724. "error": {
  10725. "type": "string"
  10726. }
  10727. },
  10728. "required": ["status", "error"]
  10729. },
  10730. "MCPStatusNeedsAuth": {
  10731. "type": "object",
  10732. "properties": {
  10733. "status": {
  10734. "type": "string",
  10735. "const": "needs_auth"
  10736. }
  10737. },
  10738. "required": ["status"]
  10739. },
  10740. "MCPStatusNeedsClientRegistration": {
  10741. "type": "object",
  10742. "properties": {
  10743. "status": {
  10744. "type": "string",
  10745. "const": "needs_client_registration"
  10746. },
  10747. "error": {
  10748. "type": "string"
  10749. }
  10750. },
  10751. "required": ["status", "error"]
  10752. },
  10753. "MCPStatus": {
  10754. "anyOf": [
  10755. {
  10756. "$ref": "#/components/schemas/MCPStatusConnected"
  10757. },
  10758. {
  10759. "$ref": "#/components/schemas/MCPStatusDisabled"
  10760. },
  10761. {
  10762. "$ref": "#/components/schemas/MCPStatusFailed"
  10763. },
  10764. {
  10765. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  10766. },
  10767. {
  10768. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  10769. }
  10770. ]
  10771. },
  10772. "Path": {
  10773. "type": "object",
  10774. "properties": {
  10775. "home": {
  10776. "type": "string"
  10777. },
  10778. "state": {
  10779. "type": "string"
  10780. },
  10781. "config": {
  10782. "type": "string"
  10783. },
  10784. "worktree": {
  10785. "type": "string"
  10786. },
  10787. "directory": {
  10788. "type": "string"
  10789. }
  10790. },
  10791. "required": ["home", "state", "config", "worktree", "directory"]
  10792. },
  10793. "VcsInfo": {
  10794. "type": "object",
  10795. "properties": {
  10796. "branch": {
  10797. "type": "string"
  10798. }
  10799. },
  10800. "required": ["branch"]
  10801. },
  10802. "Command": {
  10803. "type": "object",
  10804. "properties": {
  10805. "name": {
  10806. "type": "string"
  10807. },
  10808. "description": {
  10809. "type": "string"
  10810. },
  10811. "agent": {
  10812. "type": "string"
  10813. },
  10814. "model": {
  10815. "type": "string"
  10816. },
  10817. "mcp": {
  10818. "type": "boolean"
  10819. },
  10820. "template": {
  10821. "anyOf": [
  10822. {
  10823. "type": "string"
  10824. },
  10825. {
  10826. "type": "string"
  10827. }
  10828. ]
  10829. },
  10830. "subtask": {
  10831. "type": "boolean"
  10832. },
  10833. "hints": {
  10834. "type": "array",
  10835. "items": {
  10836. "type": "string"
  10837. }
  10838. }
  10839. },
  10840. "required": ["name", "template", "hints"]
  10841. },
  10842. "Agent": {
  10843. "type": "object",
  10844. "properties": {
  10845. "name": {
  10846. "type": "string"
  10847. },
  10848. "description": {
  10849. "type": "string"
  10850. },
  10851. "mode": {
  10852. "type": "string",
  10853. "enum": ["subagent", "primary", "all"]
  10854. },
  10855. "native": {
  10856. "type": "boolean"
  10857. },
  10858. "hidden": {
  10859. "type": "boolean"
  10860. },
  10861. "topP": {
  10862. "type": "number"
  10863. },
  10864. "temperature": {
  10865. "type": "number"
  10866. },
  10867. "color": {
  10868. "type": "string"
  10869. },
  10870. "permission": {
  10871. "$ref": "#/components/schemas/PermissionRuleset"
  10872. },
  10873. "model": {
  10874. "type": "object",
  10875. "properties": {
  10876. "modelID": {
  10877. "type": "string"
  10878. },
  10879. "providerID": {
  10880. "type": "string"
  10881. }
  10882. },
  10883. "required": ["modelID", "providerID"]
  10884. },
  10885. "prompt": {
  10886. "type": "string"
  10887. },
  10888. "options": {
  10889. "type": "object",
  10890. "propertyNames": {
  10891. "type": "string"
  10892. },
  10893. "additionalProperties": {}
  10894. },
  10895. "steps": {
  10896. "type": "integer",
  10897. "exclusiveMinimum": 0,
  10898. "maximum": 9007199254740991
  10899. }
  10900. },
  10901. "required": ["name", "mode", "permission", "options"]
  10902. },
  10903. "LSPStatus": {
  10904. "type": "object",
  10905. "properties": {
  10906. "id": {
  10907. "type": "string"
  10908. },
  10909. "name": {
  10910. "type": "string"
  10911. },
  10912. "root": {
  10913. "type": "string"
  10914. },
  10915. "status": {
  10916. "anyOf": [
  10917. {
  10918. "type": "string",
  10919. "const": "connected"
  10920. },
  10921. {
  10922. "type": "string",
  10923. "const": "error"
  10924. }
  10925. ]
  10926. }
  10927. },
  10928. "required": ["id", "name", "root", "status"]
  10929. },
  10930. "FormatterStatus": {
  10931. "type": "object",
  10932. "properties": {
  10933. "name": {
  10934. "type": "string"
  10935. },
  10936. "extensions": {
  10937. "type": "array",
  10938. "items": {
  10939. "type": "string"
  10940. }
  10941. },
  10942. "enabled": {
  10943. "type": "boolean"
  10944. }
  10945. },
  10946. "required": ["name", "extensions", "enabled"]
  10947. }
  10948. }
  10949. }
  10950. }