openapi.json 228 KB

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