openapi.json 259 KB

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