openapi.json 254 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233
  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}/prompt_async": {
  2130. "post": {
  2131. "operationId": "session.prompt_async",
  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. "summary": "Send async message",
  2151. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  2152. "responses": {
  2153. "204": {
  2154. "description": "Prompt accepted"
  2155. },
  2156. "400": {
  2157. "description": "Bad request",
  2158. "content": {
  2159. "application/json": {
  2160. "schema": {
  2161. "$ref": "#/components/schemas/BadRequestError"
  2162. }
  2163. }
  2164. }
  2165. },
  2166. "404": {
  2167. "description": "Not found",
  2168. "content": {
  2169. "application/json": {
  2170. "schema": {
  2171. "$ref": "#/components/schemas/NotFoundError"
  2172. }
  2173. }
  2174. }
  2175. }
  2176. },
  2177. "requestBody": {
  2178. "content": {
  2179. "application/json": {
  2180. "schema": {
  2181. "type": "object",
  2182. "properties": {
  2183. "messageID": {
  2184. "type": "string",
  2185. "pattern": "^msg.*"
  2186. },
  2187. "model": {
  2188. "type": "object",
  2189. "properties": {
  2190. "providerID": {
  2191. "type": "string"
  2192. },
  2193. "modelID": {
  2194. "type": "string"
  2195. }
  2196. },
  2197. "required": ["providerID", "modelID"]
  2198. },
  2199. "agent": {
  2200. "type": "string"
  2201. },
  2202. "noReply": {
  2203. "type": "boolean"
  2204. },
  2205. "tools": {
  2206. "type": "object",
  2207. "propertyNames": {
  2208. "type": "string"
  2209. },
  2210. "additionalProperties": {
  2211. "type": "boolean"
  2212. }
  2213. },
  2214. "system": {
  2215. "type": "string"
  2216. },
  2217. "parts": {
  2218. "type": "array",
  2219. "items": {
  2220. "anyOf": [
  2221. {
  2222. "$ref": "#/components/schemas/TextPartInput"
  2223. },
  2224. {
  2225. "$ref": "#/components/schemas/FilePartInput"
  2226. },
  2227. {
  2228. "$ref": "#/components/schemas/AgentPartInput"
  2229. },
  2230. {
  2231. "$ref": "#/components/schemas/SubtaskPartInput"
  2232. }
  2233. ]
  2234. }
  2235. }
  2236. },
  2237. "required": ["parts"]
  2238. }
  2239. }
  2240. }
  2241. },
  2242. "x-codeSamples": [
  2243. {
  2244. "lang": "js",
  2245. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  2246. }
  2247. ]
  2248. }
  2249. },
  2250. "/session/{sessionID}/command": {
  2251. "post": {
  2252. "operationId": "session.command",
  2253. "parameters": [
  2254. {
  2255. "in": "query",
  2256. "name": "directory",
  2257. "schema": {
  2258. "type": "string"
  2259. }
  2260. },
  2261. {
  2262. "in": "path",
  2263. "name": "sessionID",
  2264. "schema": {
  2265. "type": "string"
  2266. },
  2267. "required": true,
  2268. "description": "Session ID"
  2269. }
  2270. ],
  2271. "summary": "Send command",
  2272. "description": "Send a new command to a session for execution by the AI assistant.",
  2273. "responses": {
  2274. "200": {
  2275. "description": "Created message",
  2276. "content": {
  2277. "application/json": {
  2278. "schema": {
  2279. "type": "object",
  2280. "properties": {
  2281. "info": {
  2282. "$ref": "#/components/schemas/AssistantMessage"
  2283. },
  2284. "parts": {
  2285. "type": "array",
  2286. "items": {
  2287. "$ref": "#/components/schemas/Part"
  2288. }
  2289. }
  2290. },
  2291. "required": ["info", "parts"]
  2292. }
  2293. }
  2294. }
  2295. },
  2296. "400": {
  2297. "description": "Bad request",
  2298. "content": {
  2299. "application/json": {
  2300. "schema": {
  2301. "$ref": "#/components/schemas/BadRequestError"
  2302. }
  2303. }
  2304. }
  2305. },
  2306. "404": {
  2307. "description": "Not found",
  2308. "content": {
  2309. "application/json": {
  2310. "schema": {
  2311. "$ref": "#/components/schemas/NotFoundError"
  2312. }
  2313. }
  2314. }
  2315. }
  2316. },
  2317. "requestBody": {
  2318. "content": {
  2319. "application/json": {
  2320. "schema": {
  2321. "type": "object",
  2322. "properties": {
  2323. "messageID": {
  2324. "type": "string",
  2325. "pattern": "^msg.*"
  2326. },
  2327. "agent": {
  2328. "type": "string"
  2329. },
  2330. "model": {
  2331. "type": "string"
  2332. },
  2333. "arguments": {
  2334. "type": "string"
  2335. },
  2336. "command": {
  2337. "type": "string"
  2338. }
  2339. },
  2340. "required": ["arguments", "command"]
  2341. }
  2342. }
  2343. }
  2344. },
  2345. "x-codeSamples": [
  2346. {
  2347. "lang": "js",
  2348. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  2349. }
  2350. ]
  2351. }
  2352. },
  2353. "/session/{sessionID}/shell": {
  2354. "post": {
  2355. "operationId": "session.shell",
  2356. "parameters": [
  2357. {
  2358. "in": "query",
  2359. "name": "directory",
  2360. "schema": {
  2361. "type": "string"
  2362. }
  2363. },
  2364. {
  2365. "in": "path",
  2366. "name": "sessionID",
  2367. "schema": {
  2368. "type": "string"
  2369. },
  2370. "required": true,
  2371. "description": "Session ID"
  2372. }
  2373. ],
  2374. "summary": "Run shell command",
  2375. "description": "Execute a shell command within the session context and return the AI's response.",
  2376. "responses": {
  2377. "200": {
  2378. "description": "Created message",
  2379. "content": {
  2380. "application/json": {
  2381. "schema": {
  2382. "$ref": "#/components/schemas/AssistantMessage"
  2383. }
  2384. }
  2385. }
  2386. },
  2387. "400": {
  2388. "description": "Bad request",
  2389. "content": {
  2390. "application/json": {
  2391. "schema": {
  2392. "$ref": "#/components/schemas/BadRequestError"
  2393. }
  2394. }
  2395. }
  2396. },
  2397. "404": {
  2398. "description": "Not found",
  2399. "content": {
  2400. "application/json": {
  2401. "schema": {
  2402. "$ref": "#/components/schemas/NotFoundError"
  2403. }
  2404. }
  2405. }
  2406. }
  2407. },
  2408. "requestBody": {
  2409. "content": {
  2410. "application/json": {
  2411. "schema": {
  2412. "type": "object",
  2413. "properties": {
  2414. "agent": {
  2415. "type": "string"
  2416. },
  2417. "model": {
  2418. "type": "object",
  2419. "properties": {
  2420. "providerID": {
  2421. "type": "string"
  2422. },
  2423. "modelID": {
  2424. "type": "string"
  2425. }
  2426. },
  2427. "required": ["providerID", "modelID"]
  2428. },
  2429. "command": {
  2430. "type": "string"
  2431. }
  2432. },
  2433. "required": ["agent", "command"]
  2434. }
  2435. }
  2436. }
  2437. },
  2438. "x-codeSamples": [
  2439. {
  2440. "lang": "js",
  2441. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  2442. }
  2443. ]
  2444. }
  2445. },
  2446. "/session/{sessionID}/revert": {
  2447. "post": {
  2448. "operationId": "session.revert",
  2449. "parameters": [
  2450. {
  2451. "in": "query",
  2452. "name": "directory",
  2453. "schema": {
  2454. "type": "string"
  2455. }
  2456. },
  2457. {
  2458. "in": "path",
  2459. "name": "sessionID",
  2460. "schema": {
  2461. "type": "string"
  2462. },
  2463. "required": true
  2464. }
  2465. ],
  2466. "summary": "Revert message",
  2467. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  2468. "responses": {
  2469. "200": {
  2470. "description": "Updated session",
  2471. "content": {
  2472. "application/json": {
  2473. "schema": {
  2474. "$ref": "#/components/schemas/Session"
  2475. }
  2476. }
  2477. }
  2478. },
  2479. "400": {
  2480. "description": "Bad request",
  2481. "content": {
  2482. "application/json": {
  2483. "schema": {
  2484. "$ref": "#/components/schemas/BadRequestError"
  2485. }
  2486. }
  2487. }
  2488. },
  2489. "404": {
  2490. "description": "Not found",
  2491. "content": {
  2492. "application/json": {
  2493. "schema": {
  2494. "$ref": "#/components/schemas/NotFoundError"
  2495. }
  2496. }
  2497. }
  2498. }
  2499. },
  2500. "requestBody": {
  2501. "content": {
  2502. "application/json": {
  2503. "schema": {
  2504. "type": "object",
  2505. "properties": {
  2506. "messageID": {
  2507. "type": "string",
  2508. "pattern": "^msg.*"
  2509. },
  2510. "partID": {
  2511. "type": "string",
  2512. "pattern": "^prt.*"
  2513. }
  2514. },
  2515. "required": ["messageID"]
  2516. }
  2517. }
  2518. }
  2519. },
  2520. "x-codeSamples": [
  2521. {
  2522. "lang": "js",
  2523. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  2524. }
  2525. ]
  2526. }
  2527. },
  2528. "/session/{sessionID}/unrevert": {
  2529. "post": {
  2530. "operationId": "session.unrevert",
  2531. "parameters": [
  2532. {
  2533. "in": "query",
  2534. "name": "directory",
  2535. "schema": {
  2536. "type": "string"
  2537. }
  2538. },
  2539. {
  2540. "in": "path",
  2541. "name": "sessionID",
  2542. "schema": {
  2543. "type": "string"
  2544. },
  2545. "required": true
  2546. }
  2547. ],
  2548. "summary": "Restore reverted messages",
  2549. "description": "Restore all previously reverted messages in a session.",
  2550. "responses": {
  2551. "200": {
  2552. "description": "Updated session",
  2553. "content": {
  2554. "application/json": {
  2555. "schema": {
  2556. "$ref": "#/components/schemas/Session"
  2557. }
  2558. }
  2559. }
  2560. },
  2561. "400": {
  2562. "description": "Bad request",
  2563. "content": {
  2564. "application/json": {
  2565. "schema": {
  2566. "$ref": "#/components/schemas/BadRequestError"
  2567. }
  2568. }
  2569. }
  2570. },
  2571. "404": {
  2572. "description": "Not found",
  2573. "content": {
  2574. "application/json": {
  2575. "schema": {
  2576. "$ref": "#/components/schemas/NotFoundError"
  2577. }
  2578. }
  2579. }
  2580. }
  2581. },
  2582. "x-codeSamples": [
  2583. {
  2584. "lang": "js",
  2585. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  2586. }
  2587. ]
  2588. }
  2589. },
  2590. "/session/{sessionID}/permissions/{permissionID}": {
  2591. "post": {
  2592. "operationId": "permission.respond",
  2593. "parameters": [
  2594. {
  2595. "in": "query",
  2596. "name": "directory",
  2597. "schema": {
  2598. "type": "string"
  2599. }
  2600. },
  2601. {
  2602. "in": "path",
  2603. "name": "sessionID",
  2604. "schema": {
  2605. "type": "string"
  2606. },
  2607. "required": true
  2608. },
  2609. {
  2610. "in": "path",
  2611. "name": "permissionID",
  2612. "schema": {
  2613. "type": "string"
  2614. },
  2615. "required": true
  2616. }
  2617. ],
  2618. "summary": "Respond to permission",
  2619. "description": "Approve or deny a permission request from the AI assistant.",
  2620. "responses": {
  2621. "200": {
  2622. "description": "Permission processed successfully",
  2623. "content": {
  2624. "application/json": {
  2625. "schema": {
  2626. "type": "boolean"
  2627. }
  2628. }
  2629. }
  2630. },
  2631. "400": {
  2632. "description": "Bad request",
  2633. "content": {
  2634. "application/json": {
  2635. "schema": {
  2636. "$ref": "#/components/schemas/BadRequestError"
  2637. }
  2638. }
  2639. }
  2640. },
  2641. "404": {
  2642. "description": "Not found",
  2643. "content": {
  2644. "application/json": {
  2645. "schema": {
  2646. "$ref": "#/components/schemas/NotFoundError"
  2647. }
  2648. }
  2649. }
  2650. }
  2651. },
  2652. "requestBody": {
  2653. "content": {
  2654. "application/json": {
  2655. "schema": {
  2656. "type": "object",
  2657. "properties": {
  2658. "response": {
  2659. "type": "string",
  2660. "enum": ["once", "always", "reject"]
  2661. }
  2662. },
  2663. "required": ["response"]
  2664. }
  2665. }
  2666. }
  2667. },
  2668. "x-codeSamples": [
  2669. {
  2670. "lang": "js",
  2671. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  2672. }
  2673. ]
  2674. }
  2675. },
  2676. "/command": {
  2677. "get": {
  2678. "operationId": "command.list",
  2679. "parameters": [
  2680. {
  2681. "in": "query",
  2682. "name": "directory",
  2683. "schema": {
  2684. "type": "string"
  2685. }
  2686. }
  2687. ],
  2688. "summary": "List commands",
  2689. "description": "Get a list of all available commands in the OpenCode system.",
  2690. "responses": {
  2691. "200": {
  2692. "description": "List of commands",
  2693. "content": {
  2694. "application/json": {
  2695. "schema": {
  2696. "type": "array",
  2697. "items": {
  2698. "$ref": "#/components/schemas/Command"
  2699. }
  2700. }
  2701. }
  2702. }
  2703. }
  2704. },
  2705. "x-codeSamples": [
  2706. {
  2707. "lang": "js",
  2708. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.command.list({\n ...\n})"
  2709. }
  2710. ]
  2711. }
  2712. },
  2713. "/config/providers": {
  2714. "get": {
  2715. "operationId": "config.providers",
  2716. "parameters": [
  2717. {
  2718. "in": "query",
  2719. "name": "directory",
  2720. "schema": {
  2721. "type": "string"
  2722. }
  2723. }
  2724. ],
  2725. "summary": "List config providers",
  2726. "description": "Get a list of all configured AI providers and their default models.",
  2727. "responses": {
  2728. "200": {
  2729. "description": "List of providers",
  2730. "content": {
  2731. "application/json": {
  2732. "schema": {
  2733. "type": "object",
  2734. "properties": {
  2735. "providers": {
  2736. "type": "array",
  2737. "items": {
  2738. "$ref": "#/components/schemas/Provider"
  2739. }
  2740. },
  2741. "default": {
  2742. "type": "object",
  2743. "propertyNames": {
  2744. "type": "string"
  2745. },
  2746. "additionalProperties": {
  2747. "type": "string"
  2748. }
  2749. }
  2750. },
  2751. "required": ["providers", "default"]
  2752. }
  2753. }
  2754. }
  2755. }
  2756. },
  2757. "x-codeSamples": [
  2758. {
  2759. "lang": "js",
  2760. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.providers({\n ...\n})"
  2761. }
  2762. ]
  2763. }
  2764. },
  2765. "/provider": {
  2766. "get": {
  2767. "operationId": "provider.list",
  2768. "parameters": [
  2769. {
  2770. "in": "query",
  2771. "name": "directory",
  2772. "schema": {
  2773. "type": "string"
  2774. }
  2775. }
  2776. ],
  2777. "summary": "List providers",
  2778. "description": "Get a list of all available AI providers, including both available and connected ones.",
  2779. "responses": {
  2780. "200": {
  2781. "description": "List of providers",
  2782. "content": {
  2783. "application/json": {
  2784. "schema": {
  2785. "type": "object",
  2786. "properties": {
  2787. "all": {
  2788. "type": "array",
  2789. "items": {
  2790. "type": "object",
  2791. "properties": {
  2792. "api": {
  2793. "type": "string"
  2794. },
  2795. "name": {
  2796. "type": "string"
  2797. },
  2798. "env": {
  2799. "type": "array",
  2800. "items": {
  2801. "type": "string"
  2802. }
  2803. },
  2804. "id": {
  2805. "type": "string"
  2806. },
  2807. "npm": {
  2808. "type": "string"
  2809. },
  2810. "models": {
  2811. "type": "object",
  2812. "propertyNames": {
  2813. "type": "string"
  2814. },
  2815. "additionalProperties": {
  2816. "type": "object",
  2817. "properties": {
  2818. "id": {
  2819. "type": "string"
  2820. },
  2821. "name": {
  2822. "type": "string"
  2823. },
  2824. "family": {
  2825. "type": "string"
  2826. },
  2827. "release_date": {
  2828. "type": "string"
  2829. },
  2830. "attachment": {
  2831. "type": "boolean"
  2832. },
  2833. "reasoning": {
  2834. "type": "boolean"
  2835. },
  2836. "temperature": {
  2837. "type": "boolean"
  2838. },
  2839. "tool_call": {
  2840. "type": "boolean"
  2841. },
  2842. "interleaved": {
  2843. "anyOf": [
  2844. {
  2845. "type": "boolean",
  2846. "const": true
  2847. },
  2848. {
  2849. "type": "object",
  2850. "properties": {
  2851. "field": {
  2852. "type": "string",
  2853. "enum": ["reasoning_content", "reasoning_details"]
  2854. }
  2855. },
  2856. "required": ["field"],
  2857. "additionalProperties": false
  2858. }
  2859. ]
  2860. },
  2861. "cost": {
  2862. "type": "object",
  2863. "properties": {
  2864. "input": {
  2865. "type": "number"
  2866. },
  2867. "output": {
  2868. "type": "number"
  2869. },
  2870. "cache_read": {
  2871. "type": "number"
  2872. },
  2873. "cache_write": {
  2874. "type": "number"
  2875. },
  2876. "context_over_200k": {
  2877. "type": "object",
  2878. "properties": {
  2879. "input": {
  2880. "type": "number"
  2881. },
  2882. "output": {
  2883. "type": "number"
  2884. },
  2885. "cache_read": {
  2886. "type": "number"
  2887. },
  2888. "cache_write": {
  2889. "type": "number"
  2890. }
  2891. },
  2892. "required": ["input", "output"]
  2893. }
  2894. },
  2895. "required": ["input", "output"]
  2896. },
  2897. "limit": {
  2898. "type": "object",
  2899. "properties": {
  2900. "context": {
  2901. "type": "number"
  2902. },
  2903. "output": {
  2904. "type": "number"
  2905. }
  2906. },
  2907. "required": ["context", "output"]
  2908. },
  2909. "modalities": {
  2910. "type": "object",
  2911. "properties": {
  2912. "input": {
  2913. "type": "array",
  2914. "items": {
  2915. "type": "string",
  2916. "enum": ["text", "audio", "image", "video", "pdf"]
  2917. }
  2918. },
  2919. "output": {
  2920. "type": "array",
  2921. "items": {
  2922. "type": "string",
  2923. "enum": ["text", "audio", "image", "video", "pdf"]
  2924. }
  2925. }
  2926. },
  2927. "required": ["input", "output"]
  2928. },
  2929. "experimental": {
  2930. "type": "boolean"
  2931. },
  2932. "status": {
  2933. "type": "string",
  2934. "enum": ["alpha", "beta", "deprecated"]
  2935. },
  2936. "options": {
  2937. "type": "object",
  2938. "propertyNames": {
  2939. "type": "string"
  2940. },
  2941. "additionalProperties": {}
  2942. },
  2943. "headers": {
  2944. "type": "object",
  2945. "propertyNames": {
  2946. "type": "string"
  2947. },
  2948. "additionalProperties": {
  2949. "type": "string"
  2950. }
  2951. },
  2952. "provider": {
  2953. "type": "object",
  2954. "properties": {
  2955. "npm": {
  2956. "type": "string"
  2957. }
  2958. },
  2959. "required": ["npm"]
  2960. }
  2961. },
  2962. "required": [
  2963. "id",
  2964. "name",
  2965. "release_date",
  2966. "attachment",
  2967. "reasoning",
  2968. "temperature",
  2969. "tool_call",
  2970. "limit",
  2971. "options"
  2972. ]
  2973. }
  2974. }
  2975. },
  2976. "required": ["name", "env", "id", "models"]
  2977. }
  2978. },
  2979. "default": {
  2980. "type": "object",
  2981. "propertyNames": {
  2982. "type": "string"
  2983. },
  2984. "additionalProperties": {
  2985. "type": "string"
  2986. }
  2987. },
  2988. "connected": {
  2989. "type": "array",
  2990. "items": {
  2991. "type": "string"
  2992. }
  2993. }
  2994. },
  2995. "required": ["all", "default", "connected"]
  2996. }
  2997. }
  2998. }
  2999. }
  3000. },
  3001. "x-codeSamples": [
  3002. {
  3003. "lang": "js",
  3004. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  3005. }
  3006. ]
  3007. }
  3008. },
  3009. "/provider/auth": {
  3010. "get": {
  3011. "operationId": "provider.auth",
  3012. "parameters": [
  3013. {
  3014. "in": "query",
  3015. "name": "directory",
  3016. "schema": {
  3017. "type": "string"
  3018. }
  3019. }
  3020. ],
  3021. "summary": "Get provider auth methods",
  3022. "description": "Retrieve available authentication methods for all AI providers.",
  3023. "responses": {
  3024. "200": {
  3025. "description": "Provider auth methods",
  3026. "content": {
  3027. "application/json": {
  3028. "schema": {
  3029. "type": "object",
  3030. "propertyNames": {
  3031. "type": "string"
  3032. },
  3033. "additionalProperties": {
  3034. "type": "array",
  3035. "items": {
  3036. "$ref": "#/components/schemas/ProviderAuthMethod"
  3037. }
  3038. }
  3039. }
  3040. }
  3041. }
  3042. }
  3043. },
  3044. "x-codeSamples": [
  3045. {
  3046. "lang": "js",
  3047. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  3048. }
  3049. ]
  3050. }
  3051. },
  3052. "/provider/{providerID}/oauth/authorize": {
  3053. "post": {
  3054. "operationId": "provider.oauth.authorize",
  3055. "parameters": [
  3056. {
  3057. "in": "query",
  3058. "name": "directory",
  3059. "schema": {
  3060. "type": "string"
  3061. }
  3062. },
  3063. {
  3064. "in": "path",
  3065. "name": "providerID",
  3066. "schema": {
  3067. "type": "string"
  3068. },
  3069. "required": true,
  3070. "description": "Provider ID"
  3071. }
  3072. ],
  3073. "summary": "OAuth authorize",
  3074. "description": "Initiate OAuth authorization for a specific AI provider to get an authorization URL.",
  3075. "responses": {
  3076. "200": {
  3077. "description": "Authorization URL and method",
  3078. "content": {
  3079. "application/json": {
  3080. "schema": {
  3081. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  3082. }
  3083. }
  3084. }
  3085. },
  3086. "400": {
  3087. "description": "Bad request",
  3088. "content": {
  3089. "application/json": {
  3090. "schema": {
  3091. "$ref": "#/components/schemas/BadRequestError"
  3092. }
  3093. }
  3094. }
  3095. }
  3096. },
  3097. "requestBody": {
  3098. "content": {
  3099. "application/json": {
  3100. "schema": {
  3101. "type": "object",
  3102. "properties": {
  3103. "method": {
  3104. "description": "Auth method index",
  3105. "type": "number"
  3106. }
  3107. },
  3108. "required": ["method"]
  3109. }
  3110. }
  3111. }
  3112. },
  3113. "x-codeSamples": [
  3114. {
  3115. "lang": "js",
  3116. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  3117. }
  3118. ]
  3119. }
  3120. },
  3121. "/provider/{providerID}/oauth/callback": {
  3122. "post": {
  3123. "operationId": "provider.oauth.callback",
  3124. "parameters": [
  3125. {
  3126. "in": "query",
  3127. "name": "directory",
  3128. "schema": {
  3129. "type": "string"
  3130. }
  3131. },
  3132. {
  3133. "in": "path",
  3134. "name": "providerID",
  3135. "schema": {
  3136. "type": "string"
  3137. },
  3138. "required": true,
  3139. "description": "Provider ID"
  3140. }
  3141. ],
  3142. "summary": "OAuth callback",
  3143. "description": "Handle the OAuth callback from a provider after user authorization.",
  3144. "responses": {
  3145. "200": {
  3146. "description": "OAuth callback processed successfully",
  3147. "content": {
  3148. "application/json": {
  3149. "schema": {
  3150. "type": "boolean"
  3151. }
  3152. }
  3153. }
  3154. },
  3155. "400": {
  3156. "description": "Bad request",
  3157. "content": {
  3158. "application/json": {
  3159. "schema": {
  3160. "$ref": "#/components/schemas/BadRequestError"
  3161. }
  3162. }
  3163. }
  3164. }
  3165. },
  3166. "requestBody": {
  3167. "content": {
  3168. "application/json": {
  3169. "schema": {
  3170. "type": "object",
  3171. "properties": {
  3172. "method": {
  3173. "description": "Auth method index",
  3174. "type": "number"
  3175. },
  3176. "code": {
  3177. "description": "OAuth authorization code",
  3178. "type": "string"
  3179. }
  3180. },
  3181. "required": ["method"]
  3182. }
  3183. }
  3184. }
  3185. },
  3186. "x-codeSamples": [
  3187. {
  3188. "lang": "js",
  3189. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  3190. }
  3191. ]
  3192. }
  3193. },
  3194. "/find": {
  3195. "get": {
  3196. "operationId": "find.text",
  3197. "parameters": [
  3198. {
  3199. "in": "query",
  3200. "name": "directory",
  3201. "schema": {
  3202. "type": "string"
  3203. }
  3204. },
  3205. {
  3206. "in": "query",
  3207. "name": "pattern",
  3208. "schema": {
  3209. "type": "string"
  3210. },
  3211. "required": true
  3212. }
  3213. ],
  3214. "summary": "Find text",
  3215. "description": "Search for text patterns across files in the project using ripgrep.",
  3216. "responses": {
  3217. "200": {
  3218. "description": "Matches",
  3219. "content": {
  3220. "application/json": {
  3221. "schema": {
  3222. "type": "array",
  3223. "items": {
  3224. "type": "object",
  3225. "properties": {
  3226. "path": {
  3227. "type": "object",
  3228. "properties": {
  3229. "text": {
  3230. "type": "string"
  3231. }
  3232. },
  3233. "required": ["text"]
  3234. },
  3235. "lines": {
  3236. "type": "object",
  3237. "properties": {
  3238. "text": {
  3239. "type": "string"
  3240. }
  3241. },
  3242. "required": ["text"]
  3243. },
  3244. "line_number": {
  3245. "type": "number"
  3246. },
  3247. "absolute_offset": {
  3248. "type": "number"
  3249. },
  3250. "submatches": {
  3251. "type": "array",
  3252. "items": {
  3253. "type": "object",
  3254. "properties": {
  3255. "match": {
  3256. "type": "object",
  3257. "properties": {
  3258. "text": {
  3259. "type": "string"
  3260. }
  3261. },
  3262. "required": ["text"]
  3263. },
  3264. "start": {
  3265. "type": "number"
  3266. },
  3267. "end": {
  3268. "type": "number"
  3269. }
  3270. },
  3271. "required": ["match", "start", "end"]
  3272. }
  3273. }
  3274. },
  3275. "required": ["path", "lines", "line_number", "absolute_offset", "submatches"]
  3276. }
  3277. }
  3278. }
  3279. }
  3280. }
  3281. },
  3282. "x-codeSamples": [
  3283. {
  3284. "lang": "js",
  3285. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.text({\n ...\n})"
  3286. }
  3287. ]
  3288. }
  3289. },
  3290. "/find/file": {
  3291. "get": {
  3292. "operationId": "find.files",
  3293. "parameters": [
  3294. {
  3295. "in": "query",
  3296. "name": "directory",
  3297. "schema": {
  3298. "type": "string"
  3299. }
  3300. },
  3301. {
  3302. "in": "query",
  3303. "name": "query",
  3304. "schema": {
  3305. "type": "string"
  3306. },
  3307. "required": true
  3308. },
  3309. {
  3310. "in": "query",
  3311. "name": "dirs",
  3312. "schema": {
  3313. "type": "string",
  3314. "enum": ["true", "false"]
  3315. }
  3316. }
  3317. ],
  3318. "summary": "Find files",
  3319. "description": "Search for files by name or pattern in the project directory.",
  3320. "responses": {
  3321. "200": {
  3322. "description": "File paths",
  3323. "content": {
  3324. "application/json": {
  3325. "schema": {
  3326. "type": "array",
  3327. "items": {
  3328. "type": "string"
  3329. }
  3330. }
  3331. }
  3332. }
  3333. }
  3334. },
  3335. "x-codeSamples": [
  3336. {
  3337. "lang": "js",
  3338. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.files({\n ...\n})"
  3339. }
  3340. ]
  3341. }
  3342. },
  3343. "/find/symbol": {
  3344. "get": {
  3345. "operationId": "find.symbols",
  3346. "parameters": [
  3347. {
  3348. "in": "query",
  3349. "name": "directory",
  3350. "schema": {
  3351. "type": "string"
  3352. }
  3353. },
  3354. {
  3355. "in": "query",
  3356. "name": "query",
  3357. "schema": {
  3358. "type": "string"
  3359. },
  3360. "required": true
  3361. }
  3362. ],
  3363. "summary": "Find symbols",
  3364. "description": "Search for workspace symbols like functions, classes, and variables using LSP.",
  3365. "responses": {
  3366. "200": {
  3367. "description": "Symbols",
  3368. "content": {
  3369. "application/json": {
  3370. "schema": {
  3371. "type": "array",
  3372. "items": {
  3373. "$ref": "#/components/schemas/Symbol"
  3374. }
  3375. }
  3376. }
  3377. }
  3378. }
  3379. },
  3380. "x-codeSamples": [
  3381. {
  3382. "lang": "js",
  3383. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.symbols({\n ...\n})"
  3384. }
  3385. ]
  3386. }
  3387. },
  3388. "/file": {
  3389. "get": {
  3390. "operationId": "file.list",
  3391. "parameters": [
  3392. {
  3393. "in": "query",
  3394. "name": "directory",
  3395. "schema": {
  3396. "type": "string"
  3397. }
  3398. },
  3399. {
  3400. "in": "query",
  3401. "name": "path",
  3402. "schema": {
  3403. "type": "string"
  3404. },
  3405. "required": true
  3406. }
  3407. ],
  3408. "summary": "List files",
  3409. "description": "List files and directories in a specified path.",
  3410. "responses": {
  3411. "200": {
  3412. "description": "Files and directories",
  3413. "content": {
  3414. "application/json": {
  3415. "schema": {
  3416. "type": "array",
  3417. "items": {
  3418. "$ref": "#/components/schemas/FileNode"
  3419. }
  3420. }
  3421. }
  3422. }
  3423. }
  3424. },
  3425. "x-codeSamples": [
  3426. {
  3427. "lang": "js",
  3428. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.list({\n ...\n})"
  3429. }
  3430. ]
  3431. }
  3432. },
  3433. "/file/content": {
  3434. "get": {
  3435. "operationId": "file.read",
  3436. "parameters": [
  3437. {
  3438. "in": "query",
  3439. "name": "directory",
  3440. "schema": {
  3441. "type": "string"
  3442. }
  3443. },
  3444. {
  3445. "in": "query",
  3446. "name": "path",
  3447. "schema": {
  3448. "type": "string"
  3449. },
  3450. "required": true
  3451. }
  3452. ],
  3453. "summary": "Read file",
  3454. "description": "Read the content of a specified file.",
  3455. "responses": {
  3456. "200": {
  3457. "description": "File content",
  3458. "content": {
  3459. "application/json": {
  3460. "schema": {
  3461. "$ref": "#/components/schemas/FileContent"
  3462. }
  3463. }
  3464. }
  3465. }
  3466. },
  3467. "x-codeSamples": [
  3468. {
  3469. "lang": "js",
  3470. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.read({\n ...\n})"
  3471. }
  3472. ]
  3473. }
  3474. },
  3475. "/file/status": {
  3476. "get": {
  3477. "operationId": "file.status",
  3478. "parameters": [
  3479. {
  3480. "in": "query",
  3481. "name": "directory",
  3482. "schema": {
  3483. "type": "string"
  3484. }
  3485. }
  3486. ],
  3487. "summary": "Get file status",
  3488. "description": "Get the git status of all files in the project.",
  3489. "responses": {
  3490. "200": {
  3491. "description": "File status",
  3492. "content": {
  3493. "application/json": {
  3494. "schema": {
  3495. "type": "array",
  3496. "items": {
  3497. "$ref": "#/components/schemas/File"
  3498. }
  3499. }
  3500. }
  3501. }
  3502. }
  3503. },
  3504. "x-codeSamples": [
  3505. {
  3506. "lang": "js",
  3507. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.status({\n ...\n})"
  3508. }
  3509. ]
  3510. }
  3511. },
  3512. "/log": {
  3513. "post": {
  3514. "operationId": "app.log",
  3515. "parameters": [
  3516. {
  3517. "in": "query",
  3518. "name": "directory",
  3519. "schema": {
  3520. "type": "string"
  3521. }
  3522. }
  3523. ],
  3524. "summary": "Write log",
  3525. "description": "Write a log entry to the server logs with specified level and metadata.",
  3526. "responses": {
  3527. "200": {
  3528. "description": "Log entry written successfully",
  3529. "content": {
  3530. "application/json": {
  3531. "schema": {
  3532. "type": "boolean"
  3533. }
  3534. }
  3535. }
  3536. },
  3537. "400": {
  3538. "description": "Bad request",
  3539. "content": {
  3540. "application/json": {
  3541. "schema": {
  3542. "$ref": "#/components/schemas/BadRequestError"
  3543. }
  3544. }
  3545. }
  3546. }
  3547. },
  3548. "requestBody": {
  3549. "content": {
  3550. "application/json": {
  3551. "schema": {
  3552. "type": "object",
  3553. "properties": {
  3554. "service": {
  3555. "description": "Service name for the log entry",
  3556. "type": "string"
  3557. },
  3558. "level": {
  3559. "description": "Log level",
  3560. "type": "string",
  3561. "enum": ["debug", "info", "error", "warn"]
  3562. },
  3563. "message": {
  3564. "description": "Log message",
  3565. "type": "string"
  3566. },
  3567. "extra": {
  3568. "description": "Additional metadata for the log entry",
  3569. "type": "object",
  3570. "propertyNames": {
  3571. "type": "string"
  3572. },
  3573. "additionalProperties": {}
  3574. }
  3575. },
  3576. "required": ["service", "level", "message"]
  3577. }
  3578. }
  3579. }
  3580. },
  3581. "x-codeSamples": [
  3582. {
  3583. "lang": "js",
  3584. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.log({\n ...\n})"
  3585. }
  3586. ]
  3587. }
  3588. },
  3589. "/agent": {
  3590. "get": {
  3591. "operationId": "app.agents",
  3592. "parameters": [
  3593. {
  3594. "in": "query",
  3595. "name": "directory",
  3596. "schema": {
  3597. "type": "string"
  3598. }
  3599. }
  3600. ],
  3601. "summary": "List agents",
  3602. "description": "Get a list of all available AI agents in the OpenCode system.",
  3603. "responses": {
  3604. "200": {
  3605. "description": "List of agents",
  3606. "content": {
  3607. "application/json": {
  3608. "schema": {
  3609. "type": "array",
  3610. "items": {
  3611. "$ref": "#/components/schemas/Agent"
  3612. }
  3613. }
  3614. }
  3615. }
  3616. }
  3617. },
  3618. "x-codeSamples": [
  3619. {
  3620. "lang": "js",
  3621. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.agents({\n ...\n})"
  3622. }
  3623. ]
  3624. }
  3625. },
  3626. "/mcp": {
  3627. "get": {
  3628. "operationId": "mcp.status",
  3629. "parameters": [
  3630. {
  3631. "in": "query",
  3632. "name": "directory",
  3633. "schema": {
  3634. "type": "string"
  3635. }
  3636. }
  3637. ],
  3638. "summary": "Get MCP status",
  3639. "description": "Get the status of all Model Context Protocol (MCP) servers.",
  3640. "responses": {
  3641. "200": {
  3642. "description": "MCP server status",
  3643. "content": {
  3644. "application/json": {
  3645. "schema": {
  3646. "type": "object",
  3647. "propertyNames": {
  3648. "type": "string"
  3649. },
  3650. "additionalProperties": {
  3651. "$ref": "#/components/schemas/MCPStatus"
  3652. }
  3653. }
  3654. }
  3655. }
  3656. }
  3657. },
  3658. "x-codeSamples": [
  3659. {
  3660. "lang": "js",
  3661. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
  3662. }
  3663. ]
  3664. },
  3665. "post": {
  3666. "operationId": "mcp.add",
  3667. "parameters": [
  3668. {
  3669. "in": "query",
  3670. "name": "directory",
  3671. "schema": {
  3672. "type": "string"
  3673. }
  3674. }
  3675. ],
  3676. "summary": "Add MCP server",
  3677. "description": "Dynamically add a new Model Context Protocol (MCP) server to the system.",
  3678. "responses": {
  3679. "200": {
  3680. "description": "MCP server added successfully",
  3681. "content": {
  3682. "application/json": {
  3683. "schema": {
  3684. "type": "object",
  3685. "propertyNames": {
  3686. "type": "string"
  3687. },
  3688. "additionalProperties": {
  3689. "$ref": "#/components/schemas/MCPStatus"
  3690. }
  3691. }
  3692. }
  3693. }
  3694. },
  3695. "400": {
  3696. "description": "Bad request",
  3697. "content": {
  3698. "application/json": {
  3699. "schema": {
  3700. "$ref": "#/components/schemas/BadRequestError"
  3701. }
  3702. }
  3703. }
  3704. }
  3705. },
  3706. "requestBody": {
  3707. "content": {
  3708. "application/json": {
  3709. "schema": {
  3710. "type": "object",
  3711. "properties": {
  3712. "name": {
  3713. "type": "string"
  3714. },
  3715. "config": {
  3716. "anyOf": [
  3717. {
  3718. "$ref": "#/components/schemas/McpLocalConfig"
  3719. },
  3720. {
  3721. "$ref": "#/components/schemas/McpRemoteConfig"
  3722. }
  3723. ]
  3724. }
  3725. },
  3726. "required": ["name", "config"]
  3727. }
  3728. }
  3729. }
  3730. },
  3731. "x-codeSamples": [
  3732. {
  3733. "lang": "js",
  3734. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
  3735. }
  3736. ]
  3737. }
  3738. },
  3739. "/mcp/{name}/auth": {
  3740. "post": {
  3741. "operationId": "mcp.auth.start",
  3742. "parameters": [
  3743. {
  3744. "in": "query",
  3745. "name": "directory",
  3746. "schema": {
  3747. "type": "string"
  3748. }
  3749. },
  3750. {
  3751. "schema": {
  3752. "type": "string"
  3753. },
  3754. "in": "path",
  3755. "name": "name",
  3756. "required": true
  3757. }
  3758. ],
  3759. "summary": "Start MCP OAuth",
  3760. "description": "Start OAuth authentication flow for a Model Context Protocol (MCP) server.",
  3761. "responses": {
  3762. "200": {
  3763. "description": "OAuth flow started",
  3764. "content": {
  3765. "application/json": {
  3766. "schema": {
  3767. "type": "object",
  3768. "properties": {
  3769. "authorizationUrl": {
  3770. "description": "URL to open in browser for authorization",
  3771. "type": "string"
  3772. }
  3773. },
  3774. "required": ["authorizationUrl"]
  3775. }
  3776. }
  3777. }
  3778. },
  3779. "400": {
  3780. "description": "Bad request",
  3781. "content": {
  3782. "application/json": {
  3783. "schema": {
  3784. "$ref": "#/components/schemas/BadRequestError"
  3785. }
  3786. }
  3787. }
  3788. },
  3789. "404": {
  3790. "description": "Not found",
  3791. "content": {
  3792. "application/json": {
  3793. "schema": {
  3794. "$ref": "#/components/schemas/NotFoundError"
  3795. }
  3796. }
  3797. }
  3798. }
  3799. },
  3800. "x-codeSamples": [
  3801. {
  3802. "lang": "js",
  3803. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
  3804. }
  3805. ]
  3806. },
  3807. "delete": {
  3808. "operationId": "mcp.auth.remove",
  3809. "parameters": [
  3810. {
  3811. "in": "query",
  3812. "name": "directory",
  3813. "schema": {
  3814. "type": "string"
  3815. }
  3816. },
  3817. {
  3818. "schema": {
  3819. "type": "string"
  3820. },
  3821. "in": "path",
  3822. "name": "name",
  3823. "required": true
  3824. }
  3825. ],
  3826. "summary": "Remove MCP OAuth",
  3827. "description": "Remove OAuth credentials for an MCP server",
  3828. "responses": {
  3829. "200": {
  3830. "description": "OAuth credentials removed",
  3831. "content": {
  3832. "application/json": {
  3833. "schema": {
  3834. "type": "object",
  3835. "properties": {
  3836. "success": {
  3837. "type": "boolean",
  3838. "const": true
  3839. }
  3840. },
  3841. "required": ["success"]
  3842. }
  3843. }
  3844. }
  3845. },
  3846. "404": {
  3847. "description": "Not found",
  3848. "content": {
  3849. "application/json": {
  3850. "schema": {
  3851. "$ref": "#/components/schemas/NotFoundError"
  3852. }
  3853. }
  3854. }
  3855. }
  3856. },
  3857. "x-codeSamples": [
  3858. {
  3859. "lang": "js",
  3860. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
  3861. }
  3862. ]
  3863. }
  3864. },
  3865. "/mcp/{name}/auth/callback": {
  3866. "post": {
  3867. "operationId": "mcp.auth.callback",
  3868. "parameters": [
  3869. {
  3870. "in": "query",
  3871. "name": "directory",
  3872. "schema": {
  3873. "type": "string"
  3874. }
  3875. },
  3876. {
  3877. "schema": {
  3878. "type": "string"
  3879. },
  3880. "in": "path",
  3881. "name": "name",
  3882. "required": true
  3883. }
  3884. ],
  3885. "summary": "Complete MCP OAuth",
  3886. "description": "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.",
  3887. "responses": {
  3888. "200": {
  3889. "description": "OAuth authentication completed",
  3890. "content": {
  3891. "application/json": {
  3892. "schema": {
  3893. "$ref": "#/components/schemas/MCPStatus"
  3894. }
  3895. }
  3896. }
  3897. },
  3898. "400": {
  3899. "description": "Bad request",
  3900. "content": {
  3901. "application/json": {
  3902. "schema": {
  3903. "$ref": "#/components/schemas/BadRequestError"
  3904. }
  3905. }
  3906. }
  3907. },
  3908. "404": {
  3909. "description": "Not found",
  3910. "content": {
  3911. "application/json": {
  3912. "schema": {
  3913. "$ref": "#/components/schemas/NotFoundError"
  3914. }
  3915. }
  3916. }
  3917. }
  3918. },
  3919. "requestBody": {
  3920. "content": {
  3921. "application/json": {
  3922. "schema": {
  3923. "type": "object",
  3924. "properties": {
  3925. "code": {
  3926. "description": "Authorization code from OAuth callback",
  3927. "type": "string"
  3928. }
  3929. },
  3930. "required": ["code"]
  3931. }
  3932. }
  3933. }
  3934. },
  3935. "x-codeSamples": [
  3936. {
  3937. "lang": "js",
  3938. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
  3939. }
  3940. ]
  3941. }
  3942. },
  3943. "/mcp/{name}/auth/authenticate": {
  3944. "post": {
  3945. "operationId": "mcp.auth.authenticate",
  3946. "parameters": [
  3947. {
  3948. "in": "query",
  3949. "name": "directory",
  3950. "schema": {
  3951. "type": "string"
  3952. }
  3953. },
  3954. {
  3955. "schema": {
  3956. "type": "string"
  3957. },
  3958. "in": "path",
  3959. "name": "name",
  3960. "required": true
  3961. }
  3962. ],
  3963. "summary": "Authenticate MCP OAuth",
  3964. "description": "Start OAuth flow and wait for callback (opens browser)",
  3965. "responses": {
  3966. "200": {
  3967. "description": "OAuth authentication completed",
  3968. "content": {
  3969. "application/json": {
  3970. "schema": {
  3971. "$ref": "#/components/schemas/MCPStatus"
  3972. }
  3973. }
  3974. }
  3975. },
  3976. "400": {
  3977. "description": "Bad request",
  3978. "content": {
  3979. "application/json": {
  3980. "schema": {
  3981. "$ref": "#/components/schemas/BadRequestError"
  3982. }
  3983. }
  3984. }
  3985. },
  3986. "404": {
  3987. "description": "Not found",
  3988. "content": {
  3989. "application/json": {
  3990. "schema": {
  3991. "$ref": "#/components/schemas/NotFoundError"
  3992. }
  3993. }
  3994. }
  3995. }
  3996. },
  3997. "x-codeSamples": [
  3998. {
  3999. "lang": "js",
  4000. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
  4001. }
  4002. ]
  4003. }
  4004. },
  4005. "/mcp/{name}/connect": {
  4006. "post": {
  4007. "operationId": "mcp.connect",
  4008. "parameters": [
  4009. {
  4010. "in": "query",
  4011. "name": "directory",
  4012. "schema": {
  4013. "type": "string"
  4014. }
  4015. },
  4016. {
  4017. "in": "path",
  4018. "name": "name",
  4019. "schema": {
  4020. "type": "string"
  4021. },
  4022. "required": true
  4023. }
  4024. ],
  4025. "description": "Connect an MCP server",
  4026. "responses": {
  4027. "200": {
  4028. "description": "MCP server connected successfully",
  4029. "content": {
  4030. "application/json": {
  4031. "schema": {
  4032. "type": "boolean"
  4033. }
  4034. }
  4035. }
  4036. }
  4037. },
  4038. "x-codeSamples": [
  4039. {
  4040. "lang": "js",
  4041. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.connect({\n ...\n})"
  4042. }
  4043. ]
  4044. }
  4045. },
  4046. "/mcp/{name}/disconnect": {
  4047. "post": {
  4048. "operationId": "mcp.disconnect",
  4049. "parameters": [
  4050. {
  4051. "in": "query",
  4052. "name": "directory",
  4053. "schema": {
  4054. "type": "string"
  4055. }
  4056. },
  4057. {
  4058. "in": "path",
  4059. "name": "name",
  4060. "schema": {
  4061. "type": "string"
  4062. },
  4063. "required": true
  4064. }
  4065. ],
  4066. "description": "Disconnect an MCP server",
  4067. "responses": {
  4068. "200": {
  4069. "description": "MCP server disconnected successfully",
  4070. "content": {
  4071. "application/json": {
  4072. "schema": {
  4073. "type": "boolean"
  4074. }
  4075. }
  4076. }
  4077. }
  4078. },
  4079. "x-codeSamples": [
  4080. {
  4081. "lang": "js",
  4082. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
  4083. }
  4084. ]
  4085. }
  4086. },
  4087. "/lsp": {
  4088. "get": {
  4089. "operationId": "lsp.status",
  4090. "parameters": [
  4091. {
  4092. "in": "query",
  4093. "name": "directory",
  4094. "schema": {
  4095. "type": "string"
  4096. }
  4097. }
  4098. ],
  4099. "summary": "Get LSP status",
  4100. "description": "Get LSP server status",
  4101. "responses": {
  4102. "200": {
  4103. "description": "LSP server status",
  4104. "content": {
  4105. "application/json": {
  4106. "schema": {
  4107. "type": "array",
  4108. "items": {
  4109. "$ref": "#/components/schemas/LSPStatus"
  4110. }
  4111. }
  4112. }
  4113. }
  4114. }
  4115. },
  4116. "x-codeSamples": [
  4117. {
  4118. "lang": "js",
  4119. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
  4120. }
  4121. ]
  4122. }
  4123. },
  4124. "/formatter": {
  4125. "get": {
  4126. "operationId": "formatter.status",
  4127. "parameters": [
  4128. {
  4129. "in": "query",
  4130. "name": "directory",
  4131. "schema": {
  4132. "type": "string"
  4133. }
  4134. }
  4135. ],
  4136. "summary": "Get formatter status",
  4137. "description": "Get formatter status",
  4138. "responses": {
  4139. "200": {
  4140. "description": "Formatter status",
  4141. "content": {
  4142. "application/json": {
  4143. "schema": {
  4144. "type": "array",
  4145. "items": {
  4146. "$ref": "#/components/schemas/FormatterStatus"
  4147. }
  4148. }
  4149. }
  4150. }
  4151. }
  4152. },
  4153. "x-codeSamples": [
  4154. {
  4155. "lang": "js",
  4156. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
  4157. }
  4158. ]
  4159. }
  4160. },
  4161. "/tui/append-prompt": {
  4162. "post": {
  4163. "operationId": "tui.appendPrompt",
  4164. "parameters": [
  4165. {
  4166. "in": "query",
  4167. "name": "directory",
  4168. "schema": {
  4169. "type": "string"
  4170. }
  4171. }
  4172. ],
  4173. "summary": "Append TUI prompt",
  4174. "description": "Append prompt to the TUI",
  4175. "responses": {
  4176. "200": {
  4177. "description": "Prompt processed successfully",
  4178. "content": {
  4179. "application/json": {
  4180. "schema": {
  4181. "type": "boolean"
  4182. }
  4183. }
  4184. }
  4185. },
  4186. "400": {
  4187. "description": "Bad request",
  4188. "content": {
  4189. "application/json": {
  4190. "schema": {
  4191. "$ref": "#/components/schemas/BadRequestError"
  4192. }
  4193. }
  4194. }
  4195. }
  4196. },
  4197. "requestBody": {
  4198. "content": {
  4199. "application/json": {
  4200. "schema": {
  4201. "type": "object",
  4202. "properties": {
  4203. "text": {
  4204. "type": "string"
  4205. }
  4206. },
  4207. "required": ["text"]
  4208. }
  4209. }
  4210. }
  4211. },
  4212. "x-codeSamples": [
  4213. {
  4214. "lang": "js",
  4215. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  4216. }
  4217. ]
  4218. }
  4219. },
  4220. "/tui/open-help": {
  4221. "post": {
  4222. "operationId": "tui.openHelp",
  4223. "parameters": [
  4224. {
  4225. "in": "query",
  4226. "name": "directory",
  4227. "schema": {
  4228. "type": "string"
  4229. }
  4230. }
  4231. ],
  4232. "summary": "Open help dialog",
  4233. "description": "Open the help dialog in the TUI to display user assistance information.",
  4234. "responses": {
  4235. "200": {
  4236. "description": "Help dialog opened 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.tui.openHelp({\n ...\n})"
  4250. }
  4251. ]
  4252. }
  4253. },
  4254. "/tui/open-sessions": {
  4255. "post": {
  4256. "operationId": "tui.openSessions",
  4257. "parameters": [
  4258. {
  4259. "in": "query",
  4260. "name": "directory",
  4261. "schema": {
  4262. "type": "string"
  4263. }
  4264. }
  4265. ],
  4266. "summary": "Open sessions dialog",
  4267. "description": "Open the session dialog",
  4268. "responses": {
  4269. "200": {
  4270. "description": "Session dialog opened successfully",
  4271. "content": {
  4272. "application/json": {
  4273. "schema": {
  4274. "type": "boolean"
  4275. }
  4276. }
  4277. }
  4278. }
  4279. },
  4280. "x-codeSamples": [
  4281. {
  4282. "lang": "js",
  4283. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  4284. }
  4285. ]
  4286. }
  4287. },
  4288. "/tui/open-themes": {
  4289. "post": {
  4290. "operationId": "tui.openThemes",
  4291. "parameters": [
  4292. {
  4293. "in": "query",
  4294. "name": "directory",
  4295. "schema": {
  4296. "type": "string"
  4297. }
  4298. }
  4299. ],
  4300. "summary": "Open themes dialog",
  4301. "description": "Open the theme dialog",
  4302. "responses": {
  4303. "200": {
  4304. "description": "Theme dialog opened successfully",
  4305. "content": {
  4306. "application/json": {
  4307. "schema": {
  4308. "type": "boolean"
  4309. }
  4310. }
  4311. }
  4312. }
  4313. },
  4314. "x-codeSamples": [
  4315. {
  4316. "lang": "js",
  4317. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  4318. }
  4319. ]
  4320. }
  4321. },
  4322. "/tui/open-models": {
  4323. "post": {
  4324. "operationId": "tui.openModels",
  4325. "parameters": [
  4326. {
  4327. "in": "query",
  4328. "name": "directory",
  4329. "schema": {
  4330. "type": "string"
  4331. }
  4332. }
  4333. ],
  4334. "summary": "Open models dialog",
  4335. "description": "Open the model dialog",
  4336. "responses": {
  4337. "200": {
  4338. "description": "Model dialog opened successfully",
  4339. "content": {
  4340. "application/json": {
  4341. "schema": {
  4342. "type": "boolean"
  4343. }
  4344. }
  4345. }
  4346. }
  4347. },
  4348. "x-codeSamples": [
  4349. {
  4350. "lang": "js",
  4351. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  4352. }
  4353. ]
  4354. }
  4355. },
  4356. "/tui/submit-prompt": {
  4357. "post": {
  4358. "operationId": "tui.submitPrompt",
  4359. "parameters": [
  4360. {
  4361. "in": "query",
  4362. "name": "directory",
  4363. "schema": {
  4364. "type": "string"
  4365. }
  4366. }
  4367. ],
  4368. "summary": "Submit TUI prompt",
  4369. "description": "Submit the prompt",
  4370. "responses": {
  4371. "200": {
  4372. "description": "Prompt submitted successfully",
  4373. "content": {
  4374. "application/json": {
  4375. "schema": {
  4376. "type": "boolean"
  4377. }
  4378. }
  4379. }
  4380. }
  4381. },
  4382. "x-codeSamples": [
  4383. {
  4384. "lang": "js",
  4385. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  4386. }
  4387. ]
  4388. }
  4389. },
  4390. "/tui/clear-prompt": {
  4391. "post": {
  4392. "operationId": "tui.clearPrompt",
  4393. "parameters": [
  4394. {
  4395. "in": "query",
  4396. "name": "directory",
  4397. "schema": {
  4398. "type": "string"
  4399. }
  4400. }
  4401. ],
  4402. "summary": "Clear TUI prompt",
  4403. "description": "Clear the prompt",
  4404. "responses": {
  4405. "200": {
  4406. "description": "Prompt cleared successfully",
  4407. "content": {
  4408. "application/json": {
  4409. "schema": {
  4410. "type": "boolean"
  4411. }
  4412. }
  4413. }
  4414. }
  4415. },
  4416. "x-codeSamples": [
  4417. {
  4418. "lang": "js",
  4419. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  4420. }
  4421. ]
  4422. }
  4423. },
  4424. "/tui/execute-command": {
  4425. "post": {
  4426. "operationId": "tui.executeCommand",
  4427. "parameters": [
  4428. {
  4429. "in": "query",
  4430. "name": "directory",
  4431. "schema": {
  4432. "type": "string"
  4433. }
  4434. }
  4435. ],
  4436. "summary": "Execute TUI command",
  4437. "description": "Execute a TUI command (e.g. agent_cycle)",
  4438. "responses": {
  4439. "200": {
  4440. "description": "Command executed successfully",
  4441. "content": {
  4442. "application/json": {
  4443. "schema": {
  4444. "type": "boolean"
  4445. }
  4446. }
  4447. }
  4448. },
  4449. "400": {
  4450. "description": "Bad request",
  4451. "content": {
  4452. "application/json": {
  4453. "schema": {
  4454. "$ref": "#/components/schemas/BadRequestError"
  4455. }
  4456. }
  4457. }
  4458. }
  4459. },
  4460. "requestBody": {
  4461. "content": {
  4462. "application/json": {
  4463. "schema": {
  4464. "type": "object",
  4465. "properties": {
  4466. "command": {
  4467. "type": "string"
  4468. }
  4469. },
  4470. "required": ["command"]
  4471. }
  4472. }
  4473. }
  4474. },
  4475. "x-codeSamples": [
  4476. {
  4477. "lang": "js",
  4478. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  4479. }
  4480. ]
  4481. }
  4482. },
  4483. "/tui/show-toast": {
  4484. "post": {
  4485. "operationId": "tui.showToast",
  4486. "parameters": [
  4487. {
  4488. "in": "query",
  4489. "name": "directory",
  4490. "schema": {
  4491. "type": "string"
  4492. }
  4493. }
  4494. ],
  4495. "summary": "Show TUI toast",
  4496. "description": "Show a toast notification in the TUI",
  4497. "responses": {
  4498. "200": {
  4499. "description": "Toast notification shown successfully",
  4500. "content": {
  4501. "application/json": {
  4502. "schema": {
  4503. "type": "boolean"
  4504. }
  4505. }
  4506. }
  4507. }
  4508. },
  4509. "requestBody": {
  4510. "content": {
  4511. "application/json": {
  4512. "schema": {
  4513. "type": "object",
  4514. "properties": {
  4515. "title": {
  4516. "type": "string"
  4517. },
  4518. "message": {
  4519. "type": "string"
  4520. },
  4521. "variant": {
  4522. "type": "string",
  4523. "enum": ["info", "success", "warning", "error"]
  4524. },
  4525. "duration": {
  4526. "description": "Duration in milliseconds",
  4527. "default": 5000,
  4528. "type": "number"
  4529. }
  4530. },
  4531. "required": ["message", "variant"]
  4532. }
  4533. }
  4534. }
  4535. },
  4536. "x-codeSamples": [
  4537. {
  4538. "lang": "js",
  4539. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  4540. }
  4541. ]
  4542. }
  4543. },
  4544. "/tui/publish": {
  4545. "post": {
  4546. "operationId": "tui.publish",
  4547. "parameters": [
  4548. {
  4549. "in": "query",
  4550. "name": "directory",
  4551. "schema": {
  4552. "type": "string"
  4553. }
  4554. }
  4555. ],
  4556. "summary": "Publish TUI event",
  4557. "description": "Publish a TUI event",
  4558. "responses": {
  4559. "200": {
  4560. "description": "Event published successfully",
  4561. "content": {
  4562. "application/json": {
  4563. "schema": {
  4564. "type": "boolean"
  4565. }
  4566. }
  4567. }
  4568. },
  4569. "400": {
  4570. "description": "Bad request",
  4571. "content": {
  4572. "application/json": {
  4573. "schema": {
  4574. "$ref": "#/components/schemas/BadRequestError"
  4575. }
  4576. }
  4577. }
  4578. }
  4579. },
  4580. "requestBody": {
  4581. "content": {
  4582. "application/json": {
  4583. "schema": {
  4584. "anyOf": [
  4585. {
  4586. "$ref": "#/components/schemas/Event.tui.prompt.append"
  4587. },
  4588. {
  4589. "$ref": "#/components/schemas/Event.tui.command.execute"
  4590. },
  4591. {
  4592. "$ref": "#/components/schemas/Event.tui.toast.show"
  4593. }
  4594. ]
  4595. }
  4596. }
  4597. }
  4598. },
  4599. "x-codeSamples": [
  4600. {
  4601. "lang": "js",
  4602. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  4603. }
  4604. ]
  4605. }
  4606. },
  4607. "/tui/control/next": {
  4608. "get": {
  4609. "operationId": "tui.control.next",
  4610. "parameters": [
  4611. {
  4612. "in": "query",
  4613. "name": "directory",
  4614. "schema": {
  4615. "type": "string"
  4616. }
  4617. }
  4618. ],
  4619. "summary": "Get next TUI request",
  4620. "description": "Retrieve the next TUI (Terminal User Interface) request from the queue for processing.",
  4621. "responses": {
  4622. "200": {
  4623. "description": "Next TUI request",
  4624. "content": {
  4625. "application/json": {
  4626. "schema": {
  4627. "type": "object",
  4628. "properties": {
  4629. "path": {
  4630. "type": "string"
  4631. },
  4632. "body": {}
  4633. },
  4634. "required": ["path", "body"]
  4635. }
  4636. }
  4637. }
  4638. }
  4639. },
  4640. "x-codeSamples": [
  4641. {
  4642. "lang": "js",
  4643. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  4644. }
  4645. ]
  4646. }
  4647. },
  4648. "/tui/control/response": {
  4649. "post": {
  4650. "operationId": "tui.control.response",
  4651. "parameters": [
  4652. {
  4653. "in": "query",
  4654. "name": "directory",
  4655. "schema": {
  4656. "type": "string"
  4657. }
  4658. }
  4659. ],
  4660. "summary": "Submit TUI response",
  4661. "description": "Submit a response to the TUI request queue to complete a pending request.",
  4662. "responses": {
  4663. "200": {
  4664. "description": "Response submitted successfully",
  4665. "content": {
  4666. "application/json": {
  4667. "schema": {
  4668. "type": "boolean"
  4669. }
  4670. }
  4671. }
  4672. }
  4673. },
  4674. "requestBody": {
  4675. "content": {
  4676. "application/json": {
  4677. "schema": {}
  4678. }
  4679. }
  4680. },
  4681. "x-codeSamples": [
  4682. {
  4683. "lang": "js",
  4684. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  4685. }
  4686. ]
  4687. }
  4688. },
  4689. "/auth/{providerID}": {
  4690. "put": {
  4691. "operationId": "auth.set",
  4692. "parameters": [
  4693. {
  4694. "in": "query",
  4695. "name": "directory",
  4696. "schema": {
  4697. "type": "string"
  4698. }
  4699. },
  4700. {
  4701. "in": "path",
  4702. "name": "providerID",
  4703. "schema": {
  4704. "type": "string"
  4705. },
  4706. "required": true
  4707. }
  4708. ],
  4709. "summary": "Set auth credentials",
  4710. "description": "Set authentication credentials",
  4711. "responses": {
  4712. "200": {
  4713. "description": "Successfully set authentication credentials",
  4714. "content": {
  4715. "application/json": {
  4716. "schema": {
  4717. "type": "boolean"
  4718. }
  4719. }
  4720. }
  4721. },
  4722. "400": {
  4723. "description": "Bad request",
  4724. "content": {
  4725. "application/json": {
  4726. "schema": {
  4727. "$ref": "#/components/schemas/BadRequestError"
  4728. }
  4729. }
  4730. }
  4731. }
  4732. },
  4733. "requestBody": {
  4734. "content": {
  4735. "application/json": {
  4736. "schema": {
  4737. "$ref": "#/components/schemas/Auth"
  4738. }
  4739. }
  4740. }
  4741. },
  4742. "x-codeSamples": [
  4743. {
  4744. "lang": "js",
  4745. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.set({\n ...\n})"
  4746. }
  4747. ]
  4748. }
  4749. },
  4750. "/event": {
  4751. "get": {
  4752. "operationId": "event.subscribe",
  4753. "parameters": [
  4754. {
  4755. "in": "query",
  4756. "name": "directory",
  4757. "schema": {
  4758. "type": "string"
  4759. }
  4760. }
  4761. ],
  4762. "summary": "Subscribe to events",
  4763. "description": "Get events",
  4764. "responses": {
  4765. "200": {
  4766. "description": "Event stream",
  4767. "content": {
  4768. "text/event-stream": {
  4769. "schema": {
  4770. "$ref": "#/components/schemas/Event"
  4771. }
  4772. }
  4773. }
  4774. }
  4775. },
  4776. "x-codeSamples": [
  4777. {
  4778. "lang": "js",
  4779. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.event.subscribe({\n ...\n})"
  4780. }
  4781. ]
  4782. }
  4783. }
  4784. },
  4785. "components": {
  4786. "schemas": {
  4787. "Event.installation.updated": {
  4788. "type": "object",
  4789. "properties": {
  4790. "type": {
  4791. "type": "string",
  4792. "const": "installation.updated"
  4793. },
  4794. "properties": {
  4795. "type": "object",
  4796. "properties": {
  4797. "version": {
  4798. "type": "string"
  4799. }
  4800. },
  4801. "required": ["version"]
  4802. }
  4803. },
  4804. "required": ["type", "properties"]
  4805. },
  4806. "Event.installation.update-available": {
  4807. "type": "object",
  4808. "properties": {
  4809. "type": {
  4810. "type": "string",
  4811. "const": "installation.update-available"
  4812. },
  4813. "properties": {
  4814. "type": "object",
  4815. "properties": {
  4816. "version": {
  4817. "type": "string"
  4818. }
  4819. },
  4820. "required": ["version"]
  4821. }
  4822. },
  4823. "required": ["type", "properties"]
  4824. },
  4825. "Project": {
  4826. "type": "object",
  4827. "properties": {
  4828. "id": {
  4829. "type": "string"
  4830. },
  4831. "worktree": {
  4832. "type": "string"
  4833. },
  4834. "vcs": {
  4835. "type": "string",
  4836. "const": "git"
  4837. },
  4838. "name": {
  4839. "type": "string"
  4840. },
  4841. "icon": {
  4842. "type": "object",
  4843. "properties": {
  4844. "url": {
  4845. "type": "string"
  4846. },
  4847. "color": {
  4848. "type": "string"
  4849. }
  4850. }
  4851. },
  4852. "time": {
  4853. "type": "object",
  4854. "properties": {
  4855. "created": {
  4856. "type": "number"
  4857. },
  4858. "updated": {
  4859. "type": "number"
  4860. },
  4861. "initialized": {
  4862. "type": "number"
  4863. }
  4864. },
  4865. "required": ["created", "updated"]
  4866. }
  4867. },
  4868. "required": ["id", "worktree", "time"]
  4869. },
  4870. "Event.project.updated": {
  4871. "type": "object",
  4872. "properties": {
  4873. "type": {
  4874. "type": "string",
  4875. "const": "project.updated"
  4876. },
  4877. "properties": {
  4878. "$ref": "#/components/schemas/Project"
  4879. }
  4880. },
  4881. "required": ["type", "properties"]
  4882. },
  4883. "Event.server.instance.disposed": {
  4884. "type": "object",
  4885. "properties": {
  4886. "type": {
  4887. "type": "string",
  4888. "const": "server.instance.disposed"
  4889. },
  4890. "properties": {
  4891. "type": "object",
  4892. "properties": {
  4893. "directory": {
  4894. "type": "string"
  4895. }
  4896. },
  4897. "required": ["directory"]
  4898. }
  4899. },
  4900. "required": ["type", "properties"]
  4901. },
  4902. "Event.lsp.client.diagnostics": {
  4903. "type": "object",
  4904. "properties": {
  4905. "type": {
  4906. "type": "string",
  4907. "const": "lsp.client.diagnostics"
  4908. },
  4909. "properties": {
  4910. "type": "object",
  4911. "properties": {
  4912. "serverID": {
  4913. "type": "string"
  4914. },
  4915. "path": {
  4916. "type": "string"
  4917. }
  4918. },
  4919. "required": ["serverID", "path"]
  4920. }
  4921. },
  4922. "required": ["type", "properties"]
  4923. },
  4924. "Event.lsp.updated": {
  4925. "type": "object",
  4926. "properties": {
  4927. "type": {
  4928. "type": "string",
  4929. "const": "lsp.updated"
  4930. },
  4931. "properties": {
  4932. "type": "object",
  4933. "properties": {}
  4934. }
  4935. },
  4936. "required": ["type", "properties"]
  4937. },
  4938. "FileDiff": {
  4939. "type": "object",
  4940. "properties": {
  4941. "file": {
  4942. "type": "string"
  4943. },
  4944. "before": {
  4945. "type": "string"
  4946. },
  4947. "after": {
  4948. "type": "string"
  4949. },
  4950. "additions": {
  4951. "type": "number"
  4952. },
  4953. "deletions": {
  4954. "type": "number"
  4955. }
  4956. },
  4957. "required": ["file", "before", "after", "additions", "deletions"]
  4958. },
  4959. "UserMessage": {
  4960. "type": "object",
  4961. "properties": {
  4962. "id": {
  4963. "type": "string"
  4964. },
  4965. "sessionID": {
  4966. "type": "string"
  4967. },
  4968. "role": {
  4969. "type": "string",
  4970. "const": "user"
  4971. },
  4972. "time": {
  4973. "type": "object",
  4974. "properties": {
  4975. "created": {
  4976. "type": "number"
  4977. }
  4978. },
  4979. "required": ["created"]
  4980. },
  4981. "summary": {
  4982. "type": "object",
  4983. "properties": {
  4984. "title": {
  4985. "type": "string"
  4986. },
  4987. "body": {
  4988. "type": "string"
  4989. },
  4990. "diffs": {
  4991. "type": "array",
  4992. "items": {
  4993. "$ref": "#/components/schemas/FileDiff"
  4994. }
  4995. }
  4996. },
  4997. "required": ["diffs"]
  4998. },
  4999. "agent": {
  5000. "type": "string"
  5001. },
  5002. "model": {
  5003. "type": "object",
  5004. "properties": {
  5005. "providerID": {
  5006. "type": "string"
  5007. },
  5008. "modelID": {
  5009. "type": "string"
  5010. }
  5011. },
  5012. "required": ["providerID", "modelID"]
  5013. },
  5014. "system": {
  5015. "type": "string"
  5016. },
  5017. "tools": {
  5018. "type": "object",
  5019. "propertyNames": {
  5020. "type": "string"
  5021. },
  5022. "additionalProperties": {
  5023. "type": "boolean"
  5024. }
  5025. }
  5026. },
  5027. "required": ["id", "sessionID", "role", "time", "agent", "model"]
  5028. },
  5029. "ProviderAuthError": {
  5030. "type": "object",
  5031. "properties": {
  5032. "name": {
  5033. "type": "string",
  5034. "const": "ProviderAuthError"
  5035. },
  5036. "data": {
  5037. "type": "object",
  5038. "properties": {
  5039. "providerID": {
  5040. "type": "string"
  5041. },
  5042. "message": {
  5043. "type": "string"
  5044. }
  5045. },
  5046. "required": ["providerID", "message"]
  5047. }
  5048. },
  5049. "required": ["name", "data"]
  5050. },
  5051. "UnknownError": {
  5052. "type": "object",
  5053. "properties": {
  5054. "name": {
  5055. "type": "string",
  5056. "const": "UnknownError"
  5057. },
  5058. "data": {
  5059. "type": "object",
  5060. "properties": {
  5061. "message": {
  5062. "type": "string"
  5063. }
  5064. },
  5065. "required": ["message"]
  5066. }
  5067. },
  5068. "required": ["name", "data"]
  5069. },
  5070. "MessageOutputLengthError": {
  5071. "type": "object",
  5072. "properties": {
  5073. "name": {
  5074. "type": "string",
  5075. "const": "MessageOutputLengthError"
  5076. },
  5077. "data": {
  5078. "type": "object",
  5079. "properties": {}
  5080. }
  5081. },
  5082. "required": ["name", "data"]
  5083. },
  5084. "MessageAbortedError": {
  5085. "type": "object",
  5086. "properties": {
  5087. "name": {
  5088. "type": "string",
  5089. "const": "MessageAbortedError"
  5090. },
  5091. "data": {
  5092. "type": "object",
  5093. "properties": {
  5094. "message": {
  5095. "type": "string"
  5096. }
  5097. },
  5098. "required": ["message"]
  5099. }
  5100. },
  5101. "required": ["name", "data"]
  5102. },
  5103. "APIError": {
  5104. "type": "object",
  5105. "properties": {
  5106. "name": {
  5107. "type": "string",
  5108. "const": "APIError"
  5109. },
  5110. "data": {
  5111. "type": "object",
  5112. "properties": {
  5113. "message": {
  5114. "type": "string"
  5115. },
  5116. "statusCode": {
  5117. "type": "number"
  5118. },
  5119. "isRetryable": {
  5120. "type": "boolean"
  5121. },
  5122. "responseHeaders": {
  5123. "type": "object",
  5124. "propertyNames": {
  5125. "type": "string"
  5126. },
  5127. "additionalProperties": {
  5128. "type": "string"
  5129. }
  5130. },
  5131. "responseBody": {
  5132. "type": "string"
  5133. }
  5134. },
  5135. "required": ["message", "isRetryable"]
  5136. }
  5137. },
  5138. "required": ["name", "data"]
  5139. },
  5140. "AssistantMessage": {
  5141. "type": "object",
  5142. "properties": {
  5143. "id": {
  5144. "type": "string"
  5145. },
  5146. "sessionID": {
  5147. "type": "string"
  5148. },
  5149. "role": {
  5150. "type": "string",
  5151. "const": "assistant"
  5152. },
  5153. "time": {
  5154. "type": "object",
  5155. "properties": {
  5156. "created": {
  5157. "type": "number"
  5158. },
  5159. "completed": {
  5160. "type": "number"
  5161. }
  5162. },
  5163. "required": ["created"]
  5164. },
  5165. "error": {
  5166. "anyOf": [
  5167. {
  5168. "$ref": "#/components/schemas/ProviderAuthError"
  5169. },
  5170. {
  5171. "$ref": "#/components/schemas/UnknownError"
  5172. },
  5173. {
  5174. "$ref": "#/components/schemas/MessageOutputLengthError"
  5175. },
  5176. {
  5177. "$ref": "#/components/schemas/MessageAbortedError"
  5178. },
  5179. {
  5180. "$ref": "#/components/schemas/APIError"
  5181. }
  5182. ]
  5183. },
  5184. "parentID": {
  5185. "type": "string"
  5186. },
  5187. "modelID": {
  5188. "type": "string"
  5189. },
  5190. "providerID": {
  5191. "type": "string"
  5192. },
  5193. "mode": {
  5194. "type": "string"
  5195. },
  5196. "agent": {
  5197. "type": "string"
  5198. },
  5199. "path": {
  5200. "type": "object",
  5201. "properties": {
  5202. "cwd": {
  5203. "type": "string"
  5204. },
  5205. "root": {
  5206. "type": "string"
  5207. }
  5208. },
  5209. "required": ["cwd", "root"]
  5210. },
  5211. "summary": {
  5212. "type": "boolean"
  5213. },
  5214. "cost": {
  5215. "type": "number"
  5216. },
  5217. "tokens": {
  5218. "type": "object",
  5219. "properties": {
  5220. "input": {
  5221. "type": "number"
  5222. },
  5223. "output": {
  5224. "type": "number"
  5225. },
  5226. "reasoning": {
  5227. "type": "number"
  5228. },
  5229. "cache": {
  5230. "type": "object",
  5231. "properties": {
  5232. "read": {
  5233. "type": "number"
  5234. },
  5235. "write": {
  5236. "type": "number"
  5237. }
  5238. },
  5239. "required": ["read", "write"]
  5240. }
  5241. },
  5242. "required": ["input", "output", "reasoning", "cache"]
  5243. },
  5244. "finish": {
  5245. "type": "string"
  5246. }
  5247. },
  5248. "required": [
  5249. "id",
  5250. "sessionID",
  5251. "role",
  5252. "time",
  5253. "parentID",
  5254. "modelID",
  5255. "providerID",
  5256. "mode",
  5257. "agent",
  5258. "path",
  5259. "cost",
  5260. "tokens"
  5261. ]
  5262. },
  5263. "Message": {
  5264. "anyOf": [
  5265. {
  5266. "$ref": "#/components/schemas/UserMessage"
  5267. },
  5268. {
  5269. "$ref": "#/components/schemas/AssistantMessage"
  5270. }
  5271. ]
  5272. },
  5273. "Event.message.updated": {
  5274. "type": "object",
  5275. "properties": {
  5276. "type": {
  5277. "type": "string",
  5278. "const": "message.updated"
  5279. },
  5280. "properties": {
  5281. "type": "object",
  5282. "properties": {
  5283. "info": {
  5284. "$ref": "#/components/schemas/Message"
  5285. }
  5286. },
  5287. "required": ["info"]
  5288. }
  5289. },
  5290. "required": ["type", "properties"]
  5291. },
  5292. "Event.message.removed": {
  5293. "type": "object",
  5294. "properties": {
  5295. "type": {
  5296. "type": "string",
  5297. "const": "message.removed"
  5298. },
  5299. "properties": {
  5300. "type": "object",
  5301. "properties": {
  5302. "sessionID": {
  5303. "type": "string"
  5304. },
  5305. "messageID": {
  5306. "type": "string"
  5307. }
  5308. },
  5309. "required": ["sessionID", "messageID"]
  5310. }
  5311. },
  5312. "required": ["type", "properties"]
  5313. },
  5314. "TextPart": {
  5315. "type": "object",
  5316. "properties": {
  5317. "id": {
  5318. "type": "string"
  5319. },
  5320. "sessionID": {
  5321. "type": "string"
  5322. },
  5323. "messageID": {
  5324. "type": "string"
  5325. },
  5326. "type": {
  5327. "type": "string",
  5328. "const": "text"
  5329. },
  5330. "text": {
  5331. "type": "string"
  5332. },
  5333. "synthetic": {
  5334. "type": "boolean"
  5335. },
  5336. "ignored": {
  5337. "type": "boolean"
  5338. },
  5339. "time": {
  5340. "type": "object",
  5341. "properties": {
  5342. "start": {
  5343. "type": "number"
  5344. },
  5345. "end": {
  5346. "type": "number"
  5347. }
  5348. },
  5349. "required": ["start"]
  5350. },
  5351. "metadata": {
  5352. "type": "object",
  5353. "propertyNames": {
  5354. "type": "string"
  5355. },
  5356. "additionalProperties": {}
  5357. }
  5358. },
  5359. "required": ["id", "sessionID", "messageID", "type", "text"]
  5360. },
  5361. "ReasoningPart": {
  5362. "type": "object",
  5363. "properties": {
  5364. "id": {
  5365. "type": "string"
  5366. },
  5367. "sessionID": {
  5368. "type": "string"
  5369. },
  5370. "messageID": {
  5371. "type": "string"
  5372. },
  5373. "type": {
  5374. "type": "string",
  5375. "const": "reasoning"
  5376. },
  5377. "text": {
  5378. "type": "string"
  5379. },
  5380. "metadata": {
  5381. "type": "object",
  5382. "propertyNames": {
  5383. "type": "string"
  5384. },
  5385. "additionalProperties": {}
  5386. },
  5387. "time": {
  5388. "type": "object",
  5389. "properties": {
  5390. "start": {
  5391. "type": "number"
  5392. },
  5393. "end": {
  5394. "type": "number"
  5395. }
  5396. },
  5397. "required": ["start"]
  5398. }
  5399. },
  5400. "required": ["id", "sessionID", "messageID", "type", "text", "time"]
  5401. },
  5402. "FilePartSourceText": {
  5403. "type": "object",
  5404. "properties": {
  5405. "value": {
  5406. "type": "string"
  5407. },
  5408. "start": {
  5409. "type": "integer",
  5410. "minimum": -9007199254740991,
  5411. "maximum": 9007199254740991
  5412. },
  5413. "end": {
  5414. "type": "integer",
  5415. "minimum": -9007199254740991,
  5416. "maximum": 9007199254740991
  5417. }
  5418. },
  5419. "required": ["value", "start", "end"]
  5420. },
  5421. "FileSource": {
  5422. "type": "object",
  5423. "properties": {
  5424. "text": {
  5425. "$ref": "#/components/schemas/FilePartSourceText"
  5426. },
  5427. "type": {
  5428. "type": "string",
  5429. "const": "file"
  5430. },
  5431. "path": {
  5432. "type": "string"
  5433. }
  5434. },
  5435. "required": ["text", "type", "path"]
  5436. },
  5437. "Range": {
  5438. "type": "object",
  5439. "properties": {
  5440. "start": {
  5441. "type": "object",
  5442. "properties": {
  5443. "line": {
  5444. "type": "number"
  5445. },
  5446. "character": {
  5447. "type": "number"
  5448. }
  5449. },
  5450. "required": ["line", "character"]
  5451. },
  5452. "end": {
  5453. "type": "object",
  5454. "properties": {
  5455. "line": {
  5456. "type": "number"
  5457. },
  5458. "character": {
  5459. "type": "number"
  5460. }
  5461. },
  5462. "required": ["line", "character"]
  5463. }
  5464. },
  5465. "required": ["start", "end"]
  5466. },
  5467. "SymbolSource": {
  5468. "type": "object",
  5469. "properties": {
  5470. "text": {
  5471. "$ref": "#/components/schemas/FilePartSourceText"
  5472. },
  5473. "type": {
  5474. "type": "string",
  5475. "const": "symbol"
  5476. },
  5477. "path": {
  5478. "type": "string"
  5479. },
  5480. "range": {
  5481. "$ref": "#/components/schemas/Range"
  5482. },
  5483. "name": {
  5484. "type": "string"
  5485. },
  5486. "kind": {
  5487. "type": "integer",
  5488. "minimum": -9007199254740991,
  5489. "maximum": 9007199254740991
  5490. }
  5491. },
  5492. "required": ["text", "type", "path", "range", "name", "kind"]
  5493. },
  5494. "FilePartSource": {
  5495. "anyOf": [
  5496. {
  5497. "$ref": "#/components/schemas/FileSource"
  5498. },
  5499. {
  5500. "$ref": "#/components/schemas/SymbolSource"
  5501. }
  5502. ]
  5503. },
  5504. "FilePart": {
  5505. "type": "object",
  5506. "properties": {
  5507. "id": {
  5508. "type": "string"
  5509. },
  5510. "sessionID": {
  5511. "type": "string"
  5512. },
  5513. "messageID": {
  5514. "type": "string"
  5515. },
  5516. "type": {
  5517. "type": "string",
  5518. "const": "file"
  5519. },
  5520. "mime": {
  5521. "type": "string"
  5522. },
  5523. "filename": {
  5524. "type": "string"
  5525. },
  5526. "url": {
  5527. "type": "string"
  5528. },
  5529. "source": {
  5530. "$ref": "#/components/schemas/FilePartSource"
  5531. }
  5532. },
  5533. "required": ["id", "sessionID", "messageID", "type", "mime", "url"]
  5534. },
  5535. "ToolStatePending": {
  5536. "type": "object",
  5537. "properties": {
  5538. "status": {
  5539. "type": "string",
  5540. "const": "pending"
  5541. },
  5542. "input": {
  5543. "type": "object",
  5544. "propertyNames": {
  5545. "type": "string"
  5546. },
  5547. "additionalProperties": {}
  5548. },
  5549. "raw": {
  5550. "type": "string"
  5551. }
  5552. },
  5553. "required": ["status", "input", "raw"]
  5554. },
  5555. "ToolStateRunning": {
  5556. "type": "object",
  5557. "properties": {
  5558. "status": {
  5559. "type": "string",
  5560. "const": "running"
  5561. },
  5562. "input": {
  5563. "type": "object",
  5564. "propertyNames": {
  5565. "type": "string"
  5566. },
  5567. "additionalProperties": {}
  5568. },
  5569. "title": {
  5570. "type": "string"
  5571. },
  5572. "metadata": {
  5573. "type": "object",
  5574. "propertyNames": {
  5575. "type": "string"
  5576. },
  5577. "additionalProperties": {}
  5578. },
  5579. "time": {
  5580. "type": "object",
  5581. "properties": {
  5582. "start": {
  5583. "type": "number"
  5584. }
  5585. },
  5586. "required": ["start"]
  5587. }
  5588. },
  5589. "required": ["status", "input", "time"]
  5590. },
  5591. "ToolStateCompleted": {
  5592. "type": "object",
  5593. "properties": {
  5594. "status": {
  5595. "type": "string",
  5596. "const": "completed"
  5597. },
  5598. "input": {
  5599. "type": "object",
  5600. "propertyNames": {
  5601. "type": "string"
  5602. },
  5603. "additionalProperties": {}
  5604. },
  5605. "output": {
  5606. "type": "string"
  5607. },
  5608. "title": {
  5609. "type": "string"
  5610. },
  5611. "metadata": {
  5612. "type": "object",
  5613. "propertyNames": {
  5614. "type": "string"
  5615. },
  5616. "additionalProperties": {}
  5617. },
  5618. "time": {
  5619. "type": "object",
  5620. "properties": {
  5621. "start": {
  5622. "type": "number"
  5623. },
  5624. "end": {
  5625. "type": "number"
  5626. },
  5627. "compacted": {
  5628. "type": "number"
  5629. }
  5630. },
  5631. "required": ["start", "end"]
  5632. },
  5633. "attachments": {
  5634. "type": "array",
  5635. "items": {
  5636. "$ref": "#/components/schemas/FilePart"
  5637. }
  5638. }
  5639. },
  5640. "required": ["status", "input", "output", "title", "metadata", "time"]
  5641. },
  5642. "ToolStateError": {
  5643. "type": "object",
  5644. "properties": {
  5645. "status": {
  5646. "type": "string",
  5647. "const": "error"
  5648. },
  5649. "input": {
  5650. "type": "object",
  5651. "propertyNames": {
  5652. "type": "string"
  5653. },
  5654. "additionalProperties": {}
  5655. },
  5656. "error": {
  5657. "type": "string"
  5658. },
  5659. "metadata": {
  5660. "type": "object",
  5661. "propertyNames": {
  5662. "type": "string"
  5663. },
  5664. "additionalProperties": {}
  5665. },
  5666. "time": {
  5667. "type": "object",
  5668. "properties": {
  5669. "start": {
  5670. "type": "number"
  5671. },
  5672. "end": {
  5673. "type": "number"
  5674. }
  5675. },
  5676. "required": ["start", "end"]
  5677. }
  5678. },
  5679. "required": ["status", "input", "error", "time"]
  5680. },
  5681. "ToolState": {
  5682. "anyOf": [
  5683. {
  5684. "$ref": "#/components/schemas/ToolStatePending"
  5685. },
  5686. {
  5687. "$ref": "#/components/schemas/ToolStateRunning"
  5688. },
  5689. {
  5690. "$ref": "#/components/schemas/ToolStateCompleted"
  5691. },
  5692. {
  5693. "$ref": "#/components/schemas/ToolStateError"
  5694. }
  5695. ]
  5696. },
  5697. "ToolPart": {
  5698. "type": "object",
  5699. "properties": {
  5700. "id": {
  5701. "type": "string"
  5702. },
  5703. "sessionID": {
  5704. "type": "string"
  5705. },
  5706. "messageID": {
  5707. "type": "string"
  5708. },
  5709. "type": {
  5710. "type": "string",
  5711. "const": "tool"
  5712. },
  5713. "callID": {
  5714. "type": "string"
  5715. },
  5716. "tool": {
  5717. "type": "string"
  5718. },
  5719. "state": {
  5720. "$ref": "#/components/schemas/ToolState"
  5721. },
  5722. "metadata": {
  5723. "type": "object",
  5724. "propertyNames": {
  5725. "type": "string"
  5726. },
  5727. "additionalProperties": {}
  5728. }
  5729. },
  5730. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"]
  5731. },
  5732. "StepStartPart": {
  5733. "type": "object",
  5734. "properties": {
  5735. "id": {
  5736. "type": "string"
  5737. },
  5738. "sessionID": {
  5739. "type": "string"
  5740. },
  5741. "messageID": {
  5742. "type": "string"
  5743. },
  5744. "type": {
  5745. "type": "string",
  5746. "const": "step-start"
  5747. },
  5748. "snapshot": {
  5749. "type": "string"
  5750. }
  5751. },
  5752. "required": ["id", "sessionID", "messageID", "type"]
  5753. },
  5754. "StepFinishPart": {
  5755. "type": "object",
  5756. "properties": {
  5757. "id": {
  5758. "type": "string"
  5759. },
  5760. "sessionID": {
  5761. "type": "string"
  5762. },
  5763. "messageID": {
  5764. "type": "string"
  5765. },
  5766. "type": {
  5767. "type": "string",
  5768. "const": "step-finish"
  5769. },
  5770. "reason": {
  5771. "type": "string"
  5772. },
  5773. "snapshot": {
  5774. "type": "string"
  5775. },
  5776. "cost": {
  5777. "type": "number"
  5778. },
  5779. "tokens": {
  5780. "type": "object",
  5781. "properties": {
  5782. "input": {
  5783. "type": "number"
  5784. },
  5785. "output": {
  5786. "type": "number"
  5787. },
  5788. "reasoning": {
  5789. "type": "number"
  5790. },
  5791. "cache": {
  5792. "type": "object",
  5793. "properties": {
  5794. "read": {
  5795. "type": "number"
  5796. },
  5797. "write": {
  5798. "type": "number"
  5799. }
  5800. },
  5801. "required": ["read", "write"]
  5802. }
  5803. },
  5804. "required": ["input", "output", "reasoning", "cache"]
  5805. }
  5806. },
  5807. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"]
  5808. },
  5809. "SnapshotPart": {
  5810. "type": "object",
  5811. "properties": {
  5812. "id": {
  5813. "type": "string"
  5814. },
  5815. "sessionID": {
  5816. "type": "string"
  5817. },
  5818. "messageID": {
  5819. "type": "string"
  5820. },
  5821. "type": {
  5822. "type": "string",
  5823. "const": "snapshot"
  5824. },
  5825. "snapshot": {
  5826. "type": "string"
  5827. }
  5828. },
  5829. "required": ["id", "sessionID", "messageID", "type", "snapshot"]
  5830. },
  5831. "PatchPart": {
  5832. "type": "object",
  5833. "properties": {
  5834. "id": {
  5835. "type": "string"
  5836. },
  5837. "sessionID": {
  5838. "type": "string"
  5839. },
  5840. "messageID": {
  5841. "type": "string"
  5842. },
  5843. "type": {
  5844. "type": "string",
  5845. "const": "patch"
  5846. },
  5847. "hash": {
  5848. "type": "string"
  5849. },
  5850. "files": {
  5851. "type": "array",
  5852. "items": {
  5853. "type": "string"
  5854. }
  5855. }
  5856. },
  5857. "required": ["id", "sessionID", "messageID", "type", "hash", "files"]
  5858. },
  5859. "AgentPart": {
  5860. "type": "object",
  5861. "properties": {
  5862. "id": {
  5863. "type": "string"
  5864. },
  5865. "sessionID": {
  5866. "type": "string"
  5867. },
  5868. "messageID": {
  5869. "type": "string"
  5870. },
  5871. "type": {
  5872. "type": "string",
  5873. "const": "agent"
  5874. },
  5875. "name": {
  5876. "type": "string"
  5877. },
  5878. "source": {
  5879. "type": "object",
  5880. "properties": {
  5881. "value": {
  5882. "type": "string"
  5883. },
  5884. "start": {
  5885. "type": "integer",
  5886. "minimum": -9007199254740991,
  5887. "maximum": 9007199254740991
  5888. },
  5889. "end": {
  5890. "type": "integer",
  5891. "minimum": -9007199254740991,
  5892. "maximum": 9007199254740991
  5893. }
  5894. },
  5895. "required": ["value", "start", "end"]
  5896. }
  5897. },
  5898. "required": ["id", "sessionID", "messageID", "type", "name"]
  5899. },
  5900. "RetryPart": {
  5901. "type": "object",
  5902. "properties": {
  5903. "id": {
  5904. "type": "string"
  5905. },
  5906. "sessionID": {
  5907. "type": "string"
  5908. },
  5909. "messageID": {
  5910. "type": "string"
  5911. },
  5912. "type": {
  5913. "type": "string",
  5914. "const": "retry"
  5915. },
  5916. "attempt": {
  5917. "type": "number"
  5918. },
  5919. "error": {
  5920. "$ref": "#/components/schemas/APIError"
  5921. },
  5922. "time": {
  5923. "type": "object",
  5924. "properties": {
  5925. "created": {
  5926. "type": "number"
  5927. }
  5928. },
  5929. "required": ["created"]
  5930. }
  5931. },
  5932. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"]
  5933. },
  5934. "CompactionPart": {
  5935. "type": "object",
  5936. "properties": {
  5937. "id": {
  5938. "type": "string"
  5939. },
  5940. "sessionID": {
  5941. "type": "string"
  5942. },
  5943. "messageID": {
  5944. "type": "string"
  5945. },
  5946. "type": {
  5947. "type": "string",
  5948. "const": "compaction"
  5949. },
  5950. "auto": {
  5951. "type": "boolean"
  5952. }
  5953. },
  5954. "required": ["id", "sessionID", "messageID", "type", "auto"]
  5955. },
  5956. "Part": {
  5957. "anyOf": [
  5958. {
  5959. "$ref": "#/components/schemas/TextPart"
  5960. },
  5961. {
  5962. "type": "object",
  5963. "properties": {
  5964. "id": {
  5965. "type": "string"
  5966. },
  5967. "sessionID": {
  5968. "type": "string"
  5969. },
  5970. "messageID": {
  5971. "type": "string"
  5972. },
  5973. "type": {
  5974. "type": "string",
  5975. "const": "subtask"
  5976. },
  5977. "prompt": {
  5978. "type": "string"
  5979. },
  5980. "description": {
  5981. "type": "string"
  5982. },
  5983. "agent": {
  5984. "type": "string"
  5985. }
  5986. },
  5987. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"]
  5988. },
  5989. {
  5990. "$ref": "#/components/schemas/ReasoningPart"
  5991. },
  5992. {
  5993. "$ref": "#/components/schemas/FilePart"
  5994. },
  5995. {
  5996. "$ref": "#/components/schemas/ToolPart"
  5997. },
  5998. {
  5999. "$ref": "#/components/schemas/StepStartPart"
  6000. },
  6001. {
  6002. "$ref": "#/components/schemas/StepFinishPart"
  6003. },
  6004. {
  6005. "$ref": "#/components/schemas/SnapshotPart"
  6006. },
  6007. {
  6008. "$ref": "#/components/schemas/PatchPart"
  6009. },
  6010. {
  6011. "$ref": "#/components/schemas/AgentPart"
  6012. },
  6013. {
  6014. "$ref": "#/components/schemas/RetryPart"
  6015. },
  6016. {
  6017. "$ref": "#/components/schemas/CompactionPart"
  6018. }
  6019. ]
  6020. },
  6021. "Event.message.part.updated": {
  6022. "type": "object",
  6023. "properties": {
  6024. "type": {
  6025. "type": "string",
  6026. "const": "message.part.updated"
  6027. },
  6028. "properties": {
  6029. "type": "object",
  6030. "properties": {
  6031. "part": {
  6032. "$ref": "#/components/schemas/Part"
  6033. },
  6034. "delta": {
  6035. "type": "string"
  6036. }
  6037. },
  6038. "required": ["part"]
  6039. }
  6040. },
  6041. "required": ["type", "properties"]
  6042. },
  6043. "Event.message.part.removed": {
  6044. "type": "object",
  6045. "properties": {
  6046. "type": {
  6047. "type": "string",
  6048. "const": "message.part.removed"
  6049. },
  6050. "properties": {
  6051. "type": "object",
  6052. "properties": {
  6053. "sessionID": {
  6054. "type": "string"
  6055. },
  6056. "messageID": {
  6057. "type": "string"
  6058. },
  6059. "partID": {
  6060. "type": "string"
  6061. }
  6062. },
  6063. "required": ["sessionID", "messageID", "partID"]
  6064. }
  6065. },
  6066. "required": ["type", "properties"]
  6067. },
  6068. "Permission": {
  6069. "type": "object",
  6070. "properties": {
  6071. "id": {
  6072. "type": "string"
  6073. },
  6074. "type": {
  6075. "type": "string"
  6076. },
  6077. "pattern": {
  6078. "anyOf": [
  6079. {
  6080. "type": "string"
  6081. },
  6082. {
  6083. "type": "array",
  6084. "items": {
  6085. "type": "string"
  6086. }
  6087. }
  6088. ]
  6089. },
  6090. "sessionID": {
  6091. "type": "string"
  6092. },
  6093. "messageID": {
  6094. "type": "string"
  6095. },
  6096. "callID": {
  6097. "type": "string"
  6098. },
  6099. "title": {
  6100. "type": "string"
  6101. },
  6102. "metadata": {
  6103. "type": "object",
  6104. "propertyNames": {
  6105. "type": "string"
  6106. },
  6107. "additionalProperties": {}
  6108. },
  6109. "time": {
  6110. "type": "object",
  6111. "properties": {
  6112. "created": {
  6113. "type": "number"
  6114. }
  6115. },
  6116. "required": ["created"]
  6117. }
  6118. },
  6119. "required": ["id", "type", "sessionID", "messageID", "title", "metadata", "time"]
  6120. },
  6121. "Event.permission.updated": {
  6122. "type": "object",
  6123. "properties": {
  6124. "type": {
  6125. "type": "string",
  6126. "const": "permission.updated"
  6127. },
  6128. "properties": {
  6129. "$ref": "#/components/schemas/Permission"
  6130. }
  6131. },
  6132. "required": ["type", "properties"]
  6133. },
  6134. "Event.permission.replied": {
  6135. "type": "object",
  6136. "properties": {
  6137. "type": {
  6138. "type": "string",
  6139. "const": "permission.replied"
  6140. },
  6141. "properties": {
  6142. "type": "object",
  6143. "properties": {
  6144. "sessionID": {
  6145. "type": "string"
  6146. },
  6147. "permissionID": {
  6148. "type": "string"
  6149. },
  6150. "response": {
  6151. "type": "string"
  6152. }
  6153. },
  6154. "required": ["sessionID", "permissionID", "response"]
  6155. }
  6156. },
  6157. "required": ["type", "properties"]
  6158. },
  6159. "Event.file.edited": {
  6160. "type": "object",
  6161. "properties": {
  6162. "type": {
  6163. "type": "string",
  6164. "const": "file.edited"
  6165. },
  6166. "properties": {
  6167. "type": "object",
  6168. "properties": {
  6169. "file": {
  6170. "type": "string"
  6171. }
  6172. },
  6173. "required": ["file"]
  6174. }
  6175. },
  6176. "required": ["type", "properties"]
  6177. },
  6178. "Todo": {
  6179. "type": "object",
  6180. "properties": {
  6181. "content": {
  6182. "description": "Brief description of the task",
  6183. "type": "string"
  6184. },
  6185. "status": {
  6186. "description": "Current status of the task: pending, in_progress, completed, cancelled",
  6187. "type": "string"
  6188. },
  6189. "priority": {
  6190. "description": "Priority level of the task: high, medium, low",
  6191. "type": "string"
  6192. },
  6193. "id": {
  6194. "description": "Unique identifier for the todo item",
  6195. "type": "string"
  6196. }
  6197. },
  6198. "required": ["content", "status", "priority", "id"]
  6199. },
  6200. "Event.todo.updated": {
  6201. "type": "object",
  6202. "properties": {
  6203. "type": {
  6204. "type": "string",
  6205. "const": "todo.updated"
  6206. },
  6207. "properties": {
  6208. "type": "object",
  6209. "properties": {
  6210. "sessionID": {
  6211. "type": "string"
  6212. },
  6213. "todos": {
  6214. "type": "array",
  6215. "items": {
  6216. "$ref": "#/components/schemas/Todo"
  6217. }
  6218. }
  6219. },
  6220. "required": ["sessionID", "todos"]
  6221. }
  6222. },
  6223. "required": ["type", "properties"]
  6224. },
  6225. "SessionStatus": {
  6226. "anyOf": [
  6227. {
  6228. "type": "object",
  6229. "properties": {
  6230. "type": {
  6231. "type": "string",
  6232. "const": "idle"
  6233. }
  6234. },
  6235. "required": ["type"]
  6236. },
  6237. {
  6238. "type": "object",
  6239. "properties": {
  6240. "type": {
  6241. "type": "string",
  6242. "const": "retry"
  6243. },
  6244. "attempt": {
  6245. "type": "number"
  6246. },
  6247. "message": {
  6248. "type": "string"
  6249. },
  6250. "next": {
  6251. "type": "number"
  6252. }
  6253. },
  6254. "required": ["type", "attempt", "message", "next"]
  6255. },
  6256. {
  6257. "type": "object",
  6258. "properties": {
  6259. "type": {
  6260. "type": "string",
  6261. "const": "busy"
  6262. }
  6263. },
  6264. "required": ["type"]
  6265. }
  6266. ]
  6267. },
  6268. "Event.session.status": {
  6269. "type": "object",
  6270. "properties": {
  6271. "type": {
  6272. "type": "string",
  6273. "const": "session.status"
  6274. },
  6275. "properties": {
  6276. "type": "object",
  6277. "properties": {
  6278. "sessionID": {
  6279. "type": "string"
  6280. },
  6281. "status": {
  6282. "$ref": "#/components/schemas/SessionStatus"
  6283. }
  6284. },
  6285. "required": ["sessionID", "status"]
  6286. }
  6287. },
  6288. "required": ["type", "properties"]
  6289. },
  6290. "Event.session.idle": {
  6291. "type": "object",
  6292. "properties": {
  6293. "type": {
  6294. "type": "string",
  6295. "const": "session.idle"
  6296. },
  6297. "properties": {
  6298. "type": "object",
  6299. "properties": {
  6300. "sessionID": {
  6301. "type": "string"
  6302. }
  6303. },
  6304. "required": ["sessionID"]
  6305. }
  6306. },
  6307. "required": ["type", "properties"]
  6308. },
  6309. "Event.session.compacted": {
  6310. "type": "object",
  6311. "properties": {
  6312. "type": {
  6313. "type": "string",
  6314. "const": "session.compacted"
  6315. },
  6316. "properties": {
  6317. "type": "object",
  6318. "properties": {
  6319. "sessionID": {
  6320. "type": "string"
  6321. }
  6322. },
  6323. "required": ["sessionID"]
  6324. }
  6325. },
  6326. "required": ["type", "properties"]
  6327. },
  6328. "Event.command.executed": {
  6329. "type": "object",
  6330. "properties": {
  6331. "type": {
  6332. "type": "string",
  6333. "const": "command.executed"
  6334. },
  6335. "properties": {
  6336. "type": "object",
  6337. "properties": {
  6338. "name": {
  6339. "type": "string"
  6340. },
  6341. "sessionID": {
  6342. "type": "string",
  6343. "pattern": "^ses.*"
  6344. },
  6345. "arguments": {
  6346. "type": "string"
  6347. },
  6348. "messageID": {
  6349. "type": "string",
  6350. "pattern": "^msg.*"
  6351. }
  6352. },
  6353. "required": ["name", "sessionID", "arguments", "messageID"]
  6354. }
  6355. },
  6356. "required": ["type", "properties"]
  6357. },
  6358. "Session": {
  6359. "type": "object",
  6360. "properties": {
  6361. "id": {
  6362. "type": "string",
  6363. "pattern": "^ses.*"
  6364. },
  6365. "projectID": {
  6366. "type": "string"
  6367. },
  6368. "directory": {
  6369. "type": "string"
  6370. },
  6371. "parentID": {
  6372. "type": "string",
  6373. "pattern": "^ses.*"
  6374. },
  6375. "summary": {
  6376. "type": "object",
  6377. "properties": {
  6378. "additions": {
  6379. "type": "number"
  6380. },
  6381. "deletions": {
  6382. "type": "number"
  6383. },
  6384. "files": {
  6385. "type": "number"
  6386. },
  6387. "diffs": {
  6388. "type": "array",
  6389. "items": {
  6390. "$ref": "#/components/schemas/FileDiff"
  6391. }
  6392. }
  6393. },
  6394. "required": ["additions", "deletions", "files"]
  6395. },
  6396. "share": {
  6397. "type": "object",
  6398. "properties": {
  6399. "url": {
  6400. "type": "string"
  6401. }
  6402. },
  6403. "required": ["url"]
  6404. },
  6405. "title": {
  6406. "type": "string"
  6407. },
  6408. "version": {
  6409. "type": "string"
  6410. },
  6411. "time": {
  6412. "type": "object",
  6413. "properties": {
  6414. "created": {
  6415. "type": "number"
  6416. },
  6417. "updated": {
  6418. "type": "number"
  6419. },
  6420. "compacting": {
  6421. "type": "number"
  6422. },
  6423. "archived": {
  6424. "type": "number"
  6425. }
  6426. },
  6427. "required": ["created", "updated"]
  6428. },
  6429. "revert": {
  6430. "type": "object",
  6431. "properties": {
  6432. "messageID": {
  6433. "type": "string"
  6434. },
  6435. "partID": {
  6436. "type": "string"
  6437. },
  6438. "snapshot": {
  6439. "type": "string"
  6440. },
  6441. "diff": {
  6442. "type": "string"
  6443. }
  6444. },
  6445. "required": ["messageID"]
  6446. }
  6447. },
  6448. "required": ["id", "projectID", "directory", "title", "version", "time"]
  6449. },
  6450. "Event.session.created": {
  6451. "type": "object",
  6452. "properties": {
  6453. "type": {
  6454. "type": "string",
  6455. "const": "session.created"
  6456. },
  6457. "properties": {
  6458. "type": "object",
  6459. "properties": {
  6460. "info": {
  6461. "$ref": "#/components/schemas/Session"
  6462. }
  6463. },
  6464. "required": ["info"]
  6465. }
  6466. },
  6467. "required": ["type", "properties"]
  6468. },
  6469. "Event.session.updated": {
  6470. "type": "object",
  6471. "properties": {
  6472. "type": {
  6473. "type": "string",
  6474. "const": "session.updated"
  6475. },
  6476. "properties": {
  6477. "type": "object",
  6478. "properties": {
  6479. "info": {
  6480. "$ref": "#/components/schemas/Session"
  6481. }
  6482. },
  6483. "required": ["info"]
  6484. }
  6485. },
  6486. "required": ["type", "properties"]
  6487. },
  6488. "Event.session.deleted": {
  6489. "type": "object",
  6490. "properties": {
  6491. "type": {
  6492. "type": "string",
  6493. "const": "session.deleted"
  6494. },
  6495. "properties": {
  6496. "type": "object",
  6497. "properties": {
  6498. "info": {
  6499. "$ref": "#/components/schemas/Session"
  6500. }
  6501. },
  6502. "required": ["info"]
  6503. }
  6504. },
  6505. "required": ["type", "properties"]
  6506. },
  6507. "Event.session.diff": {
  6508. "type": "object",
  6509. "properties": {
  6510. "type": {
  6511. "type": "string",
  6512. "const": "session.diff"
  6513. },
  6514. "properties": {
  6515. "type": "object",
  6516. "properties": {
  6517. "sessionID": {
  6518. "type": "string"
  6519. },
  6520. "diff": {
  6521. "type": "array",
  6522. "items": {
  6523. "$ref": "#/components/schemas/FileDiff"
  6524. }
  6525. }
  6526. },
  6527. "required": ["sessionID", "diff"]
  6528. }
  6529. },
  6530. "required": ["type", "properties"]
  6531. },
  6532. "Event.session.error": {
  6533. "type": "object",
  6534. "properties": {
  6535. "type": {
  6536. "type": "string",
  6537. "const": "session.error"
  6538. },
  6539. "properties": {
  6540. "type": "object",
  6541. "properties": {
  6542. "sessionID": {
  6543. "type": "string"
  6544. },
  6545. "error": {
  6546. "anyOf": [
  6547. {
  6548. "$ref": "#/components/schemas/ProviderAuthError"
  6549. },
  6550. {
  6551. "$ref": "#/components/schemas/UnknownError"
  6552. },
  6553. {
  6554. "$ref": "#/components/schemas/MessageOutputLengthError"
  6555. },
  6556. {
  6557. "$ref": "#/components/schemas/MessageAbortedError"
  6558. },
  6559. {
  6560. "$ref": "#/components/schemas/APIError"
  6561. }
  6562. ]
  6563. }
  6564. }
  6565. }
  6566. },
  6567. "required": ["type", "properties"]
  6568. },
  6569. "Event.file.watcher.updated": {
  6570. "type": "object",
  6571. "properties": {
  6572. "type": {
  6573. "type": "string",
  6574. "const": "file.watcher.updated"
  6575. },
  6576. "properties": {
  6577. "type": "object",
  6578. "properties": {
  6579. "file": {
  6580. "type": "string"
  6581. },
  6582. "event": {
  6583. "anyOf": [
  6584. {
  6585. "type": "string",
  6586. "const": "add"
  6587. },
  6588. {
  6589. "type": "string",
  6590. "const": "change"
  6591. },
  6592. {
  6593. "type": "string",
  6594. "const": "unlink"
  6595. }
  6596. ]
  6597. }
  6598. },
  6599. "required": ["file", "event"]
  6600. }
  6601. },
  6602. "required": ["type", "properties"]
  6603. },
  6604. "Event.vcs.branch.updated": {
  6605. "type": "object",
  6606. "properties": {
  6607. "type": {
  6608. "type": "string",
  6609. "const": "vcs.branch.updated"
  6610. },
  6611. "properties": {
  6612. "type": "object",
  6613. "properties": {
  6614. "branch": {
  6615. "type": "string"
  6616. }
  6617. }
  6618. }
  6619. },
  6620. "required": ["type", "properties"]
  6621. },
  6622. "Event.tui.prompt.append": {
  6623. "type": "object",
  6624. "properties": {
  6625. "type": {
  6626. "type": "string",
  6627. "const": "tui.prompt.append"
  6628. },
  6629. "properties": {
  6630. "type": "object",
  6631. "properties": {
  6632. "text": {
  6633. "type": "string"
  6634. }
  6635. },
  6636. "required": ["text"]
  6637. }
  6638. },
  6639. "required": ["type", "properties"]
  6640. },
  6641. "Event.tui.command.execute": {
  6642. "type": "object",
  6643. "properties": {
  6644. "type": {
  6645. "type": "string",
  6646. "const": "tui.command.execute"
  6647. },
  6648. "properties": {
  6649. "type": "object",
  6650. "properties": {
  6651. "command": {
  6652. "anyOf": [
  6653. {
  6654. "type": "string",
  6655. "enum": [
  6656. "session.list",
  6657. "session.new",
  6658. "session.share",
  6659. "session.interrupt",
  6660. "session.compact",
  6661. "session.page.up",
  6662. "session.page.down",
  6663. "session.half.page.up",
  6664. "session.half.page.down",
  6665. "session.first",
  6666. "session.last",
  6667. "prompt.clear",
  6668. "prompt.submit",
  6669. "agent.cycle"
  6670. ]
  6671. },
  6672. {
  6673. "type": "string"
  6674. }
  6675. ]
  6676. }
  6677. },
  6678. "required": ["command"]
  6679. }
  6680. },
  6681. "required": ["type", "properties"]
  6682. },
  6683. "Event.tui.toast.show": {
  6684. "type": "object",
  6685. "properties": {
  6686. "type": {
  6687. "type": "string",
  6688. "const": "tui.toast.show"
  6689. },
  6690. "properties": {
  6691. "type": "object",
  6692. "properties": {
  6693. "title": {
  6694. "type": "string"
  6695. },
  6696. "message": {
  6697. "type": "string"
  6698. },
  6699. "variant": {
  6700. "type": "string",
  6701. "enum": ["info", "success", "warning", "error"]
  6702. },
  6703. "duration": {
  6704. "description": "Duration in milliseconds",
  6705. "default": 5000,
  6706. "type": "number"
  6707. }
  6708. },
  6709. "required": ["message", "variant"]
  6710. }
  6711. },
  6712. "required": ["type", "properties"]
  6713. },
  6714. "Pty": {
  6715. "type": "object",
  6716. "properties": {
  6717. "id": {
  6718. "type": "string",
  6719. "pattern": "^pty.*"
  6720. },
  6721. "title": {
  6722. "type": "string"
  6723. },
  6724. "command": {
  6725. "type": "string"
  6726. },
  6727. "args": {
  6728. "type": "array",
  6729. "items": {
  6730. "type": "string"
  6731. }
  6732. },
  6733. "cwd": {
  6734. "type": "string"
  6735. },
  6736. "status": {
  6737. "type": "string",
  6738. "enum": ["running", "exited"]
  6739. },
  6740. "pid": {
  6741. "type": "number"
  6742. }
  6743. },
  6744. "required": ["id", "title", "command", "args", "cwd", "status", "pid"]
  6745. },
  6746. "Event.pty.created": {
  6747. "type": "object",
  6748. "properties": {
  6749. "type": {
  6750. "type": "string",
  6751. "const": "pty.created"
  6752. },
  6753. "properties": {
  6754. "type": "object",
  6755. "properties": {
  6756. "info": {
  6757. "$ref": "#/components/schemas/Pty"
  6758. }
  6759. },
  6760. "required": ["info"]
  6761. }
  6762. },
  6763. "required": ["type", "properties"]
  6764. },
  6765. "Event.pty.updated": {
  6766. "type": "object",
  6767. "properties": {
  6768. "type": {
  6769. "type": "string",
  6770. "const": "pty.updated"
  6771. },
  6772. "properties": {
  6773. "type": "object",
  6774. "properties": {
  6775. "info": {
  6776. "$ref": "#/components/schemas/Pty"
  6777. }
  6778. },
  6779. "required": ["info"]
  6780. }
  6781. },
  6782. "required": ["type", "properties"]
  6783. },
  6784. "Event.pty.exited": {
  6785. "type": "object",
  6786. "properties": {
  6787. "type": {
  6788. "type": "string",
  6789. "const": "pty.exited"
  6790. },
  6791. "properties": {
  6792. "type": "object",
  6793. "properties": {
  6794. "id": {
  6795. "type": "string",
  6796. "pattern": "^pty.*"
  6797. },
  6798. "exitCode": {
  6799. "type": "number"
  6800. }
  6801. },
  6802. "required": ["id", "exitCode"]
  6803. }
  6804. },
  6805. "required": ["type", "properties"]
  6806. },
  6807. "Event.pty.deleted": {
  6808. "type": "object",
  6809. "properties": {
  6810. "type": {
  6811. "type": "string",
  6812. "const": "pty.deleted"
  6813. },
  6814. "properties": {
  6815. "type": "object",
  6816. "properties": {
  6817. "id": {
  6818. "type": "string",
  6819. "pattern": "^pty.*"
  6820. }
  6821. },
  6822. "required": ["id"]
  6823. }
  6824. },
  6825. "required": ["type", "properties"]
  6826. },
  6827. "Event.server.connected": {
  6828. "type": "object",
  6829. "properties": {
  6830. "type": {
  6831. "type": "string",
  6832. "const": "server.connected"
  6833. },
  6834. "properties": {
  6835. "type": "object",
  6836. "properties": {}
  6837. }
  6838. },
  6839. "required": ["type", "properties"]
  6840. },
  6841. "Event.global.disposed": {
  6842. "type": "object",
  6843. "properties": {
  6844. "type": {
  6845. "type": "string",
  6846. "const": "global.disposed"
  6847. },
  6848. "properties": {
  6849. "type": "object",
  6850. "properties": {}
  6851. }
  6852. },
  6853. "required": ["type", "properties"]
  6854. },
  6855. "Event": {
  6856. "anyOf": [
  6857. {
  6858. "$ref": "#/components/schemas/Event.installation.updated"
  6859. },
  6860. {
  6861. "$ref": "#/components/schemas/Event.installation.update-available"
  6862. },
  6863. {
  6864. "$ref": "#/components/schemas/Event.project.updated"
  6865. },
  6866. {
  6867. "$ref": "#/components/schemas/Event.server.instance.disposed"
  6868. },
  6869. {
  6870. "$ref": "#/components/schemas/Event.lsp.client.diagnostics"
  6871. },
  6872. {
  6873. "$ref": "#/components/schemas/Event.lsp.updated"
  6874. },
  6875. {
  6876. "$ref": "#/components/schemas/Event.message.updated"
  6877. },
  6878. {
  6879. "$ref": "#/components/schemas/Event.message.removed"
  6880. },
  6881. {
  6882. "$ref": "#/components/schemas/Event.message.part.updated"
  6883. },
  6884. {
  6885. "$ref": "#/components/schemas/Event.message.part.removed"
  6886. },
  6887. {
  6888. "$ref": "#/components/schemas/Event.permission.updated"
  6889. },
  6890. {
  6891. "$ref": "#/components/schemas/Event.permission.replied"
  6892. },
  6893. {
  6894. "$ref": "#/components/schemas/Event.file.edited"
  6895. },
  6896. {
  6897. "$ref": "#/components/schemas/Event.todo.updated"
  6898. },
  6899. {
  6900. "$ref": "#/components/schemas/Event.session.status"
  6901. },
  6902. {
  6903. "$ref": "#/components/schemas/Event.session.idle"
  6904. },
  6905. {
  6906. "$ref": "#/components/schemas/Event.session.compacted"
  6907. },
  6908. {
  6909. "$ref": "#/components/schemas/Event.command.executed"
  6910. },
  6911. {
  6912. "$ref": "#/components/schemas/Event.session.created"
  6913. },
  6914. {
  6915. "$ref": "#/components/schemas/Event.session.updated"
  6916. },
  6917. {
  6918. "$ref": "#/components/schemas/Event.session.deleted"
  6919. },
  6920. {
  6921. "$ref": "#/components/schemas/Event.session.diff"
  6922. },
  6923. {
  6924. "$ref": "#/components/schemas/Event.session.error"
  6925. },
  6926. {
  6927. "$ref": "#/components/schemas/Event.file.watcher.updated"
  6928. },
  6929. {
  6930. "$ref": "#/components/schemas/Event.vcs.branch.updated"
  6931. },
  6932. {
  6933. "$ref": "#/components/schemas/Event.tui.prompt.append"
  6934. },
  6935. {
  6936. "$ref": "#/components/schemas/Event.tui.command.execute"
  6937. },
  6938. {
  6939. "$ref": "#/components/schemas/Event.tui.toast.show"
  6940. },
  6941. {
  6942. "$ref": "#/components/schemas/Event.pty.created"
  6943. },
  6944. {
  6945. "$ref": "#/components/schemas/Event.pty.updated"
  6946. },
  6947. {
  6948. "$ref": "#/components/schemas/Event.pty.exited"
  6949. },
  6950. {
  6951. "$ref": "#/components/schemas/Event.pty.deleted"
  6952. },
  6953. {
  6954. "$ref": "#/components/schemas/Event.server.connected"
  6955. },
  6956. {
  6957. "$ref": "#/components/schemas/Event.global.disposed"
  6958. }
  6959. ]
  6960. },
  6961. "GlobalEvent": {
  6962. "type": "object",
  6963. "properties": {
  6964. "directory": {
  6965. "type": "string"
  6966. },
  6967. "payload": {
  6968. "$ref": "#/components/schemas/Event"
  6969. }
  6970. },
  6971. "required": ["directory", "payload"]
  6972. },
  6973. "BadRequestError": {
  6974. "type": "object",
  6975. "properties": {
  6976. "data": {},
  6977. "errors": {
  6978. "type": "array",
  6979. "items": {
  6980. "type": "object",
  6981. "propertyNames": {
  6982. "type": "string"
  6983. },
  6984. "additionalProperties": {}
  6985. }
  6986. },
  6987. "success": {
  6988. "type": "boolean",
  6989. "const": false
  6990. }
  6991. },
  6992. "required": ["data", "errors", "success"]
  6993. },
  6994. "NotFoundError": {
  6995. "type": "object",
  6996. "properties": {
  6997. "name": {
  6998. "type": "string",
  6999. "const": "NotFoundError"
  7000. },
  7001. "data": {
  7002. "type": "object",
  7003. "properties": {
  7004. "message": {
  7005. "type": "string"
  7006. }
  7007. },
  7008. "required": ["message"]
  7009. }
  7010. },
  7011. "required": ["name", "data"]
  7012. },
  7013. "KeybindsConfig": {
  7014. "description": "Custom keybind configurations",
  7015. "type": "object",
  7016. "properties": {
  7017. "leader": {
  7018. "description": "Leader key for keybind combinations",
  7019. "default": "ctrl+x",
  7020. "type": "string"
  7021. },
  7022. "app_exit": {
  7023. "description": "Exit the application",
  7024. "default": "ctrl+c,ctrl+d,<leader>q",
  7025. "type": "string"
  7026. },
  7027. "editor_open": {
  7028. "description": "Open external editor",
  7029. "default": "<leader>e",
  7030. "type": "string"
  7031. },
  7032. "theme_list": {
  7033. "description": "List available themes",
  7034. "default": "<leader>t",
  7035. "type": "string"
  7036. },
  7037. "sidebar_toggle": {
  7038. "description": "Toggle sidebar",
  7039. "default": "<leader>b",
  7040. "type": "string"
  7041. },
  7042. "scrollbar_toggle": {
  7043. "description": "Toggle session scrollbar",
  7044. "default": "none",
  7045. "type": "string"
  7046. },
  7047. "username_toggle": {
  7048. "description": "Toggle username visibility",
  7049. "default": "none",
  7050. "type": "string"
  7051. },
  7052. "status_view": {
  7053. "description": "View status",
  7054. "default": "<leader>s",
  7055. "type": "string"
  7056. },
  7057. "session_export": {
  7058. "description": "Export session to editor",
  7059. "default": "<leader>x",
  7060. "type": "string"
  7061. },
  7062. "session_new": {
  7063. "description": "Create a new session",
  7064. "default": "<leader>n",
  7065. "type": "string"
  7066. },
  7067. "session_list": {
  7068. "description": "List all sessions",
  7069. "default": "<leader>l",
  7070. "type": "string"
  7071. },
  7072. "session_timeline": {
  7073. "description": "Show session timeline",
  7074. "default": "<leader>g",
  7075. "type": "string"
  7076. },
  7077. "session_share": {
  7078. "description": "Share current session",
  7079. "default": "none",
  7080. "type": "string"
  7081. },
  7082. "session_unshare": {
  7083. "description": "Unshare current session",
  7084. "default": "none",
  7085. "type": "string"
  7086. },
  7087. "session_interrupt": {
  7088. "description": "Interrupt current session",
  7089. "default": "escape",
  7090. "type": "string"
  7091. },
  7092. "session_compact": {
  7093. "description": "Compact the session",
  7094. "default": "<leader>c",
  7095. "type": "string"
  7096. },
  7097. "messages_page_up": {
  7098. "description": "Scroll messages up by one page",
  7099. "default": "pageup",
  7100. "type": "string"
  7101. },
  7102. "messages_page_down": {
  7103. "description": "Scroll messages down by one page",
  7104. "default": "pagedown",
  7105. "type": "string"
  7106. },
  7107. "messages_half_page_up": {
  7108. "description": "Scroll messages up by half page",
  7109. "default": "ctrl+alt+u",
  7110. "type": "string"
  7111. },
  7112. "messages_half_page_down": {
  7113. "description": "Scroll messages down by half page",
  7114. "default": "ctrl+alt+d",
  7115. "type": "string"
  7116. },
  7117. "messages_first": {
  7118. "description": "Navigate to first message",
  7119. "default": "ctrl+g,home",
  7120. "type": "string"
  7121. },
  7122. "messages_last": {
  7123. "description": "Navigate to last message",
  7124. "default": "ctrl+alt+g,end",
  7125. "type": "string"
  7126. },
  7127. "messages_last_user": {
  7128. "description": "Navigate to last user message",
  7129. "default": "none",
  7130. "type": "string"
  7131. },
  7132. "messages_copy": {
  7133. "description": "Copy message",
  7134. "default": "<leader>y",
  7135. "type": "string"
  7136. },
  7137. "messages_undo": {
  7138. "description": "Undo message",
  7139. "default": "<leader>u",
  7140. "type": "string"
  7141. },
  7142. "messages_redo": {
  7143. "description": "Redo message",
  7144. "default": "<leader>r",
  7145. "type": "string"
  7146. },
  7147. "messages_toggle_conceal": {
  7148. "description": "Toggle code block concealment in messages",
  7149. "default": "<leader>h",
  7150. "type": "string"
  7151. },
  7152. "tool_details": {
  7153. "description": "Toggle tool details visibility",
  7154. "default": "none",
  7155. "type": "string"
  7156. },
  7157. "model_list": {
  7158. "description": "List available models",
  7159. "default": "<leader>m",
  7160. "type": "string"
  7161. },
  7162. "model_cycle_recent": {
  7163. "description": "Next recently used model",
  7164. "default": "f2",
  7165. "type": "string"
  7166. },
  7167. "model_cycle_recent_reverse": {
  7168. "description": "Previous recently used model",
  7169. "default": "shift+f2",
  7170. "type": "string"
  7171. },
  7172. "model_cycle_favorite": {
  7173. "description": "Next favorite model",
  7174. "default": "none",
  7175. "type": "string"
  7176. },
  7177. "model_cycle_favorite_reverse": {
  7178. "description": "Previous favorite model",
  7179. "default": "none",
  7180. "type": "string"
  7181. },
  7182. "command_list": {
  7183. "description": "List available commands",
  7184. "default": "ctrl+p",
  7185. "type": "string"
  7186. },
  7187. "agent_list": {
  7188. "description": "List agents",
  7189. "default": "<leader>a",
  7190. "type": "string"
  7191. },
  7192. "agent_cycle": {
  7193. "description": "Next agent",
  7194. "default": "tab",
  7195. "type": "string"
  7196. },
  7197. "agent_cycle_reverse": {
  7198. "description": "Previous agent",
  7199. "default": "shift+tab",
  7200. "type": "string"
  7201. },
  7202. "input_clear": {
  7203. "description": "Clear input field",
  7204. "default": "ctrl+c",
  7205. "type": "string"
  7206. },
  7207. "input_paste": {
  7208. "description": "Paste from clipboard",
  7209. "default": "ctrl+v",
  7210. "type": "string"
  7211. },
  7212. "input_submit": {
  7213. "description": "Submit input",
  7214. "default": "return",
  7215. "type": "string"
  7216. },
  7217. "input_newline": {
  7218. "description": "Insert newline in input",
  7219. "default": "shift+return,ctrl+return,alt+return,ctrl+j",
  7220. "type": "string"
  7221. },
  7222. "input_move_left": {
  7223. "description": "Move cursor left in input",
  7224. "default": "left,ctrl+b",
  7225. "type": "string"
  7226. },
  7227. "input_move_right": {
  7228. "description": "Move cursor right in input",
  7229. "default": "right,ctrl+f",
  7230. "type": "string"
  7231. },
  7232. "input_move_up": {
  7233. "description": "Move cursor up in input",
  7234. "default": "up",
  7235. "type": "string"
  7236. },
  7237. "input_move_down": {
  7238. "description": "Move cursor down in input",
  7239. "default": "down",
  7240. "type": "string"
  7241. },
  7242. "input_select_left": {
  7243. "description": "Select left in input",
  7244. "default": "shift+left",
  7245. "type": "string"
  7246. },
  7247. "input_select_right": {
  7248. "description": "Select right in input",
  7249. "default": "shift+right",
  7250. "type": "string"
  7251. },
  7252. "input_select_up": {
  7253. "description": "Select up in input",
  7254. "default": "shift+up",
  7255. "type": "string"
  7256. },
  7257. "input_select_down": {
  7258. "description": "Select down in input",
  7259. "default": "shift+down",
  7260. "type": "string"
  7261. },
  7262. "input_line_home": {
  7263. "description": "Move to start of line in input",
  7264. "default": "ctrl+a",
  7265. "type": "string"
  7266. },
  7267. "input_line_end": {
  7268. "description": "Move to end of line in input",
  7269. "default": "ctrl+e",
  7270. "type": "string"
  7271. },
  7272. "input_select_line_home": {
  7273. "description": "Select to start of line in input",
  7274. "default": "ctrl+shift+a",
  7275. "type": "string"
  7276. },
  7277. "input_select_line_end": {
  7278. "description": "Select to end of line in input",
  7279. "default": "ctrl+shift+e",
  7280. "type": "string"
  7281. },
  7282. "input_visual_line_home": {
  7283. "description": "Move to start of visual line in input",
  7284. "default": "alt+a",
  7285. "type": "string"
  7286. },
  7287. "input_visual_line_end": {
  7288. "description": "Move to end of visual line in input",
  7289. "default": "alt+e",
  7290. "type": "string"
  7291. },
  7292. "input_select_visual_line_home": {
  7293. "description": "Select to start of visual line in input",
  7294. "default": "alt+shift+a",
  7295. "type": "string"
  7296. },
  7297. "input_select_visual_line_end": {
  7298. "description": "Select to end of visual line in input",
  7299. "default": "alt+shift+e",
  7300. "type": "string"
  7301. },
  7302. "input_buffer_home": {
  7303. "description": "Move to start of buffer in input",
  7304. "default": "home",
  7305. "type": "string"
  7306. },
  7307. "input_buffer_end": {
  7308. "description": "Move to end of buffer in input",
  7309. "default": "end",
  7310. "type": "string"
  7311. },
  7312. "input_select_buffer_home": {
  7313. "description": "Select to start of buffer in input",
  7314. "default": "shift+home",
  7315. "type": "string"
  7316. },
  7317. "input_select_buffer_end": {
  7318. "description": "Select to end of buffer in input",
  7319. "default": "shift+end",
  7320. "type": "string"
  7321. },
  7322. "input_delete_line": {
  7323. "description": "Delete line in input",
  7324. "default": "ctrl+shift+d",
  7325. "type": "string"
  7326. },
  7327. "input_delete_to_line_end": {
  7328. "description": "Delete to end of line in input",
  7329. "default": "ctrl+k",
  7330. "type": "string"
  7331. },
  7332. "input_delete_to_line_start": {
  7333. "description": "Delete to start of line in input",
  7334. "default": "ctrl+u",
  7335. "type": "string"
  7336. },
  7337. "input_backspace": {
  7338. "description": "Backspace in input",
  7339. "default": "backspace,shift+backspace",
  7340. "type": "string"
  7341. },
  7342. "input_delete": {
  7343. "description": "Delete character in input",
  7344. "default": "ctrl+d,delete,shift+delete",
  7345. "type": "string"
  7346. },
  7347. "input_undo": {
  7348. "description": "Undo in input",
  7349. "default": "ctrl+-,super+z",
  7350. "type": "string"
  7351. },
  7352. "input_redo": {
  7353. "description": "Redo in input",
  7354. "default": "ctrl+.,super+shift+z",
  7355. "type": "string"
  7356. },
  7357. "input_word_forward": {
  7358. "description": "Move word forward in input",
  7359. "default": "alt+f,alt+right,ctrl+right",
  7360. "type": "string"
  7361. },
  7362. "input_word_backward": {
  7363. "description": "Move word backward in input",
  7364. "default": "alt+b,alt+left,ctrl+left",
  7365. "type": "string"
  7366. },
  7367. "input_select_word_forward": {
  7368. "description": "Select word forward in input",
  7369. "default": "alt+shift+f,alt+shift+right",
  7370. "type": "string"
  7371. },
  7372. "input_select_word_backward": {
  7373. "description": "Select word backward in input",
  7374. "default": "alt+shift+b,alt+shift+left",
  7375. "type": "string"
  7376. },
  7377. "input_delete_word_forward": {
  7378. "description": "Delete word forward in input",
  7379. "default": "alt+d,alt+delete,ctrl+delete",
  7380. "type": "string"
  7381. },
  7382. "input_delete_word_backward": {
  7383. "description": "Delete word backward in input",
  7384. "default": "ctrl+w,ctrl+backspace,alt+backspace",
  7385. "type": "string"
  7386. },
  7387. "history_previous": {
  7388. "description": "Previous history item",
  7389. "default": "up",
  7390. "type": "string"
  7391. },
  7392. "history_next": {
  7393. "description": "Next history item",
  7394. "default": "down",
  7395. "type": "string"
  7396. },
  7397. "session_child_cycle": {
  7398. "description": "Next child session",
  7399. "default": "<leader>right",
  7400. "type": "string"
  7401. },
  7402. "session_child_cycle_reverse": {
  7403. "description": "Previous child session",
  7404. "default": "<leader>left",
  7405. "type": "string"
  7406. },
  7407. "terminal_suspend": {
  7408. "description": "Suspend terminal",
  7409. "default": "ctrl+z",
  7410. "type": "string"
  7411. }
  7412. },
  7413. "additionalProperties": false
  7414. },
  7415. "AgentConfig": {
  7416. "type": "object",
  7417. "properties": {
  7418. "model": {
  7419. "type": "string"
  7420. },
  7421. "temperature": {
  7422. "type": "number"
  7423. },
  7424. "top_p": {
  7425. "type": "number"
  7426. },
  7427. "prompt": {
  7428. "type": "string"
  7429. },
  7430. "tools": {
  7431. "type": "object",
  7432. "propertyNames": {
  7433. "type": "string"
  7434. },
  7435. "additionalProperties": {
  7436. "type": "boolean"
  7437. }
  7438. },
  7439. "disable": {
  7440. "type": "boolean"
  7441. },
  7442. "description": {
  7443. "description": "Description of when to use the agent",
  7444. "type": "string"
  7445. },
  7446. "mode": {
  7447. "type": "string",
  7448. "enum": ["subagent", "primary", "all"]
  7449. },
  7450. "color": {
  7451. "description": "Hex color code for the agent (e.g., #FF5733)",
  7452. "type": "string",
  7453. "pattern": "^#[0-9a-fA-F]{6}$"
  7454. },
  7455. "maxSteps": {
  7456. "description": "Maximum number of agentic iterations before forcing text-only response",
  7457. "type": "integer",
  7458. "exclusiveMinimum": 0,
  7459. "maximum": 9007199254740991
  7460. },
  7461. "permission": {
  7462. "type": "object",
  7463. "properties": {
  7464. "edit": {
  7465. "type": "string",
  7466. "enum": ["ask", "allow", "deny"]
  7467. },
  7468. "bash": {
  7469. "anyOf": [
  7470. {
  7471. "type": "string",
  7472. "enum": ["ask", "allow", "deny"]
  7473. },
  7474. {
  7475. "type": "object",
  7476. "propertyNames": {
  7477. "type": "string"
  7478. },
  7479. "additionalProperties": {
  7480. "type": "string",
  7481. "enum": ["ask", "allow", "deny"]
  7482. }
  7483. }
  7484. ]
  7485. },
  7486. "webfetch": {
  7487. "type": "string",
  7488. "enum": ["ask", "allow", "deny"]
  7489. },
  7490. "doom_loop": {
  7491. "type": "string",
  7492. "enum": ["ask", "allow", "deny"]
  7493. },
  7494. "external_directory": {
  7495. "type": "string",
  7496. "enum": ["ask", "allow", "deny"]
  7497. }
  7498. }
  7499. }
  7500. },
  7501. "additionalProperties": {}
  7502. },
  7503. "ProviderConfig": {
  7504. "type": "object",
  7505. "properties": {
  7506. "api": {
  7507. "type": "string"
  7508. },
  7509. "name": {
  7510. "type": "string"
  7511. },
  7512. "env": {
  7513. "type": "array",
  7514. "items": {
  7515. "type": "string"
  7516. }
  7517. },
  7518. "id": {
  7519. "type": "string"
  7520. },
  7521. "npm": {
  7522. "type": "string"
  7523. },
  7524. "models": {
  7525. "type": "object",
  7526. "propertyNames": {
  7527. "type": "string"
  7528. },
  7529. "additionalProperties": {
  7530. "type": "object",
  7531. "properties": {
  7532. "id": {
  7533. "type": "string"
  7534. },
  7535. "name": {
  7536. "type": "string"
  7537. },
  7538. "family": {
  7539. "type": "string"
  7540. },
  7541. "release_date": {
  7542. "type": "string"
  7543. },
  7544. "attachment": {
  7545. "type": "boolean"
  7546. },
  7547. "reasoning": {
  7548. "type": "boolean"
  7549. },
  7550. "temperature": {
  7551. "type": "boolean"
  7552. },
  7553. "tool_call": {
  7554. "type": "boolean"
  7555. },
  7556. "interleaved": {
  7557. "anyOf": [
  7558. {
  7559. "type": "boolean",
  7560. "const": true
  7561. },
  7562. {
  7563. "type": "object",
  7564. "properties": {
  7565. "field": {
  7566. "type": "string",
  7567. "enum": ["reasoning_content", "reasoning_details"]
  7568. }
  7569. },
  7570. "required": ["field"],
  7571. "additionalProperties": false
  7572. }
  7573. ]
  7574. },
  7575. "cost": {
  7576. "type": "object",
  7577. "properties": {
  7578. "input": {
  7579. "type": "number"
  7580. },
  7581. "output": {
  7582. "type": "number"
  7583. },
  7584. "cache_read": {
  7585. "type": "number"
  7586. },
  7587. "cache_write": {
  7588. "type": "number"
  7589. },
  7590. "context_over_200k": {
  7591. "type": "object",
  7592. "properties": {
  7593. "input": {
  7594. "type": "number"
  7595. },
  7596. "output": {
  7597. "type": "number"
  7598. },
  7599. "cache_read": {
  7600. "type": "number"
  7601. },
  7602. "cache_write": {
  7603. "type": "number"
  7604. }
  7605. },
  7606. "required": ["input", "output"]
  7607. }
  7608. },
  7609. "required": ["input", "output"]
  7610. },
  7611. "limit": {
  7612. "type": "object",
  7613. "properties": {
  7614. "context": {
  7615. "type": "number"
  7616. },
  7617. "output": {
  7618. "type": "number"
  7619. }
  7620. },
  7621. "required": ["context", "output"]
  7622. },
  7623. "modalities": {
  7624. "type": "object",
  7625. "properties": {
  7626. "input": {
  7627. "type": "array",
  7628. "items": {
  7629. "type": "string",
  7630. "enum": ["text", "audio", "image", "video", "pdf"]
  7631. }
  7632. },
  7633. "output": {
  7634. "type": "array",
  7635. "items": {
  7636. "type": "string",
  7637. "enum": ["text", "audio", "image", "video", "pdf"]
  7638. }
  7639. }
  7640. },
  7641. "required": ["input", "output"]
  7642. },
  7643. "experimental": {
  7644. "type": "boolean"
  7645. },
  7646. "status": {
  7647. "type": "string",
  7648. "enum": ["alpha", "beta", "deprecated"]
  7649. },
  7650. "options": {
  7651. "type": "object",
  7652. "propertyNames": {
  7653. "type": "string"
  7654. },
  7655. "additionalProperties": {}
  7656. },
  7657. "headers": {
  7658. "type": "object",
  7659. "propertyNames": {
  7660. "type": "string"
  7661. },
  7662. "additionalProperties": {
  7663. "type": "string"
  7664. }
  7665. },
  7666. "provider": {
  7667. "type": "object",
  7668. "properties": {
  7669. "npm": {
  7670. "type": "string"
  7671. }
  7672. },
  7673. "required": ["npm"]
  7674. }
  7675. }
  7676. }
  7677. },
  7678. "whitelist": {
  7679. "type": "array",
  7680. "items": {
  7681. "type": "string"
  7682. }
  7683. },
  7684. "blacklist": {
  7685. "type": "array",
  7686. "items": {
  7687. "type": "string"
  7688. }
  7689. },
  7690. "options": {
  7691. "type": "object",
  7692. "properties": {
  7693. "apiKey": {
  7694. "type": "string"
  7695. },
  7696. "baseURL": {
  7697. "type": "string"
  7698. },
  7699. "enterpriseUrl": {
  7700. "description": "GitHub Enterprise URL for copilot authentication",
  7701. "type": "string"
  7702. },
  7703. "setCacheKey": {
  7704. "description": "Enable promptCacheKey for this provider (default false)",
  7705. "type": "boolean"
  7706. },
  7707. "timeout": {
  7708. "description": "Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout.",
  7709. "anyOf": [
  7710. {
  7711. "description": "Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout.",
  7712. "type": "integer",
  7713. "exclusiveMinimum": 0,
  7714. "maximum": 9007199254740991
  7715. },
  7716. {
  7717. "description": "Disable timeout for this provider entirely.",
  7718. "type": "boolean",
  7719. "const": false
  7720. }
  7721. ]
  7722. }
  7723. },
  7724. "additionalProperties": {}
  7725. }
  7726. },
  7727. "additionalProperties": false
  7728. },
  7729. "McpLocalConfig": {
  7730. "type": "object",
  7731. "properties": {
  7732. "type": {
  7733. "description": "Type of MCP server connection",
  7734. "type": "string",
  7735. "const": "local"
  7736. },
  7737. "command": {
  7738. "description": "Command and arguments to run the MCP server",
  7739. "type": "array",
  7740. "items": {
  7741. "type": "string"
  7742. }
  7743. },
  7744. "environment": {
  7745. "description": "Environment variables to set when running the MCP server",
  7746. "type": "object",
  7747. "propertyNames": {
  7748. "type": "string"
  7749. },
  7750. "additionalProperties": {
  7751. "type": "string"
  7752. }
  7753. },
  7754. "enabled": {
  7755. "description": "Enable or disable the MCP server on startup",
  7756. "type": "boolean"
  7757. },
  7758. "timeout": {
  7759. "description": "Timeout in ms for fetching tools from the MCP server. Defaults to 5000 (5 seconds) if not specified.",
  7760. "type": "integer",
  7761. "exclusiveMinimum": 0,
  7762. "maximum": 9007199254740991
  7763. }
  7764. },
  7765. "required": ["type", "command"],
  7766. "additionalProperties": false
  7767. },
  7768. "McpOAuthConfig": {
  7769. "type": "object",
  7770. "properties": {
  7771. "clientId": {
  7772. "description": "OAuth client ID. If not provided, dynamic client registration (RFC 7591) will be attempted.",
  7773. "type": "string"
  7774. },
  7775. "clientSecret": {
  7776. "description": "OAuth client secret (if required by the authorization server)",
  7777. "type": "string"
  7778. },
  7779. "scope": {
  7780. "description": "OAuth scopes to request during authorization",
  7781. "type": "string"
  7782. }
  7783. },
  7784. "additionalProperties": false
  7785. },
  7786. "McpRemoteConfig": {
  7787. "type": "object",
  7788. "properties": {
  7789. "type": {
  7790. "description": "Type of MCP server connection",
  7791. "type": "string",
  7792. "const": "remote"
  7793. },
  7794. "url": {
  7795. "description": "URL of the remote MCP server",
  7796. "type": "string"
  7797. },
  7798. "enabled": {
  7799. "description": "Enable or disable the MCP server on startup",
  7800. "type": "boolean"
  7801. },
  7802. "headers": {
  7803. "description": "Headers to send with the request",
  7804. "type": "object",
  7805. "propertyNames": {
  7806. "type": "string"
  7807. },
  7808. "additionalProperties": {
  7809. "type": "string"
  7810. }
  7811. },
  7812. "oauth": {
  7813. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection.",
  7814. "anyOf": [
  7815. {
  7816. "$ref": "#/components/schemas/McpOAuthConfig"
  7817. },
  7818. {
  7819. "type": "boolean",
  7820. "const": false
  7821. }
  7822. ]
  7823. },
  7824. "timeout": {
  7825. "description": "Timeout in ms for fetching tools from the MCP server. Defaults to 5000 (5 seconds) if not specified.",
  7826. "type": "integer",
  7827. "exclusiveMinimum": 0,
  7828. "maximum": 9007199254740991
  7829. }
  7830. },
  7831. "required": ["type", "url"],
  7832. "additionalProperties": false
  7833. },
  7834. "LayoutConfig": {
  7835. "description": "@deprecated Always uses stretch layout.",
  7836. "type": "string",
  7837. "enum": ["auto", "stretch"]
  7838. },
  7839. "Config": {
  7840. "type": "object",
  7841. "properties": {
  7842. "$schema": {
  7843. "description": "JSON schema reference for configuration validation",
  7844. "type": "string"
  7845. },
  7846. "theme": {
  7847. "description": "Theme name to use for the interface",
  7848. "type": "string"
  7849. },
  7850. "keybinds": {
  7851. "$ref": "#/components/schemas/KeybindsConfig"
  7852. },
  7853. "tui": {
  7854. "description": "TUI specific settings",
  7855. "type": "object",
  7856. "properties": {
  7857. "scroll_speed": {
  7858. "description": "TUI scroll speed",
  7859. "type": "number",
  7860. "minimum": 0.001
  7861. },
  7862. "scroll_acceleration": {
  7863. "description": "Scroll acceleration settings",
  7864. "type": "object",
  7865. "properties": {
  7866. "enabled": {
  7867. "description": "Enable scroll acceleration",
  7868. "type": "boolean"
  7869. }
  7870. },
  7871. "required": ["enabled"]
  7872. },
  7873. "diff_style": {
  7874. "description": "Control diff rendering style: 'auto' adapts to terminal width, 'stacked' always shows single column",
  7875. "type": "string",
  7876. "enum": ["auto", "stacked"]
  7877. }
  7878. }
  7879. },
  7880. "command": {
  7881. "description": "Command configuration, see https://opencode.ai/docs/commands",
  7882. "type": "object",
  7883. "propertyNames": {
  7884. "type": "string"
  7885. },
  7886. "additionalProperties": {
  7887. "type": "object",
  7888. "properties": {
  7889. "template": {
  7890. "type": "string"
  7891. },
  7892. "description": {
  7893. "type": "string"
  7894. },
  7895. "agent": {
  7896. "type": "string"
  7897. },
  7898. "model": {
  7899. "type": "string"
  7900. },
  7901. "subtask": {
  7902. "type": "boolean"
  7903. }
  7904. },
  7905. "required": ["template"]
  7906. }
  7907. },
  7908. "watcher": {
  7909. "type": "object",
  7910. "properties": {
  7911. "ignore": {
  7912. "type": "array",
  7913. "items": {
  7914. "type": "string"
  7915. }
  7916. }
  7917. }
  7918. },
  7919. "plugin": {
  7920. "type": "array",
  7921. "items": {
  7922. "type": "string"
  7923. }
  7924. },
  7925. "snapshot": {
  7926. "type": "boolean"
  7927. },
  7928. "share": {
  7929. "description": "Control sharing behavior:'manual' allows manual sharing via commands, 'auto' enables automatic sharing, 'disabled' disables all sharing",
  7930. "type": "string",
  7931. "enum": ["manual", "auto", "disabled"]
  7932. },
  7933. "autoshare": {
  7934. "description": "@deprecated Use 'share' field instead. Share newly created sessions automatically",
  7935. "type": "boolean"
  7936. },
  7937. "autoupdate": {
  7938. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications",
  7939. "anyOf": [
  7940. {
  7941. "type": "boolean"
  7942. },
  7943. {
  7944. "type": "string",
  7945. "const": "notify"
  7946. }
  7947. ]
  7948. },
  7949. "disabled_providers": {
  7950. "description": "Disable providers that are loaded automatically",
  7951. "type": "array",
  7952. "items": {
  7953. "type": "string"
  7954. }
  7955. },
  7956. "enabled_providers": {
  7957. "description": "When set, ONLY these providers will be enabled. All other providers will be ignored",
  7958. "type": "array",
  7959. "items": {
  7960. "type": "string"
  7961. }
  7962. },
  7963. "model": {
  7964. "description": "Model to use in the format of provider/model, eg anthropic/claude-2",
  7965. "type": "string"
  7966. },
  7967. "small_model": {
  7968. "description": "Small model to use for tasks like title generation in the format of provider/model",
  7969. "type": "string"
  7970. },
  7971. "username": {
  7972. "description": "Custom username to display in conversations instead of system username",
  7973. "type": "string"
  7974. },
  7975. "mode": {
  7976. "description": "@deprecated Use `agent` field instead.",
  7977. "type": "object",
  7978. "properties": {
  7979. "build": {
  7980. "$ref": "#/components/schemas/AgentConfig"
  7981. },
  7982. "plan": {
  7983. "$ref": "#/components/schemas/AgentConfig"
  7984. }
  7985. },
  7986. "additionalProperties": {
  7987. "$ref": "#/components/schemas/AgentConfig"
  7988. }
  7989. },
  7990. "agent": {
  7991. "description": "Agent configuration, see https://opencode.ai/docs/agent",
  7992. "type": "object",
  7993. "properties": {
  7994. "plan": {
  7995. "$ref": "#/components/schemas/AgentConfig"
  7996. },
  7997. "build": {
  7998. "$ref": "#/components/schemas/AgentConfig"
  7999. },
  8000. "general": {
  8001. "$ref": "#/components/schemas/AgentConfig"
  8002. },
  8003. "explore": {
  8004. "$ref": "#/components/schemas/AgentConfig"
  8005. },
  8006. "title": {
  8007. "$ref": "#/components/schemas/AgentConfig"
  8008. },
  8009. "summary": {
  8010. "$ref": "#/components/schemas/AgentConfig"
  8011. },
  8012. "compaction": {
  8013. "$ref": "#/components/schemas/AgentConfig"
  8014. }
  8015. },
  8016. "additionalProperties": {
  8017. "$ref": "#/components/schemas/AgentConfig"
  8018. }
  8019. },
  8020. "provider": {
  8021. "description": "Custom provider configurations and model overrides",
  8022. "type": "object",
  8023. "propertyNames": {
  8024. "type": "string"
  8025. },
  8026. "additionalProperties": {
  8027. "$ref": "#/components/schemas/ProviderConfig"
  8028. }
  8029. },
  8030. "mcp": {
  8031. "description": "MCP (Model Context Protocol) server configurations",
  8032. "type": "object",
  8033. "propertyNames": {
  8034. "type": "string"
  8035. },
  8036. "additionalProperties": {
  8037. "anyOf": [
  8038. {
  8039. "$ref": "#/components/schemas/McpLocalConfig"
  8040. },
  8041. {
  8042. "$ref": "#/components/schemas/McpRemoteConfig"
  8043. }
  8044. ]
  8045. }
  8046. },
  8047. "formatter": {
  8048. "anyOf": [
  8049. {
  8050. "type": "boolean",
  8051. "const": false
  8052. },
  8053. {
  8054. "type": "object",
  8055. "propertyNames": {
  8056. "type": "string"
  8057. },
  8058. "additionalProperties": {
  8059. "type": "object",
  8060. "properties": {
  8061. "disabled": {
  8062. "type": "boolean"
  8063. },
  8064. "command": {
  8065. "type": "array",
  8066. "items": {
  8067. "type": "string"
  8068. }
  8069. },
  8070. "environment": {
  8071. "type": "object",
  8072. "propertyNames": {
  8073. "type": "string"
  8074. },
  8075. "additionalProperties": {
  8076. "type": "string"
  8077. }
  8078. },
  8079. "extensions": {
  8080. "type": "array",
  8081. "items": {
  8082. "type": "string"
  8083. }
  8084. }
  8085. }
  8086. }
  8087. }
  8088. ]
  8089. },
  8090. "lsp": {
  8091. "anyOf": [
  8092. {
  8093. "type": "boolean",
  8094. "const": false
  8095. },
  8096. {
  8097. "type": "object",
  8098. "propertyNames": {
  8099. "type": "string"
  8100. },
  8101. "additionalProperties": {
  8102. "anyOf": [
  8103. {
  8104. "type": "object",
  8105. "properties": {
  8106. "disabled": {
  8107. "type": "boolean",
  8108. "const": true
  8109. }
  8110. },
  8111. "required": ["disabled"]
  8112. },
  8113. {
  8114. "type": "object",
  8115. "properties": {
  8116. "command": {
  8117. "type": "array",
  8118. "items": {
  8119. "type": "string"
  8120. }
  8121. },
  8122. "extensions": {
  8123. "type": "array",
  8124. "items": {
  8125. "type": "string"
  8126. }
  8127. },
  8128. "disabled": {
  8129. "type": "boolean"
  8130. },
  8131. "env": {
  8132. "type": "object",
  8133. "propertyNames": {
  8134. "type": "string"
  8135. },
  8136. "additionalProperties": {
  8137. "type": "string"
  8138. }
  8139. },
  8140. "initialization": {
  8141. "type": "object",
  8142. "propertyNames": {
  8143. "type": "string"
  8144. },
  8145. "additionalProperties": {}
  8146. }
  8147. },
  8148. "required": ["command"]
  8149. }
  8150. ]
  8151. }
  8152. }
  8153. ]
  8154. },
  8155. "instructions": {
  8156. "description": "Additional instruction files or patterns to include",
  8157. "type": "array",
  8158. "items": {
  8159. "type": "string"
  8160. }
  8161. },
  8162. "layout": {
  8163. "$ref": "#/components/schemas/LayoutConfig"
  8164. },
  8165. "permission": {
  8166. "type": "object",
  8167. "properties": {
  8168. "edit": {
  8169. "type": "string",
  8170. "enum": ["ask", "allow", "deny"]
  8171. },
  8172. "bash": {
  8173. "anyOf": [
  8174. {
  8175. "type": "string",
  8176. "enum": ["ask", "allow", "deny"]
  8177. },
  8178. {
  8179. "type": "object",
  8180. "propertyNames": {
  8181. "type": "string"
  8182. },
  8183. "additionalProperties": {
  8184. "type": "string",
  8185. "enum": ["ask", "allow", "deny"]
  8186. }
  8187. }
  8188. ]
  8189. },
  8190. "webfetch": {
  8191. "type": "string",
  8192. "enum": ["ask", "allow", "deny"]
  8193. },
  8194. "doom_loop": {
  8195. "type": "string",
  8196. "enum": ["ask", "allow", "deny"]
  8197. },
  8198. "external_directory": {
  8199. "type": "string",
  8200. "enum": ["ask", "allow", "deny"]
  8201. }
  8202. }
  8203. },
  8204. "tools": {
  8205. "type": "object",
  8206. "propertyNames": {
  8207. "type": "string"
  8208. },
  8209. "additionalProperties": {
  8210. "type": "boolean"
  8211. }
  8212. },
  8213. "enterprise": {
  8214. "type": "object",
  8215. "properties": {
  8216. "url": {
  8217. "description": "Enterprise URL",
  8218. "type": "string"
  8219. }
  8220. }
  8221. },
  8222. "experimental": {
  8223. "type": "object",
  8224. "properties": {
  8225. "hook": {
  8226. "type": "object",
  8227. "properties": {
  8228. "file_edited": {
  8229. "type": "object",
  8230. "propertyNames": {
  8231. "type": "string"
  8232. },
  8233. "additionalProperties": {
  8234. "type": "array",
  8235. "items": {
  8236. "type": "object",
  8237. "properties": {
  8238. "command": {
  8239. "type": "array",
  8240. "items": {
  8241. "type": "string"
  8242. }
  8243. },
  8244. "environment": {
  8245. "type": "object",
  8246. "propertyNames": {
  8247. "type": "string"
  8248. },
  8249. "additionalProperties": {
  8250. "type": "string"
  8251. }
  8252. }
  8253. },
  8254. "required": ["command"]
  8255. }
  8256. }
  8257. },
  8258. "session_completed": {
  8259. "type": "array",
  8260. "items": {
  8261. "type": "object",
  8262. "properties": {
  8263. "command": {
  8264. "type": "array",
  8265. "items": {
  8266. "type": "string"
  8267. }
  8268. },
  8269. "environment": {
  8270. "type": "object",
  8271. "propertyNames": {
  8272. "type": "string"
  8273. },
  8274. "additionalProperties": {
  8275. "type": "string"
  8276. }
  8277. }
  8278. },
  8279. "required": ["command"]
  8280. }
  8281. }
  8282. }
  8283. },
  8284. "chatMaxRetries": {
  8285. "description": "Number of retries for chat completions on failure",
  8286. "type": "number"
  8287. },
  8288. "disable_paste_summary": {
  8289. "type": "boolean"
  8290. },
  8291. "batch_tool": {
  8292. "description": "Enable the batch tool",
  8293. "type": "boolean"
  8294. },
  8295. "openTelemetry": {
  8296. "description": "Enable OpenTelemetry spans for AI SDK calls (using the 'experimental_telemetry' flag)",
  8297. "type": "boolean"
  8298. },
  8299. "primary_tools": {
  8300. "description": "Tools that should only be available to primary agents.",
  8301. "type": "array",
  8302. "items": {
  8303. "type": "string"
  8304. }
  8305. },
  8306. "continue_loop_on_deny": {
  8307. "description": "Continue the agent loop when a tool call is denied",
  8308. "type": "boolean"
  8309. }
  8310. }
  8311. }
  8312. },
  8313. "additionalProperties": false
  8314. },
  8315. "ToolIDs": {
  8316. "type": "array",
  8317. "items": {
  8318. "type": "string"
  8319. }
  8320. },
  8321. "ToolListItem": {
  8322. "type": "object",
  8323. "properties": {
  8324. "id": {
  8325. "type": "string"
  8326. },
  8327. "description": {
  8328. "type": "string"
  8329. },
  8330. "parameters": {}
  8331. },
  8332. "required": ["id", "description", "parameters"]
  8333. },
  8334. "ToolList": {
  8335. "type": "array",
  8336. "items": {
  8337. "$ref": "#/components/schemas/ToolListItem"
  8338. }
  8339. },
  8340. "Path": {
  8341. "type": "object",
  8342. "properties": {
  8343. "home": {
  8344. "type": "string"
  8345. },
  8346. "state": {
  8347. "type": "string"
  8348. },
  8349. "config": {
  8350. "type": "string"
  8351. },
  8352. "worktree": {
  8353. "type": "string"
  8354. },
  8355. "directory": {
  8356. "type": "string"
  8357. }
  8358. },
  8359. "required": ["home", "state", "config", "worktree", "directory"]
  8360. },
  8361. "VcsInfo": {
  8362. "type": "object",
  8363. "properties": {
  8364. "branch": {
  8365. "type": "string"
  8366. }
  8367. },
  8368. "required": ["branch"]
  8369. },
  8370. "TextPartInput": {
  8371. "type": "object",
  8372. "properties": {
  8373. "id": {
  8374. "type": "string"
  8375. },
  8376. "type": {
  8377. "type": "string",
  8378. "const": "text"
  8379. },
  8380. "text": {
  8381. "type": "string"
  8382. },
  8383. "synthetic": {
  8384. "type": "boolean"
  8385. },
  8386. "ignored": {
  8387. "type": "boolean"
  8388. },
  8389. "time": {
  8390. "type": "object",
  8391. "properties": {
  8392. "start": {
  8393. "type": "number"
  8394. },
  8395. "end": {
  8396. "type": "number"
  8397. }
  8398. },
  8399. "required": ["start"]
  8400. },
  8401. "metadata": {
  8402. "type": "object",
  8403. "propertyNames": {
  8404. "type": "string"
  8405. },
  8406. "additionalProperties": {}
  8407. }
  8408. },
  8409. "required": ["type", "text"]
  8410. },
  8411. "FilePartInput": {
  8412. "type": "object",
  8413. "properties": {
  8414. "id": {
  8415. "type": "string"
  8416. },
  8417. "type": {
  8418. "type": "string",
  8419. "const": "file"
  8420. },
  8421. "mime": {
  8422. "type": "string"
  8423. },
  8424. "filename": {
  8425. "type": "string"
  8426. },
  8427. "url": {
  8428. "type": "string"
  8429. },
  8430. "source": {
  8431. "$ref": "#/components/schemas/FilePartSource"
  8432. }
  8433. },
  8434. "required": ["type", "mime", "url"]
  8435. },
  8436. "AgentPartInput": {
  8437. "type": "object",
  8438. "properties": {
  8439. "id": {
  8440. "type": "string"
  8441. },
  8442. "type": {
  8443. "type": "string",
  8444. "const": "agent"
  8445. },
  8446. "name": {
  8447. "type": "string"
  8448. },
  8449. "source": {
  8450. "type": "object",
  8451. "properties": {
  8452. "value": {
  8453. "type": "string"
  8454. },
  8455. "start": {
  8456. "type": "integer",
  8457. "minimum": -9007199254740991,
  8458. "maximum": 9007199254740991
  8459. },
  8460. "end": {
  8461. "type": "integer",
  8462. "minimum": -9007199254740991,
  8463. "maximum": 9007199254740991
  8464. }
  8465. },
  8466. "required": ["value", "start", "end"]
  8467. }
  8468. },
  8469. "required": ["type", "name"]
  8470. },
  8471. "SubtaskPartInput": {
  8472. "type": "object",
  8473. "properties": {
  8474. "id": {
  8475. "type": "string"
  8476. },
  8477. "type": {
  8478. "type": "string",
  8479. "const": "subtask"
  8480. },
  8481. "prompt": {
  8482. "type": "string"
  8483. },
  8484. "description": {
  8485. "type": "string"
  8486. },
  8487. "agent": {
  8488. "type": "string"
  8489. }
  8490. },
  8491. "required": ["type", "prompt", "description", "agent"]
  8492. },
  8493. "Command": {
  8494. "type": "object",
  8495. "properties": {
  8496. "name": {
  8497. "type": "string"
  8498. },
  8499. "description": {
  8500. "type": "string"
  8501. },
  8502. "agent": {
  8503. "type": "string"
  8504. },
  8505. "model": {
  8506. "type": "string"
  8507. },
  8508. "template": {
  8509. "type": "string"
  8510. },
  8511. "subtask": {
  8512. "type": "boolean"
  8513. }
  8514. },
  8515. "required": ["name", "template"]
  8516. },
  8517. "Model": {
  8518. "type": "object",
  8519. "properties": {
  8520. "id": {
  8521. "type": "string"
  8522. },
  8523. "providerID": {
  8524. "type": "string"
  8525. },
  8526. "api": {
  8527. "type": "object",
  8528. "properties": {
  8529. "id": {
  8530. "type": "string"
  8531. },
  8532. "url": {
  8533. "type": "string"
  8534. },
  8535. "npm": {
  8536. "type": "string"
  8537. }
  8538. },
  8539. "required": ["id", "url", "npm"]
  8540. },
  8541. "name": {
  8542. "type": "string"
  8543. },
  8544. "family": {
  8545. "type": "string"
  8546. },
  8547. "capabilities": {
  8548. "type": "object",
  8549. "properties": {
  8550. "temperature": {
  8551. "type": "boolean"
  8552. },
  8553. "reasoning": {
  8554. "type": "boolean"
  8555. },
  8556. "attachment": {
  8557. "type": "boolean"
  8558. },
  8559. "toolcall": {
  8560. "type": "boolean"
  8561. },
  8562. "input": {
  8563. "type": "object",
  8564. "properties": {
  8565. "text": {
  8566. "type": "boolean"
  8567. },
  8568. "audio": {
  8569. "type": "boolean"
  8570. },
  8571. "image": {
  8572. "type": "boolean"
  8573. },
  8574. "video": {
  8575. "type": "boolean"
  8576. },
  8577. "pdf": {
  8578. "type": "boolean"
  8579. }
  8580. },
  8581. "required": ["text", "audio", "image", "video", "pdf"]
  8582. },
  8583. "output": {
  8584. "type": "object",
  8585. "properties": {
  8586. "text": {
  8587. "type": "boolean"
  8588. },
  8589. "audio": {
  8590. "type": "boolean"
  8591. },
  8592. "image": {
  8593. "type": "boolean"
  8594. },
  8595. "video": {
  8596. "type": "boolean"
  8597. },
  8598. "pdf": {
  8599. "type": "boolean"
  8600. }
  8601. },
  8602. "required": ["text", "audio", "image", "video", "pdf"]
  8603. },
  8604. "interleaved": {
  8605. "anyOf": [
  8606. {
  8607. "type": "boolean"
  8608. },
  8609. {
  8610. "type": "object",
  8611. "properties": {
  8612. "field": {
  8613. "type": "string",
  8614. "enum": ["reasoning_content", "reasoning_details"]
  8615. }
  8616. },
  8617. "required": ["field"]
  8618. }
  8619. ]
  8620. }
  8621. },
  8622. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"]
  8623. },
  8624. "cost": {
  8625. "type": "object",
  8626. "properties": {
  8627. "input": {
  8628. "type": "number"
  8629. },
  8630. "output": {
  8631. "type": "number"
  8632. },
  8633. "cache": {
  8634. "type": "object",
  8635. "properties": {
  8636. "read": {
  8637. "type": "number"
  8638. },
  8639. "write": {
  8640. "type": "number"
  8641. }
  8642. },
  8643. "required": ["read", "write"]
  8644. },
  8645. "experimentalOver200K": {
  8646. "type": "object",
  8647. "properties": {
  8648. "input": {
  8649. "type": "number"
  8650. },
  8651. "output": {
  8652. "type": "number"
  8653. },
  8654. "cache": {
  8655. "type": "object",
  8656. "properties": {
  8657. "read": {
  8658. "type": "number"
  8659. },
  8660. "write": {
  8661. "type": "number"
  8662. }
  8663. },
  8664. "required": ["read", "write"]
  8665. }
  8666. },
  8667. "required": ["input", "output", "cache"]
  8668. }
  8669. },
  8670. "required": ["input", "output", "cache"]
  8671. },
  8672. "limit": {
  8673. "type": "object",
  8674. "properties": {
  8675. "context": {
  8676. "type": "number"
  8677. },
  8678. "output": {
  8679. "type": "number"
  8680. }
  8681. },
  8682. "required": ["context", "output"]
  8683. },
  8684. "status": {
  8685. "type": "string",
  8686. "enum": ["alpha", "beta", "deprecated", "active"]
  8687. },
  8688. "options": {
  8689. "type": "object",
  8690. "propertyNames": {
  8691. "type": "string"
  8692. },
  8693. "additionalProperties": {}
  8694. },
  8695. "headers": {
  8696. "type": "object",
  8697. "propertyNames": {
  8698. "type": "string"
  8699. },
  8700. "additionalProperties": {
  8701. "type": "string"
  8702. }
  8703. },
  8704. "release_date": {
  8705. "type": "string"
  8706. }
  8707. },
  8708. "required": [
  8709. "id",
  8710. "providerID",
  8711. "api",
  8712. "name",
  8713. "capabilities",
  8714. "cost",
  8715. "limit",
  8716. "status",
  8717. "options",
  8718. "headers",
  8719. "release_date"
  8720. ]
  8721. },
  8722. "Provider": {
  8723. "type": "object",
  8724. "properties": {
  8725. "id": {
  8726. "type": "string"
  8727. },
  8728. "name": {
  8729. "type": "string"
  8730. },
  8731. "source": {
  8732. "type": "string",
  8733. "enum": ["env", "config", "custom", "api"]
  8734. },
  8735. "env": {
  8736. "type": "array",
  8737. "items": {
  8738. "type": "string"
  8739. }
  8740. },
  8741. "key": {
  8742. "type": "string"
  8743. },
  8744. "options": {
  8745. "type": "object",
  8746. "propertyNames": {
  8747. "type": "string"
  8748. },
  8749. "additionalProperties": {}
  8750. },
  8751. "models": {
  8752. "type": "object",
  8753. "propertyNames": {
  8754. "type": "string"
  8755. },
  8756. "additionalProperties": {
  8757. "$ref": "#/components/schemas/Model"
  8758. }
  8759. }
  8760. },
  8761. "required": ["id", "name", "source", "env", "options", "models"]
  8762. },
  8763. "ProviderAuthMethod": {
  8764. "type": "object",
  8765. "properties": {
  8766. "type": {
  8767. "anyOf": [
  8768. {
  8769. "type": "string",
  8770. "const": "oauth"
  8771. },
  8772. {
  8773. "type": "string",
  8774. "const": "api"
  8775. }
  8776. ]
  8777. },
  8778. "label": {
  8779. "type": "string"
  8780. }
  8781. },
  8782. "required": ["type", "label"]
  8783. },
  8784. "ProviderAuthAuthorization": {
  8785. "type": "object",
  8786. "properties": {
  8787. "url": {
  8788. "type": "string"
  8789. },
  8790. "method": {
  8791. "anyOf": [
  8792. {
  8793. "type": "string",
  8794. "const": "auto"
  8795. },
  8796. {
  8797. "type": "string",
  8798. "const": "code"
  8799. }
  8800. ]
  8801. },
  8802. "instructions": {
  8803. "type": "string"
  8804. }
  8805. },
  8806. "required": ["url", "method", "instructions"]
  8807. },
  8808. "Symbol": {
  8809. "type": "object",
  8810. "properties": {
  8811. "name": {
  8812. "type": "string"
  8813. },
  8814. "kind": {
  8815. "type": "number"
  8816. },
  8817. "location": {
  8818. "type": "object",
  8819. "properties": {
  8820. "uri": {
  8821. "type": "string"
  8822. },
  8823. "range": {
  8824. "$ref": "#/components/schemas/Range"
  8825. }
  8826. },
  8827. "required": ["uri", "range"]
  8828. }
  8829. },
  8830. "required": ["name", "kind", "location"]
  8831. },
  8832. "FileNode": {
  8833. "type": "object",
  8834. "properties": {
  8835. "name": {
  8836. "type": "string"
  8837. },
  8838. "path": {
  8839. "type": "string"
  8840. },
  8841. "absolute": {
  8842. "type": "string"
  8843. },
  8844. "type": {
  8845. "type": "string",
  8846. "enum": ["file", "directory"]
  8847. },
  8848. "ignored": {
  8849. "type": "boolean"
  8850. }
  8851. },
  8852. "required": ["name", "path", "absolute", "type", "ignored"]
  8853. },
  8854. "FileContent": {
  8855. "type": "object",
  8856. "properties": {
  8857. "type": {
  8858. "type": "string",
  8859. "const": "text"
  8860. },
  8861. "content": {
  8862. "type": "string"
  8863. },
  8864. "diff": {
  8865. "type": "string"
  8866. },
  8867. "patch": {
  8868. "type": "object",
  8869. "properties": {
  8870. "oldFileName": {
  8871. "type": "string"
  8872. },
  8873. "newFileName": {
  8874. "type": "string"
  8875. },
  8876. "oldHeader": {
  8877. "type": "string"
  8878. },
  8879. "newHeader": {
  8880. "type": "string"
  8881. },
  8882. "hunks": {
  8883. "type": "array",
  8884. "items": {
  8885. "type": "object",
  8886. "properties": {
  8887. "oldStart": {
  8888. "type": "number"
  8889. },
  8890. "oldLines": {
  8891. "type": "number"
  8892. },
  8893. "newStart": {
  8894. "type": "number"
  8895. },
  8896. "newLines": {
  8897. "type": "number"
  8898. },
  8899. "lines": {
  8900. "type": "array",
  8901. "items": {
  8902. "type": "string"
  8903. }
  8904. }
  8905. },
  8906. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"]
  8907. }
  8908. },
  8909. "index": {
  8910. "type": "string"
  8911. }
  8912. },
  8913. "required": ["oldFileName", "newFileName", "hunks"]
  8914. },
  8915. "encoding": {
  8916. "type": "string",
  8917. "const": "base64"
  8918. },
  8919. "mimeType": {
  8920. "type": "string"
  8921. }
  8922. },
  8923. "required": ["type", "content"]
  8924. },
  8925. "File": {
  8926. "type": "object",
  8927. "properties": {
  8928. "path": {
  8929. "type": "string"
  8930. },
  8931. "added": {
  8932. "type": "integer",
  8933. "minimum": -9007199254740991,
  8934. "maximum": 9007199254740991
  8935. },
  8936. "removed": {
  8937. "type": "integer",
  8938. "minimum": -9007199254740991,
  8939. "maximum": 9007199254740991
  8940. },
  8941. "status": {
  8942. "type": "string",
  8943. "enum": ["added", "deleted", "modified"]
  8944. }
  8945. },
  8946. "required": ["path", "added", "removed", "status"]
  8947. },
  8948. "Agent": {
  8949. "type": "object",
  8950. "properties": {
  8951. "name": {
  8952. "type": "string"
  8953. },
  8954. "description": {
  8955. "type": "string"
  8956. },
  8957. "mode": {
  8958. "type": "string",
  8959. "enum": ["subagent", "primary", "all"]
  8960. },
  8961. "native": {
  8962. "type": "boolean"
  8963. },
  8964. "hidden": {
  8965. "type": "boolean"
  8966. },
  8967. "topP": {
  8968. "type": "number"
  8969. },
  8970. "temperature": {
  8971. "type": "number"
  8972. },
  8973. "color": {
  8974. "type": "string"
  8975. },
  8976. "permission": {
  8977. "type": "object",
  8978. "properties": {
  8979. "edit": {
  8980. "type": "string",
  8981. "enum": ["ask", "allow", "deny"]
  8982. },
  8983. "bash": {
  8984. "type": "object",
  8985. "propertyNames": {
  8986. "type": "string"
  8987. },
  8988. "additionalProperties": {
  8989. "type": "string",
  8990. "enum": ["ask", "allow", "deny"]
  8991. }
  8992. },
  8993. "webfetch": {
  8994. "type": "string",
  8995. "enum": ["ask", "allow", "deny"]
  8996. },
  8997. "doom_loop": {
  8998. "type": "string",
  8999. "enum": ["ask", "allow", "deny"]
  9000. },
  9001. "external_directory": {
  9002. "type": "string",
  9003. "enum": ["ask", "allow", "deny"]
  9004. }
  9005. },
  9006. "required": ["edit", "bash"]
  9007. },
  9008. "model": {
  9009. "type": "object",
  9010. "properties": {
  9011. "modelID": {
  9012. "type": "string"
  9013. },
  9014. "providerID": {
  9015. "type": "string"
  9016. }
  9017. },
  9018. "required": ["modelID", "providerID"]
  9019. },
  9020. "prompt": {
  9021. "type": "string"
  9022. },
  9023. "tools": {
  9024. "type": "object",
  9025. "propertyNames": {
  9026. "type": "string"
  9027. },
  9028. "additionalProperties": {
  9029. "type": "boolean"
  9030. }
  9031. },
  9032. "options": {
  9033. "type": "object",
  9034. "propertyNames": {
  9035. "type": "string"
  9036. },
  9037. "additionalProperties": {}
  9038. },
  9039. "maxSteps": {
  9040. "type": "integer",
  9041. "exclusiveMinimum": 0,
  9042. "maximum": 9007199254740991
  9043. }
  9044. },
  9045. "required": ["name", "mode", "permission", "tools", "options"]
  9046. },
  9047. "MCPStatusConnected": {
  9048. "type": "object",
  9049. "properties": {
  9050. "status": {
  9051. "type": "string",
  9052. "const": "connected"
  9053. }
  9054. },
  9055. "required": ["status"]
  9056. },
  9057. "MCPStatusDisabled": {
  9058. "type": "object",
  9059. "properties": {
  9060. "status": {
  9061. "type": "string",
  9062. "const": "disabled"
  9063. }
  9064. },
  9065. "required": ["status"]
  9066. },
  9067. "MCPStatusFailed": {
  9068. "type": "object",
  9069. "properties": {
  9070. "status": {
  9071. "type": "string",
  9072. "const": "failed"
  9073. },
  9074. "error": {
  9075. "type": "string"
  9076. }
  9077. },
  9078. "required": ["status", "error"]
  9079. },
  9080. "MCPStatusNeedsAuth": {
  9081. "type": "object",
  9082. "properties": {
  9083. "status": {
  9084. "type": "string",
  9085. "const": "needs_auth"
  9086. }
  9087. },
  9088. "required": ["status"]
  9089. },
  9090. "MCPStatusNeedsClientRegistration": {
  9091. "type": "object",
  9092. "properties": {
  9093. "status": {
  9094. "type": "string",
  9095. "const": "needs_client_registration"
  9096. },
  9097. "error": {
  9098. "type": "string"
  9099. }
  9100. },
  9101. "required": ["status", "error"]
  9102. },
  9103. "MCPStatus": {
  9104. "anyOf": [
  9105. {
  9106. "$ref": "#/components/schemas/MCPStatusConnected"
  9107. },
  9108. {
  9109. "$ref": "#/components/schemas/MCPStatusDisabled"
  9110. },
  9111. {
  9112. "$ref": "#/components/schemas/MCPStatusFailed"
  9113. },
  9114. {
  9115. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  9116. },
  9117. {
  9118. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  9119. }
  9120. ]
  9121. },
  9122. "LSPStatus": {
  9123. "type": "object",
  9124. "properties": {
  9125. "id": {
  9126. "type": "string"
  9127. },
  9128. "name": {
  9129. "type": "string"
  9130. },
  9131. "root": {
  9132. "type": "string"
  9133. },
  9134. "status": {
  9135. "anyOf": [
  9136. {
  9137. "type": "string",
  9138. "const": "connected"
  9139. },
  9140. {
  9141. "type": "string",
  9142. "const": "error"
  9143. }
  9144. ]
  9145. }
  9146. },
  9147. "required": ["id", "name", "root", "status"]
  9148. },
  9149. "FormatterStatus": {
  9150. "type": "object",
  9151. "properties": {
  9152. "name": {
  9153. "type": "string"
  9154. },
  9155. "extensions": {
  9156. "type": "array",
  9157. "items": {
  9158. "type": "string"
  9159. }
  9160. },
  9161. "enabled": {
  9162. "type": "boolean"
  9163. }
  9164. },
  9165. "required": ["name", "extensions", "enabled"]
  9166. },
  9167. "OAuth": {
  9168. "type": "object",
  9169. "properties": {
  9170. "type": {
  9171. "type": "string",
  9172. "const": "oauth"
  9173. },
  9174. "refresh": {
  9175. "type": "string"
  9176. },
  9177. "access": {
  9178. "type": "string"
  9179. },
  9180. "expires": {
  9181. "type": "number"
  9182. },
  9183. "enterpriseUrl": {
  9184. "type": "string"
  9185. }
  9186. },
  9187. "required": ["type", "refresh", "access", "expires"]
  9188. },
  9189. "ApiAuth": {
  9190. "type": "object",
  9191. "properties": {
  9192. "type": {
  9193. "type": "string",
  9194. "const": "api"
  9195. },
  9196. "key": {
  9197. "type": "string"
  9198. }
  9199. },
  9200. "required": ["type", "key"]
  9201. },
  9202. "WellKnownAuth": {
  9203. "type": "object",
  9204. "properties": {
  9205. "type": {
  9206. "type": "string",
  9207. "const": "wellknown"
  9208. },
  9209. "key": {
  9210. "type": "string"
  9211. },
  9212. "token": {
  9213. "type": "string"
  9214. }
  9215. },
  9216. "required": ["type", "key", "token"]
  9217. },
  9218. "Auth": {
  9219. "anyOf": [
  9220. {
  9221. "$ref": "#/components/schemas/OAuth"
  9222. },
  9223. {
  9224. "$ref": "#/components/schemas/ApiAuth"
  9225. },
  9226. {
  9227. "$ref": "#/components/schemas/WellKnownAuth"
  9228. }
  9229. ]
  9230. }
  9231. }
  9232. }
  9233. }