openapi.json 228 KB

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