暫無描述
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

opencode-api.json 284KB

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