openapi.json 206 KB

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