openapi.json 219 KB

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